query
stringlengths 7
33.1k
| document
stringlengths 7
335k
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Returns the used offset on the xaxis for drawing the axis or legend labels. This offset is applied before and after the label. | public float getXOffset() {
return mXOffset;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float XOffset() {\n\t\tfloat xoffset = 0;\n\t\tif (MouseX() + 12 + (tipw * 7 + 4) > MainSim.WinX) {\t\t\t \t// If the tooltip will be outside the window (based on mousex):\n\t\t\txoffset = (MouseX() + 12 + (tipw * 7 + 4)) - MainSim.WinX; \t\t// Find how much the tip will be drawn outside\n\t\t} else {\n\t\t\txoffset = 0;\n\t\t}\n\t\treturn xoffset;\n\t}",
"public float getxOffset() {\n\t\treturn xOffset;\n\t}",
"public double getxOffset() {\n return currentXOffset + xOffset;\n }",
"public final int getXOffset() {\n return xOffset;\n }",
"public String getxLabel() {\n return xLabel;\n }",
"public int getXOffset();",
"public final int getPosX(int extraOffset) {\n final int align = alignment.getValue().ordinal();\n final int dirSignX = AlignHelper.getFlowDirX2(align);\n return (extraOffset + offsetX.getValue()) * dirSignX + AlignHelper.alignH(Common.getScreenWidth(), align);\n }",
"int getLabelOffset();",
"public double calculateXOffset(AxisAlignedBB axis, double offSet) {\n\t\tif (axis.maxY > this.minY && axis.minY < this.maxY) {\n\t\t\tif (axis.maxZ > this.minZ && axis.minZ < this.maxZ) {\n\t\t\t\tdouble var4;\n\n\t\t\t\tif (offSet > 0.0D && axis.maxX <= this.minX) {\n\t\t\t\t\tvar4 = this.minX - axis.maxX;\n\n\t\t\t\t\tif (var4 < offSet) {\n\t\t\t\t\t\toffSet = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (offSet < 0.0D && axis.minX >= this.maxX) {\n\t\t\t\t\tvar4 = this.maxX - axis.minX;\n\n\t\t\t\t\tif (var4 > offSet) {\n\t\t\t\t\t\toffSet = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn offSet;\n\t\t\t} else {\n\t\t\t\treturn offSet;\n\t\t\t}\n\t\t} else {\n\t\t\treturn offSet;\n\t\t}\n\t}",
"public Integer getXOffset() {\n\t\tdouble frameWidth = this.pixy.getFrameWidth() / 2;\n\t\tdouble blockX = this.getX();\n\n\t\treturn (int) (blockX + frameWidth / 2);\n\t}",
"protected abstract int getXOffset();",
"public int getXCenter() {\n return getXOrigin() + panelWidth/2;\n }",
"public int getX() {\n return PADDING;\n //return columnToX(this.getCols());\n //throw new UnsupportedOperationException();\n }",
"String getXAxisLabel();",
"@Override\n public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }",
"private void setXAxis() {\n XAxis xAxis = mChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setGranularityEnabled(true);\n xAxis.setCenterAxisLabels(false);\n xAxis.setDrawGridLines(false);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(getXAxisValues()));\n xAxis.setLabelCount(30);\n }",
"public abstract int getTickOffset();",
"public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }",
"protected double getReferenceX() {\n if (isXAxisBoundsManual() && !mGraphView.getGridLabelRenderer().isHumanRoundingX()) {\n if (Double.isNaN(referenceX)) {\n referenceX = getMinX(false);\n }\n return referenceX;\n } else {\n // starting from 0 so that the steps have nice numbers\n return 0;\n }\n }",
"double getTickBorderDashOffset();",
"@java.lang.Override\n public int getScrollOffsetX() {\n return instance.getScrollOffsetX();\n }",
"public float getRenderOffsetX()\r\n {\r\n return renderOffsetX;\r\n }",
"public int getDesplaceOffsetX(){\n\t\tif(style==Style.ROUTES){\r\n\t\t\treturn -10;\r\n\t\t}else{\r\n\t\t\treturn -6;\r\n\t\t}\r\n\t}",
"public double getX() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble x = bounds.getX() + (_xt * bounds.getWidth());\n\t\treturn x;\n\t}",
"public int getX()\n {\n return xaxis;\n }",
"public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }",
"int getScrollOffsetX();",
"public static int getOrigX() {\n return 1;\n }",
"public static int getStartXCoordinate(){\n\t\tint x = getThymioStartField_X(); \n\t\t\n\t\tif(x == 0){\n\t\t\n \t}else{\n \t x *= FIELD_HEIGHT;\n \t}\n \t\n\t\treturn x ;\n\t}",
"private int getErrorX() {\n /*\n * The \"25\" is the distance between the point and the right edge\n * of the background\n */\n final float scale = mView.getResources().getDisplayMetrics().density;\n\n final Drawables dr = mDrawables;\n\n final int layoutDirection = mView.getLayoutDirection();\n int errorX;\n int offset;\n switch (layoutDirection) {\n default:\n case View.LAYOUT_DIRECTION_LTR:\n offset = -(dr != null ? dr.mDrawableSizeRight : 0) / 2 + (int) (25 * scale + 0.5f);\n errorX = mView.getWidth() - mPopup.getWidth() -\n mView.getPaddingRight() + offset;\n break;\n case View.LAYOUT_DIRECTION_RTL:\n offset = (dr != null ? dr.mDrawableSizeLeft : 0) / 2 - (int) (25 * scale + 0.5f);\n errorX = mView.getPaddingLeft() + offset;\n break;\n }\n return errorX;\n }",
"public float getLayoutAlignmentX(Container target) {\n return 0.5f;\n }",
"public float getLayoutAlignmentX(Container target) {\n\t\treturn 0;\r\n\t}",
"protected final float getInsetSpan(int axis) {\n// assert ViewUtilities.isAxisValid(axis);\n\n ViewInsets insets = getInsets();\n return (insets != null)\n ? ((axis == X_AXIS) ? insets.getLeftRight() : insets.getTopBottom())\n : 0;\n }",
"public float getX()\n {\n return getBounds().left + positionAnchor.x;\n }",
"public int xPos() {\n\t\treturn Engine.scaleX(x);\n\t}",
"@java.lang.Override\n public int getScrollOffsetX() {\n return scrollOffsetX_;\n }",
"public int getStart ()\r\n {\r\n return glyph.getBounds().x;\r\n }",
"public int getPreferredHorizontalOffset() {\n\t\treturn preferredHorizontalOffset;\n\t}",
"default Integer getXOffset() {\n return null;\n }",
"private double xPos(double xMetres){\r\n\t\treturn xMetres*14+canvas.getWidth()/2;\r\n\t}",
"public Integer getCaretPosX() {\n\t\tint[] caretPos = getCaretPos();\n\t\treturn (caretPos == null) ? null : caretPos[0];\n\t}",
"public final float getPositionX() {\r\n\t\treturn getState(false).getPositionX();\r\n\t}",
"private void drawHorizontalAxisLabels(Graphics2D g2) {\r\n double axisH = yPositionToPixel(originY);\r\n FontMetrics metrics = g2.getFontMetrics();\r\n \r\n// double startX = Math.floor((minX - originX) / majorX) * majorX;\r\n double startX = Math.floor(minX / majorX) * majorX;\r\n for (double x = startX; x < maxX + majorX; x += majorX) {\r\n if (((x - majorX / 2.0) < originX) &&\r\n ((x + majorX / 2.0) > originX)) {\r\n continue;\r\n }\r\n \r\n int position = (int) xPositionToPixel(x);\r\n g2.drawString(format(x), position,\r\n (int) axisH + metrics.getHeight());\r\n }\r\n }",
"public void getOriginX(){\n\t\toriginX.setText(Double.toString(note.getOriginX()));\n\t}",
"private float x0(int c)\n {\n PlotProperties props = getPlotProperties();\n\n float x0 = props.getXMin() + c*props.getXDelta();\n x0Text.setText(Float.toString(x0));\n\n return x0;\n }",
"public final int getXOff() {\r\n\t\treturn xOff;\r\n\t}",
"public void setxLabel(String xLabel) {\n this.xLabel = xLabel;\n }",
"@Override\n\tpublic double getXPos() {\n\t\treturn field_145851_c;\n\t}",
"protected abstract float getRequiredLegendOffset();",
"public int getXLabelFreq() {\n return m_xValFreq;\n }",
"public int getXPointerPosition() {\n\t\treturn getXPosition() + getXOffset();\n\t}",
"public int getRootX() {\n return this.mX + this.mOffsetX;\n }",
"public int getXPosition(){\n\t\treturn xPosition;\n\t}",
"@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}",
"private int get_x() {\n return center_x;\n }",
"public final int getAbsoluteX() {\n assert (parent != null);\n if (parent == this) {\n return x;\n }\n if ((parent instanceof TWindow)\n && !(parent instanceof TMenu)\n && !(parent instanceof TDesktop)\n ) {\n // Widgets on a TWindow have (0,0) as their top-left, but this is\n // actually the TWindow's (1,1).\n return parent.getAbsoluteX() + x + 1;\n }\n return parent.getAbsoluteX() + x;\n }",
"public int getStartX() {\r\n\t\treturn startX;\r\n\t}",
"public int getxPosition() {\n\t\treturn xPosition;\n\t}",
"public int getxPos() {\n\t\treturn xPos;\n\t}",
"public int getComponentLabelMargin() {\n\t\treturn componentLabelMargin;\n\t}",
"public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public static NumberAxis calcAxisX() {\n double minX = 0;\n double maxX = Collections.max(GlobalVariables.systemCorridor.getDistances())\n / GlobalVariables.systemCorridor.getSpeed()\n + GlobalVariables.cycleLen.get();\n maxX = 3 * GlobalVariables.cycleLen.get() > maxX ? 3 * GlobalVariables.cycleLen.get() : maxX;\n maxX = Math.round(maxX / 10) * 10;\n double scaleX = 0.1 * (maxX - minX);\n scaleX = Math.round(scaleX / 10) * 10;\n NumberAxis axis = new NumberAxis(\"Time (sec)\", minX, maxX, scaleX);\n axis.setTickLabelFont(Font.font(18));\n return axis;\n }",
"public int getXPos() {\n\t\treturn xPos;\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getLeftXAxis() {\n\t\treturn getRawAxis(Axis_LeftX);\n\t}",
"public ChartXAxis getXAxis() { return _xaxis; }",
"public int getxPos() \n\t{\n\t\treturn xPos;\n\t}",
"public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}",
"public void setXOffset(float xOffset) {\n pos.x = xOffset;\n invalidate();\n }",
"public void setXAxisLabel(String xAxisLabel){\n xAxisName = xAxisLabel;\n }",
"@Override\n\tpublic float getLayoutAlignmentX(Container target) {\n\t\treturn 0;\n\t}",
"org.apache.xmlbeans.XmlInt xgetAnchorOffset();",
"public float getLayoutAlignmentX(Container parent)\n\t{\n\t\treturn 0.5f;\n\t}",
"public int getXPosition() {\n return xPosition;\n }",
"public double getBorderCenterX()\n {\n return borderCenterX;\n }",
"public void setLabelPosition(int x, int y);",
"public void calculateOffsets() {\n /* 113 */\n float legendLeft = 0.0F, legendRight = 0.0F, legendBottom = 0.0F, legendTop = 0.0F;\n /* */\n /* 115 */\n if (this.mLegend != null && this.mLegend.isEnabled() && !this.mLegend.isDrawInsideEnabled()) {\n /* */\n /* 117 */\n float yLegendOffset, fullLegendWidth = Math.min(this.mLegend.mNeededWidth, this.mViewPortHandler\n/* 118 */.getChartWidth() * this.mLegend.getMaxSizePercent());\n /* */\n /* 120 */\n switch (this.mLegend.getOrientation()) {\n /* */\n case VERTICAL:\n /* 122 */\n float xLegendOffset = 0.0F;\n /* */\n /* 124 */\n if (this.mLegend.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.LEFT || this.mLegend\n/* 125 */.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.RIGHT) {\n /* 126 */\n if (this.mLegend.getVerticalAlignment() == Legend.LegendVerticalAlignment.CENTER) {\n /* */\n /* 128 */\n float spacing = Utils.convertDpToPixel(13.0F);\n /* */\n /* 130 */\n xLegendOffset = fullLegendWidth + spacing;\n /* */\n }\n /* */\n else {\n /* */\n /* 134 */\n float spacing = Utils.convertDpToPixel(8.0F);\n /* */\n /* 136 */\n float legendWidth = fullLegendWidth + spacing;\n /* 137 */\n float legendHeight = this.mLegend.mNeededHeight + this.mLegend.mTextHeightMax;\n /* */\n /* 139 */\n MPPointF center = getCenter();\n /* */\n /* */\n /* */\n /* 143 */\n float bottomX = (this.mLegend.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.RIGHT) ? (getWidth() - legendWidth + 15.0F) : (legendWidth - 15.0F);\n /* */\n /* 145 */\n float bottomY = legendHeight + 15.0F;\n /* 146 */\n float distLegend = distanceToCenter(bottomX, bottomY);\n /* */\n /* 148 */\n MPPointF reference = getPosition(center, getRadius(),\n /* 149 */ getAngleForPoint(bottomX, bottomY));\n /* */\n /* 151 */\n float distReference = distanceToCenter(reference.x, reference.y);\n /* 152 */\n float minOffset = Utils.convertDpToPixel(5.0F);\n /* */\n /* 154 */\n if (bottomY >= center.y && getHeight() - legendWidth > getWidth()) {\n /* 155 */\n xLegendOffset = legendWidth;\n /* 156 */\n } else if (distLegend < distReference) {\n /* */\n /* 158 */\n float diff = distReference - distLegend;\n /* 159 */\n xLegendOffset = minOffset + diff;\n /* */\n }\n /* */\n /* 162 */\n MPPointF.recycleInstance(center);\n /* 163 */\n MPPointF.recycleInstance(reference);\n /* */\n }\n /* */\n }\n /* */\n /* 167 */\n switch (this.mLegend.getHorizontalAlignment()) {\n /* */\n// case VERTICAL:\n// /* 169 */\n// legendLeft = xLegendOffset;\n// /* */\n// break;\n// /* */\n// /* */\n// case HORIZONTAL:\n// /* 173 */\n// legendRight = xLegendOffset;\n// break;\n }\n switch (this.mLegend.getVerticalAlignment())\n /* */ {\n// case VERTICAL:\n// /* 179 */\n// legendTop = Math.min(this.mLegend.mNeededHeight, this.mViewPortHandler\n///* 180 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n// break;\n// /* */\n// case HORIZONTAL:\n// /* */\n// case null:\n// /* 183 */\n// break;\n }\n legendBottom = Math.min(this.mLegend.mNeededHeight, this.mViewPortHandler\n/* 184 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n /* */\n break;\n /* */\n /* */\n /* */\n /* */\n /* */\n /* */\n /* */\n case HORIZONTAL:\n /* 193 */\n yLegendOffset = 0.0F;\n /* */\n /* 195 */\n if (this.mLegend.getVerticalAlignment() == Legend.LegendVerticalAlignment.TOP || this.mLegend\n/* 196 */.getVerticalAlignment() == Legend.LegendVerticalAlignment.BOTTOM) {\n /* */\n /* */\n /* */\n /* */\n /* 201 */\n float yOffset = getRequiredLegendOffset();\n /* */\n /* 203 */\n yLegendOffset = Math.min(this.mLegend.mNeededHeight + yOffset, this.mViewPortHandler\n/* 204 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n /* */\n /* 206 */\n switch (this.mLegend.getVerticalAlignment())\n /* */ {\n// case VERTICAL:\n// /* 208 */\n// legendTop = yLegendOffset;\n// break;\n// /* */\n// case HORIZONTAL:\n// /* */\n// case null:\n// /* 211 */\n// break;\n }\n legendBottom = yLegendOffset;\n /* */\n }\n /* */\n break;\n /* */\n }\n /* */\n /* */\n /* */\n /* 218 */\n legendLeft += getRequiredBaseOffset();\n /* 219 */\n legendRight += getRequiredBaseOffset();\n /* 220 */\n legendTop += getRequiredBaseOffset();\n /* 221 */\n legendBottom += getRequiredBaseOffset();\n /* */\n }\n /* */\n /* 224 */\n float minOffset = Utils.convertDpToPixel(this.mMinOffset);\n /* */\n /* 226 */\n if (this instanceof RadarChart) {\n /* 227 */\n XAxis x = getXAxis();\n /* */\n /* 229 */\n if (x.isEnabled() && x.isDrawLabelsEnabled()) {\n /* 230 */\n minOffset = Math.max(minOffset, x.mLabelRotatedWidth);\n /* */\n }\n /* */\n }\n /* */\n /* 234 */\n legendTop += getExtraTopOffset();\n /* 235 */\n legendRight += getExtraRightOffset();\n /* 236 */\n legendBottom += getExtraBottomOffset();\n /* 237 */\n legendLeft += getExtraLeftOffset();\n /* */\n /* 239 */\n float offsetLeft = Math.max(minOffset, legendLeft);\n /* 240 */\n float offsetTop = Math.max(minOffset, legendTop);\n /* 241 */\n float offsetRight = Math.max(minOffset, legendRight);\n /* 242 */\n float offsetBottom = Math.max(minOffset, Math.max(getRequiredBaseOffset(), legendBottom));\n /* */\n /* 244 */\n this.mViewPortHandler.restrainViewPort(offsetLeft, offsetTop, offsetRight, offsetBottom);\n /* */\n /* 246 */\n if (this.mLogEnabled) {\n /* 247 */\n Log.i(\"MPAndroidChart\", \"offsetLeft: \" + offsetLeft + \", offsetTop: \" + offsetTop + \", offsetRight: \" + offsetRight + \", offsetBottom: \" + offsetBottom);\n /* */\n }\n /* */\n }",
"public int getX() {\n\t\t\n\t\treturn xPosition;\t\t// Gets the x integer\n\t}",
"public final void setXOffset(final int xOffset) {\n this.xOffset = xOffset;\n }",
"public int getPositionX(){\n\t\treturn positionx;\n\t}",
"private int xpos(final PlatformEvent event) {\n // To support Noncontiguous NodeId, the index of the NodeId in the address book is used.\n final int nodeIndex = platform.getAddressBook().getIndexOfNodeId(event.getCreatorId());\n return (nodeIndex + 1) * width / (numColumns + 1);\n }",
"public void setOffsetX(int offsetX) {\n\t\tthis.offsetX = offsetX;\n\t}",
"public float getMinimumSpan(int axis) {\n if (view != null) {\n return view.getMinimumSpan(axis);\n }\n return 10;\n }",
"protected final float getMajorAxisInsetSpan() {\n ViewInsets insets = getInsets();\n return (insets != null)\n ? (isXMajorAxis() ? insets.getLeftRight() : insets.getTopBottom())\n : 0;\n }",
"public float getLayoutAlignmentX(Container target) \n {\n\treturn (float)0.0;\n }",
"public LabelBuilder setShadowOffsetX(int shadowOffsetX) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setShadowOffsetX(shadowOffsetX);\n\t\treturn this;\n\t}",
"public int getLeftX() {\n\t\treturn 0;\r\n\t}",
"public int getWindowAlignmentOffset() {\n return mLayoutManager.getWindowAlignmentOffset();\n }",
"public int deltaX() {\n\t\treturn _deltaX;\n\t}",
"@Override\n\tpublic float getLayoutAlignmentX(final Container target) {\n\t\treturn 0;\n\t}",
"public int getXPosition() {\n return this.xPosition;\n }",
"@Override\n protected int computeHorizontalScrollOffset() {\n return (int) -panX;\n }",
"public void setXLabel(String _label);"
] | [
"0.68360704",
"0.6609154",
"0.65448475",
"0.65288955",
"0.6393334",
"0.6362122",
"0.62823194",
"0.6238801",
"0.615642",
"0.6083701",
"0.6070562",
"0.60640264",
"0.6054665",
"0.6053897",
"0.60357356",
"0.60244024",
"0.5992673",
"0.5964132",
"0.5954872",
"0.59425956",
"0.59247494",
"0.59157157",
"0.58774734",
"0.58485097",
"0.5831165",
"0.5794342",
"0.57651234",
"0.5729546",
"0.5701647",
"0.56860536",
"0.5685094",
"0.56850135",
"0.56674224",
"0.5656785",
"0.5653673",
"0.5653355",
"0.5644901",
"0.5644526",
"0.5643681",
"0.5643055",
"0.56185424",
"0.5617207",
"0.56152815",
"0.56012994",
"0.55953306",
"0.55719143",
"0.5563604",
"0.555773",
"0.5552815",
"0.5552085",
"0.55501616",
"0.55487275",
"0.55451906",
"0.5537597",
"0.55362296",
"0.5534974",
"0.5528608",
"0.5524853",
"0.5512679",
"0.5490629",
"0.5488933",
"0.54831743",
"0.54831743",
"0.5482766",
"0.54825467",
"0.5479825",
"0.5479535",
"0.5479535",
"0.5476406",
"0.5476376",
"0.5476376",
"0.5468147",
"0.5455331",
"0.5447322",
"0.5443919",
"0.5439262",
"0.5435711",
"0.54334956",
"0.54298407",
"0.5423728",
"0.54234856",
"0.54189926",
"0.54185385",
"0.5417452",
"0.5410311",
"0.5406686",
"0.54008776",
"0.53888273",
"0.53784037",
"0.53764755",
"0.5376354",
"0.5373037",
"0.53720134",
"0.53624773",
"0.5360266",
"0.535663",
"0.53542393",
"0.53520817",
"0.53422815",
"0.53402543"
] | 0.6445024 | 4 |
Sets the used xaxis offset for the labels on this axis. | public void setXOffset(float xOffset) {
mXOffset = Utils.convertDpToPixel(xOffset);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setXAxis() {\n XAxis xAxis = mChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setGranularityEnabled(true);\n xAxis.setCenterAxisLabels(false);\n xAxis.setDrawGridLines(false);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(getXAxisValues()));\n xAxis.setLabelCount(30);\n }",
"public void setXOffset(float xOffset) {\n pos.x = xOffset;\n invalidate();\n }",
"public void setOffsetX(int offsetX) {\n\t\tthis.offsetX = offsetX;\n\t}",
"public final void setXOffset(final int xOffset) {\n this.xOffset = xOffset;\n }",
"public void setLabelPosition(int x, int y);",
"public void setxLabel(String xLabel) {\n this.xLabel = xLabel;\n }",
"public void setXLabelFreq(int freq) {\n m_xValFreq = freq;\n }",
"public void setXAxisLabel(String xAxisLabel){\n xAxisName = xAxisLabel;\n }",
"public void setXLabel(String _label);",
"public void setXaxisLabels(Object xaxisLabels) {\r\n this.xaxisLabels = xaxisLabels;\r\n }",
"public LabelBuilder setShadowOffsetX(int shadowOffsetX) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setShadowOffsetX(shadowOffsetX);\n\t\treturn this;\n\t}",
"public void setPreferredHorizontalOffset(int preferredHorizontalOffset) {\n\t\tthis.preferredHorizontalOffset = preferredHorizontalOffset;\n\t\tballoonTip.getStyle().setHorizontalOffset(preferredHorizontalOffset);\n\t\tballoonTip.repaint();\n\t}",
"public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }",
"default void setX(double x)\n {\n getAxis().setX(x);\n }",
"private void setScrollOffsetX(int value) {\n bitField0_ |= 0x00000010;\n scrollOffsetX_ = value;\n }",
"void xsetAnchorOffset(org.apache.xmlbeans.XmlInt anchorOffset);",
"public float getxOffset() {\n\t\treturn xOffset;\n\t}",
"public void setOrigin(){\n // draw X-axis\n graphics2D.draw(new Line2D.Double(leftMiddle, rightMiddle));\n\n // draw string \"+X\" and \"-X\"\n graphics2D.drawString(\"+X\", (int) rightMiddle.getX() - 10, (int) rightMiddle.getY() - 5);\n graphics2D.drawString(\"-X\", (int) leftMiddle.getX() + 10, (int) leftMiddle.getY() + 10);\n\n // draw Y-axis\n graphics2D.draw(new Line2D.Double(topMiddle, bottomMiddle));\n\n // draw string \"+Y\" and \"-Y\"\n graphics2D.drawString(\"+Y\", (int) topMiddle.getX() + 5, (int) topMiddle.getY() + 10);\n graphics2D.drawString(\"-Y\", (int) bottomMiddle.getX() - 15, (int) bottomMiddle.getY());\n\n }",
"public void setxLabel(String xLabel) {\n\t\tthis.xLabel = xLabel;\n\t\tthis.dirtyAttributes.add(Constants.X_LABEL);\n\t}",
"public void setWindowAlignmentOffset(int offset) {\n mLayoutManager.setWindowAlignmentOffset(offset);\n requestLayout();\n }",
"public String getxLabel() {\n return xLabel;\n }",
"public float XOffset() {\n\t\tfloat xoffset = 0;\n\t\tif (MouseX() + 12 + (tipw * 7 + 4) > MainSim.WinX) {\t\t\t \t// If the tooltip will be outside the window (based on mousex):\n\t\t\txoffset = (MouseX() + 12 + (tipw * 7 + 4)) - MainSim.WinX; \t\t// Find how much the tip will be drawn outside\n\t\t} else {\n\t\t\txoffset = 0;\n\t\t}\n\t\treturn xoffset;\n\t}",
"public final void setXDPosition(final String xpos) {_xdpos = xpos;}",
"public void setXLabel(String xLabel){\n\t\txAxis.setLabel(xLabel);\n\t}",
"public void setXPos(int x) {\n // from MoveEventHandler\n // convert to real x coord\n // x = xP * (xmaxr - xminR) / (xmaxP - xminP)\n double tmp = config.getMaximumRealX() + (x - config.getMaximumPixelX())*(config.getMaximumRealX() - config.getMinimumRealX())/(config.getMaximumPixelX() - config.getMinimumPixelX());\n xpos.setText(formatter.format(tmp));\n }",
"public void setAxes(int xPos, int yPos, int axisLength, String xLabel, String yLabel)\n {\n this.xPos= xPos;\n this.yPos= yPos;\n this.xLabel= xLabel;\n this.yLabel= yLabel;\n this.axisLength=axisLength;\n }",
"public float getXOffset() {\n return mXOffset;\n }",
"private void drawHorizontalAxisLabels(Graphics2D g2) {\r\n double axisH = yPositionToPixel(originY);\r\n FontMetrics metrics = g2.getFontMetrics();\r\n \r\n// double startX = Math.floor((minX - originX) / majorX) * majorX;\r\n double startX = Math.floor(minX / majorX) * majorX;\r\n for (double x = startX; x < maxX + majorX; x += majorX) {\r\n if (((x - majorX / 2.0) < originX) &&\r\n ((x + majorX / 2.0) > originX)) {\r\n continue;\r\n }\r\n \r\n int position = (int) xPositionToPixel(x);\r\n g2.drawString(format(x), position,\r\n (int) axisH + metrics.getHeight());\r\n }\r\n }",
"public void xlabel(String label){\n XY1DPlot plot = (XY1DPlot)this.chartPanel.getChart().getPlot();\n plot.getXAxis().setLabel(label);\n plot.getXAxis().setDrawLabel(true);\n this.chartPanel.paintGraphics();\n }",
"void xsetRawOffset(org.apache.xmlbeans.XmlInt rawOffset);",
"@Override\n public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }",
"public void setExtendedX(float x) {\n mLeft = (int) x;\n }",
"public void setxBegin(Float xBegin) {\r\n this.xBegin = xBegin;\r\n }",
"public Builder clearScrollOffsetX() {\n copyOnWrite();\n instance.clearScrollOffsetX();\n return this;\n }",
"public void setOffset(int xOffset, int yOffset) {\n\t\tthis.xOffset = xOffset;\n\t\tthis.yOffset = yOffset;\n\t}",
"private void setXscale() {\n\t}",
"public BarChartBuilder xLabel(String xLabel) {\n\tthis.xLabel = xLabel;\n\treturn this;\n }",
"public void setX(int xpos) {\r\n this.xpos = xpos;\r\n }",
"public void setStartOffset(String offset) {\n\t\ttry {\n\t\t\tstartOffset = Integer.parseInt(offset);\n\t\t} catch (Exception e) {\n\t\t\tstartOffset = 0;\n\t\t}\n\t}",
"public void setComponentLabelMargin(int componentLabelMargin) {\n\t\tthis.componentLabelMargin = componentLabelMargin;\n\t\tfirePropertyChange(\"componentLabelMargin\", null, componentLabelMargin);\n\t}",
"public final int getXOffset() {\n return xOffset;\n }",
"public void setCenterX(double x) { centerX.set(clamp(x, X_MIN, X_MAX)); }",
"public void setStartX(double val) {\r\n startx = val;\r\n }",
"public double calculateXOffset(AxisAlignedBB axis, double offSet) {\n\t\tif (axis.maxY > this.minY && axis.minY < this.maxY) {\n\t\t\tif (axis.maxZ > this.minZ && axis.minZ < this.maxZ) {\n\t\t\t\tdouble var4;\n\n\t\t\t\tif (offSet > 0.0D && axis.maxX <= this.minX) {\n\t\t\t\t\tvar4 = this.minX - axis.maxX;\n\n\t\t\t\t\tif (var4 < offSet) {\n\t\t\t\t\t\toffSet = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (offSet < 0.0D && axis.minX >= this.maxX) {\n\t\t\t\t\tvar4 = this.maxX - axis.minX;\n\n\t\t\t\t\tif (var4 > offSet) {\n\t\t\t\t\t\toffSet = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn offSet;\n\t\t\t} else {\n\t\t\t\treturn offSet;\n\t\t\t}\n\t\t} else {\n\t\t\treturn offSet;\n\t\t}\n\t}",
"public void setStartX(double x)\n {\n startxcoord=x; \n }",
"void setOffset(double offset);",
"public void setxPos(int xPos) {\r\n \tthis.xPos = xPos;\r\n }",
"public double getxOffset() {\n return currentXOffset + xOffset;\n }",
"@java.lang.Override\n public int getScrollOffsetX() {\n return instance.getScrollOffsetX();\n }",
"public void setXLoc(int xLoc){\n myRectangle.setX(xLoc);\n }",
"public void setStartOffset(int offset) {\n this.startOffset = offset;\n }",
"public void setOffset(double offset) {\n this.offset = offset;\n }",
"public void setX(float x)\n {\n getBounds().offsetTo(x - positionAnchor.x, getBounds().top);\n notifyParentOfPositionChange();\n conditionallyRelayout();\n }",
"@java.lang.Override\n public int getScrollOffsetX() {\n return scrollOffsetX_;\n }",
"public void setAlignmentX(AlignX anAlignX) { }",
"public void setX(float x) {\r\n\t\tleft = x - width / 2;\r\n\t}",
"@Override\n\tpublic void setX(int x) {\n\t\txPos = x;\n\t}",
"public void setLowerLeftX(float value)\n {\n rectArray.set(0, new COSFloat( value ) );\n }",
"public void setOffset(int offset) {\r\n\t\tthis.offSet = offset;\r\n\t}",
"public void setBaseline(Double offset) {\n if (offset == null) {\n getOrCreateProperties().setBaseline(null);\n } else {\n getOrCreateProperties().setBaseline((int) (offset * 1000));\n }\n }",
"void setPlayerXRelative(int x) {\n }",
"public void getOriginX(){\n\t\toriginX.setText(Double.toString(note.getOriginX()));\n\t}",
"public void setX(int xPos){\t\t\n\t\tx = new Integer(xPos);\n\t}",
"void setX(int newX) {\n this.xPos = newX;\n }",
"public void setXCoordinate(int newValue)\n {\n x = newValue;\n }",
"public void setX(double val) {\r\n\t\t this.xCoord = val;\r\n\t }",
"public void resetHorizontalPanelPosition() {\n setHorizontalPanelTranslation(0.0f);\n }",
"int getLabelOffset();",
"private double xPos(double xMetres){\r\n\t\treturn xMetres*14+canvas.getWidth()/2;\r\n\t}",
"String getXAxisLabel();",
"@Test\r\n\tpublic void testSetPositionX(){\n\t\tWinnerTitle title = new WinnerTitle(1, 0, 0);\r\n\t\ttitle.setPositionX(10);\r\n\t\t\r\n\t\tassertEquals(10, title.getPositionX());\r\n\t}",
"public abstract int getTickOffset();",
"public PlotPosition setX( double x )\n {\n return setX( x, 1 );\n }",
"public void setX(double value) {\n origin.setX(value);\n }",
"public final int getPosX(int extraOffset) {\n final int align = alignment.getValue().ordinal();\n final int dirSignX = AlignHelper.getFlowDirX2(align);\n return (extraOffset + offsetX.getValue()) * dirSignX + AlignHelper.alignH(Common.getScreenWidth(), align);\n }",
"public Builder setScrollOffsetX(int value) {\n copyOnWrite();\n instance.setScrollOffsetX(value);\n return this;\n }",
"private void initializeOffsets () {\n exampleStartOffsets.clear();\n int window = exampleLength + predictLength;\n for (int i = 0; i < train.size() - window; i++) { exampleStartOffsets.add(i); }\n }",
"public static NumberAxis calcAxisX() {\n double minX = 0;\n double maxX = Collections.max(GlobalVariables.systemCorridor.getDistances())\n / GlobalVariables.systemCorridor.getSpeed()\n + GlobalVariables.cycleLen.get();\n maxX = 3 * GlobalVariables.cycleLen.get() > maxX ? 3 * GlobalVariables.cycleLen.get() : maxX;\n maxX = Math.round(maxX / 10) * 10;\n double scaleX = 0.1 * (maxX - minX);\n scaleX = Math.round(scaleX / 10) * 10;\n NumberAxis axis = new NumberAxis(\"Time (sec)\", minX, maxX, scaleX);\n axis.setTickLabelFont(Font.font(18));\n return axis;\n }",
"public void setXPos(int xPos) {\r\n\t\tthis.xPos = xPos;\r\n\t}",
"public void resetX() {this.startX = 0f;}",
"public void setTickMarkPosition(DateTickMarkPosition position) {\n/* 743 */ ParamChecks.nullNotPermitted(position, \"position\");\n/* 744 */ this.tickMarkPosition = position;\n/* 745 */ fireChangeEvent();\n/* */ }",
"public void adjustHorizontalOffset(int offset) {\n OFFSET_HOZ += offset;\n }",
"@Override\r\n\tpublic void setOffset(IOffset offset) {\n\t\t\r\n\t}",
"public TreePrinter<T> setLabelGap(int labelSpace) { this.labelGap = labelSpace; return this; }",
"public void getBorderCenterX(double posX)\n {\n borderCenterX = posX;\n }",
"public void setX(float x){\n hitBox.offsetTo(x,hitBox.top);\n //this.x=x;\n }",
"public void setInitalOffset(double offset){\n \tmodule.forEach(m -> m.setInitialOffset(offset));\n }",
"public void setX(int x) {\n\tbaseXCoord = x;\n}",
"public Builder setPositionX(double value) {\n bitField0_ |= 0x00000008;\n positionX_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n public void setOffset(long offset) {\n }",
"public void setxPos(int xPos) \n\t{\n\t\tthis.xPos = xPos;\n\t}",
"public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }",
"public void setOffset(final double offset) {\r\n\t\tthis.offset = offset;\r\n\t}",
"public Builder setPositionX(double value) {\n bitField0_ |= 0x00000040;\n positionX_ = value;\n onChanged();\n return this;\n }",
"public void setOffset(int offset) {\r\n this.offset = offset;\r\n }",
"private void clearScrollOffsetX() {\n bitField0_ = (bitField0_ & ~0x00000010);\n scrollOffsetX_ = 0;\n }",
"public void setxPos(int xPos) {\n\t\tthis.xPos = xPos;\n\t}",
"@Override\n\tpublic void setPosition(int left)\n\t{\n\t\t_mainPanel.getElement().getStyle().setLeft(left, Style.Unit.PX) ;\n\t}",
"void setAnchorOffset(int anchorOffset);",
"public void _setTicks() {\n if (!Double.isNaN(tickIncrement)) {\n setTicksByIncr(tickIncrement);\n return;\n }\n double diff = Math.abs(max - min);\n if (!(diff > 0.)) {\n int tn = 2;\n tn += nanW > 0 ? 2 : 0;\n tn += negW > 0 ? 2 : 0;\n tn += nanW > 0 || negW > 0 ? 2 : 0;\n tn += posW > 0 ? 4 : 0;\n ticks = new double[tn];\n int i = 0;\n if (nanW > 0) {\n ticks[i++] = 0.;\n ticks[i++] = Double.NaN;\n if (!(negW > 0)) {\n ticks[i++] = 0. + nanW;\n ticks[i++] = Double.NaN;\n }\n }\n if (negW > 0) {\n ticks[i++] = 0. + nanW;\n ticks[i++] = Double.NEGATIVE_INFINITY;\n ticks[i++] = 0. + nanW + negW;\n ticks[i++] = Double.NEGATIVE_INFINITY;\n }\n ticks[i++] = 0. + nanW + posW;\n ticks[i++] = min;\n if (posW > 0) {\n ticks[i++] = size-posW+1;\n ticks[i++] = Double.POSITIVE_INFINITY;\n ticks[i++] = size-1;\n ticks[i++] = Double.POSITIVE_INFINITY;\n }\n return;\n }\n double exp = Math.log(diff) * 0.43429448190325176; // log10\n int expi = -(int)Math.floor(exp);\n double scale = Math.pow(10.,expi);\n double smin = Math.floor(min * scale);\n double smax = Math.ceil(max * scale);\n int siz = size - nanW - negW - nanW;\n int sdiff = (int)(smax - smin);\n if (sdiff > siz/2)\n scale *= .5;\n else if (sdiff < 3)\n scale *= 4;\n else if (sdiff < 5)\n scale *= 2;\n double incr = 1./scale;\n int count = 0;\n double sval = smin / scale;\n if (max > min) {\n smin = Math.ceil(min * scale);\n smax = Math.floor(max * scale) / scale + .2 * incr;\n sval = smin / scale;\n while ( sval <= smax ) {\n count+=2;\n sval += incr;\n }\n } else {\n incr *= -1.;\n smin = Math.floor(min * scale);\n smax = Math.ceil(max * scale) / scale + .2 * incr;\n sval = smin / scale;\n while ( sval >= smax ) {\n count+=2;\n sval += incr;\n }\n }\n int tn = count;\n tn += nanW > 0 ? 2 : 0;\n tn += negW > 0 ? 2 : 0;\n tn += nanW > 0 || negW > 0 ? 2 : 0;\n tn += posW > 0 ? 4 : 0;\n sval = smin / scale;\n ticks = new double[tn];\n int pi = 0; // pixelIndex\n if (nanW > 0 && pi < tn) {\n ticks[pi++] = 0.;\n ticks[pi++] = Double.NaN;\n if (!(negW > 0)) {\n ticks[pi++] = 0. + nanW;\n ticks[pi++] = Double.NaN;\n }\n }\n if (negW > 0 && pi < tn) {\n ticks[pi++] = 0. + nanW;\n ticks[pi++] = Double.NEGATIVE_INFINITY;\n ticks[pi++] = 0. + nanW + negW;\n ticks[pi++] = Double.NEGATIVE_INFINITY;\n }\n for (int i = 0; i < count && pi < tn; i += 2) {\n ticks[pi++] = nanW + negW + (siz - 1) * ((sval - min ) / (max - min));\n ticks[pi++] = Math.round(sval*scale)/scale;\n sval += incr;\n }\n if (posW > 0 && pi < tn) {\n ticks[pi++] = size-posW+1;\n ticks[pi++] = Double.POSITIVE_INFINITY;\n ticks[pi++] = size-1;\n ticks[pi++] = Double.POSITIVE_INFINITY;\n }\n }"
] | [
"0.65550333",
"0.60991216",
"0.59701264",
"0.59679496",
"0.5955584",
"0.5890204",
"0.58712023",
"0.58219385",
"0.58204806",
"0.57325935",
"0.5679061",
"0.562702",
"0.5592848",
"0.5590845",
"0.55383784",
"0.5531867",
"0.5445034",
"0.5437972",
"0.5353706",
"0.53465",
"0.53412807",
"0.53361535",
"0.53361315",
"0.5300281",
"0.52921003",
"0.52900714",
"0.527244",
"0.52664614",
"0.5258877",
"0.52446485",
"0.52387404",
"0.5238515",
"0.52021796",
"0.5187677",
"0.5176549",
"0.51716524",
"0.51587635",
"0.5158454",
"0.5140857",
"0.51383555",
"0.51380014",
"0.5130631",
"0.51302207",
"0.5129637",
"0.511338",
"0.5102789",
"0.5102717",
"0.50931996",
"0.50890183",
"0.5084719",
"0.50843257",
"0.5084006",
"0.50695074",
"0.50300294",
"0.50228465",
"0.5006112",
"0.5004417",
"0.5004403",
"0.49942216",
"0.49847755",
"0.49777734",
"0.49760136",
"0.49718648",
"0.49671876",
"0.49541515",
"0.49527916",
"0.49436516",
"0.4941631",
"0.49329683",
"0.49286228",
"0.49250892",
"0.4922698",
"0.492257",
"0.4916819",
"0.49080235",
"0.49075994",
"0.4887454",
"0.4887221",
"0.48866057",
"0.48857525",
"0.48792455",
"0.48756024",
"0.48744288",
"0.4869776",
"0.48530096",
"0.4843249",
"0.4838874",
"0.48338792",
"0.48285678",
"0.482179",
"0.48201546",
"0.48190576",
"0.4816441",
"0.48114964",
"0.48103246",
"0.48101583",
"0.48069817",
"0.48000437",
"0.47976914",
"0.47955194"
] | 0.5845788 | 7 |
Returns the used offset on the xaxis for drawing the axis labels. This offset is applied before and after the label. | public float getYOffset() {
return mYOffset;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float XOffset() {\n\t\tfloat xoffset = 0;\n\t\tif (MouseX() + 12 + (tipw * 7 + 4) > MainSim.WinX) {\t\t\t \t// If the tooltip will be outside the window (based on mousex):\n\t\t\txoffset = (MouseX() + 12 + (tipw * 7 + 4)) - MainSim.WinX; \t\t// Find how much the tip will be drawn outside\n\t\t} else {\n\t\t\txoffset = 0;\n\t\t}\n\t\treturn xoffset;\n\t}",
"public double getxOffset() {\n return currentXOffset + xOffset;\n }",
"public float getxOffset() {\n\t\treturn xOffset;\n\t}",
"public String getxLabel() {\n return xLabel;\n }",
"public final int getXOffset() {\n return xOffset;\n }",
"public float getXOffset() {\n return mXOffset;\n }",
"int getLabelOffset();",
"public int getXOffset();",
"String getXAxisLabel();",
"public abstract int getTickOffset();",
"public double calculateXOffset(AxisAlignedBB axis, double offSet) {\n\t\tif (axis.maxY > this.minY && axis.minY < this.maxY) {\n\t\t\tif (axis.maxZ > this.minZ && axis.minZ < this.maxZ) {\n\t\t\t\tdouble var4;\n\n\t\t\t\tif (offSet > 0.0D && axis.maxX <= this.minX) {\n\t\t\t\t\tvar4 = this.minX - axis.maxX;\n\n\t\t\t\t\tif (var4 < offSet) {\n\t\t\t\t\t\toffSet = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (offSet < 0.0D && axis.minX >= this.maxX) {\n\t\t\t\t\tvar4 = this.maxX - axis.minX;\n\n\t\t\t\t\tif (var4 > offSet) {\n\t\t\t\t\t\toffSet = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn offSet;\n\t\t\t} else {\n\t\t\t\treturn offSet;\n\t\t\t}\n\t\t} else {\n\t\t\treturn offSet;\n\t\t}\n\t}",
"public final int getPosX(int extraOffset) {\n final int align = alignment.getValue().ordinal();\n final int dirSignX = AlignHelper.getFlowDirX2(align);\n return (extraOffset + offsetX.getValue()) * dirSignX + AlignHelper.alignH(Common.getScreenWidth(), align);\n }",
"@Override\n public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }",
"double getTickBorderDashOffset();",
"public Integer getXOffset() {\n\t\tdouble frameWidth = this.pixy.getFrameWidth() / 2;\n\t\tdouble blockX = this.getX();\n\n\t\treturn (int) (blockX + frameWidth / 2);\n\t}",
"public int getXOffset(float xpos) {\n return -(getWidth() / 2);\n }",
"public int getXCenter() {\n return getXOrigin() + panelWidth/2;\n }",
"protected abstract int getXOffset();",
"private void drawHorizontalAxisLabels(Graphics2D g2) {\r\n double axisH = yPositionToPixel(originY);\r\n FontMetrics metrics = g2.getFontMetrics();\r\n \r\n// double startX = Math.floor((minX - originX) / majorX) * majorX;\r\n double startX = Math.floor(minX / majorX) * majorX;\r\n for (double x = startX; x < maxX + majorX; x += majorX) {\r\n if (((x - majorX / 2.0) < originX) &&\r\n ((x + majorX / 2.0) > originX)) {\r\n continue;\r\n }\r\n \r\n int position = (int) xPositionToPixel(x);\r\n g2.drawString(format(x), position,\r\n (int) axisH + metrics.getHeight());\r\n }\r\n }",
"public int getX() {\n return PADDING;\n //return columnToX(this.getCols());\n //throw new UnsupportedOperationException();\n }",
"private void setXAxis() {\n XAxis xAxis = mChart.getXAxis();\n xAxis.setGranularity(1f);\n xAxis.setGranularityEnabled(true);\n xAxis.setCenterAxisLabels(false);\n xAxis.setDrawGridLines(false);\n xAxis.setPosition(XAxis.XAxisPosition.BOTTOM);\n xAxis.setValueFormatter(new IndexAxisValueFormatter(getXAxisValues()));\n xAxis.setLabelCount(30);\n }",
"@java.lang.Override\n public int getScrollOffsetX() {\n return instance.getScrollOffsetX();\n }",
"public float getRenderOffsetX()\r\n {\r\n return renderOffsetX;\r\n }",
"protected double getReferenceX() {\n if (isXAxisBoundsManual() && !mGraphView.getGridLabelRenderer().isHumanRoundingX()) {\n if (Double.isNaN(referenceX)) {\n referenceX = getMinX(false);\n }\n return referenceX;\n } else {\n // starting from 0 so that the steps have nice numbers\n return 0;\n }\n }",
"public int getX()\n {\n return xaxis;\n }",
"protected final float getInsetSpan(int axis) {\n// assert ViewUtilities.isAxisValid(axis);\n\n ViewInsets insets = getInsets();\n return (insets != null)\n ? ((axis == X_AXIS) ? insets.getLeftRight() : insets.getTopBottom())\n : 0;\n }",
"public double getX() {\n\t\tRectangle2D bounds = _parentFigure.getBounds();\n\t\tdouble x = bounds.getX() + (_xt * bounds.getWidth());\n\t\treturn x;\n\t}",
"public int getDesplaceOffsetX(){\n\t\tif(style==Style.ROUTES){\r\n\t\t\treturn -10;\r\n\t\t}else{\r\n\t\t\treturn -6;\r\n\t\t}\r\n\t}",
"public int getXLabelFreq() {\n return m_xValFreq;\n }",
"public double getUserFriendlyXPos(){\n return xPos - myGrid.getWidth()/ HALF;\n }",
"public static NumberAxis calcAxisX() {\n double minX = 0;\n double maxX = Collections.max(GlobalVariables.systemCorridor.getDistances())\n / GlobalVariables.systemCorridor.getSpeed()\n + GlobalVariables.cycleLen.get();\n maxX = 3 * GlobalVariables.cycleLen.get() > maxX ? 3 * GlobalVariables.cycleLen.get() : maxX;\n maxX = Math.round(maxX / 10) * 10;\n double scaleX = 0.1 * (maxX - minX);\n scaleX = Math.round(scaleX / 10) * 10;\n NumberAxis axis = new NumberAxis(\"Time (sec)\", minX, maxX, scaleX);\n axis.setTickLabelFont(Font.font(18));\n return axis;\n }",
"int getScrollOffsetX();",
"public int getPreferredHorizontalOffset() {\n\t\treturn preferredHorizontalOffset;\n\t}",
"private double xPos(double xMetres){\r\n\t\treturn xMetres*14+canvas.getWidth()/2;\r\n\t}",
"public int xPos() {\n\t\treturn Engine.scaleX(x);\n\t}",
"public float getLayoutAlignmentX(Container target) {\n\t\treturn 0;\r\n\t}",
"public float getLayoutAlignmentX(Container target) {\n return 0.5f;\n }",
"public int getStart ()\r\n {\r\n return glyph.getBounds().x;\r\n }",
"@java.lang.Override\n public int getScrollOffsetX() {\n return scrollOffsetX_;\n }",
"public final int getXOff() {\r\n\t\treturn xOff;\r\n\t}",
"public int getComponentLabelMargin() {\n\t\treturn componentLabelMargin;\n\t}",
"public static int getOrigX() {\n return 1;\n }",
"public double getLeftXAxis() {\n\t\treturn getRawAxis(Axis_LeftX);\n\t}",
"private int getErrorX() {\n /*\n * The \"25\" is the distance between the point and the right edge\n * of the background\n */\n final float scale = mView.getResources().getDisplayMetrics().density;\n\n final Drawables dr = mDrawables;\n\n final int layoutDirection = mView.getLayoutDirection();\n int errorX;\n int offset;\n switch (layoutDirection) {\n default:\n case View.LAYOUT_DIRECTION_LTR:\n offset = -(dr != null ? dr.mDrawableSizeRight : 0) / 2 + (int) (25 * scale + 0.5f);\n errorX = mView.getWidth() - mPopup.getWidth() -\n mView.getPaddingRight() + offset;\n break;\n case View.LAYOUT_DIRECTION_RTL:\n offset = (dr != null ? dr.mDrawableSizeLeft : 0) / 2 - (int) (25 * scale + 0.5f);\n errorX = mView.getPaddingLeft() + offset;\n break;\n }\n return errorX;\n }",
"public float getX()\n {\n return getBounds().left + positionAnchor.x;\n }",
"default Integer getXOffset() {\n return null;\n }",
"public void getOriginX(){\n\t\toriginX.setText(Double.toString(note.getOriginX()));\n\t}",
"private int get_x() {\n return center_x;\n }",
"@Override\n\tpublic double getXLoc() {\n\t\tdouble side = Math.sqrt(getMySize())/2;\n\t\treturn x+side;\n\t}",
"private float x0(int c)\n {\n PlotProperties props = getPlotProperties();\n\n float x0 = props.getXMin() + c*props.getXDelta();\n x0Text.setText(Float.toString(x0));\n\n return x0;\n }",
"public static int getStartXCoordinate(){\n\t\tint x = getThymioStartField_X(); \n\t\t\n\t\tif(x == 0){\n\t\t\n \t}else{\n \t x *= FIELD_HEIGHT;\n \t}\n \t\n\t\treturn x ;\n\t}",
"protected final float getMajorAxisInsetSpan() {\n ViewInsets insets = getInsets();\n return (insets != null)\n ? (isXMajorAxis() ? insets.getLeftRight() : insets.getTopBottom())\n : 0;\n }",
"public int getRootX() {\n return this.mX + this.mOffsetX;\n }",
"public float getAlignment(int axis) {\n if (axis == View.X_AXIS) {\n return 0;\n }\n return super.getAlignment(axis);\n }",
"public final float getPositionX() {\r\n\t\treturn getState(false).getPositionX();\r\n\t}",
"public int getXPointerPosition() {\n\t\treturn getXPosition() + getXOffset();\n\t}",
"public Object getXaxisLabels() {\r\n if (xaxisLabels != null) {\r\n return xaxisLabels;\r\n }\r\n ValueBinding vb = getValueBinding(\"xaxisLabels\");\r\n return vb != null ? vb.getValue(getFacesContext()) : null;\r\n }",
"public int getWindowAlignmentOffset() {\n return mLayoutManager.getWindowAlignmentOffset();\n }",
"@Override\n\tpublic double getXPos() {\n\t\treturn field_145851_c;\n\t}",
"public Point getLabelPosition();",
"public int getX(){\n\t\tif(!resetCoordinates()) return 10000;\n\t\treturn Math.round(robot.translation.get(0)/ AvesAblazeHardware.mmPerInch);\n\t}",
"org.apache.xmlbeans.XmlInt xgetAnchorOffset();",
"public Integer getCaretPosX() {\n\t\tint[] caretPos = getCaretPos();\n\t\treturn (caretPos == null) ? null : caretPos[0];\n\t}",
"public int getxPos() {\n\t\treturn xPos;\n\t}",
"public void setxLabel(String xLabel) {\n this.xLabel = xLabel;\n }",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public int xPos() {\r\n\t\treturn this.xPos;\r\n\t}",
"public float getLayoutAlignmentX(Container parent)\n\t{\n\t\treturn 0.5f;\n\t}",
"public int getXPosition(){\n\t\treturn xPosition;\n\t}",
"public double getBorderCenterX()\n {\n return borderCenterX;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"private int xpos(final PlatformEvent event) {\n // To support Noncontiguous NodeId, the index of the NodeId in the address book is used.\n final int nodeIndex = platform.getAddressBook().getIndexOfNodeId(event.getCreatorId());\n return (nodeIndex + 1) * width / (numColumns + 1);\n }",
"public int getLeftX() {\n\t\treturn 0;\r\n\t}",
"@Override\n protected int computeHorizontalScrollOffset() {\n return (int) -panX;\n }",
"public void setLabelPosition(int x, int y);",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public double getPositionX() {\n return positionX_;\n }",
"public float getLayoutAlignmentX(Container target) \n {\n\treturn (float)0.0;\n }",
"public int getxPosition() {\n\t\treturn xPosition;\n\t}",
"@Override\n\tpublic float getLayoutAlignmentX(Container target) {\n\t\treturn 0;\n\t}",
"public int getXPos() {\n\t\treturn xPos;\n\t}",
"public double getXOffset() {\n if (isReal) {\n return get(\"tx\");\n } else {\n return simTx.getDouble(0.0);\n }\n }",
"public double getLblSpacing() {\n return lblSpacing;\n }",
"public int getStartX() {\r\n\t\treturn startX;\r\n\t}",
"public double getXPosition()\n\t{\n\t\treturn xPosition;\n\t}",
"public int getxPos() \n\t{\n\t\treturn xPos;\n\t}",
"public int deltaX() {\n\t\treturn _deltaX;\n\t}",
"public void setXAxisLabel(String xAxisLabel){\n xAxisName = xAxisLabel;\n }",
"public int getPositionX() {\r\n\t\treturn positionX;\r\n\t}",
"private Point2D computeLayoutOrigin() {\r\n\r\n\t\tDimension size = getSize();\r\n\r\n\t\tPoint2D.Float origin = new Point2D.Float();\r\n\r\n\t\torigin.x = (float) (size.width - textLayout.getAdvance()) / 2;\r\n\t\torigin.y = (float) (size.height - textLayout.getDescent() + textLayout\r\n\t\t\t\t.getAscent()) / 2;\r\n\r\n\t\treturn origin;\r\n\t}",
"public ChartXAxis getXAxis() { return _xaxis; }",
"public final int getAbsoluteX() {\n assert (parent != null);\n if (parent == this) {\n return x;\n }\n if ((parent instanceof TWindow)\n && !(parent instanceof TMenu)\n && !(parent instanceof TDesktop)\n ) {\n // Widgets on a TWindow have (0,0) as their top-left, but this is\n // actually the TWindow's (1,1).\n return parent.getAbsoluteX() + x + 1;\n }\n return parent.getAbsoluteX() + x;\n }",
"@Override\n\tpublic float getLayoutAlignmentX(final Container target) {\n\t\treturn 0;\n\t}",
"public int getPosicaoX() {\r\n\t\treturn posicaoX;\r\n\t}",
"public int centerX() {\n return mRect.centerX();\n }",
"public float getMinimumSpan(int axis) {\n if (view != null) {\n return view.getMinimumSpan(axis);\n }\n return 10;\n }",
"public int getPositionX(){\n\t\treturn positionx;\n\t}",
"public int getXPosition() {\n return xPosition;\n }"
] | [
"0.6779847",
"0.66161627",
"0.6577605",
"0.6460685",
"0.6439981",
"0.64252824",
"0.639919",
"0.6288452",
"0.6230484",
"0.620227",
"0.6188255",
"0.61278915",
"0.6126247",
"0.61007303",
"0.6073628",
"0.6039649",
"0.6028306",
"0.60038155",
"0.59787536",
"0.59759486",
"0.59153485",
"0.59059846",
"0.5879698",
"0.5875328",
"0.58338135",
"0.57972497",
"0.5768022",
"0.5760759",
"0.5756373",
"0.5745722",
"0.57370895",
"0.5711737",
"0.57112145",
"0.5699338",
"0.56935614",
"0.5691992",
"0.5678342",
"0.56529",
"0.56507164",
"0.5648585",
"0.5646289",
"0.5635662",
"0.5610963",
"0.56009245",
"0.55952924",
"0.55933994",
"0.55721456",
"0.55552036",
"0.5549093",
"0.5532641",
"0.55272585",
"0.5516839",
"0.5507093",
"0.5504851",
"0.5496814",
"0.54842925",
"0.5480538",
"0.5477636",
"0.54695374",
"0.54659915",
"0.54588836",
"0.545836",
"0.54520905",
"0.5446277",
"0.5445785",
"0.5444868",
"0.5444868",
"0.5443205",
"0.54426825",
"0.54419833",
"0.5436294",
"0.5436294",
"0.5435831",
"0.543484",
"0.5430675",
"0.5428897",
"0.5425175",
"0.54195094",
"0.54192275",
"0.54192275",
"0.5419104",
"0.54158014",
"0.5404421",
"0.53989935",
"0.53987396",
"0.5396249",
"0.539196",
"0.53908366",
"0.5390641",
"0.5370286",
"0.5369749",
"0.53664714",
"0.53543836",
"0.53510123",
"0.5329723",
"0.5323825",
"0.5319941",
"0.5318803",
"0.53176826",
"0.53123206",
"0.5311376"
] | 0.0 | -1 |
Sets the used yaxis offset for the labels on this axis. For the legend, higher offset means the legend as a whole will be placed further away from the top. | public void setYOffset(float yOffset) {
mYOffset = Utils.convertDpToPixel(yOffset);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void setYOffset(final int yOffset) {\n this.yOffset = yOffset;\n }",
"public void setYOffset(float yOffset) {\n pos.y = yOffset;\n invalidate();\n }",
"public void setYLabel(String _label);",
"public void setyLabel(String yLabel) {\n this.yLabel = yLabel;\n }",
"public void setYAxisLabel(String yAxisLabel){\n yAxisName = yAxisLabel;\n }",
"private float getYAxisLabelHeight() {\n return ViewUtils.getTextHeight(mYAxisTextPaint, PERCENTAGE_PERFECT);\n }",
"public void calculateOffsets() {\n /* 113 */\n float legendLeft = 0.0F, legendRight = 0.0F, legendBottom = 0.0F, legendTop = 0.0F;\n /* */\n /* 115 */\n if (this.mLegend != null && this.mLegend.isEnabled() && !this.mLegend.isDrawInsideEnabled()) {\n /* */\n /* 117 */\n float yLegendOffset, fullLegendWidth = Math.min(this.mLegend.mNeededWidth, this.mViewPortHandler\n/* 118 */.getChartWidth() * this.mLegend.getMaxSizePercent());\n /* */\n /* 120 */\n switch (this.mLegend.getOrientation()) {\n /* */\n case VERTICAL:\n /* 122 */\n float xLegendOffset = 0.0F;\n /* */\n /* 124 */\n if (this.mLegend.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.LEFT || this.mLegend\n/* 125 */.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.RIGHT) {\n /* 126 */\n if (this.mLegend.getVerticalAlignment() == Legend.LegendVerticalAlignment.CENTER) {\n /* */\n /* 128 */\n float spacing = Utils.convertDpToPixel(13.0F);\n /* */\n /* 130 */\n xLegendOffset = fullLegendWidth + spacing;\n /* */\n }\n /* */\n else {\n /* */\n /* 134 */\n float spacing = Utils.convertDpToPixel(8.0F);\n /* */\n /* 136 */\n float legendWidth = fullLegendWidth + spacing;\n /* 137 */\n float legendHeight = this.mLegend.mNeededHeight + this.mLegend.mTextHeightMax;\n /* */\n /* 139 */\n MPPointF center = getCenter();\n /* */\n /* */\n /* */\n /* 143 */\n float bottomX = (this.mLegend.getHorizontalAlignment() == Legend.LegendHorizontalAlignment.RIGHT) ? (getWidth() - legendWidth + 15.0F) : (legendWidth - 15.0F);\n /* */\n /* 145 */\n float bottomY = legendHeight + 15.0F;\n /* 146 */\n float distLegend = distanceToCenter(bottomX, bottomY);\n /* */\n /* 148 */\n MPPointF reference = getPosition(center, getRadius(),\n /* 149 */ getAngleForPoint(bottomX, bottomY));\n /* */\n /* 151 */\n float distReference = distanceToCenter(reference.x, reference.y);\n /* 152 */\n float minOffset = Utils.convertDpToPixel(5.0F);\n /* */\n /* 154 */\n if (bottomY >= center.y && getHeight() - legendWidth > getWidth()) {\n /* 155 */\n xLegendOffset = legendWidth;\n /* 156 */\n } else if (distLegend < distReference) {\n /* */\n /* 158 */\n float diff = distReference - distLegend;\n /* 159 */\n xLegendOffset = minOffset + diff;\n /* */\n }\n /* */\n /* 162 */\n MPPointF.recycleInstance(center);\n /* 163 */\n MPPointF.recycleInstance(reference);\n /* */\n }\n /* */\n }\n /* */\n /* 167 */\n switch (this.mLegend.getHorizontalAlignment()) {\n /* */\n// case VERTICAL:\n// /* 169 */\n// legendLeft = xLegendOffset;\n// /* */\n// break;\n// /* */\n// /* */\n// case HORIZONTAL:\n// /* 173 */\n// legendRight = xLegendOffset;\n// break;\n }\n switch (this.mLegend.getVerticalAlignment())\n /* */ {\n// case VERTICAL:\n// /* 179 */\n// legendTop = Math.min(this.mLegend.mNeededHeight, this.mViewPortHandler\n///* 180 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n// break;\n// /* */\n// case HORIZONTAL:\n// /* */\n// case null:\n// /* 183 */\n// break;\n }\n legendBottom = Math.min(this.mLegend.mNeededHeight, this.mViewPortHandler\n/* 184 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n /* */\n break;\n /* */\n /* */\n /* */\n /* */\n /* */\n /* */\n /* */\n case HORIZONTAL:\n /* 193 */\n yLegendOffset = 0.0F;\n /* */\n /* 195 */\n if (this.mLegend.getVerticalAlignment() == Legend.LegendVerticalAlignment.TOP || this.mLegend\n/* 196 */.getVerticalAlignment() == Legend.LegendVerticalAlignment.BOTTOM) {\n /* */\n /* */\n /* */\n /* */\n /* 201 */\n float yOffset = getRequiredLegendOffset();\n /* */\n /* 203 */\n yLegendOffset = Math.min(this.mLegend.mNeededHeight + yOffset, this.mViewPortHandler\n/* 204 */.getChartHeight() * this.mLegend.getMaxSizePercent());\n /* */\n /* 206 */\n switch (this.mLegend.getVerticalAlignment())\n /* */ {\n// case VERTICAL:\n// /* 208 */\n// legendTop = yLegendOffset;\n// break;\n// /* */\n// case HORIZONTAL:\n// /* */\n// case null:\n// /* 211 */\n// break;\n }\n legendBottom = yLegendOffset;\n /* */\n }\n /* */\n break;\n /* */\n }\n /* */\n /* */\n /* */\n /* 218 */\n legendLeft += getRequiredBaseOffset();\n /* 219 */\n legendRight += getRequiredBaseOffset();\n /* 220 */\n legendTop += getRequiredBaseOffset();\n /* 221 */\n legendBottom += getRequiredBaseOffset();\n /* */\n }\n /* */\n /* 224 */\n float minOffset = Utils.convertDpToPixel(this.mMinOffset);\n /* */\n /* 226 */\n if (this instanceof RadarChart) {\n /* 227 */\n XAxis x = getXAxis();\n /* */\n /* 229 */\n if (x.isEnabled() && x.isDrawLabelsEnabled()) {\n /* 230 */\n minOffset = Math.max(minOffset, x.mLabelRotatedWidth);\n /* */\n }\n /* */\n }\n /* */\n /* 234 */\n legendTop += getExtraTopOffset();\n /* 235 */\n legendRight += getExtraRightOffset();\n /* 236 */\n legendBottom += getExtraBottomOffset();\n /* 237 */\n legendLeft += getExtraLeftOffset();\n /* */\n /* 239 */\n float offsetLeft = Math.max(minOffset, legendLeft);\n /* 240 */\n float offsetTop = Math.max(minOffset, legendTop);\n /* 241 */\n float offsetRight = Math.max(minOffset, legendRight);\n /* 242 */\n float offsetBottom = Math.max(minOffset, Math.max(getRequiredBaseOffset(), legendBottom));\n /* */\n /* 244 */\n this.mViewPortHandler.restrainViewPort(offsetLeft, offsetTop, offsetRight, offsetBottom);\n /* */\n /* 246 */\n if (this.mLogEnabled) {\n /* 247 */\n Log.i(\"MPAndroidChart\", \"offsetLeft: \" + offsetLeft + \", offsetTop: \" + offsetTop + \", offsetRight: \" + offsetRight + \", offsetBottom: \" + offsetBottom);\n /* */\n }\n /* */\n }",
"public void setyLabel(String yLabel) {\n\t\tthis.yLabel = yLabel;\n\t\tthis.dirtyAttributes.add(Constants.Y_LABEL);\n\t}",
"public void setPreferredVerticalOffset(int preferredVerticalOffset) {\n\t\tthis.preferredVerticalOffset = preferredVerticalOffset;\n\t\tthis.minimumHorizontalOffset = 2 * preferredVerticalOffset;\n\t\tballoonTip.getStyle().setVerticalOffset(preferredVerticalOffset);\n\t}",
"public void setYLabel(String yLabel){\n\t\tyAxis.setLabel(yLabel);\n\t}",
"public int getYOffset();",
"default void setY(double y)\n {\n getAxis().setY(y);\n }",
"private void formatYAxis() {\n ((ValueAxis<Double>) performanceGraph.getYAxis()).setTickLabelFormatter(new StringConverter<Double>() {\n @Override\n public String toString(Double object) {\n if (currMode == Mode.GROSS_PROFITS) {\n if (object < 0) {\n return \"-$\" + Math.abs(object);\n } else {\n return \"$\" + object;\n }\n } else if (currMode == Mode.PERCENT_RETURN) {\n return object + \"%\";\n } else {\n return \"err\";\n }\n }\n\n @Override\n public Double fromString(String string) {\n return null;\n }\n });\n }",
"public final int getYOffset() {\n return yOffset;\n }",
"public String getyLabel() {\n return yLabel;\n }",
"public void setOffset(float deltaY) {\n // figure out how the delta\n float deltaOffsetValue = deltaY / textIntervalDistance;\n offsetValue -= deltaOffsetValue;\n postInvalidate();\n }",
"protected void drawYLabels(Canvas c, float fixedPosition, float[] positions, float offset) {\n\n final int from = mYAxis.isDrawBottomYLabelEntryEnabled() ? 0 : 1;\n final int to = mYAxis.isDrawTopYLabelEntryEnabled()\n ? mYAxis.mEntryCount\n : (mYAxis.mEntryCount - 1);\n\n // draw\n for (int i = from; i < to; i++) {\n // 要绘制的文字\n String text = mYAxis.getFormattedLabel(i);\n //\n c.drawText(text, fixedPosition, positions[i * 2 + 1] + offset, mAxisLabelPaint);\n }\n }",
"String getYAxisLabel();",
"@Override\n\tpublic void setOffsetY(int y)\n\t{\n\t}",
"public void setAlignmentY(AlignY anAlignX) { }",
"private float getYAxisLabelWidth() {\n return ViewUtils.getTextWidth(mYAxisTextPaint, PERCENTAGE_PERFECT);\n }",
"public void setY(double value) {\n origin.setY(value);\n }",
"public LabelBuilder setShadowOffsetY(int shadowOffsetY) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setShadowOffsetY(shadowOffsetY);\n\t\treturn this;\n\t}",
"public final Marking setY( Range yRange )\n {\n return setY( yRange, 1 );\n }",
"public double calculateYOffset(AxisAlignedBB axis, double offset) {\n\t\tif (axis.maxX > this.minX && axis.minX < this.maxX) {\n\t\t\tif (axis.maxZ > this.minZ && axis.minZ < this.maxZ) {\n\t\t\t\tdouble var4;\n\n\t\t\t\tif (offset > 0.0D && axis.maxY <= this.minY) {\n\t\t\t\t\tvar4 = this.minY - axis.maxY;\n\n\t\t\t\t\tif (var4 < offset) {\n\t\t\t\t\t\toffset = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (offset < 0.0D && axis.minY >= this.maxY) {\n\t\t\t\t\tvar4 = this.maxY - axis.minY;\n\n\t\t\t\t\tif (var4 > offset) {\n\t\t\t\t\t\toffset = var4;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn offset;\n\t\t\t} else {\n\t\t\t\treturn offset;\n\t\t\t}\n\t\t} else {\n\t\t\treturn offset;\n\t\t}\n\t}",
"protected abstract float getRequiredLegendOffset();",
"public void setLengthsYShift(int lengthsYShift) {\n\t\tif( lengthsYShift > yShiftMax ){\n\t\t\tlengthsYShift = yShiftMax;\n\t\t}\n\t\telse if (lengthsYShift < yShiftMin ){\n\t\t\tlengthsYShift = yShiftMin;\n\t\t}\n\t\tthis.lengthsYShift = lengthsYShift;\n\t}",
"public void setPrimaryYAxisLabelOptions(ChartAxisLabelOptions primaryYAxisLabelOptions) {\n this.primaryYAxisLabelOptions = primaryYAxisLabelOptions;\n }",
"public void setYPos(int y) {\n // from MoveEventHandler\n // convert to real y coord\n // y = yP * (ymaxR - yminr) / (ymaxP - yminP)\n double tmp = config.getMaximumRealY() + (y - config.getMaximumPixelY())*(config.getMaximumRealY() - config.getMinimumRealY())/(config.getMaximumPixelY() - config.getMinimumPixelY());\n ypos.setText(formatter.format(tmp));\n }",
"public float getYOffset() {\n return mYOffset;\n }",
"public void setOffsetY(int offsetY) {\n\t\tthis.offsetY = offsetY;\n\t}",
"public void setExtendedY(float y) {\n mMaximumTop = (int) y;\n }",
"public void setY(int yPos){\t\t\n\t\ty = new Integer(yPos);\n\t}",
"@Override\r\n public void setAlignmentY(float f) {\r\n super.setAlignmentY(JLabel.CENTER_ALIGNMENT);\r\n }",
"public BarChartBuilder yLabel(String yLabel) {\n\tthis.yLabel = yLabel;\n\treturn this;\n }",
"public float setYMax(){\n\t\tif (game.getDifficulty() == 0)\n\t\t\treturn 72;\n\t\telse if (game.getDifficulty() == 1)\n\t\t\treturn 108;\n\t\telse\n\t\t\treturn 144;\n\t}",
"public void setYPosition(int newY) {\n this.yPosition = newY;\n }",
"private void setScrollOffsetY(int value) {\n bitField0_ |= 0x00000020;\n scrollOffsetY_ = value;\n }",
"public double getyOffset() {\n\n return currentYOffset + yOffset;\n }",
"public PlotPosition setY( double y )\n {\n return setY( y, 1 );\n }",
"public void ylabel(String label){\n XY1DPlot plot = (XY1DPlot)this.chartPanel.getChart().getPlot();\n plot.getYAxis().setLabel(label);\n plot.getYAxis().setDrawLabel(true);\n this.chartPanel.paintGraphics();\n }",
"public void drawYaxis(Graphics2D g)\r\n { \r\n //draw y axis\r\n g.drawLine( 0, 0, 0, -height );\r\n \r\n //scale y axis\r\n for (double i = 0; i <= yRange; i += yScale)\r\n {\r\n int yP = -yPixScale(i);\r\n g.drawLine(-dWidth, yP, dWidth, yP);\r\n String numLabel = Fun.round( (i + yStart), scaleSigFig ) + \"\";\r\n drawStringY( numLabel, -dWidth - 1, yP, g );\r\n }\r\n \r\n //label y axis, and the label has to be sideways\r\n \r\n //orig = the way g is oriented right now\r\n AffineTransform orig = g.getTransform();\r\n \r\n //move g and display the label\r\n g.translate( -leftSpace/2 - 10, -height/2 );\r\n g.rotate(-Math.PI / 2); //-90 degrees\r\n drawStringX(yName, 0, 0, g);\r\n\r\n //move g back\r\n g.setTransform(orig);\r\n }",
"public double getYOffset()\n {\n return -0.45D;\n }",
"public void setYSize(int ySize) {\n\t\tif (ySize < 0) {\n\t\t\tSystem.out.println(\"ySize should be positive! It is set to \" + Y_SIZE + \".\");\n\t\t\tySize = Y_SIZE;\n\t\t}\n\t\tthis.ySize = ySize;\n\n\t\t// To update the panel with new values if necessary\n\t\tthis.setNumRabbits(this.getNumRabbits());\n\n\t\tupdatePanel();\n\t}",
"void setY(int newY) {\n this.yPos = newY;\n }",
"public static NumberAxis calcAxisY() {\n double minY = Math.round(\n Collections.min(GlobalVariables.systemCorridor.getDistances()) / 100) * 100 - 100;\n double maxY = Math.round(\n Collections.max(GlobalVariables.systemCorridor.getDistances()) / 100) * 100 + 100;\n double scaleY = Math.round(0.1 * (maxY - minY) / 100) * 100;\n NumberAxis axis = new NumberAxis(\"Distance (ft)\", minY, maxY, scaleY);\n axis.setTickLabelFont(Font.font(16));\n axis.setMinorTickCount(4);\n return axis;\n }",
"public Builder setPositionY(double value) {\n bitField0_ |= 0x00000080;\n positionY_ = value;\n onChanged();\n return this;\n }",
"@Override\n public int getYOffset(float ypos) {\n return -getHeight();\n }",
"public Builder setPositionY(double value) {\n bitField0_ |= 0x00000008;\n positionY_ = value;\n onChanged();\n return this;\n }",
"private void calcYSize(ArrayList<BarEntry> yValues) {\n for (int i = 0; i < yValues.size(); i++) {\n float yValue = yValues.get(i).getY();\n mMaxY = Math.max(mMaxY, yValue);\n mMinY = Math.min(mMinY, yValue);\n }\n }",
"public float getAlignmentY() { return 0.5f; }",
"public Builder setPositionY(double value) {\n bitField0_ |= 0x00000010;\n positionY_ = value;\n onChanged();\n return this;\n }",
"public void setyPos(int yPos) {\r\n this.yPos = yPos;\r\n }",
"private void setY(long value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n }",
"public void setYCoordinates(double newY) { this.yCoordinates = newY; }",
"public void setY(int value)\n\t{\n\t\tgetWorldPosition().setY(value);\n\t}",
"public void setEndY(double y)\n {\n endycoord=y; \n }",
"public void setYValue( double value ){\r\n\t\tsuper.setYValue( new Double( value ) );\r\n\t}",
"public BoxPlotChartConfiguration withPrimaryYAxisLabelOptions(ChartAxisLabelOptions primaryYAxisLabelOptions) {\n setPrimaryYAxisLabelOptions(primaryYAxisLabelOptions);\n return this;\n }",
"public void setyPos(int yPos) {\n\t\tthis.yPos = yPos;\n\t}",
"public void setY(int value) {\n this.y = value;\n }",
"private void drawVerticalAxisLabels(Graphics2D g2) {\r\n double axisV = xPositionToPixel(originX);\r\n\r\n// double startY = Math.floor((minY - originY) / majorY) * majorY;\r\n double startY = Math.floor(minY / majorY) * majorY;\r\n for (double y = startY; y < maxY + majorY; y += majorY) {\r\n if (((y - majorY / 2.0) < originY) &&\r\n ((y + majorY / 2.0) > originY)) {\r\n continue;\r\n }\r\n \r\n int position = (int) yPositionToPixel(y);\r\n g2.drawString(format(y), (int) axisV + 5, position);\r\n }\r\n }",
"public void setyPosition(int yPosition) {\n\t\tthis.yPosition = yPosition;\n\t}",
"public void setYCoordinate(int newValue)\n {\n y = newValue;\n }",
"public void yDelta(float y_delta)\n {\n super.setY(super.getY() + y_delta);\n }",
"public void setyPos(int yPos) \n\t{\n\t\tthis.yPos = yPos;\n\t}",
"public AlignY getAlignmentY() { return AlignY.Top; }",
"public void setY(int newY)\r\n {\r\n yCoord = newY;\r\n }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }",
"public void setY(int y) {\n\tbaseYCoord = y;\n}",
"public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }",
"public Builder setY(float value) {\n bitField0_ |= 0x00000002;\n y_ = value;\n onChanged();\n return this;\n }",
"public void setFrameY(double aY) { double y = _y + aY - getFrameY(); setY(y); }",
"public final Marking setY( Range yRange, int yAxisNumber )\n {\n assert yAxisNumber > 0 : \"yAxisNumber starts at 1\";\n if ( yAxisNumber == 1 )\n {\n put( Y_AXIS_KEY_PREFIX + Y_AXIS_KEY_SUFFIX, yRange );\n }\n else\n {\n put( Y_AXIS_KEY_PREFIX + yAxisNumber + Y_AXIS_KEY_SUFFIX, yRange );\n }\n return this;\n }",
"public PlotPosition setY( double y, int yAxisNumber )\n {\n assert yAxisNumber > 0 : \"yAxisNumber starts at 1\";\n put( Y + yAxisNumber, y );\n return this;\n }",
"public void setDropDownVerticalOffset(int offset) {\n/* 297 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void SetY2()\n\t{\n\t\tdouble h;\n\t\th = Math.pow(this.length, 2) - Math.pow((this.length/2), 2);\n\t\th = Math.sqrt(h);\n\t\tthis.y[2] = this.y[0] - h;\n\t}",
"public float setBoxYLoc(int boxNum){\n\t\tint yStartLoc;\n\t\tif (boxNum < 5 )\n\t\t\tyStartLoc = 0;\n\t\telse{\n\t\t\tyStartLoc = ( ( (boxNum - 5) / 2) + 1);\n\t\t}\n\t\t\n\t\treturn (screenHeight -(boxTester.getImage().getHeight() * boxTester.getBoxScale() ) - 25 ) - (25 * yStartLoc) - (yStartLoc * boxTester.getImage().getHeight() * boxTester.getBoxScale() ) ;\n\t}",
"public void setYPos(int yPos) {\r\n\t\tthis.yPos = yPos;\r\n\t}",
"default Integer getYOffset() {\n return null;\n }",
"public Builder setY(int value) {\n bitField0_ |= 0x00000008;\n y_ = value;\n onChanged();\n return this;\n }",
"void setY(int y) {\n position = position.setY(y);\n }",
"public void setYRange(int origin, int extent) {\r\n\t\tyRange = new Range(origin, extent);\r\n\t}",
"public void setAxisNameY(String name) {\n\t\tGP.setAxisNameY(name);\n\t}",
"public void setYLabel(final String str) {\n this.YLabel.setText(str);\n this.YLabel.setToolTipText(this.YLabel.getText());\n }",
"@Override\n public void renderAxisLabels(Canvas c) {\n //\n if (!mYAxis.isEnabled() || !mYAxis.isDrawLabelsEnabled()) {\n return;\n }\n // 文字大小\n mAxisLabelPaint.setTextSize(mYAxis.getTextSize());\n // 文字颜色\n mAxisLabelPaint.setColor(mYAxis.getTextColor());\n mAxisLabelPaint.setTextAlign(Align.RIGHT);\n\n //\n float[] positions = getTransformedPositions();\n //\n float xoffset = mYAxis.getXOffset();\n float yoffset = Utils.calcTextHeight(mAxisLabelPaint, \"A\") / 2.5f + mYAxis.getYOffset();\n //\n float xPos = mViewPort.offsetLeft() - xoffset;\n\n drawYLabels(c, xPos, positions, yoffset);\n }",
"public void initY(String label, double start, double range, double scale)\r\n {\r\n yName = label;\r\n yStart = start;\r\n yRange = range;\r\n yScale = scale; \r\n }",
"public void setOffset(double xOffset, double yOffset) {\n this.xOffset = xOffset;\n this.yOffset = yOffset;\n }",
"public void setYRange(Range range) {\r\n\t\tyRange = new Range(range);\r\n\t}",
"public void setYPos(int yPos) {\n\t\tthis.yPos=yPos;\n\t}",
"public void setLabelPosition(int x, int y);",
"public void setY(double value) {\n this.y = value;\n }",
"public void setYAxisTitle(String yAxisTitle) {\n this.yAxisTitle = yAxisTitle;\n }",
"public void setY(double val) {\r\n\t\t this.yCoord = val;\r\n\t }",
"public void setY(double y)\r\n\t{\t\r\n\t\tvirtualDxfPoint.setTransformationY(y);\r\n\t\tAnchor.setY(y);\r\n\t}",
"public int getYOffset(float ypos) {\n return -getHeight();\n }",
"public FractalTrace setY2(double value) throws ParameterOutOfRangeException\n {\n\t\tif(value > 50.00 || value < -50.00)\n\t {\n\t throw new ParameterOutOfRangeException(value, -50.00, 50.00);\n\t }\n\n m_Y2 = value;\n setProperty(\"Y2\", value);\n return this;\n }",
"protected double getReferenceY() {\n if (isYAxisBoundsManual() && !mGraphView.getGridLabelRenderer().isHumanRoundingY()) {\n if (Double.isNaN(referenceY)) {\n referenceY = getMinY(false);\n }\n return referenceY;\n } else {\n // starting from 0 so that the steps have nice numbers\n return 0;\n }\n }",
"@Override\n protected int computeHeight(Rectangle bounds, double scale, int offset)\n {\n return PrecisionUtilities.round((LABEL_HEIGHT + 2 /*+ (2 * offset) */) * scale);\n }",
"public void setAxes(int xPos, int yPos, int axisLength, String xLabel, String yLabel)\n {\n this.xPos= xPos;\n this.yPos= yPos;\n this.xLabel= xLabel;\n this.yLabel= yLabel;\n this.axisLength=axisLength;\n }"
] | [
"0.6393745",
"0.6285883",
"0.6189024",
"0.60754067",
"0.60602444",
"0.5943055",
"0.5930942",
"0.584375",
"0.57623833",
"0.5719922",
"0.5623065",
"0.558099",
"0.557629",
"0.55631036",
"0.55423784",
"0.5528609",
"0.5513817",
"0.5503691",
"0.54984605",
"0.5496416",
"0.54908407",
"0.5479948",
"0.5461209",
"0.5435763",
"0.5431105",
"0.5428436",
"0.5424169",
"0.53998417",
"0.53671193",
"0.53646815",
"0.53546566",
"0.5346482",
"0.5339861",
"0.53337634",
"0.53016704",
"0.5299225",
"0.5296154",
"0.5288352",
"0.5285982",
"0.52701324",
"0.526414",
"0.5263615",
"0.5212506",
"0.5197523",
"0.51950717",
"0.518676",
"0.51763666",
"0.5171538",
"0.51679647",
"0.5160575",
"0.5137742",
"0.5134892",
"0.5108267",
"0.510538",
"0.5049241",
"0.5048502",
"0.50430334",
"0.50318986",
"0.5019123",
"0.500787",
"0.500583",
"0.50034106",
"0.5002053",
"0.5000087",
"0.49921283",
"0.49874556",
"0.49868232",
"0.49784064",
"0.49707252",
"0.49611485",
"0.49610016",
"0.49610016",
"0.49584392",
"0.4954122",
"0.4950868",
"0.49446532",
"0.4943056",
"0.49417138",
"0.49382013",
"0.49380165",
"0.49376383",
"0.49372748",
"0.49345434",
"0.49335006",
"0.49255228",
"0.49220276",
"0.49163446",
"0.491048",
"0.48986024",
"0.4898102",
"0.4894822",
"0.4893285",
"0.48918584",
"0.4890441",
"0.48861653",
"0.48853475",
"0.48808917",
"0.48808074",
"0.4875472",
"0.48527065"
] | 0.62109745 | 2 |
returns the Typeface used for the labels, returns null if none is set | public Typeface getTypeface() {
return mTypeface;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"private Typeface getTypeface(TypefaceName tfn){\n\n switch (tfn) {\n case FURMANITE:\n return moodPromptFont;\n case DATACONTROL:\n return conversationFont;\n default:\n //TODO: pick a Default\n return conversationFont;\n }\n\n }",
"public static final Typeface getTypeface(Context context) {\n if (typeface == null) {\n try {\n typeface = Typeface.createFromFile(resourceToFile(context, TTF_FILE));\n } catch (IOException e) {\n return null;\n }\n }\n return typeface;\n }",
"private void settypeface() {\n }",
"public static Typeface getFontPrincipale(Context context){\n\t\tTypeface tf = fontCache.get(fontPrincipale);\n\t\tif(tf == null){\n\t\t\ttry{\n\t\t\t\ttf = Typeface.createFromAsset(context.getAssets(), fontPrincipale);\n\t\t\t} catch (Exception e){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tfontCache.put(fontPrincipale, tf);\n\t\t}\n\t\treturn tf;\n\t}",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"public static @Nullable Typeface getTypeface(@NonNull Object tag) {\n checkNotNull(tag, \"tag\");\n\n synchronized (TypefaceManager.class) {\n return tags.get(tag);\n }\n }",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"private static Typeface createTypeface(int style) {\n for (String family : FAMILIES) {\n Typeface tf = Typeface.create(family, style);\n if (tf.getStyle() == style) {\n return tf;\n }\n }\n return null;\n }",
"public Font getLabelFont();",
"public Typeface getHightlightedTypeface() {\n if (mHightlightedTypeface != null)\n return mHightlightedTypeface;\n return getTypeface();\n }",
"public static Typeface get(String name, Context context){\n\t\tTypeface tf = fontCache.get(name);\n\t\tif(tf == null){\n\t\t\ttry{\n\t\t\t\ttf = Typeface.createFromAsset(context.getAssets(), name);\n\t\t\t} catch (Exception e){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tfontCache.put(name, tf);\n\t\t}\n\t\treturn tf;\n\t}",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"private Typeface getTypeface(String fontFamilyName) {\n\t\tfontFamilyName = fontFamilyName.replace(' ', '_');\n\t\ttry {\n\t\t\treturn Typeface.createFromAsset(mContext.getAssets(),\n\t\t\t\t\tASSETS_FONTS_ROOT_DIRECTORY + \"/\" +\n\t\t\t\t\t\t\tfontFamilyName.toLowerCase() + \".ttf\");\n\t\t}\n\t\tcatch (final Exception e) {\n\t\t\treturn null;\n\t\t}\n\n\t}",
"public static @Nullable Typeface getTypefaceByName(@NonNull String fullName) {\n synchronized (TypefaceManager.class) {\n for (Typeface typeface : typefaces) {\n if (typeface.getFullName().equalsIgnoreCase(fullName)) {\n return typeface;\n }\n }\n }\n\n return null;\n }",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"public Typeface a() {\n return this.f2079d;\n }",
"public int getTypefaceIndex() {\r\n return TypefaceIndex;\r\n }",
"public static @Nullable Object getTypefaceTag(@NonNull Typeface typeface) {\n checkNotNull(typeface, \"typeface\");\n\n synchronized (TypefaceManager.class) {\n checkArgument(typefaces.contains(typeface), \"This typeface is not registered\");\n\n return typeface.tag;\n }\n }",
"public static Typeface getTypeface(int font) {\r\n if (!fontsLoaded) {\r\n return Typeface.DEFAULT;\r\n }\r\n return typefaces[font];\r\n }",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }",
"public String getFont() {\n return font;\n }",
"public FontFinder getFontFinder() {\n return NameFont;\n }",
"public abstract Font getFont();",
"public S<T> font(String fileName){\n\t\t\n\t\tTypeface font = Typeface.createFromAsset(activity.getAssets(), fileName);\n\t\t\n\t\tif(t instanceof TextView){\n\t\t\t((TextView)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof Button){\n\t\t\t((Button)t).setTypeface(font);\n\t\t}\t\n\t\tif(t instanceof EditText){\n\t\t\t((EditText)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof CheckBox)\n\t\t{\n\t\t\t((CheckBox)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof RadioButton)\n\t\t{\n\t\t\t((RadioButton)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof LinkedList){\n\t\t\tLinkedList<View> auxl = (LinkedList<View>)t;\n\t\t\tfor (View v : auxl) {\n\t\t\t\tt= (T) v;\n\t\t\t\tfont(fileName);\n\t\t\t}\n\t\t\t\n\t\t\tt= (T) auxl;\n\t\t}\n\t\t\n\t\t\n\t\treturn this;\n\t}",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}",
"public static BitmapFont getDefault() {\r\n\t\treturn defaultFont;\r\n\t}",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public HashMap<String, FileHandle> getTTFMap() {\r\n return ttfMap;\r\n }",
"public void setTypeface(Typeface tf) {\n mTypeface = tf;\n }",
"private String getRequestedTypeFace(HttpServletRequest req) {\n\tfinal String tf = getRequestParameter(req, QPARAM_NAME_TYPE_FACE);\n\tif (tf != null && !tf.isEmpty()) {\n\t return tf;\n\t}\n\treturn null;\n }",
"abstract Font getFont();",
"public Font getLabelFont() {\n return labelFont;\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"public static Typeface readTypefaceFromParcel(Parcel object) {\n int n = ((Parcel)object).readInt();\n int n2 = ((Parcel)object).readInt();\n if (n != Process.myPid()) {\n return null;\n }\n object = sLock;\n synchronized (object) {\n return sStorage.get(n2);\n }\n }",
"String getRendererType();",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public Font getFont(\n )\n {return font;}",
"private void loadSettingFont() {\n\t\tSharedPreferences mysettings = getSharedPreferences(\n\t\t\t\tPREFERENCES_FILE_NAME, 0);\n\t\tindexFont = mysettings.getInt(\"indexFont\", 1);\n\t\tLog.d(\"indexFont\", indexFont + \"\");\n\t\tswitch (indexFont) {\n\t\tcase 0:\n\t\t\tmTypeface = Typeface.DEFAULT;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"tinhyeu.ttf\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"thuphap.ttf\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\t}\n\t}",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public void setFontToSpinner(Typeface mTypeFace){\n tf=mTypeFace;\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }",
"private FontBoxFont findFontBoxFont(String postScriptName) {\n/* 374 */ Type1Font t1 = (Type1Font)findFont(FontFormat.PFB, postScriptName);\n/* 375 */ if (t1 != null)\n/* */ {\n/* 377 */ return (FontBoxFont)t1;\n/* */ }\n/* */ \n/* 380 */ TrueTypeFont ttf = (TrueTypeFont)findFont(FontFormat.TTF, postScriptName);\n/* 381 */ if (ttf != null)\n/* */ {\n/* 383 */ return (FontBoxFont)ttf;\n/* */ }\n/* */ \n/* 386 */ OpenTypeFont otf = (OpenTypeFont)findFont(FontFormat.OTF, postScriptName);\n/* 387 */ if (otf != null)\n/* */ {\n/* 389 */ return (FontBoxFont)otf;\n/* */ }\n/* */ \n/* 392 */ return null;\n/* */ }",
"public Font getFont() {\n return font;\n }",
"public static Typeface getFont(Context context, String fontName) {\n synchronized (cache) {\n if (!cache.containsKey(fontName)) {\n try {\n Typeface t = Typeface.createFromAsset(context.getAssets(), fontName);\n cache.put(fontName, t);\n } catch (Exception e) {\n return null;\n }\n }\n return cache.get(fontName);\n }\n }",
"public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }",
"public String getMatchFontName();",
"private void initFonts() {\n Typeface typeFace = Typeface.createFromAsset(getAssets(), \"fonts/BuriedBeforeBB_Reg.otf\");\n\n TextView textViewScore = (TextView) findViewById(R.id.txtScore);\n TextView textViewLives = (TextView) findViewById(R.id.txtLives);\n TextView txtGameOver = (TextView) findViewById(R.id.txtGameOver);\n TextView txtGameOver2 = (TextView) findViewById(R.id.txtGameOver2);\n\n textViewScore.setTypeface(typeFace);\n textViewLives.setTypeface(typeFace);\n txtGameOver.setTypeface(typeFace);\n txtGameOver2.setTypeface(typeFace);\n txtNextLevel.setTypeface(typeFace);\n }",
"public int getStandardType1FontType() throws PDFNetException {\n/* 909 */ return GetStandardType1FontType(this.a);\n/* */ }",
"public interface IAssetFontView {\n\n Context getContext();\n void setTypeface(Typeface typeFace);\n}",
"private SpriteFont getSpriteFontInstance() {\r\n\t\t// called by the seed batch upon making a batch\r\n\t\t// only needs docPoint if an influenceImage is set\r\n\t\t//System.out.println(\"SpriteFontBiome::getSpriteFontInstance ... num biomeItems = \" + biomeItems.size());\r\n\t\tif (probabilitiesNormalised == false) normaliseProbabilities();\r\n\r\n\t\tif (biomeItems.size() == 1) {\r\n\t\t\treturn biomeItems.get(0);\r\n\t\t}\r\n\r\n\t\t\r\n\t\tfloat r = randomStream.randRangeF(0f, 1f);\r\n\t\treturn getSpriteFontFromProbabilityStack(r);\r\n\t}",
"String getShapeLabel();",
"public void GetFont (){\n fontBol = false;\n fontBolS = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public void setLabelFont(Font f);",
"public final String getFontFamily() {\n return fontFamily;\n }",
"public Font createFont() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String getName() {\n\t\treturn \"TF\";\r\n\t}",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"public Font GetFont(String name) { return FontList.get(name); }",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"private static Typeface getRobotoTypeface(Context context, Typeface originalTypeface) {\n String robotoFontType = FontTypes.LIGHT; //default Light Roboto font\n if (originalTypeface != null) {\n int style = originalTypeface.getStyle();\n switch (style) {\n case Typeface.BOLD:\n robotoFontType = FontTypes.BOLD;\n }\n }\n return getRobotoTypeface(context, robotoFontType);\n }",
"private static Typeface getRobotoTypeface(Context context, String fontType) {\n String fontPath = fontMap.get(fontType);\n if (!typefaceCache.containsKey(fontType))\n {\n typefaceCache.put(fontType, Typeface.createFromAsset(context.getAssets(), fontPath));\n }\n return typefaceCache.get(fontType);\n }",
"public Font getFont() {\n return this.font;\n }",
"public String getBestLabel(ITopic t) {\r\n\t\tif (bestLabels == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\treturn bestLabels.get(new BestLabelKey(t));\r\n\t}",
"public static Font getFont() {\n return getFont(12);\n }",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"protected Text getKind() {\n return null;\n }",
"TextField getTf();",
"public boolean isFontSet() { return false; }",
"public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }",
"@SuppressWarnings(\"unchecked\")\n public TF addFont() {\n final ParameterizedType pt = (ParameterizedType) getClass()\n .getGenericSuperclass();\n final ParameterizedType paramType = (ParameterizedType) pt\n .getActualTypeArguments()[2];\n final Class<TF> fontClass = (Class<TF>) paramType.getRawType();\n try {\n final Constructor<TF> c = fontClass\n .getDeclaredConstructor(ACellStyle.class);\n return c.newInstance(this);\n }\n catch (final Exception e) {\n throw new ReportBuilderException(e);\n }\n }",
"public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }",
"Font createFont();",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public String Type()\t{\r\n\t\treturn BrickFinder.getDefault().getType();\r\n\t}",
"public void GetFontS (){\n fontBolS = false;\n fontBol = true;\n fontBolA = true;\n fontBolW = true;\n }",
"public static Font getDefaultFont() {\r\n return defaultFont;\r\n }",
"public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"public Font font() {\n return font;\n }",
"FONT createFONT();",
"public static Typeface getFont(Context ctx, String fontName) {\n Typeface font;\n if (!isFontCached(fontName)) {\n if (ctx == null) {\n return null; // We can't retrieve it...\n }\n\n font = Typeface.createFromAsset(ctx.getAssets(), fontName);\n if (font != null) {\n // Cache it if we've successfully loaded it\n mFontsCache.put(fontName, font);\n }\n }\n else {\n font = mFontsCache.get(fontName);\n }\n\n return font;\n }",
"public String getName() {\n return fontName;\n }",
"public FontUIResource getControlTextFont() { return fControlFont;}",
"void setFontFamily(ReaderFontSelection f);",
"public FontMapping<FontBoxFont> getFontBoxFont(String baseFont, PDFontDescriptor fontDescriptor) {\n/* */ TrueTypeFont trueTypeFont;\n/* 348 */ FontBoxFont font = findFontBoxFont(baseFont);\n/* 349 */ if (font != null)\n/* */ {\n/* 351 */ return new FontMapping<FontBoxFont>(font, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 356 */ String fallbackName = getFallbackFontName(fontDescriptor);\n/* 357 */ font = findFontBoxFont(fallbackName);\n/* 358 */ if (font == null)\n/* */ {\n/* */ \n/* 361 */ trueTypeFont = this.lastResortFont;\n/* */ }\n/* 363 */ return new FontMapping(trueTypeFont, true);\n/* */ }",
"public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }",
"public Font getFontAt(short arg0) {\n\t\treturn null;\n\t}"
] | [
"0.72312015",
"0.7197148",
"0.7099719",
"0.6318552",
"0.6314318",
"0.6262546",
"0.61892205",
"0.6171519",
"0.6139799",
"0.6139302",
"0.6130942",
"0.5949411",
"0.590804",
"0.5879576",
"0.58244264",
"0.5788775",
"0.5786743",
"0.57858783",
"0.57771003",
"0.57752514",
"0.5707477",
"0.56883365",
"0.5685461",
"0.5617832",
"0.56114715",
"0.560251",
"0.55968106",
"0.559473",
"0.5576307",
"0.55552304",
"0.5552483",
"0.55483204",
"0.5545003",
"0.55333394",
"0.5528395",
"0.5528395",
"0.55097985",
"0.54870063",
"0.5480686",
"0.5474921",
"0.5472345",
"0.5472345",
"0.5472345",
"0.5465629",
"0.5456539",
"0.54558474",
"0.54470503",
"0.54470503",
"0.5444523",
"0.54354995",
"0.5424767",
"0.54039395",
"0.54032713",
"0.5402316",
"0.5400849",
"0.5400565",
"0.540016",
"0.5398213",
"0.53899044",
"0.5375596",
"0.53709126",
"0.5369466",
"0.5355508",
"0.53452736",
"0.5318303",
"0.5292204",
"0.5287562",
"0.5287562",
"0.5276462",
"0.52683055",
"0.52677244",
"0.5244125",
"0.5228071",
"0.52277213",
"0.5222071",
"0.5213487",
"0.51944363",
"0.51820576",
"0.5180291",
"0.5169823",
"0.51665306",
"0.516077",
"0.5144638",
"0.5138876",
"0.5115155",
"0.51147455",
"0.51020896",
"0.50978243",
"0.50925976",
"0.50906473",
"0.50809187",
"0.5072178",
"0.506668",
"0.50646365",
"0.5061349",
"0.5056702",
"0.50438386",
"0.50383747",
"0.50368524",
"0.5032766"
] | 0.6894156 | 3 |
sets a specific Typeface for the labels | public void setTypeface(Typeface tf) {
mTypeface = tf;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void settypeface() {\n }",
"@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }",
"public void setLabelFont(Font f);",
"public void setFontToSpinner(Typeface mTypeFace){\n tf=mTypeFace;\n }",
"private void setTypeFaces(Typeface customTypeFace) {\n mPlayButton.setTypeface(customTypeFace);\n mOptionsButton.setTypeface(customTypeFace);\n mHelpButton.setTypeface(customTypeFace);\n }",
"public void setTypeface(Typeface typeface) {\n mTextContainer.setTypeface(typeface);\n }",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"private void setFont() {\n\t}",
"private void setLayout(){\n Typeface typeface = ResourcesCompat.getFont(getActivity(), R.font.acumin);\n txtName.setTypeface(typeface);\n txtNickname.setTypeface(typeface);\n }",
"public void changeFonts(){\n Typeface typeFace = Typeface.createFromAsset (this.getAssets (), \"fonts/courier.ttf\");\n sloganTV.setTypeface (typeFace);\n }",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"private Typeface getTypeface(TypefaceName tfn){\n\n switch (tfn) {\n case FURMANITE:\n return moodPromptFont;\n case DATACONTROL:\n return conversationFont;\n default:\n //TODO: pick a Default\n return conversationFont;\n }\n\n }",
"void setFontFamily(ReaderFontSelection f);",
"private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }",
"void setShapeLabel(String Label);",
"private void setCustomTypeface(Context context, AttributeSet attrs) {\n if (isInEditMode() || attrs == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {\n return;\n }\n\n TypedArray styledAttrs = context.obtainStyledAttributes(attrs, R.styleable.PinCodeView);\n String fontName = styledAttrs.getString(R.styleable.PinCodeView_typeface);\n styledAttrs.recycle();\n\n if (fontName != null) {\n Typeface typeface = getFont(context, fontName);\n setTypeface(typeface);\n }\n }",
"public void setFont(RMFont aFont) { }",
"private void setType(int t) {\n\t\ttype = t;\n\t\tfloat f;\n\t\tswitch (t) {\n\t\t\tcase 21:\n\t\t\t\tf = 18F;\n\t\t\t\tthis.setForeground(Color.white);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tf = 24F;\n\t\t\t\tbreak;\n\t\t}\n\t\tfont = font.deriveFont(f);\n\t\tthis.setFont(font);\n\t}",
"public void setTextFont(Font font);",
"public void setModifierFont(String name, int type, int size, float tracking, Boolean kerning) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size, kerning, tracking);\n _SPR.RefreshModifierFont();\n }",
"private void loadSettingFont() {\n\t\tSharedPreferences mysettings = getSharedPreferences(\n\t\t\t\tPREFERENCES_FILE_NAME, 0);\n\t\tindexFont = mysettings.getInt(\"indexFont\", 1);\n\t\tLog.d(\"indexFont\", indexFont + \"\");\n\t\tswitch (indexFont) {\n\t\tcase 0:\n\t\t\tmTypeface = Typeface.DEFAULT;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"tinhyeu.ttf\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"thuphap.ttf\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\t}\n\t}",
"public void setNodeLabelFont(Font value) {\n nodeLabelfont = value;\n }",
"public static void setRobotoFont(Activity context, View view)\n {\n if (view instanceof ViewGroup)\n {\n for (int i = 0; i < ((ViewGroup)view).getChildCount(); i++)\n {\n setRobotoFont(context, ((ViewGroup)view).getChildAt(i));\n }\n }\n else if (view instanceof TextView)\n {\n TextView tv = (TextView) view;\n Typeface currentTypeface = tv.getTypeface();\n Typeface tf = getRobotoTypeface(context, currentTypeface);\n Log.v(\"SET_FONTS\", String.format(\"Setting typeface font %s on TextView %s\", tf.toString(), tv.getText()));\n tv.setTypeface(tf);\n }\n else if (view instanceof Button)\n {\n Button btn = (Button) view;\n Typeface currentTypeface = btn.getTypeface();\n Typeface tf = getRobotoTypeface(context, currentTypeface);\n Log.v(\"SET_FONTS\", String.format(\"Setting typeface font %s on Button %s\", tf.toString(), btn.getText()));\n btn.setTypeface(getRobotoTypeface(context, currentTypeface));\n }\n }",
"public void setFont(Font f) {\n font = f;\n compute();\n }",
"private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }",
"public S<T> font(String fileName){\n\t\t\n\t\tTypeface font = Typeface.createFromAsset(activity.getAssets(), fileName);\n\t\t\n\t\tif(t instanceof TextView){\n\t\t\t((TextView)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof Button){\n\t\t\t((Button)t).setTypeface(font);\n\t\t}\t\n\t\tif(t instanceof EditText){\n\t\t\t((EditText)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof CheckBox)\n\t\t{\n\t\t\t((CheckBox)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof RadioButton)\n\t\t{\n\t\t\t((RadioButton)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof LinkedList){\n\t\t\tLinkedList<View> auxl = (LinkedList<View>)t;\n\t\t\tfor (View v : auxl) {\n\t\t\t\tt= (T) v;\n\t\t\t\tfont(fileName);\n\t\t\t}\n\t\t\t\n\t\t\tt= (T) auxl;\n\t\t}\n\t\t\n\t\t\n\t\treturn this;\n\t}",
"private void m32687a(TextView textView, Typeface typeface) {\n if (textView != null) {\n textView.setTypeface(typeface);\n }\n }",
"private void initFonts() {\n Typeface typeFace = Typeface.createFromAsset(getAssets(), \"fonts/BuriedBeforeBB_Reg.otf\");\n\n TextView textViewScore = (TextView) findViewById(R.id.txtScore);\n TextView textViewLives = (TextView) findViewById(R.id.txtLives);\n TextView txtGameOver = (TextView) findViewById(R.id.txtGameOver);\n TextView txtGameOver2 = (TextView) findViewById(R.id.txtGameOver2);\n\n textViewScore.setTypeface(typeFace);\n textViewLives.setTypeface(typeFace);\n txtGameOver.setTypeface(typeFace);\n txtGameOver2.setTypeface(typeFace);\n txtNextLevel.setTypeface(typeFace);\n }",
"@Override\n\tpublic void setText(CharSequence text, BufferType type) {\n\t\tString selected_font = StoreUtil.getInstance().selectFrom(\"fonts\");\n\t\tif(selected_font != null){\n\t\t\tif(selected_font.equals(\"myanmar3\")){\n\t\t\t\tif(text != null){\n\t\t\t\t\ttext = FontConverter.zg12uni51(text.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuper.setText(text, type);\n\t}",
"public interface IAssetFontView {\n\n Context getContext();\n void setTypeface(Typeface typeFace);\n}",
"public void setHightlightedTypeface(Typeface mHightlightedTypeface) {\n this.mHightlightedTypeface = mHightlightedTypeface;\n }",
"public void setLabelFont(int fontSize){\n Font labelFont = new Font(\"Serif\", Font.PLAIN, fontSize);\n minLabel.setFont(labelFont);\n medLabel.setFont(labelFont);\n maxLabel.setFont(labelFont);\n emptyLabel.setFont(labelFont);\n errorLabel.setFont(labelFont);\n }",
"public void onClick(View v) {\n Log.d(\"test\", \"Hello Dipankar:\"+type);\n // startActivity(intent);\n switch(type){\n case 1: txt.setTypeface(Typeface.MONOSPACE);\n break;\n case 2:\n txt.setTypeface(Typeface.SANS_SERIF);\n break;\n case 3:\n Typeface tf = Typeface.createFromAsset(getAssets(), \"fonts/Molot.otf\");\n txt.setTypeface(tf);\n }\n type =type%3+1;\n }",
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"public void setFont(Font newFont) {\n\tfont = newFont;\n }",
"public void setFont(Font font)\n {\n this.font = font;\n }",
"public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}",
"public native void setFont(Font value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.font = [email protected]::getJsObj()();\n }-*/;",
"public void setTypeLabel(String typeLabel) {\r\n this.typeLabelText = typeLabel;\r\n this.typeLabel.setText(this.typeLabelText);\r\n }",
"public void setFont(Font fnt) {\n\t\tborder.setTitleFont(fnt);\n\t}",
"public void setFont(BitmapFont font) {\n\t\tthis.font = font;\n\t\tthis.setLabel(this.label);\n\t}",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public void setTextFont(Font font)\n {\n setFont(font);\n }",
"public void setFont(Font font) {\n\tthis.font = font;\n }",
"public void setFont(Font newFont) {\r\n\t\tfont = newFont;\r\n\t}",
"public void setTamilText(TextView textName, int id) {\r\n if (GlobalAppState.language.equalsIgnoreCase(\"hi\")) {\r\n Typeface tfBamini = Typeface.createFromAsset(ct.getAssets(), \"fonts/Bamini.ttf\");\r\n textName.setTypeface(tfBamini, Typeface.BOLD);\r\n textName.setText(TamilUtil.convertToTamil(TamilUtil.BAMINI, ct.getString(id)));\r\n } else {\r\n textName.setText(ct.getString(id));\r\n }\r\n }",
"private void initFontAndChange(Context context) {\n changeFont(context);\n }",
"void setLabel(String label);",
"public Typeface getTypeface() {\n return mTypeface;\n }",
"public void setFont(String str) {\n if (Strings.notEmpty(str)) {\n Typeface typeface = FontUtils.getTypeface(this.textView.getContext(), str);\n if (typeface != null) {\n this.textView.setTypeface(typeface);\n }\n }\n }",
"private void setStringTypeFace(String s, Typeface font,MenuItem menuItem) {\n\t\tSpannableString mNewTitle = new SpannableString(s);\n mNewTitle.setSpan(new CustomTypefaceSpan(\"\", font), 0, mNewTitle.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);\n menuItem.setTitle(mNewTitle);\n\t}",
"public void setFont(int fontId){\n this.fontId = fontId;\n }",
"void setRendererType(String rendererType);",
"void setLabel(Label label);",
"public void setFont( Font font ) {\r\n this.font = font;\r\n }",
"private void setHeaderText()\n {\n AssetManager am = getApplicationContext().getAssets();\n typeface = Typeface.createFromAsset(am,\n String.format(Locale.US, \"fonts/%s\", \"ConcursoItalian_BTN.ttf\"));\n headerText = (TextView) findViewById(R.id.headerText);\n headerSubText = (TextView) findViewById(R.id.headerSubText);\n headerText.setTypeface(typeface);\n headerSubText.setTypeface(typeface);\n }",
"public void setFontStyle(TextView textObject) {\n textObject.setTypeface(mFontStyle);\n }",
"public void setLabelText(String text);",
"public static final Typeface getTypeface(Context context) {\n if (typeface == null) {\n try {\n typeface = Typeface.createFromFile(resourceToFile(context, TTF_FILE));\n } catch (IOException e) {\n return null;\n }\n }\n return typeface;\n }",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n\n super.onCreate(savedInstanceState);\n\n\n mTfRegular = Typeface.createFromAsset(getAssets(), \"OpenSans-Regular.ttf\");\n mTfLight = Typeface.createFromAsset(getAssets(), \"OpenSans-Light.ttf\");\n\n\n }",
"private static Typeface createTypeface(int style) {\n for (String family : FAMILIES) {\n Typeface tf = Typeface.create(family, style);\n if (tf.getStyle() == style) {\n return tf;\n }\n }\n return null;\n }",
"public void setFont(String key, Font value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.getName() + \" \" + value.getSize() + \" \" + value.getStyle());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}",
"private void setFont(Element config) {\r\n\t\tList noeudFils = null;\r\n\t\tElement elementCourant;\r\n\r\n\t\t// Verifier le parametre\r\n\t\t//\r\n\t\tif (config == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Verifier la presence de la cle\r\n\t\t//\r\n\t\tif (config.getChild(\"Police\") == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Recuperer le noeud fils\r\n\t\t//\r\n\t\tnoeudFils = config.getChildren(\"Police\");\r\n\t\tif (noeudFils == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telementCourant = (Element) noeudFils.iterator().next();\r\n\r\n\t\t// Verifier la presence des elements\r\n\t\t//\r\n\t\tif (elementCourant.getChild(\"Famille\") == null || elementCourant.getChild(\"Style\") == null || elementCourant.getChild(\"Taille\") == null)\r\n\t\t\treturn;\r\n\r\n\t\t// Recuperer les valeurs associees\r\n\t\t//\r\n\t\tString Famille = elementCourant.getChild(\"Famille\").getTextTrim();\r\n\t\tString Style = elementCourant.getChild(\"Style\").getTextTrim();\r\n\t\tString Taille = elementCourant.getChild(\"Taille\").getTextTrim();\r\n\r\n\t\t// Creer la nouvelle font\r\n\t\t//\r\n\t\tFont f = new Font(Famille, XML.obtenirStyleFont(Style), (int) Integer.valueOf(Taille).intValue());\r\n\t\tif (f == null)\r\n\t\t\treturn;\r\n\r\n\t\t// Affecter la nouvelle font\r\n\t\t//\r\n\t\tif (zoneAffichage != null)\r\n\t\t\tzoneAffichage.setFont(f);\r\n\t\telse if (list != null)\r\n\t\t\tlist.setFont(f);\r\n\t}",
"public static void registerTypeface(@NonNull Typeface typeface, @Nullable Object tag) {\n checkNotNull(typeface, \"typeface\");\n\n synchronized (TypefaceManager.class) {\n checkArgument(!typefaces.contains(typeface), \"This typeface is already registered\");\n\n if (tag != null) {\n checkArgument(!tags.containsKey(tag), \"This tag is already taken\");\n\n tags.put(tag, typeface);\n typeface.tag = tag;\n }\n\n sorted = false;\n typefaces.add(typeface);\n }\n }",
"public void initializeText(){\n\t\tfont = new BitmapFont();\n\t\tfont1 = new BitmapFont();\n\t\tfont1.setColor(Color.BLUE);\n\t\tfont2 = new BitmapFont();\n\t\tfont2.setColor(Color.BLACK);\n\t}",
"private void setLabelsOperationType() {\n\n\t\tif (dialogType == DialogType.NO_CONTACT_SELECTED) {\n\t\t\talertDialogImage = R.drawable.ic_stat_info;\n\t\t\ttitle = R.string.label_title_info;\n\t\t\tmessage = R.string.alert_no_contact_selected;\n\t\t} else if (dialogType == DialogType.NO_CALL_LOG_SELECTED){\n\t\t\talertDialogImage = R.drawable.ic_stat_info;\n\t\t\ttitle = R.string.label_title_info;\n\t\t\tmessage = R.string.alert_no_call_log_selected;\n\t\t}\n\t}",
"public void setFont(Font font)\r\n\t{\r\n\t\t_g2.setFont(font);\r\n\t}",
"public void m4448a(WeakReference<TextView> textViewWeak, Typeface typeface) {\n if (this.f2978i) {\n this.f2977h = typeface;\n TextView textView = (TextView) textViewWeak.get();\n if (textView != null) {\n textView.setTypeface(typeface, this.f2976g);\n }\n }\n }",
"public Font getLabelFont();",
"private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }",
"public void\nsetNewLabel(Font font)\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(), lineLength,\n\t\tColor.black, this.getID());\n}",
"public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }",
"void setFontSize(float fontSize)\r\n\t{\r\n\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\tif (fontIndex != -1)\r\n\t\t{\r\n\t\t\tappearanceTokens.set(fontIndex - 1, new COSFloat(fontSize));\r\n\t\t}\r\n\t}",
"public void setFont(AWTFont font) {\r\n\t\trenderer = createRendererFromAWTFont(font);\r\n\t\tthis.font = font;\r\n\t\tupdateValues();\r\n\t}",
"public void set_fonts(Graphics2D g2, float scale) {\n if ( XHSIPreferences.get_instance().get_bold_fonts() ) {\n this.font_statusbar = new Font(\"Verdana\", Font.PLAIN, 9);\n this.font_tiny = new Font( \"Verdana\", Font.BOLD, 10);\n this.font_small = new Font( \"Verdana\", Font.BOLD, 12);\n this.font_medium = new Font( \"Verdana\", Font.BOLD, 16);\n this.font_large = new Font( \"Verdana\", Font.PLAIN, 24);\n this.font_zl = new Font( \"Verdana\", Font.PLAIN, Math.round(64.0f * scale));\n this.font_yl = new Font( \"Verdana\", Font.PLAIN, Math.round(32.0f * scale));\n this.font_xxl = new Font( \"Verdana\", Font.BOLD, Math.round(24.0f * scale));\n this.font_xl = new Font( \"Verdana\", Font.BOLD, Math.round(21.0f * scale));\n this.font_l = new Font( \"Verdana\", Font.BOLD, Math.round(18.0f * scale));\n this.font_m = new Font( \"Verdana\", Font.BOLD, Math.round(16.0f * scale));\n this.font_s = new Font( \"Verdana\", Font.BOLD, Math.round(14.0f * scale));\n this.font_xs = new Font( \"Verdana\", Font.BOLD, Math.round(12.0f * scale));\n this.font_xxs = new Font( \"Verdana\", Font.BOLD, Math.round(10.0f * scale));\n this.font_normal = new Font( \"Verdana\", Font.BOLD, Math.round(14.0f * scale));\n } else {\n this.font_statusbar = new Font(\"Verdana\", Font.PLAIN, 9);\n this.font_tiny = new Font( \"Verdana\", Font.PLAIN, 10);\n this.font_small = new Font( \"Verdana\", Font.PLAIN, 12);\n this.font_medium = new Font( \"Verdana\", Font.PLAIN, 16);\n this.font_large = new Font( \"Verdana\", Font.PLAIN, 24);\n this.font_zl = new Font( \"Verdana\", Font.PLAIN, Math.round(64.0f * scale));\n this.font_yl = new Font( \"Verdana\", Font.PLAIN, Math.round(32.0f * scale));\n this.font_xxl = new Font( \"Verdana\", Font.PLAIN, Math.round(24.0f * scale));\n this.font_xl = new Font( \"Verdana\", Font.PLAIN, Math.round(21.0f * scale));\n this.font_l = new Font( \"Verdana\", Font.PLAIN, Math.round(18.0f * scale));\n this.font_m = new Font( \"Verdana\", Font.PLAIN, Math.round(16.0f * scale));\n this.font_s = new Font( \"Verdana\", Font.PLAIN, Math.round(14.0f * scale));\n this.font_xs = new Font( \"Verdana\", Font.PLAIN, Math.round(12.0f * scale));\n this.font_xxs = new Font( \"Verdana\", Font.PLAIN, Math.round(10.0f * scale));\n this.font_normal = new Font( \"Verdana\", Font.PLAIN, Math.round(14.0f * scale));\n }\n\n // calculate font metrics\n // W is probably the largest characher...\n FontMetrics fm;\n\n fm = g2.getFontMetrics(this.font_large);\n this.line_height_large = fm.getAscent();\n this.max_char_advance_large = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_large = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_medium);\n this.line_height_medium = fm.getAscent();\n this.max_char_advance_medium = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_medium = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_small);\n this.line_height_small = fm.getAscent();\n this.max_char_advance_small = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_small = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_tiny);\n this.line_height_tiny = fm.getAscent();\n this.max_char_advance_tiny = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_tiny = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_zl);\n this.line_height_zl = fm.getAscent();\n this.max_char_advance_zl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_zl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_yl);\n this.line_height_yl = fm.getAscent();\n this.max_char_advance_yl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_yl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xxl);\n this.line_height_xxl = fm.getAscent();\n this.max_char_advance_xxl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xxl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xl);\n this.line_height_xl = fm.getAscent();\n this.max_char_advance_xl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_l);\n this.line_height_l = fm.getAscent();\n this.max_char_advance_l = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_l = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_m);\n this.line_height_m = fm.getAscent();\n this.max_char_advance_m = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_m = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_s);\n this.line_height_s = fm.getAscent();\n this.max_char_advance_s = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_s = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xs);\n this.line_height_xs = fm.getAscent();\n this.max_char_advance_xs = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xs = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xxs);\n this.line_height_xxs = fm.getAscent();\n this.max_char_advance_xxs = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xxs = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_normal);\n this.line_height_normal = fm.getAscent();\n this.max_char_advance_normal = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_normal = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n }",
"private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}",
"public void setFontNameText( String text )\r\n\t{\r\n\t\t// set the text in the Font Name text field as per the String passed in\r\n\t\tfontNameTextField.setText( text );\r\n\t}",
"public LabelBuilder setFontFamily(String fontFamily) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setFamily(fontFamily);\n\t\treturn this;\n\t}",
"public Fuentes () {\n File filearcade = new File (RUTA_ARCADE_FONT);\n File filechess = new File (RUTA_CHESS_FONT);\n File fileinvaders = new File (RUTA_INVADERS_FONT);\n File filesafety = new File (RUTA_SAFETY_FONT);\n\n try {\n setArcadeFont (Font.createFont (Font.TRUETYPE_FONT, filearcade));\n setChessFont (Font.createFont (Font.TRUETYPE_FONT, filechess));\n setInvadersFont (Font.createFont (Font.TRUETYPE_FONT, fileinvaders));\n setSafetyFont (Font.createFont (Font.TRUETYPE_FONT, filesafety));\n\n } catch (FontFormatException | IOException e) {\n e.printStackTrace ();\n }\n }",
"void setTypeOfFacet(TypeOfFacet typeOfFacet);",
"private void updateFontSet() {\n if (!isBigFontSet()) {\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), null);\n } else {\n// <snip> Install sscaled font\n FontPolicy windowsPolicy = FontPolicies.getDefaultWindowsPolicy();\n FontSet fontSet = windowsPolicy.getFontSet(null, UIManager\n .getLookAndFeelDefaults());\n WrapperFontSet scaled = new WrapperFontSet(fontSet, 5);\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), scaled);\n// </snip>\n }\n updateLookAndFeel();\n }",
"void setFontScale(\n float s);",
"private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void m3382a(int i, int i2) {\n switch (i) {\n case 1:\n i = Typeface.SANS_SERIF;\n break;\n case 2:\n i = Typeface.SERIF;\n break;\n case 3:\n i = Typeface.MONOSPACE;\n break;\n default:\n i = 0;\n break;\n }\n setSwitchTypeface(i, i2);\n }",
"@Override\n public void setLabel(String arg0)\n {\n \n }",
"public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }",
"@SuppressWarnings(\"unchecked\")\n public TF addFont() {\n final ParameterizedType pt = (ParameterizedType) getClass()\n .getGenericSuperclass();\n final ParameterizedType paramType = (ParameterizedType) pt\n .getActualTypeArguments()[2];\n final Class<TF> fontClass = (Class<TF>) paramType.getRawType();\n try {\n final Constructor<TF> c = fontClass\n .getDeclaredConstructor(ACellStyle.class);\n return c.newInstance(this);\n }\n catch (final Exception e) {\n throw new ReportBuilderException(e);\n }\n }",
"public void setCurrentRTTFace(final Face currentRTTFace) { _currentRTTFace = currentRTTFace; }",
"public void setStem (Glyph stem)\r\n {\r\n this.stem = stem;\r\n }",
"private void setUpNutritionLabel(Label l1, String color, String text){\n l1.setText(text);\n l1.setTextFill(Paint.valueOf(color));\n l1.setFont(InterfaceStyling.systemFont);\n }",
"@Override\n public void setFont(String font) {\n graphicsEnvironmentImpl.setFont(canvas, font);\n }",
"public void setFont(Font font) {\n this.font = font;\r\n repaint();\r\n }",
"public Handler(Font f)\n {\n font_var=f; //sets font as font button selected\n }",
"public void setFileType(java.lang.String value) {\r\n\t\tBase.set(this.model, this.getResource(), FILETYPE, value);\r\n\t}",
"public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;",
"public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }",
"public void setLabels() {\n setTimeLabel();\n setDayLabel();\n setDateLabel();\n //setImage();\n }",
"public void setTypefaceLineNumber(Typeface typefaceLineNumber) {\n if(typefaceLineNumber == null){\n typefaceLineNumber = Typeface.MONOSPACE;\n }\n this.mTypefaceLineNumber = typefaceLineNumber;\n invalidate();\n }",
"public void init( )\n {\n metFont = new HersheyFont( getDocumentBase(), getParameter(\"font\"));\n }",
"public void setFont(ViewGroup group, Typeface font) {\n\t\tint count = group.getChildCount();\n\t\tView v;\n\t\tfor (int i = 0; i < count; i++) {\n\t\t\tv = group.getChildAt(i);\n\t\t\tif (v instanceof TextView || v instanceof EditText || v instanceof Button) {\n\t\t\t\t((TextView) v).setTypeface(font);\n\t\t\t} else if (v instanceof ViewGroup)\n\t\t\t\tsetFont((ViewGroup) v, font);\n\t\t}\n\t}"
] | [
"0.77965647",
"0.70971096",
"0.6989721",
"0.68470967",
"0.67144614",
"0.66753364",
"0.66367203",
"0.662718",
"0.650125",
"0.6499778",
"0.6419449",
"0.6395931",
"0.6368902",
"0.6365655",
"0.63592136",
"0.6220899",
"0.6200417",
"0.61811113",
"0.6148758",
"0.6116937",
"0.6094486",
"0.60882336",
"0.6010476",
"0.59928334",
"0.5974992",
"0.59731984",
"0.59536815",
"0.59041137",
"0.5903745",
"0.58929116",
"0.58893645",
"0.5880763",
"0.58780724",
"0.57997245",
"0.5792429",
"0.5782984",
"0.5775538",
"0.5764496",
"0.57636476",
"0.57269704",
"0.5705089",
"0.56858397",
"0.5670188",
"0.56406325",
"0.5639938",
"0.56194985",
"0.56182224",
"0.5611735",
"0.5606706",
"0.5597405",
"0.5578701",
"0.55776876",
"0.55635023",
"0.5560347",
"0.55352134",
"0.5530553",
"0.5488966",
"0.5472419",
"0.5463195",
"0.54406404",
"0.54179746",
"0.5413017",
"0.54067624",
"0.53766006",
"0.53765833",
"0.53741777",
"0.5371301",
"0.5370659",
"0.53691924",
"0.53592944",
"0.53546757",
"0.5333534",
"0.5328845",
"0.53222793",
"0.5317655",
"0.5317509",
"0.53166735",
"0.5314622",
"0.5297351",
"0.5288623",
"0.5282898",
"0.5282285",
"0.5269984",
"0.5269066",
"0.52596116",
"0.5258425",
"0.5236792",
"0.52358097",
"0.52351975",
"0.52295756",
"0.5229036",
"0.5224954",
"0.52182204",
"0.5214568",
"0.52082914",
"0.51884705",
"0.5179996",
"0.5173417",
"0.5172115",
"0.51719695"
] | 0.7038403 | 2 |
sets the size of the label text in pixels min = 6f, max = 24f, default 10f | public void setTextSize(float size) {
if (size > 24f)
size = 24f;
if (size < 6f)
size = 6f;
mTextSize = Utils.convertDpToPixel(size);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLabelTextSize(){\n return labelTextSize;\n }",
"public void setLabelSize(int labelSize)\n {\n myLabelSize = labelSize;\n }",
"public void setLabelFont(int fontSize){\n Font labelFont = new Font(\"Serif\", Font.PLAIN, fontSize);\n minLabel.setFont(labelFont);\n medLabel.setFont(labelFont);\n maxLabel.setFont(labelFont);\n emptyLabel.setFont(labelFont);\n errorLabel.setFont(labelFont);\n }",
"public void setLabelTextSize(float labelTextSizeSp) {\n chassisView.setLabelTextSize(labelTextSizeSp);\n }",
"public void setTextSizePx(float size) {\n mPaint.setTextSize(size);\n mSpaceWidth = mPaint.measureText(\" \");\n invalidate();\n }",
"public void setTextSize(float textSize){\n Context context = getContext();\n Resources res;\n\n if(context == null){\n res = Resources.getSystem();\n }else{\n res = context.getResources();\n }\n\n setTextSizePx(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, textSize, res.getDisplayMetrics()));\n }",
"private void setDefaultTextSize() {\n this.text_size = (int) default_text_size;\n }",
"public void setLabelFont(Font f);",
"public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}",
"public void setSizeLabel(String value) {\n setAttributeInternal(SIZELABEL, value);\n }",
"public ModernAutoSizeLabel(String text, Dimension size) {\r\n super(text, size);\r\n }",
"public ModernAutoSizeLabel(String text, int width) {\r\n super(text, width);\r\n }",
"public void setLblWidth(int width) {\n lblWidth = width;\n }",
"public ModernAutoSizeLabel(String text) {\r\n super(text, TEXT_COLOR);\r\n }",
"public void setTextLabelFontSize(int mTextLabelFontSize) {\n\t\tthis.mTextLabelFontSize = mTextLabelFontSize;\n\t}",
"public ModernAutoSizeLabel(String text, Font font) {\r\n super(text, font);\r\n }",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"private void setupTextSize()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tthis.mTextSize = (int) res.getDimension(R.dimen.tsz_main);\n\t}",
"public FontLabel(String text) {\n super(text, JLabel.CENTER);\n setBackground(Color.white);\n setForeground(Color.black);\n setOpaque(true);\n setBorder(new LineBorder(Color.black));\n setPreferredSize(new Dimension(120, 40));\n }",
"public int getTextLabelFontSize() {\n\t\treturn mTextLabelFontSize;\n\t}",
"public void changedisplayLengthLabel() {\n\t\taffectiveGraphPlot.changedisplayLengthLabel();\n\t}",
"public int getLabelSize()\n {\n return myLabelSize;\n }",
"public LabelBuilder setFontSize(int size) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setSize(size);\n\t\treturn this;\n\n\t}",
"private void setPrefSizeForText()\n {\n double prefW = getSuggestedPrefWidth();\n double prefH = _textArea.getPrefHeight();\n setPrefSize(prefW, prefH);\n }",
"public void setTextSize(float textSize) {\n mTextContainer.setTextSize(textSize);\n }",
"public void setTextSize() {\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n }",
"public void setFront_label_size(int size) {\n\t\tfront_label_size = size;\n\t}",
"public int getLblWidth() {\n return lblWidth;\n }",
"public float getTextSizePx() {\n return mPaint.getTextSize();\n }",
"void setLabelString() {\n int pad = 5; // fudge to make up for variable width fonts\n float maxVal = Math.max(Math.abs(min), Math.abs(max));\n intDigits = Math.round((float) (Math.log(maxVal) / Math.log(10))) + pad;\n if (min < 0) {\n intDigits++; // add one for the '-'\n }\n // fractDigits is num digits of resolution for fraction. Use base 10 log\n // of scale, rounded up, + 2.\n fractDigits = (int) Math.ceil((Math.log(scale) / Math.log(10)));\n nf.setMinimumFractionDigits(fractDigits);\n nf.setMaximumFractionDigits(fractDigits);\n String value = nf.format(current);\n while (value.length() < (intDigits + fractDigits)) {\n value = value + \" \";\n }\n valueLabel.setText(value);\n }",
"private int getFontSize(LabelGeometry geom)\r\n {\r\n float fontSize = AWTUtilities.getFontSize(geom.getRenderProperties().getFont());\r\n\r\n // Scale based on the view\r\n Function<Kilometers, Float> scaleFunction = geom.getRenderProperties().getScaleFunction();\r\n if (scaleFunction != null)\r\n {\r\n float viewScale = scaleFunction.apply(myViewAltitudeSupplier.get()).floatValue();\r\n fontSize *= viewScale;\r\n }\r\n\r\n return Math.round(fontSize);\r\n }",
"public void setNodeLabelFont(Font value) {\n nodeLabelfont = value;\n }",
"private void setRawTextSize(float f) {\n if (f != this.mTextView.getPaint().getTextSize()) {\n this.mTextView.getPaint().setTextSize(f);\n boolean bl = false;\n if (Build.VERSION.SDK_INT >= 18) {\n bl = this.mTextView.isInLayout();\n }\n if (this.mTextView.getLayout() != null) {\n this.mNeedsAutoSizeText = false;\n try {\n Method method = this.getTextViewMethod(\"nullLayouts\");\n if (method != null) {\n method.invoke((Object)this.mTextView, new Object[0]);\n }\n }\n catch (Exception exception) {\n Log.w((String)\"ACTVAutoSizeHelper\", (String)\"Failed to invoke TextView#nullLayouts() method\", (Throwable)exception);\n }\n if (!bl) {\n this.mTextView.requestLayout();\n } else {\n this.mTextView.forceLayout();\n }\n this.mTextView.invalidate();\n }\n }\n }",
"public float getFontSize();",
"public ModernAutoSizeLabel() {\r\n this(TextUtils.EMPTY_STRING);\r\n }",
"public void setTitleFontSize(int size) {\n\t\tthis.title_fontsize = size;\n\t}",
"private void initLrcFontSize() {\n int screeHeight=getResources().getDisplayMetrics().heightPixels;\n int marginLeft=(int)(1.0*screeHeight/9);\n LrcView.defaultTextSize=DensityUtil.px2sp(this, (marginLeft));//设置默认的歌词大小\n LrcView.defaultDividerHeight=marginLeft/2;\n }",
"public Dimension getPreferredSize() {\n\t\tif (getFont() != null) {\n\t\t\tFontMetrics fm = getFontMetrics(getFont());\n\n\t\t\treturn new Dimension(fm.stringWidth(label), fm.getHeight() + 10);\n\t\t} else\n\n\t\t\treturn new Dimension(10, 10); //no font\n\t}",
"private void rescaleLabels() {\n // TJJ Nov 2018 - make sure labels scale correct on any changes\n // to the ring display\n ViewManager vm = getViewManager();\n rangeRings.setLabelSize(vm.getMaster().getDisplayScale());\n }",
"public int getFontSize();",
"void setFontScale(\n float s);",
"private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}",
"public void setProgressTextSize(int size){\n mProgressTextSize = Utils.sp2px(mContext, size);\n refreshTheView();\n }",
"public float getTextSize() {\n return mTextSize;\n }",
"public void setExampleDimension(float exampleDimension) {\n mTextSize = exampleDimension;\n invalidateTextPaintAndMeasurements();\n }",
"public int getWidth() {\r\n if ( fontMetrics != null && lbl != null ) {\r\n return fontMetrics.stringWidth(lbl) + 12; \r\n } else {\r\n return 10;\r\n }\r\n }",
"private Label createScoreFloatLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"\"+Math.round(playerInput.gameScore),textStyle);\n text.setFontScale(2f*scale,2f*scale);\n text.setAlignment(Align.center);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.60f);\n return text;\n }",
"public IconBuilder fontSize(int size) {\n\t\tthis.fixedFontSize = size;\n\t\treturn this;\n\t}",
"private void updateLabelText() {\n /*\n r18 = this;\n android.view.View r13 = r18.getNativeView()\n android.widget.TextView r13 = (android.widget.TextView) r13\n if (r13 != 0) goto L_0x0009\n L_0x0008:\n return\n L_0x0009:\n boolean r7 = r18.isSingleLine()\n r0 = r18\n float r0 = r0.minimumFontSizeInPixels\n r16 = r0\n r17 = 1036831949(0x3dcccccd, float:0.1)\n int r16 = (r16 > r17 ? 1 : (r16 == r17 ? 0 : -1))\n if (r16 < 0) goto L_0x00f6\n r3 = 1\n L_0x001b:\n r8 = r3\n r13.setSingleLine(r7)\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x00f9\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n r13.setLines(r0)\n L_0x0032:\n if (r7 == 0) goto L_0x0102\n r16 = 1\n r0 = r16\n r13.setMaxLines(r0)\n L_0x003b:\n r0 = r18\n java.lang.CharSequence r11 = r0.originalText\n if (r11 != 0) goto L_0x0135\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n java.lang.String r16 = \"\"\n r0 = r16\n r11.<init>(r0)\n r12 = r11\n L_0x004b:\n if (r8 == 0) goto L_0x0132\n int r16 = r12.length()\n if (r16 <= 0) goto L_0x0132\n r2 = 0\n L_0x0054:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x006c\n char r10 = r12.charAt(r2)\n r16 = 13\n r0 = r16\n if (r10 == r0) goto L_0x006c\n r16 = 10\n r0 = r16\n if (r10 != r0) goto L_0x012b\n L_0x006c:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x0132\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n r16 = 0\n r0 = r16\n r11.<init>(r12, r0, r2)\n L_0x007d:\n boolean r0 = r11 instanceof android.text.Spannable\n r16 = r0\n if (r16 != 0) goto L_0x0089\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r11)\n r11 = r12\n L_0x0089:\n r1 = 0\n r0 = r18\n int r0 = r0.autoLinkFlags\n r16 = r0\n if (r16 == 0) goto L_0x00a0\n r16 = r11\n android.text.Spannable r16 = (android.text.Spannable) r16\n r0 = r18\n int r0 = r0.autoLinkFlags\n r17 = r0\n boolean r1 = android.text.util.Linkify.addLinks(r16, r17)\n L_0x00a0:\n if (r1 == 0) goto L_0x012f\n android.text.method.MovementMethod r9 = android.text.method.LinkMovementMethod.getInstance()\n L_0x00a6:\n android.text.method.MovementMethod r16 = r13.getMovementMethod()\n r0 = r16\n if (r9 == r0) goto L_0x00c6\n boolean r5 = r13.isFocusable()\n boolean r4 = r13.isClickable()\n boolean r6 = r13.isLongClickable()\n r13.setMovementMethod(r9)\n r13.setFocusable(r5)\n r13.setClickable(r4)\n r13.setLongClickable(r6)\n L_0x00c6:\n r0 = r18\n android.text.TextUtils$TruncateAt r14 = r0.ellipsize\n if (r9 == 0) goto L_0x00da\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n if (r14 == r0) goto L_0x00d8\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n if (r14 != r0) goto L_0x00da\n L_0x00d8:\n android.text.TextUtils$TruncateAt r14 = android.text.TextUtils.TruncateAt.END\n L_0x00da:\n r13.setEllipsize(r14)\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n if (r14 != r0) goto L_0x00ea\n r16 = 1\n r0 = r16\n r13.setSelected(r0)\n L_0x00ea:\n android.widget.TextView$BufferType r16 = android.widget.TextView.BufferType.NORMAL\n r0 = r16\n r13.setText(r11, r0)\n r13.requestLayout()\n goto L_0x0008\n L_0x00f6:\n r3 = 0\n goto L_0x001b\n L_0x00f9:\n r16 = 0\n r0 = r16\n r13.setMinLines(r0)\n goto L_0x0032\n L_0x0102:\n r0 = r18\n int r0 = r0.maxLines\n r16 = r0\n if (r16 <= 0) goto L_0x0129\n r0 = r18\n int r15 = r0.maxLines\n L_0x010e:\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x0124\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n if (r15 <= r0) goto L_0x0124\n r0 = r18\n int r15 = r0.viewHeightInLines\n L_0x0124:\n r13.setMaxLines(r15)\n goto L_0x003b\n L_0x0129:\n r15 = 1\n goto L_0x010e\n L_0x012b:\n int r2 = r2 + 1\n goto L_0x0054\n L_0x012f:\n r9 = 0\n goto L_0x00a6\n L_0x0132:\n r11 = r12\n goto L_0x007d\n L_0x0135:\n r12 = r11\n goto L_0x004b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.updateLabelText():void\");\n }",
"public void setFontSize(float fontSize){\n this.fontSize = fontSize;\n }",
"public void setLblSpacing(double value) {\n lblSpacing = value;\n }",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"public void setHightlightedTextSize(Float size) {\n\n if (size > 24f)\n size = 24f;\n if (size < 6f)\n size = 6f;\n\n mHightlightedTextSize = Utils.convertDpToPixel(size);\n\n }",
"void drawLabel(){\n FreeTypeFontGenerator generator = new FreeTypeFontGenerator(Gdx.files.internal(\"Rubik-Regular.ttf\"));\n FreeTypeFontGenerator.FreeTypeFontParameter parameter = new FreeTypeFontGenerator.FreeTypeFontParameter();\n parameter.size = 25;\n parameter.color = Color.BLACK;\n BitmapFont font2 = generator.generateFont(parameter);\n\n font2.getData().setScale(FONT_SCALE);\n\n font2.draw(game.getBatch(), \"Please insert the IP Address\\n you see on you partner's screen\", 50, 600);\n }",
"public ModernAutoSizeLabel(String text, Color color) {\r\n super(text, color);\r\n }",
"public void setFontSize(float fs) {\n\t\tif (fs != fontSize) {\n\t\t\tfontSize = fs;\n\t\t\treload();\n\t\t}\n\t}",
"public int getFontSize()\n \t{\n \t\treturn 13;\n \t}",
"public void setDisplayFont(int size){\n\t\tscreen.setFont(new Font(\"Serif\",Font.BOLD,size));\r\n\t}",
"public Font getLabelFont();",
"public void setFontSizeText( String text )\r\n\t{\r\n\t\t// set the text in the Font Size text field as per the String passed in\r\n\t\tfontSizeTextField.setText( text );\r\n\t}",
"private void setFontSize(float newFontSize) {\n\t\tfontSize = newFontSize;\n\t\tproperties.setProperty(\"fontSize\", Float.toString(newFontSize));\n\n\t\t// update all text-based components\n\t\tfor (Component c : components)\n\t\t\tc.setFont(c.getFont().deriveFont(newFontSize));\n\t\t\n\t\t// update machine graphics\n\t\tupdate(); \n\t}",
"public void setSizePlayingFields()\r\n {\n setPreferredSize(new Dimension(109*8,72*8));//powieżchnia o 2 m z każdej strony większa niz boisko 106 i 69 pomnożone o 8\r\n //większe boisko żeby było widać\r\n setMaximumSize(getMaximumSize());\r\n setBackground(Color.green);\r\n }",
"private static void setTextSizeForWidth(Paint paint, String text, float desiredWidth) {\n\n // Pick a reasonably large value for the test. Larger values produce\n // more accurate results, but may cause problems with hardware\n // acceleration. But there are workarounds for that, too; refer to\n // http://stackoverflow.com/questions/6253528/font-size-too-large-to-fit-in-cache\n final float defaultTextSize = 44f;\n paint.setTextSize(defaultTextSize);\n Rect textBounds = new Rect();\n paint.getTextBounds(text, 0, text.length(), textBounds);\n // Calculate the desired size as a proportion of our testTextSize.\n if (textBounds.width() > desiredWidth) {\n float desiredTextSize = defaultTextSize * (desiredWidth / textBounds.width());\n\n // Set the paint for that size.\n paint.setTextSize(desiredTextSize);\n }\n\n }",
"private static void loadTextSizes(Context context)\n\t{\n\t\tDisplayMetrics metrics = context.getResources().getDisplayMetrics();\n\t\tTEXT_SIZE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14, metrics);\n\t\tTEXT_SIZE_BIG = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, metrics);\n\t\tPADDING = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, metrics);\n\t\tTEXT_SPACE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150, metrics);\n\t}",
"private LabelLayout labelBounds(Font drawFont, FontRenderContext frc, String txt)\r\n {\r\n String[] lines = txt.split(\"\\\\n\");\r\n double maxW = 0.0;\r\n double maxH = 0.0;\r\n for (String ln : lines)\r\n {\r\n Rectangle2D r = drawFont.createGlyphVector(frc, ln).getLogicalBounds();\r\n maxW = Math.max(maxW, r.getWidth());\r\n maxH = Math.max(maxH, r.getHeight());\r\n }\r\n LabelLayout lay = new LabelLayout();\r\n lay.lineH = maxH;\r\n lay.rect = new Rectangle2D.Double(0.0, 0.0, maxW, maxH * lines.length);\r\n return lay;\r\n }",
"public MyJLabel() {\n super(\" \");\n this.setOpaque(true);\n this.setPreferredSize(new Dimension(10,10));\n }",
"public int fontSize() {\n\t\treturn fixedFontSize;\n\t}",
"private int calculateFontSize(ImageProcessor processor, double ratioHeightForLabel) {\n // Converts sumSizes into the average size in each dimension\n sumSizes.scale(1.0 / labels.size());\n FontSizeCalculator calculator = new FontSizeCalculator(processor, labels.stream());\n return calculator.calculateOptimalFontSize(sumSizes, ratioHeightForLabel);\n }",
"public FontRenderer setSize(float size) {\n\t\tthis.size = size;\n\t\ttransform.setScale(size);\n\t\t\n\t\treturn this;\n\t}",
"public void setFontHeightInPoints(short height)\n {\n font.setFontHeight(( short ) (height * 20));\n }",
"public void setTextLength(short field_6_textLength)\n {\n this.field_6_textLength = field_6_textLength;\n }",
"public void\nsetNewLabel(Font font)\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(), lineLength,\n\t\tColor.black, this.getID());\n}",
"public void\nsetNewLabel()\nthrows Exception\n{\n\tdouble lineLength = this.getNucLabelLineLength();\n\tif (lineLength <= 0.0)\n\t\tlineLength = ComplexDefines.NUCLABEL_LINE_LENGTH;\n\tthis.setNewLabel(\n\t\tnew Font(\"Helvetica\", Font.PLAIN, 12),\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tlineLength, Color.black, this.getID());\n}",
"public void checkTextSize(){\n mShp = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n String textSize = mShp.getString(\n getString(R.string.pref_textSize_key),\n getString(R.string.pref_textSize_default)\n );\n float size = Float.parseFloat(textSize);\n mTaleText.setTextSize(TypedValue.COMPLEX_UNIT_SP,size);\n }",
"@Override\n public void changeFontSize(int i) {\n lyricsTV.setTextSize((float) i);\n PreferencesManager pm = PreferencesManager.getInstance();\n pm.setFontSize(i);\n }",
"private void setupLabelUI(Label l, String ff, double f, double w, Pos p, double x, double y) {\n\t\tl.setFont(Font.font(ff, f));\n\t\tl.setMinWidth(w);\n\t\tl.setAlignment(p);\n\t\tl.setLayoutX(x);\n\t\tl.setLayoutY(y);\n\t}",
"public String getSizeLabel() {\n return (String)getAttributeInternal(SIZELABEL);\n }",
"public double getLblSpacing() {\n return lblSpacing;\n }",
"public void setTextViewSize(float px) {\r\n\t\tfloat scaledDensity = getResources().getDisplayMetrics().scaledDensity;\r\n\t\tint sp = (int) (px / scaledDensity);\r\n\t\tsetTextSize(sp);\r\n\t}",
"private Label createScoreLabel(){\n Label text;\n Label.LabelStyle textStyle;\n BitmapFont font = new BitmapFont();\n\n textStyle = new Label.LabelStyle();\n textStyle.font = font;\n\n text = new Label(\"Score:\",textStyle);\n text.setAlignment(Align.center);\n text.setFontScale(2f*scale,2f*scale);\n text.setPosition(stage.getViewport().getCamera().viewportWidth * 0.5f,\n stage.getViewport().getCamera().viewportHeight * 0.70f);\n return text;\n }",
"public float getTextSize() {\n return mTextContainer.getTextSize();\n }",
"public int getSwitchTextSize(){\n return switchTextSize;\n }",
"public static void setDefaultTextSize(int defaultTextSize) {\n if (defaultTextSize < 0){\n throw new IllegalArgumentException(\"The text size must be >= 0\");\n }\n DEFAULT_TEXT_SIZE = defaultTextSize;\n }",
"private void createLabel(String title, int row, int col, int fontsize) {\n \tLabel label1 = new Label(title);\n \tlabel1.setFont(Font.font(myResources.getString(\"font\"), \n \t\t\tFontWeight.EXTRA_BOLD, FontPosture.ITALIC, fontsize));\n \tlabel1.setTextFill(Color.RED);\n \tstartScreen.add(label1, row, col);\n }",
"private javax.swing.JLabel getJLabel16() {\n\t\tif(jLabel16 == null) {\n\t\t\tjLabel16 = new javax.swing.JLabel();\n\t\t\tjLabel16.setText(\"A. Totales:\");\n\t\t\tjLabel16.setPreferredSize(new java.awt.Dimension(80,20));\n\t\t\tjLabel16.setVerticalAlignment(javax.swing.SwingConstants.CENTER);\n\t\t\t//jLabel12.setBorder(javax.swing.BorderFactory.createLineBorder(java.awt.Color.gray,1));\n\t\t\tjLabel16.setFocusable(false);\n\t\t}\n\t\treturn jLabel16;\n\t}",
"void setPaperSize(short size);",
"public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}",
"public Dimension getPreferredSize() {\r\n\t\t\r\n\t\t// Calculate the preferred size based on a monospaced font.\r\n\t\t// Get the font metrics\r\n\t\tFontMetrics fm = getFontMetrics(font);\r\n\t\tint charHeight = fm.getMaxAscent() + fm.getMaxDescent();\r\n\t\tint charWidth = fm.charWidth('0');\r\n\r\n\t\tint minHeight = YPAD + (2 * BORDERWIDTH) + height + charHeight;\r\n\t\tint minWidth = 2 * ((2 * charWidth) + labelDist);\r\n\r\n\t\treturn new Dimension(minWidth, minHeight);\r\n\t}",
"public void setSubtitleFontSize(int size) {\n\t\tthis.subtitle_fontsize = size;\n\t}",
"public int getMediumFontSize() {\n\t\treturn 10;\n\t}",
"public float getFontSize() {\n return fontSize;\n }",
"public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }",
"public void setNodeLabelMaxChar(Integer value) {\n nodeLabelMaxChar = value;\n shortenNodeLabels();\n }",
"public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }",
"public void setBounds(int x, int y, int width, int height) \n\t{\n\t\tsuper.setBounds(x, y, width, height);\n\t\tfm = getFontMetrics(getFont());\n\t\ttitleHeight = fm.getHeight();\n\t\tyLabelWidth = fm.stringWidth(yLabel);\n\t\txLabelHeight = fm.getHeight();\n\t\t\n\t\tlabelWidth = Math.max(fm.stringWidth(Integer.valueOf(min).toString()),\n\t\t\t\t\t\t\t\t\t\t\t\t\tfm.stringWidth(Integer.valueOf(max).toString())) + 2;\n\t\ttop = padding + titleHeight;\n\t\tbottom = getSize().height - padding - xLabelHeight - fm.getHeight();\n\t\tleft = padding + yLabelWidth;\n\t\tright = getSize().width - padding;\n\t}",
"private void updateLineHeight() {\n Text text = new Text(\"AM\");\n text.setFont(new Font(fontType, fontSize));\n lineHeight = round(text.getLayoutBounds().getHeight());\n }",
"public double getFontSize(\n )\n {return fontSize;}",
"public void\nsetNewLabel(Font font, double nucLineLength)\nthrows Exception\n{\n\tthis.setNewLabel(font,\n\t\tthis.getParentSSData2D().getNucLabelLineWidth(),\n\t\tnucLineLength, Color.black, this.getID());\n}",
"private JLabel makeQuestionText(String question){\n\t\tint textPadding = 4;\n\t\tJLabel label = new JLabel(\"<HTML><div>\" + question + \"</div><HTML>\", SwingConstants.CENTER);\n\t\tFont font;\n\t\ttry{\n\t\t\tfont = FontMaker.getFont(PREFERRED_FONT, 24);\n\t\t}catch(IndexOutOfBoundsException | IOException | FontFormatException e){\n\t\t\tfont = FontMaker.getDefaultFont(24);\n\t\t}\n\t\tlabel.setFont(font);\n\t\tlabel.setForeground(Color.WHITE);\n\n\t\tint textWidth = FontMaker.getStringWidth(label.getFont(), questionBox.getGraphics(), question);\n\t\tlabel.setSize(new Dimension((textWidth + textPadding), questionBox.getHeight()));\n\t\treturn label;\n\t}",
"public void setLabelScaling(float fLabelScaling) {\n\t\tthis.fLabelScaling = fLabelScaling;\n\t}"
] | [
"0.7710473",
"0.7697147",
"0.7487635",
"0.7274495",
"0.7236503",
"0.7119027",
"0.70893127",
"0.70416677",
"0.6958442",
"0.6952654",
"0.6932835",
"0.69057477",
"0.68945694",
"0.6868081",
"0.6864044",
"0.6822184",
"0.677116",
"0.6769819",
"0.6726045",
"0.67142624",
"0.6694155",
"0.6691448",
"0.66082436",
"0.65960884",
"0.65791076",
"0.6572041",
"0.65688807",
"0.65598196",
"0.644619",
"0.6443756",
"0.6405481",
"0.6382524",
"0.6366338",
"0.6334569",
"0.6299606",
"0.62917143",
"0.62705994",
"0.6241649",
"0.6224655",
"0.6211219",
"0.62030095",
"0.61727846",
"0.6159279",
"0.61547995",
"0.61396366",
"0.6139278",
"0.61376363",
"0.6121853",
"0.6118294",
"0.6096751",
"0.6065716",
"0.6052517",
"0.60511136",
"0.60412943",
"0.6033749",
"0.603281",
"0.60220015",
"0.60124564",
"0.6011995",
"0.60070163",
"0.5991953",
"0.59907883",
"0.5973359",
"0.59681636",
"0.5966316",
"0.59650093",
"0.59618163",
"0.595706",
"0.59476787",
"0.5943769",
"0.5942141",
"0.59197074",
"0.5912114",
"0.5903845",
"0.5900908",
"0.5892683",
"0.5891053",
"0.5883383",
"0.58811784",
"0.5873268",
"0.5863083",
"0.58553034",
"0.5850465",
"0.58228666",
"0.58157444",
"0.58091396",
"0.5785002",
"0.57849675",
"0.5782884",
"0.5764846",
"0.5737987",
"0.57373005",
"0.5732905",
"0.57290477",
"0.5718166",
"0.5718069",
"0.57161474",
"0.57116574",
"0.5696862",
"0.5693506"
] | 0.7582682 | 2 |
returns the text size that is currently set for the labels | public float getTextSize() {
return mTextSize;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLabelTextSize(){\n return labelTextSize;\n }",
"public int getTextLabelFontSize() {\n\t\treturn mTextLabelFontSize;\n\t}",
"public float getTextSizePx() {\n return mPaint.getTextSize();\n }",
"public int getLabelSize()\n {\n return myLabelSize;\n }",
"public float getTextSize() {\n return mTextContainer.getTextSize();\n }",
"public String getSizeLabel() {\n return (String)getAttributeInternal(SIZELABEL);\n }",
"public int getFontSize();",
"private int getFontSize(LabelGeometry geom)\r\n {\r\n float fontSize = AWTUtilities.getFontSize(geom.getRenderProperties().getFont());\r\n\r\n // Scale based on the view\r\n Function<Kilometers, Float> scaleFunction = geom.getRenderProperties().getScaleFunction();\r\n if (scaleFunction != null)\r\n {\r\n float viewScale = scaleFunction.apply(myViewAltitudeSupplier.get()).floatValue();\r\n fontSize *= viewScale;\r\n }\r\n\r\n return Math.round(fontSize);\r\n }",
"public float getFontSize();",
"public int getLblWidth() {\n return lblWidth;\n }",
"public String getFontSizeText()\r\n\t{\r\n\t\treturn fontSizeTextField.getText(); // return the text in the Font Size text field\r\n\t}",
"public Dimension getPreferredSize() {\n\t\tif (getFont() != null) {\n\t\t\tFontMetrics fm = getFontMetrics(getFont());\n\n\t\t\treturn new Dimension(fm.stringWidth(label), fm.getHeight() + 10);\n\t\t} else\n\n\t\t\treturn new Dimension(10, 10); //no font\n\t}",
"public int getButtonTextSize(){\n return buttonTextSize;\n }",
"public int fontSize() {\n\t\treturn fixedFontSize;\n\t}",
"public double getFontSize(\n )\n {return fontSize;}",
"public float getFontSize() {\n return fontSize;\n }",
"public String getFontSize () {\n\t\treturn fontSizeTextField.getText();\n\t}",
"public int getWidth() {\r\n if ( fontMetrics != null && lbl != null ) {\r\n return fontMetrics.stringWidth(lbl) + 12; \r\n } else {\r\n return 10;\r\n }\r\n }",
"public void setLabelSize(int labelSize)\n {\n myLabelSize = labelSize;\n }",
"public final int getFontSize() {\n return fontSize;\n }",
"public int getFontSize()\r\n {\r\n return myFontSize;\r\n }",
"public int getTitleFontSize() {\n\t\treturn this.title_fontsize;\n\t}",
"private int calculateFontSize(ImageProcessor processor, double ratioHeightForLabel) {\n // Converts sumSizes into the average size in each dimension\n sumSizes.scale(1.0 / labels.size());\n FontSizeCalculator calculator = new FontSizeCalculator(processor, labels.stream());\n return calculator.calculateOptimalFontSize(sumSizes, ratioHeightForLabel);\n }",
"public int getFontSize()\n \t{\n \t\treturn 13;\n \t}",
"public void setTextSize(float textSize){\n Context context = getContext();\n Resources res;\n\n if(context == null){\n res = Resources.getSystem();\n }else{\n res = context.getResources();\n }\n\n setTextSizePx(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, textSize, res.getDisplayMetrics()));\n }",
"public int getMyFontSize() {\n return myFont.size; /*Fault:: return 5; */\n }",
"public Float getHightlightedTextSize() {\n if (mHightlightedTextSize != null)\n return mHightlightedTextSize;\n return getTextSize();\n }",
"public int getSwitchTextSize(){\n return switchTextSize;\n }",
"public float getExampleDimension() {\n return mTextSize;\n }",
"private void setDefaultTextSize() {\n this.text_size = (int) default_text_size;\n }",
"public void setLabelTextSize(float labelTextSizeSp) {\n chassisView.setLabelTextSize(labelTextSizeSp);\n }",
"public String getSizeTextField(){\n\t\treturn textField.getText();\n\t}",
"public short getFontHeight()\n {\n return font.getFontHeight();\n }",
"public Dimension getPreferredSize() {\r\n\t\t\r\n\t\t// Calculate the preferred size based on a monospaced font.\r\n\t\t// Get the font metrics\r\n\t\tFontMetrics fm = getFontMetrics(font);\r\n\t\tint charHeight = fm.getMaxAscent() + fm.getMaxDescent();\r\n\t\tint charWidth = fm.charWidth('0');\r\n\r\n\t\tint minHeight = YPAD + (2 * BORDERWIDTH) + height + charHeight;\r\n\t\tint minWidth = 2 * ((2 * charWidth) + labelDist);\r\n\r\n\t\treturn new Dimension(minWidth, minHeight);\r\n\t}",
"public void setTextSize(float size) {\n\n if (size > 24f)\n size = 24f;\n if (size < 6f)\n size = 6f;\n\n mTextSize = Utils.convertDpToPixel(size);\n }",
"float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"public int getSubtitleFontSize() {\n\t\treturn this.subtitle_fontsize;\n\t}",
"public Font getLabelFont();",
"public static int getAreaButtonTextSize(Context context, Typeface typeface) {\n DisplayMetrics displayMetrics = context.getResources()\n .getDisplayMetrics();\n // int deviceWidth = displayMetrics.widthPixels;\n int deviceWidth = displayMetrics.widthPixels;\n\n return determineTextSize(typeface, (int) (0.23f * (.14f * deviceWidth)));\n\n }",
"public static int getWorkspaceIconTextSizeInPx(Context context) {\n if (mWorkspaceIconTextSize < 0) {\n mWorkspaceIconTextSize = PrefUtils.getIntPref(context, PrefConstants.KEY_ICON_TEXT_SIZE, -1);\n if (mWorkspaceIconTextSize < 0) {\n mWorkspaceIconTextSize = getDefaultWorkspaceIconTextSizeInPx(context);\n }\n }\n return mWorkspaceIconTextSize;\n }",
"public int getSelectedFontSize()\r\n\t{\r\n\t\treturn fontSizeList.getSelectedValue(); // return the currently selected font size\r\n\t}",
"public int getPreferredWidth() \n {\n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getAdvance( m_text ) + HMARGIN;\n }",
"private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}",
"private void setupTextSize()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tthis.mTextSize = (int) res.getDimension(R.dimen.tsz_main);\n\t}",
"public short getFontHeight() {\n\t\treturn this.fontHeight;\n\t}",
"private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }",
"public int getFront_label_size() {\n\t\treturn front_label_size;\n\t}",
"private float getYAxisLabelWidth() {\n return ViewUtils.getTextWidth(mYAxisTextPaint, PERCENTAGE_PERFECT);\n }",
"public int getMediumFontSize() {\n\t\treturn 10;\n\t}",
"public int getPreferredHeight() \n { \n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getHeight() + VMARGIN;\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"public native final String fontSize() /*-{\n\t\treturn this.fontSize;\n\t}-*/;",
"public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }",
"public double getLblSpacing() {\n return lblSpacing;\n }",
"public void setTextLabelFontSize(int mTextLabelFontSize) {\n\t\tthis.mTextLabelFontSize = mTextLabelFontSize;\n\t}",
"public void setLabelFont(int fontSize){\n Font labelFont = new Font(\"Serif\", Font.PLAIN, fontSize);\n minLabel.setFont(labelFont);\n medLabel.setFont(labelFont);\n maxLabel.setFont(labelFont);\n emptyLabel.setFont(labelFont);\n errorLabel.setFont(labelFont);\n }",
"public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}",
"private float getYAxisLabelHeight() {\n return ViewUtils.getTextHeight(mYAxisTextPaint, PERCENTAGE_PERFECT);\n }",
"public void setTextSize() {\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n }",
"double getFontSizeAdjustment() {\n return fontSizeAdjustment;\n }",
"public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }",
"public void checkTextSize(){\n mShp = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n String textSize = mShp.getString(\n getString(R.string.pref_textSize_key),\n getString(R.string.pref_textSize_default)\n );\n float size = Float.parseFloat(textSize);\n mTaleText.setTextSize(TypedValue.COMPLEX_UNIT_SP,size);\n }",
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"double width () {\n Text text = new Text(this.getText());\n text.setStyle(this.getStyle());\n return text.getBoundsInLocal().getWidth() * 1.5;\n }",
"public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }",
"private int getNormalTextSizeWeight() {\n return Integer.parseInt(getMessage(\"report.tabular.normal.text.size.weight\"));\n }",
"private int getTextHeight() {\n return lineHeight * (textBuffer.getMaxLine() - 1);\n }",
"public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }",
"public void setSizeLabel(String value) {\n setAttributeInternal(SIZELABEL, value);\n }",
"private static void loadTextSizes(Context context)\n\t{\n\t\tDisplayMetrics metrics = context.getResources().getDisplayMetrics();\n\t\tTEXT_SIZE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 14, metrics);\n\t\tTEXT_SIZE_BIG = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20, metrics);\n\t\tPADDING = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 10, metrics);\n\t\tTEXT_SPACE = (int)TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 150, metrics);\n\t}",
"private void setPrefSizeForText()\n {\n double prefW = getSuggestedPrefWidth();\n double prefH = _textArea.getPrefHeight();\n setPrefSize(prefW, prefH);\n }",
"public int[] verifyFontCanvasSize(Graphics2D g2d, String text, int textWidth, int nodeWidth, int fontSize) {\n while (textWidth >= (nodeWidth - 2)) {\n fontSize = fontSize - 1;\n//\t\tcanvas:attrFont(fontFamily, fontSize, fontStyle);\n g2d.setFont(new Font(Font.SANS_SERIF, Font.PLAIN, fontSize));\n textWidth = (int) Math.round(g2d.getFontMetrics().getStringBounds(text, g2d).getCenterX());\n// labelWidth = canvas:measureText(label);\n }\n return new int[]{textWidth, fontSize};\n }",
"public int sizeOfLabels()\r\n {\r\n return this.labels.size();\r\n }",
"public static int SPgetMessageTextSizePercentage(Context context){\n SharedPreferences pref = context.getSharedPreferences(\"DEFAULTS\", Context.MODE_PRIVATE);\n return pref.getInt(\"messageTextSize\", 70);\n }",
"public short getTextLength()\n {\n return field_6_textLength;\n }",
"@Override\r\n\tpublic int getFontSize() {\n\t\treturn 0;\r\n\t}",
"public ModernAutoSizeLabel(String text, Dimension size) {\r\n super(text, size);\r\n }",
"public String getSize() {\r\n return size;\r\n }",
"double width () {\n Text text = new Text(event.name);\n text.setStyle(this.getStyle());\n return text.getBoundsInLocal().getWidth() * 1.5;\n }",
"public void setTextSizePx(float size) {\n mPaint.setTextSize(size);\n mSpaceWidth = mPaint.measureText(\" \");\n invalidate();\n }",
"public int setTextSize(int textSelection) {\n // Sets the text size in Settings\n Settings.setTextSize(textSelection);\n\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n return Settings.getTextSize();\n }",
"public int getLegendSize() {\n\t\t\n\t\treturn size;\n\t}",
"public float getFontHeight(float fontSize) {\n Font f = getNormalFont(fontSize);\n FontMetrics fm = svgGenerator.getFontMetrics(f);\n return fm.getHeight();\n }",
"public static float textWidth(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).width;\n }",
"@Override\n public String getTextAlign() {\n return graphicsEnvironmentImpl.getTextAlign(canvas);\n }",
"String getPreviewSizePref();",
"public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}",
"public LabelBuilder setFontSize(int size) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setSize(size);\n\t\treturn this;\n\n\t}",
"public Rectangle2D.Double getTextBounds() {\n\t\t\n\t\tdouble txtPinX = _parent.getTxtPinX();\n\t\tdouble txtPinY = _parent.getTxtPinY();\n\t\t\n\t\tdouble txtLocPinX = _parent.getTxtLocPinX();\n\t\tdouble txtLocPinY = _parent.getTxtLocPinY();\n\t\t\n\t\tdouble txtWidth = _parent.getTxtWidth();\n\t\tdouble txtHeight = _parent.getTxtHeight();\n\t\t\n\t\tdouble x = txtPinX - txtLocPinX;\n\t\tdouble y = txtPinY - txtLocPinY;\n\t\t\n\t\treturn new Rectangle2D.Double(x, y, txtWidth, txtHeight);\n\t}",
"public String getSize() {\n return size;\n }",
"public String getSize() {\n return size;\n }",
"private LabelLayout labelBounds(Font drawFont, FontRenderContext frc, String txt)\r\n {\r\n String[] lines = txt.split(\"\\\\n\");\r\n double maxW = 0.0;\r\n double maxH = 0.0;\r\n for (String ln : lines)\r\n {\r\n Rectangle2D r = drawFont.createGlyphVector(frc, ln).getLogicalBounds();\r\n maxW = Math.max(maxW, r.getWidth());\r\n maxH = Math.max(maxH, r.getHeight());\r\n }\r\n LabelLayout lay = new LabelLayout();\r\n lay.lineH = maxH;\r\n lay.rect = new Rectangle2D.Double(0.0, 0.0, maxW, maxH * lines.length);\r\n return lay;\r\n }",
"public int getStringWidth(String text);",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"private int calculateTextWidth(String[] lines, FontMetrics fm)\r\n {\r\n int numChars = 0;\r\n String maxString = \"\";\r\n // calculate the number of characters in the line\r\n for (String lineNo : lines)\r\n {\r\n if (numChars < lineNo.length())\r\n {\r\n numChars = lineNo.length();\r\n maxString = lineNo;\r\n }\r\n }\r\n // width will be the numChars * text metrics for the font\r\n int maxWidth = fm.stringWidth(maxString);\r\n return maxWidth;\r\n }",
"private JPanel getPackSizeLabel() {\n\t\tif (packSizePanel == null) {\n packSizeLabel = new JLabel();\n\t\t\tpackSizeLabel.setText(\"Размер колоды \");\n FlowLayout flowLayout = new FlowLayout();\n\t\t\tflowLayout.setAlignment(FlowLayout.LEFT);\n\t\t\tpackSizePanel = new JPanel();\n\t\t\tpackSizePanel.setLayout(flowLayout);\n\t\t\tpackSizePanel.add(packSizeLabel, null);\n\t\t\tpackSizePanel.add(getColoda(), null);\n\t\t}\n\t\treturn packSizePanel;\n\t}",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"protected String sizeString()\n {\n return (\" (\" + map.getSizeX() + \" x \" + map.getSizeY() + \")\");\n }"
] | [
"0.8669799",
"0.8241704",
"0.79001707",
"0.7855833",
"0.7778052",
"0.7468923",
"0.7416844",
"0.7355084",
"0.7342771",
"0.72909963",
"0.72057635",
"0.7138351",
"0.7085825",
"0.7034752",
"0.7027225",
"0.7023566",
"0.7011687",
"0.6980219",
"0.69232506",
"0.6922819",
"0.6917436",
"0.6905622",
"0.68717897",
"0.68432236",
"0.68289727",
"0.6793992",
"0.67769295",
"0.67408186",
"0.67287976",
"0.67062825",
"0.66969776",
"0.6680279",
"0.6678004",
"0.66776234",
"0.6647176",
"0.6635559",
"0.6603427",
"0.6582117",
"0.65613544",
"0.65244037",
"0.6519067",
"0.65172786",
"0.6516566",
"0.6511707",
"0.65105504",
"0.65058213",
"0.65004426",
"0.6489515",
"0.64809924",
"0.64780754",
"0.6467778",
"0.64644516",
"0.64644516",
"0.64461917",
"0.64401007",
"0.6439619",
"0.643562",
"0.6435605",
"0.6408098",
"0.64030147",
"0.6401143",
"0.6400592",
"0.63957506",
"0.639387",
"0.6355951",
"0.63363266",
"0.6319821",
"0.6273851",
"0.62522024",
"0.62139237",
"0.6210107",
"0.6207783",
"0.6195813",
"0.6174195",
"0.61564124",
"0.61488384",
"0.6137225",
"0.6094857",
"0.60867107",
"0.60864276",
"0.60808146",
"0.6076158",
"0.6070512",
"0.6052987",
"0.6052838",
"0.6046265",
"0.6043487",
"0.60386646",
"0.60343283",
"0.60250026",
"0.60176444",
"0.60137117",
"0.60137117",
"0.60127336",
"0.59964955",
"0.5995838",
"0.59897757",
"0.5978928",
"0.59552616",
"0.5943221"
] | 0.78143793 | 4 |
Sets the text color to use for the labels. Make sure to use getResources().getColor(...) when using a color from the resources. | public void setTextColor(int color) {
mTextColor = color;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLabelColor(String labelColor)\n {\n myLabelColor = labelColor;\n }",
"public void setTextColor(String textColor);",
"public void setLblTextColor(Color color) {\n lblSysteemMelding.setForeground(color);\n }",
"public void setTextColor( Color txtColor ) {\r\n textColor = txtColor;\r\n }",
"public void setTextColor(int textColor) {\n this.textColor = textColor;\n }",
"public void setLblColor(Color value) {\n lblColor = value;\n }",
"public void setTextColor(Color textColor) {\r\n this.textColor = textColor;\r\n }",
"public void setTextColor(RMColor aColor) { }",
"public void setTextLabelForegroundColor(int mTextLabelForegroundColor) {\n\t\tthis.mTextLabelForegroundColor = mTextLabelForegroundColor;\n\t}",
"public void setTextColor(@ColorInt int textColor) {\n mTextContainer.setTextColor(textColor);\n }",
"public void setTextColor(int color) {\n this.textColor = 0xFF000000 | color; // Remove the alpha channel\n\n if (ad != null) {\n ad.setTextColor(color);\n }\n\n invalidate();\n }",
"public IconBuilder textColor(int color) {\n\t\tthis.textColor = color;\n\t\treturn this;\n\t}",
"public void setProgressTextColor(@ColorInt int textColor){\n this.mProgressTextColor = textColor;\n }",
"Color(String text) {\n this.text = text;\n }",
"public void changeColor (Color color){\n ((Label) _node).setTextFill(color);\n }",
"public static void setGlobalTextColor(Context context, int color){\n SharedPreferences.Editor edit = context.getSharedPreferences(\"DEFAULTS\", Context.MODE_PRIVATE).edit();\n edit.putInt(\"textColor\", color);\n edit.apply();\n\n ArrayList<Outfit> list = getOutfitList(context);\n if(list.size()>0){\n for(int i = 0 ; i<list.size(); i++){\n list.get(i).setTextColor(color);\n }\n saveOutfitJSON(context, list);\n }\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 }",
"private void resetLabelColor(){\n setLabelColorStandard(nameLabel, normalColor);\n setLabelColorStandard(xLabel, Color.red);\n setLabelColorStandard(yLabel, Color.blue);\n setLabelColorStandard(zLabel, Color.green);\n setLabelColorStandard(rotXLabel, Color.red);\n setLabelColorStandard(rotYLabel, Color.blue);\n setLabelColorStandard(rotZLabel, Color.green);\n setLabelColorStandard(scaleLabel, normalColor);\n }",
"public CommandViewBuilder setTextColor(Color textColor)\n\t\t{\n\t\t\tthis.textColor = textColor;\n\t\t\treturn this;\n\t\t}",
"public Color getTextColor() {\r\n return textColor;\r\n }",
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"public void setTextLabelBackgroundColor(int mTextLabelBackgroundColor) {\n\t\tthis.mTextLabelBackgroundColor = mTextLabelBackgroundColor;\n\t}",
"private void setDefaultTextColor(Context context) {\n\n }",
"public RMColor getTextColor() { return RMColor.black; }",
"void setGOLabelTextColor(DREM_Timeiohmm.Treenode treeptr, Color newColor) {\n\t\tif (treeptr != null) {\n\t\t\ttreeptr.goText.setTextPaint(newColor);\n\n\t\t\tfor (int nchild = 0; nchild < treeptr.numchildren; nchild++) {\n\t\t\t\tsetGOLabelTextColor(treeptr.nextptr[nchild], newColor);\n\t\t\t}\n\t\t}\n\t}",
"public Color getLblColor() {\n return lblColor;\n }",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"public String getTextColor();",
"@Override\n public void setPriorityTextColor(String textColor) {\n btnPrioritySet.setTextColor(Color.parseColor(textColor));\n }",
"public Color getTextColor();",
"public void setDrawTickTexts(Color color) {\n mTextPaint.setColor(color);\n drawTickTextsColor = color;\n }",
"private void setText(String language, String color){\n\n switch (language)\n {\n case(\"French\"):\n displayText.setText(\"Bonjour le monde\");\n break;\n case(\"Spanish\"):\n displayText.setText(\"Hola Mundo\");\n break;\n case(\"German\"):\n displayText.setText(\"Hallo Welt\");\n break;\n }\n\n switch (color)\n {\n case(\"Blue\"):\n displayText.setTextColor(Color.BLUE);\n break;\n case(\"Green\"):\n displayText.setTextColor(Color.GREEN);\n break;\n case(\"Yellow\"):\n displayText.setTextColor(Color.YELLOW);\n break;\n }\n\n }",
"private void setLabelColorStandard(JLabel label, Color color){\n if(normalFont != null)\n label.setFont(normalFont);\n label.setForeground(color);\n }",
"public int textColor() {\n\t\treturn textColor;\n\t}",
"public Color getTextColor(){\r\n return textColor;\r\n }",
"public int getTextColor() {\n return mTextColor;\n }",
"private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }",
"private void colorNodeLabel(NodeLabelImpl nodeLabel) {\n nodeLabelColorizer.color(nodeLabel);\n }",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"public void setTextColorAndFont(GraphicsContext graphicsContext) {\r\n\t\tgraphicsContext.setFill(Color.WHITE);\r\n\t\tgraphicsContext.setFont(Font.font(25));\r\n\t}",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"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 }",
"public void setLabelText(String text);",
"@AutoEscape\n\tpublic String getTextColor();",
"public LabelBuilder setColor(String color) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setColor(color);\n\t\treturn this;\n\t}",
"@Override\n public void setUilButtonLabelColor(java.lang.Object uilButtonLabelColor) throws G2AccessException {\n setAttributeValue (UIL_BUTTON_LABEL_COLOR_, uilButtonLabelColor);\n }",
"public void setTickTextsColor(Color tickTextsColor) {\n mSelectedTextsColor = tickTextsColor;\n mUnselectedTextsColor = tickTextsColor;\n mHoveredTextColor = tickTextsColor;\n invalidate();\n }",
"public void setForegroundColor(int color) {\n this.foregroundColor = color;\n }",
"public int getTextLabelBackgroundColor() {\n\t\treturn mTextLabelBackgroundColor;\n\t}",
"public static void setTextColor(String color, TextView v){\n v.setTextColor(Color.parseColor(color.isEmpty() ? \"#000000\" : color));\n }",
"public BaseViewHolder setTextColor(@IdRes int viewId, @ColorInt int textColor) {\n TextView view = getView(viewId);\n view.setTextColor(textColor);\n return this;\n }",
"public void setColor(String c);",
"private void setUpNutritionLabel(Label l1, String color, String text){\n l1.setText(text);\n l1.setTextFill(Paint.valueOf(color));\n l1.setFont(InterfaceStyling.systemFont);\n }",
"private void updateTextColor(TextView view, boolean isOn) {\n if (isOn) {\n view.setTextColor(Color.GREEN);\n } else {\n view.setTextColor(Color.BLACK);\n }\n }",
"public ModernAutoSizeLabel(String text, Color color) {\r\n super(text, color);\r\n }",
"public @ColorInt int getTextColor() {\n return mTextContainer.getTextColor();\n }",
"public Label(float x, float y, String text, Color fontColor) {\n this(x, y, text);\n this.setColor(fontColor);\n }",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public void setFontColor(Color fontColor) {\r\n try {\r\n this.setForeground(fontColor);\r\n } catch (Exception e) {\r\n ToggleButton.logger.error(this.getClass().toString() + \" : Error establishing font color\", e);\r\n if (ApplicationManager.DEBUG) {\r\n ToggleButton.logger.error(null, e);\r\n }\r\n }\r\n }",
"public Builder setContentTextColor(@ColorInt int color) {\n this.contentTextColor = color;\n return this;\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.orange));\n }",
"public LabelBuilder setColor(IsColor color) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setColor(color);\n\t\treturn this;\n\t}",
"private void setConsoleText(String text) {\n //<font color='red'>red</font>\n consoleView.setText(Html.fromHtml(text), TextView.BufferType.SPANNABLE);\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.brwn));\n }",
"public IconBuilder autoTextColor() {\n\t\tthis.textColor = AUTO_TEXT_COLOR;\n\t\treturn this;\n\t}",
"public ComDialogBuilder setTitleTextColor(int color) {\n if(dialogTitle!=null){\n dialogTitle.setTextColor(color);\n }\n return this;\n }",
"public void setColor(String c)\n { \n color = c;\n draw();\n }",
"@SuppressWarnings(\"deprecation\")\n public Builder setContentTextColorRes(@ColorRes int color) {\n return this.setContentTextColor(context.getResources().getColor(color));\n }",
"public void setNodeLabelColorizer(NodeChildColorizer value) {\n nodeLabelColorizer = value;\n colorNodeLabels();\n }",
"Integer getTxtColor();",
"public void setForeground(Color c)\n {\n lname.setForeground(c);\n }",
"public String getLabelColorText(DotPalette pal) {\n return (this==BLACK || (pal==DotPalette.STANDARD && (this==RED || this==BLUE))) ? \"white\" : \"black\";\n }",
"public final void setFontColor(String fontColor) {\n\t\tthis.fontColor = fontColor;\n\t}",
"public void setErrorText(String error, int color){\n errorText.setTextColor(color);\n errorText.setText(error);\n }",
"public void setColor(String color) {\r\n this.color = color;\r\n }",
"private void showLabel(String text, Color color) {\n GLabel result = new GLabel(text);\n result.setFont(\"Verdana-60\");\n result.setColor(color);\n result.sendToFront();\n add(result, (getWidth() - result.getWidth()) /2, (getHeight() - result.getHeight()) / 2 );\n pause(FREEZE_TIME);\n remove(result);\n }",
"private void setupAllViewsToSetTextColor(){\n allViewsToSetTextColor = new ArrayList<>();\n allViewsToSetTextColor.add(labelDegrees);\n allViewsToSetTextColor.add(entryDegrees);\n allViewsToSetTextColor.add(labelRadians);\n allViewsToSetTextColor.add(entryRadians);\n allViewsToSetTextColor.add(labelSine);\n allViewsToSetTextColor.add(sineRegularData);\n allViewsToSetTextColor.add(labelCosine);\n allViewsToSetTextColor.add(cosineRegularData);\n allViewsToSetTextColor.add(labelTangent);\n allViewsToSetTextColor.add(tangentRegularData);\n allViewsToSetTextColor.add(radianTextNumerator);\n allViewsToSetTextColor.add(radianTextDenominator);\n allViewsToSetTextColor.add(sineTextNumerator);\n allViewsToSetTextColor.add(sineTextDenominator);\n allViewsToSetTextColor.add(cosineTextNumerator);\n allViewsToSetTextColor.add(cosineTextDenominator);\n allViewsToSetTextColor.add(tangentTextNumerator);\n allViewsToSetTextColor.add(tangentTextDenominator);\n }",
"public IconBuilder autoTextColorPreferBlack() {\n\t\tthis.textColor = AUTO_TEXT_COLOR_BLACK;\n\t\treturn this;\n\t}",
"@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 void setForegroundColor(Color c) {\n this.foreColor = c;\n updateFigureForModel(nodeFigure);\n }",
"public void setColor(String color){\n this.color = color;\n }",
"@Override\n public Color getFontColor(){\n return Color.BLACK;\n }",
"public void setMarkerClusterTextColor(View view) {\n if (null != hMap) {\n hMap.getUiSettings().setMarkerClusterTextColor(Color.RED);\n }\n }",
"boolean labelColor(String mode);",
"@Override\n public void choiced(String result) {\n target.setText(result);\n target.setTextColor(getResources().getColor(R.color.app_color));\n }",
"public void setForegroundColor(String colorString)\r\n {\r\n/* if(colorString.equals(\"red\"))\r\n graphic.setColor(Color.red);\r\n else if(colorString.equals(\"black\"))\r\n graphic.setColor(Color.black);\r\n else if(colorString.equals(\"blue\"))\r\n graphic.setColor(Color.blue);\r\n else if(colorString.equals(\"yellow\"))\r\n graphic.setColor(Color.yellow);\r\n else if(colorString.equals(\"green\"))\r\n graphic.setColor(Color.green);\r\n else if(colorString.equals(\"magenta\"))\r\n graphic.setColor(Color.magenta);\r\n else if(colorString.equals(\"white\"))\r\n graphic.setColor(Color.white);\r\n else if(colorString.equals(\"cyan\"))\r\n graphic.setColor(Color.cyan);\r\n else\r\n graphic.setColor(Color.black); */\r\n }",
"public void setLabelFont(Font f);",
"private void resetTextColor(Button btn1, Button btn2) {\n\t\tbtn1.setTextColor(Color.parseColor(getResources().getString(R.color.list_text_color)));\n\t\tbtn2.setTextColor(Color.parseColor(getResources().getString(R.color.list_text_color)));\n\t}",
"public void setColor(String color) {\r\n this.color = color;\r\n }",
"public void setLockedLabelColors(boolean lock)\n\t{\n\t\tthis.lockedLabelColors = lock;\n\t\t\n\t\tif(lock)\n\t\t{\n\t\t\tthis.labelStyle.setTextPaint(this.getPaint()[0]);\n\t\t}\n\t}",
"private void setLabelColorError(JLabel label){\n Font font = label.getFont();\n \n if(normalFont == null)\n normalFont = font;\n \n Font boldFont = new Font(font.getFontName(), Font.BOLD, font.getSize());\n label.setFont(boldFont);\n label.setForeground(errorColor);\n }",
"public FontLabel(String text) {\n super(text, JLabel.CENTER);\n setBackground(Color.white);\n setForeground(Color.black);\n setOpaque(true);\n setBorder(new LineBorder(Color.black));\n setPreferredSize(new Dimension(120, 40));\n }",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"public ComDialogBuilder setCancelButtonTextColor(int color) {\n if (cancelBtn == null) {\n cancelBtn = getView(R.id.dialog_neg_btn);\n }\n if(this.cancelBtn!=null){\n this.cancelBtn.setTextColor(color);\n }\n return this;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }",
"public void setColor(String color) {\n this.color = color;\n }"
] | [
"0.76049346",
"0.7570156",
"0.7352612",
"0.73169416",
"0.7244276",
"0.7196836",
"0.7132628",
"0.7102484",
"0.69746774",
"0.68542355",
"0.6769915",
"0.67166424",
"0.6598988",
"0.6547871",
"0.65391195",
"0.6513128",
"0.6489325",
"0.63895357",
"0.637639",
"0.6372185",
"0.6370382",
"0.63511163",
"0.6328733",
"0.6281591",
"0.62579334",
"0.6236374",
"0.62311",
"0.6191612",
"0.61764026",
"0.6167929",
"0.6161226",
"0.61325496",
"0.6115291",
"0.60846496",
"0.60760045",
"0.6047986",
"0.59705657",
"0.5950171",
"0.5936712",
"0.5933531",
"0.5915556",
"0.5915459",
"0.59147364",
"0.59025484",
"0.588424",
"0.58816826",
"0.5861351",
"0.5859943",
"0.5849948",
"0.5845288",
"0.5834967",
"0.5821009",
"0.5800104",
"0.5786743",
"0.5774131",
"0.5766423",
"0.57614124",
"0.5727605",
"0.5709053",
"0.5687151",
"0.56373507",
"0.5621873",
"0.56139183",
"0.5607217",
"0.5605993",
"0.56059515",
"0.5600522",
"0.5588414",
"0.55795515",
"0.5569549",
"0.5560789",
"0.55599564",
"0.55543345",
"0.5554166",
"0.55513465",
"0.5549998",
"0.554993",
"0.5548381",
"0.5547336",
"0.5543544",
"0.5533502",
"0.55273575",
"0.5524445",
"0.55232674",
"0.5515491",
"0.54904824",
"0.54904723",
"0.5485131",
"0.54787284",
"0.54775506",
"0.54750204",
"0.54620373",
"0.5449696",
"0.5447781",
"0.54370016",
"0.54370016",
"0.54370016",
"0.54370016",
"0.54370016",
"0.54370016"
] | 0.7182516 | 6 |
Returns the text color that is set for the labels. | public int getTextColor() {
return mTextColor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"public int textColor() {\n\t\treturn textColor;\n\t}",
"public Color getLblColor() {\n return lblColor;\n }",
"public String getTextColor();",
"Integer getTxtColor();",
"public int getTextLabelBackgroundColor() {\n\t\treturn mTextLabelBackgroundColor;\n\t}",
"public Color getTextColor();",
"public @ColorInt int getTextColor() {\n return mTextContainer.getTextColor();\n }",
"public String getColorAsString() {\n\t\treturn getValue(CommonProperty.COLOR, AbstractLabels.DEFAULT_COLOR);\n\t}",
"@AutoEscape\n\tpublic String getTextColor();",
"public RMColor getTextColor() { return RMColor.black; }",
"public Color getTextColor() {\r\n return textColor;\r\n }",
"public static Color getColor() { return lblColor.getBackground(); }",
"public String getLabelColorText(DotPalette pal) {\n return (this==BLACK || (pal==DotPalette.STANDARD && (this==RED || this==BLUE))) ? \"white\" : \"black\";\n }",
"String getTextStrokeColorAsString();",
"public Color color() {\n\t\tswitch (this) {\n\t\tcase FATAL: {\n\t\t\tColor c = UIManager.getColor(\"nb.errorForeground\"); // NOI18N\n\t\t\tif (c == null) {\n\t\t\t\tc = Color.RED.darker();\n\t\t\t}\n\t\t\treturn c;\n\t\t}\n\t\tcase WARNING:\n\t\t\treturn Color.BLUE.darker();\n\t\tcase INFO:\n\t\t\treturn UIManager.getColor(\"textText\");\n\t\tdefault:\n\t\t\tthrow new AssertionError();\n\t\t}\n\t}",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public Color[] getTextColorsArray() {\n\t\treturn this.textColor;\n\t}",
"public Color getTextColor(){\r\n return textColor;\r\n }",
"public String getColorString();",
"public String getTickColorAsString();",
"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 }",
"public Integer getHightlightedTextColor() {\n if (mHightlightedTextColor != null)\n return mHightlightedTextColor;\n return getTextColor();\n }",
"boolean labelColor(String mode);",
"public static Color getTextColorLight() {\n return TEXTCOLOR_LIGHT;\n }",
"public final String getFontColor() {\n\t\treturn fontColor;\n\t}",
"public void setLblColor(Color value) {\n lblColor = value;\n }",
"String getColor();",
"public int getExampleColor() {\n return mTextColor;\n }",
"public static Color getTextColorDark() {\n return TEXTCOLOR_DARK;\n }",
"private String getColor(String tagName) {\n if (labelColor.containsKey(tagName)) {\n return labelColor.get(tagName);\n } else {\n Random random = new Random();\n // create a big random number - maximum is ffffff (hex) = 16777215 (dez)\n int nextInt = random.nextInt(256 * 256 * 256);\n // format it as hexadecimal string (with hashtag and leading zeros)\n String colorCode = String.format(\"#%06x\", nextInt);\n labelColor.put(tagName, colorCode);\n return labelColor.get(tagName);\n }\n }",
"public Color getStringColor() {\n return this.getConfiguredColor(PreferencesConstants.COLOR_STRING);\n }",
"public void setTextColor(String textColor);",
"public native final String fontColor() /*-{\n\t\treturn this.fontColor;\n\t}-*/;",
"public Color getDisabledTextColor() {\r\n\t\treturn getJTextField().getDisabledTextColor();\r\n\t}",
"public String getColor() {\r\n return color;\r\n }",
"public String getColor()\n {\n return color;\n }",
"public String getColor()\n {\n return color;\n }",
"public String getColor() {\r\n\t\treturn color;\r\n\t}",
"public final Color getFontColour() {\n return fontColour;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public Color getNodeTextColor(N node, int selectionLevel) {\n\t\treturn adjustColorText(Color.BLACK, selectionLevel);\n\t}",
"@Override\n public Color getFontColor(){\n return Color.BLACK;\n }",
"public void setLabelColor(String labelColor)\n {\n myLabelColor = labelColor;\n }",
"public String getColor() {\n\t\treturn color;\n\t}",
"public String getColor() {\n\t\treturn color;\n\t}",
"public NodeColor getNodeColor() {\n String str = findSelected(node_colors);\n if (str.equals(NODE_CO_WHITE)) { return NodeColor.WHITE;\n } else if (str.equals(NODE_CO_VARY)) { return NodeColor.VARY;\n } else if (str.equals(NODE_CO_LABEL)) { return NodeColor.LABEL;\n } else if (str.equals(NODE_CO_CLUSTERCO)) { return NodeColor.CLUSTERCO;\n } else return NodeColor.WHITE;\n }",
"public void setLblTextColor(Color color) {\n lblSysteemMelding.setForeground(color);\n }",
"public NodeChildColorizer getNodeLabelColorizer() {\n return nodeLabelColorizer;\n }",
"public String getColor() {\n\t\treturn null;\n\t}",
"public String getColor() { \n return color; \n }",
"public void setTextColor(RMColor aColor) { }",
"public short getColor()\n {\n return font.getColorPaletteIndex();\n }",
"public String getColor(){\n\t\treturn color;\n\t}",
"public String getColor()\n {\n return this.color;\n }",
"@Override\n public String getColor() {\n return this.color;\n }",
"@Override\n public String getColor() {\n return this.color.name();\n }",
"public Colour getForegroundColor() {\n return colour == null ? null : colour.getForeground();\n }",
"Color(String text) {\n this.text = text;\n }",
"public String getColor() {\n return this.color;\n }",
"private void resetLabelColor(){\n setLabelColorStandard(nameLabel, normalColor);\n setLabelColorStandard(xLabel, Color.red);\n setLabelColorStandard(yLabel, Color.blue);\n setLabelColorStandard(zLabel, Color.green);\n setLabelColorStandard(rotXLabel, Color.red);\n setLabelColorStandard(rotYLabel, Color.blue);\n setLabelColorStandard(rotZLabel, Color.green);\n setLabelColorStandard(scaleLabel, normalColor);\n }",
"@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}",
"private int[] getTextColor(TextView tv) {\n int color = tv.getCurrentTextColor();\n int alpha = Color.alpha(color);\n int red = Color.red(color);\n int green = Color.green(color);\n int blue = Color.blue(color);\n\n int[] rgbValues = {alpha, red, green, blue};\n return rgbValues;\n }",
"@Override\n public java.lang.Object getUilButtonLabelColor() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (UIL_BUTTON_LABEL_COLOR_);\n return (java.lang.Object)retnValue;\n }",
"public String getColor() {\n return currentLocation.getNodeColor();\n }",
"public String getColorFromAsString() {\n\t\treturn getValue(Property.COLOR_FROM, SankeyDataset.DEFAULT_COLOR_FROM);\n\t}",
"@Override\r\n\tpublic String getColor() {\n\t\treturn \"white\";\r\n\t}",
"public String getColor() {\n return (String)getAttributeInternal(COLOR);\n }",
"public static String blue(String text){\n return ANSI_BLUE + text + ANSI_BLUE;\n }",
"public int mo27005e() {\n TextView textView = this.f24573m;\n if (textView != null) {\n return textView.getCurrentTextColor();\n }\n return -1;\n }",
"public String getColor(){\r\n return color;\r\n }",
"public String colouredText(String word) { //O(1)\n\t\tStringBuilder sb = new StringBuilder();\n\t\tString colorWord = sb.append(ConsoleColour.RED_BRIGHT).append(word).append(ConsoleColour.RESET).toString();\n\t\treturn colorWord;\n\t}",
"public Font getLabelFont();",
"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 Paint getColorTitle() {\n return bufColorTitle;\n }",
"public String getHtmlColor() {\n\t\tString sRed = Integer.toHexString(color.getRed());\n\t\tString sGreen = Integer.toHexString(color.getGreen());\n\t\tString sBlue = Integer.toHexString(color.getBlue());\n\t\t\n\t\treturn \"#\" + (sRed.length() == 1 ? \"0\" + sRed : sRed) +\n\t\t\t\t(sGreen.length() == 1 ? \"0\" + sGreen : sGreen) +\n\t\t\t\t(sBlue.length() == 1 ? \"0\" + sBlue : sBlue);\n\t}",
"@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}",
"@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }",
"public void setTextLabelForegroundColor(int mTextLabelForegroundColor) {\n\t\tthis.mTextLabelForegroundColor = mTextLabelForegroundColor;\n\t}",
"@Override\r\n\tpublic String Color() {\n\t\treturn Color;\r\n\t}",
"public int mo27008h() {\n TextView textView = this.f24577q;\n if (textView != null) {\n return textView.getCurrentTextColor();\n }\n return -1;\n }",
"public Color getForegroundColor() {\n return foreColor;\n }",
"public String getTitleColor() {\n\t\treturn hex == null ? \"<col=C12006>\" : hex;\n\t}",
"public Color getColor() {\n return Color.YELLOW;\n }",
"public Color getForeground();",
"public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}",
"public IconBuilder textColor(int color) {\n\t\tthis.textColor = color;\n\t\treturn this;\n\t}",
"public String getColorString() {\n return left.toString() + \", \" + right.toString();\n }",
"public RMColor getColor()\n {\n return getStyle().getColor();\n }",
"public void setTextColor( Color txtColor ) {\r\n textColor = txtColor;\r\n }",
"public String getColor() {\n\t\treturn \"Elcolor del vehiculo es: \"+color; \n\t }",
"private void setDefaultTextColor(Context context) {\n\n }"
] | [
"0.81851536",
"0.7856164",
"0.7822254",
"0.7717078",
"0.7678097",
"0.7673591",
"0.7621408",
"0.7484709",
"0.74138385",
"0.7413593",
"0.73945045",
"0.7319531",
"0.73071384",
"0.7100822",
"0.7052918",
"0.6971385",
"0.6944887",
"0.6890626",
"0.68838626",
"0.6789361",
"0.6754658",
"0.6668466",
"0.6601486",
"0.6576926",
"0.6552603",
"0.65512055",
"0.6550572",
"0.65367657",
"0.649185",
"0.6470717",
"0.6440789",
"0.6394039",
"0.6390878",
"0.6345768",
"0.6325803",
"0.6301714",
"0.62876934",
"0.62866426",
"0.62866426",
"0.6277404",
"0.62641203",
"0.6246745",
"0.6246745",
"0.6246745",
"0.6246745",
"0.6246745",
"0.6246745",
"0.6246745",
"0.6246745",
"0.62467325",
"0.6237002",
"0.6236775",
"0.6236501",
"0.6236501",
"0.6226103",
"0.6223574",
"0.6221351",
"0.62185425",
"0.62123716",
"0.6193176",
"0.61844546",
"0.6163847",
"0.61432236",
"0.61302084",
"0.61252934",
"0.6112049",
"0.60843587",
"0.6075806",
"0.60600895",
"0.6059293",
"0.6057764",
"0.6035424",
"0.60302186",
"0.6029561",
"0.60284907",
"0.60167944",
"0.60113615",
"0.6008382",
"0.6000351",
"0.59981763",
"0.59885573",
"0.59878755",
"0.598782",
"0.59780425",
"0.5962291",
"0.5959229",
"0.59543073",
"0.595316",
"0.5950067",
"0.5946318",
"0.5909194",
"0.59071416",
"0.5906961",
"0.59059453",
"0.5902695",
"0.5893691",
"0.58797365",
"0.5874689",
"0.58618546",
"0.5858646"
] | 0.7334392 | 11 |
returns the Typeface that is currently set for the highlighted labels | public Typeface getHightlightedTypeface() {
if (mHightlightedTypeface != null)
return mHightlightedTypeface;
return getTypeface();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"public Typeface getTypeface() {\n return mTypeface;\n }",
"private Typeface getTypeface(TypefaceName tfn){\n\n switch (tfn) {\n case FURMANITE:\n return moodPromptFont;\n case DATACONTROL:\n return conversationFont;\n default:\n //TODO: pick a Default\n return conversationFont;\n }\n\n }",
"public Font getLabelFont();",
"public Typeface a() {\n return this.f2079d;\n }",
"public FontStyle getStyle();",
"public Color getHighlight();",
"public String getFontFace() {\n\t\treturn _fontFace;\n\t}",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}",
"public int getTypefaceIndex() {\r\n return TypefaceIndex;\r\n }",
"public HighlightMode getHighlightMode() {\n return highlightMode;\n }",
"public FontUIResource getControlTextFont() { return fControlFont;}",
"public RMFont getFont()\n {\n return getStyle().getFont();\n }",
"Shape getHighlightShape();",
"private OOBibStyle getSelectedStyle() {\n if (selectionModel.getSelected().size() > 0) {\n return selectionModel.getSelected().get(0);\n } else {\n return null;\n }\n }",
"public boolean getHighlight();",
"public FontRenderer getFontRenderer()\n {\n return this.textRenderer;\n }",
"public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }",
"private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public IsFont getHoverFont() {\n\t\treturn getOriginalHoverFont();\n\t}",
"public Font getLabelFont() {\n return labelFont;\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"public String getMatchFontName();",
"void setFontFamily(ReaderFontSelection f);",
"Integer getTxtColor();",
"public String getTextColor();",
"public RMFont getFont() { return getParent()!=null? getParent().getFont() : null; }",
"public FontType getFontType() {\n\t\treturn font;\n\t}",
"public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}",
"public abstract Font getFont();",
"public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}",
"public static BitmapFont getDefault() {\r\n\t\treturn defaultFont;\r\n\t}",
"public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}",
"public Font getFont() {\n\t\treturn f;\n\t}",
"public int getSelectionBoxStyle();",
"public int getTextLabelBackgroundColor() {\n\t\treturn mTextLabelBackgroundColor;\n\t}",
"public String getFont() {\n return font;\n }",
"public Color getSelectionForeground() {\n checkWidget();\n Color result = selectionForeground;\n if( result == null ) {\n CTabFolderThemeAdapter adapter = getCTabFolderThemeAdapter();\n result = adapter.getSelectedForeground( this );\n }\n if( result == null ) {\n // Should never happen as the theming must prevent transparency for\n // this color\n throw new IllegalStateException( \"Transparent selection foreground color\" );\n }\n return result;\n }",
"private void settypeface() {\n }",
"public Paint getPaintHighlight() {\n return mHighlightPaint;\n }",
"public ShapeAttributes getHighlightAttributes()\n {\n return highlightAttrs;\n }",
"String getRendererType();",
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"abstract Font getFont();",
"COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}",
"public static final Typeface getTypeface(Context context) {\n if (typeface == null) {\n try {\n typeface = Typeface.createFromFile(resourceToFile(context, TTF_FILE));\n } catch (IOException e) {\n return null;\n }\n }\n return typeface;\n }",
"Appearance getAppearance();",
"public Font getFont(\n )\n {return font;}",
"public String getFacetLabelHoverStyle() {\r\n return getAttributeAsString(\"facetLabelHoverStyle\");\r\n }",
"@Override\n\tpublic String getType() {\n\t\treturn getColor()+\"圆形\";\n\t}",
"public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }",
"public String getFontName();",
"public String getFontName();",
"public String getFontName();",
"public Color getForeground();",
"public Font getFont() {\n return this.font;\n }",
"public BitmapFont getFont(int style) {\r\n\t\treturn new BitmapFont(this, style);\r\n\t}",
"public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }",
"@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public Font getFont() {\r\n return font;\r\n }",
"public String getButtonFontStyle() {\r\n\t\tif (_saveButton == null)\r\n\t\t\treturn null;\r\n\t\telse\r\n\t\t\treturn _saveButton.getButtonFontStyle();\r\n\t}",
"public Font getTextFont() {\r\n\t\treturn getJTextField().getFont();\r\n\t}",
"public int getStandardType1FontType() throws PDFNetException {\n/* 909 */ return GetStandardType1FontType(this.a);\n/* */ }",
"public RMColor getTextColor() { return RMColor.black; }",
"public Color getHighlightColor() {\n return highlightColor;\n }",
"public CanvasFont getFont() {\n return this.textFont;\n }",
"public Font getFont() {\n return font;\n }",
"public FontFinder getFontFinder() {\n return NameFont;\n }",
"public abstract String getStyle();",
"IfcSpecularHighlightSelect getSpecularHighlight();",
"public Color getTextColor();",
"public static @Nullable Typeface getTypeface(@NonNull Object tag) {\n checkNotNull(tag, \"tag\");\n\n synchronized (TypefaceManager.class) {\n return tags.get(tag);\n }\n }",
"@Override\n public Color getFontColor(){\n return Color.BLACK;\n }",
"public IfcCharacterStyleSelect getTextCharacterAppearance() {\n return textCharacterAppearance;\n }",
"public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}",
"float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}",
"Font getFont (StyleRange styleRange) {\n\tif (styleRange.font != null) return styleRange.font;\n\treturn getFont(styleRange.fontStyle);\n}",
"public RMTextStyle getStyle()\n {\n return new RMTextStyle(_style);\n }",
"public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }",
"public void setLabelFont(Font f);",
"@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }",
"@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }",
"@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }",
"@Override\n protected Color getSelectionForeground() {\n return Color.BLACK;\n }",
"public FontFamilySelector() {\n defaultConfig(Util.getAllFontNames());\n }",
"public Color getLblColor() {\n return lblColor;\n }",
"private void loadSettingFont() {\n\t\tSharedPreferences mysettings = getSharedPreferences(\n\t\t\t\tPREFERENCES_FILE_NAME, 0);\n\t\tindexFont = mysettings.getInt(\"indexFont\", 1);\n\t\tLog.d(\"indexFont\", indexFont + \"\");\n\t\tswitch (indexFont) {\n\t\tcase 0:\n\t\t\tmTypeface = Typeface.DEFAULT;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"tinhyeu.ttf\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"thuphap.ttf\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\t}\n\t}",
"public short getColor()\n {\n return font.getColorPaletteIndex();\n }",
"public String getLabelText();",
"public String getName() {\n return fontName;\n }",
"java.lang.String getRenderer();",
"public Font getFont() {\n\treturn font;\n }",
"public Font getFont() {\n\treturn font;\n }",
"@NativeType(\"bgfx_renderer_type_t\")\n public static int bgfx_get_renderer_type() {\n long __functionAddress = Functions.get_renderer_type;\n return invokeI(__functionAddress);\n }",
"public HashMap<String, FileHandle> getTTFMap() {\r\n return ttfMap;\r\n }",
"public void setBracketfont(String val)\r\n\t{\r\n\t\t_bracketFont = val;\r\n\t}",
"public Font getNodeLabelFont() {\n return nodeLabelfont;\n }"
] | [
"0.7365308",
"0.65702456",
"0.63992155",
"0.62732357",
"0.6110346",
"0.6103726",
"0.6086539",
"0.59169775",
"0.5838783",
"0.5788255",
"0.577033",
"0.57393706",
"0.57112753",
"0.57112676",
"0.5687029",
"0.56651855",
"0.5665128",
"0.5618164",
"0.5617663",
"0.5614445",
"0.5601832",
"0.5591615",
"0.5568886",
"0.5568886",
"0.55613875",
"0.55525404",
"0.555132",
"0.55406904",
"0.5540528",
"0.55300117",
"0.5524614",
"0.5523098",
"0.5515873",
"0.5514597",
"0.5499083",
"0.5489806",
"0.5485428",
"0.54812384",
"0.5480832",
"0.5473173",
"0.54349667",
"0.5433883",
"0.5431439",
"0.541945",
"0.54136354",
"0.54068226",
"0.5405522",
"0.5384695",
"0.53707564",
"0.5351027",
"0.53432184",
"0.5336337",
"0.5335062",
"0.5322662",
"0.5322662",
"0.5322662",
"0.5319274",
"0.53192335",
"0.53127104",
"0.5312575",
"0.53095657",
"0.53082734",
"0.53082734",
"0.5304408",
"0.53011423",
"0.52938104",
"0.5293134",
"0.5284809",
"0.52702796",
"0.52638716",
"0.5260499",
"0.5259356",
"0.5254654",
"0.52546287",
"0.52534837",
"0.52391285",
"0.52304333",
"0.5230097",
"0.52296335",
"0.5220647",
"0.5220642",
"0.52158487",
"0.52073264",
"0.51970226",
"0.51970226",
"0.51970226",
"0.51970226",
"0.519291",
"0.51928145",
"0.5176463",
"0.51699644",
"0.5168269",
"0.51681906",
"0.5167496",
"0.5166441",
"0.5166441",
"0.51626664",
"0.51586676",
"0.51554304",
"0.5146977"
] | 0.6219688 | 4 |
returns the Text size that is currently set for the highlighted labels | public Float getHightlightedTextSize() {
if (mHightlightedTextSize != null)
return mHightlightedTextSize;
return getTextSize();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int getLabelTextSize(){\n return labelTextSize;\n }",
"public int getTextLabelFontSize() {\n\t\treturn mTextLabelFontSize;\n\t}",
"public float getTextSizePx() {\n return mPaint.getTextSize();\n }",
"public float getTextSize() {\n return mTextContainer.getTextSize();\n }",
"public float getTextSize() {\n return mTextSize;\n }",
"public int getLabelSize()\n {\n return myLabelSize;\n }",
"public int getSelectedFontSize()\r\n\t{\r\n\t\treturn fontSizeList.getSelectedValue(); // return the currently selected font size\r\n\t}",
"private int getFontSize(LabelGeometry geom)\r\n {\r\n float fontSize = AWTUtilities.getFontSize(geom.getRenderProperties().getFont());\r\n\r\n // Scale based on the view\r\n Function<Kilometers, Float> scaleFunction = geom.getRenderProperties().getScaleFunction();\r\n if (scaleFunction != null)\r\n {\r\n float viewScale = scaleFunction.apply(myViewAltitudeSupplier.get()).floatValue();\r\n fontSize *= viewScale;\r\n }\r\n\r\n return Math.round(fontSize);\r\n }",
"public int getFontSize();",
"public float getFontSize();",
"public int getButtonTextSize(){\n return buttonTextSize;\n }",
"public int getLblWidth() {\n return lblWidth;\n }",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"private float getFontHeight(Paint paint) {\n Rect rect = new Rect();\n paint.getTextBounds(\"1\", 0, 1, rect);\n return rect.height();\n }",
"public int fontSize() {\n\t\treturn fixedFontSize;\n\t}",
"public String getFontSizeText()\r\n\t{\r\n\t\treturn fontSizeTextField.getText(); // return the text in the Font Size text field\r\n\t}",
"public double getFontSize(\n )\n {return fontSize;}",
"public float getFontSize() {\n return fontSize;\n }",
"public String getSizeLabel() {\n return (String)getAttributeInternal(SIZELABEL);\n }",
"public String getFontSize () {\n\t\treturn fontSizeTextField.getText();\n\t}",
"public int getTitleFontSize() {\n\t\treturn this.title_fontsize;\n\t}",
"private int calculateFontSize(ImageProcessor processor, double ratioHeightForLabel) {\n // Converts sumSizes into the average size in each dimension\n sumSizes.scale(1.0 / labels.size());\n FontSizeCalculator calculator = new FontSizeCalculator(processor, labels.stream());\n return calculator.calculateOptimalFontSize(sumSizes, ratioHeightForLabel);\n }",
"private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}",
"public final int getFontSize() {\n return fontSize;\n }",
"public int getFontSize()\r\n {\r\n return myFontSize;\r\n }",
"public int getPreferredHeight() \n { \n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getHeight() + VMARGIN;\n }",
"public int getSwitchTextSize(){\n return switchTextSize;\n }",
"public int getPreferredWidth() \n {\n Font font = Font.getDefault().derive( Font.BOLD, FONT_SIZE );\n return font.getAdvance( m_text ) + HMARGIN;\n }",
"public int getWidth() {\r\n if ( fontMetrics != null && lbl != null ) {\r\n return fontMetrics.stringWidth(lbl) + 12; \r\n } else {\r\n return 10;\r\n }\r\n }",
"public int getMyFontSize() {\n return myFont.size; /*Fault:: return 5; */\n }",
"public short getFontHeight()\n {\n return font.getFontHeight();\n }",
"public int getFontSize()\n \t{\n \t\treturn 13;\n \t}",
"public int getSelectionSize();",
"public Rectangle2D.Double getTextBounds() {\n\t\t\n\t\tdouble txtPinX = _parent.getTxtPinX();\n\t\tdouble txtPinY = _parent.getTxtPinY();\n\t\t\n\t\tdouble txtLocPinX = _parent.getTxtLocPinX();\n\t\tdouble txtLocPinY = _parent.getTxtLocPinY();\n\t\t\n\t\tdouble txtWidth = _parent.getTxtWidth();\n\t\tdouble txtHeight = _parent.getTxtHeight();\n\t\t\n\t\tdouble x = txtPinX - txtLocPinX;\n\t\tdouble y = txtPinY - txtLocPinY;\n\t\t\n\t\treturn new Rectangle2D.Double(x, y, txtWidth, txtHeight);\n\t}",
"int getTextStrokeWidth();",
"public int getTextLabelBackgroundColor() {\n\t\treturn mTextLabelBackgroundColor;\n\t}",
"public int setTextSize(int textSelection) {\n // Sets the text size in Settings\n Settings.setTextSize(textSelection);\n\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n return Settings.getTextSize();\n }",
"private int getTextHeight() {\n return lineHeight * (textBuffer.getMaxLine() - 1);\n }",
"public Dimension getPreferredSize() {\n\t\tif (getFont() != null) {\n\t\t\tFontMetrics fm = getFontMetrics(getFont());\n\n\t\t\treturn new Dimension(fm.stringWidth(label), fm.getHeight() + 10);\n\t\t} else\n\n\t\t\treturn new Dimension(10, 10); //no font\n\t}",
"float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}",
"public float getExampleDimension() {\n return mTextSize;\n }",
"public int getHeight() {\r\n if ( fontMetrics != null ) {\r\n return fontMetrics.getHeight() + 6;\r\n } else {\r\n return 6;\r\n }\r\n }",
"double width () {\n Text text = new Text(this.getText());\n text.setStyle(this.getStyle());\n return text.getBoundsInLocal().getWidth() * 1.5;\n }",
"public native final String fontSize() /*-{\n\t\treturn this.fontSize;\n\t}-*/;",
"public static int getWorkspaceIconTextSizeInPx(Context context) {\n if (mWorkspaceIconTextSize < 0) {\n mWorkspaceIconTextSize = PrefUtils.getIntPref(context, PrefConstants.KEY_ICON_TEXT_SIZE, -1);\n if (mWorkspaceIconTextSize < 0) {\n mWorkspaceIconTextSize = getDefaultWorkspaceIconTextSizeInPx(context);\n }\n }\n return mWorkspaceIconTextSize;\n }",
"public int getFront_label_size() {\n\t\treturn front_label_size;\n\t}",
"public int getMediumFontSize() {\n\t\treturn 10;\n\t}",
"public short getFontHeight() {\n\t\treturn this.fontHeight;\n\t}",
"public Dimension getPreferredSize() {\r\n\t\t\r\n\t\t// Calculate the preferred size based on a monospaced font.\r\n\t\t// Get the font metrics\r\n\t\tFontMetrics fm = getFontMetrics(font);\r\n\t\tint charHeight = fm.getMaxAscent() + fm.getMaxDescent();\r\n\t\tint charWidth = fm.charWidth('0');\r\n\r\n\t\tint minHeight = YPAD + (2 * BORDERWIDTH) + height + charHeight;\r\n\t\tint minWidth = 2 * ((2 * charWidth) + labelDist);\r\n\r\n\t\treturn new Dimension(minWidth, minHeight);\r\n\t}",
"public Font getLabelFont();",
"@Override\n public String getTextAlign() {\n return graphicsEnvironmentImpl.getTextAlign(canvas);\n }",
"public int getThickness ()\r\n {\r\n return glyph.getBounds().height;\r\n }",
"public String getSizeTextField(){\n\t\treturn textField.getText();\n\t}",
"public static int getAreaButtonTextSize(Context context, Typeface typeface) {\n DisplayMetrics displayMetrics = context.getResources()\n .getDisplayMetrics();\n // int deviceWidth = displayMetrics.widthPixels;\n int deviceWidth = displayMetrics.widthPixels;\n\n return determineTextSize(typeface, (int) (0.23f * (.14f * deviceWidth)));\n\n }",
"public Integer getFacetLabelHoverHeight() {\r\n return getAttributeAsInt(\"facetLabelHoverHeight\");\r\n }",
"public static float textHeight(BitmapFont fntIn, String sIn){\n return new GlyphLayout(fntIn,sIn).height;\n }",
"public short getFontHeightInPoints() {\n\t\treturn fontHeightInPoints;\n\t}",
"public void setLabelSize(int labelSize)\n {\n myLabelSize = labelSize;\n }",
"double width () {\n Text text = new Text(event.name);\n text.setStyle(this.getStyle());\n return text.getBoundsInLocal().getWidth() * 1.5;\n }",
"public double getLblSpacing() {\n return lblSpacing;\n }",
"public short getFontHeightInPoints()\n {\n return ( short ) (font.getFontHeight() / 20);\n }",
"public NodeSize getNodeSize() {\n String str = findSelected(node_sizes);\n if (str.equals(NODE_SZ_INVISIBLE)) { return NodeSize.INVISIBLE;\n } else if (str.equals(NODE_SZ_SMALL)) { return NodeSize.SMALL;\n } else if (str.equals(NODE_SZ_LARGE)) { return NodeSize.LARGE;\n } else if (str.equals(NODE_SZ_VARY)) { return NodeSize.VARY; \n } else if (str.equals(NODE_SZ_VARY_LOG)) { return NodeSize.VARY_LOG;\n } else if (str.equals(NODE_SZ_TYPE)) { return NodeSize.TYPE;\n } else if (str.equals(NODE_SZ_GRAPHINFO)) { return NodeSize.GRAPHINFO;\n } else if (str.equals(NODE_SZ_CLUSTERCO)) { return NodeSize.CLUSTERCO;\n } else if (str.equals(NODE_SZ_LABEL)) { return NodeSize.LABEL;\n } else return NodeSize.LARGE;\n }",
"double getFontSizeAdjustment() {\n return fontSizeAdjustment;\n }",
"public final Rectangle getBounds() {\n return label.getBounds();\n }",
"public float getLineHeightMultiplier() {\n return mTextContainer.getLineHeightMultiplier();\n }",
"public String nodeSize() { return findSelected(node_sizes); }",
"private void setDefaultTextSize() {\n this.text_size = (int) default_text_size;\n }",
"public int getSubtitleFontSize() {\n\t\treturn this.subtitle_fontsize;\n\t}",
"public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }",
"private int getNormalTextSizeWeight() {\n return Integer.parseInt(getMessage(\"report.tabular.normal.text.size.weight\"));\n }",
"private float getYAxisLabelHeight() {\n return ViewUtils.getTextHeight(mYAxisTextPaint, PERCENTAGE_PERFECT);\n }",
"public float getFontHeight(float fontSize) {\n Font f = getNormalFont(fontSize);\n FontMetrics fm = svgGenerator.getFontMetrics(f);\n return fm.getHeight();\n }",
"public void setTextSize(float textSize){\n Context context = getContext();\n Resources res;\n\n if(context == null){\n res = Resources.getSystem();\n }else{\n res = context.getResources();\n }\n\n setTextSizePx(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, textSize, res.getDisplayMetrics()));\n }",
"public int getSetSize(){ return Integer.parseInt(setSize.getText()); }",
"String getPreviewSizePref();",
"int getCurrentSize();",
"public float getHeight() {\n\t\t\n\t\tfloat height = 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\tFontChar c = font.getChar(text.charAt(i));\n\t\t\tfloat h = (c.T_HEIGHT + c.Y_OFFSET) * size;\n\t\t\t\n\t\t\tif(h > height)\n\t\t\t\theight = h;\n\t\t}\n\t\t\n\t\treturn height;\n\t}",
"String getWidth();",
"String getWidth();",
"@Override\n public String getTextBaseline() {\n return graphicsEnvironmentImpl.getTextBaseline(canvas);\n }",
"private float getYAxisLabelWidth() {\n return ViewUtils.getTextWidth(mYAxisTextPaint, PERCENTAGE_PERFECT);\n }",
"public void setTextSize() {\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"public Font getLabelFont() {\n return labelFont;\n }",
"private void setupTextSize()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tthis.mTextSize = (int) res.getDimension(R.dimen.tsz_main);\n\t}",
"static int itemSize(final boolean focus) {\r\n return GUIProp.fontsize + (focus ? 4 : 2);\r\n }",
"public void setTextSize(float size) {\n\n if (size > 24f)\n size = 24f;\n if (size < 6f)\n size = 6f;\n\n mTextSize = Utils.convertDpToPixel(size);\n }",
"public int getLegendSize() {\n\t\t\n\t\treturn size;\n\t}",
"@Override\n public float getH() {\n return h + font.getSize() + border.getH();\n }",
"public void setTextLabelFontSize(int mTextLabelFontSize) {\n\t\tthis.mTextLabelFontSize = mTextLabelFontSize;\n\t}",
"public Integer getFacetLabelHoverWidth() {\r\n return getAttributeAsInt(\"facetLabelHoverWidth\");\r\n }",
"public int height()\n throws Exception\n {\n return this.text.height();\n }",
"protected int getContentHeight()\n {\n return this.getSize() * GuiStats.this.fontRenderer.FONT_HEIGHT * 4;\n }",
"public Point getSize() {\n checkWidget();\n return parent.fixPoint( itemBounds.width, itemBounds.height );\n }",
"public void setLabelFont(int fontSize){\n Font labelFont = new Font(\"Serif\", Font.PLAIN, fontSize);\n minLabel.setFont(labelFont);\n medLabel.setFont(labelFont);\n maxLabel.setFont(labelFont);\n emptyLabel.setFont(labelFont);\n errorLabel.setFont(labelFont);\n }",
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"public void checkTextSize(){\n mShp = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n String textSize = mShp.getString(\n getString(R.string.pref_textSize_key),\n getString(R.string.pref_textSize_default)\n );\n float size = Float.parseFloat(textSize);\n mTaleText.setTextSize(TypedValue.COMPLEX_UNIT_SP,size);\n }",
"public LinkSize getLinkSize() {\n String str = findSelected(link_sizes);\n if (str.equals(LINK_SZ_INVISIBLE)) { return LinkSize.INVISIBLE;\n } else if (str.equals(LINK_SZ_THIN)) { return LinkSize.THIN;\n } else if (str.equals(LINK_SZ_NORMAL)) { return LinkSize.NORMAL;\n } else if (str.equals(LINK_SZ_THICK)) { return LinkSize.THICK;\n } else if (str.equals(LINK_SZ_VARY)) { return LinkSize.VARY;\n } else if (str.equals(LINK_SZ_CONDUCT)) { return LinkSize.CONDUCT;\n } else if (str.equals(LINK_SZ_CLUSTERP)) { return LinkSize.CLUSTERP;\n } else return LinkSize.NORMAL;\n }",
"public float getWidth() {\n\t\t\n\t\tfloat width= 0;\n\t\tfor(int i = 0; i < text.length(); i++) {\n\t\t\twidth += font.getChar(text.charAt(i)).X_ADVANCE * size;\n\t\t}\n\t\t\n\t\treturn width;\n\t}",
"private LabelLayout labelBounds(Font drawFont, FontRenderContext frc, String txt)\r\n {\r\n String[] lines = txt.split(\"\\\\n\");\r\n double maxW = 0.0;\r\n double maxH = 0.0;\r\n for (String ln : lines)\r\n {\r\n Rectangle2D r = drawFont.createGlyphVector(frc, ln).getLogicalBounds();\r\n maxW = Math.max(maxW, r.getWidth());\r\n maxH = Math.max(maxH, r.getHeight());\r\n }\r\n LabelLayout lay = new LabelLayout();\r\n lay.lineH = maxH;\r\n lay.rect = new Rectangle2D.Double(0.0, 0.0, maxW, maxH * lines.length);\r\n return lay;\r\n }"
] | [
"0.7845061",
"0.7531779",
"0.7491415",
"0.7257747",
"0.71617025",
"0.7073258",
"0.683011",
"0.68141836",
"0.6809236",
"0.6753997",
"0.667246",
"0.66420656",
"0.6584868",
"0.65584713",
"0.6523109",
"0.6491633",
"0.64866316",
"0.6425233",
"0.64211464",
"0.64124674",
"0.64055645",
"0.6362502",
"0.63394374",
"0.633507",
"0.6333499",
"0.6308535",
"0.6293206",
"0.6281501",
"0.6269687",
"0.626955",
"0.62683773",
"0.62663287",
"0.626176",
"0.6241462",
"0.622831",
"0.6219428",
"0.6214799",
"0.62099785",
"0.6204781",
"0.6202528",
"0.6193195",
"0.6173506",
"0.6167063",
"0.61544687",
"0.6148309",
"0.6137345",
"0.6121848",
"0.6121499",
"0.6118342",
"0.6104426",
"0.60787624",
"0.60731936",
"0.6060802",
"0.6039122",
"0.6038057",
"0.6029133",
"0.602649",
"0.60203797",
"0.5997726",
"0.59974694",
"0.5985722",
"0.5974901",
"0.5968836",
"0.59669167",
"0.59552145",
"0.5939922",
"0.588159",
"0.5879297",
"0.5877168",
"0.58517486",
"0.5842666",
"0.5840904",
"0.58404",
"0.58260745",
"0.58248204",
"0.5815698",
"0.5815035",
"0.57952446",
"0.57952446",
"0.5789595",
"0.5788514",
"0.57755524",
"0.5775407",
"0.5775407",
"0.5764813",
"0.57620615",
"0.5739372",
"0.571269",
"0.5698747",
"0.56756574",
"0.56734437",
"0.56697446",
"0.56642854",
"0.5658952",
"0.5657893",
"0.56571925",
"0.5651076",
"0.56421125",
"0.5632124",
"0.5627159"
] | 0.7014955 | 6 |
returns the color that is currently set for the highlighted labels | public Integer getHightlightedTextColor() {
if (mHightlightedTextColor != null)
return mHightlightedTextColor;
return getTextColor();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Color getHighlight();",
"public static Color getColor() { return lblColor.getBackground(); }",
"public Color getLblColor() {\n return lblColor;\n }",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"public Color getHighlightColor() {\n return highlightColor;\n }",
"@Override\n public Color getHighlightedColor() { return getLine().getMapColor(); }",
"public String nodeColor() { return findSelected(node_colors); }",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public Color getCurrentColor();",
"public Color getSelectedColor() {\n return this.selectedColor;\n }",
"public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}",
"public NodeColor getNodeColor() {\n String str = findSelected(node_colors);\n if (str.equals(NODE_CO_WHITE)) { return NodeColor.WHITE;\n } else if (str.equals(NODE_CO_VARY)) { return NodeColor.VARY;\n } else if (str.equals(NODE_CO_LABEL)) { return NodeColor.LABEL;\n } else if (str.equals(NODE_CO_CLUSTERCO)) { return NodeColor.CLUSTERCO;\n } else return NodeColor.WHITE;\n }",
"@Override\r\n\tpublic Color getHighlightColor(Object rel) {\n\t\treturn DARK_RED;\r\n\t}",
"public int getSelectionColor()\n\t{\n\t\treturn getObject().getSelectionColor();\n\t}",
"public Color getSelectedColor() {\r\n return mColor;\r\n }",
"public static Color getButtonColorHighlight() {\n return BUTTONCOLOR_HIGHLIGHT;\n }",
"public String getTextColor();",
"public String getColor() {\n return currentLocation.getNodeColor();\n }",
"public String getColorAsString() {\n\t\treturn getValue(CommonProperty.COLOR, AbstractLabels.DEFAULT_COLOR);\n\t}",
"Integer getTxtColor();",
"String getColor();",
"public LinkColor getLinkColor() {\n String str = findSelected(link_colors);\n if (str.equals(LINK_CO_GRAY)) { return LinkColor.GRAY;\n } else if (str.equals(LINK_CO_VARY)) { return LinkColor.VARY;\n } else return LinkColor.GRAY;\n }",
"public int getTextLabelBackgroundColor() {\n\t\treturn mTextLabelBackgroundColor;\n\t}",
"public Color getColor() {\n return Color.YELLOW;\n }",
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"public int textColor() {\n\t\treturn textColor;\n\t}",
"public Integer getCurrentColor() {\n for (int i = 0; i < colorPickers.size(); i++) {\n if (colorPickers.get(i).isSelected()) {\n return colorPickers.get(i).getColor();\n }\n }\n return null;\n }",
"public Paint getPaintHighlight() {\n return mHighlightPaint;\n }",
"public Integer getColor() {\n\t\treturn color;\n\t}",
"public String getColor() {\r\n return color;\r\n }",
"public String getColor() {\r\n\t\treturn color;\r\n\t}",
"public String getColor() { \n return color; \n }",
"@AutoEscape\n\tpublic String getTextColor();",
"public String getColor()\n {\n return color;\n }",
"public String getColor()\n {\n return color;\n }",
"public Color getColor() {\r\n return currentColor;\r\n }",
"public Color getColor()\r\n {\r\n return currentColor;\r\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n return color;\n }",
"public String getColor() {\n\t\treturn color;\n\t}",
"public String getColor() {\n\t\treturn color;\n\t}",
"public Color color() {\n\t\tswitch (this) {\n\t\tcase FATAL: {\n\t\t\tColor c = UIManager.getColor(\"nb.errorForeground\"); // NOI18N\n\t\t\tif (c == null) {\n\t\t\t\tc = Color.RED.darker();\n\t\t\t}\n\t\t\treturn c;\n\t\t}\n\t\tcase WARNING:\n\t\t\treturn Color.BLUE.darker();\n\t\tcase INFO:\n\t\t\treturn UIManager.getColor(\"textText\");\n\t\tdefault:\n\t\t\tthrow new AssertionError();\n\t\t}\n\t}",
"private ElementColor selectColor() {\n\n\t\treturn Theme.defaultColor(); \n\t}",
"public int getColor() {\n \t\treturn color;\n \t}",
"public int getColor();",
"public int getColor();",
"public String linkColor() { return findSelected(link_colors); }",
"private int getCurrentMainColor () {\n int translatedHue = 255 - ( int ) ( mCurrentHue * 255 / 360 );\n int index = 0;\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 0, ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255 - ( int ) i, 0, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, ( int ) i, 255 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 0, 255, 255 - ( int ) i );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( ( int ) i, 255, 0 );\n index++;\n }\n for ( float i = 0; i < 256; i += 256 / 42 ) {\n if ( index == translatedHue )\n return Color.rgb( 255, 255 - ( int ) i, 0 );\n index++;\n }\n return Color.RED;\n }",
"@Override\n public String getColor() {\n return this.color;\n }",
"public Color getColor() {\r\n return Color.GRAY;\r\n }",
"public String getColor(){\n\t\treturn color;\n\t}",
"public Color getForeground();",
"public String getColor()\n {\n return this.color;\n }",
"java.awt.Color getColor();",
"@Override\n\tpublic String getColor() {\n\t\treturn \"red\";\n\t}",
"public Color getTextColor();",
"public String getColorString();",
"@Override\n public String getColor() {\n return this.color.name();\n }",
"@Override\n\tpublic String getColor() {\n\t\treturn \"blue\";\n\t}",
"@Override\r\n\tpublic Color backgroundColor() {\n\t\tProperty<IntegerPropertyType> colorDiff = this.getProperty(PROPERTY_NAME_COLOR_DIFFERENCE);\r\n\t\tColor c = labs[colorDiff.getValue().intValue() % labs.length].getColor();\r\n\t\t\r\n\t\treturn c;\r\n\t}",
"public short getColor()\n {\n return font.getColorPaletteIndex();\n }",
"public String getColor() {\n return this.color;\n }",
"public RMColor getColor()\n {\n return getStyle().getColor();\n }",
"public static Color getTreeSelectionColor() {\n return TREE_SELECTION_BACKGROUND;\n }",
"public Color getColor() {\n\t\treturn Color.GRAY;\n\t}",
"public String getColor() {\n\t\treturn null;\n\t}",
"public int getColor(){\r\n\t\treturn color;\r\n\t}",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"Color getColor();",
"public int getColor() {\n return color;\n }",
"public int getColor(){\n\t\treturn color;\n\t}",
"public int getColor(){\n\t\treturn color;\n\t}",
"public int getTextColor() {\n return mTextColor;\n }",
"public Color getForegroundColor() {\n return foreColor;\n }",
"public ColorAction getHighlightColorAction() {\n return colorAction;\n }",
"public Color getColor()\r\n\t{\r\n\t\treturn _g2.getColor();\r\n\t}",
"public String getColor(){\r\n return color;\r\n }",
"public GraphColor getColor( ) {\n return color;\n }",
"int getHighLightColor();",
"@NoProxy\n @NoWrap\n @NoDump\n public String getColor() {\n return color;\n }",
"String getTextStrokeColorAsString();",
"public int getColorValue() {\r\n\t\treturn color;\r\n\t}",
"public String getColor(){\n return this._color;\n }",
"public String getLabelColorText(DotPalette pal) {\n return (this==BLACK || (pal==DotPalette.STANDARD && (this==RED || this==BLUE))) ? \"white\" : \"black\";\n }",
"public Color getColor() {\n return internalGroup.getColor();\n }",
"RGB getOldColor();",
"public Color getLineColor();",
"public IsColor getHoverColor() {\n\t\treturn ColorBuilder.parse(getHoverColorAsString());\n\t}",
"public int getColor() {\n return this.color;\n }",
"public Color getBorderSelectionColor() {\n\treturn borderSelectionColor;\n }",
"public Color getSelectionForeground() {\n checkWidget();\n Color result = selectionForeground;\n if( result == null ) {\n CTabFolderThemeAdapter adapter = getCTabFolderThemeAdapter();\n result = adapter.getSelectedForeground( this );\n }\n if( result == null ) {\n // Should never happen as the theming must prevent transparency for\n // this color\n throw new IllegalStateException( \"Transparent selection foreground color\" );\n }\n return result;\n }"
] | [
"0.77675945",
"0.7636948",
"0.74136186",
"0.7397153",
"0.7228443",
"0.7217578",
"0.7071577",
"0.70682615",
"0.7062303",
"0.70059574",
"0.6992849",
"0.69569933",
"0.69380057",
"0.6874557",
"0.68672",
"0.68348736",
"0.68266904",
"0.6781496",
"0.6763982",
"0.67516696",
"0.6632039",
"0.66314775",
"0.66146004",
"0.65990925",
"0.6585262",
"0.6582303",
"0.6572359",
"0.65704393",
"0.65664434",
"0.6564511",
"0.6552877",
"0.65480256",
"0.6543908",
"0.6538793",
"0.6538793",
"0.6538242",
"0.6508424",
"0.65028447",
"0.65028447",
"0.65028447",
"0.65028447",
"0.65028447",
"0.65028447",
"0.65028447",
"0.65028447",
"0.6500159",
"0.6500159",
"0.6493854",
"0.6491782",
"0.64770746",
"0.64695233",
"0.64695233",
"0.64618635",
"0.64571154",
"0.6452562",
"0.64308715",
"0.6429538",
"0.64260584",
"0.64201474",
"0.64097416",
"0.6408511",
"0.6403198",
"0.6402709",
"0.640117",
"0.64000034",
"0.6391957",
"0.6390138",
"0.63871884",
"0.63857555",
"0.63829386",
"0.6382688",
"0.63788986",
"0.6370302",
"0.6346629",
"0.6346629",
"0.6346629",
"0.6346629",
"0.6346629",
"0.63423",
"0.633933",
"0.633933",
"0.63283926",
"0.631601",
"0.6310339",
"0.63009053",
"0.62876475",
"0.6287571",
"0.62846637",
"0.6270526",
"0.6269869",
"0.6255655",
"0.62425137",
"0.62368715",
"0.62339777",
"0.6229644",
"0.62273145",
"0.6222774",
"0.62156224",
"0.6212366",
"0.62049395"
] | 0.64634925 | 52 |
sets a specific Typeface for the highlighted labels | public void setHightlightedTypeface(Typeface mHightlightedTypeface) {
this.mHightlightedTypeface = mHightlightedTypeface;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void settypeface() {\n }",
"void setFontFamily(ReaderFontSelection f);",
"public void setLabelFont(Font f);",
"@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }",
"private void setFont() {\n\t}",
"public void setFontToSpinner(Typeface mTypeFace){\n tf=mTypeFace;\n }",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"public void setTypeface(Typeface tf) {\n mTypeface = tf;\n }",
"public void setFont(Font value) {\r\n this.font = value;\r\n }",
"private void setType(int t) {\n\t\ttype = t;\n\t\tfloat f;\n\t\tswitch (t) {\n\t\t\tcase 21:\n\t\t\t\tf = 18F;\n\t\t\t\tthis.setForeground(Color.white);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tf = 24F;\n\t\t\t\tbreak;\n\t\t}\n\t\tfont = font.deriveFont(f);\n\t\tthis.setFont(font);\n\t}",
"private void setTypeFaces(Typeface customTypeFace) {\n mPlayButton.setTypeface(customTypeFace);\n mOptionsButton.setTypeface(customTypeFace);\n mHelpButton.setTypeface(customTypeFace);\n }",
"private Typeface getTypeface(TypefaceName tfn){\n\n switch (tfn) {\n case FURMANITE:\n return moodPromptFont;\n case DATACONTROL:\n return conversationFont;\n default:\n //TODO: pick a Default\n return conversationFont;\n }\n\n }",
"public void setTypeface(Typeface typeface) {\n mTextContainer.setTypeface(typeface);\n }",
"public void setTextFont(Font font);",
"public void changeFonts(){\n Typeface typeFace = Typeface.createFromAsset (this.getAssets (), \"fonts/courier.ttf\");\n sloganTV.setTypeface (typeFace);\n }",
"public void setNodeLabelFont(Font value) {\n nodeLabelfont = value;\n }",
"public Typeface getTypeface() {\n return mTextContainer.getTypeface();\n }",
"private void setLayout(){\n Typeface typeface = ResourcesCompat.getFont(getActivity(), R.font.acumin);\n txtName.setTypeface(typeface);\n txtNickname.setTypeface(typeface);\n }",
"void setShapeLabel(String Label);",
"public void setFont(RMFont aFont) { }",
"private void loadSettingFont() {\n\t\tSharedPreferences mysettings = getSharedPreferences(\n\t\t\t\tPREFERENCES_FILE_NAME, 0);\n\t\tindexFont = mysettings.getInt(\"indexFont\", 1);\n\t\tLog.d(\"indexFont\", indexFont + \"\");\n\t\tswitch (indexFont) {\n\t\tcase 0:\n\t\t\tmTypeface = Typeface.DEFAULT;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"tinhyeu.ttf\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"thuphap.ttf\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\t}\n\t}",
"private void setCustomTypeface(Context context, AttributeSet attrs) {\n if (isInEditMode() || attrs == null || Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {\n return;\n }\n\n TypedArray styledAttrs = context.obtainStyledAttributes(attrs, R.styleable.PinCodeView);\n String fontName = styledAttrs.getString(R.styleable.PinCodeView_typeface);\n styledAttrs.recycle();\n\n if (fontName != null) {\n Typeface typeface = getFont(context, fontName);\n setTypeface(typeface);\n }\n }",
"private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }",
"public void setBracketfont(String val)\r\n\t{\r\n\t\t_bracketFont = val;\r\n\t}",
"public void setModifierFont(String name, int type, int size, float tracking, Boolean kerning) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size, kerning, tracking);\n _SPR.RefreshModifierFont();\n }",
"private void updateFont() {\n this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),\n Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),\n this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),\n Font.NORMAL,\n this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex())); \n }",
"private void m32687a(TextView textView, Typeface typeface) {\n if (textView != null) {\n textView.setTypeface(typeface);\n }\n }",
"private void initFonts() {\n Typeface typeFace = Typeface.createFromAsset(getAssets(), \"fonts/BuriedBeforeBB_Reg.otf\");\n\n TextView textViewScore = (TextView) findViewById(R.id.txtScore);\n TextView textViewLives = (TextView) findViewById(R.id.txtLives);\n TextView txtGameOver = (TextView) findViewById(R.id.txtGameOver);\n TextView txtGameOver2 = (TextView) findViewById(R.id.txtGameOver2);\n\n textViewScore.setTypeface(typeFace);\n textViewLives.setTypeface(typeFace);\n txtGameOver.setTypeface(typeFace);\n txtGameOver2.setTypeface(typeFace);\n txtNextLevel.setTypeface(typeFace);\n }",
"private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }",
"public void setTextSettings(){\n\n ArrayList<Text> headlines = new ArrayList<>();\n //Add any text element here\n //headlines.add(this.newText);\n\n Color textColorHeadlines = new Color(0.8,0.8,0.8,1);\n\n for ( Text text : headlines ){\n text.setFont(Font.font(\"verdana\", FontWeight.BOLD, FontPosture.REGULAR, 20));\n text.setFill(textColorHeadlines);\n text.setEffect(new DropShadow(30, Color.BLACK));\n\n }\n\n }",
"public void setLabelFont(int fontSize){\n Font labelFont = new Font(\"Serif\", Font.PLAIN, fontSize);\n minLabel.setFont(labelFont);\n medLabel.setFont(labelFont);\n maxLabel.setFont(labelFont);\n emptyLabel.setFont(labelFont);\n errorLabel.setFont(labelFont);\n }",
"@Override\n\tpublic void setText(CharSequence text, BufferType type) {\n\t\tString selected_font = StoreUtil.getInstance().selectFrom(\"fonts\");\n\t\tif(selected_font != null){\n\t\t\tif(selected_font.equals(\"myanmar3\")){\n\t\t\t\tif(text != null){\n\t\t\t\t\ttext = FontConverter.zg12uni51(text.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsuper.setText(text, type);\n\t}",
"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 native void setFont(Font value) /*-{\n\t\tvar jso = [email protected]::getJsObj()();\n\t\tjso.font = [email protected]::getJsObj()();\n }-*/;",
"public Font getLabelFont();",
"public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}",
"public void setFont(Font f) {\n font = f;\n compute();\n }",
"public void apply() {\n this.vgcomponent.setFont( this.fontchooser.getSelectedFont() );\n this.vgcomponent.setFontcolor( this.fontcolor.getColor() );\n\n if( this.vgcomponent instanceof VisualEdge ) {\n VisualEdge vEdge = (VisualEdge) this.vgcomponent;\n vEdge.getEdge().setFollowVertexLabel( this.followLabel.isSelected() );\n if( !this.followLabel.isSelected() ) {\n vEdge.getEdge().setLabel( this.textarea.getText() );\n }\n }\n else {\n this.vgcomponent.setLabel( this.textarea.getText() );\n }\n }",
"public Handler(Font f)\n {\n font_var=f; //sets font as font button selected\n }",
"public void setFont(Font newFont) {\n\tfont = newFont;\n }",
"public S<T> font(String fileName){\n\t\t\n\t\tTypeface font = Typeface.createFromAsset(activity.getAssets(), fileName);\n\t\t\n\t\tif(t instanceof TextView){\n\t\t\t((TextView)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof Button){\n\t\t\t((Button)t).setTypeface(font);\n\t\t}\t\n\t\tif(t instanceof EditText){\n\t\t\t((EditText)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof CheckBox)\n\t\t{\n\t\t\t((CheckBox)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof RadioButton)\n\t\t{\n\t\t\t((RadioButton)t).setTypeface(font);\n\t\t}\n\t\tif(t instanceof LinkedList){\n\t\t\tLinkedList<View> auxl = (LinkedList<View>)t;\n\t\t\tfor (View v : auxl) {\n\t\t\t\tt= (T) v;\n\t\t\t\tfont(fileName);\n\t\t\t}\n\t\t\t\n\t\t\tt= (T) auxl;\n\t\t}\n\t\t\n\t\t\n\t\treturn this;\n\t}",
"private void setStringTypeFace(String s, Typeface font,MenuItem menuItem) {\n\t\tSpannableString mNewTitle = new SpannableString(s);\n mNewTitle.setSpan(new CustomTypefaceSpan(\"\", font), 0, mNewTitle.length(), Spanned.SPAN_INCLUSIVE_INCLUSIVE);\n menuItem.setTitle(mNewTitle);\n\t}",
"public void setFont(Font fnt) {\n\t\tborder.setTitleFont(fnt);\n\t}",
"public void familiesActionPerformed(java.awt.event.ActionEvent evt) {\n myFont.font = (String) families.getSelectedItem(); /*FAULT:: myFont.font = \"xyz\"; */\n }",
"public void setFontStyle(TextView textObject) {\n textObject.setTypeface(mFontStyle);\n }",
"public void initializeText(){\n\t\tfont = new BitmapFont();\n\t\tfont1 = new BitmapFont();\n\t\tfont1.setColor(Color.BLUE);\n\t\tfont2 = new BitmapFont();\n\t\tfont2.setColor(Color.BLACK);\n\t}",
"public void setFont(Font newFont) {\r\n\t\tfont = newFont;\r\n\t}",
"public void m4448a(WeakReference<TextView> textViewWeak, Typeface typeface) {\n if (this.f2978i) {\n this.f2977h = typeface;\n TextView textView = (TextView) textViewWeak.get();\n if (textView != null) {\n textView.setTypeface(typeface, this.f2976g);\n }\n }\n }",
"public void onClick(View v) {\n Log.d(\"test\", \"Hello Dipankar:\"+type);\n // startActivity(intent);\n switch(type){\n case 1: txt.setTypeface(Typeface.MONOSPACE);\n break;\n case 2:\n txt.setTypeface(Typeface.SANS_SERIF);\n break;\n case 3:\n Typeface tf = Typeface.createFromAsset(getAssets(), \"fonts/Molot.otf\");\n txt.setTypeface(tf);\n }\n type =type%3+1;\n }",
"public void setFont(String str) {\n if (Strings.notEmpty(str)) {\n Typeface typeface = FontUtils.getTypeface(this.textView.getContext(), str);\n if (typeface != null) {\n this.textView.setTypeface(typeface);\n }\n }\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n String selectFont;\n selectFont = \"fonts/\" + parent.getItemAtPosition(position).toString() + \".ttf\";\n sendFontChange(selectFont);\n\n /*switch (position) {\n case 0:\n Toast.makeText(parent.getContext(), \"System Font\", Toast.LENGTH_SHORT).show();\n break;\n\n case 1:\n Toast.makeText(parent.getContext(), \"Helvetica\", Toast.LENGTH_SHORT).show();\n break;\n\n case 2:\n Toast.makeText(parent.getContext(), \"Helvetica-Neue\", Toast.LENGTH_SHORT).show();\n break;\n\n case 3:\n Toast.makeText(parent.getContext(), \"Impact\", Toast.LENGTH_SHORT).show();\n break;\n\n default:\n return;\n } */\n }",
"public void setFont(Font font)\n {\n this.font = font;\n }",
"public void setFontLevel(int level) {\n super.setFontLevel(level);\n Object[] objectsToSize = new Object[]\n {unmarkedLabel, fixedCoordinatesItem};\n FontSizer.setFonts(objectsToSize, level);\n }",
"private void initFontAndChange(Context context) {\n changeFont(context);\n }",
"public void setTextFont(Font font)\n {\n setFont(font);\n }",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public static void setRobotoFont(Activity context, View view)\n {\n if (view instanceof ViewGroup)\n {\n for (int i = 0; i < ((ViewGroup)view).getChildCount(); i++)\n {\n setRobotoFont(context, ((ViewGroup)view).getChildAt(i));\n }\n }\n else if (view instanceof TextView)\n {\n TextView tv = (TextView) view;\n Typeface currentTypeface = tv.getTypeface();\n Typeface tf = getRobotoTypeface(context, currentTypeface);\n Log.v(\"SET_FONTS\", String.format(\"Setting typeface font %s on TextView %s\", tf.toString(), tv.getText()));\n tv.setTypeface(tf);\n }\n else if (view instanceof Button)\n {\n Button btn = (Button) view;\n Typeface currentTypeface = btn.getTypeface();\n Typeface tf = getRobotoTypeface(context, currentTypeface);\n Log.v(\"SET_FONTS\", String.format(\"Setting typeface font %s on Button %s\", tf.toString(), btn.getText()));\n btn.setTypeface(getRobotoTypeface(context, currentTypeface));\n }\n }",
"public void setFont(int fontId){\n this.fontId = fontId;\n }",
"public void setMatchFontName(String matchFontName);",
"public void setTextColor(String textColor);",
"void setRendererType(String rendererType);",
"public void setTamilText(TextView textName, int id) {\r\n if (GlobalAppState.language.equalsIgnoreCase(\"hi\")) {\r\n Typeface tfBamini = Typeface.createFromAsset(ct.getAssets(), \"fonts/Bamini.ttf\");\r\n textName.setTypeface(tfBamini, Typeface.BOLD);\r\n textName.setText(TamilUtil.convertToTamil(TamilUtil.BAMINI, ct.getString(id)));\r\n } else {\r\n textName.setText(ct.getString(id));\r\n }\r\n }",
"void setFontSpacingSlider(Font font);",
"public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;",
"public void setFont(BitmapFont font) {\n\t\tthis.font = font;\n\t\tthis.setLabel(this.label);\n\t}",
"private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}",
"@Override\n\tpublic void highlight(ImageType origin) {\n\t\t\n\t}",
"public void setHighlight(boolean high);",
"void setGOLabelTextColor(DREM_Timeiohmm.Treenode treeptr, Color newColor) {\n\t\tif (treeptr != null) {\n\t\t\ttreeptr.goText.setTextPaint(newColor);\n\n\t\t\tfor (int nchild = 0; nchild < treeptr.numchildren; nchild++) {\n\t\t\t\tsetGOLabelTextColor(treeptr.nextptr[nchild], newColor);\n\t\t\t}\n\t\t}\n\t}",
"private void setHeaderText()\n {\n AssetManager am = getApplicationContext().getAssets();\n typeface = Typeface.createFromAsset(am,\n String.format(Locale.US, \"fonts/%s\", \"ConcursoItalian_BTN.ttf\"));\n headerText = (TextView) findViewById(R.id.headerText);\n headerSubText = (TextView) findViewById(R.id.headerSubText);\n headerText.setTypeface(typeface);\n headerSubText.setTypeface(typeface);\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Font currentFont = jshellLabGlobal.Interpreter.GlobalValues.globalEditorPane.getFont();\r\n Font newFont = new Font(currentFont.getFontName(), currentFont.getStyle(), currentFont.getSize()+1);\r\n jshellLabGlobal.Interpreter.GlobalValues.globalEditorPane.setFont(newFont);\r\n }",
"public void title(){\n textFont(select,30);\n fill(150);\n text(\"PLANE SELECT\",482,72);\n fill(0);\n text(\"PLANE SELECT\",480,70);\n}",
"public void setTextColorAndFont(GraphicsContext graphicsContext) {\r\n\t\tgraphicsContext.setFill(Color.WHITE);\r\n\t\tgraphicsContext.setFont(Font.font(25));\r\n\t}",
"void setFontSize(float fontSize)\r\n\t{\r\n\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\tif (fontIndex != -1)\r\n\t\t{\r\n\t\t\tappearanceTokens.set(fontIndex - 1, new COSFloat(fontSize));\r\n\t\t}\r\n\t}",
"public interface IAssetFontView {\n\n Context getContext();\n void setTypeface(Typeface typeFace);\n}",
"public void setLabelText(String text);",
"public Typeface getTypeface() {\n return mTypeface;\n }",
"public void setFont(Font font) {\n\tthis.font = font;\n }",
"public void set_fonts(Graphics2D g2, float scale) {\n if ( XHSIPreferences.get_instance().get_bold_fonts() ) {\n this.font_statusbar = new Font(\"Verdana\", Font.PLAIN, 9);\n this.font_tiny = new Font( \"Verdana\", Font.BOLD, 10);\n this.font_small = new Font( \"Verdana\", Font.BOLD, 12);\n this.font_medium = new Font( \"Verdana\", Font.BOLD, 16);\n this.font_large = new Font( \"Verdana\", Font.PLAIN, 24);\n this.font_zl = new Font( \"Verdana\", Font.PLAIN, Math.round(64.0f * scale));\n this.font_yl = new Font( \"Verdana\", Font.PLAIN, Math.round(32.0f * scale));\n this.font_xxl = new Font( \"Verdana\", Font.BOLD, Math.round(24.0f * scale));\n this.font_xl = new Font( \"Verdana\", Font.BOLD, Math.round(21.0f * scale));\n this.font_l = new Font( \"Verdana\", Font.BOLD, Math.round(18.0f * scale));\n this.font_m = new Font( \"Verdana\", Font.BOLD, Math.round(16.0f * scale));\n this.font_s = new Font( \"Verdana\", Font.BOLD, Math.round(14.0f * scale));\n this.font_xs = new Font( \"Verdana\", Font.BOLD, Math.round(12.0f * scale));\n this.font_xxs = new Font( \"Verdana\", Font.BOLD, Math.round(10.0f * scale));\n this.font_normal = new Font( \"Verdana\", Font.BOLD, Math.round(14.0f * scale));\n } else {\n this.font_statusbar = new Font(\"Verdana\", Font.PLAIN, 9);\n this.font_tiny = new Font( \"Verdana\", Font.PLAIN, 10);\n this.font_small = new Font( \"Verdana\", Font.PLAIN, 12);\n this.font_medium = new Font( \"Verdana\", Font.PLAIN, 16);\n this.font_large = new Font( \"Verdana\", Font.PLAIN, 24);\n this.font_zl = new Font( \"Verdana\", Font.PLAIN, Math.round(64.0f * scale));\n this.font_yl = new Font( \"Verdana\", Font.PLAIN, Math.round(32.0f * scale));\n this.font_xxl = new Font( \"Verdana\", Font.PLAIN, Math.round(24.0f * scale));\n this.font_xl = new Font( \"Verdana\", Font.PLAIN, Math.round(21.0f * scale));\n this.font_l = new Font( \"Verdana\", Font.PLAIN, Math.round(18.0f * scale));\n this.font_m = new Font( \"Verdana\", Font.PLAIN, Math.round(16.0f * scale));\n this.font_s = new Font( \"Verdana\", Font.PLAIN, Math.round(14.0f * scale));\n this.font_xs = new Font( \"Verdana\", Font.PLAIN, Math.round(12.0f * scale));\n this.font_xxs = new Font( \"Verdana\", Font.PLAIN, Math.round(10.0f * scale));\n this.font_normal = new Font( \"Verdana\", Font.PLAIN, Math.round(14.0f * scale));\n }\n\n // calculate font metrics\n // W is probably the largest characher...\n FontMetrics fm;\n\n fm = g2.getFontMetrics(this.font_large);\n this.line_height_large = fm.getAscent();\n this.max_char_advance_large = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_large = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_medium);\n this.line_height_medium = fm.getAscent();\n this.max_char_advance_medium = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_medium = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_small);\n this.line_height_small = fm.getAscent();\n this.max_char_advance_small = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_small = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_tiny);\n this.line_height_tiny = fm.getAscent();\n this.max_char_advance_tiny = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_tiny = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_zl);\n this.line_height_zl = fm.getAscent();\n this.max_char_advance_zl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_zl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_yl);\n this.line_height_yl = fm.getAscent();\n this.max_char_advance_yl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_yl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xxl);\n this.line_height_xxl = fm.getAscent();\n this.max_char_advance_xxl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xxl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xl);\n this.line_height_xl = fm.getAscent();\n this.max_char_advance_xl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_l);\n this.line_height_l = fm.getAscent();\n this.max_char_advance_l = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_l = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_m);\n this.line_height_m = fm.getAscent();\n this.max_char_advance_m = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_m = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_s);\n this.line_height_s = fm.getAscent();\n this.max_char_advance_s = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_s = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xs);\n this.line_height_xs = fm.getAscent();\n this.max_char_advance_xs = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xs = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xxs);\n this.line_height_xxs = fm.getAscent();\n this.max_char_advance_xxs = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xxs = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_normal);\n this.line_height_normal = fm.getAscent();\n this.max_char_advance_normal = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_normal = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n }",
"public void setFont(Font font)\r\n\t{\r\n\t\t_g2.setFont(font);\r\n\t}",
"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 }",
"private void applyFontToMenuItem(MenuItem mi) {\n Typeface font = Typeface.createFromAsset(getAssets(), \"mont.ttf\");\n SpannableString mNewTitle = new SpannableString(mi.getTitle());\n mNewTitle.setSpan(new CustomTypefaceSpan(\"\", font), 0, mNewTitle.length(), Spannable.SPAN_INCLUSIVE_INCLUSIVE);\n mi.setTitle(mNewTitle);\n }",
"private void setupAllViewsToSetTextColor(){\n allViewsToSetTextColor = new ArrayList<>();\n allViewsToSetTextColor.add(labelDegrees);\n allViewsToSetTextColor.add(entryDegrees);\n allViewsToSetTextColor.add(labelRadians);\n allViewsToSetTextColor.add(entryRadians);\n allViewsToSetTextColor.add(labelSine);\n allViewsToSetTextColor.add(sineRegularData);\n allViewsToSetTextColor.add(labelCosine);\n allViewsToSetTextColor.add(cosineRegularData);\n allViewsToSetTextColor.add(labelTangent);\n allViewsToSetTextColor.add(tangentRegularData);\n allViewsToSetTextColor.add(radianTextNumerator);\n allViewsToSetTextColor.add(radianTextDenominator);\n allViewsToSetTextColor.add(sineTextNumerator);\n allViewsToSetTextColor.add(sineTextDenominator);\n allViewsToSetTextColor.add(cosineTextNumerator);\n allViewsToSetTextColor.add(cosineTextDenominator);\n allViewsToSetTextColor.add(tangentTextNumerator);\n allViewsToSetTextColor.add(tangentTextDenominator);\n }",
"public void setCurrentRTTFace(final Face currentRTTFace) { _currentRTTFace = currentRTTFace; }",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"public void setFont(AWTFont font) {\r\n\t\trenderer = createRendererFromAWTFont(font);\r\n\t\tthis.font = font;\r\n\t\tupdateValues();\r\n\t}",
"public void setFont( Font font ) {\r\n this.font = font;\r\n }",
"protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}",
"public void setFont(Font font) {\n this.font = font;\r\n repaint();\r\n }",
"private void setMapViewTheme(MapView mapView) {\n\n Typeface typeface_a = Typeface.create(Typeface.MONOSPACE,Typeface.BOLD_ITALIC);\n Typeface typeface_b = Typeface.create(Typeface.MONOSPACE,Typeface.NORMAL);\n Typeface typeface_c = Typeface.create(Typeface.SERIF,Typeface.BOLD_ITALIC);\n\n\n Theme theme = mMapView\n .themeBuilder()\n .setProperty(\"view.poi.color.background\", Color.DKGRAY)\n // POI Icon\n .setProperty(\"view.poi.icon.color.tint\",Color.WHITE)\n .setProperty(\"view.poi.icon.color.background\",Color.TRANSPARENT)\n // POI Header\n .setProperty(\"view.poi.header.color.background\",Color.TRANSPARENT)\n // POI Header Icon\n .setProperty(\"view.poi.header.icon.color.tint\",Color.WHITE)\n .setProperty(\"view.poi.header.icon.color.background\",Color.TRANSPARENT)\n // POI Header Title\n .setProperty(\"view.poi.header.title.color.text\",Color.WHITE)\n .setProperty(\"view.poi.header.title.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.header.title.font.name\", typeface_a)\n .setProperty(\"view.poi.header.title.font.size\", 20.0)\n // POI Header Location\n .setProperty(\"view.poi.header.location.color.text\",Color.WHITE)\n .setProperty(\"view.poi.header.location.color.tint\",Color.WHITE)\n .setProperty(\"view.poi.header.location.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.header.location.font.name\", typeface_b)\n .setProperty(\"view.poi.header.location.font.size\", 16.0)\n // POI Header Security\n .setProperty(\"view.poi.header.security.color.text\",Color.WHITE)\n .setProperty(\"view.poi.header.security.color.tint\",Color.WHITE)\n .setProperty(\"view.poi.header.security.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.header.security.font.name\", typeface_b)\n .setProperty(\"view.poi.header.security.font.size\", 16.0)\n // POI Header Level\n .setProperty(\"view.poi.header.level.color.text\",Color.WHITE)\n .setProperty(\"view.poi.header.level.color.tint\",Color.WHITE)\n .setProperty(\"view.poi.header.level.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.header.level.font.name\", typeface_b)\n .setProperty(\"view.poi.header.level.font.size\", 16.0)\n // POI Carousel\n .setProperty(\"view.poi.carousel.color.background\",Color.DKGRAY)\n .setProperty(\"view.poi.carousel.error.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.carousel.loader.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.carousel.image.color.background\",Color.LTGRAY)\n // POI Carousel - Label\n .setProperty(\"view.poi.carousel.label.color.text\",Color.BLACK)\n .setProperty(\"view.poi.carousel.label.color.background\",Color.WHITE)\n .setProperty(\"view.poi.carousel.label.font.name\", typeface_b)\n .setProperty(\"view.poi.carousel.label.font.size\", 12.0)\n // POI Carousel - Loading\n .setProperty(\"view.poi.carousel.loading.color.background\", Color.TRANSPARENT)\n .setProperty(\"view.poi.carousel.loading.text.color.text\", Color.LTGRAY)\n .setProperty(\"view.poi.carousel.loading.text.color.background\", Color.TRANSPARENT)\n .setProperty(\"view.poi.carousel.loading.text.font.name\", typeface_b)\n .setProperty(\"view.poi.carousel.loading.text.font.size\", 12.0)\n // POI Details Description String\n .setProperty(\"view.poi.detail.description.color.text\",Color.WHITE)\n .setProperty(\"view.poi.detail.description.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.detail.description.font.name\", typeface_b)\n .setProperty(\"view.poi.detail.description.font.size\", 16.0)\n // POI Details Spannable Tag String\n .setProperty(\"view.poi.detail.tag.color.text\",Color.BLACK)\n .setProperty(\"view.poi.detail.tag.color.background\",Color.WHITE)\n // POI Contact - Website\n .setProperty(\"view.poi.contact.website.active.color.text\",Color.YELLOW)\n .setProperty(\"view.poi.contact.website.active.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.contact.website.active.font.name\", typeface_b)\n .setProperty(\"view.poi.contact.website.active.font.size\", 18.0)\n .setProperty(\"view.poi.contact.website.default.color.text\",Color.WHITE)\n .setProperty(\"view.poi.contact.website.default.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.contact.website.default.font.name\", typeface_b)\n .setProperty(\"view.poi.contact.website.default.font.size\", 16.0)\n // POI Contact - Phone\n .setProperty(\"view.poi.contact.phone.active.color.text\",Color.YELLOW)\n .setProperty(\"view.poi.contact.phone.active.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.contact.phone.active.font.name\", typeface_b)\n .setProperty(\"view.poi.contact.phone.active.font.size\", 14.0)\n .setProperty(\"view.poi.contact.phone.default.color.text\",Color.WHITE)\n .setProperty(\"view.poi.contact.phone.default.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.contact.phone.default.font.name\", typeface_b)\n .setProperty(\"view.poi.contact.phone.default.font.size\", 16.0)\n // POI Buttons\n .setProperty(\"view.poi.button.color.text\",Color.WHITE)\n .setProperty(\"view.poi.button.color.tint\",Color.WHITE)\n .setProperty(\"view.poi.button.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.button.font.name\", typeface_b)\n .setProperty(\"view.poi.button.font.size\", 13.0)\n // POI Operational Times - Day\n .setProperty(\"view.poi.time.day.color.text\",Color.WHITE)\n .setProperty(\"view.poi.time.day.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.time.day.font.name\", typeface_a)\n .setProperty(\"view.poi.time.day.font.size\", 16.0)\n // POI Operational Times - compress Hour\n .setProperty(\"view.poi.time.hours.color.text\",Color.LTGRAY)\n .setProperty(\"view.poi.time.hours.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.time.hours.font.name\", typeface_c)\n .setProperty(\"view.poi.time.hours.font.size\", 18.0)\n\n // POI Operational Times - extended Hour\n .setProperty(\"view.poi.time.hour.color.text\",Color.LTGRAY)\n .setProperty(\"view.poi.time.hour.color.background\",Color.TRANSPARENT)\n .setProperty(\"view.poi.time.hour.font.name\", typeface_c)\n .setProperty(\"view.poi.time.hour.font.size\", 18.0)\n // Create DefaultTheme\n .createTheme();\n\n mMapView.setTheme(theme);\n }",
"private void setFonts() {\n fileTitle.setFont(MasterDisplay.titleFont);\n entryFileButton.setFont(MasterDisplay.tabAndButtonFont);\n entryFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n itemFileButton.setFont(MasterDisplay.tabAndButtonFont);\n itemFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderButton.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderLabel.setFont(MasterDisplay.tabAndButtonFont);\n }",
"private void updateFontSet() {\n if (!isBigFontSet()) {\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), null);\n } else {\n// <snip> Install sscaled font\n FontPolicy windowsPolicy = FontPolicies.getDefaultWindowsPolicy();\n FontSet fontSet = windowsPolicy.getFontSet(null, UIManager\n .getLookAndFeelDefaults());\n WrapperFontSet scaled = new WrapperFontSet(fontSet, 5);\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), scaled);\n// </snip>\n }\n updateLookAndFeel();\n }",
"private void setUpNutritionLabel(Label l1, String color, String text){\n l1.setText(text);\n l1.setTextFill(Paint.valueOf(color));\n l1.setFont(InterfaceStyling.systemFont);\n }",
"FONT createFONT();",
"public void setHighlight(TileStatus highlight){\r\n highLight = highlight;\r\n }",
"private void instantiateVariables() {\n paint = new Paint();\n fightActivity = (FightActivity) context;\n Typeface tf = Typeface.create(\"Arial\", Typeface.BOLD);\n paint.setTypeface(tf);\n }",
"@Override\n public void selected ( final ExampleData document, final PaneData<ExampleData> pane, final int index )\n {\n styleViewer.setText ( document.getExample ().getStyleCode ( StyleManager.getSkin () ) );\n styleViewer.setCaretPosition ( 0 );\n }",
"public void setDisplayFont(int size){\n\t\tscreen.setFont(new Font(\"Serif\",Font.BOLD,size));\r\n\t}",
"private void init(Context context, AttributeSet attrs) {\n\t\tmTempBounds = new Rect();\n\t\tmTypeface = Typeface.DEFAULT;\n\t\tif(attrs!=null) {\n\t\t\tmStyledAttributes = context.getTheme().obtainStyledAttributes(attrs,R.styleable.RTextView,0, 0);\n\t\t\tmFontName = mStyledAttributes.getString(R.styleable.RTextView_typeface);\n\t\t\tmPlaceholder = mStyledAttributes.getString(R.styleable.RTextView_placeholder);\n\t\t\tString c = mStyledAttributes.getString(R.styleable.RTextView_activecolor);\n\t\t\tif(c!=null) {\n\t\t\t\tactiveColor = Color.parseColor(c);\n\t\t\t} else {\n\t\t\t\tactiveColor = -1;\n\t\t\t}\n\t\t\tbaseColor = getCurrentTextColor();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tmTypeface = Typeface.createFromAsset(getContext().getAssets(), \"fonts/\"+mFontName+\".ttf\");\t\n\t\t\t} catch(Exception e) {\n\t\t\t\tLog.e(\"RTextView\", \"Unable to load font '\" + mFontName + \".ttf'.\\nDo the file 'assets/fonts/\"+mFontName+\".ttf' exists?\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void saveFont()\r\n\t{\r\n\t\tsavedFont = g.getFont();\r\n\t}"
] | [
"0.69593006",
"0.6750735",
"0.66786695",
"0.64485914",
"0.6423971",
"0.6303586",
"0.6282265",
"0.6215314",
"0.611855",
"0.6027806",
"0.5958874",
"0.59410423",
"0.59369314",
"0.59183204",
"0.59166735",
"0.5902342",
"0.5860416",
"0.585258",
"0.5845979",
"0.5827726",
"0.57550514",
"0.5737176",
"0.5732271",
"0.57019347",
"0.5699486",
"0.5663381",
"0.5653965",
"0.5645039",
"0.5622779",
"0.5617069",
"0.56128204",
"0.5601794",
"0.5595525",
"0.5567758",
"0.5567257",
"0.55616236",
"0.5555387",
"0.5530031",
"0.5499553",
"0.54976386",
"0.54939693",
"0.5490222",
"0.54491705",
"0.5428601",
"0.5427644",
"0.5419855",
"0.54136527",
"0.5369717",
"0.5361046",
"0.535805",
"0.5351616",
"0.53407776",
"0.53371364",
"0.53366655",
"0.5332308",
"0.5328804",
"0.53272456",
"0.53189516",
"0.53129244",
"0.5298681",
"0.5297493",
"0.52927077",
"0.5279099",
"0.5267874",
"0.52609366",
"0.5260796",
"0.525955",
"0.52554244",
"0.5252302",
"0.52433014",
"0.52367675",
"0.5230897",
"0.5221745",
"0.5216676",
"0.5211854",
"0.5211536",
"0.51983386",
"0.5189966",
"0.518142",
"0.5178551",
"0.51439404",
"0.5143438",
"0.5128913",
"0.51184344",
"0.5108675",
"0.51059574",
"0.51050645",
"0.5099334",
"0.5095824",
"0.5094784",
"0.5090908",
"0.5084304",
"0.50771254",
"0.50731385",
"0.5069569",
"0.50685364",
"0.50670946",
"0.5060852",
"0.50597924",
"0.505769"
] | 0.6016859 | 10 |
sets a specific Text size for the highlighted labels | public void setHightlightedTextSize(Float size) {
if (size > 24f)
size = 24f;
if (size < 6f)
size = 6f;
mHightlightedTextSize = Utils.convertDpToPixel(size);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLabelSize(int labelSize)\n {\n myLabelSize = labelSize;\n }",
"public void setLabelFont(int fontSize){\n Font labelFont = new Font(\"Serif\", Font.PLAIN, fontSize);\n minLabel.setFont(labelFont);\n medLabel.setFont(labelFont);\n maxLabel.setFont(labelFont);\n emptyLabel.setFont(labelFont);\n errorLabel.setFont(labelFont);\n }",
"public void setTextSize(float size) {\n\n if (size > 24f)\n size = 24f;\n if (size < 6f)\n size = 6f;\n\n mTextSize = Utils.convertDpToPixel(size);\n }",
"public int getLabelTextSize(){\n return labelTextSize;\n }",
"public void setTextLabelFontSize(int mTextLabelFontSize) {\n\t\tthis.mTextLabelFontSize = mTextLabelFontSize;\n\t}",
"private void setDefaultTextSize() {\n this.text_size = (int) default_text_size;\n }",
"public void setTitleFontSize(int size) {\n\t\tthis.title_fontsize = size;\n\t}",
"public void setLabelFont(Font f);",
"public LabelBuilder setFontSize(int size) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setSize(size);\n\t\treturn this;\n\n\t}",
"public void setTextSize(float textSize){\n Context context = getContext();\n Resources res;\n\n if(context == null){\n res = Resources.getSystem();\n }else{\n res = context.getResources();\n }\n\n setTextSizePx(TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_SP, textSize, res.getDisplayMetrics()));\n }",
"public void setTextSizePx(float size) {\n mPaint.setTextSize(size);\n mSpaceWidth = mPaint.measureText(\" \");\n invalidate();\n }",
"public void setFront_label_size(int size) {\n\t\tfront_label_size = size;\n\t}",
"public void setTextSize(float textSize) {\n mTextContainer.setTextSize(textSize);\n }",
"public ModernAutoSizeLabel(String text, Dimension size) {\r\n super(text, size);\r\n }",
"public void setLabelTextSize(float labelTextSizeSp) {\n chassisView.setLabelTextSize(labelTextSizeSp);\n }",
"public void setTextSize() {\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n }",
"public void setLabelFont(Font value) {\n labelFont = value;\n }",
"public void setProgressTextSize(int size){\n mProgressTextSize = Utils.sp2px(mContext, size);\n refreshTheView();\n }",
"public void nodeSize(String str) { setSelected(node_sizes, str); }",
"public void updateText()\r\n\t{\r\n\t\tdouble smallest = Math.min(menu.getController().getWidth(), menu.getController().getHeight());\r\n\t\tdouble equivalent12 = smallest/55;//Equivalent of 12 point font on base dimensions\r\n\t\t\r\n\t\ttextRenderer = new TextRenderer(new Font(fontName, Font.PLAIN, (int)(equivalent12*size)), true, true);\r\n\t}",
"private void initLrcFontSize() {\n int screeHeight=getResources().getDisplayMetrics().heightPixels;\n int marginLeft=(int)(1.0*screeHeight/9);\n LrcView.defaultTextSize=DensityUtil.px2sp(this, (marginLeft));//设置默认的歌词大小\n LrcView.defaultDividerHeight=marginLeft/2;\n }",
"private void rescaleLabels() {\n // TJJ Nov 2018 - make sure labels scale correct on any changes\n // to the ring display\n ViewManager vm = getViewManager();\n rangeRings.setLabelSize(vm.getMaster().getDisplayScale());\n }",
"public IconBuilder fontSize(int size) {\n\t\tthis.fixedFontSize = size;\n\t\treturn this;\n\t}",
"private void setupTextSize()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tthis.mTextSize = (int) res.getDimension(R.dimen.tsz_main);\n\t}",
"public void setNodeLabelFont(Font value) {\n nodeLabelfont = value;\n }",
"public void setSubtitleFontSize(int size) {\n\t\tthis.subtitle_fontsize = size;\n\t}",
"private void setFontSize(float newFontSize) {\n\t\tfontSize = newFontSize;\n\t\tproperties.setProperty(\"fontSize\", Float.toString(newFontSize));\n\n\t\t// update all text-based components\n\t\tfor (Component c : components)\n\t\t\tc.setFont(c.getFont().deriveFont(newFontSize));\n\t\t\n\t\t// update machine graphics\n\t\tupdate(); \n\t}",
"private void setPrefSizeForText()\n {\n double prefW = getSuggestedPrefWidth();\n double prefH = _textArea.getPrefHeight();\n setPrefSize(prefW, prefH);\n }",
"public int getTextLabelFontSize() {\n\t\treturn mTextLabelFontSize;\n\t}",
"public void setLblWidth(int width) {\n lblWidth = width;\n }",
"public ModernAutoSizeLabel(String text) {\r\n super(text, TEXT_COLOR);\r\n }",
"public int setTextSize(int textSelection) {\n // Sets the text size in Settings\n Settings.setTextSize(textSelection);\n\n // Sets fragments text size\n textView.setTextSize(getResources().getInteger(Settings.getTextSize()));\n return Settings.getTextSize();\n }",
"public void setDisplayFont(int size){\n\t\tscreen.setFont(new Font(\"Serif\",Font.BOLD,size));\r\n\t}",
"public void linkSize(String str) { setSelected(link_sizes, str); }",
"public void setFontSize(float fontSize){\n this.fontSize = fontSize;\n }",
"public ModernAutoSizeLabel(String text, int width) {\r\n super(text, width);\r\n }",
"public void setTabFontSize(int tabSelectionIndex, int newFonSize) {\r\n\t\tif (tabSelectionIndex == 0) {\r\n\t\t\t//actual no special font size adaption enabled\r\n\t\t}\r\n\t\telse if (tabSelectionIndex > 0) {\r\n\t\t\tif (this.displayTab.getItem(tabSelectionIndex) instanceof DigitalWindow) {\r\n\t\t\t\t//this.settings.setDigitalDisplayFontSize(newFonSize); actual no pesistens enabled\r\n\t\t\t\tthis.digitalTabItem.setDigitalDisplayFontSize(newFonSize);\r\n\t\t\t\tthis.updateDigitalWindowChilds();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void setSizeLabel(String value) {\n setAttributeInternal(SIZELABEL, value);\n }",
"public void setFontSize(int fontSize) {\n this.fontSize = fontSize;\n updateLineHeight();\n updateCursor();\n update();\n }",
"public FontLabel(String text) {\n super(text, JLabel.CENTER);\n setBackground(Color.white);\n setForeground(Color.black);\n setOpaque(true);\n setBorder(new LineBorder(Color.black));\n setPreferredSize(new Dimension(120, 40));\n }",
"void setFontSize(float fontSize)\r\n\t{\r\n\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\tif (fontIndex != -1)\r\n\t\t{\r\n\t\t\tappearanceTokens.set(fontIndex - 1, new COSFloat(fontSize));\r\n\t\t}\r\n\t}",
"public static void setDefaultSize(int size) {\r\n\t\tSet<Object> keySet = UIManager.getLookAndFeelDefaults().keySet();\r\n\t\tObject[] keys = keySet.toArray(new Object[keySet.size()]);\r\n\r\n\t\tfor (Object key : keys) {\r\n\t\t\tif (key != null && key.toString().toLowerCase().contains(\"font\")) {\r\n\t\t\t\tFont font = UIManager.getDefaults().getFont(key);\r\n\t\t\t\tif (font != null) {\r\n\t\t\t\t\tfont = font.deriveFont((float)size);\r\n\t\t\t\t\tUIManager.put(key, font);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Override\n public void changeFontSize(int i) {\n lyricsTV.setTextSize((float) i);\n PreferencesManager pm = PreferencesManager.getInstance();\n pm.setFontSize(i);\n }",
"public void setFontLevel(int level) {\n super.setFontLevel(level);\n Object[] objectsToSize = new Object[]\n {unmarkedLabel, fixedCoordinatesItem};\n FontSizer.setFonts(objectsToSize, level);\n }",
"private int getFontSize(LabelGeometry geom)\r\n {\r\n float fontSize = AWTUtilities.getFontSize(geom.getRenderProperties().getFont());\r\n\r\n // Scale based on the view\r\n Function<Kilometers, Float> scaleFunction = geom.getRenderProperties().getScaleFunction();\r\n if (scaleFunction != null)\r\n {\r\n float viewScale = scaleFunction.apply(myViewAltitudeSupplier.get()).floatValue();\r\n fontSize *= viewScale;\r\n }\r\n\r\n return Math.round(fontSize);\r\n }",
"public FontRenderer setSize(float size) {\n\t\tthis.size = size;\n\t\ttransform.setScale(size);\n\t\t\n\t\treturn this;\n\t}",
"public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}",
"public ModernAutoSizeLabel(String text, Font font) {\r\n super(text, font);\r\n }",
"public void setFontSize(int fontSize) {\r\n try {\r\n this.setFont(this.getFont().deriveFont((float) fontSize));\r\n } catch (Exception e) {\r\n ToggleButton.logger.error(this.getClass().toString() + \" : Error establishing font size\", e);\r\n if (ApplicationManager.DEBUG) {\r\n ToggleButton.logger.error(null, e);\r\n }\r\n }\r\n }",
"public ModernAutoSizeLabel(String text, Color color) {\r\n super(text, color);\r\n }",
"void setFontSpacingSlider(Font font);",
"public void setFontSize(int fontSize)\r\n {\r\n myFontSize = fontSize;\r\n }",
"public int getFontSize();",
"public int getLabelSize()\n {\n return myLabelSize;\n }",
"private Bounds textWidth(double size, SensorValue sensorValue)\r\n\t{\n\t\t\r\n\t\tString showValue = sensorValue.getCurrentValue() + \" \" + sensorValue.getMeasurementUnit();\r\n\t\t\r\n\t\tif(fontBase == null)\r\n\t\t\tfontBase = new Font(\"Verdana\", 12);\r\n\t\tText text = new Text(showValue);\r\n\t\tFont font = Font.font(fontBase.getFamily(), size);\r\n text.setFont(font);\r\n return text.getBoundsInLocal();\r\n\t}",
"public PatchTextStyleProperties fontSize(String fontSize) {\n this.fontSize = fontSize;\n return this;\n }",
"public float getFontSize();",
"public void setFontSizeText( String text )\r\n\t{\r\n\t\t// set the text in the Font Size text field as per the String passed in\r\n\t\tfontSizeTextField.setText( text );\r\n\t}",
"@Override\n public int height()\n {\n return textCent.height();\n }",
"void setPaperSize(short size);",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n Font currentFont = jshellLabGlobal.Interpreter.GlobalValues.globalEditorPane.getFont();\r\n Font newFont = new Font(currentFont.getFontName(), currentFont.getStyle(), currentFont.getSize()+1);\r\n jshellLabGlobal.Interpreter.GlobalValues.globalEditorPane.setFont(newFont);\r\n }",
"public Font getLabelFont();",
"private void updateLabelText() {\n /*\n r18 = this;\n android.view.View r13 = r18.getNativeView()\n android.widget.TextView r13 = (android.widget.TextView) r13\n if (r13 != 0) goto L_0x0009\n L_0x0008:\n return\n L_0x0009:\n boolean r7 = r18.isSingleLine()\n r0 = r18\n float r0 = r0.minimumFontSizeInPixels\n r16 = r0\n r17 = 1036831949(0x3dcccccd, float:0.1)\n int r16 = (r16 > r17 ? 1 : (r16 == r17 ? 0 : -1))\n if (r16 < 0) goto L_0x00f6\n r3 = 1\n L_0x001b:\n r8 = r3\n r13.setSingleLine(r7)\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x00f9\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n r13.setLines(r0)\n L_0x0032:\n if (r7 == 0) goto L_0x0102\n r16 = 1\n r0 = r16\n r13.setMaxLines(r0)\n L_0x003b:\n r0 = r18\n java.lang.CharSequence r11 = r0.originalText\n if (r11 != 0) goto L_0x0135\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n java.lang.String r16 = \"\"\n r0 = r16\n r11.<init>(r0)\n r12 = r11\n L_0x004b:\n if (r8 == 0) goto L_0x0132\n int r16 = r12.length()\n if (r16 <= 0) goto L_0x0132\n r2 = 0\n L_0x0054:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x006c\n char r10 = r12.charAt(r2)\n r16 = 13\n r0 = r16\n if (r10 == r0) goto L_0x006c\n r16 = 10\n r0 = r16\n if (r10 != r0) goto L_0x012b\n L_0x006c:\n int r16 = r12.length()\n r0 = r16\n if (r2 >= r0) goto L_0x0132\n android.text.SpannableStringBuilder r11 = new android.text.SpannableStringBuilder\n r16 = 0\n r0 = r16\n r11.<init>(r12, r0, r2)\n L_0x007d:\n boolean r0 = r11 instanceof android.text.Spannable\n r16 = r0\n if (r16 != 0) goto L_0x0089\n android.text.SpannableStringBuilder r12 = new android.text.SpannableStringBuilder\n r12.<init>(r11)\n r11 = r12\n L_0x0089:\n r1 = 0\n r0 = r18\n int r0 = r0.autoLinkFlags\n r16 = r0\n if (r16 == 0) goto L_0x00a0\n r16 = r11\n android.text.Spannable r16 = (android.text.Spannable) r16\n r0 = r18\n int r0 = r0.autoLinkFlags\n r17 = r0\n boolean r1 = android.text.util.Linkify.addLinks(r16, r17)\n L_0x00a0:\n if (r1 == 0) goto L_0x012f\n android.text.method.MovementMethod r9 = android.text.method.LinkMovementMethod.getInstance()\n L_0x00a6:\n android.text.method.MovementMethod r16 = r13.getMovementMethod()\n r0 = r16\n if (r9 == r0) goto L_0x00c6\n boolean r5 = r13.isFocusable()\n boolean r4 = r13.isClickable()\n boolean r6 = r13.isLongClickable()\n r13.setMovementMethod(r9)\n r13.setFocusable(r5)\n r13.setClickable(r4)\n r13.setLongClickable(r6)\n L_0x00c6:\n r0 = r18\n android.text.TextUtils$TruncateAt r14 = r0.ellipsize\n if (r9 == 0) goto L_0x00da\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.START\n r0 = r16\n if (r14 == r0) goto L_0x00d8\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MIDDLE\n r0 = r16\n if (r14 != r0) goto L_0x00da\n L_0x00d8:\n android.text.TextUtils$TruncateAt r14 = android.text.TextUtils.TruncateAt.END\n L_0x00da:\n r13.setEllipsize(r14)\n android.text.TextUtils$TruncateAt r16 = android.text.TextUtils.TruncateAt.MARQUEE\n r0 = r16\n if (r14 != r0) goto L_0x00ea\n r16 = 1\n r0 = r16\n r13.setSelected(r0)\n L_0x00ea:\n android.widget.TextView$BufferType r16 = android.widget.TextView.BufferType.NORMAL\n r0 = r16\n r13.setText(r11, r0)\n r13.requestLayout()\n goto L_0x0008\n L_0x00f6:\n r3 = 0\n goto L_0x001b\n L_0x00f9:\n r16 = 0\n r0 = r16\n r13.setMinLines(r0)\n goto L_0x0032\n L_0x0102:\n r0 = r18\n int r0 = r0.maxLines\n r16 = r0\n if (r16 <= 0) goto L_0x0129\n r0 = r18\n int r15 = r0.maxLines\n L_0x010e:\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n if (r16 <= 0) goto L_0x0124\n r0 = r18\n int r0 = r0.viewHeightInLines\n r16 = r0\n r0 = r16\n if (r15 <= r0) goto L_0x0124\n r0 = r18\n int r15 = r0.viewHeightInLines\n L_0x0124:\n r13.setMaxLines(r15)\n goto L_0x003b\n L_0x0129:\n r15 = 1\n goto L_0x010e\n L_0x012b:\n int r2 = r2 + 1\n goto L_0x0054\n L_0x012f:\n r9 = 0\n goto L_0x00a6\n L_0x0132:\n r11 = r12\n goto L_0x007d\n L_0x0135:\n r12 = r11\n goto L_0x004b\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p006ti.modules.titanium.p007ui.widget.TiUILabel.updateLabelText():void\");\n }",
"public ComDialogBuilder setTitleTextSize(int textsize) {\n if(dialogTitle!=null){\n dialogTitle.setTextSize(TypedValue.COMPLEX_UNIT_SP,textsize);\n }\n return this;\n }",
"public void adjustTextSize(String str) {\n int i;\n int i2 = this.mMinTextSize;\n int height = (this.mEditText.getHeight() - this.mEditText.getCompoundPaddingBottom()) - this.mEditText.getCompoundPaddingTop();\n int width = (this.mEditText.getWidth() - this.mEditText.getCompoundPaddingLeft()) - this.mEditText.getCompoundPaddingRight();\n this.mWidthLimit = width;\n this.mAvailableSpaceRect.right = (float) width;\n this.mAvailableSpaceRect.bottom = (float) height;\n if (!this.mIsMultiLine || Math.min(getRect().width(), getRect().height()) <= 40.0f) {\n i = binarySearch(i2, this.mMaxTextSize, this.mSizeTester, this.mAvailableSpaceRect);\n } else {\n i = 40;\n }\n this.mEditText.setTextSize(0, (float) i);\n }",
"private static void setTextSizeForWidth(Paint paint, String text, float desiredWidth) {\n\n // Pick a reasonably large value for the test. Larger values produce\n // more accurate results, but may cause problems with hardware\n // acceleration. But there are workarounds for that, too; refer to\n // http://stackoverflow.com/questions/6253528/font-size-too-large-to-fit-in-cache\n final float defaultTextSize = 44f;\n paint.setTextSize(defaultTextSize);\n Rect textBounds = new Rect();\n paint.getTextBounds(text, 0, text.length(), textBounds);\n // Calculate the desired size as a proportion of our testTextSize.\n if (textBounds.width() > desiredWidth) {\n float desiredTextSize = defaultTextSize * (desiredWidth / textBounds.width());\n\n // Set the paint for that size.\n paint.setTextSize(desiredTextSize);\n }\n\n }",
"public void setSelectedFontSize( int fontSize )\r\n\t{\r\n\t\t// set the currently selected font name as per the integer passed in if it exists in the list\r\n\t\t// second parameter set to true so scroll pane will scroll to selected item\r\n\t\tfontSizeList.setSelectedValue( fontSize, true );\r\n\t}",
"public void setFontSize(float fs) {\n\t\tif (fs != fontSize) {\n\t\t\tfontSize = fs;\n\t\t\treload();\n\t\t}\n\t}",
"public void setSize(String size) {\r\n //System.out.print(\"Setting Size...\");\r\n this.Size = size;\r\n }",
"@Override\n public void onPositionChanged(Slider view, boolean fromUser, float oldPos, float newPos, int oldValue, int newValue) {\n TextFont newFont = TextFont.findByLevel(newValue);\n int size = context.getResources().getDimensionPixelSize(newFont.size);\n //setTextSize 的坑,是默认设置sp.需要强制设置一下px模式\n binding.fontText.setTextSize(TypedValue.COMPLEX_UNIT_PX,size);\n XApplication.getInstance().bus.post(new UpdateArticleEvent(size));\n textFont = newFont;\n PreferenceUtils.getInstance(context).saveParam(Constants.ARTICLE_FONT_SIZE,(int)Globals.getApplication().getResources().getDimension(textFont.size));\n }",
"void setFontScale(\n float s);",
"public void setText(String text, int textSize, Colour textColour) {\n this.text = text;\r\n this.textSize = textSize;\r\n this.textColour = textColour;\r\n xTextOffset = w / 2 - text.length() * 7.666f;\r\n yTextOffset = h / 2 + textSize / 2.6666f;\r\n }",
"private int calculateFontSize(ImageProcessor processor, double ratioHeightForLabel) {\n // Converts sumSizes into the average size in each dimension\n sumSizes.scale(1.0 / labels.size());\n FontSizeCalculator calculator = new FontSizeCalculator(processor, labels.stream());\n return calculator.calculateOptimalFontSize(sumSizes, ratioHeightForLabel);\n }",
"public int getButtonTextSize(){\n return buttonTextSize;\n }",
"private void setRawTextSize(float f) {\n if (f != this.mTextView.getPaint().getTextSize()) {\n this.mTextView.getPaint().setTextSize(f);\n boolean bl = false;\n if (Build.VERSION.SDK_INT >= 18) {\n bl = this.mTextView.isInLayout();\n }\n if (this.mTextView.getLayout() != null) {\n this.mNeedsAutoSizeText = false;\n try {\n Method method = this.getTextViewMethod(\"nullLayouts\");\n if (method != null) {\n method.invoke((Object)this.mTextView, new Object[0]);\n }\n }\n catch (Exception exception) {\n Log.w((String)\"ACTVAutoSizeHelper\", (String)\"Failed to invoke TextView#nullLayouts() method\", (Throwable)exception);\n }\n if (!bl) {\n this.mTextView.requestLayout();\n } else {\n this.mTextView.forceLayout();\n }\n this.mTextView.invalidate();\n }\n }\n }",
"private void setFont() {\n\t}",
"public void updateHelpBoxDimensions()\r\n\t{\r\n\t\tsaveFont();\r\n\t\tg.setFont(NumerateGame.CAPTION_FONT);\r\n\t\thelpLineHeight = helpLines.size()*g.getFontMetrics().getMaxDescent();\r\n\t\thelpLineHeight += Math.max(helpLines.size()-1,0)*NumerateGame.HELP_BOX_INNER_TEXT_PADDING;\r\n\t\t\r\n\t\thelpLineWidth = 0;\r\n\t\tIterator it = helpLines.iterator();\r\n\t\twhile (it.hasNext())\r\n\t\t{\r\n\t\t\tString current = (String)it.next();\r\n\t\t\tif (g.getFontMetrics().stringWidth(current) > helpLineWidth)\r\n\t\t\t{\r\n\t\t\t\thelpLineWidth = g.getFontMetrics().stringWidth(current);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\trevertFont();\r\n\t}",
"public int getLblWidth() {\n return lblWidth;\n }",
"public void setPenSize(int pixelSize){\n myPen.setPenSize(pixelSize);\n }",
"public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }",
"public void grow() {\n\t\thtmlFontSize += 40;\n\t}",
"public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }",
"public void setHighlightLineWidth(float width) { this.mHighlightLineWidth = Utils.convertDpToPixel(width); }",
"private void updateLineHeight() {\n Text text = new Text(\"AM\");\n text.setFont(new Font(fontType, fontSize));\n lineHeight = round(text.getLayoutBounds().getHeight());\n }",
"public static void setDefaultTextSize(int defaultTextSize) {\n if (defaultTextSize < 0){\n throw new IllegalArgumentException(\"The text size must be >= 0\");\n }\n DEFAULT_TEXT_SIZE = defaultTextSize;\n }",
"public void changedisplayLengthLabel() {\n\t\taffectiveGraphPlot.changedisplayLengthLabel();\n\t}",
"void setShapeLabel(String Label);",
"public void setLblTextColor(Color color) {\n lblSysteemMelding.setForeground(color);\n }",
"public abstract void resizeFrame(JFrame frame, int fontSize);",
"public native final EditorBaseEvent fontSize(String val) /*-{\n\t\tthis.fontSize = val;\n\t\treturn this;\n\t}-*/;",
"public void changeSize(Integer newLength, Integer newHeight) {\n control.erase();\n width = newLength;\n height = newHeight;\n control.draw();\n }",
"public int getMediumFontSize() {\n\t\treturn 10;\n\t}",
"public void setExampleDimension(float exampleDimension) {\n mTextSize = exampleDimension;\n invalidateTextPaintAndMeasurements();\n }",
"public int getFontSize()\n \t{\n \t\treturn 13;\n \t}",
"private void improveButtonSize(final FontMetrics fontMetrics) {\n if (fontMetrics == null) {\n return;\n }\n adjustedButtonSize = true;\n int textHeight = fontMetrics.getHeight();\n System.err.println(\"button text height:\" + textHeight);\n double heightAdjustment = (double) textHeight / DEFAULT_TEXT_HEIGHT;\n int maxCharsWidth = 0;\n for (int i = 0; i < LONG_BUTTON_LINES.length; i++) {\n maxCharsWidth =\n Math.max(maxCharsWidth, fontMetrics.charsWidth(\n LONG_BUTTON_LINES[i].toCharArray(), 0, LONG_BUTTON_LINES[i].length()));\n }\n System.err.println(\"button maximum characters width:\" + maxCharsWidth);\n double widthAdjustment = (double) maxCharsWidth / DEFAULT_MAX_CHARS_WIDTH;\n dimButton.setSize(7 * checkboxHeight * widthAdjustment, 2 * checkboxHeight\n * heightAdjustment);\n }",
"public Quill copySize(float newSize) { Quill quill = new Quill(this); quill.fontMgr.size = newSize ; quill.setFont(); return quill ; }",
"void setGOLabelTextColor(DREM_Timeiohmm.Treenode treeptr, Color newColor) {\n\t\tif (treeptr != null) {\n\t\t\ttreeptr.goText.setTextPaint(newColor);\n\n\t\t\tfor (int nchild = 0; nchild < treeptr.numchildren; nchild++) {\n\t\t\t\tsetGOLabelTextColor(treeptr.nextptr[nchild], newColor);\n\t\t\t}\n\t\t}\n\t}",
"public float getTextSizePx() {\n return mPaint.getTextSize();\n }",
"public StockEvent setFontSize(Integer fontSize) {\n this.fontSize = fontSize;\n return this;\n }",
"public void onLayout(boolean changed, int left, int top, int right, int bottom) {\n super.onLayout(changed, left, top, right, bottom);\n TiUILabel.this.adjustTextFontSize(this);\n if (proxy != null && proxy.hasListeners(TiC.EVENT_POST_LAYOUT)) {\n proxy.fireEvent(TiC.EVENT_POST_LAYOUT, null, false);\n }\n }"
] | [
"0.7278376",
"0.71030915",
"0.67471683",
"0.6655295",
"0.66518897",
"0.66180015",
"0.65941834",
"0.6518925",
"0.64981353",
"0.64671254",
"0.63692474",
"0.6349316",
"0.6342784",
"0.63018864",
"0.6284575",
"0.62643874",
"0.6255731",
"0.61947554",
"0.61921245",
"0.61621386",
"0.6156955",
"0.6151538",
"0.613707",
"0.6106898",
"0.6101985",
"0.6077852",
"0.607538",
"0.60709524",
"0.6069226",
"0.6068164",
"0.60583436",
"0.603503",
"0.60245943",
"0.6019176",
"0.5981432",
"0.59756947",
"0.5963562",
"0.595638",
"0.59194136",
"0.5881895",
"0.5866218",
"0.5862068",
"0.5851083",
"0.58408284",
"0.5838006",
"0.58260024",
"0.5820781",
"0.5816566",
"0.58091855",
"0.5758027",
"0.5750539",
"0.57461375",
"0.57400316",
"0.57376456",
"0.5689371",
"0.56704414",
"0.56587976",
"0.564213",
"0.56367934",
"0.56231827",
"0.5620349",
"0.561304",
"0.55947304",
"0.55728215",
"0.5552283",
"0.5549674",
"0.55455184",
"0.55395526",
"0.5539497",
"0.5537567",
"0.5537075",
"0.5532708",
"0.5517591",
"0.5506921",
"0.5495043",
"0.54933846",
"0.54928195",
"0.5480419",
"0.54789925",
"0.5472569",
"0.5460285",
"0.545824",
"0.5457537",
"0.54561955",
"0.5449089",
"0.544674",
"0.544478",
"0.542482",
"0.54232305",
"0.5407815",
"0.5405188",
"0.54040617",
"0.53996265",
"0.5398157",
"0.53912026",
"0.5389686",
"0.5385158",
"0.5376993",
"0.5375876",
"0.5356518"
] | 0.6614148 | 6 |
sets a specific Textcolor for the highlighted labels | public void setHightlightedTextColor(Integer mHightlightedTextColor) {
this.mHightlightedTextColor = mHightlightedTextColor;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLblColor(Color value) {\n lblColor = value;\n }",
"public void setTextColor(String textColor);",
"public void setLabelColor(String labelColor)\n {\n myLabelColor = labelColor;\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 }",
"void setGOLabelTextColor(DREM_Timeiohmm.Treenode treeptr, Color newColor) {\n\t\tif (treeptr != null) {\n\t\t\ttreeptr.goText.setTextPaint(newColor);\n\n\t\t\tfor (int nchild = 0; nchild < treeptr.numchildren; nchild++) {\n\t\t\t\tsetGOLabelTextColor(treeptr.nextptr[nchild], newColor);\n\t\t\t}\n\t\t}\n\t}",
"public void setTextColor(RMColor aColor) { }",
"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 }",
"public void setLblTextColor(Color color) {\n lblSysteemMelding.setForeground(color);\n }",
"public void changeColor (Color color){\n ((Label) _node).setTextFill(color);\n }",
"public void setTextColor( Color txtColor ) {\r\n textColor = txtColor;\r\n }",
"private void resetLabelColor(){\n setLabelColorStandard(nameLabel, normalColor);\n setLabelColorStandard(xLabel, Color.red);\n setLabelColorStandard(yLabel, Color.blue);\n setLabelColorStandard(zLabel, Color.green);\n setLabelColorStandard(rotXLabel, Color.red);\n setLabelColorStandard(rotYLabel, Color.blue);\n setLabelColorStandard(rotZLabel, Color.green);\n setLabelColorStandard(scaleLabel, normalColor);\n }",
"public static Color getTextHighlightColor() {\n return TEXT_HIGHLIGHT;\n }",
"public void setTextLabelForegroundColor(int mTextLabelForegroundColor) {\n\t\tthis.mTextLabelForegroundColor = mTextLabelForegroundColor;\n\t}",
"public void nodeColor(String str) { setSelected(node_colors, str); }",
"public void setTextColor(int textColor) {\n this.textColor = textColor;\n }",
"private void setDefaultTextColor(Context context) {\n\n }",
"public Color getLblColor() {\n return lblColor;\n }",
"public String getTextColor();",
"public void linkColor(String str) { setSelected(link_colors, str); }",
"public void setTextColor(int color) {\n mTextColor = color;\n }",
"private void selectColor(JLabel label, Client client){\n label.setForeground(client.getStatus().getColor());\n }",
"public abstract void setCurForeground(Color colr);",
"public Color getHighlight();",
"public void setTextColor(Color textColor) {\r\n this.textColor = textColor;\r\n }",
"private void colorNodeLabel(NodeLabelImpl nodeLabel) {\n nodeLabelColorizer.color(nodeLabel);\n }",
"public void modeColor(Graphics2D g2d) { g2d.setColor(RTColorManager.getColor(\"label\", \"default\")); }",
"boolean labelColor(String mode);",
"public Color getTextColor();",
"public RMColor getTextColor() { return RMColor.black; }",
"public int getTextLabelForegroundColor() {\n\t\treturn mTextLabelForegroundColor;\n\t}",
"private void setLabelColorStandard(JLabel label, Color color){\n if(normalFont != null)\n label.setFont(normalFont);\n label.setForeground(color);\n }",
"@AutoEscape\n\tpublic String getTextColor();",
"public void updateColorLabel(Color currColor) {\n switch (currColor){\n case GREEN:\n colorLabel2.setBackground(java.awt.Color.green);\n break;\n case YELLOW:\n colorLabel2.setBackground(java.awt.Color.yellow);\n break;\n case RED:\n colorLabel2.setBackground(java.awt.Color.red);\n break;\n case BLUE:\n colorLabel2.setBackground(java.awt.Color.blue);\n break;\n case NONE:\n colorLabel2.setBackground(java.awt.Color.black);\n break;\n }\n }",
"public void setHighlightColor(Color c) {\n this.highlightColor = c;\n }",
"public void highlightEnable() {\n actualFillColor = new Color(0, 255, 0, 150);\n repaint();\n revalidate();\n }",
"public String getLabelColor()\n {\n return myLabelColor;\n }",
"public int getTextLabelBackgroundColor() {\n\t\treturn mTextLabelBackgroundColor;\n\t}",
"Integer getTxtColor();",
"public void setTextColor(int color) {\n this.textColor = 0xFF000000 | color; // Remove the alpha channel\n\n if (ad != null) {\n ad.setTextColor(color);\n }\n\n invalidate();\n }",
"@Override\n public void setPriorityTextColor(String textColor) {\n btnPrioritySet.setTextColor(Color.parseColor(textColor));\n }",
"public void setHighlight(boolean high);",
"public void highlight(boolean highlighted) {\n\n if (highlighted) {\n objCanvas.setCursor(Cursor.HAND);\n if (curObjLabel != null) {\n curObjLabel.setStroke(Color.KHAKI);\n curObjLabel.setHighlighted(highlighted);\n oldStroke = curObjLabel.initStroke();\n }\n\n //make sure do de hightlight the previous label if over bound\n if (preObjLabel != null) {\n preObjLabel.setStroke(preObjLabel.initStroke());\n preObjLabel.setHighlighted(false);\n preObjLabel.getTreeItem().setExpanded(false);\n }\n } else {\n objCanvas.setCursor(Cursor.DEFAULT);\n if (curObjLabel != null) {\n curObjLabel.setStroke(oldStroke);\n curObjLabel.setHighlighted(highlighted);\n }\n\n //make sure to de hightlight the previous label\n if (preObjLabel != null) {\n preObjLabel.setStroke(preObjLabel.initStroke());\n preObjLabel.setHighlighted(highlighted);\n }\n }\n }",
"public int textColor() {\n\t\treturn textColor;\n\t}",
"public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }",
"public IconBuilder textColor(int color) {\n\t\tthis.textColor = color;\n\t\treturn this;\n\t}",
"Color(String text) {\n this.text = text;\n }",
"public void processFontColorSelection(Color selection) {\n dataManager.setFontColor(selection);\n }",
"public void setTextLabelBackgroundColor(int mTextLabelBackgroundColor) {\n\t\tthis.mTextLabelBackgroundColor = mTextLabelBackgroundColor;\n\t}",
"public void setTextColor(@ColorInt int textColor) {\n mTextContainer.setTextColor(textColor);\n }",
"@Override\n public void highlightLabel(ObjLabel objLabel) {\n selectXmin = objLabel.getXmin();\n selectYmin = objLabel.getYmin();\n selectXmax = objLabel.getXmax();\n selectYmax = objLabel.getYmax();\n\n //make sure we keep track of this current ObjLabel \n //in the history timeline one object in the past\n if (curObjLabel != objLabel) {\n preObjLabel = curObjLabel;\n }\n curObjLabel = objLabel;\n treeView.getSelectionModel().select(objLabel.getTreeItem());\n\n// oldStroke = curObjLabel.getStroke();\n status(\"Current label: \" + curObjLabel.getName());\n\n repaintCanvas();\n }",
"@Override\r\n\tpublic Color getHighlightColor(Object rel) {\n\t\treturn DARK_RED;\r\n\t}",
"private void initTickTextsColor(StateElement colorStateList, Color defaultColor) {\n LogUtil.info(TAG, \"initTickTextsColor() begin - \" + colorStateList);\n if (colorStateList == null) {\n mUnselectedTextsColor = defaultColor;\n mSelectedTextsColor = mUnselectedTextsColor;\n mHoveredTextColor = mUnselectedTextsColor;\n return;\n }\n int stateCount = colorStateList.getStateCount();\n if (stateCount == 0) {\n mUnselectedTextsColor = defaultColor;\n mSelectedTextsColor = mUnselectedTextsColor;\n mHoveredTextColor = mUnselectedTextsColor;\n return;\n }\n if (stateCount == 1) {\n mUnselectedTextsColor = new Color(getContext().getColor(ResourceTable.Color_color_gray));\n mSelectedTextsColor = mUnselectedTextsColor;\n mHoveredTextColor = mUnselectedTextsColor;\n } else if (stateCount == 2) {\n mUnselectedTextsColor = new Color(getContext().getColor(ResourceTable.Color_color_gray));\n for (int i = 0; i < stateCount; i++) {\n int[] stateSet = colorStateList.getStateSet(i);\n if (stateSet.length > 0 && stateSet[0] == COMPONENT_STATE_SELECTED){\n mSelectedTextsColor = new Color(getContext().getColor(ResourceTable.Color_colorAccent));\n mUnselectedTextsColor = new Color(getContext().getColor(ResourceTable.Color_color_gray));\n mHoveredTextColor = new Color(getContext().getColor(ResourceTable.Color_color_blue));\n } else if (stateSet.length > 1 && stateSet[1] == COMPONENT_STATE_HOVERED) {\n mSelectedTextsColor = new Color(getContext().getColor(ResourceTable.Color_colorAccent));\n mHoveredTextColor = new Color(getContext().getColor(ResourceTable.Color_color_blue));\n } else {\n mUnselectedTextsColor = new Color(getContext().getColor(ResourceTable.Color_color_gray));\n mSelectedTextsColor = mUnselectedTextsColor;\n mHoveredTextColor = mUnselectedTextsColor;\n }\n }\n } else {\n LogUtil.info(TAG, \"color state not matched\");\n }\n LogUtil.info(TAG, \"initTickTextsColor() end\");\n }",
"@Override\n public Color getHighlightedColor() { return getLine().getMapColor(); }",
"public void setLockedLabelColors(boolean lock)\n\t{\n\t\tthis.lockedLabelColors = lock;\n\t\t\n\t\tif(lock)\n\t\t{\n\t\t\tthis.labelStyle.setTextPaint(this.getPaint()[0]);\n\t\t}\n\t}",
"public Color getTextColor() {\r\n return textColor;\r\n }",
"public Color getTextColor(){\r\n return textColor;\r\n }",
"public static void setGlobalTextColor(Context context, int color){\n SharedPreferences.Editor edit = context.getSharedPreferences(\"DEFAULTS\", Context.MODE_PRIVATE).edit();\n edit.putInt(\"textColor\", color);\n edit.apply();\n\n ArrayList<Outfit> list = getOutfitList(context);\n if(list.size()>0){\n for(int i = 0 ; i<list.size(); i++){\n list.get(i).setTextColor(color);\n }\n saveOutfitJSON(context, list);\n }\n }",
"public void setForeground(Color c)\n {\n lname.setForeground(c);\n }",
"private void colorNodeLabelBorder(NodeLabelBorderImpl nodeLabelBorder) {\n nodeLabelBorderColorizer.color(nodeLabelBorder);\n }",
"public void setForegroundColor(Color c) {\n this.foreColor = c;\n updateFigureForModel(nodeFigure);\n }",
"public void setColor(String c);",
"public int getTextColor() {\n return mTextColor;\n }",
"public void setDisabledTextColor(Color arg1) {\r\n\t\tgetJTextField().setDisabledTextColor(arg1);\r\n\t}",
"public void setColors() {\n\t\tif (!this.block.isEditable()) {\n\t\t\tthis.dispNormal = Color.LIGHT_GRAY;\n\t\t\tthis.dispSelected = Color.GRAY;\n\t\t\tthis.displayNumberBlock.setBackground(dispNormal);\n\t\t} else {\n\t\t\tthis.dispNormal = Color.white;\n\t\t\tthis.dispSelected = Color.cyan;\n\t\t\tthis.displayNumberBlock.setBackground(dispNormal);\n\t\t}\n\t}",
"private void setLabelColorError(JLabel label){\n Font font = label.getFont();\n \n if(normalFont == null)\n normalFont = font;\n \n Font boldFont = new Font(font.getFontName(), Font.BOLD, font.getSize());\n label.setFont(boldFont);\n label.setForeground(errorColor);\n }",
"private static void updateColors() {\n try {\n text.setBackground(colorScheme[0]); outputText.setBackground(colorScheme[0]); \n //frame.setBackground(colorScheme[0]);\n\n //Determines the color to set the splitter\n if(colorScheme[0].equals(Color.BLACK)) splitter.setBackground(Color.DARK_GRAY.darker());\n else if(colorScheme[0].equals(new Color(35,37,50))) splitter.setBackground(new Color(35,37,50).brighter());\n else if(colorScheme[0].equals(Color.GRAY) || colorScheme[0].equals(Color.LIGHT_GRAY) || colorScheme[0].equals(Color.WHITE)) splitter.setBackground(null);\n else splitter.setBackground(colorScheme[0].darker());\n\n text.getStyledDocument().getForeground(attributeScheme[11]); //Will work, but needs to be refreshed somehow.\n outputText.setForeground(colorScheme[11]); \n } catch (Exception e) {\n System.out.println(\"The error was here!\");\n e.printStackTrace();\n }\n }",
"@Override\n public GralColor setForegroundColor(GralColor color)\n {\n return null;\n }",
"public void setMarkerClusterTextColor(View view) {\n if (null != hMap) {\n hMap.getUiSettings().setMarkerClusterTextColor(Color.RED);\n }\n }",
"private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }",
"@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 void makeFontwhite(JLabel a) {a.setForeground(Color.WHITE);}",
"@Override\n public void onPageSelected(int index) {\n for (int i = 0; i < tvs.size(); i++) {\n if (i == index) {\n tvs.get(i).setTextColor(Color.BLUE);\n } else {\n tvs.get(i).setTextColor(Color.rgb(55, 55, 55));\n }\n }\n }",
"private void colorNodeLabels() {\n for (NodeImpl n : supervisedNodes) {\n if (n.hasLabel()) {\n colorNodeLabel(n.getLabel());\n }\n }\n }",
"private void updateTextColor(TextView view, boolean isOn) {\n if (isOn) {\n view.setTextColor(Color.GREEN);\n } else {\n view.setTextColor(Color.BLACK);\n }\n }",
"public void setTextColorAndFont(GraphicsContext graphicsContext) {\r\n\t\tgraphicsContext.setFill(Color.WHITE);\r\n\t\tgraphicsContext.setFont(Font.font(25));\r\n\t}",
"public void setProgressTextColor(@ColorInt int textColor){\n this.mProgressTextColor = textColor;\n }",
"private void setScoreText(){\n if(color != BLACK && color != WHITE){\n scoreLabel.setText(\"Score: Black - \" + calScore(BLACK) + \" White - \" + calScore(WHITE));\n }else {\n scoreLabel.setText(\"Score: \" + calScore(this.color));\n }\n }",
"public IconBuilder autoTextColor() {\n\t\tthis.textColor = AUTO_TEXT_COLOR;\n\t\treturn this;\n\t}",
"public static Color getColor() { return lblColor.getBackground(); }",
"private void updateTextColor() {\n if (mLauncher == null) {\n return;\n }\n ItemInfo info = (ItemInfo) getTag();\n if (info == null || mSupportCard) {\n return;\n }\n int color = getDyncTitleColor(info);\n mIconTitleColor = color;\n setPaintShadowLayer(color);\n if (getPaint().getColor() != color) {\n setTextColor(color);\n }\n\n }",
"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 applyForegroundColor() {\r\n\t\tthis.control.setForeground(PromptSupport.getForeground(this.control));\r\n\t}",
"public void setTickTextsColor(Color tickTextsColor) {\n mSelectedTextsColor = tickTextsColor;\n mUnselectedTextsColor = tickTextsColor;\n mHoveredTextColor = tickTextsColor;\n invalidate();\n }",
"abstract void nameHighlight(Spannable name, String matchStr, int color,\r\n int text_color);",
"public Color getHighlightColor() {\n return highlightColor;\n }",
"public void setHighlight(TileStatus highlight){\r\n highLight = highlight;\r\n }",
"@Override\r\n public void setForeground(Color color) {\r\n super.setForeground(Color.WHITE); //To change body of generated methods, choose Tools | Templates.\r\n }",
"public static void setColor(ArrayList<LaverieButton> L){\n int n = LABEL.size();\n for (int i=0; i<n; i++){\n switch (LABEL.get(i)){\n case \"empty\":\n L.get(i).setBackgroundColor(Color.GREEN);\n break;\n case \"full\":\n L.get(i).setBackgroundColor(Color.RED);\n break;\n case \"reserved\":\n L.get(i).setBackgroundColor(Color.GRAY);\n break;\n }\n }\n }",
"private PrinterLabel highlightMatch(PrinterLabel label, Printer printer) {\n\t\t/* Matches array Index Reference:\n\t\t * \n\t\t * 0 = Tension\n\t\t * 1 = Compression\n\t\t * 2 = Impact\n\t\t * 3 = vendor\n\t\t * 4 = Range of Mats.\n\t\t * 5 = Tolerance\n\t\t * 6 = Finish\n\t\t */\n\t\tif(printer.getMatches()[0] > 0)\n\t\t{\n\t\t\tlabel.getTension().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[1] > 0)\n\t\t{\n\t\t\tlabel.getCompression().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[2] > 0)\n\t\t{\n\t\t\tlabel.getImpact().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[3] > 0)\n\t\t{\n\t\t\tlabel.getVendor().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[4] > 0)\n\t\t{\n\t\t\tlabel.getMaterials().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[5] > 0)\n\t\t{\n\t\t\tlabel.getTolerance().setForeground(highlight);\n\t\t}\n\t\tif(printer.getMatches()[6] > 0)\n\t\t{\n\t\t\tlabel.getFinish().setForeground(highlight);\n\t\t}\n\t\treturn label;\n\t}",
"public SmartHighlightPainter() {\n\t\tsuper(DEFAULT_HIGHLIGHT_COLOR);\n\t}",
"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 }",
"public void setTextUnselectedColor(@ColorInt int color) {\n mTextUnselectedColor = Color.argb(255, Color.red(color), Color.green(color), Color.blue(color));\n }",
"private void colorNodeLabelBorders() {\n for (NodeImpl n : supervisedNodes) {\n colorNodeLabelBorder(n.getLabelBorder());\n }\n }",
"public void setBorderHighlightColor(Color c) {\n this.borderHighlightColor = c;\n updateFigureForModel(nodeFigure);\n }",
"public ColorUIResource getPrimaryControlHighlight() { return fPrimaryHighlight;}",
"public void setSelectionColorDefault() {\n\t\tif (internalLattice == null)\n\t\t\tthis.selectionColor = SelectionColor.DEFAULT;\n\t\telse if (internalLattice.getLatticeColor() == LatticeColor.PINK\n\t\t\t\t|| internalLattice.getLatticeColor() == LatticeColor.ORANGE)\n\t\t\tthis.selectionColor = SelectionColor.GREEN;\n\t\telse\n\t\t\tthis.selectionColor = SelectionColor.RED;\n\t}",
"private void drawSelectedTextBackground(Canvas canvas,float offsetX,int color){\n int startLine = mCursor.getLeftLine();\n int endLine = mCursor.getRightLine();\n int leftLine = startLine;\n int rightLine = endLine;\n if(startLine < getFirstVisibleLine()) {\n startLine = getFirstVisibleLine();\n }\n if(endLine > getLastVisibleLine()) {\n endLine = getLastVisibleLine();\n }\n if(startLine < 0) {\n startLine = 0;\n }\n if(endLine > getLineCount()) {\n endLine = getLineCount() - 1;\n }\n for(int line = startLine;line <= endLine;line++){\n int start = 0,end = getText().getColumnCount(line);\n if(line == leftLine){\n start = mCursor.getLeftColumn();\n }\n if(line == rightLine){\n end = mCursor.getRightColumn();\n }\n mRect.top = getLineTop(line) - getOffsetY();\n mRect.bottom = mRect.top + getLineHeight();\n prepareLine(line);\n mRect.left = offsetX + measureText(mChars,0,start);\n mRect.right = mRect.left + measureText(mChars,start,end - start) + mDpUnit * 3;\n drawColor(canvas,color,mRect);\n }\n }",
"public void setForegroundColor(int color) {\n this.foregroundColor = color;\n }",
"public CommandViewBuilder setTextColor(Color textColor)\n\t\t{\n\t\t\tthis.textColor = textColor;\n\t\t\treturn this;\n\t\t}",
"public static Color getTextColorLight() {\n return TEXTCOLOR_LIGHT;\n }"
] | [
"0.7317356",
"0.73055327",
"0.72508854",
"0.7223785",
"0.7218535",
"0.7125835",
"0.7018614",
"0.6995518",
"0.6903347",
"0.6880418",
"0.67649305",
"0.6741231",
"0.6667291",
"0.66546357",
"0.66259503",
"0.6607525",
"0.65860397",
"0.6550319",
"0.6514121",
"0.6504669",
"0.6493263",
"0.6477207",
"0.64736116",
"0.6457561",
"0.6437712",
"0.6419395",
"0.6402098",
"0.6400196",
"0.6396737",
"0.63707066",
"0.6325806",
"0.6308377",
"0.62908185",
"0.62861997",
"0.62721926",
"0.62691593",
"0.6262234",
"0.6252534",
"0.62452143",
"0.62391305",
"0.62372357",
"0.6226133",
"0.62202495",
"0.61906135",
"0.61671555",
"0.6164466",
"0.6155884",
"0.6149424",
"0.61406946",
"0.61240315",
"0.6112926",
"0.6102322",
"0.60866404",
"0.60710216",
"0.606882",
"0.6039267",
"0.60241824",
"0.6018455",
"0.59994155",
"0.59896135",
"0.59881485",
"0.5985332",
"0.5979551",
"0.59779257",
"0.59703344",
"0.5962646",
"0.59571445",
"0.59547323",
"0.5952746",
"0.5951621",
"0.59474427",
"0.5939813",
"0.5939155",
"0.5935516",
"0.5931056",
"0.59296304",
"0.5927966",
"0.5913473",
"0.5912185",
"0.59073704",
"0.5891077",
"0.58760846",
"0.5864144",
"0.5855474",
"0.58387554",
"0.5836169",
"0.5833311",
"0.5827926",
"0.58138585",
"0.5803026",
"0.57956195",
"0.57928085",
"0.5774679",
"0.5763047",
"0.5762268",
"0.57604265",
"0.5751748",
"0.57498133",
"0.57450557",
"0.574002"
] | 0.5971468 | 64 |
Set this to true if this component should be enabled (should be drawn), false if not. If disabled, nothing of this component will be drawn. Default: true | public void setEnabled(boolean enabled) {
mEnabled = enabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEnabled(boolean enabled);",
"public void setEnabled(boolean enabled);",
"public boolean setEnabled(boolean enable);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"public void setEnabled(boolean is_enabled){\n\t\tswingComponent.setEnabled(is_enabled);\n\t}",
"public void setEnabled(boolean enabled) {\r\n\t}",
"public void enable() {\r\n m_enabled = true;\r\n }",
"public void enable() {\n\t\tif (!permanent) {\n\t\t\tenabled = true;\n\t\t\trect.setColor(c);\n\t\t}\n\t}",
"public void setEnabled(Boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"@Override\n public void setEnabled(boolean enabled) {\n }",
"public void setEnabled(boolean b) {\n // Not supported for MenuComponents\n }",
"public boolean enabled(){\n return enabled;\n }",
"public void setEnabled(boolean value) {\n m_Enabled = value;\n }",
"public void setEnabled(boolean value) {\n this.enabled = value;\n }",
"public void setEnabled(final boolean enabled);",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"public void enablePanel(boolean b);",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public void setEnabled(boolean enabled) {\r\n this.enabled = enabled;\r\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(Boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void enable() {\n canvas.setEnabled(true);\n addListeners();\n runViaListener();\n canvas.repaint();\n }",
"public boolean isEnabled() { return _enabled; }",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void setEnabled(boolean enabled) {\n this.enabled = enabled;\n }",
"public void enable() {\n \t\t\tsetEnabled(true);\n \t\t}",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"public void enable(){\r\n\t\tthis.activ = true;\r\n\t}",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"@Override\n\tpublic void setEnabled(boolean flag) {\n\t\t\n\t}",
"public boolean isEnabled () {\r\n\tcheckWidget();\r\n\treturn getEnabled () && parent.isEnabled ();\r\n}",
"public void setEnabled(boolean enabled) {\n super.setEnabled(enabled);\n _coolBar.setEnabled(enabled);\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"@Override\r\n public void setEnabled(final boolean b) {\r\n _enabled = b;\r\n }",
"@Override\n public boolean isEnabled() {\n return this.enabled;\n }",
"public void setEnabled(boolean enabled) {\r\n\t\tthis.enabled = enabled;\r\n\t}",
"public boolean isEnabled(){\n return enabled;\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"public boolean isEnabled() { return this.myEnabled; }",
"@Override\n public boolean isEnabled() {\n return Boolean.TRUE;\n }",
"public Widget() {\n\t\tenabled = true;\n\t}",
"public Boolean getEnabled() {\r\n return enabled;\r\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn this.enabled;\n\t}",
"public boolean isEnabled() {\r\n return enabled;\r\n }",
"public boolean isEnabled() {\r\n return enabled;\r\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return true; // Not supported for MenuComponents\n }",
"public boolean isEnabled() {\n return m_Enabled;\n }",
"public boolean getEnabled() {\n return enabled;\n }",
"@Override\n\tpublic boolean getEnabled();",
"public final void setEnabled( boolean enabled )\n {\n this.enabled = enabled;\n }",
"public Boolean getEnabled() {\n return enabled;\n }",
"public void enable()\n\t{\n\t\tplayButton.setEnabled(true);\n\t\tpassButton.setEnabled(true);\n\t\tbigTwoPanel.setEnabled(true);\n\t}",
"public Boolean getEnabled() {\n return this.enabled;\n }",
"public Boolean getEnabled() {\n return this.enabled;\n }",
"public boolean isEnabled() {\n return mEnabled;\n }",
"public boolean isEnabled() {\n return mEnabled;\n }",
"public boolean isEnabled() {\r\n\t\treturn getJTextField().isEnabled();\r\n\t}",
"public boolean isEnabled() {\n return myEnabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled(){\n\t\treturn mEnabled;\n\t}",
"public boolean isEnable() {\n return _enabled;\n }",
"@Override\n\t\t\t\tpublic boolean isEnabled() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn true;\r\n\t}",
"public boolean enabled() {\n return m_enabled;\n }",
"public boolean isEnabled()\r\n\t{\r\n\t\treturn enabled;\r\n\t}",
"public boolean isEnabled() {\n\n return enabled;\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn isEnabled;\n\t}",
"@Override\n public void setEnabled(boolean val) {\n super.setEnabled(val);\n mEnabled = val;\n }",
"public boolean areComponentsEnabled() {\n return itiefe.isEnabled();\n }",
"@Override public void setEnabled(boolean enabled) {\n super.setEnabled(enabled);\n\n m_globalEnabled = enabled;\n checkEnabled();\n }",
"@Override public boolean isEnabled() {\n return true;\n }",
"@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean isEnabled() {\n\t\treturn false;\r\n\t}"
] | [
"0.6975595",
"0.6975595",
"0.6878795",
"0.6871352",
"0.6871352",
"0.6871352",
"0.6871352",
"0.68414086",
"0.67811626",
"0.6777818",
"0.6774532",
"0.67450655",
"0.67313415",
"0.6726948",
"0.6724071",
"0.6721009",
"0.6719111",
"0.67163175",
"0.6706948",
"0.6668862",
"0.6668751",
"0.6668751",
"0.6651792",
"0.6651792",
"0.6651792",
"0.6651792",
"0.6629983",
"0.6620157",
"0.65993196",
"0.65936536",
"0.657961",
"0.657961",
"0.657961",
"0.657961",
"0.657961",
"0.6576285",
"0.65744585",
"0.6562669",
"0.65626436",
"0.6550208",
"0.6549694",
"0.6542519",
"0.652428",
"0.65228605",
"0.6503784",
"0.6503784",
"0.6503784",
"0.6501425",
"0.6498315",
"0.6491279",
"0.6490765",
"0.64737654",
"0.64737654",
"0.64737654",
"0.6460652",
"0.64464307",
"0.6439195",
"0.64237875",
"0.6384204",
"0.63797224",
"0.63797224",
"0.63796395",
"0.63796395",
"0.6378255",
"0.6375603",
"0.6373279",
"0.63707614",
"0.637015",
"0.6363958",
"0.6356018",
"0.63488716",
"0.63488716",
"0.6341776",
"0.6341776",
"0.63412434",
"0.6340677",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.632705",
"0.63264656",
"0.6320351",
"0.6318362",
"0.6315933",
"0.63128287",
"0.6310316",
"0.63098544",
"0.62930197",
"0.6290121",
"0.6286011",
"0.6273216",
"0.62473285",
"0.6245445",
"0.6245445"
] | 0.662589 | 27 |
Returns true if this comonent is enabled (should be drawn), false if not. | public boolean isEnabled() {
return mEnabled;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasEnabled();",
"final public boolean isEnabled() {\n return enabledType!=ENABLED_NONE;\n }",
"public boolean isEnable() {\n return _enabled;\n }",
"boolean getEnabled();",
"boolean getEnabled();",
"boolean getEnabled();",
"public boolean isEnabled()\r\n\t{\r\n\t\treturn enabled;\r\n\t}",
"public boolean areComponentsEnabled() {\n return itiefe.isEnabled();\n }",
"public boolean isLayerInteractionEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\r\n\t\treturn enabled;\r\n\t}",
"public boolean isEnabled() {\r\n\t\treturn enabled;\r\n\t}",
"public boolean isEnable() {\n return enable;\n }",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"boolean isEnabled();",
"public boolean isEnabled() {\r\n return enabled;\r\n }",
"public boolean isEnabled() {\r\n return enabled;\r\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn this.enabled;\n\t}",
"public boolean isEnabled() {\n return m_Enabled;\n }",
"public boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"public boolean isEnabled(){\n\t\treturn mEnabled;\n\t}",
"public boolean isEnabled() {\n\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean enabled(){\n return enabled;\n }",
"public Boolean isEnable() {\n\t\treturn enable;\n\t}",
"public boolean isEnabled ( ) {\r\n\t\treturn enabled;\r\n\t}",
"public Boolean isEnable() {\n return this.enable;\n }",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled();",
"public boolean isEnabled() {\n return myEnabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean canDraw() {\n return this.m_canDraw;\n }",
"public boolean isEnabled() {\r\n return m_enabled;\r\n }",
"public boolean isEnabled () {\n return impl.isEnabled ();\n }",
"public boolean isEnabled() { return _enabled; }",
"public boolean enabled() {\n return m_enabled;\n }",
"public static boolean isEnabled() {\n return true;\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn enabled;\n\t}",
"public boolean isEnabled() {\n\t\treturn true;\n\t}",
"public boolean isEnabled() {\n return mBundle.getBoolean(KEY_ENABLED, true);\n }",
"public boolean isEnabled() {\n return enabled;\n }",
"public boolean isEnabled() {\n return true; // Not supported for MenuComponents\n }",
"@Override\n public boolean isEnabled() {\n return this.enabled;\n }",
"public boolean isEnabled() { return this.myEnabled; }",
"public boolean isEnabled(){\n return enabled;\n }",
"public boolean getEnabled(){\r\n\t\treturn enabled;\r\n\t}",
"public Boolean isEnabled() {\r\r\n\t\treturn _isEnabled;\r\r\n\t}",
"public Boolean isEnabled() {\n return this.enabled;\n }",
"public Boolean isEnabled() {\n return this.enabled;\n }",
"public Boolean isEnabled() {\n return this.enabled;\n }",
"public boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"public boolean isEnabled() {\n\t\treturn false;\r\n\t}",
"public boolean isEnabled()\n {\n return mSettings.getBoolean(ENABLED, true);\n }",
"public boolean isEnabled() {\r\n\t\treturn sensor.isEnabled();\r\n\t}",
"public boolean isEnabled() {\r\n\t\treturn getJTextField().isEnabled();\r\n\t}",
"public boolean enabled() {\r\n\t\treturn engaged;\r\n\t}",
"public boolean getEnabled() {\n\t\treturn mCurrentState != STATE.DISABLED;\n\t}",
"public boolean getEnabled() {\n return enabled;\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn isActive;\n\t}",
"public boolean isEnabled() {\n\t\treturn false;\n\t}",
"public boolean isEnabled() {\n\t\treturn false;\n\t}",
"public boolean getEnabled () {\r\n\tcheckWidget ();\r\n\tint topHandle = topHandle ();\r\n\treturn (OS.PtWidgetFlags (topHandle) & OS.Pt_BLOCKED) == 0;\r\n}",
"public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\r\n \t\t\treturn true;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}",
"public boolean isEnabled () {\r\n\tcheckWidget();\r\n\treturn getEnabled () && parent.isEnabled ();\r\n}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn !getSelectedDeletables().isEmpty();\n\t}",
"public Boolean enabled() {\n return this.enabled;\n }",
"public Boolean getEnabled() {\r\n return enabled;\r\n }",
"public boolean getEnabled() throws IllegalStateException\n {\n return audioEffect.getEnabled();\n }",
"public boolean isEnabled() {\n return isEnabled;\n }",
"public Boolean isEnabled() {\n return this.isEnabled;\n }",
"public Boolean getEnabled() {\n return enabled;\n }",
"public boolean isInCombat() {\n return isInCombat;\n }",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn isEnabled;\n\t}",
"public Boolean getEnabled() {\n return this.enabled;\n }",
"public Boolean getEnabled() {\n return this.enabled;\n }",
"public boolean getIsEnabledState() {\r\n\t\tif (McsElement.getElementByPartAttributeValueAndParentElement(driver,\r\n\t\t\t\t\"div\", \"@class\", PURCHASING_PRODUCT_WINDOW_CLASS, \"input\", \"@name\",\r\n\t\t\t\t\"isEnabled\", true, false).getAttribute(\"checked\") == null) {\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public boolean isGameDraw() {\n if (this.winner == 0 && isBoardFull() && this.gameStarted) {\n return true; \n }\n return false; \n }",
"public boolean isEnabled() {\n boolean enabled = parent.getDefaultEnabled();\n String propName = parent.getToggleProperty();\n if (propName != null) {\n Project proj = parent.getProject();\n if (proj != null) {\n String propValue = proj.getProperty(propName);\n if (propValue != null) {\n Boolean booleanValue = new Boolean(propValue);\n enabled = booleanValue.booleanValue();\n }\n }\n }\n\n return enabled;\n }",
"public boolean isEnabled_click_Digital_coupons_button(){\r\n\t\tif(click_Digital_coupons_button.isEnabled()) { return true; } else { return false;} \r\n\t}"
] | [
"0.7362617",
"0.7110487",
"0.7002288",
"0.69676936",
"0.69676936",
"0.69676936",
"0.6965348",
"0.6949266",
"0.6933635",
"0.68684757",
"0.68684757",
"0.685921",
"0.68454546",
"0.68454546",
"0.68454546",
"0.68454546",
"0.68454546",
"0.68454546",
"0.68454546",
"0.68454546",
"0.681344",
"0.681344",
"0.68102944",
"0.68069595",
"0.6802973",
"0.6801819",
"0.6792192",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.67896086",
"0.6779565",
"0.67785436",
"0.6777169",
"0.6770537",
"0.67688555",
"0.67688555",
"0.67688555",
"0.67688555",
"0.67688555",
"0.67641383",
"0.67631173",
"0.67631173",
"0.67292047",
"0.6728146",
"0.67197967",
"0.6713431",
"0.6710346",
"0.67039573",
"0.6699525",
"0.6699525",
"0.6699525",
"0.6683318",
"0.6681728",
"0.6677009",
"0.6674043",
"0.6664883",
"0.665186",
"0.6628734",
"0.6622105",
"0.66135883",
"0.6599318",
"0.6599318",
"0.6599318",
"0.65671647",
"0.65671647",
"0.656671",
"0.6558135",
"0.6542158",
"0.65240574",
"0.65162456",
"0.6505946",
"0.6502011",
"0.6501631",
"0.6501631",
"0.6488474",
"0.6477631",
"0.64764154",
"0.64762837",
"0.64730006",
"0.6468319",
"0.6457602",
"0.645463",
"0.64480937",
"0.6446309",
"0.6429392",
"0.64291984",
"0.6412821",
"0.6412821",
"0.64127165",
"0.6398374",
"0.63813335",
"0.6346238"
] | 0.68887115 | 9 |
Creates new form MercadoFrame | public MercadoFrame() {
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Frame createFrame();",
"public NewJFrame() {\n initComponents();\n IniciarTabla();\n \n \n // ingreso al githup \n \n }",
"FRAME createFRAME();",
"public NewFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n \n }",
"public void buildFrame();",
"public NewJFrame() {\n Connect();\n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public NewJFrame() {\r\n initComponents();\r\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n }",
"public FrameCadastro(String tipo[]){\r\n\t\tsuper(\"ApartManager-Cadastro\");\r\n\t\t\r\n\t\tPanelCadastro panelC = new PanelCadastro(tipo);\r\n\t\t\r\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\r\n\t\tsetSize(700, 700);\r\n\t\tsetLocationRelativeTo(null);\r\n\t\tsetVisible(true);\r\n\t\tsetResizable(false);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tsetContentPane(panel);\r\n\t\tpanel.setLayout(null);\r\n\t\tpanelC.setBounds(0, 0, 700, 700);\r\n\t\tpanel.add(panelC);\r\n\t\tpanel.setVisible(true);\r\n\t}",
"public NewJFrame()\r\n {\r\n initComponents();\r\n }",
"private void makeFrame(){\n frame = new JFrame(\"Rebellion\");\n\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n frame.setSize(800,800);\n\n makeContent(frame);\n\n frame.setBackground(Color.getHSBColor(10,99,35));\n frame.pack();\n frame.setVisible(true);\n }",
"public NewJFrame() {\n initComponents();\n\n }",
"public NewJFrame() {\n initComponents();\n mcam.setLineWrap(true);\n\n }",
"public static void buildFrame() {\r\n\t\t// Make sure we have nice window decorations\r\n\t\tJFrame.setDefaultLookAndFeelDecorated(true);\r\n\t\t\r\n\t\t// Create and set up the window.\r\n\t\t//ParentFrame frame = new ParentFrame();\r\n\t\tMediator frame = new Mediator();\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\t// Display the window\r\n\t\tframe.setVisible(true);\r\n\t}",
"public NewJFrame1() {\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 }",
"public NewJFrame1() {\n initComponents();\n\n dip();\n sh();\n }",
"private void makeContent(JFrame frame){\n Container content = frame.getContentPane();\n content.setSize(700,700);\n\n makeButtons();\n makeRooms();\n makeLabels();\n\n content.add(inputPanel,BorderLayout.SOUTH);\n content.add(roomPanel, BorderLayout.CENTER);\n content.add(infoPanel, BorderLayout.EAST);\n\n }",
"private static void createAndShowGUI() {\n JFrame frame = new JFrame(\"Firma digital\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLocationRelativeTo(null);\r\n\r\n //Create and set up the content pane.\r\n final FirmaDigital newContentPane = new FirmaDigital(frame);\r\n newContentPane.setOpaque(true); //content panes must be opaque\r\n frame.setContentPane(newContentPane);\r\n\r\n //Make sure the focus goes to the right component\r\n //whenever the frame is initially given the focus.\r\n frame.addWindowListener(new WindowAdapter() {\r\n public void windowActivated(WindowEvent e) {\r\n newContentPane.resetFocus();\r\n }\r\n });\r\n\r\n //Display the window.\r\n frame.pack();\r\n frame.setVisible(true);\r\n }",
"public MFrame() {\n this.setTitle(\"Sistema Punto de Venta\");\n this.setLocationRelativeTo(null);\n this.setSize(new Dimension(800,600));\n this.setResizable(true);\n this.setVisible(true);\n initComponents();\n this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n }",
"public MiFrame2() {\n initComponents();\n }",
"static void abrir() {\n frame = new ModificarPesos();\n //Create and set up the window.\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n //Set up the content pane.\n frame.addComponentsToPane(frame.getContentPane());\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }",
"@Override\n\tpublic void create() {\n\t\twithdrawFrame = new JFrame();\n\t\tthis.constructContent();\n\t\twithdrawFrame.setSize(800,500);\n\t\twithdrawFrame.show();\n\t\twithdrawFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t}",
"public FrameInsert() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n // HidenLable.setVisible(false);\n }",
"public NewRoomFrame() {\n initComponents();\n }",
"private JFrame getJFrame() {\n\t\tif (jFrame == null) {\n\t\t\tjFrame = new JFrame();\n\t\t\tjFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tjFrame.setJMenuBar(getJJMenuBar());\n\t\t\tjFrame.setSize(400, 200);\n\t\t\tjFrame.setContentPane(getJContentPane());\n\t\t\tjFrame.setTitle(\"Mancala\");\n\t\t}\n\t\treturn jFrame;\n\t}",
"public xinxiNewJFrame() {\n initComponents();\n }",
"FORM createFORM();",
"public void rebuildFrame(){\n \n // Re-initialize frame with default attributes\n controlFrame.dispose();\n controlFrame = buildDefaultFrame(\"CSCI 446 - A.I. - Montana State University\");\n \n // Initialize header with default attributes\n header = buildDefaultHeader();\n \n // Initialize control panel frame with default attributes\n controlPanel = buildDefaultPanel(BoxLayout.Y_AXIS);\n \n // Combine objects\n controlPanel.add(header, BorderLayout.NORTH);\n controlFrame.add(controlPanel);\n \n }",
"public Mainframe() {\n initComponents();\n }",
"public NewJFrame() {\n initComponents();\n \n \n //combo box\n comboCompet.addItem(\"Séléction officielle\");\n comboCompet.addItem(\"Un certain regard\");\n comboCompet.addItem(\"Cannes Courts métrages\");\n comboCompet.addItem(\"Hors compétitions\");\n comboCompet.addItem(\"Cannes Classics\");\n \n \n //redimension\n this.setResizable(false);\n \n planning = new Planning();\n \n \n }",
"public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}",
"public Jframe() {\n initComponents();\n setIndice();\n loadTextBoxs();\n }",
"private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }",
"public NewConnectionFrame() {\n initComponents();\n }",
"public NewJFrame17() {\n initComponents();\n }",
"public FrameOpcoesAgenda() {\n initComponents();\n }",
"public void createAndShowGUI() {\n JFrame.setDefaultLookAndFeelDecorated(true);\n\n //Create and set up the window.\n\tif(open==0)\n\t\tframe = new JFrame(\"Open a file\");\n\telse if(open ==1)\n\t\tframe = new JFrame(\"Save file as\");\n //frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane =this ;\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n // frame.setSize(500,500);\n//\tvalidate();\n }",
"public POSFrame() {\n initComponents();\n }",
"public NewJFrame1(NewJFrame n) {\n main = n;\n initComponents();\n winOpen();\n setLocationFrame();\n this.setVisible(true);\n }",
"public FrameControl() {\n initComponents();\n }",
"public FichaDeContactoJFrame() {\n initComponents();\n }",
"public mainframe() {\n initComponents();\n }",
"private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }",
"public NewJFrame() {\n \n this.setIconImage(img.getImage());\n initComponents();\n \n }",
"public ControlFrame addControlFrame(String theName, int theWidth, int theHeight) {\n Frame f = new Frame(theName);\n ControlFrame p = new ControlFrame(this, theWidth, theHeight);\n f.add(p);\n p.init();\n f.setTitle(theName);\n f.setSize(p.w, p.h);\n f.setLocation(50, 250);\n f.setResizable(false);\n f.setVisible(true);\n return p;\n}",
"public frame() {\r\n\t\tadd(createMainPanel());\r\n\t\tsetTitle(\"Lunch Date\");\r\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\r\n\r\n\t}",
"public void CreateTheFrame()\n {\n setSize(250, 300);\n setMaximumSize( new Dimension(250, 300) );\n setMinimumSize(new Dimension(250, 300));\n setResizable(false);\n\n pane = getContentPane();\n insets = pane.getInsets();\n\n // Apply the null layout\n pane.setLayout(null);\n }",
"FRAMESET createFRAMESET();",
"public SMFrame() {\n initComponents();\n updateComponents();\n }",
"public cinema_main_form() {\n \t\t\n \t\tmain_frame = new JFrame();//main frame\n\t\tmain_panel = new JPanel();//kedriko panel\n\t\t\n\t\t// Add the panel to the frame.\n\t\tmain_frame.getContentPane().add(main_panel, BorderLayout.CENTER);\n \t\n initComponents();\n\t\n\t\t// Exit when the window is closed.\n\t\tmain_frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }",
"public addStFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n \n }",
"public frameCliclistas() {\n initComponents();\n setLocationRelativeTo(this);\n show_ciclistas();\n }",
"public static MainFrame createNewFrame(Display display, Document doc)\n {\n Shell shell = new Shell(display);\n\n MainFrame frame = new MainFrame(shell, doc);\n frame.initComponents(null);\n\n shell.open();\n\n return frame;\n }",
"public Frame() {\n initComponents();\n }",
"public Frame() {\n initComponents();\n }",
"private void buildFrame(){\n this.setVisible(true);\n this.getContentPane();\n this.setSize(backgrondP.getIconWidth(),backgrondP.getIconHeight());\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\t \n\t }",
"public FrameDesign() {\n initComponents();\n }",
"public MenuFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n }",
"public NewDialog() {\n\t\t\t// super((java.awt.Frame)null, \"New Document\");\n\t\t\tsuper(\"JFLAP 7.0\");\n\t\t\tgetContentPane().setLayout(new GridLayout(0, 1));\n\t\t\tinitMenu();\n\t\t\tinitComponents();\n\t\t\tsetResizable(false);\n\t\t\tpack();\n\t\t\tthis.setLocation(50, 50);\n\n\t\t\taddWindowListener(new WindowAdapter() {\n\t\t\t\t@Override\n\t\t\t\tpublic void windowClosing(final WindowEvent event) {\n\t\t\t\t\tif (Universe.numberOfFrames() > 0) {\n\t\t\t\t\t\tNewDialog.this.setVisible(false);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tQuitAction.beginQuit();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\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 }",
"private JInternalFrame createInternalFrame() {\n\n initializeChartPanel();\n\n chartPanel.setPreferredSize(new Dimension(200, 100));\n final JInternalFrame frame = new JInternalFrame(\"Frame 1\", true);\n frame.getContentPane().add(chartPanel);\n frame.setClosable(true);\n frame.setIconifiable(true);\n frame.setMaximizable(true);\n frame.setResizable(true);\n return frame;\n\n }",
"public BaseFrame() {\n initComponents();\n }",
"public void addChildFrame(JFrame frame);",
"public AlterarSenhaFrame() {\n initComponents();\n }",
"public JexlEngine.Frame createFrame(Object... values) {\r\n return scope != null? scope.createFrame(values) : null;\r\n }",
"public void buildEditFrame() {\n\n\tframe.addWindowListener(new WindowAdapter() {\n\t public void windowClosing(WindowEvent e) {\n\t\t//System.exit(0);\n\t }\n\t});\n\n\t// show the frame\n frame.setSize(Width, Height);\n\tframe.setLocation(screenSize.width/2 - Width/2,\n\t\t\t screenSize.height/2 - Height/2);\n\tframe.getContentPane().setLayout(new BorderLayout());\n\tframe.getContentPane().add(jp, BorderLayout.CENTER);\n\n\tframe.pack();\n//\t((CDFEdit)getFrame()).getDialog().setVisible(false);\n\tframe.setVisible(true);\n\n\t// Deprecated API - jp.requestDefaultFocus(); \n\tjp.requestFocus();\n\tframe.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n }",
"private static void createAndShowGUI() {\n //Create and set up the window.\n JFrame frame = new JFrame(\"WAR OF MINE\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n JComponent newContentPane = new Gameframe();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.setSize(800,1000);\n frame.setVisible(true);\n }",
"private Frame buildFrame() {\n return new Frame(command, headers, body);\n }",
"private void todoChooserGui() {\r\n jframe = makeFrame(\"My Todo List\", 500, 800, JFrame.EXIT_ON_CLOSE);\r\n panelSelectFile = makePanel(jframe, BorderLayout.CENTER,\r\n \"Choose a Todo\", 150, 50, 200, 25);\r\n JButton clickRetrieve = makeButton(\"retrieveTodo\", \"Retrieve A TodoList\",\r\n 175, 100, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickRetrieve);\r\n JTextField textFieldName = makeJTextField(1, 100, 150, 150, 25);\r\n textFieldName.setName(\"Name\");\r\n panelSelectFile.add(textFieldName);\r\n JButton clickNew = makeButton(\"newTodo\", \"Make New TodoList\",\r\n 250, 150, 150, 25, JComponent.CENTER_ALIGNMENT, \"cli.wav\");\r\n panelSelectFile.add(clickNew);\r\n panelSelectFile.setBackground(Color.WHITE);\r\n jframe.setBackground(Color.PINK);\r\n jframe.setVisible(true);\r\n }",
"public PilaFrame() {\n initComponents();\n }",
"public AddFrame(MainFrame parent) {\n this.parent = parent;\n initComponents();\n }",
"private static void createGUI(){\r\n\t\tframe = new JFrame(\"Untitled\");\r\n\r\n\t\tBibtexImport bib = new BibtexImport();\r\n\t\tbib.setOpaque(true);\r\n\r\n\t\tframe.setExtendedState(JFrame.MAXIMIZED_BOTH);\r\n\t\tframe.setContentPane(bib);\r\n\t\tframe.setJMenuBar(bib.menu);\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}",
"private void initialize() {\r\n\t\tfrmMercadinho = new JFrame();\r\n\t\tfrmMercadinho.setTitle(\"Mercadinho\");\r\n\t\tfrmMercadinho.setBounds(100, 100, 529, 179);\r\n\t\tfrmMercadinho.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmMercadinho.getContentPane().setLayout(null);\r\n\t\t\r\n\t\tJButton btnPdvpontoDeVenda = new JButton(\"PDV(Ponto de venda)\");\r\n\t\tbtnPdvpontoDeVenda.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tPDVTela frame = new PDVTela();\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnPdvpontoDeVenda.setFont(new Font(\"Arial\", Font.BOLD, 16));\r\n\t\tbtnPdvpontoDeVenda.setIcon(new ImageIcon(\"images.png\"));\r\n\t\tbtnPdvpontoDeVenda.setVerticalTextPosition(SwingConstants.BOTTOM);\r\n\t\tbtnPdvpontoDeVenda.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnPdvpontoDeVenda.setBounds(10, 11, 200, 100);\r\n\t\tfrmMercadinho.getContentPane().add(btnPdvpontoDeVenda);\r\n\t\t\r\n\t\tJButton btnEstoque = new JButton(\"Estoque\");\r\n\t\tbtnEstoque.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEstoqueTela frame = new EstoqueTela();\r\n\t\t\t\tframe.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnEstoque.setFont(new Font(\"Arial\", Font.BOLD, 16));\r\n\t\tbtnEstoque.setIcon(new ImageIcon(\"estoque.PNG\"));\r\n\t\tbtnEstoque.setVerticalTextPosition(SwingConstants.BOTTOM);\r\n\t\tbtnEstoque.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\tbtnEstoque.setBounds(303, 11, 200, 100);\r\n\t\tfrmMercadinho.getContentPane().add(btnEstoque);;\r\n\t}",
"public Frame1() {\n initComponents();\n }",
"public MainFrame() {\n initComponents();\n\n\n }",
"public DisplayStaffMemberFrame() {\n initComponents();\n }",
"public JFrame getFrame(GLCapabilities caps) {\n\t\tcanvas = new GLCanvas(caps);\n\n\t\tframe = new JFrame(headerstring);\n\t\tframe.setSize(WINDOW_WIDTH, WINDOW_HEIGHT);\n\t\tframe.setJMenuBar(createbar());\n\t\tframe.add(canvas);\n\t\tframe.setVisible(true);\n\n\t\t// by default, an AWT Frame doesn't do anything when you click\n\t\t// the close button; this bit of code will terminate the program when\n\t\t// the window is asked to close\n\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tanimator = new FPSAnimator(canvas, REFRESH_RATE);\n\n\t\treturn frame;\t\n\t}"
] | [
"0.75738835",
"0.725607",
"0.7211069",
"0.71650136",
"0.6967818",
"0.6961746",
"0.6951091",
"0.6920807",
"0.6909911",
"0.6865972",
"0.6865972",
"0.6865972",
"0.6865972",
"0.6865972",
"0.6865972",
"0.6865972",
"0.68208647",
"0.6798444",
"0.6779165",
"0.6726798",
"0.6720727",
"0.6708448",
"0.6707059",
"0.6701132",
"0.6677699",
"0.6673772",
"0.66672355",
"0.6637066",
"0.66064376",
"0.65926725",
"0.6583772",
"0.6573343",
"0.6572442",
"0.655527",
"0.6536203",
"0.65087336",
"0.6502808",
"0.64730114",
"0.64577913",
"0.6448489",
"0.64036846",
"0.6396385",
"0.63842833",
"0.63771945",
"0.6376397",
"0.63708496",
"0.6350522",
"0.63504",
"0.63418084",
"0.6341138",
"0.63378704",
"0.6334225",
"0.633213",
"0.6321681",
"0.63212276",
"0.6314012",
"0.63117284",
"0.6306261",
"0.6296123",
"0.62937033",
"0.6283914",
"0.62593925",
"0.6258311",
"0.62465173",
"0.62332886",
"0.62332886",
"0.62313086",
"0.6229368",
"0.6226324",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.62253314",
"0.6224135",
"0.6223331",
"0.6213683",
"0.6206261",
"0.6202375",
"0.6201857",
"0.6197246",
"0.61966443",
"0.6183597",
"0.6177484",
"0.6168655",
"0.61573964",
"0.61565053",
"0.61373407",
"0.6136318",
"0.61339647",
"0.6131902",
"0.6131509",
"0.61305714"
] | 0.7415078 | 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() {
jPanel1 = new javax.swing.JPanel();
jPanel2 = new javax.swing.JPanel();
jScrollPane1 = new javax.swing.JScrollPane();
produtosTable = new javax.swing.JTable();
jPanel3 = new javax.swing.JPanel();
jLabel3 = new javax.swing.JLabel();
produtoTextField = new javax.swing.JTextField();
jLabel4 = new javax.swing.JLabel();
quantidadeTextField = new javax.swing.JTextField();
jLabel5 = new javax.swing.JLabel();
adicionarButton = new javax.swing.JButton();
excluirButton = new javax.swing.JButton();
valorUnitarioFormattedTextField = new javax.swing.JFormattedTextField();
jLabel2 = new javax.swing.JLabel();
jPanel4 = new javax.swing.JPanel();
jLabel6 = new javax.swing.JLabel();
jLabel7 = new javax.swing.JLabel();
subtotalLabel = new javax.swing.JLabel();
totalItemLabel = new javax.swing.JLabel();
jLabel1 = new javax.swing.JLabel();
jLabel10 = new javax.swing.JLabel();
jTextField4 = new javax.swing.JTextField();
jLabel11 = new javax.swing.JLabel();
jTextField5 = new javax.swing.JTextField();
finalizarButton = new javax.swing.JButton();
cancelarButton = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("Aula 6 - Sistema de Supermercado");
setResizable(false);
jPanel1.setBackground(new java.awt.Color(142, 68, 173));
jPanel2.setBackground(new java.awt.Color(255, 255, 255));
produtosTable.setFont(new java.awt.Font("Calibri", 0, 12)); // NOI18N
produtosTable.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"Produto", "Valor Untário", "Quantidade", "Valor Total"
}
) {
Class[] types = new Class [] {
java.lang.String.class, java.lang.Double.class, java.lang.Integer.class, java.lang.Double.class
};
boolean[] canEdit = new boolean [] {
false, false, false, false
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
public boolean isCellEditable(int rowIndex, int columnIndex) {
return canEdit [columnIndex];
}
});
produtosTable.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
produtosTableMouseClicked(evt);
}
});
jScrollPane1.setViewportView(produtosTable);
jPanel3.setBackground(new java.awt.Color(236, 240, 241));
jLabel3.setText("Produto");
produtoTextField.setFont(new java.awt.Font("Calibri", 1, 24)); // NOI18N
jLabel4.setText("Valor Unitário (R$)");
quantidadeTextField.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
quantidadeTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
quantidadeTextField.setToolTipText("");
jLabel5.setText("Quantidade");
adicionarButton.setBackground(new java.awt.Color(46, 204, 113));
adicionarButton.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
adicionarButton.setForeground(new java.awt.Color(255, 255, 255));
adicionarButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/edu/fatec/icones/cart-43-16.png"))); // NOI18N
adicionarButton.setText("Adicionar");
adicionarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
adicionarButtonActionPerformed(evt);
}
});
excluirButton.setBackground(new java.awt.Color(231, 76, 60));
excluirButton.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
excluirButton.setForeground(new java.awt.Color(255, 255, 255));
excluirButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/edu/fatec/icones/x-mark-3-16 (1).png"))); // NOI18N
excluirButton.setText("Excluir");
excluirButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
excluirButtonActionPerformed(evt);
}
});
valorUnitarioFormattedTextField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(java.text.NumberFormat.getIntegerInstance())));
valorUnitarioFormattedTextField.setHorizontalAlignment(javax.swing.JTextField.CENTER);
valorUnitarioFormattedTextField.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(produtoTextField)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel3)
.addGap(0, 0, Short.MAX_VALUE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addComponent(adicionarButton, javax.swing.GroupLayout.DEFAULT_SIZE, 162, Short.MAX_VALUE)
.addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(valorUnitarioFormattedTextField))
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(quantidadeTextField)
.addComponent(excluirButton, javax.swing.GroupLayout.DEFAULT_SIZE, 169, Short.MAX_VALUE)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel5)
.addGap(0, 0, Short.MAX_VALUE)))))
.addContainerGap())
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(produtoTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(20, 20, 20)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(quantidadeTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel3Layout.createSequentialGroup()
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(valorUnitarioFormattedTextField)))
.addGap(18, 18, 18)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(adicionarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(excluirButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(26, Short.MAX_VALUE))
);
jLabel2.setText("Lista de Produtos");
jPanel4.setBackground(new java.awt.Color(243, 156, 18));
jLabel6.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
jLabel6.setForeground(new java.awt.Color(255, 255, 255));
jLabel6.setText("Item");
jLabel7.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
jLabel7.setForeground(new java.awt.Color(255, 255, 255));
jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
jLabel7.setText("Subtotal a pagar");
subtotalLabel.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
subtotalLabel.setForeground(new java.awt.Color(255, 255, 255));
subtotalLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
subtotalLabel.setText("0");
totalItemLabel.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
totalItemLabel.setForeground(new java.awt.Color(255, 255, 255));
totalItemLabel.setText("0");
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(totalItemLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(subtotalLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 116, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel4Layout.createSequentialGroup()
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jLabel7))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(subtotalLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(totalItemLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel2)
.addGap(0, 0, Short.MAX_VALUE))
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(10, 10, 10)
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(13, 13, 13)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
jLabel1.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
jLabel1.setForeground(new java.awt.Color(255, 255, 255));
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
jLabel1.setText("MERCADO - CAIXA ABERTO");
jLabel10.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
jLabel10.setForeground(new java.awt.Color(255, 255, 255));
jLabel10.setText("Valor Recebido");
jTextField4.setBackground(new java.awt.Color(155, 89, 182));
jTextField4.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
jTextField4.setForeground(new java.awt.Color(255, 255, 255));
jTextField4.setToolTipText("");
jTextField4.setBorder(javax.swing.BorderFactory.createEtchedBorder());
jLabel11.setFont(new java.awt.Font("Calibri", 1, 12)); // NOI18N
jLabel11.setForeground(new java.awt.Color(255, 255, 255));
jLabel11.setText("Troco");
jTextField5.setBackground(new java.awt.Color(155, 89, 182));
jTextField5.setFont(new java.awt.Font("Calibri", 1, 36)); // NOI18N
jTextField5.setForeground(new java.awt.Color(255, 255, 255));
jTextField5.setToolTipText("");
jTextField5.setBorder(javax.swing.BorderFactory.createEtchedBorder());
finalizarButton.setBackground(new java.awt.Color(52, 152, 219));
finalizarButton.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
finalizarButton.setForeground(new java.awt.Color(255, 255, 255));
finalizarButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/edu/fatec/icones/ok-16.png"))); // NOI18N
finalizarButton.setText("Finalizar");
cancelarButton.setBackground(new java.awt.Color(231, 76, 60));
cancelarButton.setFont(new java.awt.Font("Calibri", 1, 18)); // NOI18N
cancelarButton.setForeground(new java.awt.Color(255, 255, 255));
cancelarButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/br/edu/fatec/icones/erase-16.png"))); // NOI18N
cancelarButton.setText("Cancelar");
cancelarButton.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cancelarButtonActionPerformed(evt);
}
});
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel10)
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel11)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 184, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(finalizarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(cancelarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 81, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(jLabel11)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(finalizarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cancelarButton, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(21, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
setLocationRelativeTo(null);
} | {
"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 quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\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 Magasin() {\n initComponents();\n }",
"public intrebarea() {\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}",
"@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 LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\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 FrmMenu() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\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 JFFornecedores() {\n initComponents();\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.73201853",
"0.7291607",
"0.7291607",
"0.7291607",
"0.7285772",
"0.7248832",
"0.721371",
"0.72083634",
"0.71965843",
"0.7190274",
"0.71847606",
"0.71592176",
"0.71481156",
"0.70935035",
"0.70799935",
"0.70570904",
"0.6987588",
"0.6977819",
"0.69557554",
"0.6953564",
"0.6945299",
"0.6942377",
"0.69355065",
"0.69326174",
"0.69278985",
"0.69251215",
"0.69248855",
"0.6911974",
"0.6911815",
"0.68930984",
"0.68926644",
"0.6890748",
"0.689013",
"0.6889194",
"0.68833196",
"0.68817353",
"0.68812305",
"0.68779206",
"0.6875422",
"0.6874629",
"0.687249",
"0.6859694",
"0.6857467",
"0.6855978",
"0.68553996",
"0.68549085",
"0.6853271",
"0.6853271",
"0.68530285",
"0.68427855",
"0.6837456",
"0.68367314",
"0.682818",
"0.6828002",
"0.6826416",
"0.6823491",
"0.6823434",
"0.68172073",
"0.6816386",
"0.6810029",
"0.68090403",
"0.680861",
"0.6807909",
"0.6807168",
"0.680365",
"0.67955285",
"0.6795115",
"0.6792028",
"0.6790702",
"0.6789993",
"0.67889",
"0.67872643",
"0.6782707",
"0.67665267",
"0.6765798",
"0.6765086",
"0.6755966",
"0.6755084",
"0.6751955",
"0.6750892",
"0.67433685",
"0.67388666",
"0.6737211",
"0.6735823",
"0.673344",
"0.67278177",
"0.67267376",
"0.67203826",
"0.6716326",
"0.67144203",
"0.6713941",
"0.6707991",
"0.67068243",
"0.6704236",
"0.6701207",
"0.66996884",
"0.6698865",
"0.6697606",
"0.6693878",
"0.6691149",
"0.6689875"
] | 0.0 | -1 |
this Constructor will creat new music | public Musics(String address, String name, int date){
this.address = address;
this.singerName = name;
this.date = date;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Music()\n {\n this(0, \"\", \"\", \"\", \"\", \"\");\n }",
"public Music createMusic(String file);",
"private void makeNewMusic() {\n File f = music.getFile();\n boolean playing = music.isPlaying();\n music.stop();\n music = new MP3(f);\n if (playing) {\n music.play(nextStartTime);\n }\n }",
"public void loadMusic(File f) {\n music = new MP3(f);\n }",
"private void initialMusic(){\n\n }",
"public Song() {}",
"public Music(String...files){\n musicFiles = new ArrayList<AudioFile>();\n for(String file: files){\n musicFiles.add(new AudioFile(file));\n }\n }",
"public Songs() {\n }",
"void startMusic(AudioTrack newSong);",
"private static void loadMusic()\n\t{\n\t\t// TODO: update this with the correct file names.\n\t\tmusic = new ArrayList<Music>();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"Lessons-8bit.mp3\"))));\n\t\t\tmusic.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"bolo_menu.mp3\"))));\n\t\t\t//music.add(Gdx.audio.newMusic(new FileHandle(new File(MUSIC_PATH + \"song2.ogg\"))));\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(e);\n\t\t\te.printStackTrace();\n\t\t\tthrow e;\n\t\t}\n\t}",
"public Sound(Context context) {\r\n\t\tthis.mp = MediaPlayer.create(context, R.raw.baby);\r\n\t\r\n\t}",
"public AudioList(){}",
"private SoundPlayer(String mp3) {\n\t\tfile = new File(mp3);\n\t}",
"public void StartMusic(int music_id);",
"public MusicPlayer() {\n\t\t// initialize all instance variables\n\t\tplaylist = new BinaryHeapA(new Song[0]);\n\t\tfavoritelist = new BinaryHeapA(new Song[0]);\n\t\tisPlaylist = true;\n\t\tsortOrder = 0;\n\t\tisPlaying = false;\n\t\tcurrentSongIndex = 0;\n\t\trepeat = true;\n\t\tshuffle = false;\n\t\tshuffleOrder = new ArrayList<Song>();\n\t\tshuffleSongIndex = -1;\n\t}",
"@Override\r\n\tpublic void setMusic() {\r\n\t\tmanager.getMusicManager().setMusic((Music) Gdx.audio.newMusic(Gdx.files.internal(\"Music/Bandit Camp.mp3\")));\r\n\t}",
"@Override\n public void initialize() {\n //talonOrchestra.playMusic();\n }",
"private void startMusic() {\r\n final Format input1 = new AudioFormat(AudioFormat.MPEGLAYER3);\r\n final Format input2 = new AudioFormat(AudioFormat.MPEG);\r\n final Format output = new AudioFormat(AudioFormat.LINEAR);\r\n PlugInManager.addPlugIn(\r\n \"com.sun.media.codec.audio.mp3.JavaDecoder\",\r\n new Format[]{input1, input2},\r\n new Format[]{output},\r\n PlugInManager.CODEC\r\n );\r\n try {\r\n final File f = new File(\"support_files//tetris.mp3\");\r\n myPlayer = Manager.createPlayer(new MediaLocator(f.toURI().toURL()));\r\n } catch (final NoPlayerException | IOException e) {\r\n e.printStackTrace();\r\n }\r\n if (myPlayer != null) {\r\n myPlayer.start();\r\n }\r\n }",
"public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}",
"private Audio() {}",
"public CD(String song1, String song2, String song3, String song4, String song5) {\n songs = new ArrayList<>();\n songs.add(song1);\n songs.add(song2);\n songs.add(song3);\n songs.add(song4);\n songs.add(song5);\n currentindex = songs.size();\n }",
"public Music loadMusic(String fileName);",
"public Sound(String theSong)\n\t{\n\t\tminim = new Minim(new PApplet());\n\t\tthis.theSong = theSong;\n\t\tcanPlay = true;\n\t\tswitch (theSong)\n\t\t{\n\t\tcase \"SG1\":\n\t\t\tsong = minim.loadFile(\"assets/shotgunCock1.wav\");\n\t\t\tbreak;\n\t\tcase \"SG2\":\n\t\t\tsong = minim.loadFile(\"assets/shotgunCock2.wav\");\n\t\t\tbreak;\n\t\tcase \"ARFire\":\n\t\t\tsong = minim.loadFile(\"assets/M4Fire.mp3\");\n\t\t\tbreak;\n\t\tcase \"click\":\n\t\t\tsong = minim.loadFile(\"assets/gunClick.mp3\");\n\t\t\tbreak;\n\t\tcase \"clipIn\":\n\t\t\tsong = minim.loadFile(\"assets/clipIn.mp3\");\n\t\t\tbreak;\n\t\tcase \"clipOut\":\n\t\t\tsong = minim.loadFile(\"assets/clipOut.mp3\");\n\t\t\tbreak;\n\t\tcase \"chamberOut\":\n\t\t\tsong = minim.loadFile(\"assets/ARChamberOut.mp3\");\n\t\t\tbreak;\n\t\tcase \"chamberIn\":\n\t\t\tsong = minim.loadFile(\"assets/ARChamberIn.mp3\");\n\t\t\tbreak;\t\t\n\t\tcase \"shell\":\n\t\t\tsong = minim.loadFile(\"assets/shellFall.mp3\");\n\t\t\tbreak;\n\t\tcase \"SGFire\":\n\t\t\tsong = minim.loadFile(\"assets/SGBlast.mp3\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tsong = null;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}",
"public Song(String t, String alb, String art, String y){\n title = t;\n album = alb;\n artist = art;\n year = y; \n }",
"Song() {\n\t\tmEnsemble = ensemble;\n\t\tmTitle = \"Strawberry Fields\";\n\t\tmYearReleased = 1969;\n\t}",
"public MyPod()\n {\n color = \"black\";\n memory = 4;\n \n songLibrary[0] = new Song();\n songLibrary[1] = new Song();\n songLibrary[2] = new Song();\n \n \n \n }",
"public void initMusic() {\r\n mSoundPool = new SoundPool(3, AudioManager.STREAM_MUSIC, 0);\r\n mSoundClick = mSoundPool.load(getActivity(), R.raw.click, 1);\r\n mSoundCorrect = mSoundPool.load(getActivity(), R.raw.correct, 1);\r\n mSoundIncorrect = mSoundPool.load(getActivity(), R.raw.wrong, 1);\r\n }",
"public static void startMusic()\r\n\t{\r\n\t\tif ( musicPlayer == null )\r\n\t\t\tmusicPlayer = new MusicPlayer( \"Music2.mid\" );\r\n\t\telse\r\n\t\t\tmusicPlayer.play();\r\n\t}",
"public static void startMusic()\n\t{\n\t\tif (music == null)\n\t\t{\n\t\t\tloadMusic();\n\t\t\tif (music.size() < 2)\n\t\t\t{\n\t\t\t\tthrow new GameLogicException(\"At least two songs must be specified.\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurrentMusicFile = 0;\n\t\tmusic.get(currentMusicFile).setVolume(musicVolume / 100.f);\n\t\tmusic.get(currentMusicFile).play();\n\t\tmusic.get(currentMusicFile).setOnCompletionListener(musicOnCompletionListener);\n\t}",
"private MusicManager() {\n\t\ttry {\n\t\t\t// init sequencer\n\t\t\tsequencer = MidiSystem.getSequencer();\n\t\t\tsequencer.open();\n\n\t\t\t// init synthesizer\n\t\t\tsynth = MidiSystem.getSynthesizer();\n\t\t\tsynth.open();\n\t\t\t\n\t\t\t// DEBUG\n\t\t\t//System.out.print(\"latency = \" + synth.getLatency());\n\t\t\t//System.out.print(\"max polyphony = \" + synth.getMaxPolyphony());\n\n\t\t\t// get channel for synthesizing: the highest numbered channel. sets it up\n\t\t\tMidiChannel[] channels = synth.getChannels();\n\t\t\tsynthChannel = channels[channels.length - 1];\n\t\t\tsetSynthInstrument(MusicManager.SYNTH_INSTRUMENT);\n\t\t\t\n\t\t} catch (MidiUnavailableException e) {\n\t\t\tErrorHandler.display(\"Cannot play MIDI music\");\n\t\t\tsequencer = null; // remember this! sequencer can be null.\n\t\t\treturn;\n\t\t}\n\t\t\n\t}",
"public Playlist(String name){\n this.name = name;\n this.duration = new Time(0, 0);\n this.playSongs = new Song[MAX_SONGS_PLAYLIST];\n \n }",
"public MusicModel() {\n this(90000);\n }",
"public SoundTrack(String title, String artist, String language){\n this.artist = artist; // assigns passed variable to instance variable\n this.language = language; // assigns passed variable to instance variable\n this.title = title; // assigns passed variable to instance variable\n }",
"public MusicPlayer() {\n player = new BasicPlayer();\n controller = (BasicController) player;\n volume = -1.0; // indicates that gain has yet to be initialized\n }",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"public MusicLibrary() {\n\t\tthis.idMap = new HashMap<String, Song>();\n\t\tthis.titleMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.artistMap = new TreeMap<String, TreeSet<Song>>(new StringComparator());\n\t\tthis.tagMap = new TreeMap<String, TreeSet<String>>(new StringComparator());\n\t\t//this.artistList = new ArrayList<>();\n\t}",
"public void StartMusic(musicenum_t music_id);",
"public Song(String title, String artist) {\r\n this.title = title;\r\n this.artist = artist;\r\n }",
"public Media() {\n\t}",
"public Sound(String name, boolean isMusic, boolean loops, boolean stream){\r\n\t\tsetName(name);\r\n\t\tthis.isMusic = isMusic;\r\n\t\tthis.loops = loops;\r\n\t\tinitialized = findSound(stream);\r\n\t\tif(!initialized){\r\n\t\t\tSystem.out.println(\"Problem encountered initializing sound\");\r\n\t\t}\r\n\t}",
"public SoundManager() {\n mCurrentSoundID = -1;\n //mNames = new String[16];//new Vector();\n// mPlayers = new Player[16];//new Vector();\n int numSound = getNumberOfSounds();\n mSoundData = new byte[numSound][];\n mPlayers = new Player[numSound];\n for (int i = 0; i < numSound; i++) {\n //mNames[i] = null;\n// mPlayers[i] = null;\n mSoundData[i] = null;\n mPlayers[i] = null;\n }\n //mCurrentSound = \"\";\n mIsActive = false;\n mIsIdle = true;\n mCurPlayer = null;\n }",
"public WavPlayer(String track) {\n\t\tthis.wavMusicFile = track;\n\t\t//startSound();\n\n\t}",
"private String addMusic() {\n\t\t// One Parameter: MusicName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|music:\" + parameters[0]);\n\t\treturn tag.toString();\n\n\t}",
"public void setMusic(Music music);",
"public Song(String artist, String title) { \r\n\t\tthis.artist = artist;\r\n\t\tthis.title = title;\r\n\t\tthis.minutes = 0;\r\n\t\tthis.seconds = 0;\r\n\t}",
"public SongRecord(){\n\t}",
"private static void playAudio(String musicFile) {\n }",
"public TestWav()\r\n {\r\n super(\"AudioPlayer\");\r\n player = new Playback();\r\n String[] audioFileNames = findFiles(AUDIO_DIR, null);\r\n makeFrame(audioFileNames);\r\n }",
"public void playMusic() {\n\t\tthis.music.start();\n\t}",
"public PlayList() {\n\t\tthis.name = \"Untitled\";\n\t\tsongList = new ArrayList<Song>();\n\t}",
"public Value(MusicFile musicFile){\n this.musicFile = musicFile;\n }",
"public MusicSheet() {\n Log.w(TAG,\"empty constructor\");\n // vertexArray = new VertexArray(VERTEX_DATA);\n }",
"public SongArray(){\n }",
"public MusicCollection(String name,Song... songs)\n {\n this.songs = new ArrayList<Song>();\n for(Song tempSong : songs) {\n if ( !this.songs.contains(tempSong) )\n this.songs.add(tempSong);\n else\n System.out.println(\"this file is already in this collection.\");\n }\n player = new MusicPlayer();\n this.name = name;\n }",
"@Override\n public void create()\n {\n Gdx.app.setLogLevel(Application.LOG_DEBUG);\n \n // Load assets\n Assets.instance.init(new AssetManager());\n \n // Load preferences for audio settings, and start playing music\n GamePreferences.instance.load();\n AudioManager.instance.play(Assets.instance.music.song01);\n \n // Start game at menu screen\n setScreen(new MenuScreen(this));\n }",
"public MusicFilter(List<Music> songs)\n {\n this.songs = songs;\n }",
"public Music getMusic();",
"public AudioChannel() {\r\n\t\t// Default temporary location file has to be picked.\r\n\t\tString defalultFileName = getFileName(null, \"wav\");\r\n\t\tfile = new File( defalultFileName );\r\n\t}",
"public static void init() {\n\t\tmusicManager = new MusicManager();\n\t}",
"@Override\n public void create() {\n\n batch = new SpriteBatch();\n manager = new AssetManager();\n\n manager.load(\"audio/main_theme.mp3\", Music.class);\n // manager.load(\"String sonido\", Sound.class);\n manager.load(\"sprites/dragon.pack\", TextureAtlas.class);\n manager.load(\"sprites/vanyr.pack\", TextureAtlas.class);\n manager.finishLoading();\n\n setScreen(new PlayScreen(this));\n\n }",
"public PlayList() {\n\t\tsongList = new ArrayList<Song>();\n\t}",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"void Init(int sfxVolume, int musicVolume);",
"public void createNewPlayer(ArrayList<MediaItem> itemList) {\n // eliminate the old player\n if (this.player != null) {\n this.player.dispose();\n }\n // Check the Playlist\n if (this.playlist == null) {\n // Generate a new playlist\n this.playlist = new Playlist(itemList, this.eventBus);\n }\n\n // Establish a player for the first song and play it.\n this.player = new MediaPlayer(this.playlist.getCurrentMedia());\n initPlay(); // recursive method\n }",
"public Music loadMusic(String fileName, float volume);",
"public Track() {\r\n }",
"public Playlist()\n\t{\n\t\tthis(\"UNTITLED\");\n\t}",
"public Sound createSound(String file);",
"public Music(String Level, float volume) throws Exception {\n\t\tsongName = Level;\n\t\tisReverse = false;\n\t\tflangeForward = true;\n\t\tisFlanging = false;\n\t\tisWah = false;\n\t\tisDistorted = false;\n\t\t// Load music file\n\t\tFLACFile fileIn = new FLACFile(\"audio/music/\" + Level + \".flac\");\n\t\t\n\t\t// Create the reverse form\n\t\tByteBuffer forwardBuffer = fileIn.getData();\n\t\tmusicSize = forwardBuffer.limit();\n\t\tByteBuffer reverseBuffer = FilterProcessing.createReverseData(forwardBuffer);\n\t\t// Create the wah'd forms\n\t\tByteBuffer wahBuffer = FilterProcessing.createWahData(forwardBuffer, fileIn.getSampleRate());\n\t\tByteBuffer revWahBuffer = FilterProcessing.createReverseData(wahBuffer);\n\t\t// Create the distorted forms\n\t\tByteBuffer distortBuffer = FilterProcessing.createDistortionData(forwardBuffer, fileIn.getSampleRate());\n\t\tByteBuffer revDistortBuffer = FilterProcessing.createReverseData(distortBuffer);\n\t\t// Create the distorted wah forms\n\t\tByteBuffer wahDistortBuffer = FilterProcessing.createDistortionData(wahBuffer, fileIn.getSampleRate());\n\t\tByteBuffer revWahDistortBuffer = FilterProcessing.createReverseData(wahDistortBuffer);\n\t\t\n\t\t// Get the flanger data\n\t\tflangeMS = fileIn.getSampleRate() / 1000;\n\t\tflangeOffset = flangeMS * 10;\n\t\t\n\t\t// Create the AL buffers\n\t\tmusicBufferIndex = alGenBuffers();\n\t\treverseBufferIndex = alGenBuffers();\n\t\twahBufferIndex = alGenBuffers();\n\t\trevWahBufferIndex = alGenBuffers();\n\t\tdistortBufferIndex = alGenBuffers();\n\t\trevDistortBufferIndex = alGenBuffers();\n\t\twahDistortBufferIndex = alGenBuffers();\n\t\trevWahDistortBufferIndex = alGenBuffers();\n\t alBufferData(musicBufferIndex, fileIn.getFormat(), fileIn.getData(), fileIn.getSampleRate());\n\t alBufferData(reverseBufferIndex, fileIn.getFormat(), reverseBuffer, fileIn.getSampleRate());\n\t alBufferData(wahBufferIndex, fileIn.getFormat(), wahBuffer, fileIn.getSampleRate());\n\t alBufferData(revWahBufferIndex, fileIn.getFormat(), revWahBuffer, fileIn.getSampleRate());\n\t alBufferData(distortBufferIndex, fileIn.getFormat(), distortBuffer, fileIn.getSampleRate());\n\t alBufferData(revDistortBufferIndex, fileIn.getFormat(), revDistortBuffer, fileIn.getSampleRate());\n\t alBufferData(wahDistortBufferIndex, fileIn.getFormat(), wahDistortBuffer, fileIn.getSampleRate());\n\t alBufferData(revWahDistortBufferIndex, fileIn.getFormat(), revWahDistortBuffer, fileIn.getSampleRate());\n\t \n\t // Clear the ByteBuffers\n\t fileIn.dispose();\n\t reverseBuffer.clear();\n\t wahBuffer.clear();\n\t revWahBuffer.clear();\n\t distortBuffer.clear();\n\t revDistortBuffer.clear();\n\t wahDistortBuffer.clear();\n\t revWahDistortBuffer.clear();\n\t \n\t // Create sources\n\t musicSourceIndex = alGenSources();\n\t reverseSourceIndex = alGenSources();\n\t flangeSourceIndex = alGenSources();\n\t revFlangeSourceIndex = alGenSources();\n\t wahSourceIndex = alGenSources();\n\t revWahSourceIndex = alGenSources();\n\t wahFlangeSourceIndex = alGenSources();\n\t revWahFlangeSourceIndex = alGenSources();\n\t\tdistortSourceIndex = alGenSources();\n\t\trevDistortSourceIndex = alGenSources();\n\t distortFlangeSourceIndex = alGenSources();\n\t revDistortFlangeSourceIndex = alGenSources();\n\t\twahDistortSourceIndex = alGenSources();\n\t\trevWahDistortSourceIndex = alGenSources();\n\t\twahDistortFlangeSourceIndex = alGenSources();\n\t\trevWahDistortFlangeSourceIndex = alGenSources();\n\t alSourcei(musicSourceIndex, AL_BUFFER, musicBufferIndex);\n\t alSourcei(reverseSourceIndex, AL_BUFFER, reverseBufferIndex);\n\t alSourcei(flangeSourceIndex, AL_BUFFER, musicBufferIndex);\n\t alSourcei(revFlangeSourceIndex, AL_BUFFER, reverseBufferIndex);\n\t alSourcei(wahSourceIndex, AL_BUFFER, wahBufferIndex);\n\t alSourcei(revWahSourceIndex, AL_BUFFER, revWahBufferIndex);\n\t alSourcei(wahFlangeSourceIndex, AL_BUFFER, wahBufferIndex);\n\t alSourcei(revWahFlangeSourceIndex, AL_BUFFER, revWahBufferIndex);\n\t alSourcei(distortSourceIndex, AL_BUFFER, distortBufferIndex);\n\t alSourcei(revDistortSourceIndex, AL_BUFFER, revDistortBufferIndex);\n\t alSourcei(distortFlangeSourceIndex, AL_BUFFER, distortBufferIndex);\n\t alSourcei(revDistortFlangeSourceIndex, AL_BUFFER, revDistortBufferIndex);\n\t alSourcei(wahDistortSourceIndex, AL_BUFFER, wahDistortBufferIndex);\n\t alSourcei(revWahDistortSourceIndex, AL_BUFFER, revWahDistortBufferIndex);\n\t alSourcei(wahDistortFlangeSourceIndex, AL_BUFFER, wahDistortBufferIndex);\n\t alSourcei(revWahDistortFlangeSourceIndex, AL_BUFFER, revWahDistortBufferIndex);\n\t \n\t // Set music source properties\n\t setVolume(volume);\n\t alSourcei(musicSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(flangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(reverseSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(wahSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revWahSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(wahFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revWahFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(distortSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revDistortSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(distortFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revDistortFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(wahDistortSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revWahDistortSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(wahDistortFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t alSourcei(revWahDistortFlangeSourceIndex, AL_LOOPING, AL_TRUE);\n\t playMusic();\n\t}",
"public Song(Song s) {\r\n\t\tthis.title = getTitle();\r\n\t\tthis.artist = getArtist();\r\n\t\tthis.minutes = getMinutes();\r\n\t\tthis.seconds = getSeconds();\r\n\t\ts = new Song(this.title, this.artist, this.minutes, this.seconds);\r\n\t}",
"private void fillMusicList()\n\t{\n\t\tmusicList.add(\"violin\");\n\t\tmusicList.add(\"viola\");\n\t\tmusicList.add(\"cello\");\n\t\tmusicList.add(\"bass\");\n\t\tmusicList.add(\"guitar\");\n\t\tmusicList.add(\"drums\");\n\t\tmusicList.add(\"tuba\");\n\t\tmusicList.add(\"flute\");\n\t\tmusicList.add(\"harp\");\n\t}",
"public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }",
"public void mp3(View view) {\n mp1 = MediaPlayer.create(this, R.raw.heyjude);\n mp1.setLooping(false);\n mp1.setVolume(100, 100);\n mp1.start();\n }",
"@Override\n public void makeSound() {\n\n }",
"@Override\n public void makeSound() {\n\n }",
"public AddSong(String title) {\n id = title;\n initComponents();\n }",
"public AudioFragment() {\n }",
"public Band(String msg) {\n name = msg;\n link = \"https://www.last.fm/music/\" + name;\n connect();\n }",
"@Override\n protected Void doInBackground(String... params) {\n mediaPlayer = new MediaPlayer();\n mediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);\n try {\n mediaPlayer.setDataSource(url_music);\n // Log.e(\"songs url\", url_music);\n\n } catch (IllegalArgumentException e) {\n // Toast.makeText(getActivity(), \"You might not set the URI correctly!\", Toast.LENGTH_LONG).show();\n } catch (SecurityException e) {\n // Toast.makeText(getActivity(), \"You might not set the URI correctly!\", Toast.LENGTH_LONG).show();\n } catch (IllegalStateException e) {\n // Toast.makeText(getActivity(), \"You might not set the URI correctly!\", Toast.LENGTH_LONG).show();\n } catch (IOException e) {\n //e.printStackTrace();\n }\n try {\n mediaPlayer.prepare();\n } catch (IllegalStateException e) {\n //Toast.makeText(mContext, \"You might not set the URI correctly!\", Toast.LENGTH_SHORT).show();\n //cc.showToast(\"You might not set the URI correctly!\");\n } catch (IOException e) {\n // Toast.makeText(mContext, \"You might not set the URI correctly!\", Toast.LENGTH_SHORT).show();\n //cc.showToast(\"You might not set the URI correctly!\");\n }\n\n return null;\n }",
"public MP3 getMusic() {\n return music;\n }",
"public static void musicFirstLevel(){\n\t\ttry {\r\n\t\t\tbgmusicLevel = new Music(\"res/sound/firstLevel.wav\");\r\n\t\t\tbgmusicLevel.loop(1f, 0.1f);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public PlayMusic(ArrayList<Note> Notes, boolean Written)\n {\n notes = Notes;\n written = Written;\n threads = new ArrayList<thread>();\n }",
"public Play() {\n }",
"private void setupPlayer() {\n player = MediaPlayer.create(MediaPlayerActivity.this, R.raw.byte_music);\n updateState(MediaPlayerState.STATE_PREPARED);\n }",
"public Album() {\n }",
"public WritableMp3File() {\n super();\n // TODO Auto-generated constructor stub\n }",
"public Multi_Player()\r\n {\r\n \r\n }",
"public MusicModel(int tempo) {\n this.notes = new HashMap<>();\n this.tempo = tempo;\n }",
"public Track(String fileName) {\n \t\tsoundFile = new File(fileName);\n \t\tSystem.out.println(\"absolute path: \" + soundFile.getAbsolutePath());\n \t}",
"private SoundUtils() {}",
"@Override\n\tpublic Loader onCreateLoader(int id, Bundle args) {\n\t\treturn new MusicMediaLibaryLoader(getActivity());\n\t}",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public Autoplay() {\n }",
"public MusicPlayer(Context context) {\r\n\t\tmediaPlayer = new MediaPlayer();\r\n mContext = context;\r\n mediaPlayer.setOnErrorListener(new MediaPlayer.OnErrorListener() {\r\n @Override\r\n public boolean onError(MediaPlayer mp, int what, int extra) {\r\n mediaPlayer.stop();\r\n mediaPlayer.release();\r\n mediaPlayer = null;\r\n return true;\r\n }\r\n });\r\n\t}",
"public Music getMusic() {\n return music;\n }",
"void changeMusic(AudioTrack newSong);",
"private void play() {\n /** Memanggil File MP3 \"indonesiaraya.mp3\" */\n try {\n mp.prepare();\n } catch (IllegalStateException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /** Menjalankan Audio */\n mp.start();\n\n /** Penanganan Ketika Suara Berakhir */\n mp.setOnCompletionListener(new OnCompletionListener() {\n @Override\n public void onCompletion(MediaPlayer mp) {\n stateAwal();\n }\n });\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void startPlaying() {\n try {\n mPlayer = new MediaPlayer();\n try {\n mPlayer.setDataSource(audioFile.getAbsolutePath());\n mPlayer.prepare();\n mPlayer.start();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"prepare() failed\");\n }\n showTimer(false);\n } catch (Exception e) {\n logException(e, \"MicManualFragment_startPlaying()\");\n }\n\n }",
"public abstract void makeSound();",
"public MediaView loadMusic(StackPane p)\n {\n String musicLoc = \"PTtheme.mp3\";\n \n Media mjuzik = new Media(new File(musicLoc).toURI().toString());\n MediaPlayer mediaPlayer = new MediaPlayer(mjuzik);\n mediaPlayer.setAutoPlay(true);\n \n playMusic = new Button(\"Music On/Off\");\n \n MediaView mjuzikView = new MediaView(mediaPlayer); \n \n //on click\n playMusic.setOnAction(new EventHandler<ActionEvent>() \n {\n @Override\n public void handle(ActionEvent e) \n {\n Status status = mediaPlayer.getStatus();\n\n if (status == Status.PAUSED || status == Status.READY || status == Status.STALLED || status == Status.STOPPED) \n {\n mediaPlayer.play();\n } \n else \n {\n mediaPlayer.pause();\n }\n }\n });\n \n playMusic.setTranslateX(0);\n playMusic.setTranslateY(-425);\n playMusic.setScaleX(1);\n playMusic.setScaleY(1); \n \n p.getChildren().add(playMusic);\n \n return mjuzikView;\n }"
] | [
"0.7981132",
"0.7907937",
"0.7527351",
"0.7163389",
"0.7156959",
"0.7131693",
"0.71050614",
"0.70386666",
"0.70236325",
"0.7005141",
"0.69359165",
"0.6924347",
"0.68884444",
"0.68805534",
"0.6802945",
"0.67642915",
"0.675438",
"0.6751099",
"0.6748066",
"0.6706221",
"0.6698672",
"0.66824406",
"0.6678263",
"0.6674683",
"0.666678",
"0.666246",
"0.66547877",
"0.66485536",
"0.6644588",
"0.663553",
"0.6629767",
"0.6600321",
"0.6542388",
"0.65404963",
"0.6538108",
"0.65334624",
"0.6528349",
"0.65189564",
"0.6461484",
"0.6445413",
"0.6439238",
"0.6438863",
"0.6421001",
"0.64083135",
"0.6401105",
"0.63716495",
"0.63397115",
"0.63099253",
"0.62915266",
"0.6289609",
"0.6283392",
"0.627417",
"0.62585235",
"0.6256559",
"0.6255739",
"0.6239757",
"0.6227468",
"0.6217503",
"0.6206917",
"0.61982447",
"0.6184486",
"0.61841524",
"0.6183348",
"0.61797476",
"0.61735874",
"0.6169599",
"0.6149465",
"0.61372524",
"0.6134392",
"0.6132369",
"0.61301404",
"0.6125327",
"0.61209035",
"0.61105037",
"0.61105037",
"0.60965383",
"0.60762423",
"0.60734725",
"0.60535717",
"0.6051511",
"0.60508937",
"0.6023928",
"0.6020156",
"0.6020017",
"0.6018166",
"0.60151917",
"0.60060817",
"0.59919894",
"0.5991223",
"0.5989497",
"0.5977105",
"0.59667706",
"0.59603536",
"0.59566426",
"0.5955096",
"0.59527147",
"0.5947754",
"0.59430754",
"0.5929763",
"0.5923269",
"0.59222907"
] | 0.0 | -1 |
this will get the address | public String getAddress() {
return address;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"String getAddress();",
"String getAddress();",
"public String getExternalAddress();",
"public String getAddress();",
"public String getInternalAddress();",
"public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }",
"public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }",
"public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}",
"public final String getAddress() {\n return address;\n }",
"public String getAddress()\n {\n \treturn address;\n }",
"@Override\n public String getAddress() {\n\n if(this.address == null){\n\n this.address = TestDatabase.getInstance().getClientField(token, id, \"address\");\n }\n\n return address;\n }",
"AddressI getAddress();",
"public java.lang.String getAddress() {\r\n return address;\r\n }",
"String getAddr();",
"public String getAddress() {\r\n\t\treturn address;\r\n\t}",
"public String getAddress() {\r\n\t\treturn address;\r\n\t}",
"public java.lang.String getAddress () {\n\t\treturn address;\n\t}",
"public String getAddress(){\n\t\treturn address;\n\t}",
"public String getAddress() {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\treturn address;\t\t\r\n\t}",
"public String getAddress(){\n\t\treturn this.address;\n\t}",
"public String getAddress() {\r\n\t\treturn this.address;\r\n\t}",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\n return this._address;\n }",
"public String getAddress() {\n return definition.getString(ADDRESS);\n }",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() {\n\t\treturn address;\n\t}",
"public String getAddress() throws JAXRException{\n return address;\n }",
"@Override\r\n\tpublic String getAddress() {\n\t\treturn address;\r\n\t}",
"public String getAddress() {\n\t\treturn this.address;\n\t}",
"public java.lang.String getAddress() {\r\n return localAddress;\r\n }",
"public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }",
"public String getAddress() {\n return this.address;\n }",
"public String getAddress() {\n return this.address;\n }",
"public java.lang.String getAddress() {\n\treturn address;\n}",
"public java.lang.String getAddress() {\n\treturn address;\n}",
"private String getAddress() {\n String add = \"\";\n if (mLocationHelper != null) {\n add = getString(R.string.address, mLocationHelper.getAddress());\n }\n return add;\n }",
"@AutoEscape\n\tpublic String getAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"@AutoEscape\n\tpublic String getAddress();",
"String getAddress(int type);",
"public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}",
"public String getAddr() {\n return addr;\n }",
"public String getAddr() {\n return addr;\n }",
"public String getAddr() {\n return addr;\n }",
"public String getAddress() {\n\t\tlog.info(\"NOT IMPLEMENTED\");\n\t\treturn \"\";\n\t}",
"@Override\n\tpublic String getAddress() {\n\t\treturn address;\n\t}",
"public String address() {\n return this.address;\n }",
"public String address() {\n return this.address;\n }",
"public String getaddress() {\n\t\treturn _address;\n\t}"
] | [
"0.8769152",
"0.8769152",
"0.8769152",
"0.8769152",
"0.8769152",
"0.8769152",
"0.8555958",
"0.8555958",
"0.83188367",
"0.82317066",
"0.818177",
"0.81262875",
"0.81262875",
"0.80763054",
"0.8029247",
"0.79704845",
"0.7963765",
"0.79613876",
"0.79515296",
"0.79339385",
"0.7919774",
"0.7919774",
"0.78990203",
"0.78957933",
"0.78957367",
"0.78920734",
"0.7875088",
"0.7869",
"0.7869",
"0.7869",
"0.7869",
"0.7869",
"0.7869",
"0.7869",
"0.7855003",
"0.7842141",
"0.78385055",
"0.78385055",
"0.78385055",
"0.78385055",
"0.78385055",
"0.78385055",
"0.78385055",
"0.78120315",
"0.78067535",
"0.77991027",
"0.77870196",
"0.7776215",
"0.77710694",
"0.77710694",
"0.77644104",
"0.77644104",
"0.77597564",
"0.7754149",
"0.7754149",
"0.7754149",
"0.7754149",
"0.7751869",
"0.774039",
"0.7734933",
"0.7734933",
"0.7734933",
"0.7727988",
"0.77090037",
"0.77016497",
"0.77016497",
"0.76969784"
] | 0.77230096 | 96 |
this will set the address of the file | public void setAddress(String adrs) {
address = adrs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setFile() {\n\t}",
"public void setFilebase(final Address address) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setFileBase(new CAddress(address.toLong()));\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }",
"@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}",
"@Override\r\n\tpublic void setFileAddress(File fileAddress) throws CryptoException {\r\n\t\tsuper.setFileAddress(fileAddress);\r\n\t\tsetHascert();\r\n\t}",
"public void setFile(File f) { file = f; }",
"public void setConfigLocation(String filename, int line)\n {\n _filename = filename;\n _line = line;\n }",
"public void setFileRef() { this.fileRef = fileRef; }",
"@Override\n public void setFile(File f) {\n \n }",
"void setNewFile(File file);",
"public void setFile(File file);",
"void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}",
"public void SetRingbackFile(String filename){\n FunctionLogger logger=new FunctionLogger(\"SetRingbackFile\",this,myLogger);\n logger.args(filename);\n \n RingbackFile = filename;\n }",
"void setFilePath(String filePath);",
"public void setsFilePath(String value) {\n sFilePath = value;\n // // initialize these two\n CurrentFile = null;\n CurrentUri = null;\n // // If we have something real, setup the file and the Uri.\n if (!sFilePath.equalsIgnoreCase(\"\")) {\n CurrentFile = new File(sFilePath);\n CurrentUri = Uri.fromFile(CurrentFile);\n }\n }",
"public void setLink(FileNode target){\n\t\t/*link = target;\n\t\tsuper.setOffset(0);\n\t\tsuper.setLength(link.getLength());\n\t\tsuper.setSourcePath(link.getSourcePath());*/\n\t\tsuper.setVirtualSourceNode(target);\n\t\tsuper.setOffset(0);\n\t\tif(target != null){\n\t\t\tsuper.setLength(target.getLength());\n\t\t\tsuper.setSourcePath(target.getSourcePath());\n\t\t}\n\t}",
"public void setFile(File file)\n {\n this.file = file;\n }",
"public void setFile(String fileName)\n {\n }",
"public void setFile(PDFileSpecification f) {\n/* 409 */ this.stream.setItem(COSName.F, (COSObjectable)f);\n/* */ }",
"public void setFile(PDFileSpecification f)\n {\n stream.setItem(COSName.F, f);\n }",
"void setFilePath(Path filePath);",
"public void setFile(byte[] file) {\n this.file = file;\n }",
"void setFile(String i) {\n file = i;\n }",
"public void setFileName(String filename)\n\t{\n\t\tsuper.setFileName(filename);\n\t\t\n\t\t//#CM702602\n\t\t// Generate the path name of Working data File. \n\t\tworkingDataFileName = wFileName.replaceAll(\"\\\\\\\\send\\\\\\\\\", \"\\\\\\\\recv\\\\\\\\\");\n\t}",
"void setModBookFilePath(Path modBookFilePath);",
"public void setFile(File file) {\n this.path = file != null ? file.toPath() : null;\n }",
"public void setFile(org.ow2.bonita.facade.runtime.AttachmentInstance file) {\r\n\t\tthis.file = file;\r\n\t}",
"public void setFile(File file) {\n this.file = file;\n }",
"public void setFileUrl(String fileUrl);",
"void setFileName( String fileName );",
"public void connect(File file, long position, long size) throws FileNotFoundException;",
"public static void setFile(File file) {\r\n CONFIG_FILE = file;\r\n }",
"public void setFile(IFile file) {\n _file = file;\n }",
"public void setFile(File file) {\r\n\t\tif (file!=null) this.input = null;\r\n\t\tthis.file = file;\r\n\t}",
"private void setFile(String file){\n put(SlackParamsConstants.FILE, file);\n }",
"public void setConfigfile (File file)\n {\n _configfile = file;\n }",
"public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }",
"private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}",
"public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void setSourceFile(File file){\n System.out.println(\"Set source file=\" + file.toString());\n this.file = file;\n }",
"public void setCmdFileURL(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localCmdFileURL=param;\n \n\n }",
"public void setRecordFile(String file);",
"void setLogFile(File log);",
"public void setFile(IFile srcFile) {\n\t\tthis.file = srcFile;\n\t}",
"public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }",
"public void setTap(String pathname) throws IOException {\n if (null != _tapStreamOut) {\n FileOutputStream closingStream = _tapStreamOut;\n _tapStreamOut = null;\n closingStream.close();\n }\n if (null != _tapStreamIn) {\n FileOutputStream closingStream = _tapStreamIn;\n _tapStreamIn = null;\n closingStream.close();\n }\n if (pathname != null && pathname.length() > 0) {\n _tapStreamOut = new FileOutputStream(new File(pathname + \"_out\"));\n _tapStreamIn = new FileOutputStream(new File(pathname + \"_in\"));\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.INFO)) Log.info(Log.FAC_NETMANAGER, formatMessage(\"Tap writing to {0}\"), pathname);\n }\n }",
"public void save(File file) {\n //new FileSystem().saveFile(addressBook, file);\n }",
"public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}",
"public void setFile(String file) {\r\n this.file = file;\r\n }",
"public void setParameter(String name, File file) throws IOException {\r\n Logging.logTime(\"pre set file\");\r\n setParameter(name, file.getPath(), new FileInputStream(file));\r\n Logging.logTime(\"post set file\");\r\n }",
"void setManageMeFilePath(Path manageMeFilePath);",
"public void setMAddr(String mAddr) throws IllegalArgumentException, \n SipParseException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setMaddr () \" + mAddr);\n Via via=(Via)sipHeader;\n \n if (mAddr==null) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: mAddr is null\");\n else via.setMAddr(mAddr);\n }",
"public void setStorageLocation( String name ) throws IOException {\n\t \tlog.config( \"update Storage Location to: \"+name );\n\t\tPersistentData data = null;\n\t\ttry {\n\t\t\tdata = io.readState();\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.log( Level.SEVERE, ex.toString(), ex );\n\t\t\tdata = new PersistentData();\n\t\t}\n\t\tio.setFile( name );\n\t\tio.writeState(data);\n\t}",
"public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }",
"protected void setLinkOnly(FileNode target){\n\t\t//link = target;\n\t\t//super.setSourcePath(link.getSourcePath());\n\t\tsuper.setVirtualSourceNode(target);\n\t\tif(target != null) super.setSourcePath(target.getSourcePath());\n\t}",
"public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }",
"public void setFileName(String fileName)\r\n/* 16: */ {\r\n/* 17:49 */ this.fileName = fileName;\r\n/* 18: */ }",
"protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}",
"public void setSource(URL url) throws IOException {\n\t\tFile f = new File(url.getFile());\n\t\tif (f.isAbsolute()) {\n\t\t\tsourceFile = url;\n\t\t\timg = ImageIO.read(f);\n\t\t\tthis.isRelativePath = false;\n\t\t} else {\n\t\t\tsourceFile = new URL(SymbologyFactory.SymbolLibraryPath\n\t\t\t\t\t+ File.separator + f.getPath());\n\t\t\timg = ImageIO.read(f);\n\t\t\tthis.isRelativePath = true;\n\t\t}\n\t}",
"public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}",
"@Override\n public void setSaveFile(File file)\n {\n \n }",
"void setStockFile(stockFilePT102.StockFileDocument.StockFile stockFile);",
"public void setResourcefile (File file)\n {\n _resourcefile = file;\n }",
"public void setFile(DefaultStreamedContent file) {\n this.file = file;\n }",
"protected final void setFileInformation( FileInfo fInfo) {\n\t\tm_info = fInfo;\n\t}",
"private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}",
"public void setFilePath(String filePath) { this.filePath = filePath; }",
"private void setFileName(final String fileName) {\n\t\t// almacenamos el nombre del fichero\n\t\tthis.fileName = fileName;\n\t}",
"public void setFileId(Long fileId) {\n/* 31:31 */ this.fileId = fileId;\n/* 32: */ }",
"private void init(File file) throws VlException\n {\n // under windows: will return windows path\n String path = file.getAbsolutePath();\n\n //\n // Forward Flip backslashes !\n // Do this ONLY for the local filesystem !\n //\n\n if (File.separatorChar != VRL.SEP_CHAR)\n path = VRL.uripath(path, true, File.separatorChar);\n\n // under widows: will convert windows path to URI path !\n setLocation(new VRL(VRS.FILE_SCHEME, null, path));\n this.path = getPath(); // use URI path !\n\n _file = file;\n }",
"public void setImagebase(final Address address) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setImageBase(new CAddress(address.toLong()));\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }",
"public void set(int addr, byte[] buff) throws ProgramException {\n set(addr, buff, 0, buff.length);\n }",
"public void set(String path) throws FileNotFoundException {\n counterSeveralLines = linesAfter;\n arrayPreviousLines = new String[prevSize];\n currentPath = path;\n fileReader = new FileReader(currentPath);\n bufferReader = new BufferedReader(fileReader);\n resetDateBefore();\n }",
"void setDoctorRecordsFilePath(Path doctorRecordsFilePath);",
"void setPropertiesFile(File file);",
"public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }",
"public abstract String getFileLocation();",
"@Override\n\tpublic void setOffsetBackToFile() {\n\t\tString newXString;\n\t\tString newYString;\n\t\t newXString = String.valueOf(getX().getValueInSpecifiedUnits())+getX().getUserUnit();\n\t newYString = String.valueOf(getY().getValueInSpecifiedUnits())+getY().getUserUnit();\n\t\tjc.getElement().setAttribute(\"x\", newXString);\n\t\tjc.getElement().setAttribute(\"y\", newYString);\n\t\ttry {\n\t\t\tjc.getView().getFrame().writeFile();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public void setNewFilePath(String newValue);",
"public void setFileTransferServer(String serverUrl);",
"public void setFileName(edu.umich.icpsr.ddi.FileNameType fileName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileNameType target = null;\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().find_element_user(FILENAME$0, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().add_element_user(FILENAME$0);\n }\n target.set(fileName);\n }\n }",
"public FSLockWithShared(File baseFile) {\n file = baseFile;\n }",
"public void xsetReferenceFileIPR(org.apache.xmlbeans.XmlString referenceFileIPR)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFERENCEFILEIPR$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(REFERENCEFILEIPR$0);\n }\n target.set(referenceFileIPR);\n }\n }",
"public void setPacketFile(java.lang.String param) {\n localPacketFileTracker = true;\n\n this.localPacketFile = param;\n }",
"public void setRingback(String path);",
"void setPath(String path);",
"public void setReferenceFileIPR(java.lang.String referenceFileIPR)\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(REFERENCEFILEIPR$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFERENCEFILEIPR$0);\n }\n target.setStringValue(referenceFileIPR);\n }\n }",
"public void setFilePath(String filePath){\r\n this.filePath = filePath;\r\n }",
"public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }",
"public Address getFilebase() {\n return new Address(m_module.getConfiguration().getFileBase().toBigInteger());\n }",
"public void setCurrentFile(String name) {\n\t\tthis.currentFile = name;\n\t}",
"String getAddress( String filename, String generator);",
"private void setFilePath(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000008;\n filePath_ = value;\n }",
"public void setFilepath(java.lang.String _filepath)\n {\n filepath = _filepath;\n }",
"public void setRing(String path);",
"public void setAddr(String addr) {\n this.addr = addr;\n }",
"public Builder setFileLoc(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n fileLoc_ = value;\n onChanged();\n return this;\n }",
"private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}",
"public void setPath(File path) {\n this.path = path;\n }",
"public void init() {\n File file = new File(FILE);\n if (!file.exists()) {\n File file2 = new File(file.getParent());\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n if (this.accessFile == null) {\n try {\n this.accessFile = new RandomAccessFile(FILE, \"rw\");\n } catch (FileNotFoundException unused) {\n }\n }\n }",
"public void setPlayFile(String file);",
"public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }"
] | [
"0.71397835",
"0.67744386",
"0.67235374",
"0.6570027",
"0.656879",
"0.65279454",
"0.6396593",
"0.63669455",
"0.63637245",
"0.63405615",
"0.62965816",
"0.6218502",
"0.6203534",
"0.6202416",
"0.61749065",
"0.60634553",
"0.60444844",
"0.6004238",
"0.59921867",
"0.5991474",
"0.5941219",
"0.5928665",
"0.59177613",
"0.58958447",
"0.5880997",
"0.58725977",
"0.58717096",
"0.5868859",
"0.5861151",
"0.58380616",
"0.58287567",
"0.5827694",
"0.5827161",
"0.5799298",
"0.5782972",
"0.5769156",
"0.5766786",
"0.57354164",
"0.5722138",
"0.57146657",
"0.57099396",
"0.5705224",
"0.5699949",
"0.569887",
"0.5669277",
"0.5668381",
"0.566011",
"0.5639872",
"0.5638241",
"0.56371427",
"0.56283516",
"0.56145495",
"0.5612321",
"0.5600103",
"0.5598037",
"0.5565596",
"0.5564943",
"0.5564711",
"0.55535984",
"0.5552031",
"0.5551438",
"0.55475754",
"0.5539022",
"0.55228937",
"0.5515307",
"0.54922765",
"0.5490943",
"0.54856986",
"0.5468883",
"0.5456844",
"0.5431989",
"0.5430307",
"0.5417696",
"0.5416239",
"0.54105264",
"0.5402333",
"0.5393529",
"0.53896457",
"0.53889817",
"0.53844666",
"0.53832924",
"0.5383005",
"0.5379942",
"0.53626585",
"0.53471917",
"0.53391105",
"0.5337159",
"0.5335083",
"0.53301",
"0.5326459",
"0.5326439",
"0.5319593",
"0.5310649",
"0.5309534",
"0.530868",
"0.53019655",
"0.5297755",
"0.5293907",
"0.528268",
"0.5282477",
"0.5281321"
] | 0.0 | -1 |
this will get the singer's name | public String getSingerName() {
return singerName ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setSingerName(String nm) {\n singerName = nm;\n }",
"private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}",
"String getPassengerName();",
"private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }",
"String getSlingName();",
"java.lang.String getSenderName();",
"public String getName() {\n return sname;\n }",
"public String getSname() {\n return sname;\n }",
"String getSupName();",
"public String getUserSciper() {\n String sciper = \"\";\n try {\n sciper = fAuth.getCurrentUser().getDisplayName();\n } catch (NullPointerException e) {\n e.printStackTrace();\n Toast.makeText(this, R.string.toast_no_connection, Toast.LENGTH_SHORT)\n .show();\n return \"\";\n }\n return sciper;\n }",
"public String getName()\r\n/* 23: */ {\r\n/* 24:20 */ return \"Wire demo receiver\";\r\n/* 25: */ }",
"public String getsName() {\n return sName;\n }",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"protected String getName(){\n return \"Chinmay Garg\";\n //TODO return roll number obtained from the app's shared preference\n }",
"public String getNotchianName();",
"String getPlayerName();",
"java.lang.String getNickname();",
"java.lang.String getHangmogName();",
"public String getName() {\n return (String) getObject(\"username\");\n }",
"String getName() ;",
"String getName() {\n return getStringStat(playerName);\n }",
"public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }",
"public String getName(){\n\t\treturn girlName;\r\n\t}",
"public String getName(){\n \n // put your code here\n return name;\n }",
"public String getName() {\n\t return this.device.getName() + \".\" + this.getType() + \".\"\n\t + this.getId();\n\t}",
"public String getName()\r\n {\r\n return screenName;\r\n }",
"java.lang.String getNick();",
"java.lang.String getNick();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
] | [
"0.7265185",
"0.71687526",
"0.707258",
"0.68167514",
"0.6765341",
"0.6764329",
"0.6753542",
"0.66836274",
"0.66763246",
"0.66580254",
"0.66134375",
"0.66090804",
"0.6594376",
"0.6594376",
"0.6583982",
"0.65369993",
"0.65068156",
"0.6475957",
"0.6470954",
"0.6469522",
"0.64595747",
"0.6452192",
"0.641112",
"0.640364",
"0.6375687",
"0.6364766",
"0.6363424",
"0.63597995",
"0.63597995",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709",
"0.6349709"
] | 0.8366008 | 0 |
this will set the address of the file | public void setSingerName(String nm) {
singerName = nm;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setFile() {\n\t}",
"public void setFilebase(final Address address) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setFileBase(new CAddress(address.toLong()));\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }",
"@Override\n\tprotected String getFileArress() {\n\t\treturn fileAddress;\n\t}",
"public void setFile(File f) { file = f; }",
"@Override\r\n\tpublic void setFileAddress(File fileAddress) throws CryptoException {\r\n\t\tsuper.setFileAddress(fileAddress);\r\n\t\tsetHascert();\r\n\t}",
"public void setConfigLocation(String filename, int line)\n {\n _filename = filename;\n _line = line;\n }",
"public void setFileRef() { this.fileRef = fileRef; }",
"@Override\n public void setFile(File f) {\n \n }",
"void setNewFile(File file);",
"public void setFile(File file);",
"void set(File local,String name,UserFileType ft)\n{\n user_file = local;\n if (user_file != null && (name == null || name.length() == 0)) \n name = user_file.getName();\n if (name.startsWith(\"/s6/\")) {\n name = name.substring(4);\n }\n else if (name.startsWith(\"s:\")) {\n name = name.substring(2);\n }\n access_name = name;\n file_mode = ft;\n}",
"public void SetRingbackFile(String filename){\n FunctionLogger logger=new FunctionLogger(\"SetRingbackFile\",this,myLogger);\n logger.args(filename);\n \n RingbackFile = filename;\n }",
"void setFilePath(String filePath);",
"public void setsFilePath(String value) {\n sFilePath = value;\n // // initialize these two\n CurrentFile = null;\n CurrentUri = null;\n // // If we have something real, setup the file and the Uri.\n if (!sFilePath.equalsIgnoreCase(\"\")) {\n CurrentFile = new File(sFilePath);\n CurrentUri = Uri.fromFile(CurrentFile);\n }\n }",
"public void setLink(FileNode target){\n\t\t/*link = target;\n\t\tsuper.setOffset(0);\n\t\tsuper.setLength(link.getLength());\n\t\tsuper.setSourcePath(link.getSourcePath());*/\n\t\tsuper.setVirtualSourceNode(target);\n\t\tsuper.setOffset(0);\n\t\tif(target != null){\n\t\t\tsuper.setLength(target.getLength());\n\t\t\tsuper.setSourcePath(target.getSourcePath());\n\t\t}\n\t}",
"public void setFile(File file)\n {\n this.file = file;\n }",
"public void setFile(String fileName)\n {\n }",
"public void setFile(PDFileSpecification f) {\n/* 409 */ this.stream.setItem(COSName.F, (COSObjectable)f);\n/* */ }",
"public void setFile(PDFileSpecification f)\n {\n stream.setItem(COSName.F, f);\n }",
"void setFilePath(Path filePath);",
"public void setFile(byte[] file) {\n this.file = file;\n }",
"void setFile(String i) {\n file = i;\n }",
"public void setFileName(String filename)\n\t{\n\t\tsuper.setFileName(filename);\n\t\t\n\t\t//#CM702602\n\t\t// Generate the path name of Working data File. \n\t\tworkingDataFileName = wFileName.replaceAll(\"\\\\\\\\send\\\\\\\\\", \"\\\\\\\\recv\\\\\\\\\");\n\t}",
"void setModBookFilePath(Path modBookFilePath);",
"public void setFile(File file) {\n this.path = file != null ? file.toPath() : null;\n }",
"public void setFile(org.ow2.bonita.facade.runtime.AttachmentInstance file) {\r\n\t\tthis.file = file;\r\n\t}",
"public void setFile(File file) {\n this.file = file;\n }",
"public void setFileUrl(String fileUrl);",
"void setFileName( String fileName );",
"public void connect(File file, long position, long size) throws FileNotFoundException;",
"public static void setFile(File file) {\r\n CONFIG_FILE = file;\r\n }",
"public void setFile(IFile file) {\n _file = file;\n }",
"public void setFile(File file) {\r\n\t\tif (file!=null) this.input = null;\r\n\t\tthis.file = file;\r\n\t}",
"private void setFile(String file){\n put(SlackParamsConstants.FILE, file);\n }",
"public void setConfigfile (File file)\n {\n _configfile = file;\n }",
"private void setFile(Serializable object, String path) throws Exception {\t\t\n\t\t\n FileOutputStream fileOut = new FileOutputStream(path);\n ObjectOutputStream objectOut = new ObjectOutputStream(fileOut);\n objectOut.writeObject(object);\n objectOut.close(); \n\t\t\n\t}",
"public void setFile(String file) {\n fileName = file;\n if (isHTTP(fileName)) {\n fileType = HTTP;\n } else {\n fileType = LOCAL;\n }\n }",
"public void setOffset(int offset) {\r\n currOffset = offset;\r\n try {\r\n file.seek(offset);\r\n }\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public void setSourceFile(File file){\n System.out.println(\"Set source file=\" + file.toString());\n this.file = file;\n }",
"public void setCmdFileURL(org.apache.axis2.databinding.types.soapencoding.String param){\n \n this.localCmdFileURL=param;\n \n\n }",
"public void setRecordFile(String file);",
"void setLogFile(File log);",
"public void setFileName(String fileName) {\n/* 39:39 */ this.fileName = fileName;\n/* 40: */ }",
"public void setFile(IFile srcFile) {\n\t\tthis.file = srcFile;\n\t}",
"public void setTap(String pathname) throws IOException {\n if (null != _tapStreamOut) {\n FileOutputStream closingStream = _tapStreamOut;\n _tapStreamOut = null;\n closingStream.close();\n }\n if (null != _tapStreamIn) {\n FileOutputStream closingStream = _tapStreamIn;\n _tapStreamIn = null;\n closingStream.close();\n }\n if (pathname != null && pathname.length() > 0) {\n _tapStreamOut = new FileOutputStream(new File(pathname + \"_out\"));\n _tapStreamIn = new FileOutputStream(new File(pathname + \"_in\"));\n if (Log.isLoggable(Log.FAC_NETMANAGER, Level.INFO)) Log.info(Log.FAC_NETMANAGER, formatMessage(\"Tap writing to {0}\"), pathname);\n }\n }",
"public void save(File file) {\n //new FileSystem().saveFile(addressBook, file);\n }",
"public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}",
"public void setFile(String file) {\r\n this.file = file;\r\n }",
"public void setParameter(String name, File file) throws IOException {\r\n Logging.logTime(\"pre set file\");\r\n setParameter(name, file.getPath(), new FileInputStream(file));\r\n Logging.logTime(\"post set file\");\r\n }",
"void setManageMeFilePath(Path manageMeFilePath);",
"public void setMAddr(String mAddr) throws IllegalArgumentException, \n SipParseException {\n LogWriter.logMessage(LogWriter.TRACE_DEBUG,\"setMaddr () \" + mAddr);\n Via via=(Via)sipHeader;\n \n if (mAddr==null) \n throw new IllegalArgumentException\n (\"JAIN-EXCEPTION: mAddr is null\");\n else via.setMAddr(mAddr);\n }",
"public void setStorageLocation( String name ) throws IOException {\n\t \tlog.config( \"update Storage Location to: \"+name );\n\t\tPersistentData data = null;\n\t\ttry {\n\t\t\tdata = io.readState();\n\t\t} catch( ClassNotFoundException ex ) {\n\t\t\tlog.log( Level.SEVERE, ex.toString(), ex );\n\t\t\tdata = new PersistentData();\n\t\t}\n\t\tio.setFile( name );\n\t\tio.writeState(data);\n\t}",
"public void setFile(String value){\n ((MvwDefinitionDMO) core).setFile(value);\n }",
"protected void setLinkOnly(FileNode target){\n\t\t//link = target;\n\t\t//super.setSourcePath(link.getSourcePath());\n\t\tsuper.setVirtualSourceNode(target);\n\t\tif(target != null) super.setSourcePath(target.getSourcePath());\n\t}",
"public void openFile(File file) {\n// new FileSystem().readFile(addressBook, file);\n// addressBook.fireTableDataChanged();\n }",
"protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}",
"public void setFileName(String fileName)\r\n/* 16: */ {\r\n/* 17:49 */ this.fileName = fileName;\r\n/* 18: */ }",
"public void setSource(URL url) throws IOException {\n\t\tFile f = new File(url.getFile());\n\t\tif (f.isAbsolute()) {\n\t\t\tsourceFile = url;\n\t\t\timg = ImageIO.read(f);\n\t\t\tthis.isRelativePath = false;\n\t\t} else {\n\t\t\tsourceFile = new URL(SymbologyFactory.SymbolLibraryPath\n\t\t\t\t\t+ File.separator + f.getPath());\n\t\t\timg = ImageIO.read(f);\n\t\t\tthis.isRelativePath = true;\n\t\t}\n\t}",
"public void setFile(String file)\n\t{\n\t\tthis.file = file;\n\t}",
"@Override\n public void setSaveFile(File file)\n {\n \n }",
"void setStockFile(stockFilePT102.StockFileDocument.StockFile stockFile);",
"public void setResourcefile (File file)\n {\n _resourcefile = file;\n }",
"public void setFile(DefaultStreamedContent file) {\n this.file = file;\n }",
"protected final void setFileInformation( FileInfo fInfo) {\n\t\tm_info = fInfo;\n\t}",
"private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}",
"public void setFilePath(String filePath) { this.filePath = filePath; }",
"private void setFileName(final String fileName) {\n\t\t// almacenamos el nombre del fichero\n\t\tthis.fileName = fileName;\n\t}",
"public void setFileId(Long fileId) {\n/* 31:31 */ this.fileId = fileId;\n/* 32: */ }",
"private void init(File file) throws VlException\n {\n // under windows: will return windows path\n String path = file.getAbsolutePath();\n\n //\n // Forward Flip backslashes !\n // Do this ONLY for the local filesystem !\n //\n\n if (File.separatorChar != VRL.SEP_CHAR)\n path = VRL.uripath(path, true, File.separatorChar);\n\n // under widows: will convert windows path to URI path !\n setLocation(new VRL(VRS.FILE_SCHEME, null, path));\n this.path = getPath(); // use URI path !\n\n _file = file;\n }",
"public void setImagebase(final Address address) throws CouldntSaveDataException {\n try {\n m_module.getConfiguration().setImageBase(new CAddress(address.toLong()));\n } catch (final com.google.security.zynamics.binnavi.Database.Exceptions.CouldntSaveDataException e) {\n throw new CouldntSaveDataException(e);\n }\n }",
"public void set(String path) throws FileNotFoundException {\n counterSeveralLines = linesAfter;\n arrayPreviousLines = new String[prevSize];\n currentPath = path;\n fileReader = new FileReader(currentPath);\n bufferReader = new BufferedReader(fileReader);\n resetDateBefore();\n }",
"public void set(int addr, byte[] buff) throws ProgramException {\n set(addr, buff, 0, buff.length);\n }",
"void setDoctorRecordsFilePath(Path doctorRecordsFilePath);",
"void setPropertiesFile(File file);",
"public void setFileName(String fileName)\r\n {\r\n sFileName = fileName;\r\n }",
"public abstract String getFileLocation();",
"@Override\n\tpublic void setOffsetBackToFile() {\n\t\tString newXString;\n\t\tString newYString;\n\t\t newXString = String.valueOf(getX().getValueInSpecifiedUnits())+getX().getUserUnit();\n\t newYString = String.valueOf(getY().getValueInSpecifiedUnits())+getY().getUserUnit();\n\t\tjc.getElement().setAttribute(\"x\", newXString);\n\t\tjc.getElement().setAttribute(\"y\", newYString);\n\t\ttry {\n\t\t\tjc.getView().getFrame().writeFile();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"public void setNewFilePath(String newValue);",
"public void setFileTransferServer(String serverUrl);",
"public void setFileName(edu.umich.icpsr.ddi.FileNameType fileName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n edu.umich.icpsr.ddi.FileNameType target = null;\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().find_element_user(FILENAME$0, 0);\n if (target == null)\n {\n target = (edu.umich.icpsr.ddi.FileNameType)get_store().add_element_user(FILENAME$0);\n }\n target.set(fileName);\n }\n }",
"public FSLockWithShared(File baseFile) {\n file = baseFile;\n }",
"public void xsetReferenceFileIPR(org.apache.xmlbeans.XmlString referenceFileIPR)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(REFERENCEFILEIPR$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(REFERENCEFILEIPR$0);\n }\n target.set(referenceFileIPR);\n }\n }",
"public void setPacketFile(java.lang.String param) {\n localPacketFileTracker = true;\n\n this.localPacketFile = param;\n }",
"public void setRingback(String path);",
"void setPath(String path);",
"public void setReferenceFileIPR(java.lang.String referenceFileIPR)\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(REFERENCEFILEIPR$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(REFERENCEFILEIPR$0);\n }\n target.setStringValue(referenceFileIPR);\n }\n }",
"public void setFilePath(String filePath){\r\n this.filePath = filePath;\r\n }",
"public void openFile()\r\n {\r\n try // open file\r\n {\r\n input = new RandomAccessFile( \"clients.dat\", \"r\" );\r\n } // end try\r\n catch ( IOException ioException )\r\n {\r\n System.err.println( \"File does not exist.\" );\r\n } // end catch\r\n }",
"public Address getFilebase() {\n return new Address(m_module.getConfiguration().getFileBase().toBigInteger());\n }",
"public void setCurrentFile(String name) {\n\t\tthis.currentFile = name;\n\t}",
"String getAddress( String filename, String generator);",
"private void setFilePath(\n java.lang.String value) {\n value.getClass();\n bitField0_ |= 0x00000008;\n filePath_ = value;\n }",
"public void setFilepath(java.lang.String _filepath)\n {\n filepath = _filepath;\n }",
"public void setRing(String path);",
"public void setAddr(String addr) {\n this.addr = addr;\n }",
"public Builder setFileLoc(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n fileLoc_ = value;\n onChanged();\n return this;\n }",
"private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}",
"public void setPath(File path) {\n this.path = path;\n }",
"public void init() {\n File file = new File(FILE);\n if (!file.exists()) {\n File file2 = new File(file.getParent());\n if (!file2.exists()) {\n file2.mkdirs();\n }\n }\n if (this.accessFile == null) {\n try {\n this.accessFile = new RandomAccessFile(FILE, \"rw\");\n } catch (FileNotFoundException unused) {\n }\n }\n }",
"FileToShare(String identifier, boolean own, Friend f, String path){\n\t\tthis.Timeout = LocalTime.now().plusSeconds(timeoutDuration);\n\t\tthis.identifier = identifier;\n\t\tthis.own = own;\n\t\tif (!own) {\n\t\t\tthis.setFriend(f);\n\t\t} else {\n\t\t\tthis.setPath(path);\n\t\t}\n\t}",
"public BiomartAccess(String fname) \n {\n m_file = new File(fname);\n }"
] | [
"0.71404475",
"0.6776047",
"0.67222136",
"0.65701485",
"0.6569472",
"0.65275437",
"0.6396597",
"0.63683695",
"0.6365667",
"0.63415784",
"0.62983215",
"0.62185526",
"0.62041295",
"0.6203403",
"0.6173993",
"0.6063506",
"0.60445994",
"0.6005389",
"0.59928304",
"0.59925485",
"0.5940854",
"0.59293073",
"0.5917043",
"0.589664",
"0.58807963",
"0.5871647",
"0.58714473",
"0.586804",
"0.5861788",
"0.5839045",
"0.5829008",
"0.5827525",
"0.58270687",
"0.5799017",
"0.5782927",
"0.5769592",
"0.57683855",
"0.5735742",
"0.57211447",
"0.57130253",
"0.5708781",
"0.57061875",
"0.56993484",
"0.56992376",
"0.5669688",
"0.5668069",
"0.56608146",
"0.5639162",
"0.56385654",
"0.5636721",
"0.5626606",
"0.5615917",
"0.56130785",
"0.55996174",
"0.55978876",
"0.5567665",
"0.5566023",
"0.55647665",
"0.5552936",
"0.55526966",
"0.55515414",
"0.5547598",
"0.55386794",
"0.5523976",
"0.55131173",
"0.5492632",
"0.5491237",
"0.54849434",
"0.54689986",
"0.5457112",
"0.54315937",
"0.54297143",
"0.5417837",
"0.5416053",
"0.5410351",
"0.5403945",
"0.53935885",
"0.5391791",
"0.5388021",
"0.53843105",
"0.5384273",
"0.53827226",
"0.53787154",
"0.53625196",
"0.5347926",
"0.5338712",
"0.5337272",
"0.53369755",
"0.53301287",
"0.5327845",
"0.53240603",
"0.53213567",
"0.53124005",
"0.5309591",
"0.53056324",
"0.53025025",
"0.52989835",
"0.5294836",
"0.5284944",
"0.5282544",
"0.5282101"
] | 0.0 | -1 |
this will get the date | public int getDate() {
return date ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String Get_date() \n {\n \n return date;\n }",
"java.lang.String getDate();",
"String getDate();",
"String getDate();",
"Date getDate();",
"Date getDate();",
"Date getDate();",
"java.lang.String getFoundingDate();",
"public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"public String getDate()\r\n\t{\r\n\t\treturn date;\r\n\t}",
"private String getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}",
"public String getDate(){\n\t\t\n\t\treturn this.date;\n\t}",
"public String getDate(){\n\t\treturn toString();\n\t}",
"public String getDate()\n\t\t{\n\t\t\treturn date;\n\t\t}",
"public String getDate() {\r\n return date;\r\n }",
"public String getdate() {\n\t\treturn date;\n\t}",
"public String getDate() {\r\n\t\treturn date;\r\n\t}",
"public String getDate(){\n\n return this.date;\n }",
"public String getDate()\n {\n return day + \"/\" + month + \"/\" + year;\n }",
"String getStartDate();",
"public String getDate() {\n return date;\n }",
"public String getDate(){\n return date;\n }",
"public String getDate() {\r\n\t\treturn this.date;\r\n\t}",
"public String getDate() {\n\t\treturn date;\n\t}",
"public String getDate() {\n\t\treturn date;\n\t}",
"public String getDate() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn sdf.format(txtDate.getDate());\n\t}",
"public String getDate(){\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public String getDate() {\n return date;\n }",
"public Date date (){\r\n\t\t\treturn _date;\r\n\t\t}",
"public String getDate() {\n return this.date;\n }",
"public String getDate() {\n return this.date;\n }",
"public Date getDate(){\n\t\treturn date;\n\t}",
"public String getDate() {\n\t\treturn logInfoSplit[0] + \"_\" + logInfoSplit[1];\n\t}",
"Date getForDate();",
"java.lang.String getFromDate();",
"public String getDate() {\n\t\treturn this.date;\n\t}",
"public java.lang.String getDate() {\n return date;\n }",
"public int getDate() {\n return date;\n }",
"public int getDate() {\n return date;\n }",
"public int getDate(){\n return date;\n }",
"Date getCreateDate();",
"Date getCreateDate();",
"public String getEventDate() {\n\t\treturn date;\n\t}",
"public static String getDate() {\n\t\tDate date = new Date();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"ddMMYYYY\");\n\t\tString strDate = formatter.format(date);\n\t\treturn strDate;\n\t}",
"public String getDateString(){\n return Utilities.dateToString(date);\n }",
"public String getEventDate()\n {\n EventDate = createEvent.getText();\n return EventDate;\n }",
"java.lang.String getStartDateYYYYMMDD();",
"com.google.type.Date getAcquireDate();",
"public Date getDate() {\n\t\n\t\treturn date;\n\t\n\t}",
"public String getDate(){ return this.start_date;}",
"java.lang.String getToDate();",
"public Date getDate()\n\t{\n\t\treturn date;\n\t}",
"private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}",
"long getDate();",
"Date getEDate();",
"public Date date()\n\t{\n\t\treturn this.date;\n\t}",
"public int getDate() {\n\t\treturn date;\n\t}",
"public Date getDate(){\n\t\treturn day.date;\n\t}",
"@Override\n public Date getDate() {\n return date;\n }",
"java.lang.String getStartDate();",
"java.lang.String getOrderDate();",
"public static String getDate() {\n return getDate(System.currentTimeMillis());\n }",
"public String getDate() {\t\n\t\treturn mDate;\n\t}",
"public String getStartDate();",
"public java.util.Date getDate(){\n return localDate;\n }",
"public DateInfo getDate() {\r\n\t\treturn new DateInfo(super.getDate());\r\n\t\t//return new DateInfo(maturityDate);\r\n\t}",
"@Override\n\tpublic Calendar getDate(){\n\t\treturn date;\n\t}",
"public String getReturnDate();",
"public long getDate() {\n return date_;\n }",
"public long getDate() {\n return date;\n }",
"public Date getDate() {\r\n return date;\r\n }",
"public Date getDate() {\r\n return date;\r\n }",
"public Date getDate() {\r\n return date;\r\n }",
"public Date getDate()\n {\n return date;\n }",
"public static String getDate()\n {\n Date date = new Date();\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n return dateFormat.format(date);\n }",
"public Date getDate()\n {\n return this.date;\n }",
"public long getDate() {\n\t\treturn date;\n\t}",
"public long getDate() {\n\t\treturn date;\n\t}",
"public Date getDate() {\n\t\treturn date_;\n\t}",
"Date getFechaNacimiento();",
"public long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }",
"public java.util.Date getDate() {\n\t}",
"public Date getDate() {\r\n\t\treturn date;\r\n\t}",
"public Date getDate() {\r\n\t\treturn date;\r\n\t}",
"public long getDate() {\n return date;\n }",
"public String date() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd_MM_yyyy_HH_mm_ss\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}",
"private String getDateTime() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd.MM.yyyy\", Locale.GERMANY);\n Date date = new Date();\n return dateFormat.format(date);\n }",
"public String getDate() {\n\t\treturn this.mDate;\n\t}",
"public long getDate() {\n return date_;\n }",
"org.apache.xmlbeans.XmlString xgetFoundingDate();",
"public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }",
"Date getStartDate();",
"Date getStartDate();",
"Date getStartDate();",
"@FXML\r\n\tString getDate() {\r\n\t\t\tLocalDate creditCardExpiryDate = dpCreditCardExpiryDate.getValue();\r\n\t\t\tDateTimeFormatter formattedExpiryDate = DateTimeFormatter.ofPattern(\"yyyy-MM-dd\");\r\n\t\t\treturn formattedExpiryDate.format(creditCardExpiryDate);\r\n\t}"
] | [
"0.8167924",
"0.81365424",
"0.7963085",
"0.7963085",
"0.78035885",
"0.78035885",
"0.78035885",
"0.77890825",
"0.75549245",
"0.75529444",
"0.75529444",
"0.75315547",
"0.7524179",
"0.7475728",
"0.7439882",
"0.7420588",
"0.74075687",
"0.7380364",
"0.7378948",
"0.7356838",
"0.73458666",
"0.734143",
"0.7333665",
"0.73140556",
"0.73135114",
"0.73135114",
"0.7312811",
"0.7305697",
"0.7297857",
"0.7297857",
"0.7297857",
"0.7297857",
"0.7297857",
"0.72867644",
"0.72658837",
"0.72658837",
"0.72611403",
"0.7248334",
"0.7246885",
"0.7246177",
"0.72407603",
"0.722261",
"0.7213552",
"0.7213552",
"0.721273",
"0.7201618",
"0.7201618",
"0.7197535",
"0.71721476",
"0.7167631",
"0.7160562",
"0.7155102",
"0.7145476",
"0.7135401",
"0.7135064",
"0.71304643",
"0.712977",
"0.71281683",
"0.7124193",
"0.71220267",
"0.7113369",
"0.71123695",
"0.7109796",
"0.71083647",
"0.7104332",
"0.70942694",
"0.7093926",
"0.7075174",
"0.7064377",
"0.70562357",
"0.7051443",
"0.70486337",
"0.7043347",
"0.70369637",
"0.70313877",
"0.7028303",
"0.7028303",
"0.7028303",
"0.7025833",
"0.70178825",
"0.7004113",
"0.69954175",
"0.69954175",
"0.69919753",
"0.69861656",
"0.6979927",
"0.69799244",
"0.6977665",
"0.6977665",
"0.69723076",
"0.69711906",
"0.696971",
"0.6966718",
"0.6966156",
"0.6954566",
"0.6954121",
"0.6952473",
"0.6952473",
"0.6952473",
"0.69462633"
] | 0.7376977 | 19 |
this will set the date | public void setDate(int dt) {
date = dt;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setDate(Date data);",
"@Override\n\tprotected void setDate() {\n\n\t}",
"public void SetDate(Date date);",
"private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}",
"public void setDate() {\n this.date = new Date();\n }",
"public void setDate(Date date) {\n\t\n\t\tthis.date = date;\n\t\n\t}",
"public void setDate(Date date) {\r\n this.date = date;\r\n }",
"private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }",
"private String setDate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(new Date());\n }",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setDate(Date date) {\r\n\t\tthis.date = date;\r\n\t}",
"private void setCurrentDate(Date date)\n {\n date.setTime(System.currentTimeMillis());\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n this.date = date;\n }",
"public void setDate(int date){\n this.date = date;\n }",
"public void setDate(Date date) {\r\n \t\tthis.startDate = date;\r\n \t}",
"void setCreateDate(Date date);",
"public void setDate(String date){\n this.date = date;\n }",
"public void setDate(java.util.Date param){\n \n this.localDate=param;\n \n\n }",
"void setDate(java.lang.String date);",
"private void setDate() {\n java.util.Date d1 = new java.util.Date();\n SimpleDateFormat df = new SimpleDateFormat(\"YYYY-MM-dd\");\n String formateDate = df.format(d1);\n lblDate.setText(formateDate); \n }",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(String date){\n this.date = date;\n }",
"public void setDate(DateTime \n date) {\n this.date = date;\n }",
"public void setDate(Date date) {\n\t\t\n\t\tdate_ = date;\n\t}",
"public void setDate(Date date) {\n mDate = date;\n }",
"public void setDate(Date date) {\n\t\tthis._date = date;\n\t}",
"public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n Logger.d(TAG, \"The date is null\");\n }\n }",
"public void setDate(Calendar date) {\n\tthis.date = date;\n }",
"public void setDate(String date) {\r\n this.date = date;\r\n }",
"@Override\n\t\t\tpublic void setValue(Date value) {\n\t\t\t\tsuper.setValue(value);\n\t\t\t\tstart_cal_date = value.getTime();\n\t\t\t\tinfo_loader.load();\n\t\t\t}",
"public void setDate(final Date date) {\n this.date = date;\n }",
"public void setDate(long date)\r\n/* 199: */ {\r\n/* 200:299 */ setDate(\"Date\", date);\r\n/* 201: */ }",
"public void setDate (String s) {\n date = s;\n }",
"public void setDate(Calendar date)\n {\n this.date = date;\n }",
"public void setStartDate(Date s);",
"public void setSysDate()\r\n\t{\r\n\t\tSimpleDateFormat sdf=new SimpleDateFormat(\"dd/MM/yyyy\");\r\n txtPDate.setText(sdf.format(new java.util.Date()));\r\n\t}",
"public static void setDate() {\r\n\t\tDate.set(DateFormat.getDateTimeInstance(DateFormat.SHORT,\r\n\t\t\t\tDateFormat.LONG, Locale.getDefault()).format(\r\n\t\t\t\tnew java.util.Date()));\r\n\t}",
"public void setDateOfExamination(java.util.Date param){\n \n this.localDateOfExamination=param;\n \n\n }",
"public void setDate(Date newDate) {\n this.currentDate = newDate;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(String date) {\n this.date = date;\n }",
"public void setDate(DateInfo dates) {\r\n\t\tsuper.setDate(dates);\r\n\t\t//maturityDate = new DateInfo(dates);\r\n\t}",
"public void setEditDate(Date editDate)\r\n/* */ {\r\n/* 193 */ this.editDate = editDate;\r\n/* */ }",
"public void setCreateDate(Date createDate)\r\n/* */ {\r\n/* 165 */ this.createDate = createDate;\r\n/* */ }",
"private static String setDate() {\n mDate = new Date();\n DateFormat dateFormat = DateFormat.getDateInstance();\n String dateString = dateFormat.format(mDate);\n return dateString;\n }",
"public void setDate(long date) {\r\n\t\tthis.date = new Date(date);\r\n\t}",
"public void setRequestDate(Date requestDate);",
"private void setCurrentDateOnButton() {\n\t\t\tfinal Calendar c = Calendar.getInstance();\n\t\t\tyear = c.get(Calendar.YEAR);\n\t\t\tmonth = c.get(Calendar.MONTH);\n\t\t\tday = c.get(Calendar.DAY_OF_MONTH);\n\t\t\t//set current date to registration button\n\t\t\tbtnRegDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t\t//set current date to FCRA registration button\n\t\t\tbtnFcraDate.setText(new StringBuilder()\n\t\t\t// Month is 0 based, just add 1\n\t\t\t.append(day).append(\"-\").append(month + 1).append(\"-\")\n\t\t\t.append(year));\n\t\t}",
"public void setDate(long date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(Date date) {\n setDate(date, null);\n }",
"public void setDate(Calendar date) {\r\n\t\tthis.date = date;\r\n\t}",
"public void setToDate(Date toDate)\r\n/* 33: */ {\r\n/* 34:39 */ this.toDate = toDate;\r\n/* 35: */ }",
"public void setDate(long value) {\n this.date = value;\n }",
"public void setData (Date date) {\r\n\t\tthis.data=date;\r\n\t\t\r\n\t}",
"public void setDate(int day,int month,int year){\n this.day=day;\n this.month=month;\n this.year=year;\n }",
"public void setDate(String newDate)throws Exception{\n\t\t\n\t\tif (Pattern.matches(\"\\\\d\\\\d/\\\\d\\\\d/\\\\d\\\\d\\\\d\\\\d\", newDate)){\n\t\t\tthis.date = newDate;\n\t\t\toverWriteLine(\"Date\", newDate);\n\t\t}\n\t\n\t}",
"void setBirthDate(Date birthDate);",
"public void setDate(String date) {\n\t\tthis.date = date;\n\t}",
"public void setDate(String date) {\n\t\tthis.date = date;\n\t}",
"public void updateDate()\n\t{\n\t\t// Translate year, month and day into a Date object.\n\t\tmDate = new GregorianCalendar(mYear, mMonth, mDay, mHour, mMin).getTime();\n\t\t\n\t\t// Update arguments to preserve selected value on rotation.\n\t\tgetArguments().putSerializable(CrimeFragment.EXTRA_DATE, mDate);\n\t}",
"public void setCurrentDate(String d) {\n currentDate = d;\n }",
"public void setDateStart_CouponsTab_Marketing() {\r\n\t\tthis.dateStart_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tString today1 = (String) (formattedDate.format(c.getTime()));\r\n\t\tthis.dateStart_CouponsTab_Marketing.sendKeys(today1);\r\n\t}",
"public void setDueDate(Date d){dueDate = d;}",
"public void setDate(String newDate)\n\t{\n\t\tthis.date = newDate;\n\t}",
"public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\n\t\tmaxYear = mYear - 10;\r\n\t\tmaxMonth = mMonth;\r\n\t\tmaxDay = mDay;\r\n\r\n\t\tminYear = mYear - 110;\r\n\t\tminMonth = mMonth;\r\n\t\tminDay = mDay;\r\n\t\t// display the current date (this method is below)\r\n\t\t// updateDisplay();\r\n\t\t updateDisplay(maxYear, maxMonth, maxDay);\r\n\t}",
"public void setDate(int m, int d, int y){\n\t\tday = d;\n\t\tyear =y;\n\t\tmonth = m;\n\t}",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"public void setCreateDate(Date createDate);",
"@Test\r\n\tpublic void testSetDate() {\n\t\tfail(\"Not yet implemented\");\r\n\t}",
"void setStartDate(Date startDate);",
"public void updateBDate() {\n bDate = new Date();\n }",
"public void setDateEnd_CouponsTab_Marketing() {\r\n\t\tthis.dateEnd_CouponsTab_Marketing.clear();\r\n\t\tSimpleDateFormat formattedDate = new SimpleDateFormat(\"yyyy-MM-dd\");\r\n\t\tCalendar c = Calendar.getInstance();\r\n\t\tc.add(Calendar.DATE, 1);\r\n\t\tString tomorrow = (String) (formattedDate.format(c.getTime()));\r\n\t\tSystem.out.println(\"tomorrows date is \"+tomorrow);\r\n\t\tthis.dateEnd_CouponsTab_Marketing.sendKeys(tomorrow);\r\n\t}",
"public void setDate(String parName, Date parVal) throws HibException;",
"public void setDate(Date date) {\n if (date != null) {\n this.mDate = (Date) date.clone();\n } else {\n this.mDate = null;\n }\n }",
"private void setDate(String headerName, long date)\r\n/* 329: */ {\r\n/* 330:483 */ SimpleDateFormat dateFormat = new SimpleDateFormat(DATE_FORMATS[0], Locale.US);\r\n/* 331:484 */ dateFormat.setTimeZone(GMT);\r\n/* 332:485 */ set(headerName, dateFormat.format(new Date(date)));\r\n/* 333: */ }",
"public void setDate(java.util.Calendar date) {\n this.date = date;\n }",
"public void setDate(java.util.Calendar date) {\n this.date = date;\n }",
"public void setDate(java.lang.String date) {\n this.date = date;\n }",
"public void updateDate(Date date);",
"public void setDate( org.ontoware.rdf2go.model.node.Node value) {\r\n\t\tBase.set(this.model, this.getResource(), DATE, value);\r\n\t}",
"public void setDateTime(Date date)\n\t{\n\t\tint nHour, nMin;\n\n\t\tCalendar cal = Calendar.getInstance(); //Get calender\n\t\tcal.setTime(date); //Set given date\n\t\tnHour = cal.get(Calendar.HOUR_OF_DAY);\n\t\tnMin = cal.get(Calendar.MINUTE);\n\n\t\tsetDateTime(nHour, nMin, date);\n\t}",
"public void setDate(View view) {\n new DatePickerDialog(\n AddEvent.this, dateSet,\n myCalendar.get(Calendar.YEAR),\n myCalendar.get(Calendar.MONTH),\n myCalendar.get(Calendar.DAY_OF_MONTH)\n ).show();\n }",
"@Override\n\tpublic void initDate() {\n\n\t}",
"public void setDate() {\n DatePickerDialog dateDialog = new DatePickerDialog(this, myDateListener,\n calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DATE));\n //set the date limits so user cannot pick a date outside of game scope\n dateDialog.getDatePicker().setMinDate(System.currentTimeMillis() + MILLIS_IN_DAY);\n dateDialog.getDatePicker().setMaxDate(System.currentTimeMillis() + (MILLIS_IN_DAY * MAX_END_DAY_COUNT));\n dateDialog.show();\n }",
"@Override\n\tprotected void setNextSiegeDate()\n\t{\n\t\tif(_siegeDate.getTimeInMillis() < Calendar.getInstance().getTimeInMillis())\n\t\t{\n\t\t\t_siegeDate = Calendar.getInstance();\n\t\t\t// Осада не чаще, чем каждые 4 часа + 1 час на подготовку.\n\t\t\tif(Calendar.getInstance().getTimeInMillis() - getSiegeUnit().getLastSiegeDate() * 1000L > 14400000)\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 1);\n\t\t\telse\n\t\t\t{\n\t\t\t\t_siegeDate.setTimeInMillis(getSiegeUnit().getLastSiegeDate() * 1000L);\n\t\t\t\t_siegeDate.add(Calendar.HOUR_OF_DAY, 5);\n\t\t\t}\n\t\t\t_database.saveSiegeDate();\n\t\t}\n\t}"
] | [
"0.83526653",
"0.82755387",
"0.8173607",
"0.80066466",
"0.79656464",
"0.79548556",
"0.7867333",
"0.78163654",
"0.7795974",
"0.7791099",
"0.7791099",
"0.7791099",
"0.778912",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7779633",
"0.7772261",
"0.7750059",
"0.77491444",
"0.7648681",
"0.76441574",
"0.7638587",
"0.76259995",
"0.76233095",
"0.76233095",
"0.76233095",
"0.75564986",
"0.75532246",
"0.75527185",
"0.75494075",
"0.75239015",
"0.74608326",
"0.74457335",
"0.74120295",
"0.7406423",
"0.73906547",
"0.73904014",
"0.73606473",
"0.73591924",
"0.7356065",
"0.7343504",
"0.7343482",
"0.73318577",
"0.73307055",
"0.73221177",
"0.73221177",
"0.73221177",
"0.73221177",
"0.73221177",
"0.7288596",
"0.72755855",
"0.7268391",
"0.7261437",
"0.72549796",
"0.72334677",
"0.72296405",
"0.722269",
"0.7216914",
"0.71993095",
"0.71906865",
"0.7186633",
"0.7186322",
"0.71810585",
"0.71793157",
"0.71783614",
"0.71666396",
"0.71666396",
"0.71631664",
"0.71612597",
"0.71459407",
"0.7139882",
"0.7135054",
"0.7127624",
"0.7119223",
"0.7118768",
"0.7118768",
"0.7118768",
"0.709619",
"0.7093044",
"0.7090962",
"0.7086709",
"0.70855254",
"0.7085129",
"0.7072292",
"0.70672554",
"0.70672554",
"0.7059723",
"0.70369774",
"0.7016462",
"0.70140475",
"0.70110565",
"0.69842035",
"0.6963965",
"0.6955286"
] | 0.7821886 | 7 |
/textView = new TextView(mContext); textView.setGravity(Gravity.CENTER); textView.setTextSize(25); textView.setTextColor(Color.RED); return textView; | @Override
public View initView() {
View view = View.inflate(mContext, R.layout.tab_detail_pager, null);
listview = (RefreshListView ) view.findViewById(R.id.listview);
View topnewsView = View.inflate(mContext, R.layout.topnews, null);
// 使用ButterKnife绑定XML文件
//ButterKnife.bind(this, view);
ButterKnife.bind(this, topnewsView);
// 监听ViewPage页面的变化动态改变红点和标题
viewpage.addOnPageChangeListener(new MyOnPageChangeListener());
// 把顶部新闻模块以头的方式加载到ListView中
// listview.addHeaderView(topnewsView);
// ListView自定义方法
listview.addTopNews(topnewsView);
// 监听控件刷新
listview.setOnRefreshListener(new MysetOnRefreshListener());
// 设置单击监听
listview.setOnItemClickListener(new MyOnItemClickListener());
return view;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public TextView getTextView(String text,int textsize){\n TextView textView=new TextView(context);\n textView.setTextColor(Color.parseColor(\"#000000\"));\n textView.setTextSize(textsize);\n textView.setGravity(Gravity.CENTER);\n textView.setText(text);\n textView.setLayoutParams(layoutParams);\n return textView;\n }",
"public View makeView() {\r\n TextView myText = new TextView(RandomAlphabetActivity.this);\r\n myText.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.FILL_PARENT, FrameLayout.LayoutParams.FILL_PARENT));\r\n\r\n myText.setGravity(Gravity.CENTER_VERTICAL | Gravity.CENTER_HORIZONTAL);\r\n myText.setTextSize(200);\r\n myText.setTypeface(null, Typeface.BOLD);\r\n\r\n myText.setTextColor(Color.WHITE);\r\n return myText;\r\n }",
"public TextView a(Context context) {\n TextView textView = new TextView(context);\n textView.setGravity(17);\n textView.setTextSize(2, 12.0f);\n textView.setTypeface(Typeface.DEFAULT_BOLD);\n textView.setLayoutParams(new LayoutParams(-2, -2));\n TypedValue typedValue = new TypedValue();\n getContext().getTheme().resolveAttribute(16843534, typedValue, true);\n textView.setBackgroundResource(typedValue.resourceId);\n textView.setAllCaps(true);\n int i = (int) (16.0f * getResources().getDisplayMetrics().density);\n textView.setPadding(i, i, i, i);\n return textView;\n }",
"private TextView m25232e(Context context) {\n View textView = new TextView(context);\n context = new LayoutParams(-2, -2);\n context.addRule(12, -1);\n context.addRule(14, -1);\n context.setMargins(0, 0, 0, SizeUtil.dp5);\n textView.setPadding(SizeUtil.dp20, SizeUtil.dp5, SizeUtil.dp20, SizeUtil.dp5);\n textView.setLayoutParams(context);\n textView.setText(this.options.getAcceptButtonText());\n textView.setTextColor(this.options.getAcceptButtonTextColor());\n textView.setTypeface(null, 1);\n BitmapUtil.stateBackgroundDarkerByPercentage(textView, this.options.getAcceptButtonBackgroundColor(), 30);\n textView.setTextSize(2, 18.0f);\n textView.setOnClickListener(new C57457(this));\n return textView;\n }",
"private TextView m25227b(Context context) {\n TextView textView = new TextView(context);\n textView.setLayoutParams(new LayoutParams(-1, -1));\n textView.setGravity(17);\n textView.setText(this.options.getMessageText());\n textView.setTextColor(this.options.getMessageColor());\n textView.setTextSize(2, 18.0f);\n return textView;\n }",
"private TextView getTextView(String content) {\n TextView textView = new TextView(this.getContext());\n textView.setEms(30);\n textView.setTextColor(getResources().getColor(R.color.ldstools_black));\n if(content != null && !content.isEmpty()) {\n textView.setText(content);\n }\n return textView;\n }",
"private RelativeLayout m25221a(Context context) {\n RelativeLayout relativeLayout = new RelativeLayout(context);\n relativeLayout.setLayoutParams(new ViewGroup.LayoutParams(-1, -2));\n View textView = new TextView(context);\n textView.setPadding(0, SizeUtil.dp5, 0, SizeUtil.dp5);\n textView.setGravity(17);\n textView.setText(this.options.getTitle());\n textView.setTextColor(this.options.getTitleColor());\n textView.setTextSize(2, 20.0f);\n textView.setTypeface(null, 1);\n context = new LayoutParams(-1, -2);\n context.addRule(14, -1);\n context.addRule(15, -1);\n textView.setLayoutParams(context);\n relativeLayout.addView(textView, textView.getLayoutParams());\n return relativeLayout;\n }",
"public void TextView_Config(){\n textviewBaro=(TextView) findViewById(R.id.textviewGravity);\n textviewAcceleration=(TextView) findViewById(R.id.textviewAcceleration);\n textviewGyro=(TextView) findViewById(R.id.textviewGyro);\n display=(TextView)findViewById(R.id.textView1);\n }",
"public CustomTextView(Context context) {\n\t\tsuper(context);\n\t}",
"abstract TextView getTextView();",
"public RTextView(Context context, AttributeSet attrs, int defStyle) {\n\t\tsuper(context, attrs, defStyle);\n\t\tinit(context,attrs);\n\t}",
"public RTextView(Context context, AttributeSet attrs) {\n\t\tsuper(context, attrs);\n\t\tinit(context,attrs);\n\t}",
"public InnerTextView(Context context) {\n\t super(context);\n\t \n\t\t}",
"@Override\n\tpublic View getView(Context context, ViewGroup parent) {\n\t\ttv = new TextView(context);\n\t\treturn tv;\n\t}",
"private TextView createDateTextView(String strDate) {\n TextView dateTv = new TextView(this);\n dateTv.append(strDate);\n dateTv.setTextSize(14);\n dateTv.setEms(10);\n dateTv.setTextColor(Color.parseColor(\"#aaaaaa\"));\n\n return dateTv;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n\n TextView textView;\n if (convertView == null) {\n // If it's not recycled, initialize some attributes\n textView = new TextView(mContext);\n textView.setTextSize(convertPixelsToDp(height / 30, mContext));\n\n textView.setTextColor(ContextCompat.getColor(mContext, R.color.colorBodyText));\n\n textView.setGravity(Gravity.CENTER_VERTICAL | Gravity.LEFT);\n\n textView.setPadding(10, 8, 10, 8);\n } else {\n textView = (TextView) convertView;\n textView.setTextColor(ContextCompat.getColor(mContext, R.color.colorBodyText));\n }\n\n textView.setText(texts[position]);\n return textView;\n }",
"public TextWithLabel(Context context, AttributeSet attrs)\r\n {\r\n \r\n // Call the super class constructor to create a basic Textbox: \r\n super(context, attrs);\r\n \r\n // Generate new TextView for the label: \r\n labelView = new TextView(context, attrs);\r\n \r\n // Get custom attributes from XML file:\r\n getCustomAttributes(attrs);\r\n\r\n \r\n /**** Set some attributes: **********************\r\n * Could add more attributes?\r\n ************************************************/\r\n labelView.setTextSize(android.util.TypedValue.COMPLEX_UNIT_PT, labelSize);\r\n labelView.setGravity( android.view.Gravity.RIGHT );\r\n \r\n /**** Set text colour... ************************/\r\n //Resources res = getResources();\r\n //int color = res.getColor(R.color.normal_text);\r\n //labelView.setTextColor(color);\r\n //itemView.setTextColor(color);\r\n \r\n // Add the new text boxes to this layout: \r\n addView(labelView);\r\n \r\n }",
"public void mo10458a(View view) {\n TextView textView = (TextView) view.findViewById(C3261c.fscv_title);\n if (VERSION.SDK_INT >= 23) {\n textView.setTextAppearance(C3243f.this.f8722k);\n } else {\n textView.setTextAppearance(C3243f.this.f8713b, C3243f.this.f8722k);\n }\n if (C3243f.this.f8723l != -1) {\n textView.setTextSize(C3243f.this.f8724m, (float) C3243f.this.f8723l);\n }\n textView.setGravity(C3243f.this.f8721j);\n if (C3243f.this.f8734w) {\n ((RelativeLayout.LayoutParams) textView.getLayoutParams()).setMargins(0, C3264k.m14942a(C3243f.this.getContext()), 0, 0);\n }\n if (C3243f.this.f8715d != null) {\n textView.setText(C3243f.this.f8715d);\n } else {\n textView.setText(C3243f.this.f8714c);\n }\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.orange));\n }",
"private View createCurrency() {\r\n\t\tTextView t = new TextView(getContext());\r\n\t\tLayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT);\r\n\t\tblp.leftMargin = 5;\r\n\t\tt.setLayoutParams(blp);\r\n\r\n\t\tif (account.getCurrency().length() > 3) {\r\n\t\t\tt.setText(account.getCurrency().substring(3));\r\n\t\t} else {\r\n\t\t\tt.setText(account.getCurrency());\r\n\t\t}\r\n\t\tt.setTextSize(16);\r\n\t\tTypeface font = CurrencyUtil.currencyFace;\r\n\t\tt.setTypeface(font);\r\n\t\tif (account.getBalance() < 0) {\r\n\t\t\tt.setTextColor(getContext().getResources().getColor(R.color.negative));\r\n\t\t} else {\r\n\t\t\tt.setTextColor(getContext().getResources().getColor(R.color.positive));\r\n\t\t}\r\n\t\treturn t;\r\n\t}",
"@Override\r\n\tpublic void setupView() {\n\t\ttv = (TextView) findViewById(R.id.mjson_layout_text);\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n TextView tv = new TextView(this);\n tv.setText(\"请在拨号键盘输入*#*#0123#*#*, 你会有发现哦~\");\n tv.setTextSize(30);\n setContentView(tv);\n }",
"public TextView mo30762a(Context context, String str, int i, int i2) {\n TextView textView = new TextView(context);\n textView.setTextColor(ViewCompat.MEASURED_STATE_MASK);\n textView.setGravity(i2 | 1);\n textView.setTextSize(0, (float) i);\n textView.setText(str);\n textView.setBackgroundColor(-1);\n return textView;\n }",
"@Override\n\t\t\tpublic void setTextView(String str) {\n\t\t\t\t\n\t\t\t}",
"public TextView TvCreateRelative(int x, int y, int w, int h) {\n TextView tv = new TextView(this);\n setViewPos(tv, x, y, w, h);\n tv.setTextColor(-1);\n return tv;\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.brwn));\n }",
"@Override\n public void onBindViewHolder(ViewHolder arg0, int arg1) {\n TextView textView = (TextView) arg0.itemView;\n textView.setPadding(20, 20, 20, 20);\n textView.setBackgroundColor(Color.WHITE);\n textView.setText(arg1 + \"\");\n }",
"private void initCreateAccountTextView() {\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewLogin);\n textViewCreateAccount.setText(fromHtml(\"<font color='#000000'>Sudah Memiliki Akun ? </font><font color='#03A9F4'>Login</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(daftar.this, activity_login.class);\n startActivity(intent);\n }\n });\n }",
"protected View ShowWord() {\n\t\tTextView btn=new TextView(this);\n\t\tbtn.setId(index);\n\t\tbtn.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));\n//\t\tbtn.setText(\"text not sent here!!!!! \"); //這一行是可以顯示文字的\n\t\treturn btn;\n\t}",
"public void onTextViewCreated(TextView textView) {\n textView.setSingleLine(true);\n textView.setMaxLines(1);\n }",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setTextColor(getResources().getColor(R.color.darkGreen));\n //background color to original\n findViewById(R.id.parent).setBackgroundColor(getResources().getColor(R.color.whiteGreen));\n //text content to original\n ((TextView) findViewById(R.id.text)).setText(\"Hello from Shiying!\");\n\n }",
"public CustomTextView(Context context, AttributeSet attributeSet, int defStyleAttr) {\n\t\tsuper(context, attributeSet, defStyleAttr);\n\t}",
"public BadgeTextView(Context context, AttributeSet attrs, int defStyleAttr) {\n super(context, attrs, defStyleAttr);\n\n init();\n }",
"public Color getTextColor(){\r\n return textColor;\r\n }",
"@Override\n public ViewHolder onCreateViewHolder(ViewGroup arg0, int arg1) {\n\n return new ViewHolder(new TextView(RecyclerViewActivity.this)) {\n\n };\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n TextView textView = new TextView(getActivity());\n textView.setText(R.string.hello_blank_fragment);\n return textView;\n }",
"@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.layout_one,container,false);\n view.findViewById(R.id.lay1);\n TxtViw1=(TextView)view.findViewById(R.id.lay1);\n String string=\"The director has put a lot of efforts in giving Baadshaho a period film look\" +\n \"The vehicles and props have been designed as per the need of the narration.\" +\n \"However, it is yet to be seen whether Baadshaho works as a complete package or not.\";\n TxtViw1.setText(string);\n return view;\n }",
"public CustomTextView(Context context, AttributeSet attributeSet) {\n\t\tsuper(context, attributeSet);\n\t}",
"protected TextView textView( final int childViewIndex )\n {\n return updater.textView( childViewIndex );\n }",
"TextView getDescriptionView();",
"public void adjustTextFontSize(View view) {\n if (this.minimumFontSizeInPixels >= FONT_SIZE_EPSILON && (view instanceof TextView)) {\n TextView textView = (TextView) view;\n float densityScale = view.getResources().getDisplayMetrics().density;\n if (densityScale <= 0.0f) {\n densityScale = DEFAULT_SHADOW_RADIUS;\n }\n int value = textView.getWidth() - (textView.getTotalPaddingLeft() + textView.getTotalPaddingRight());\n if (!(this.layoutParams == null || this.layoutParams.optionWidth == null || this.layoutParams.autoFillsWidth)) {\n value -= (int) Math.ceil((double) densityScale);\n }\n if (value > 0) {\n float viewContentWidth = (float) value;\n String text = null;\n if (textView.getText() != null) {\n text = textView.getText().toString();\n }\n if (text != null && text.length() > 0) {\n float previousFontSize = textView.getTextSize();\n textView.setTextSize(0, this.unscaledFontSizeInPixels);\n while (true) {\n float currentFontSize = textView.getTextSize();\n if (currentFontSize >= this.minimumFontSizeInPixels + FONT_SIZE_EPSILON) {\n TextPaint textPaint = textView.getPaint();\n if (textPaint == null) {\n break;\n }\n float textWidth = textPaint.measureText(text);\n if (textWidth <= viewContentWidth) {\n break;\n }\n textView.setTextSize(0, Math.max(Math.min((viewContentWidth / textWidth) * currentFontSize, currentFontSize - densityScale), this.minimumFontSizeInPixels));\n } else {\n break;\n }\n }\n if (Math.abs(textView.getTextSize() - previousFontSize) >= FONT_SIZE_EPSILON) {\n final View finalView = view;\n view.post(new Runnable() {\n public void run() {\n finalView.requestLayout();\n }\n });\n }\n }\n }\n }\n }",
"@SuppressLint(\"SetTextI18n\")\n @Override\n public Object instantiateItem(ViewGroup container, int position) {\n TextView tv = new TextView(getContext());\n tv.setBackgroundColor(Colors[position]);\n tv.setTextColor(Color.WHITE);\n tv.setText(\"\"+position);\n container.addView(tv);\n return tv;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n TextView textV;\n if (convertView == null) {\n // if it's not recycled, initialize some attributes\n textV = new TextView(mContext);\n\n int scaledSize = (int)mContext.getResources().getDimension(R.dimen.grid_item);\n textV.setLayoutParams(new GridView.LayoutParams(scaledSize, scaledSize));\n\n textV.setTextSize(TypedValue.COMPLEX_UNIT_PX, mContext.getResources().getDimension(R.dimen.grid_text));\n textV.setTypeface(null, Typeface.BOLD);\n textV.setGravity(Gravity.CENTER);\n if (Build.VERSION.SDK_INT>=21)\n textV.setElevation(4);\n }\n else {\n textV = (TextView) convertView;\n }\n\n // Set the following attributes here so that they are refreshed when changes are made\n textV.setText(String.valueOf(word.charAt(position)));\n if (isEnabled(position)) {\n if (position == 4 && centreTint) {\n textV.setBackground(mContext.getResources().getDrawable(R.drawable.button_round_accent));\n textV.setTextColor(mContext.getResources().getColor(android.R.color.black));\n } else {\n textV.setBackground(mContext.getResources().getDrawable(R.drawable.button_round_light));\n textV.setTextColor(mContext.getResources().getColor(R.color.gameItemText));\n }\n }\n else {\n textV.setTextColor(mContext.getResources().getColor(R.color.background));\n if (position == 4 && centreTint)\n textV.setBackground(mContext.getResources().getDrawable(R.drawable.button_round_grey));\n }\n\n return textV;\n }",
"android.view.View mo12148b();",
"@Override\n public void onClick(View view) {\n\n mainTextView.setText(\"Hello from Omar!\");\n mainButton.setBackground(getResources().getDrawable(R.drawable.preset_button_1));\n mainButton.setTextColor(getResources().getColor(R.color.colorPrimary));\n mainEditText.setTextColor(getResources().getColor(R.color.colorPrimary));\n mainTextView.setTextColor(getResources().getColor(R.color.colorPrimary));\n findViewById(R.id.rootView).setBackgroundColor(getResources().getColor(R.color.white));\n secondTextView.setTextColor(getResources().getColor(R.color.grey));\n }",
"private void init(Context context, AttributeSet attrs) {\n\t\tmTempBounds = new Rect();\n\t\tmTypeface = Typeface.DEFAULT;\n\t\tif(attrs!=null) {\n\t\t\tmStyledAttributes = context.getTheme().obtainStyledAttributes(attrs,R.styleable.RTextView,0, 0);\n\t\t\tmFontName = mStyledAttributes.getString(R.styleable.RTextView_typeface);\n\t\t\tmPlaceholder = mStyledAttributes.getString(R.styleable.RTextView_placeholder);\n\t\t\tString c = mStyledAttributes.getString(R.styleable.RTextView_activecolor);\n\t\t\tif(c!=null) {\n\t\t\t\tactiveColor = Color.parseColor(c);\n\t\t\t} else {\n\t\t\t\tactiveColor = -1;\n\t\t\t}\n\t\t\tbaseColor = getCurrentTextColor();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tmTypeface = Typeface.createFromAsset(getContext().getAssets(), \"fonts/\"+mFontName+\".ttf\");\t\n\t\t\t} catch(Exception e) {\n\t\t\t\tLog.e(\"RTextView\", \"Unable to load font '\" + mFontName + \".ttf'.\\nDo the file 'assets/fonts/\"+mFontName+\".ttf' exists?\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"@Override \n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.article_reader_layout, container, false);\n textView = (TextView)view.findViewById(R.id.text) ;\n return view;\n\t}",
"public void fillTextView(){\n\n data += \"Distance: \" + Math.round(distanceValue * 1000) / 1000.0 + \"\\n\";\n data += \"minSpeed: \" + minSpeed +\"\\n\";\n data += \"maxSpeed: \" + maxSpeed +\"\\n\";\n data += \"Avg Speed: \"+ Math.round(averageSpeed * 1000) / 1000.0 +\"\\n\";\n data += \"minAltitude: \"+minAlt +\"\\n\";\n data += \"maxAltitude: \"+maxAlt+\"\\n\";\n data += \"Avg Alt: \"+Math.round(averageAlt * 1000) / 1000.0 +\"\\n\";\n\n textView.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n textView.setText(data);\n\n }",
"private void setupTextSize()\n\t{\n\t\tContext context = getContext();\n\t\tResources res = context.getResources();\n\t\tthis.mTextSize = (int) res.getDimension(R.dimen.tsz_main);\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_feed_web, container, false);\n mDieselTextView = (TextView) v.findViewById(R.id.dieselTextView);\n mE85TextView = (TextView) v.findViewById(R.id.e85TextView);\n mE20TextView = (TextView) v.findViewById(R.id.e20TextView);\n mGas91TextView = (TextView) v.findViewById(R.id.gas91TextView);\n mGas95TextView = (TextView) v.findViewById(R.id.gas95TextView);\n\n // set custom font\n Typeface type = Typeface.createFromAsset(getActivity().getAssets(), \"ds_digital.TTF\");\n mDieselTextView.setTypeface(type);\n mE85TextView.setTypeface(type);\n mE20TextView.setTypeface(type);\n mGas91TextView.setTypeface(type);\n mGas95TextView.setTypeface(type);\n\n\n connectWebservice();\n return v;\n }",
"@Override\n public void viewCreated() {\n TextView title = (TextView) inflater.inflate(R.layout.layout_custom_title, null);\n title.setId(R.id.txt_title);\n title.setText(R.string.balance_title);\n layout.addView(title);\n // [END Creating the title textview]\n\n // [START Creating amount textview]\n // Filling it with content, changing the design and moving it below the title\n amount = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n amount.setId(R.id.txt_amount);\n amount.setTextSize(TypedValue.COMPLEX_UNIT_PT, 30f);\n amount.setAnimation(AnimationUtils.loadAnimation(getContext(), R.anim.fade_in));\n amount.setTextAlignment(View.TEXT_ALIGNMENT_CENTER);\n\n RelativeLayout.LayoutParams amountParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.MATCH_PARENT,\n ViewGroup.LayoutParams.MATCH_PARENT\n );\n amountParams.addRule(RelativeLayout.BELOW, title.getId());\n amountParams.addRule(RelativeLayout.CENTER_IN_PARENT);\n amountParams.setMargins(20, 20, 20, 20);\n\n layout.addView(amount, amountParams);\n // [END Creating amount textview]\n\n // [START Creating a description textview]\n // to describe what the amount means and moving it below the amount\n TextView description = (TextView) inflater.inflate(R.layout.layout_custom_text, null);\n description.setId(R.id.txt_description);\n description.setText(R.string.balance_description);\n\n RelativeLayout.LayoutParams descParams = new RelativeLayout.LayoutParams(\n ViewGroup.LayoutParams.WRAP_CONTENT,\n ViewGroup.LayoutParams.WRAP_CONTENT\n );\n descParams.addRule(RelativeLayout.BELOW, amount.getId());\n\n layout.addView(description, descParams);\n // [END Creating a description textview]\n }",
"@Override\r\n\t\tprotected void onDraw(Canvas canvas) {\n\t\t\tLog.v(\"MyView01>onDraw\",\"f-1\");\r\n\t\t\tsuper.onDraw(canvas);\r\n\t\t\tLog.v(\"MyView01>onDraw\",\"f-2\");\r\n\t\t\t//定义画笔\r\n\t\t\tPaint mPaint = new Paint();\r\n\t\t\tmPaint.setColor(Color.RED);\r\n\t\t\tmPaint.setTextSize(20);\r\n\t\t\tcanvas.drawText(\"MyView01\", 20, 20, mPaint);\r\n\t\t}",
"public RMColor getTextColor() { return RMColor.black; }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n TextView tv = view.findViewById(android.R.id.text1);\n\n // Set the text size 25 dip for ListView each item\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 25);\n tv.setTextColor(Color.parseColor(\"#FFEA0839\"));\n\n // Return the view\n return view;\n }",
"@Override\n public View onCreateView(String name, Context context, AttributeSet attrs) {\n\n return super.onCreateView(name, context, attrs);\n }",
"public void onFinishInflate() {\n super.onFinishInflate();\n this.mTextAndBackground = (ViewGroup) findViewById(C0622R.C0625id.text_and_background);\n ColorDrawable colorDrawable = (ColorDrawable) this.mTextAndBackground.getBackground();\n this.mBackgroundColor = colorDrawable.getColor();\n this.mTextAndBackground.setBackground(new RippleDrawable(ColorStateList.valueOf(Themes.getAttrColor(getContext(), 16843820)), colorDrawable, null));\n this.mTitleView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.title);\n this.mTextView = (TextView) this.mTextAndBackground.findViewById(C0622R.C0625id.text);\n }",
"protected TextView textView( final View parentView, final int childViewIndex )\n {\n return updater.textView( parentView, childViewIndex );\n }",
"public TimeView createView(Context context, boolean isCenterView)\n\t{\n\t\treturn new TimeTextView(context, isCenterView, 25);\n\t}",
"private InnerTextView newAItem() {\n\t\tInnerTextView newTextView = null;\n\t\ttry {\n\t\t\tnewTextView = new InnerTextView(getContext());\n\t\t\tnewTextView.setMinWidth(MIN_TEXT_WIDTH);\n\t\t\tnewTextView.setSingleLine(true);\n\t\t\tnewTextView.setEllipsize(TextUtils.TruncateAt.valueOf(\"END\"));\n\t\t\tnewTextView.setTextSize(mItemFontSize);\n\t\t\tnewTextView.getPaint().setTextSize(mItemFontSize);\n\t\t\tnewTextView.setTextColor(mItemFontColor);\n\t\t\tnewTextView.setGravity(Gravity.CENTER);\n\t\t\tnewTextView.setBackgroundResource(R.drawable.bg_new_message_to_bg);\n\t\t\t\n\t\t\tif (BOLDSTYLE.equals(mItemStyle)) {\n\t\t\t\tnewTextView.getPaint().setFakeBoldText(true);\n\t\t\t}\n\t\t\tnewTextView.setOnClickListener(new OnClickListener() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (!mInnerEditText.hasFocus()) {\n\t\t\t\t\t\tmInnerEditText.requestFocus();\n\t\t\t\t\t}\n\t\t\t\t\t/*\n\t\t\t\t\tInnerTextView textItem = (InnerTextView)v;\n\t\t\t\t\tif(textItem != null && textItem.isBubbleSelected() \n\t\t\t\t\t\t\t&& DeviceUtils.isAboveAndroidOS4_4()){\n\t\t\t\t\t\tonTextItemDelete();\n\t\t\t\t\t}else{\n\t\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\t} \n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\tonTextItemViewSelect(v);\n\t\t\t\t\tshowKeyboard();\n\t\t\t\t}\n\t\t\t});\n\t\t} catch(Exception err) {\n\t\t\tnewTextView = null;\n\t\t}\n\t\t\n\t\treturn newTextView;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_color, container, false);\n resultView = (TextView) view.findViewById(R.id.resultView);\n\n if (hexRandom != null)\n {\n String textColor = \"#\" + this.inversingHex(hexRandom.substring(1));\n\n resultView.setTextColor(Color.parseColor(textColor));\n resultView.setText(hexRandom);\n resultView.setBackgroundColor(Color.parseColor(hexRandom));\n }\n\n return view;\n }",
"private void m50376a(TextView textView, EditText editText, View view, String str) {\n textView.setVisibility(0);\n textView.setText(str);\n view.setBackground(C0841b.m4928c(this.f30720S, C10232R.C10235drawable.bg_border_red_1_5));\n editText.setTextColor(C0841b.m4915a(this.f30720S, (int) C10232R.C10234color.red_lite_3));\n }",
"@Override\n protected void onDraw(Canvas canvas) {\n mTextPain.setColor(mColor);\n canvas.drawText(mText,getWidth() / 2-mTextBound.width()/2,getHeight()/2+mTextBound.height()/2,mTextPain);\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v= inflater.inflate(R.layout.fragment_home, container, false);\n View highlight =(View)v. findViewById(R.id.eth);\n\n highlight.setBackgroundResource(R.color.colorPrimary);//Any color you want to set\n\n ViewGroup.LayoutParams layoutParams = highlight.getLayoutParams();\n layoutParams.width = (int) (dpToPixel(5) * 25 / 100.0f);//If you want to set 25%\n highlight.setLayoutParams(layoutParams);\n return v;\n }",
"@Override\n public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position, convertView, parent);\n\n // Initialize a TextView for ListView each Item\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\n\n // Set the text color of TextView (ListView Item)\n tv.setTextColor(Color.BLACK);\n\n // Generate ListView Item using TextView\n return view;\n }",
"public static TextView styleText(String username, String caption, TextView textView, Context context) {\n\n ForegroundColorSpan blueForegroundColorSpan = new ForegroundColorSpan(context.getResources().getColor(R.color.blue_text));\n StyleSpan bss = new StyleSpan(android.graphics.Typeface.BOLD);\n SpannableStringBuilder ssb = new SpannableStringBuilder(username);\n ssb.setSpan(\n blueForegroundColorSpan, // the span to add\n 0, // the start of the span (inclusive)\n ssb.length(), // the end of the span (exclusive)\n Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n ssb.setSpan(bss, 0, ssb.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n ssb.append(\" \");\n ForegroundColorSpan grayColorSpan = new ForegroundColorSpan(context.getResources().getColor(R.color.gray_text));\n if (caption != null) {\n ssb.append(caption);\n ssb.setSpan(\n grayColorSpan, // the span to add\n ssb.length() - caption.length(),\n // the start of the span (inclusive)\n ssb.length(), // the end of the span (exclusive)\n Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n textView.setText(ssb);\n } else {\n textView.setVisibility(View.GONE);\n }\n\n return textView;\n\n }",
"public CommandViewBuilder setTextColor(Color textColor)\n\t\t{\n\t\t\tthis.textColor = textColor;\n\t\t\treturn this;\n\t\t}",
"@Override\n public void onClick(View v) {\n ((TextView) findViewById(R.id.text)).setText(\"Android is AWESOME!!\");\n }",
"public void mo6928a(Context context, String str, int i, AdSize adSize, AttributeSet attributeSet) {\n if (adSize == null) {\n adSize = AdSize.BANNER;\n }\n AdSize createAdSize = AdSize.createAdSize(adSize, context.getApplicationContext());\n if (getChildCount() == 0) {\n TextView textView = attributeSet == null ? new TextView(context) : new TextView(context, attributeSet);\n textView.setGravity(17);\n textView.setText(str);\n textView.setTextColor(i);\n textView.setBackgroundColor(ViewCompat.MEASURED_STATE_MASK);\n LinearLayout linearLayout = attributeSet == null ? new LinearLayout(context) : new LinearLayout(context, attributeSet);\n linearLayout.setGravity(17);\n LinearLayout linearLayout2 = attributeSet == null ? new LinearLayout(context) : new LinearLayout(context, attributeSet);\n linearLayout2.setGravity(17);\n linearLayout2.setBackgroundColor(i);\n int a = AdUtil.m455a(context, createAdSize.getWidth());\n int a2 = AdUtil.m455a(context, createAdSize.getHeight());\n linearLayout.addView(textView, a - 2, a2 - 2);\n linearLayout2.addView(linearLayout);\n addView(linearLayout2, a, a2);\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_make_text, container, false);\n initView();\n return view;\n }",
"@Override\r\n public View getView(int position, View convertView, ViewGroup parent){\r\n\r\n View view = super.getView(position, convertView, parent);\r\n\r\n TextView tv = (TextView) view.findViewById(android.R.id.text1);\r\n\r\n\r\n tv.setTextColor(Color.WHITE);\r\n\r\n return view;\r\n }",
"public ViewHolder(View v) {\n super(v);\n Typeface oldLondon = Typeface.createFromAsset(context.getAssets(), \"fonts/Blackwood Castle.ttf\");\n\n iView = (ImageView) v.findViewById(to[0]);\n nameView = (TextView) v.findViewById(to[1]);\n nameView.setTypeface(oldLondon);\n descView = (TextView) v.findViewById(to[2]);\n boostView = (TextView) v.findViewById(to[3]);\n }",
"public static void setCustomFont(TextView textview, Context context, AttributeSet attrs) {\n TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.CTextViewDefault);\n String font = a.getString(R.styleable.CTextViewDefault_customFont);\n setCustomFont(textview, font, context);\n a.recycle();\n }",
"public void onViewCreated(View view, @Nullable Bundle savedInstance) {\n generate = getView().findViewById(R.id.color_generate_bt);\n textview1 = getView().findViewById(R.id.color_textview_1);\n textview2 = getView().findViewById(R.id.color_textview_2);\n Mview = getView().findViewById(R.id.color_Relative_background);\n\n\n\n generate.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n color = colorRNG.getColorInt();\n //history5.add(color);\n //contextList.add((Integer)color);\n Mview.setBackgroundColor(color);\n generate.setTextColor(color);\n //toastShort(Integer.toString(color));\n System.out.println(color);\n textview1.setText(\"#\" + Integer.toHexString(color).toUpperCase());\n textview2.setText(Integer.toString(-1*color));\n }\n });\n// additional .setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n//\n// }\n// });\n\n }",
"public ViewfinderView(Context context, AttributeSet attrs) {\n super(context, attrs);\n paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n laserCornerLength = getResources().getDimension(R.dimen.laserCornerLength);\n laserCornerWidth = getResources().getDimension(R.dimen.laserCornerWidth);\n drawTextSize = getResources().getDimension(R.dimen.scanTipTextSize);\n drawTextTop = getResources().getDimension(R.dimen.scanTipTextMargin);\n LaserFrameWidth = getResources().getDimension(R.dimen.laserBoundWidth);\n }",
"@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec)\n\t{\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\t\t\n\t\tint width=0;\n\t\tint height=0;\n\t\tint defX=0;\n\t\tint defY=0;\n\t int widthMode=MeasureSpec.getMode(widthMeasureSpec);\n\t\tint widthSize=MeasureSpec.getSize(widthMeasureSpec);\n\t\tint heightMode=MeasureSpec.getMode(heightMeasureSpec);\n\t\tint heightSize=MeasureSpec.getSize(heightMeasureSpec);\n\t\t\n\t\tthis.widthMeasureSpec=widthMeasureSpec;\n\t\tthis.heightMeasureSpec=heightMeasureSpec;\n\t\tif(text==null)\n\t\t{\n\t\t\tdefX=100;\n\t\t\tdefY=100;\n\t\t\treturn;\n\t\t}\n\t\tdefX=(int)((text_length+1.5f)*textSize);\n\t\tdefY=(int)(defX*0.618f);\n\t\t\n\t\tswitch(widthMode){\n\t\t\tcase MeasureSpec.EXACTLY://确切值或者match_parent\n\t\t\t\twidth=widthSize;\n\t\t\t\tbreak;\n\t\t\tcase MeasureSpec.AT_MOST://wrap_content\n\t\t\t width=defX;\n\t\t\t\tbreak;\n\t\t\tcase MeasureSpec.UNSPECIFIED:\n\t\t\t\tbreak;\n\t\t}\n\t\tswitch(heightMode){\n\t\t\tcase MeasureSpec.EXACTLY://确切值或者match_parent\n\t\t\t\theight=heightSize;\n\t\t\t\tbreak;\n\t\t\tcase MeasureSpec.AT_MOST://wrap_content\n\t\t\t height=defY;\n\t\t\t\tbreak;\n\t\t\tcase MeasureSpec.UNSPECIFIED:\n\t\t\t\tbreak;\n\t\t}\n\t\tsetMeasuredDimension(width,height);\n\t\t//设置绘制规则\n\t\tx = getMeasuredWidth();\n\t\ty = getMeasuredHeight();\n\t\tcenterX=x/2;\n\t\tcenterY=y/2;\n\t\tminR=Math.min(centerX,centerY);\n\t\tmaxR=Math.max(centerX,centerY);\n\t\tif(rX<0){\n\t\t\trX=minR*0.25f;\n\t\t}\n\t\tif(rY<0){\n\t\t\trY=minR*0.25f;\n\t\t}\n\t\trectf.set(0,0,x,y);\n\t}",
"private TextView getPhoneTextView(String content) {\n TextView textView = getTextView(content);\n TableRow.LayoutParams layoutParams = new TableRow.LayoutParams(TableRow.LayoutParams.WRAP_CONTENT, TableRow.LayoutParams.WRAP_CONTENT);\n layoutParams.weight = 20f;\n layoutParams.gravity = Gravity.CENTER_VERTICAL;\n Linkify.addLinks(textView, Linkify.PHONE_NUMBERS);\n textView.setLayoutParams(layoutParams);\n textView.setPadding(45, 30, 0, 0);\n textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.phone_blue, 0, 0, 0);\n textView.setCompoundDrawablePadding(30);\n return textView;\n }",
"public TicTacToeView(Context context, @Nullable AttributeSet attrs) {\n super(context, attrs);\n\n paintBackground = new Paint();\n paintBackground.setColor(Color.BLACK);\n paintBackground.setStyle(Paint.Style.FILL);\n\n paintLine = new Paint();\n paintLine.setColor(Color.WHITE);\n paintLine.setStyle(Paint.Style.STROKE);\n paintLine.setStrokeWidth(5);\n\n\n paintFont = new Paint();\n paintFont.setColor(Color.WHITE);\n paintFont.setTextSize(60);\n\n bitmapBg = BitmapFactory.decodeResource(getResources(), R.drawable.pretty);\n }",
"public void createView() {\n relativeLayout = new RelativeLayout(getActivity());\n layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT);\n layoutParams.addRule(RelativeLayout.ALIGN_PARENT_TOP);\n\n //equation and question number TextView and the params\n finalEquation = new TextView(getActivity());\n finalEquationParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);\n questionNumber = new TextView(getActivity());\n //questionNumber.setId(1);\n questionNumberParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.MATCH_PARENT);\n score = new TextView(getActivity());\n scoreParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.MATCH_PARENT);\n penalty = new TextView(getActivity());\n penaltyParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.MATCH_PARENT);\n\n //Correct and Incorrect buttons and their params\n correctButton = new Button(getActivity());\n wrongButton = new Button(getActivity());\n correctButtonParams = new RelativeLayout.LayoutParams(dpToPixels(125), dpToPixels(125));\n wrongButtonParams = new RelativeLayout.LayoutParams(dpToPixels(125), dpToPixels(125));\n correctButton.setText(\"Correct\");\n wrongButton.setText(\"Wrong\");\n correctButton.setTextColor(Color.parseColor(\"#37474F\"));\n wrongButton.setTextColor(Color.parseColor(\"#37474F\"));\n\n //align everything/make it pretty\n correctButtonParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n correctButtonParams.setMargins(dpToPixels(50),0,0,dpToPixels(50));\n wrongButtonParams.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM);\n wrongButtonParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);\n wrongButtonParams.setMargins(0, 0,dpToPixels(50),dpToPixels(50));\n finalEquationParams.addRule(RelativeLayout.CENTER_HORIZONTAL);\n finalEquationParams.setMargins(0, dpToPixels(180), 0, 0);\n finalEquation.setTextSize(TypedValue.COMPLEX_UNIT_SP, 50);\n finalEquation.setTextColor(Color.WHITE);\n questionNumberParams.addRule(RelativeLayout.CENTER_HORIZONTAL);\n //questionNumber.setTextSize(pixelsToSp(getActivity(), 40));\n questionNumber.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);\n questionNumber.setTextColor(Color.WHITE);\n questionNumber.setTypeface(null, Typeface.ITALIC);\n scoreParams.addRule(RelativeLayout.CENTER_HORIZONTAL);\n scoreParams.setMargins(0, dpToPixels(20),0, 0);\n //score.setTextSize(pixelsToSp(getActivity(), 40));\n score.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);\n score.setTextColor(Color.WHITE);\n score.setTypeface(null, Typeface.ITALIC);\n penaltyParams.addRule(RelativeLayout.CENTER_HORIZONTAL);\n penaltyParams.setMargins(0, dpToPixels(40),0,0);\n //penalty.setTextSize(pixelsToSp(getActivity(), 40));\n penalty.setTextSize(TypedValue.COMPLEX_UNIT_SP, 15);\n penalty.setTypeface(null, Typeface.ITALIC);\n\n //set the params for everything!\n relativeLayout.setLayoutParams(layoutParams);\n finalEquation.setLayoutParams(finalEquationParams);\n correctButton.setLayoutParams(correctButtonParams);\n wrongButton.setLayoutParams(wrongButtonParams);\n questionNumber.setLayoutParams(questionNumberParams);\n score.setLayoutParams(scoreParams);\n penalty.setLayoutParams(penaltyParams);\n\n //add buttons/text views etc\n relativeLayout.addView(finalEquation);\n relativeLayout.addView(correctButton);\n relativeLayout.addView(wrongButton);\n relativeLayout.addView(questionNumber);\n relativeLayout.addView(score);\n relativeLayout.addView(penalty);\n }",
"TextView getTitleView();",
"public void m14907i() {\n m14892a(C3262d.fancy_showcase_view_layout_title, (C3257i) new C3257i() {\n /* renamed from: a */\n public void mo10458a(View view) {\n TextView textView = (TextView) view.findViewById(C3261c.fscv_title);\n if (VERSION.SDK_INT >= 23) {\n textView.setTextAppearance(C3243f.this.f8722k);\n } else {\n textView.setTextAppearance(C3243f.this.f8713b, C3243f.this.f8722k);\n }\n if (C3243f.this.f8723l != -1) {\n textView.setTextSize(C3243f.this.f8724m, (float) C3243f.this.f8723l);\n }\n textView.setGravity(C3243f.this.f8721j);\n if (C3243f.this.f8734w) {\n ((RelativeLayout.LayoutParams) textView.getLayoutParams()).setMargins(0, C3264k.m14942a(C3243f.this.getContext()), 0, 0);\n }\n if (C3243f.this.f8715d != null) {\n textView.setText(C3243f.this.f8715d);\n } else {\n textView.setText(C3243f.this.f8714c);\n }\n }\n });\n }",
"@Override\n public View getView(int position, View convertView, @NonNull ViewGroup parent) {\n TextView textView = (TextView) super.getView(position, convertView, parent);\n textView.setTextColor(Color.WHITE);\n return textView;\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n\n View view = inflater.inflate(R.layout.layout_answer_support, container, false);\n// getDialog().getWindow().setBackgroundDrawable(new ColorDrawable(Color.TRANSPARENT));\n\n\n mAnswer = (TextView) view.findViewById(R.id.answer_textview);\n mOk = (Button) view.findViewById(R.id.answer_support_btn_ok);\n\n mOk.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n getDialog().dismiss();\n }\n });\n\n Bundle mArgs = getArguments();\n String test = mArgs.getString(\"answer\");\n mAnswer.setText(test);\n\n\n return view;\n }",
"@Override\r\n\t\tpublic void run() \r\n\t\t{\n\t\t\tRect mRect = new Rect();\r\n\t\t\t\r\n\t\t\tView mRootView = MainActivity.this.getWindow().getDecorView();\r\n\t\t\tmRootView.getWindowVisibleDisplayFrame(mRect);\t\t\t\r\n\t\t\troot_width = mRect.right - mRect.left;\r\n\t\t\troot_height = mRect.bottom - mRect.top ;\r\n\t\t\t\r\n\t\t\tLog.d(\"huyanwei\",\"Rect Of Root=\"+mRect.toString());\r\n\t\t\t//mTextView.getDrawingRect(mRect);\r\n\t\t\t//mTextView.getWindowVisibleDisplayFrame(mRect);\r\n\t\t\t//view_width = mRect.right - mRect.left;\r\n\t\t\t//view_height = mRect.bottom - mRect.top ;\t\t\t\t\t\r\n\t\t\t//Log.d(\"huyanwei\",\"Rect Of View =\"+mRect.toString());\r\n\r\n\t\t\tview_width = mTextView.getRight() - mTextView.getLeft();\r\n\t\t\tview_height = mTextView.getBottom() - mTextView.getTop();\r\n\t\t\t\r\n\t\t\tLog.d(\"huyanwei\",mTextView.getLeft()+\",\"+mTextView.getTop()+\"-\"+mTextView.getRight()+\",\"+mTextView.getBottom());\r\n\t\t\t\r\n\t\t\tLog.d(\"huyanwei\",\"view_width =\"+view_width+\",view_height=\"+view_height);\r\n\t\t\t\r\n\t\t\tfloat delta_x = (float)(root_width - view_width);\r\n\t\t\tfloat delta_y = (float)(root_height - 4*view_height);\r\n\t\t\t\r\n\t\t\tmAnimationSet = new AnimationSet(false);\t\t\r\n\t\t\tTranslateAnimation mTranslateAnimation = new TranslateAnimation(Animation.ABSOLUTE,delta_x/0.5f,Animation.ABSOLUTE,delta_y);\r\n\t\t\tScaleAnimation mScaleAnimation = new ScaleAnimation(Animation.RELATIVE_TO_SELF,0.5f,Animation.RELATIVE_TO_SELF,1.0f);\r\n\t\t\tmAnimationSet.addAnimation(mTranslateAnimation);\r\n\t\t\tmAnimationSet.addAnimation(mScaleAnimation);\r\n\t\t\tmAnimationSet.setDuration(3000);\r\n\t\t\t\r\n\t\t\tmAnimationSet.setFillBefore(false);\r\n\t\t\tmAnimationSet.setFillAfter(true);\r\n\t\t\r\n\t\t\tmTextView.startAnimation(mAnimationSet);\t\t\t\t\t\r\n\t\t}",
"public BubbleTextView(Context context) {\n\t\tsuper(context);\n\t\tinit();\n\t}",
"private void initCreateAccountTextView() {\n\n TextView textViewCreateAccount = (TextView) findViewById(R.id.textViewCreateAccount);\n // El que hizo esto es un Dios\n textViewCreateAccount.setText(fromHtml(\"<font color='#000'>¿No tienes cuenta? </font><font color='#6dbaf8'>Registrate</font>\"));\n textViewCreateAccount.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent = new Intent(LoginActivity.this, RegisterActivity.class);\n startActivity(intent);\n }\n });\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_text_view, container, false);\n\n initializeCompontent(view);\n\n return view;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }",
"public View getView(int position, View convertView, ViewGroup parent) {\n View view = super.getView(position,convertView,parent);\n\n // Convert the view as a TextView widget\n TextView tv = (TextView) view;\n\n //tv.setTextColor(Color.DKGRAY);\n\n // Set the layout parameters for TextView widget\n RelativeLayout.LayoutParams lp = new RelativeLayout.LayoutParams(\n RelativeLayout.LayoutParams.MATCH_PARENT, RelativeLayout.LayoutParams.MATCH_PARENT\n );\n tv.setLayoutParams(lp);\n\n // Get the TextView LayoutParams\n RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams)tv.getLayoutParams();\n\n // Set the width of TextView widget (item of GridView)\n /*\n IMPORTANT\n Adjust the TextView widget width depending\n on GridView width and number of columns.\n\n GridView width / Number of columns = TextView width.\n\n Also calculate the GridView padding, margins, vertical spacing\n and horizontal spacing.\n */\n\n\n Resources r = reports2.this.getResources();\n int px = (int) (TypedValue.applyDimension(\n TypedValue.COMPLEX_UNIT_DIP, 100, r.getDisplayMetrics()));\n // tv.setLayoutParams(new GridView.LayoutParams((width/10)*6, 50));\n\n // if (position==0 || position==5) {\n // params.width = px/2; // getPixelsFromDPs(EpiloghEid.this,168);\n // tv.setLayoutParams(new GridView.LayoutParams((px*6), 100));\n // }else{\n params.width = px; // getPixelsFromDPs(EpiloghEid.this,168);\n // }\n\n\n // Set the TextView layout parameters\n tv.setLayoutParams(params);\n\n // Display TextView text in center position\n tv.setGravity(Gravity.CENTER);\n\n // Set the TextView text font family and text size\n tv.setTypeface(Typeface.SANS_SERIF, Typeface.NORMAL);\n tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 12);\n\n // Set the TextView text (GridView item text)\n tv.setText(values.get(position));\n\n // Set the TextView background color\n tv.setBackgroundColor(Color.parseColor(\"#d9d5dc\"));\n\n // Return the TextView widget as GridView item\n return tv;\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.text_main1);\n \n view = (MTextView2) findViewById(R.id.textview);\n view.setText(getAssetsString(this,\"1.txt\"));\n view.setMovementMethod(ScrollingMovementMethod.getInstance());\n }",
"private void setupTextView() {\n painterTextViewMoves = findViewById(R.id.painterTextView1);\n painterTextViewTime = findViewById(R.id.painterTextView2);\n painterTextViewPoints = findViewById(R.id.painterTextView3);\n painterTextViewInstructions = findViewById(R.id.painterInstructionsView);\n }",
"private TextView buildEditText(final Context context, final AttributeSet attributeSet) {\n\n\t\tif(DEBUG_MODE) {\n\t\t\tLog.d(LOG_IDENTIFIER, \"Setting editTextSize to = \" + textSize);\n\t\t}\n\n\t\tfinal TextView editText = new TextView(context, attributeSet);\n\t\teditText.setTextSize(textSize);\n\t\teditText.setId(TEXT_ID);\n\t\teditText.setBackgroundColor(Color.WHITE);\n\t\teditText.setTextColor(Color.BLACK);\n\t\teditText.setGravity(Gravity.CENTER);\n\t\teditText.setText(getRoundedValue(defautlValue));\n\t\teditText.setFocusable(true);\n\t\teditText.setClickable(true);\n\t\teditText.setLongClickable(false);\n\t\teditText.setInputType(InputType.TYPE_NUMBER_FLAG_DECIMAL);\n\n\t\teditText.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(final View v) {\n\t\t\t\tfinal EditText et = new EditText(context);\n\t\t\t\tet.setInputType(InputType.TYPE_NUMBER_FLAG_SIGNED);\n\t\t\t\tToast.makeText(context, \"TODO: workaround para InputMethodManager\", Toast.LENGTH_SHORT).show();\n\t\t\t\tfinal InputMethodManager mgr = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);\n\t\t\t\tmgr.showSoftInput(v, InputMethodManager.SHOW_FORCED, new EditResultReceiver(getHandler(), et));\n\t\t\t\tet.requestFocus();\n\n\t\t\t}\n\t\t});\n\n\t\treturn editText;\n\t}",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_task, container, false);\n setRetainInstance(true);\n TextView colorTextView = (TextView) view.findViewById(R.id.taskColorTextView);\n TextView nameTextView = (TextView) view.findViewById(R.id.taskNameTextView);\n LogWrapper.d(TAG, \"onCreateView with color = \" +color + \", name = \" +name);\n colorTextView.setBackgroundColor(Color.parseColor(color));\n colorTextView.setText(\" \");\n nameTextView.setText(name);\n return view;\n }",
"public CustomTextInputLayout(Context context) {\n super(context);\n }",
"private View createBalance() {\r\n\t\tTextView balance = new TextView(getContext());\r\n\t\tLayoutParams blp = new LayoutParams(android.view.ViewGroup.LayoutParams.WRAP_CONTENT,\r\n\t\t\t\tandroid.view.ViewGroup.LayoutParams.WRAP_CONTENT, 1);\r\n\t\tbalance.setGravity(Gravity.RIGHT);\r\n\t\tbalance.setLayoutParams(blp);\r\n\t\tbalance.setText(\"\" + account.getBalance());\r\n\t\tbalance.setTextSize(16);\r\n\t\tbalance.setTypeface(Typeface.DEFAULT_BOLD);\r\n\t\tif (account.getBalance() < 0) {\r\n\t\t\tbalance.setTextColor(getContext().getResources().getColor(R.color.negative));\r\n\t\t} else {\r\n\t\t\tbalance.setTextColor(getContext().getResources().getColor(R.color.positive));\r\n\t\t}\r\n\t\treturn balance;\r\n\t}",
"public TextQuestionHolder(View view) {\n super(view);\n questionTextView = view.findViewById(R.id.questionTextView);\n questionIcon = view.findViewById(R.id.questionIcon);\n answerEditText = view.findViewById(R.id.answerEditText);\n answerDisplayer = view.findViewById(R.id.answerDisplayerTextView);\n possibleSolutionLayout = view.findViewById(R.id.solutionDisplayerLayout);\n //can't change theme in exams, so this can be done once, here\n if (ThemeUtils.isDarkTheme()) {\n int accent = ContextCompat.getColor(view.getContext(), R.color.colorPrimaryDark_Dark);\n view.findViewById(R.id.questionSep1).setBackgroundColor(accent);\n view.findViewById(R.id.questionSep2).setBackgroundColor(accent);\n view.setBackground(ContextCompat.getDrawable(view.getContext(), R.drawable.question_background_dark));\n }\n }",
"@Override\n public View onCreateView(LayoutInflater inflater,\n ViewGroup container, Bundle savedInstanceState) {\n View rootView = inflater.inflate(\n R.layout.fragment_demo_object, container, false);\n\n ((TextView) rootView.findViewById(R.id.tv_demo_obj)).setText(String.valueOf(mValueTosShow));\n rootView.setBackgroundColor(GeneralUtils.getRandomColor());\n return rootView;\n }",
"public MainViews(Context context) {\n this.context = context;\n layoutParams =new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);\n layoutParams.setMargins(0,0,0,5);\n }",
"@Override\r\n\tpublic View makeView() {\n\t\tImageView image = new ImageView(this);\r\n\t\t// cente会让居中显示并缩放\r\n\t\timage.setScaleType(ScaleType.FIT_CENTER);\r\n\t\treturn image;\r\n\t}",
"private void init(AttributeSet attrs, int defStyle)\n {\n setWillNotDraw(false);\n // Set up a default TextPaint object\n textPaint = new TextPaint();\n textPaint.setFlags(Paint.ANTI_ALIAS_FLAG);\n textPaint.setTextAlign(Paint.Align.LEFT);\n\n Point size = new Point();\n size.x = activity.getResources().getDisplayMetrics().widthPixels;\n size.y = activity.getResources().getDisplayMetrics().heightPixels;\n\n eraserBitmap = Bitmap.createBitmap(size.x, size.y, Bitmap.Config.ARGB_8888);\n eraserCanvas = new Canvas(eraserBitmap);\n\n painter = new Paint();\n painter.setColor(0xcc000000);\n transparentPainter = new Paint();\n transparentPainter.setColor(getResources().getColor(android.R.color.transparent));\n transparentPainter.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));\n\n eraser = new Paint();\n eraser.setColor(0xFFFFFFFF);\n eraser.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR));\n eraser.setFlags(Paint.ANTI_ALIAS_FLAG);\n\n LogHelper.d(TAG, \"getHeight: \" + size.y);\n LogHelper.d(TAG, \"getWidth: \" + size.x);\n\n }",
"@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_payment_result, container, false);\n textResult = (TextView) rootView.findViewById(R.id.textPaymentResult);\n textResult.setText(status);\n textResult.setTextColor(Color.parseColor(color));\n return rootView;\n }"
] | [
"0.7728121",
"0.766729",
"0.7634738",
"0.7132029",
"0.71205336",
"0.7059028",
"0.66064495",
"0.651493",
"0.6475312",
"0.64510804",
"0.63341004",
"0.62635934",
"0.6236564",
"0.62268543",
"0.6178362",
"0.61680526",
"0.6149734",
"0.61120665",
"0.6092567",
"0.6090992",
"0.60720885",
"0.6071938",
"0.6069126",
"0.6034416",
"0.6027405",
"0.60133153",
"0.59499687",
"0.5934439",
"0.5929354",
"0.5927303",
"0.59259087",
"0.5918835",
"0.59143376",
"0.5902372",
"0.5900456",
"0.58975685",
"0.5889486",
"0.58818495",
"0.5880846",
"0.58607334",
"0.58590186",
"0.5839612",
"0.58213264",
"0.5785494",
"0.5779536",
"0.576539",
"0.57585776",
"0.5738096",
"0.573745",
"0.572719",
"0.5719814",
"0.5719223",
"0.57155645",
"0.5710036",
"0.57003534",
"0.56995016",
"0.56954545",
"0.5692841",
"0.56820035",
"0.56749725",
"0.56453514",
"0.56359667",
"0.5633501",
"0.5632947",
"0.56328475",
"0.56291664",
"0.5625801",
"0.56175035",
"0.56165403",
"0.56100094",
"0.560936",
"0.56063515",
"0.5606229",
"0.5599383",
"0.5598861",
"0.5598436",
"0.5596903",
"0.55923766",
"0.5577924",
"0.55765706",
"0.5571516",
"0.5571167",
"0.556886",
"0.55677855",
"0.5561125",
"0.55586994",
"0.55532396",
"0.55532396",
"0.55532396",
"0.5549099",
"0.55470926",
"0.554316",
"0.5531503",
"0.5526739",
"0.55253494",
"0.5517485",
"0.5509351",
"0.55073136",
"0.55060166",
"0.5502465",
"0.5486414"
] | 0.0 | -1 |
alpha is output parameter | public static void methodOfMoments(double[][] data, double[] alpha) {
Preconditions.checkNotNull(data);
Preconditions.checkNotNull(alpha);
if (data.length == 1) {
System.arraycopy(data[0], 0, alpha, 0, alpha.length);
DoubleArrays.expToSelf(alpha);
return;
}
double[][] moments = moments(data, alpha.length);
double[] expectedX = moments[0];
double[] expectedXSquared = moments[1];
// TODO : optimize
for (int k = 0; k < expectedX.length; k++) {
alpha[k] = expectedX[k] * (expectedX[0] - expectedXSquared[0]) /
(expectedXSquared[0] - expectedX[0] * expectedX[0]);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void alpha(int alpha);",
"public double getAlpha();",
"public double getAlpha();",
"float getAlpha();",
"abstract public boolean alphaConversion();",
"public double getAlpha()\n {\n return alpha;\n }",
"public void setAlpha(double aAlpha);",
"public double getAlpha() {\n return alpha;\n }",
"void setAlpha(double alpha) {\n this.alpha = alpha;\n }",
"public void setAlpha(double alpha);",
"public static double getAlpha()\n\t{\n\t\treturn alpha;\n\t}",
"double getAlpha() {\n return alpha;\n }",
"public float getAlpha();",
"public float getAlpha();",
"public void setAlpha(int alpha)\n {\n \tthis.alpha=alpha; \n }",
"public final double getAlpha() {\n\t\treturn alpha;\n\t}",
"public abstract void alphaConversion(Variable x, Variable y);",
"public float getAlpha() {\n \t\treturn alpha;\n\t}",
"@Override\n\t\t\tpublic void setAlpha(int alpha) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public int getAlpha() {\n return mAlpha;\n }",
"public double getAlpha()\n\t{\n\t\treturn Math.toRadians(alpha);\n\t}",
"@Override\n\tpublic void setAlpha(int alpha) {\n\n\t}",
"public int getAlpha() {\r\n return this.alpha = getInstanceOf(int.class, this.alpha);\r\n }",
"public static void setAlpha(double alp)\n\t{\n\t\talpha = alp;\t\n\t}",
"public void setAlpha(float alpha) {\n\t\tthis.alpha = alpha;\n\t}",
"public boolean hasAlpha() {\n return true;\n }",
"public int getAlpha()\n {\n return getColor().alpha();\n }",
"private boolean alphas() {\r\n return OPT(GO() && alpha() && alphas());\r\n }",
"public AlphaTable<S, O> getAlpha() {\n return alpha;\n }",
"T setStartAlpha(Double startAlpha);",
"int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }",
"public void setAlpha(float alpha);",
"private boolean alpha() {\r\n return letter() || CATS(Nd) || CHAR('-') || CHAR('_');\r\n }",
"public void setAlphaFactor(double a) {\r\n\t\t_alphaFactor = a;\r\n\t}",
"private float calculateAlpha() {\n float alpha = 1.2f*(myCamera.getViewportWidth()/(2*Const.WORLD_WIDTH-myCamera.getViewportWidth()))-0.2f;\n if(alpha < 0) alpha = 0;\n if(alpha > 1) alpha = 1;\n return alpha;\n }",
"public void setAlpha(double newAlpha) {\n\t\talpha = newAlpha;\n\t}",
"public void writeNewAlpha(){\n\t\tFileSystemHandler.writeVector(Parameters.pathToAlphas, this.newAlpha);\n\t}",
"@SuppressWarnings(\"unchecked\")\n public AnimatorType alpha(int alpha)\n {\n addTransformer(new AlphaTransformer(getShape(), alpha));\n return (AnimatorType) this;\n }",
"int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }",
"public void setEncodingAlpha(boolean encodeAlpha);",
"public void setAlpha(int a)\n { \n alpha = (float) a / 100.0F;\n repaint();\n }",
"private double computeSumAlpha()\n\t{\n\t\tdouble sum = 0;\n\t\tdouble[] a = svm.getAlphas();\n\t\tfor(double d : a)\n\t\t\tsum += Math.abs(d);\n\t\treturn sum;\n\t}",
"int getAlphaOff(){\n return getPercentageValue(\"alphaOff\");\n }",
"public float getStartAlpha() {\n return startAlpha;\n }",
"public void setSuppressAlpha(boolean suppressAlpha) {\n/* 106 */ this.suppressAlpha = suppressAlpha;\n/* */ }",
"public float getAlpha() {\n if (this.isConnectedToGame)\n return 1.0f;\n else\n return 0.5f;\n }",
"public IncompleteGammaFunctionFraction(double a) {\n alpha = a;\n }",
"public int getAlphaInfoValue() {\n return alphaInfo_;\n }",
"public static Vector4 alpha()\n {\n return new Vector4(0,0,0,1);\n }",
"public void resetAlphaValues();",
"protected void fading(float alpha) { }",
"private static boolean isAlpha(byte b)\r\n\t{\r\n\t\treturn (b >= 'a' && b <= 'z') || \r\n\t\t\t (b >= 'A' && b <= 'Z');\r\n\t}",
"@Override\n public void setAlpha(int alpha) {\n if (alpha != mAlpha) {\n mAlpha = alpha;\n invalidateSelf();\n }\n }",
"public void setAlphaF(float p_82338_1_) {\n/* 102 */ if (this.particleAlpha == 1.0F && p_82338_1_ < 1.0F) {\n/* */ \n/* 104 */ (Minecraft.getMinecraft()).effectRenderer.func_178928_b(this);\n/* */ }\n/* 106 */ else if (this.particleAlpha < 1.0F && p_82338_1_ == 1.0F) {\n/* */ \n/* 108 */ (Minecraft.getMinecraft()).effectRenderer.func_178931_c(this);\n/* */ } \n/* */ \n/* 111 */ this.particleAlpha = p_82338_1_;\n/* */ }",
"public boolean isEncodingAlpha();",
"public void SetLearnRate (double alpha) { this.alpha = alpha; }",
"public AlphaInitializer(final float pAlpha) {\n\t\tsuper(pAlpha, pAlpha);\n\t}",
"public void run(IEncoding solution, double Temp_i, double Temp_f, double alpha);",
"@Override\n\tpublic void computeAlpha() {\n\t\t//Allocate memory for the alphas array\n\t\talpha = new double[training[0].length-1];\n\t\t\n\t\t//Checks every feature\n\t\tfor(int i = 0; i < training[0].length-1; i++) {\n\t\t\t//Sets the position of the array corresponding to itself to NaN and continues the loop\n\t\t\tif(i == node_id) {\n\t\t\t\talpha[i] = Double.NaN;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Allocate memory to keep track of the counts\n\t\t\tint[][][] Nijkc = new int[max_values[i]+1][max_values[node_id]+1][max_values[max_values.length-1]+1];\n\t\t\tint[][] Nikc = new int[max_values[node_id]+1][max_values[max_values.length-1]+1];\n\t\t\tint[][] Nijc = new int[max_values[i]+1][max_values[max_values.length-1]+1];\n\t\t\tint[] Nc = new int[max_values[max_values.length-1]+1];\n\t\t\tint N = training.length;\n\t\t\t\n\t\t\t//Counts the patterns found on the training dataset\n\t\t\tfor(int n = 0; n < training.length; n++) {\n\t\t\t\tNijkc[training[n][i]][training[n][node_id]][training[n][training[n].length-1]]++;\n\t\t\t\tNikc[training[n][node_id]][training[n][training[n].length-1]]++;\n\t\t\t\tNijc[training[n][i]][training[n][training[n].length-1]]++;\n\t\t\t\tNc[training[n][training[n].length-1]]++;\n\t\t\t}\n\t\t\t\n\t\t\t//Computes the values of the alpha for a given node(self)->node(target) using the MDL score\n\t\t\tdouble total = 0;\n\t\t\tfor(int j = 0; j < max_values[i] + 1; j++) {\n\t\t\t\tfor(int k = 0; k < max_values[node_id] + 1; k++) {\n\t\t\t\t\tfor(int l = 0; l < max_values[max_values.length-1] + 1; l++) {\n\t\t\t\t\t\tif(Nijkc[j][k][l] == 0 || Nikc[k][l] == 0 || Nijc[j][l] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\ttotal += ((double)Nijkc[j][k][l] / (double)N) * (Math.log(((double)Nijkc[j][k][l]*(double)Nc[l])/((double)Nikc[k][l]*(double)Nijc[j][l])) / Math.log(2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttotal = total - ((((max_values[max_values.length-1]+1)*max_values[node_id]*max_values[i])/(2))*Math.log(N));\n\t\t\t\n\t\t\t//Attribution of the value to the corresponding position on the array\n\t\t\talpha[i] = total;\n\t\t}\n\t\t\n\t\t//System.out.println(Arrays.toString(alpha));\n\t}",
"public final void mALPHA() throws RecognitionException {\n try {\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:2908:2: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '\\\\u00C0' .. '\\\\u00D6' | '\\\\u00D8' .. '\\\\u00F6' | '\\\\u00F8' .. '\\\\u00FF' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:\n {\n if ( (input.LA(1)>='A' && input.LA(1)<='Z')||input.LA(1)=='_'||(input.LA(1)>='a' && input.LA(1)<='z')||(input.LA(1)>='\\u00C0' && input.LA(1)<='\\u00D6')||(input.LA(1)>='\\u00D8' && input.LA(1)<='\\u00F6')||(input.LA(1)>='\\u00F8' && input.LA(1)<='\\u00FF') ) {\n input.consume();\n state.failed=false;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n MismatchedSetException mse = new MismatchedSetException(null,input);\n recover(mse);\n throw mse;}\n\n\n }\n\n }\n finally {\n }\n }",
"public final void mALPHA() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:445:15: ( ( 'a' .. 'z' | 'A' .. 'Z' ) )\n\t\t\t// /Users/Sarah/Projects/ontop/obdalib-core/src/main/java/it/unibz/krdb/obda/parser/Datalog.g:\n\t\t\t{\n\t\t\tif ( (input.LA(1) >= 'A' && input.LA(1) <= 'Z')||(input.LA(1) >= 'a' && input.LA(1) <= 'z') ) {\n\t\t\t\tinput.consume();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tMismatchedSetException mse = new MismatchedSetException(null,input);\n\t\t\t\trecover(mse);\n\t\t\t\tthrow mse;\n\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"@FloatRange(from = 0.0, to = 1.0)\n public float getInitialAlpha() {\n return mImpl.getInitialAlpha();\n }",
"public static double pareto( double alpha ) {\n return Math.pow( 1 - uniform(), -1.0/alpha ) - 1.0;\n }",
"protected void calcAlpha(Sequence seq)\n {\n int T = seq.length();\n int nStates = getNumStates();\n alpha = Library.allocMatrixDouble(T, nStates, Library.LOG_ZERO);\n calcB(seq);\n\n // we can start anywhere, according to the prior probs\n for(int i = 0; i < nStates; i++)\n alpha[0][i] = piStart[i] + bmat[i][0];\n\n // fill in the alpha matrix\n for(int t = 1; t < T; t++){\n // calc j -> i\n for(int i = 0; i < nStates; i++){\n for(int j = 0; j < nStates; j++)\n alpha[t][i] = Library.logadd(alpha[t][i], alpha[t - 1][j] + tran[j][i]);\n alpha[t][i] += bmat[i][t];\n }\n }\n }",
"private AlphaComposite makeTransparent(float alpha){\n return(AlphaComposite.getInstance(AlphaComposite.SRC_OVER,alpha));\n }",
"public void setSymbolAlpha(int alpha) {\n symbol.setAlpha(alpha);\n }",
"public double getBeta();",
"private static boolean isAlpha(char p_char) {\n return ((p_char >= 'a' && p_char <= 'z') || (p_char >= 'A' && p_char <= 'Z' ));\n }",
"public static void printAlpha(FqImage imh) {\n\t\tint\ti,j;\r\n\t\tfor( i = 0 ; i < imh.width ; i++ ){\r\n\t\t\tfor( j = 0 ; j < imh.height ; j++ ){\r\n\t\t\t\tSystem.out.print(\"a\"+imh.points[i][j].getAlpha()+\"a\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t}",
"private void setAlphaInfoValue(int value) {\n alphaInfo_ = value;\n }",
"public void setNewAlpha(){\n\n\t\tretrieveAlpha();\n\t\tretrieveReducerOutput();\n\t\t\n\t\tdouble[] alphaVectorUpdate = new double[K];\n\t\tdouble[] alphaGradientVector = new double[K];\n\t\tdouble[] alphaHessianVector = new double[K];\n\n\t\tdouble[] alphaVector = oldAlpha.clone();\n\t\tdouble[] alphaSufficientStatistics = rDelta;\n\n\t\tint alphaUpdateIterationCount = 0;\n\n\t\t// update the alpha vector until converge\n\t\tboolean keepGoing = true;\n\t\ttry {\n\t\t\tint decay = 0;\n\n\t\t\tdouble alphaSum = 0;\n\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\talphaSum += alphaVector[j];\n\t\t\t}\n\n\t\t\twhile (keepGoing) {\n\t\t\t\tdouble sumG_H = 0;\n\t\t\t\tdouble sum1_H = 0;\n\n\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t// compute alphaGradient\n\t\t\t\t\talphaGradientVector[i] = D\n\t\t\t\t\t\t\t* (Gamma.digamma(alphaSum) - Gamma.digamma(alphaVector[i]))\n\t\t\t\t\t\t\t+ alphaSufficientStatistics[i];\n\n\t\t\t\t\t// compute alphaHessian\n\t\t\t\t\talphaHessianVector[i] = -D * Gamma.trigamma(alphaVector[i]);\n\n\t\t\t\t\tif (alphaGradientVector[i] == Double.POSITIVE_INFINITY\n\t\t\t\t\t\t\t|| alphaGradientVector[i] == Double.NEGATIVE_INFINITY) {\n\t\t\t\t\t\tthrow new ArithmeticException(\"Invalid ALPHA gradient matrix...\");\n\t\t\t\t\t}\n\n\t\t\t\t\tsumG_H += alphaGradientVector[i] / alphaHessianVector[i];\n\t\t\t\t\tsum1_H += 1 / alphaHessianVector[i];\n\t\t\t\t}\n\n\t\t\t\tdouble z = D * Gamma.trigamma(alphaSum);\n\t\t\t\tdouble c = sumG_H / (1 / z + sum1_H);\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tboolean singularHessian = false;\n\n\t\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t\tdouble stepSize = Math.pow(Parameters.DEFAULT_ALPHA_UPDATE_DECAY_FACTOR, decay)\n\t\t\t\t\t\t\t\t* (alphaGradientVector[i] - c) / alphaHessianVector[i];\n\t\t\t\t\t\tif (alphaVector[i] <= stepSize) {\n\t\t\t\t\t\t\t// the current hessian matrix is singular\n\t\t\t\t\t\t\tsingularHessian = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\talphaVectorUpdate[i] = alphaVector[i] - stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (singularHessian) {\n\t\t\t\t\t\t// we need to further reduce the step size\n\t\t\t\t\t\tdecay++;\n\n\t\t\t\t\t\t// recover the old alpha vector\n\t\t\t\t\t\talphaVectorUpdate = alphaVector;\n\t\t\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we have successfully update the alpha vector\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// compute the alpha sum and check for alpha converge\n\t\t\t\talphaSum = 0;\n\t\t\t\tkeepGoing = false;\n\t\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\t\talphaSum += alphaVectorUpdate[j];\n\t\t\t\t\tif (Math.abs((alphaVectorUpdate[j] - alphaVector[j]) / alphaVector[j]) >= Parameters.DEFAULT_ALPHA_UPDATE_CONVERGE_THRESHOLD) {\n\t\t\t\t\t\tkeepGoing = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (alphaUpdateIterationCount >= Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_ITERATION) {\n\t\t\t\t\tkeepGoing = false;\n\t\t\t\t}\n\n\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\talphaUpdateIterationCount++;\n\t\t\t\talphaVector = alphaVectorUpdate;\n\t\t\t}\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\tSystem.err.println(iae.getMessage());\n\t\t\tiae.printStackTrace();\n\t\t} catch (ArithmeticException ae) {\n\t\t\tSystem.err.println(ae.getMessage());\n\t\t\tae.printStackTrace();\n\t\t}\n\n\t\tnewAlpha = alphaVector;\n\n\n\t}",
"@Override\n\tpublic final int getRenderBlockPass()\n\t{\n\t\treturn Renderers.PASS_ALPHA;\n\t}",
"public AVT getLetterValue()\n {\n return m_lettervalue_avt;\n }",
"public void setBeta(double aBeta);",
"public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please type in a letter :\");\n\t\t\n\t\tString x = input.nextLine();\n\t\t\n\t\tSystem.out.println(\" The numerical value of \" + x + \" is \" + alphabet(x));\n\t\t\n\t}",
"@Override\n public IComplexNDArray geru(IComplexNumber alpha, IComplexNDArray x, IComplexNDArray y, IComplexNDArray a) {\n NativeBlas.cgeru(a.rows(), a.columns(),\n new ComplexFloat(alpha.realComponent().floatValue(), alpha.imaginaryComponent().floatValue()),\n x.data(), x.offset(), 1, y.data(), y.offset(), 1, a.data(),\n a.offset(), a.rows());\n return a;\n }",
"public int getAlphaInfoValue() {\n return instance.getAlphaInfoValue();\n }",
"@Override\n public IComplexNDArray gerc(IComplexNumber alpha, IComplexNDArray x,\n IComplexNDArray y, IComplexNDArray a) {\n NativeBlas.cgerc(a.rows(), a.columns(), (ComplexFloat) alpha, x.data(), x.offset(), 1, y.data(), y.offset(), 1, a.data(),\n a.offset(), a.rows());\n return a;\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 double track2math(double alpha) {\n return Math.PI/2 - alpha;\n }",
"public short getAlpha(final int aX, final int aY)\r\n\t{\r\n\t\treturn mAlphas[aX][aY];\r\n\t}",
"public int getPaintAlpha(){\n return Math.round((float)paintAlpha/255*100);\n }",
"protected final double fa(double x, double ac, double ae) {return ac*Math.pow(x, ae)/K;}",
"private int adjustAlpha( int color, float alphaArg ) {\n \t\tint alpha = Math.round( alphaArg );\n \t\tint red = Color.red( color );\n \t\tint green = Color.green( color );\n \t\tint blue = Color.blue( color );\n \t\treturn Color.argb( alpha, red, green, blue );\n \t}",
"public void setDefaultAlpha(double alpha) {\n defaultAlpha = alpha;\n invalidate();\n }",
"private long getAlpha(long minCardinality, long maxCardinality, float threshold) {\n\treturn (long) ((minCardinality - (threshold * maxCardinality)) / (1 + threshold));\n }",
"@Override\n public INDArray ger(float alpha, INDArray x,\n INDArray y, INDArray a) {\n NativeBlas.sger(a.rows(), a.columns(), alpha, x.data(), 0, 1, y.data(), 0, 1, a.data(),\n 0, a.rows());\n return a;\n }",
"public float getInterpolatedValue(float alpha) {\n return interpolator.interpolate(initialValue, currentValue, alpha);\n }",
"@Field(1) \n\tpublic ValuedEnum<D2D1_ALPHA_MODE> alphaMode() {\n\t\treturn this.io.getEnumField(this, 1);\n\t}",
"public double getCurrentAlphaFraction() {\n return alphaFraction;\n }",
"@Override\r\n\tdouble alan() {\n\t\tSystem.out.println(\"Ucgenin Alani : \");\r\n\t\treturn kenar1 * kenar2 /2;\r\n\t}",
"public void ae(boolean z) {\n }",
"Rule Letter() {\n // No effect on value stack\n return FirstOf(\n CharRange('a', 'z'),\n CharRange('A', 'Z'));\n }",
"private boolean isAlpha(String name) {\r\n\t\treturn name.matches(\"^[a-zA-Z0-9_]*$\");\r\n\t}",
"double getGamma();",
"public double getAlphaAt(int row) {\n if (scale == 0)\n return defaultAlpha;\n else\n return (alphaColumn.getDoubleAt(row) - amin) * scale;\n }",
"public com.whensunset.wsvideoeditorsdk.model.YuvAlphaType getAlphaInfo() {\n com.whensunset.wsvideoeditorsdk.model.YuvAlphaType result = com.whensunset.wsvideoeditorsdk.model.YuvAlphaType.forNumber(alphaInfo_);\n return result == null ? com.whensunset.wsvideoeditorsdk.model.YuvAlphaType.UNRECOGNIZED : result;\n }",
"public double getAscent() throws PDFNetException {\n/* 876 */ return GetAscent(this.a);\n/* */ }",
"Alphabet alphabet() {\n return _alphabet;\n }",
"private boolean letter() {\r\n return CATS(Lu, Ll, Lt, Lm, Lo);\r\n }",
"@Override\n public int getAlpha() {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {\n return patternDrawable.getAlpha();\n }\n\n return 0xFF;\n }"
] | [
"0.80969405",
"0.7874834",
"0.7874834",
"0.76253366",
"0.74561226",
"0.74138975",
"0.7386651",
"0.73499006",
"0.7341734",
"0.7316962",
"0.72755116",
"0.7266017",
"0.72323215",
"0.72323215",
"0.71920246",
"0.7124265",
"0.7091546",
"0.70845073",
"0.698788",
"0.69331235",
"0.693174",
"0.69112474",
"0.6886315",
"0.6864542",
"0.6845985",
"0.68403804",
"0.6712835",
"0.6710833",
"0.6664997",
"0.6611662",
"0.6611278",
"0.6596031",
"0.65921366",
"0.6529975",
"0.6449898",
"0.639841",
"0.6389586",
"0.626889",
"0.6256727",
"0.621162",
"0.6069256",
"0.606399",
"0.6063673",
"0.6043558",
"0.6003053",
"0.5999294",
"0.5970225",
"0.5970109",
"0.5967046",
"0.5948108",
"0.59470534",
"0.5920572",
"0.5894088",
"0.58810943",
"0.5868487",
"0.58625954",
"0.58537537",
"0.58504677",
"0.58475363",
"0.58292687",
"0.5787554",
"0.5785676",
"0.5780064",
"0.57689416",
"0.57443786",
"0.5736786",
"0.571826",
"0.56597054",
"0.56581366",
"0.5643629",
"0.56181985",
"0.5579782",
"0.55694133",
"0.5569262",
"0.5560844",
"0.5554317",
"0.5551926",
"0.55377096",
"0.5534095",
"0.5523918",
"0.5499449",
"0.54914105",
"0.54861414",
"0.5479197",
"0.5473113",
"0.54719985",
"0.54594433",
"0.54571855",
"0.54320925",
"0.54282206",
"0.54249054",
"0.5400716",
"0.5395201",
"0.53705925",
"0.53573793",
"0.5346877",
"0.53369725",
"0.5336871",
"0.5333781",
"0.53100413",
"0.53080165"
] | 0.0 | -1 |
Index 0 of returned value is E[x]; Index 1 is E[x^2] (noncentral) | private static double[][] moments(double[][] data, int K) {
double[] expectedX = new double[K];
double[] expectedXSquared = new double[K];
for (double[] theta : data) {
if (theta.length != K) {
throw new IllegalArgumentException("Dimensions of data and alpha do not match!");
}
for (int k = 0; k < expectedX.length; k++) {
double p = Math.exp(theta[k]);
expectedX[k] += p;
expectedXSquared[k] += p * p;
}
}
DoubleArrays.divideToSelf(expectedX, data.length);
DoubleArrays.divideToSelf(expectedXSquared, data.length);
return new double[][]{expectedX, expectedXSquared};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Vector getImagEigenvalues() {\n return e;\n }",
"public double getEquinox();",
"public Float getE1() {\r\n return e1;\r\n }",
"public double energy(int x, int y) {\r\n validate(x, y);\r\n return energy[x][y];\r\n }",
"public int[] eigenValueIndices(){\n if(!this.pcaDone)this.pca();\n return this.eigenValueIndices;\n }",
"private double getExponentTerm(final double[] values) {\n //final double[] centered = new double[values.length];\n //for (int i = 0; i < centered.length; i++) {\n // centered[i] = values[i] - means[i];\n //}\n // I think they are already centered from earlier?\n //final double[] preMultiplied = covariance_rpt_inv_normal.multiply(values/*centered*/);\n double sum = 0;\n for (int i = 0; i < values.length; i++) {\n sum += (Math.exp(-0.5 * values[i]) / constant_normal);//centered[i];\n }\n return sum;\n }",
"public double getEigenValue(int i) {\n\t\treturn eigenvalues[i];\n\t}",
"public Expression getE1() {\r\n return e1;\r\n }",
"public double[] eigenValues(){\n if(!this.pcaDone)this.pca();\n return this.eigenValues;\n }",
"public double getX2()\n\t{\n\t\treturn this.x[2];\n\t}",
"public java.lang.Float getE() {\n return e;\n }",
"public java.lang.Float getE() {\n return e;\n }",
"public int x (int index) { return coords[index][0]; }",
"public int E() {\r\n return E;\r\n }",
"private double[][] getEnergyMatrix() {\n double[][] energi = new double[height()][width()];\n for (int i = 0; i < height(); i++) {\n for (int j = 0; j < width(); j++) {\n energi[i][j] = energy(j, i);\n }\n }\n return energi;\n }",
"public int E() {\n \treturn E;\n }",
"private double getRecEnergy(){\n\t\tdebugMatrix = new double[CELL_SIDE_COUNT][CELL_SIDE_COUNT];\n\t\tconvolutedMatrix = new Complex[CELL_SIDE_COUNT][CELL_SIDE_COUNT];\n\t\t//initiliaze the whole convolutedMatrix array to zero\n\t\tfor(int x = 0; x < CELL_SIDE_COUNT; x++)\n\t\t{\n\t\t\tfor(int y = 0; y < CELL_SIDE_COUNT; y++)\n\t\t\t{\n\t\t\t\tconvolutedMatrix[x][y] = Complex.zero;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Pg. 180 Lee[05]\n\t\tint indexTop = CELL_SIDE_COUNT * CELL_SIDE_COUNT;\n\t\t//Eq 19 Lee[05]\n\t\t//Also Eq 3.9 Essman[95]\n\t\tdouble sum = 0;\n\t\tint indtop = CELL_SIDE_COUNT * CELL_SIDE_COUNT;\n\t\tint midPoint = CELL_SIDE_COUNT / 2;\n\t\tif (midPoint << 1 < CELL_SIDE_COUNT) {\n\t\t\t++midPoint;\n\t\t}\n\t\t\n\t\tfor (int ind = 1; ind <= (indtop - 1); ++ind) {\n\t\t\t\n\t\t\tint y = ind / CELL_SIDE_COUNT + 1;\n\t\t\tint x = ind - (y - 1) * CELL_SIDE_COUNT + 1;\n\t\t\tint mXPrime = x - 1;\n\t\t\tif (x > midPoint) {\n\t\t\t\tmXPrime = x - 1 - CELL_SIDE_COUNT;\n\t\t\t}\n\t\t\tint mYPrime = y - 1;\n\t\t\tif (y > midPoint) {\n\t\t\t\tmYPrime = y - 1 - CELL_SIDE_COUNT;\n\t\t\t}\n\t\t\tdouble m = mXPrime * 1.0 + mYPrime * 1.0; //Was inverseMeshWidth - theory is reciprocal lattice vectors are for the entire cell U rather than one cell\n\t\t\tdouble mSquared = squared(mXPrime * 1.0) + squared(mYPrime * 1.0);\n\t\t\t\n\t\t\tdouble V = 1; //working in the unit mesh\n\t\t\tdouble bterm = M.bspmod[x]*M.bspmod[y];\n\t\t\tdouble eterm = Math.exp(-squared(Math.PI/ewaldCoefficient)*mSquared) / (bterm * Math.PI * V * mSquared);\n\t\t\t//Section 3.2.8 Lee[05]\n\t\t\tdouble inverseQPart = (squared(inverseFTQComplex[x-1][y-1].re())+squared(inverseFTQComplex[x-1][y-1].im())); //Lee[05]\n\t\t\tdouble thisContribution = eterm * inverseQPart;\n\t\t\tconvolutedMatrix[x-1][y-1] = inverseFTQComplex[x-1][y-1].scale(eterm); //Save this for the force calculation\n\t\t\tsum += thisContribution; //from the argument that F(Q(M))*F(Q(-M))=F-1(Q)^2\n\t\t}\n\t\treturn 0.5*sum;\n\t}",
"public double energy(int x, int y) {\n if (x < 0 || x >= width() || y < 0 || y >= height()) {\n throw new IllegalArgumentException(\"x, y outside picture boundary\");\n }\n return this.energy[x][y];\n }",
"public int E() {\n return E;\n }",
"public int E() {\n return E;\n }",
"public E get(int index);",
"public int getE() {\n return e_;\n }",
"int getE();",
"public double getGene(int x)\n {\n return this.vectOfCoef.get(x);\n }",
"public double computeE(double temperature) throws Exception {\n int index = findPolynomial(temperature);\n if (index!=BadIndex) {\n double data = polynomials[index].compute(temperature);\n\n double correction = 0.0;\n if (exponential!=null && temperature>0) {\n // according to the function definition from NIST,\n // the exponential term is available only for type K when temperature > 0\n // Reference http://srdata.nist.gov/its90/download/download.html\n correction = exponential.compute(temperature);\n }\n return data + correction;\n }\n else {\n throw new Exception(getInputOutOrRangeMessage(temperature));\n }\n }",
"public int getE() {\n return e_;\n }",
"private double calc_E(KeplerElements a) {\n\t\tdouble sqrome2 = Math.sqrt(1.0 - a.e * a.e);\r\n\t\tdouble cta = Math.cos(a.ta);\r\n\t\tdouble sta = Math.sin(a.ta);\r\n\t\tdouble sine0 = (sqrome2 * sta) / (1.0 + a.e * cta);\r\n\t\tdouble cose0 = (a.e + cta) / (1.0 + a.e * cta);\r\n\t\tdouble e0 = Math.atan2(sine0, cose0);\r\n\t\treturn e0;\r\n\r\n\t}",
"public double[] randv()\n\t{\n\t\tdouble p = a * (1.0 - e * e);\n\t\tdouble cta = Math.cos(ta);\n\t\tdouble sta = Math.sin(ta);\n\t\tdouble opecta = 1.0 + e * cta;\n\t\tdouble sqmuop = Math.sqrt(this.mu / p);\n\n\t\tVectorN xpqw = new VectorN(6);\n\t\txpqw.x[0] = p * cta / opecta;\n\t\txpqw.x[1] = p * sta / opecta;\n\t\txpqw.x[2] = 0.0;\n\t\txpqw.x[3] = -sqmuop * sta;\n\t\txpqw.x[4] = sqmuop * (e + cta);\n\t\txpqw.x[5] = 0.0;\n\n\t\tMatrix cmat = PQW2ECI();\n\n\t\tVectorN rpqw = new VectorN(xpqw.x[0], xpqw.x[1], xpqw.x[2]);\n\t\tVectorN vpqw = new VectorN(xpqw.x[3], xpqw.x[4], xpqw.x[5]);\n\n\t\tVectorN rijk = cmat.times(rpqw);\n\t\tVectorN vijk = cmat.times(vpqw);\n\n\t\tdouble[] out = new double[6];\n\n\t\tfor (int i = 0; i < 3; i++)\n\t\t{\n\t\t\tout[i] = rijk.x[i];\n\t\t\tout[i + 3] = vijk.x[i];\n\t\t}\n\n\t\treturn out;\n\t}",
"public amj e(int paramInt)\r\n/* 480: */ {\r\n/* 481:493 */ return this.b[paramInt];\r\n/* 482: */ }",
"public abstract E get(int index);",
"int getEvd();",
"public double getX()\n\t\t{\n\t\t\treturn this.x[0];\n\t\t}",
"public SimpleEVD<T> eig() {\n return new SimpleEVD(mat);\n }",
"public abstract double get( int i, int j ) throws JWaveException;",
"@Override\n\tpublic double getRx() {\n\ndouble object = 0;\n for(int i = 0; i < x.length; i++){\n object += Math.pow(y[i] - ( theta[0] + theta[1] * x[i]), 2);\n }\n return object / 2 ;\n }",
"public float getX2() {\r\n return (c + 2*b + 3*a)/3;\r\n }",
"public double[] coeff();",
"public ArrayList<Integer> getE() {\r\n return this.e;\r\n }",
"public Vector getRealEigenvalues() {\n return d;\n }",
"public double getX1()\n\t{\n\t\treturn this.x[1];\n\t}",
"public double getX2SubSolution() {\n this.polySubSolve();\n return this.x2sub;\n }",
"float getEFloat();",
"double getAxon();",
"public double getSol() {\n this.tanSolve();\n return this.x;\n }",
"E cos(final E n);",
"private double[][] calculateExafsEnergiesConstantKStep() {\n\t\tdouble lowK = evToK(cEnergy);\n\t\tdouble highK = evToK(finalEnergy);\n\t\tdouble[][] kArray = createStepArray(lowK, highK, exafsStep, exafsTime, true, numberDetectors);\n\t\t// convert from k to energy in each element\n\t\tfor (int i = 0; i < kArray.length; i++)\n\t\t\tkArray[i][0] = kToEv(kArray[i][0]);\n\t\treturn kArray;\n\t}",
"public VectorN getH()\n\t{\n\t\tVectorN r = new VectorN(rv.x[0], rv.x[1], rv.x[2]);\n\t\tVectorN v = new VectorN(rv.x[3], rv.x[4], rv.x[5]);\n\t\tVectorN out = r.crossProduct(v);\n\t\treturn out;\n\t}",
"public double getSolutionX2() {\n this.polySolve();\n if (this.real) {\n return this.x2;\n } else {\n return 0010;\n }\n\n }",
"VectorArray getNeutHar();",
"public Integer getEi() {\n return ei;\n }",
"public double m2() {\n\t\treturn (this.e() * this.e() - this.vector.mag2());\n\t}",
"public float GetComponent(int n_x, int n_y) {\n \n\t/*\n\tinputs--\n\t\n\tn_x :\n\t The first index\n\tn_y :\n\t The second index\n\t*/\n\t\n\t/*\n\toutputs--\n\t\n\tf_val (implicit) :\n\t The float value at the indexed location of this\n\t*/\n\t\n\treturn this.mat_f_m[n_x][n_y];\n \n }",
"public double energy(int x, int y) {\n if (x >= current.width() || x < 0 || y >= current.height() || y < 0)\n throw new IndexOutOfBoundsException(String.format(\n \"Pixel (%d, %d) out of bounds\", x, y));\n if (x == 0 || y == 0 || x == current.width() - 1\n || y == current.height() - 1)\n return 195075;\n\n Color topPixel = current.get(x - 1, y);\n Color bottomPixel = current.get(x + 1, y);\n Color leftPixel = current.get(x, y - 1);\n Color rightPixel = current.get(x, y + 1);\n\n return dualGradientEnergy(topPixel, bottomPixel)\n + dualGradientEnergy(leftPixel, rightPixel);\n\n }",
"public double getX();",
"public double energy(int x, int y) {\n if(x < 0 || x >= width() || y < 0 || y >= height()) {\n throw new IndexOutOfBoundsException();\n }\n if(x == 0 || x == width() - 1 || y == 0 || y == height() - 1) {\n return 1000;\n }\n\n int deltaX = del_energyCal(x + 1, y, x - 1, y);\n int deltaY = del_energyCal(x - 1, y, x - 1, y);\n \n double energy = Math.sqrt(deltaX + deltaY);\n return energy;\n }",
"double getValueAt(int x, int y);",
"public double getX2SubReal() {\n this.polySubSolve();\n return this.x2resub;\n }",
"public double energy(int x, int y)\n { \n //StdOut.printf(\"x:%d, y:%d\", x, y);\n int w = width() -1, h = height()-1;\n //check boundaries\n if (x < 0 || x > w || y < 0 || y > h)\n throw new java.lang.IndexOutOfBoundsException(\"Energy\");\n // if pixel on boarder:\n else if (x == 0 || x == w || y == 0 || y == h)\n return this.BOARDER_NRG;\n else return innerEnergy(x, y);\n }",
"public BigInteger getX();",
"private double kToEv(double value) {\n\t\treturn Converter.convertWaveVectorToEnergy(value, edgeEnergy);\n\t}",
"public double getX2SubImaginary() {\n this.polySubSolve();\n return this.x2imsub;\n }",
"private double edgeEquationValue(Point2D p, Point2D p1, Point2D p2)\n {\n return (p2.getY() - p1.getY()) * (p.getX() - p1.getX())\n - (p2.getX() - p1.getX()) * (p.getY() - p1.getY());\n }",
"public float[] compute() {\r\n clearCache(); // unnecessary if already called when changing inputs\r\n float[] res = new float[neurons[neurons.length - 1].length];\r\n for (int i = 0; i < neurons[neurons.length - 1].length; i++) {\r\n res[i] = neurons[neurons.length - 1][i].compute();\r\n }\r\n return res;\r\n }",
"public double getX1SubSolution() {\n this.polySubSolve();\n return this.x1sub;\n }",
"public double getX1SubImaginary() {\n this.polySubSolve();\n return this.x1imsub;\n }",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"double getX();",
"public IDoubleArray getSolutionVector();",
"public double[] getOutputRealValues(){\r\n\t\treturn realValues[1];\r\n\t}",
"public String get_exponent_part();",
"public Double productoEscalar(Pixel p){\r\n\t\treturn this.getXDouble()*p.getXDouble() + this.getYDouble()*p.getYDouble(); \r\n\t}",
"double getX() { return pos[0]; }",
"float getIn(int index);",
"public double getValue()\n\t{\n\t\treturn ifD1.getValue();// X100 lux\n\t}",
"public Matrix PQW2ECI()\n\t{\n\t\tdouble cw = Math.cos(w);\n\t\tdouble sw = Math.sin(w);\n\t\tdouble craan = Math.cos(raan);\n\t\tdouble sraan = Math.sin(raan);\n\t\tdouble ci = Math.cos(i);\n\t\tdouble si = Math.sin(i);\n\n\t\tMatrix out = new Matrix(3, 3);\n\t\tout.A[0][0] = craan * cw - sraan * sw * ci;\n\t\tout.A[0][1] = -craan * sw - sraan * cw * ci;\n\t\tout.A[0][2] = sraan * si;\n\t\tout.A[1][0] = sraan * cw + craan * sw * ci;\n\t\tout.A[1][1] = -sraan * sw + craan * cw * ci;\n\t\tout.A[1][2] = -craan * si;\n\t\tout.A[2][0] = sw * si;\n\t\tout.A[2][1] = cw * si;\n\t\tout.A[2][2] = ci;\n\t\treturn out;\n\t}",
"public static Experiment lawson1162_E() { \n\n\t\tExperiment experiment = createLawsonExperiment( 1162, false );\n\t\t\n\t\tComplexMatrix pm = new ComplexMatrix(2);\n\t\t\n\t\tpm.set( 0, 0, 9.778932093636766E-6, +1.1539001755855298 );\n\t\tpm.set( 0, 1, 9.54090827267122E-6, -0.5761611044097982); //these minus signs are made up\n\t\tpm.set( 1, 0, -4.664462353536279E-6, -0.5776434681545166); //these minus signs are made up\n\t\tpm.set( 1, 1, -1.2050992588859665E-5,+1.153881700898593);\n\t\t\n\t\texperiment.setActual(pm);\n\t\t\n\t\treturn experiment;\n\t}",
"public double getEnergia() { return energia; }",
"public Vector2d getEvte() {\n return evte;\n }",
"public double energy(int x, int y) {\n if (!validCoordinates(x, y)) { throw new IndexOutOfBoundsException(\"x or y not in range.\"); }\n if (isBorder(x, y)) { return 1000.0; }\n return Math.sqrt(hzDiff(x, y) + vtDiff(x, y));\n }",
"public Matrix getValue();",
"@Override\n public E get(int index) {\n // todo: Students must code\n checkRange(index); // throws IndexOOB Exception if out of range\n return data[calculate(index)];\n }",
"@Override\n\tpublic E get(int index) {\n\t\treturn node(index).elementE;\n\t}",
"public double[] OutputVector() {\r\n\r\n\t\tdouble Vector[];\r\n\r\n\t\tVector = new double[Node.length];\r\n\r\n\t\tfor (int i=0; i < Node.length; i++)\r\n\t\t\tVector[i] = Node[i].Output;\r\n\r\n\t\treturn (Vector);\r\n\t}",
"public Matrix RSW2ECI()\n\t{\n\t\tVectorN r = this.getR();\n\t\t//VectorN v = this.getV();\n\t\tVectorN h = this.getH();\n\t\tVectorN rhat = r.unitVector();\n\t\tVectorN what = h.unitVector();\n\t\tVectorN s = what.crossProduct(rhat);\n\t\tVectorN shat = s.unitVector();\n\t\tMatrix out = new Matrix(3, 3);\n\t\tout.setColumn(0, rhat);\n\t\tout.setColumn(1, shat);\n\t\tout.setColumn(2, what);\n\t\treturn out;\n\t}",
"public float e()\r\n/* 20: */ {\r\n/* 21:167 */ return this.c;\r\n/* 22: */ }",
"@Override\n\tpublic double getEntry(int i, int j) throws OutOfBoundsException {\n\t\treturn 0;\n\t}",
"public Matrix getBasis() {\n\t\treturn eigenvectors;\n\t}",
"public double getX1SubReal() {\n this.polySubSolve();\n return this.x1resub;\n }",
"public NoKD getEsq() {\r\n return esq;\r\n }",
"Expression getIndexExpr();",
"@VisibleForTesting\n public final long e() {\n long b2 = this.f10064d.n().b();\n long j = b2 - this.f10062b;\n this.f10062b = b2;\n return j;\n }",
"public float[] getInverseA(\n int na, int ka, float[][] u, float[][] f, float[][] g)\n {\n Check.argument(-na<ka,\"-na<ka\");\n Check.argument(ka<=0,\"ka<=0\");\n\n //Set default weights (equal weight to all samples)\n if (_weights==false) {\n int nf = f.length;\n _w1D = fillfloat(1.0f,nf);\n }\n\n Stopwatch sw = new Stopwatch(); \n sw.start();\n DMatrix z = computeZ(na,ka,u,f,g);\n sw.stop();\n System.out.println(\"time = \"+sw.time());\n _z = z;\n \n float[] a = new float[na];\n DMatrixEvd evd = new DMatrixEvd(z);\n double[][][] eigvalvect = sort(evd.getD().get(), evd.getV().get());\n _eigval = eigvalvect[0];\n _eigvect = eigvalvect[1];\n //System.out.println(\"z\");\n //System.out.println(z.toString());//Smallest eigenvalue position (0,0) in D\n //System.out.println(\"V\");\n //System.out.println(evd.getV().toString());//Smallest eigenvalue position (0,0) in D\n //System.out.println(evd.getV().get(0,1));//Smallest eigenvalue position (0,0) in D\n //System.out.println(\"D\");\n //System.out.println(evd.getD().toString());//Smallest eigenvalue position (0,0) in D\n //System.out.println(evd.getD().get(0,0));\n //_eigval = evd.getD().get();//eigvalvect[0];\n //_eigvect = evd.getV().get();//eigvalvect[1];\n //dump(_eigval);\n\n for (int i=0; i<na; ++i) {\n a[i] = (float) _eigvect[i][0];\n }\n _a = a;\n\n return a;\n }",
"public double getX2AddSolution() {\n this.polyAddSolve();\n return this.x2add;\n }"
] | [
"0.63564605",
"0.61577547",
"0.60493976",
"0.60214764",
"0.5958768",
"0.59105253",
"0.58860564",
"0.58832365",
"0.58597904",
"0.5852878",
"0.5832397",
"0.5816536",
"0.574763",
"0.5710946",
"0.5705847",
"0.57019436",
"0.5687183",
"0.5678125",
"0.56774163",
"0.56774163",
"0.5665948",
"0.56308985",
"0.56237996",
"0.56156886",
"0.5614558",
"0.56112856",
"0.5604186",
"0.55720234",
"0.55579484",
"0.55564225",
"0.5553016",
"0.5552118",
"0.55451465",
"0.5527482",
"0.5513899",
"0.54960066",
"0.54757065",
"0.5473836",
"0.54690844",
"0.54681325",
"0.5467562",
"0.54627526",
"0.54472256",
"0.5442258",
"0.54379386",
"0.54362345",
"0.5430073",
"0.5426595",
"0.54240334",
"0.54144675",
"0.541236",
"0.5384522",
"0.53822494",
"0.5379444",
"0.53679436",
"0.5367401",
"0.5365453",
"0.53515506",
"0.53486145",
"0.5347177",
"0.53397346",
"0.5319474",
"0.53168476",
"0.5312954",
"0.5307076",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.5300077",
"0.52927613",
"0.5287469",
"0.5285911",
"0.5281168",
"0.5276895",
"0.5266646",
"0.5262038",
"0.52608424",
"0.5259186",
"0.5256125",
"0.52495533",
"0.52490556",
"0.52473783",
"0.5246691",
"0.5233482",
"0.52304167",
"0.52285355",
"0.5224539",
"0.5217159",
"0.5212795",
"0.52126086",
"0.52109766",
"0.520719",
"0.5198751",
"0.5190897",
"0.51890284"
] | 0.0 | -1 |
Computes alpha based on the average variance across data[.][k] | public static double methodOfMomentsSymmetric(double[][] data) {
Preconditions.checkNotNull(data);
Preconditions.checkArgument(data.length > 1);
final int K = data[0].length;
double[][] moments = moments(data, K);
double[] expectedX = moments[0];
double[] expectedXSquared = moments[1];
double[] var = new double[expectedX.length];
for (int k = 0; k < var.length; k++) {
var[k] = expectedXSquared[k] - expectedX[k] * expectedX[k];
}
// Try matching the mean variance first.
double alpha = matchVariance(K, DoubleArrays.sum(var) / var.length);
if (alpha <= 0.0) {
// If that fails, try the median
alpha = matchVariance(K, DoubleArrays.median(var, false) / var.length);
if (alpha <= 0.0) {
// If that fails, try the max (variance is now sorted after call to median)
alpha = matchVariance(K, var[var.length - 1]);
if (alpha <= 0.0) {
throw new IllegalArgumentException("Moment matching failed for provided dataset.");
}
}
}
return alpha;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void computeAlpha() {\n\t\t//Allocate memory for the alphas array\n\t\talpha = new double[training[0].length-1];\n\t\t\n\t\t//Checks every feature\n\t\tfor(int i = 0; i < training[0].length-1; i++) {\n\t\t\t//Sets the position of the array corresponding to itself to NaN and continues the loop\n\t\t\tif(i == node_id) {\n\t\t\t\talpha[i] = Double.NaN;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Allocate memory to keep track of the counts\n\t\t\tint[][][] Nijkc = new int[max_values[i]+1][max_values[node_id]+1][max_values[max_values.length-1]+1];\n\t\t\tint[][] Nikc = new int[max_values[node_id]+1][max_values[max_values.length-1]+1];\n\t\t\tint[][] Nijc = new int[max_values[i]+1][max_values[max_values.length-1]+1];\n\t\t\tint[] Nc = new int[max_values[max_values.length-1]+1];\n\t\t\tint N = training.length;\n\t\t\t\n\t\t\t//Counts the patterns found on the training dataset\n\t\t\tfor(int n = 0; n < training.length; n++) {\n\t\t\t\tNijkc[training[n][i]][training[n][node_id]][training[n][training[n].length-1]]++;\n\t\t\t\tNikc[training[n][node_id]][training[n][training[n].length-1]]++;\n\t\t\t\tNijc[training[n][i]][training[n][training[n].length-1]]++;\n\t\t\t\tNc[training[n][training[n].length-1]]++;\n\t\t\t}\n\t\t\t\n\t\t\t//Computes the values of the alpha for a given node(self)->node(target) using the MDL score\n\t\t\tdouble total = 0;\n\t\t\tfor(int j = 0; j < max_values[i] + 1; j++) {\n\t\t\t\tfor(int k = 0; k < max_values[node_id] + 1; k++) {\n\t\t\t\t\tfor(int l = 0; l < max_values[max_values.length-1] + 1; l++) {\n\t\t\t\t\t\tif(Nijkc[j][k][l] == 0 || Nikc[k][l] == 0 || Nijc[j][l] == 0) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\ttotal += ((double)Nijkc[j][k][l] / (double)N) * (Math.log(((double)Nijkc[j][k][l]*(double)Nc[l])/((double)Nikc[k][l]*(double)Nijc[j][l])) / Math.log(2));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\ttotal = total - ((((max_values[max_values.length-1]+1)*max_values[node_id]*max_values[i])/(2))*Math.log(N));\n\t\t\t\n\t\t\t//Attribution of the value to the corresponding position on the array\n\t\t\talpha[i] = total;\n\t\t}\n\t\t\n\t\t//System.out.println(Arrays.toString(alpha));\n\t}",
"private double computeSumAlpha()\n\t{\n\t\tdouble sum = 0;\n\t\tdouble[] a = svm.getAlphas();\n\t\tfor(double d : a)\n\t\t\tsum += Math.abs(d);\n\t\treturn sum;\n\t}",
"public double average(){\r\n\t\t//create variable to hold the values\r\n\t\tdouble average = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < this.data.length; i++){\r\n\t\t\t//add current index\r\n\t\t\taverage += this.data[i];\r\n\t\t\t}\r\n\t\treturn (average/this.data.length);\r\n\t}",
"public void sumAte()\r\n {\r\n meanArk = 0;\r\n varArk = 0;\r\n double sumA = 0;\r\n double sumA2 = 0;\r\n float nArk = 0;\r\n for (SignatureSample s:keys) {\r\n nArk++;\r\n sumA += s.arklen;\r\n sumA2 += s.arklen * s.arklen;\r\n }\r\n meanArk = sumA / nArk;\r\n varArk = Math.sqrt((sumA2/nArk) - (meanArk*meanArk));\r\n }",
"double average();",
"double computeMAE(int paraK) {\n\t\tdouble tempMae = 0;\n\t\tint tempTotalCount = 0;\n\t\t// Step 1. Predict the distribution\n\t\tfor (int i = 0; i < dataModel.uTeRateInds.length; i++) {\n\t\t\tfor (int j = 0; j < dataModel.uTeRateInds[i].length; j++) {\n\t\t\t\tint[] tempDistribution = predict(i, dataModel.uTeRateInds[i][j], paraK);\n\t\t\t\tif (tempDistribution == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t} // Of if\n\n\t\t\t\tdouble tempPrediction = 0;\n\t\t\t\tint tempCount = 0;\n\t\t\t\tfor (int k = 0; k < tempDistribution.length; k++) {\n\t\t\t\t\ttempPrediction += tempDistribution[k] * (k + 1);\n\t\t\t\t\ttempCount += tempDistribution[k];\n\t\t\t\t} // Of for k\n\t\t\t\ttempPrediction /= tempCount;\n\n\t\t\t\ttempMae += Math.abs(tempPrediction - dataModel.uTeRatings[i][j]);\n\t\t\t\ttempTotalCount++;\n\t\t\t} // of for\n\t\t} // of for i\n\n\t\tif (tempTotalCount > 1e-6) {\n\t\t\ttempMae /= tempTotalCount;\n\t\t} // of\n\n\t\treturn tempMae;\n\t}",
"public double varianceOfMean() {\n\t\treturn variance() * getWeight();\n\t}",
"static double average(double[] data){\n\n // Initializing total placeholder \n double total = 0;\n\n // Traversing data array and adding to total sum\n for (double d : data) {\n total += d;\n }\n\n // Computing average\n double average = (double) total / data.length;\n\n return average;\n }",
"public double getAlpha();",
"public double getAlpha();",
"@Override\n\tpublic int avg() {\n\t\treturn (this.sum()/3);\n\t}",
"public void average() {\n\t\tif (averaged)\n\t\t\tthrow new AssertionError(\"can't average twice!!\");\n\t\t\n\t\tscale = 1.0/(double)t;\n\t\t\n\t\tfor (int i = 0; i < w.length; i++)\n\t\t\tw[i] = (t+1.0)*w[i] - wupdates[i];\n\t\t\n\t\taveraged = true;\n\t\n\t}",
"public void average(){\n\t\tfor(PlayerWealthDataAccumulator w : _wealthData.values()){\n\t\t\tw.average();\n\t\t}\n\t}",
"public void findAvg()\n {\n for(int i = 0; i <= scores.length-1; i++)\n {\n for (int j = 0; j <= scores[0].length-1; j++)\n {\n total += scores[i][j];\n }\n }\n System.out.println(\"The class average test score is \" + \n total/24 + \".\");\n }",
"public double getAlpha() {\n return alpha;\n }",
"public double sampleVarianceOfMean() {\n\t\treturn sampleVariance() * getWeight();\n\t}",
"public void setAlpha(double alpha);",
"public void setNewAlpha(){\n\n\t\tretrieveAlpha();\n\t\tretrieveReducerOutput();\n\t\t\n\t\tdouble[] alphaVectorUpdate = new double[K];\n\t\tdouble[] alphaGradientVector = new double[K];\n\t\tdouble[] alphaHessianVector = new double[K];\n\n\t\tdouble[] alphaVector = oldAlpha.clone();\n\t\tdouble[] alphaSufficientStatistics = rDelta;\n\n\t\tint alphaUpdateIterationCount = 0;\n\n\t\t// update the alpha vector until converge\n\t\tboolean keepGoing = true;\n\t\ttry {\n\t\t\tint decay = 0;\n\n\t\t\tdouble alphaSum = 0;\n\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\talphaSum += alphaVector[j];\n\t\t\t}\n\n\t\t\twhile (keepGoing) {\n\t\t\t\tdouble sumG_H = 0;\n\t\t\t\tdouble sum1_H = 0;\n\n\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t// compute alphaGradient\n\t\t\t\t\talphaGradientVector[i] = D\n\t\t\t\t\t\t\t* (Gamma.digamma(alphaSum) - Gamma.digamma(alphaVector[i]))\n\t\t\t\t\t\t\t+ alphaSufficientStatistics[i];\n\n\t\t\t\t\t// compute alphaHessian\n\t\t\t\t\talphaHessianVector[i] = -D * Gamma.trigamma(alphaVector[i]);\n\n\t\t\t\t\tif (alphaGradientVector[i] == Double.POSITIVE_INFINITY\n\t\t\t\t\t\t\t|| alphaGradientVector[i] == Double.NEGATIVE_INFINITY) {\n\t\t\t\t\t\tthrow new ArithmeticException(\"Invalid ALPHA gradient matrix...\");\n\t\t\t\t\t}\n\n\t\t\t\t\tsumG_H += alphaGradientVector[i] / alphaHessianVector[i];\n\t\t\t\t\tsum1_H += 1 / alphaHessianVector[i];\n\t\t\t\t}\n\n\t\t\t\tdouble z = D * Gamma.trigamma(alphaSum);\n\t\t\t\tdouble c = sumG_H / (1 / z + sum1_H);\n\n\t\t\t\twhile (true) {\n\t\t\t\t\tboolean singularHessian = false;\n\n\t\t\t\t\tfor (int i = 0; i < K; i++) {\n\t\t\t\t\t\tdouble stepSize = Math.pow(Parameters.DEFAULT_ALPHA_UPDATE_DECAY_FACTOR, decay)\n\t\t\t\t\t\t\t\t* (alphaGradientVector[i] - c) / alphaHessianVector[i];\n\t\t\t\t\t\tif (alphaVector[i] <= stepSize) {\n\t\t\t\t\t\t\t// the current hessian matrix is singular\n\t\t\t\t\t\t\tsingularHessian = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\talphaVectorUpdate[i] = alphaVector[i] - stepSize;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (singularHessian) {\n\t\t\t\t\t\t// we need to further reduce the step size\n\t\t\t\t\t\tdecay++;\n\n\t\t\t\t\t\t// recover the old alpha vector\n\t\t\t\t\t\talphaVectorUpdate = alphaVector;\n\t\t\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// we have successfully update the alpha vector\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// compute the alpha sum and check for alpha converge\n\t\t\t\talphaSum = 0;\n\t\t\t\tkeepGoing = false;\n\t\t\t\tfor (int j = 0; j < K; j++) {\n\t\t\t\t\talphaSum += alphaVectorUpdate[j];\n\t\t\t\t\tif (Math.abs((alphaVectorUpdate[j] - alphaVector[j]) / alphaVector[j]) >= Parameters.DEFAULT_ALPHA_UPDATE_CONVERGE_THRESHOLD) {\n\t\t\t\t\t\tkeepGoing = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (alphaUpdateIterationCount >= Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_ITERATION) {\n\t\t\t\t\tkeepGoing = false;\n\t\t\t\t}\n\n\t\t\t\tif (decay > Parameters.DEFAULT_ALPHA_UPDATE_MAXIMUM_DECAY) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\talphaUpdateIterationCount++;\n\t\t\t\talphaVector = alphaVectorUpdate;\n\t\t\t}\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\tSystem.err.println(iae.getMessage());\n\t\t\tiae.printStackTrace();\n\t\t} catch (ArithmeticException ae) {\n\t\t\tSystem.err.println(ae.getMessage());\n\t\t\tae.printStackTrace();\n\t\t}\n\n\t\tnewAlpha = alphaVector;\n\n\n\t}",
"public double getAlpha()\n {\n return alpha;\n }",
"private float calculateAlpha() {\n float alpha = 1.2f*(myCamera.getViewportWidth()/(2*Const.WORLD_WIDTH-myCamera.getViewportWidth()))-0.2f;\n if(alpha < 0) alpha = 0;\n if(alpha > 1) alpha = 1;\n return alpha;\n }",
"void setAlpha(double alpha) {\n this.alpha = alpha;\n }",
"public static void avevar(final double[] data, final $double ave, final $double var) {\n double s, ep;\r\n int j, n = data.length;\r\n ave.$(0.0);\r\n for (j = 0; j < n; j++)\r\n ave.$(ave.$() + data[j]);\r\n ave.$(ave.$() / n);\r\n var.$(ep = 0.0);\r\n for (j = 0; j < n; j++) {\r\n s = data[j] - ave.$();\r\n ep += s;\r\n var.$(var.$() + (s * s));\r\n }\r\n var.$((var.$() - ep * ep / n) / (n - 1)); // Corrected two-pass\r\n // formula (14.1.8).\r\n }",
"public void alpha(int alpha);",
"public void setAlpha(double aAlpha);",
"double avg(){\n\t\tdouble sum = 0.0;\n\t\tfor(int i=0;i<num.length;i++)\n\t\t\tsum+=num[i].doubleValue();\n\t\treturn sum/num.length;\n\t}",
"private static double[][] moments(double[][] data, int K) {\n\t\tdouble[] expectedX = new double[K];\n\t\tdouble[] expectedXSquared = new double[K];\n\t\t\n\t\tfor (double[] theta : data) {\n\t\t\tif (theta.length != K) {\n\t\t\t\tthrow new IllegalArgumentException(\"Dimensions of data and alpha do not match!\");\n\t\t\t}\n\t\t\tfor (int k = 0; k < expectedX.length; k++) {\n\t\t\t\tdouble p = Math.exp(theta[k]);\n\t\t\t\texpectedX[k] += p;\n\t\t\t\texpectedXSquared[k] += p * p;\n\t\t\t}\n\t\t}\n\t\tDoubleArrays.divideToSelf(expectedX, data.length);\n\t\tDoubleArrays.divideToSelf(expectedXSquared, data.length);\n\t\treturn new double[][]{expectedX, expectedXSquared};\n\t}",
"double getAvgControl();",
"public DocumentVector divide(double alpha) {\n\t\tDocumentVector result = new DocumentVector(this.getAttCount(), 0);\n\t\tfor (int i = 0; i < this.getAttCount(); i++) {\n\t\t\tresult.setValue(i, this.getValueAsReal(i) / alpha);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private static double varianceVal(double[] arrayOfSamples, double mean){\n\t double v = 0;\n\t for(double i :arrayOfSamples)\n\t v += Math.pow((mean-i), 2);\n\t return v / arrayOfSamples.length;\n\t}",
"public double average(){\n double avg = 0;\n double sum = 0;\n for (T t : arr) {\n // sum += t.doubleValue();\n }\n\n return sum / arr.length;\n }",
"public static double getAlpha()\n\t{\n\t\treturn alpha;\n\t}",
"private double probCountVector(double[] alpha) {\n\t\tdouble result = 0.0;\n\t\tdouble sumCountVector = 0.0;\n\t\tdouble sumAlpha = 0;\n\t\tif(countVector.length != alpha.length) {\n\t\t\tthrow new RuntimeException(\"the length of count vector and alpha should be same\");\n\t\t}\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tsumCountVector += countVector[i];\n\t\t\tsumAlpha += alpha[i] * scale;\n\t\t}\n\t\tresult = GammaDistrib.lgamma(sumCountVector + 1) + GammaDistrib.lgamma(sumAlpha) - GammaDistrib.lgamma(sumCountVector + sumAlpha);\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tresult += GammaDistrib.lgamma(countVector[i] + alpha[i] * scale) - GammaDistrib.lgamma(countVector[i] + 1) - GammaDistrib.lgamma(alpha[i] * scale);\n\t\t}\n\t\treturn result;\n\t}",
"public final double getAlpha() {\n\t\treturn alpha;\n\t}",
"public double calcAvg() {\n\t\treturn (double)calcSum() / data.size();\n }",
"public void resample_alpha_ESS(boolean supervised, MapWrapper[][] xsub, double[][] dict, Gamma rngG,\n Random rand, Normal rngN, PoissonModel2_RegCoef beta_model,\n boolean verbose, long start) {\n if (!supervised) {\n resample_alpha(supervised, xsub, dict, rngG, rand, beta_model, verbose, start);\n }else{\n double alpha_verbose = 0;\n double[][] alpha_prior = new double[N][P];\n for (int i = 0; i < N; i++) {\n for (int p = 0; p < this.P; p++) {\n alpha_prior[i][p] = resample_alpha_laplace(i, p, xsub, dict, rngG, rand);\n }\n }\n // elliptical slice sampling\n double[][] alpha_new = beta_model.ElipticalSliceSamplerJoint(rand, rngN, alpha_prior, this.alpha, start,\n verbose);\n// System.out.println(Arrays.toString(alpha_prior[0]));\n// System.out.println(Arrays.toString(alpha[0]));\n// System.out.println(Arrays.toString(alpha_new[0]));\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int p = 0; p < this.P; p++) {\n // todo: this truncation step does change the likelihood space, danger??\n if(alpha_new[i][p] < 0) count++;\n this.alpha[i][p] = Math.max(alpha_new[i][p], 0);\n }\n }\n if (verbose) {\n System.out.print(\"finish alpha: \");\n System.out.printf(\"%.2fmin, Mean %.2f\\n\", (double) (System.currentTimeMillis() - start) / 1000 / 60,\n (alpha_verbose + 0.0) / (P * N + 0.0));\n }\n }\n }",
"double getAlpha() {\n return alpha;\n }",
"float getAlpha();",
"public double getAverage(){\n double total = 0;\n for(double s : scores)total += s;\n return total/scores.length;\n }",
"public void getAvg()\n {\n this.avg = sum/intData.length;\n }",
"@Override\n public Double average() {\n return (sum() / (double) count());\n }",
"@Override\n public double findAverage() {\n double average = 0;\n for (Student key : map.keySet()) {\n average += map.get(key).getValue();\n }\n average /= map.keySet().size();\n return average;\n }",
"public float getAlpha() {\n \t\treturn alpha;\n\t}",
"public MeanVar(double[] data) {\n\t\tfor (int i = 0; i < data.length; i++)\n\t\t\taddValue(data[i]);\n\t}",
"public void setAlphaFactor(double a) {\r\n\t\t_alphaFactor = a;\r\n\t}",
"public float getAlpha();",
"public float getAlpha();",
"double average() { // used double b/c I want decimal places\n\t\tint sum = 0;\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tsum = sum + array[i];\n\t\t}\n\t\tdouble average = (double) sum / array.length;\n\t\treturn average;\n\n\t}",
"public double getAverage(){\n return getTotal()/array.length;\n }",
"double getAvgTreatment();",
"public Double computeAverage(){\n\t\tdouble total = 0; //double used to keep total value of elements in arr to determine average\n\t\t\n\t\tfor(int i = 0; i < arr.length; i++)//loop through array and add the total\n\t\t{\n\t\t\ttotal += arr[i].doubleValue(); //add current value of element in arr to total's value\n\t\t}\n\t\t\n\t\tDouble result = total/arr.length; //returns the average as a Double\n\t\t\n\t\treturn result;\n\t}",
"double [] calcGamma(){\n\t\t\tgamma = new double [N];\n\t\t\tdouble [] gammaParam = new double [noLiveSites];\n\t\t\tint liveSite = 0;\n\t\t\tfor (int i = 0; i < N; i ++){\n\t\t\t\tgamma[i] = 1.0;\n\t\t\t\tif(aliveLattice[i]){\n\t\t\t\t\tdouble phi_i = 1.0 - fracDeadNbors[i];\n\t\t\t\t\tgammaParam[liveSite] = 1-phi_i*(1-alpha[i]);\n\t\t\t\t\tgamma[i] = gammaParam[liveSite];\n\t\t\t\t\tliveSite += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tdouble ave = MathTools.mean(gammaParam);\n\t\t\tdouble var = MathTools.variance(gammaParam);\n\t\t\tdouble [] ret = new double [2];\n\t\t\tret[0] = ave;\n\t\t\tret[1] = var;\n\t\t\treturn ret;\n\t\t}",
"public void setAlpha(float alpha) {\n\t\tthis.alpha = alpha;\n\t}",
"@Override\n\tpublic double avg() {\n\t\treturn total()/4.0;\n\t}",
"public int average()\n {\n int average = 0;\n int sum = 0;\n\n for ( int index = 0; index < data.length; index++ )\n {\n sum = sum + data[index];\n }\n average = sum / data.length;\n\n return average;\n }",
"public double averageVolume() {\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n return totalVolume() / numberOfIcosahedrons();\n }\n }",
"private double calcAverage(int startIndex, int endIndex) {\n\t\t\n\t\t// total for the scores\n\t\tdouble total = 0;\n\t\t\n\t\t// loop between indexes and add the scores\n\t\tfor (int i = startIndex; i < endIndex; i++) \n\t\t\ttotal += scores.get(i);\n\t\t\n\t\t// return the average\n\t\treturn total / (endIndex - startIndex);\n\t}",
"private static Vector3f average(Vector3f a, Vector3f b) {\r\n\t\treturn new Vector3f(a.x + (b.x - a.x) / 2, a.y + (b.y - a.y) / 2, a.z + (b.z - a.z) / 2);\r\n\t}",
"public void calcAvg(){\n\t\taverage = hits/atbat;\n\t\t\n\t}",
"public double averageFeaturesPerExample(){\n\t\treturn sumFeatureValues/((double)exampleCount);\n\t}",
"public double findmaxavg(int[] nums, int k){\r\n\t\tdouble res = Integer.MIN_VALUE;\r\n\t\tfor (int s = 0; s < nums.length -k + 1; s++) {\r\n\t\t\tdouble sum = 0;\r\n\t\t\tfor (int i = 0; i < k; i++) {\r\n\t\t\t\tsum+=nums[i+s];\r\n\t\t\t}\r\n\t\t\tres = Math.max(res, sum/k);\r\n\t\t}\r\n\t\treturn res;\t\t\r\n\t//Time complexity : O(n*k). \r\n\t//Space complexity : O(1).\r\n\t\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public double average() {\n return average(0.0);\n }",
"public double mean() {\n return StdStats.mean(stats);\r\n }",
"public static double getAveg(int[] scores) {\r\n\t\r\n\t\tint sum = 0;\r\n\t\tfor (int i = 0; i < scores.length; ++i) {\r\n\t\t\tsum += scores[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn ((double)(sum))/(scores.length);\r\n\t\r\n\t}",
"private INDArray computeVectorAverage(List<float[]> embeddingsList)\r\n {\r\n INDArray sum = Nd4j.zeros(embeddingsList.get(0).length);\r\n\r\n for (float[] vec : embeddingsList) {\r\n INDArray nd = Nd4j.create(vec);\r\n sum = sum.add(nd);\r\n }\r\n sum = sum.div(embeddingsList.size());\r\n return sum;\r\n }",
"public double variance(double m)\n {\n double var = 0.0;\n \n for(int t = 0; t<size; t++)\n {\n double dev = x[t] - m;\n var += dev*dev;\n }\n return var/size;\n }",
"public double averageSurfaceToVolumeRatio() {\n int index = 0;\n double total = 0.0;\n if (numberOfIcosahedrons() == 0) {\n return 0;\n }\n else {\n while (index < icosList.size()) {\n total += icosList.get(index).surfaceToVolumeRatio();\n index++;\n }\n }\n return total / icosList.size();\n }",
"public void setAlpha(int alpha)\n {\n \tthis.alpha=alpha; \n }",
"public double getAverage(){\n int total = 0; //inicializa o total\n \n //soma notas de um aluno\n for(int grade: grades){\n total += grade;\n }\n \n return (double) total/grades.length;\n }",
"private void updateMuVariance() {\n\t\tmu = train.getLocalMean(); \n\t\tsigma = train.getLocalVariance(); \n\t\t\n\t\t/*\n\t\t * If the ratio of data variance between dimensions is too small, it \n\t\t * will cause numerical errors. To address this, we artificially boost\n\t\t * the variance by epsilon, a small fraction of the standard deviation\n\t\t * of the largest dimension. \n\t\t * */\n\t\tupdateEpsilon(); \n\t\tsigma = MathUtils.add(sigma, epsilon); \n\t\t\n\t}",
"int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }",
"public static void methodOfMoments(double[][] data, double[] alpha) {\n\t\tPreconditions.checkNotNull(data);\n\t\tPreconditions.checkNotNull(alpha);\n\n\t\tif (data.length == 1) {\n\t\t\tSystem.arraycopy(data[0], 0, alpha, 0, alpha.length);\n\t\t\tDoubleArrays.expToSelf(alpha);\n\t\t\treturn;\n\t\t}\n\t\n\t\tdouble[][] moments = moments(data, alpha.length);\n\t\tdouble[] expectedX = moments[0];\n\t\tdouble[] expectedXSquared = moments[1];\n\t\t\n\t\t// TODO : optimize\n\t\tfor (int k = 0; k < expectedX.length; k++) {\n\t\t\talpha[k] = expectedX[k] * (expectedX[0] - expectedXSquared[0]) / \n\t\t\t\t\t(expectedXSquared[0] - expectedX[0] * expectedX[0]); \n\t\t}\n\t}",
"public void finalCompute(int dataCnt)\n\t{\n\t\tIterator<Integer> numericKeySetIter = m_numericValueList.keySet().iterator();\n\t\twhile(numericKeySetIter.hasNext())\n\t\t{\n\t\t\tint key = numericKeySetIter.next();\n\t\t\t\n\t\t\tPDF_Features value = m_numericValueList.get(key);\n\t\t\tvalue.average = value.sum / (double)dataCnt;\n\t\t\tvalue.variance = (value.squareSum/(double)dataCnt) - Math.pow(value.average,2);\n\t\t\t\n//\t\t\tif(value.variance == 0) value.variance = value.average / baseVarianceParameter;\n//\t\t\tif(value.variance == 0) value.variance = 1;\n\t\t\t\n\t\t\tm_numericValueList.put(key, value);\n\n\t\t}\n\t\t\n\t\tIterator<Integer> nominalKeySetIter = m_nominalValueList.keySet().iterator();\n\t\twhile(nominalKeySetIter.hasNext())\n\t\t{\n\t\t\tint key = nominalKeySetIter.next();\t\t\t\n\t\t\tHashMap<String, Double> valueMap = m_nominalValueList.get(key);\n\t\t\t\n\t\t\tIterator<String> valueKeyIter = valueMap.keySet().iterator();\n\t\t\twhile(valueKeyIter.hasNext())\n\t\t\t{\n\t\t\t\tString valueKey = valueKeyIter.next();\n\t\t\t\tvalueMap.put(valueKey, valueMap.get(valueKey) / (double)dataCnt);\n\t\t\t}\n\t\t\t\n\t\t\tm_nominalValueList.put(key, valueMap);\n\t\t}\n\t}",
"private static double evaluate_dev(int count, int t) {\n double[][] tmp_featweights = new double[Features.num_feat][600000];\n double[][] tmp_best_avg_featVal = new double[Features.num_feat][600000];\n double[][] tmp_sum_featVal = new double[Features.num_feat][600000];\n double[][] tmp_changes_featVal = new double[Features.num_feat][600000];\n for (int ii = 0; ii < Features.num_feat; ii++) {\n tmp_featweights[ii] = Arrays.copyOf(Features.featweights[ii], Features.featweights[ii].length);\n tmp_best_avg_featVal[ii] = Arrays.copyOf(Features.best_avg_featVal[ii], Features.best_avg_featVal[ii].length);\n tmp_sum_featVal[ii] = Arrays.copyOf(Features.sum_featVal[ii], Features.sum_featVal[ii].length);\n tmp_changes_featVal[ii] = Arrays.copyOf(Features.changes_featVal[ii], Features.changes_featVal[ii].length);\n }\n double[][] tmp_a = new double[Features.m][Features.m];\n double[][] tmp_best_avg_a = new double[Features.m][Features.m];\n double[][] tmp_sum_a = new double[Features.m][Features.m];\n double[][] tmp_changes_a = new double[Features.m][Features.m];\n for (int ii = 0; ii < Features.m; ii++) {\n tmp_a[ii] = Arrays.copyOf(Features.a[ii], Features.a[ii].length);\n tmp_best_avg_a[ii] = Arrays.copyOf(Features.best_avg_a[ii], Features.best_avg_a[ii].length);\n tmp_sum_a[ii] = Arrays.copyOf(Features.sum_a[ii], Features.sum_a[ii].length);\n tmp_changes_a[ii] = Arrays.copyOf(Features.changes_a[ii], Features.changes_a[ii].length);\n }\n // final average\n Features.final_average(count);\n try {\n BufferedReader test_file = new BufferedReader(new FileReader(dev_file));\n String sentence = \"\";\n String line = null;\n while ((line=test_file.readLine()) != null) {\n if (line.isEmpty()) {\n Features.viterbi(\"<s> \"+sentence.substring(0,sentence.length()-1)+\" </s>\", true, mdl_path+\"/dev_output_\"+ (t+1), avg_flag);\n sentence = \"\";\n } else {\n sentence += line.substring(0,line.indexOf(\"\\t\")) + \" \";\n }\n }\n test_file.close();\n }\n catch(Exception ex){\n ex.printStackTrace();\n }\n double dev_acc = tagging_accuracy(dev_file, mdl_path+\"/dev_output_\"+ (t+1));\n if (dev_acc > best_acc_so_far) {\n Features.bestiter_a = Features.a;\n Features.bestiter_featweights = Features.featweights;\n Features.bestiter_avg_a = Features.best_avg_a;\n Features.bestiter_avg_featVal = Features.best_avg_featVal;\n }\n // restore before evaluation values\n Features.featweights = tmp_featweights;\n Features.best_avg_featVal = tmp_best_avg_featVal;\n Features.sum_featVal = tmp_sum_featVal;\n Features.changes_featVal = tmp_changes_featVal;\n Features.a = tmp_a;\n Features.best_avg_a = tmp_best_avg_a;\n Features.sum_a = tmp_sum_a;\n Features.changes_a = tmp_changes_a;\n return dev_acc;\n }",
"public void setAlpha(float alpha);",
"public void SetLearnRate (double alpha) { this.alpha = alpha; }",
"public double mean()\n {\n double sum = 0.0;\n for(int t = 0; t<size; t++)\n sum += x[t];\n return sum/size;\n }",
"public TimeDecayingAverage(double phi, double average) {\n setPhi(phi);\n this.average = average;\n }",
"public double averageOfArray() {\n double sum = 0;\n double average = 0;\n int i;\n for (i = 0; i < sirDeLa1La100.length; i++) {\n sum = sum + sirDeLa1La100[i];\n }\n average = sum / sirDeLa1La100.length;\n return average;\n }",
"public static void setAlpha(double alp)\n\t{\n\t\talpha = alp;\t\n\t}",
"public final EObject ruleAverageFunction() throws RecognitionException {\r\n EObject current = null;\r\n\r\n Token otherlv_1=null;\r\n Token otherlv_3=null;\r\n Token otherlv_5=null;\r\n EObject lv_operator_0_0 = null;\r\n\r\n EObject lv_values_2_0 = null;\r\n\r\n EObject lv_values_4_0 = null;\r\n\r\n\r\n enterRule(); \r\n \r\n try {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3268:28: ( ( ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:1: ( ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:1: ( ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')' )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:2: ( (lv_operator_0_0= ruleAvgOperator ) ) otherlv_1= '(' ( (lv_values_2_0= ruleNumberExpression ) ) (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )* otherlv_5= ')'\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3269:2: ( (lv_operator_0_0= ruleAvgOperator ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3270:1: (lv_operator_0_0= ruleAvgOperator )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3270:1: (lv_operator_0_0= ruleAvgOperator )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3271:3: lv_operator_0_0= ruleAvgOperator\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getAverageFunctionAccess().getOperatorAvgOperatorParserRuleCall_0_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleAvgOperator_in_ruleAverageFunction7000);\r\n lv_operator_0_0=ruleAvgOperator();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getAverageFunctionRule());\r\n \t }\r\n \t\tset(\r\n \t\t\tcurrent, \r\n \t\t\t\"operator\",\r\n \t\tlv_operator_0_0, \r\n \t\t\"AvgOperator\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n otherlv_1=(Token)match(input,43,FOLLOW_43_in_ruleAverageFunction7012); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_1, grammarAccess.getAverageFunctionAccess().getLeftParenthesisKeyword_1());\r\n \r\n }\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3291:1: ( (lv_values_2_0= ruleNumberExpression ) )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3292:1: (lv_values_2_0= ruleNumberExpression )\r\n {\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3292:1: (lv_values_2_0= ruleNumberExpression )\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3293:3: lv_values_2_0= ruleNumberExpression\r\n {\r\n if ( state.backtracking==0 ) {\r\n \r\n \t newCompositeNode(grammarAccess.getAverageFunctionAccess().getValuesNumberExpressionParserRuleCall_2_0()); \r\n \t \r\n }\r\n pushFollow(FOLLOW_ruleNumberExpression_in_ruleAverageFunction7033);\r\n lv_values_2_0=ruleNumberExpression();\r\n\r\n state._fsp--;\r\n if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \t if (current==null) {\r\n \t current = createModelElementForParent(grammarAccess.getAverageFunctionRule());\r\n \t }\r\n \t\tadd(\r\n \t\t\tcurrent, \r\n \t\t\t\"values\",\r\n \t\tlv_values_2_0, \r\n \t\t\"NumberExpression\");\r\n \t afterParserOrEnumRuleCall();\r\n \t \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3309:2: (otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) ) )*\r\n loop44:\r\n do {\r\n int alt44=2;\r\n int LA44_0 = input.LA(1);\r\n\r\n if ( (LA44_0==20) ) {\r\n alt44=1;\r\n }\r\n\r\n\r\n switch (alt44) {\r\n \tcase 1 :\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3309:4: otherlv_3= ',' ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t {\r\n \t otherlv_3=(Token)match(input,20,FOLLOW_20_in_ruleAverageFunction7046); if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \tnewLeafNode(otherlv_3, grammarAccess.getAverageFunctionAccess().getCommaKeyword_3_0());\r\n \t \r\n \t }\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3313:1: ( (lv_values_4_0= ruleNumberExpression ) )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3314:1: (lv_values_4_0= ruleNumberExpression )\r\n \t {\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3314:1: (lv_values_4_0= ruleNumberExpression )\r\n \t // ../eu.artist.postmigration.nfrvt.lang.gml/src-gen/eu/artist/postmigration/nfrvt/lang/gml/parser/antlr/internal/InternalGML.g:3315:3: lv_values_4_0= ruleNumberExpression\r\n \t {\r\n \t if ( state.backtracking==0 ) {\r\n \t \r\n \t \t newCompositeNode(grammarAccess.getAverageFunctionAccess().getValuesNumberExpressionParserRuleCall_3_1_0()); \r\n \t \t \r\n \t }\r\n \t pushFollow(FOLLOW_ruleNumberExpression_in_ruleAverageFunction7067);\r\n \t lv_values_4_0=ruleNumberExpression();\r\n\r\n \t state._fsp--;\r\n \t if (state.failed) return current;\r\n \t if ( state.backtracking==0 ) {\r\n\r\n \t \t if (current==null) {\r\n \t \t current = createModelElementForParent(grammarAccess.getAverageFunctionRule());\r\n \t \t }\r\n \t \t\tadd(\r\n \t \t\t\tcurrent, \r\n \t \t\t\t\"values\",\r\n \t \t\tlv_values_4_0, \r\n \t \t\t\"NumberExpression\");\r\n \t \t afterParserOrEnumRuleCall();\r\n \t \t \r\n \t }\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n\r\n\r\n \t }\r\n \t break;\r\n\r\n \tdefault :\r\n \t break loop44;\r\n }\r\n } while (true);\r\n\r\n otherlv_5=(Token)match(input,44,FOLLOW_44_in_ruleAverageFunction7081); if (state.failed) return current;\r\n if ( state.backtracking==0 ) {\r\n\r\n \tnewLeafNode(otherlv_5, grammarAccess.getAverageFunctionAccess().getRightParenthesisKeyword_4());\r\n \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n leaveRule(); \r\n }\r\n }\r\n \r\n catch (RecognitionException re) { \r\n recover(input,re); \r\n appendSkippedTokens();\r\n } \r\n finally {\r\n }\r\n return current;\r\n }",
"public int average() {\n int total = 0;\n\n for (int score : scores) {\n total += score;\n }\n\n return total / scores.length;\n }",
"public static BufferedImage average(BufferedImage image, int value) {\n //3-position array where we store R,G,B values of every pixel\n int[] colors;\n //3-position array where we will store the mean value of every pixel of every channel\n int[] meanColor = new int[3];\n //mean values for every channel\n double meanRed, meanGreen, meanBlue;\n //Create a tessela form the original image so we can modify its pixels\n WritableRaster bitmap = (WritableRaster) image.getData();\n WritableRaster tesela = bitmap.createWritableChild(image.getMinX(), image.getMinY(), image.getWidth(), image.getHeight(), 0,0, null);\n //Image iteration\n for (int x = 0; x < image.getWidth()-1; x++){\n for (int y = 0; y < image.getHeight()-1; y++) {\n int red = 0, green=0, blue = 0;\n //Window iteration\n for (int f =-value; f <= value; f++) {\n for (int k = -value; k <= value; k++) {\n //Get every window coordinate, but first check if they actually exist (not out of bounds)\n if (y+(f)>=0 && x+(k)>=0 && y+(f) < image.getHeight() && x+(k)<image.getWidth()) {\n //Temporal store of the value of every channel so then we can compute the mean\n colors = getPixelColor(image,x+k,y+f);\n red += colors[0];\n green += colors[1];\n blue += colors[2];\n }\n }\n }\n //To compute the mean of every color we have to compute the 'distance'+1\n int distance = (value - (-value)+1)*(value - (-value)+1);\n //For every channel, compute the new pixel value\n meanRed = red / distance;\n meanColor[0] = (int) meanRed; \n meanGreen = green / distance;\n meanColor[1] = (int) meanGreen;\n meanBlue = blue / distance;\n meanColor[2] = (int) meanBlue;\n bitmap.setPixel(x,y,meanColor);\n }\n }\n //Create the averaged image and return it\n BufferedImage subImage = new BufferedImage(image.getColorModel(),tesela,image.isAlphaPremultiplied(),null);\n return subImage;\n }",
"private void zScoreNormalize(List<Double> data)\n\t{\n\t\tdouble mean=Statistics.mean(data);\n\t\tdouble sd=Statistics.sd(data);\n\t\tfor(int i=0; i!= data.size(); ++i)\n\t\t{\n\t\t\tdata.set(i, (data.get(i)-mean)/sd);\n\t\t}\n\n\t}",
"protected void calcAlpha(Sequence seq)\n {\n int T = seq.length();\n int nStates = getNumStates();\n alpha = Library.allocMatrixDouble(T, nStates, Library.LOG_ZERO);\n calcB(seq);\n\n // we can start anywhere, according to the prior probs\n for(int i = 0; i < nStates; i++)\n alpha[0][i] = piStart[i] + bmat[i][0];\n\n // fill in the alpha matrix\n for(int t = 1; t < T; t++){\n // calc j -> i\n for(int i = 0; i < nStates; i++){\n for(int j = 0; j < nStates; j++)\n alpha[t][i] = Library.logadd(alpha[t][i], alpha[t - 1][j] + tran[j][i]);\n alpha[t][i] += bmat[i][t];\n }\n }\n }",
"public double variance()\n {\n return variance(mean());\n }",
"public float getAverage(){\r\n\t\treturn Average;\r\n\t}",
"public static void calculateAvg(double[] avgPArr, int itemNum) {\n\n for (int i = 0; i < avgPArr.length; i++)\n avgPArr[i] /= itemNum;\n\n }",
"public double variance() {\n final double average = average();\n final int size = size();\n\n int cnt = 0;\n double rval = 0;\n\n // Compute the variance\n for (int i = 0; i < size; i++) {\n final Number number = get(i);\n if (number == null) continue;\n if (Double.isNaN(number.doubleValue())) continue;\n\n rval += (average - number.doubleValue()) * (average - number.doubleValue());\n cnt++;\n }\n\n // If we haven't had any element, return 0\n if (cnt == 0) return 0;\n\n return rval / cnt;\n }",
"void changeMean(double a) {\n mean = mean + (buffer - mean) * a;\n }",
"public double mean(double data[]) {\r\n\t\tdouble mean = 0;\r\n\t\ttry {\r\n\t\t\tfor(int i=0;i<data.length;i++) {\r\n\t\t\t\tmean =mean+data[i];\r\n\t\t\t}\r\n\t\t\tmean = mean / data.length;\r\n\t\t}\r\n\t\tcatch(Exception e) {\r\n\t\t\tDataMaster.logger.warning(e.toString());\r\n\t\t\t//e.printStackTrace();\r\n\t\t}\r\n\t\treturn mean;\r\n\t}",
"public double getAverage()\n {\n return getSum() / 2.0;\n }",
"public double arithmeticalMean(double[] arr) {\n return 0;\n }",
"public static int average(int[]data){\n \n int sum = 0;\n int n = 0;\n for(int i = 0; i < data.length-1; i++) {\n \n n++;\n sum += data[i];\n }\n\n return sum/n;\n }",
"private double[] varianceArray(){\n\t\tdouble[] varianceVals = new double[values.length];\n\t\tfor(int i = 0; i < values.length; i++){\n\t\t\tvarianceVals[i] = Math.pow(values[i] - mean , 2.0);\n\t\t}\n\t\treturn varianceVals;\n\t}",
"private void updateVariance() {\r\n double variance = 0.0;\r\n updateMean();\r\n for (Tweet t : members) {\r\n variance += ((t.getDateLong() - this.mean) * (t.getDateLong() - this.mean));\r\n }\r\n variance /= members.size();\r\n this.variance = variance;\r\n }",
"public static double average (double ... numbers)\r\n\t{",
"public float calcAverage(){\n if(totalReviews > 0)\n return (float) (totalScore*1.0/totalReviews);\n else return 0;\n }",
"@Override\n\t\t\tpublic void setAlpha(int alpha) {\n\t\t\t\t\n\t\t\t}",
"public double[] getAverages() {\n\t\t\n\t\t// initialize array\n\t\taverages = new double[5];\n\t\t\n\t\t// used with calcAverage for the startIndex\n\t\tint curIndex = 0;\n\t\taverages[ASSIGNMENTS] = calcAverage(curIndex, curIndex += NUM_ASSIGNMENTS);\n\t\taverages[QUIZZES] = calcAverage(curIndex, curIndex += NUM_QUIZZES);\n\t\taverages[TESTS] = calcAverage(curIndex, curIndex += NUM_TESTS);\n\t\taverages[FINAL] = calcAverage(curIndex, curIndex + 1);\n\t\t\n\t\t// get the overall average\n\t\tdouble quizTestAverage = (averages[QUIZZES] + averages[TESTS]) * PERCENT_QUIZ_AND_TESTS / 2;\n\t\tdouble assignmentAverage = averages[ASSIGNMENTS] * PERCENT_ASSIGNMENTS;\n\t\tdouble finalAverage = averages[FINAL] * PERCENT_FINAL;\n\t\taverages[OVERALL] = quizTestAverage + assignmentAverage + finalAverage;\n\t\t\n\t\t// return the array\n\t\treturn averages;\n\t}",
"public double averageTestScore() {\n double average; // Initialize the variable for the average.\n int sum = 0; // Sum of array.\n \n // Sum all the test scores in the array.\n for (int i = 0; i < testScores.length; i++) {\n if (testScores[i] < 0 || testScores[i] > 100) {\n throw new IllegalArgumentException(\"One of your test scores\" + \n \" is negative or greater than 100!\");\n }\n sum = sum + testScores[i];\n }\n \n // Calculate the average.\n average = sum / testScores.length;\n \n // Return the average.\n return average; \n }",
"private void initializeAndTrainModel(float alpha) {\n\n double forecast;\n double lastValue = actual[0];\n double[][] trainMatrix = new double[trainPoints][2];\n double[][] valMatrix = new double[validationPoints][2];\n\n for (int i = 1; i < trainPoints; i++) {\n forecast = lastValue;\n\n trainMatrix[i][0] = actual[i];\n trainMatrix[i][1] = forecast;\n lastValue = (alpha * actual[i]) + ((1 - alpha) * lastValue);\n }\n\n for (int t = 1; t <= validationPoints; t++) {\n valMatrix[t - 1][1] = lastValue;\n valMatrix[t - 1][0] = actual[trainPoints + t - 1];\n }\n\n\n double biasness = BiasnessHandler.handle(valMatrix);\n AccuracyIndicators AI = new AccuracyIndicators();\n ModelUtil.computeAccuracyIndicators(AI, trainMatrix, valMatrix, dof);\n AI.setBias(biasness);\n if (min_val_error >= AI.getMAPE()) {\n min_val_error = AI.getMAPE();\n optAlpha = alpha;\n accuracyIndicators = AI;\n }\n }"
] | [
"0.6476125",
"0.62517875",
"0.56647503",
"0.5656607",
"0.56339854",
"0.55692345",
"0.5566785",
"0.5522302",
"0.5488126",
"0.5488126",
"0.54590595",
"0.5439276",
"0.5399344",
"0.5388012",
"0.5344017",
"0.5337565",
"0.5329398",
"0.53078693",
"0.5305275",
"0.5301943",
"0.5300768",
"0.52646774",
"0.52545774",
"0.52477884",
"0.5244489",
"0.52424955",
"0.5238108",
"0.5226114",
"0.5219269",
"0.52084416",
"0.5200356",
"0.5166555",
"0.51628304",
"0.5153638",
"0.5135737",
"0.5131333",
"0.51308554",
"0.5129814",
"0.5111145",
"0.5098034",
"0.50932497",
"0.5078783",
"0.50775236",
"0.50528955",
"0.50357836",
"0.50357836",
"0.50273556",
"0.5024916",
"0.50174004",
"0.5002964",
"0.49944505",
"0.4992212",
"0.49658436",
"0.4943035",
"0.49201697",
"0.49105576",
"0.49095443",
"0.49048528",
"0.4890801",
"0.48856255",
"0.48803538",
"0.48742455",
"0.48713472",
"0.4861435",
"0.48574176",
"0.4851611",
"0.48508286",
"0.4849415",
"0.48314452",
"0.48228163",
"0.48181343",
"0.48178378",
"0.4815852",
"0.48142096",
"0.48035327",
"0.47969216",
"0.4789958",
"0.47829434",
"0.47784236",
"0.47750273",
"0.4773698",
"0.47676393",
"0.4765554",
"0.47615606",
"0.47607318",
"0.47574303",
"0.47551858",
"0.47532597",
"0.47494516",
"0.4746077",
"0.47329518",
"0.47308558",
"0.47278544",
"0.47235087",
"0.4721048",
"0.47201937",
"0.4710628",
"0.47087112",
"0.4700044",
"0.46976718",
"0.46936184"
] | 0.0 | -1 |
Returns the log of a sample from the specified Dirichlet distribution. Similar to calling: double[] theta = sample(alpha, rnd); DoubleArrays.logToSelf(theta); EXCEPT that precision is better preserved. | public static double[] logSample(double[] alpha, RandomGenerator rnd) {
double[] theta = GammaDistribution.sample(alpha, rnd);
DoubleArrays.logToSelf(theta);
DoubleArrays.logNormalizeToSelf(theta);
return theta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double[] logSample(RealVector alpha, RandomGenerator rnd) {\n\t\tdouble[] theta = GammaDistribution.sample(alpha, rnd);\n\t\tDoubleArrays.logToSelf(theta);\n\t\tDoubleArrays.logNormalizeToSelf(theta);\n\t\treturn theta;\n\t}",
"public static void logSampleToSelf(double[] alpha, RandomGenerator rnd) {\n\t\tGammaDistribution.sampleToSelf(alpha, rnd);\n\t\tDoubleArrays.logToSelf(alpha);\n\t\tDoubleArrays.logNormalizeToSelf(alpha);\n\t}",
"public float nextLog ()\n {\n // Generate a non-zero uniformly-distributed random value.\n float u;\n while ((u = GENERATOR.nextFloat ()) == 0)\n {\n // try again if 0\n }\n\n return (float) (-m_fMean * Math.log (u));\n }",
"public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }",
"@Test\n public void testLogP() {\n System.out.println(\"logP\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(Math.log(0.027), instance.logp(0), 1E-7);\n assertEquals(Math.log(0.0567), instance.logp(1), 1E-7);\n assertEquals(Math.log(0.07938), instance.logp(2), 1E-7);\n assertEquals(Math.log(0.09261), instance.logp(3), 1E-7);\n assertEquals(Math.log(0.05033709), instance.logp(10), 1E-7);\n }",
"public static double sample(double a, double b, Random random) {\n assert (b > 0.0);\n return a - b * Math.log(random.nextDouble());\n }",
"public static double doubleSample() {\n return random_.nextDouble();\n }",
"public double getTimestamp() {\n switch (randomType) {\n case EXPONENT:\n return forArrive ? (-1d / LAMBDA) * Math.log(Math.random()) : (-1d / NU) * Math.log(Math.random());\n\n default:\n return 0;\n }\n }",
"public static double sample_value(double lambda) {\n return -Math.log(Util.random()) / lambda;\n }",
"@SuppressWarnings(\"deprecation\")\n\t@Override\n public double calculateLogP() {\n logP = 0.0;\n // jeffreys Prior!\n if (jeffreys) {\n logP += -Math.log(getChainValue(0));\n }\n for (int i = 1; i < chainParameter.getDimension(); i++) {\n final double mean = getChainValue(i - 1);\n final double x = getChainValue(i);\n\n if (useLogNormal) {\n\t final double sigma = 1.0 / shape; // shape = precision\n\t // convert mean to log space\n\t final double M = Math.log(mean) - (0.5 * sigma * sigma);\n\t logNormal.setMeanAndStdDev(M, sigma);\n\t logP += logNormal.logDensity(x);\n } else {\n final double scale = mean / shape;\n gamma.setBeta(scale);\n logP += gamma.logDensity(x);\n }\n }\n return logP;\n }",
"private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}",
"double sample();",
"public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}",
"public List<Float> randomLikelihood() {\n\t\tList<Float> likelihood = new ArrayList<Float>();\n\t\tlikelihood.add((float) getRandomInteger(-200, 0));\n\t\treturn(likelihood);\n\t}",
"public static double rand() {\n return (new Random()).nextDouble();\n }",
"public double logZero(double x);",
"public double log(double d){\r\n\r\n\t\tif(d == 0){\r\n\t\t\treturn 0.0;\r\n\t\t} else {\r\n\t\t\treturn Math.log(d)/Math.log(2);\r\n\t\t}\r\n\r\n\t}",
"public static double[][] logarit(double[][] data, double base) {\n\t\tdouble[][] result = new double[data.length][];\n\t\t\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tresult[i] = logarit(data[i], base);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public static double log(double a){ \n // migrated from jWMMG - the origin of the algorithm is not known.\n if (Double.isNaN(a) || a < 0) {\n return Double.NaN;\n } else if (a == Double.POSITIVE_INFINITY) {\n return Double.POSITIVE_INFINITY;\n } else if (a == 0) {\n return Double.NEGATIVE_INFINITY;\n }\n \n long lx;\n if (a > 1) {\n lx = (long)(0.75*a); // 3/4*x\n } else {\n lx = (long)(0.6666666666666666666666666666666/a); // 2/3/x\n }\n \n int ix;\n int power;\n if (lx > Integer.MAX_VALUE) {\n ix = (int) (lx >> 31);\n power = 31;\n } else {\n ix = (int) lx;\n power = 0;\n }\n \n while (ix != 0) {\n ix >>= 1;\n power++;\n }\n \n double ret;\n if (a > 1) {\n ret = lnInternal(a / ((long) 1<<power)) + power * LN_2;\n } else {\n ret = lnInternal(a * ((long) 1<<power)) - power * LN_2;\n }\n return ret;\n }",
"public static double random(double input){\n\t\treturn Math.random()*input;\n\t}",
"public static float log(float base, float arg) {\n return (nlog(arg)) / nlog(base);\n }",
"public double getRandom(){\n\t\treturn random.nextDouble();\n\t}",
"public static double[] logarit(double[] data, double base) {\n\t\tdouble[] result = new double[data.length];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (base == Math.E)\n\t\t\t\tresult[i] = Math.log(data[i]);\n\t\t\telse if (base == 10)\n\t\t\t\tresult[i] = Math.log10(data[i]);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public static double random()\n {\n return _prng2.nextDouble();\n }",
"@UITopiaVariant(affiliation = \"RWTH Aachen\", author = \"Kefang\", email = \"***@gmail.com\", uiLabel = UITopiaVariant.USEVARIANT)\n\t@PluginVariant(variantLabel = \"Sample Event Log\", requiredParameterLabels = { 0 })\n\tpublic XLog sampleLog(PluginContext context, XLog log) {\n\t\tint num = 50;\n\t\treturn EventLogUtilities.sampleLog(log, num)[0];\n\t}",
"public abstract double sample();",
"@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public static double random() {\r\n return uniform();\r\n }",
"private static double randomDouble(final Random rnd) {\n return randomDouble(Double.MIN_EXPONENT, Double.MAX_EXPONENT, rnd);\n }",
"public double logDeterminant(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble det = 0.0D;\r\n \tMatrix ludmat = this.luDecomp();\r\n\r\n\t \tdet = ludmat.dswap;\r\n\t \tdet=Math.log(det);\r\n \tfor(int j=0; j<n; j++){\r\n \t\tdet += Math.log(ludmat.matrix[j][j]);\r\n \t}\r\n \treturn det;\r\n \t}",
"static double expon(double mean) {\n return -mean * Math.log(Math.random());\n }",
"public static double logarit(double value, double base) {\n\t\tif (base == Math.E)\n\t\t\treturn Math.log(value);\n\t\telse if (base == 10)\n\t\t\treturn Math.log10(value);\n\t\telse\n\t\t\treturn Double.NaN;\n\t\t\t\n\t}",
"public DiscreteLogarithm(BigInteger mod, BigInteger alpha, BigInteger beta) {\n this.mod = mod;\n this.alphaPollard = alpha;\n this.betaPollard = beta;\n this.nPollard = mod.subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));\n }",
"private double entropy(double[][] beliefs) {\n\t\tdouble sum = 0;\n\t\tdouble log2 = Math.log(2);\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tif (beliefs[x][y] > 0) // because we can't take log of 0 (but we can skit around it because we would be multiplying it by 0 anyway so even if it existed it wouldn't contribute to the sum)\n\t\t\t\t\tsum += beliefs[x][y] * (Math.log(beliefs[x][y])/log2); // because logb(n) = log(n)/log(b)\n\t\t\t}\n\t\t}\n\n\t\treturn -sum;\n\t}",
"public double getLogReturn(int t)\n {\n if(t<1 || t>=size)\n return 0.0;\n return r[t - 1];\n }",
"public T elementLog() {\n T c = createLike();\n ops.elementLog(mat, c.mat);\n return c;\n }",
"private double featuresProbabilityLogSum(Collection<F> features, C category) {\n double logSum = 1.0f;\n for (F feature : features) {\n logSum += Math.log(this.featureWeighedAverage(feature, category));\n }\n return logSum;\n }",
"public Double randomDouble() {\n\n final Random random = new Random();\n return random.nextInt(100) / 100.0;\n }",
"public double sampleDouble() {\n double x = sample01();\n if ( x < (b-a)/(c-a))\n x = Math.sqrt(x*(b-a)*(c-a)) + a;\n else\n x = c- Math.sqrt((1-x)*(c-a)*(c-b));\n return x;\n }",
"public static double uniform() {\r\n return random.nextDouble();\r\n }",
"public Double generateRandomDouble() {\n\t\tRandom rand = new Random(Double.doubleToLongBits(Math.random()));\n\t\treturn rand.nextDouble();\n\t}",
"public static double random()\n {\n final int MAX_INT = 2147483647;\n int n = MAX_INT;\n \n // Just to ensure it does not return 1.0\n while(n == MAX_INT)\n \tn = abs (RAND.nextInt());\n \n return n * (1.0 / MAX_INT);\n }",
"public static double log(double x)\n\t{\n\t if (x < 1.0)\n\t return -log(1.0/x);\n\t \n\t double m=0.0;\n\t double p=1.0;\n\t while (p <= x) {\n\t m++;\n\t p=p*2;\n\t }\n\t \n\t m = m - 1;\n\t double z = x/(p/2);\n\t \n\t double zeta = (1.0 - z)/(1.0 + z);\n\t double n=zeta;\n\t double ln=zeta;\n\t double zetasup = zeta * zeta;\n\t \n\t for (int j=1; true; j++)\n\t {\n\t n = n * zetasup;\n\t double newln = ln + n / (2 * j + 1);\n\t double term = ln/newln;\n\t if (term >= LOWER_BOUND && term <= UPPER_BOUND)\n\t return m * ln2 - 2 * ln;\n\t ln = newln;\n\t }\n\t}",
"public static double uniform() {\n return random.nextDouble();\n }",
"@Override\n\t\t\tpublic double getAsDouble() {\n\t\t\t\treturn Math.random();\n\t\t\t}",
"public static double randomDouble() {\n return randomDouble(-Double.MAX_VALUE, Double.MAX_VALUE);\n }",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"public double empiricalLikelihood(int numSamples, ArrayList<ArrayList<Integer>> testing) {\n\t\tNCRPNode[] path = new NCRPNode[numLevels];\n\t\tNCRPNode node;\n\t\t\n\t\tpath[0] = rootNode;\n\n\t\tArrayList<Integer> fs;\n\t\tint sample, level, type, token, doc, seqLen;\n\n\t\tDirichlet dirichlet = new Dirichlet(numLevels, alpha);\n\t\tdouble[] levelWeights;\n\t\t//dictionary\n\t\tdouble[] multinomial = new double[numTypes];\n\n\t\tdouble[][] likelihoods = new double[ testing.size() ][ numSamples ];\n\t\t\n\t\t//for each sample\n\t\tfor (sample = 0; sample < numSamples; sample++) {\n\t\t\tArrays.fill(multinomial, 0.0);\n\n\t\t\t//select a path\n\t\t\tfor (level = 1; level < numLevels; level++) {\n\t\t\t\tpath[level] = path[level-1].selectExisting();\n\t\t\t}\n\t \n\t\t\t//sample level weights\n\t\t\tlevelWeights = dirichlet.nextDistribution();\n\t \n\t\t\t//for each words in dictionary\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\t//for each topic\n\t\t\t\tfor (level = 0; level < numLevels; level++) {\n\t\t\t\t\tnode = path[level];\n\t\t\t\t\tmultinomial[type] +=\n\t\t\t\t\t\tlevelWeights[level] * \n\t\t\t\t\t\t(eta + node.typeCounts[type]) /\n\t\t\t\t\t\t(etaSum + node.totalTokens);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//convert to log\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\tmultinomial[type] = Math.log(multinomial[type]);\n\t\t\t}\n\n\t\t\t//calculate document likelihoods \n\t\t\tfor (doc=0; doc<testing.size(); doc++) {\n fs = testing.get(doc);\n seqLen = fs.size();\n \n for (token = 0; token < seqLen; token++) {\n type = fs.get(token);\n likelihoods[doc][sample] += multinomial[type];\n }\n }\n\t\t}\n\t\n double averageLogLikelihood = 0.0;\n double logNumSamples = Math.log(numSamples);\n for (doc=0; doc<testing.size(); doc++) {\n \t\n \t//find the max for normalization, avoid overflow of sum\n double max = Double.NEGATIVE_INFINITY;\n for (sample = 0; sample < numSamples; sample++) {\n if (likelihoods[doc][sample] > max) {\n max = likelihoods[doc][sample];\n }\n }\n\n double sum = 0.0;\n //normalize \n for (sample = 0; sample < numSamples; sample++) {\n sum += Math.exp(likelihoods[doc][sample] - max);\n }\n\n //calc average\n averageLogLikelihood += Math.log(sum) + max - logNumSamples;\n }\n\n\t\treturn averageLogLikelihood;\n }",
"public void createLog(double initialFitness, double mst) {\n createLog(initialFitness, mst, null, null);\n }",
"public static double exp(double[] parameters) {\r\n double lambda;\r\n lambda = parameters[0];\r\n return -Math.log(1 - uniform()) / lambda;\r\n }",
"private double entropy(double x) {\r\n\t\tif (x > 0)\r\n\t\t\treturn -(x * (Math.log(x) / Math.log(2.0)));\r\n\t\telse\r\n\t\t\treturn 0.0;\r\n\t}",
"public abstract double log2Prior(double betaForDimension, int dimension);",
"public List<Vec> sample(int count, Random rand);",
"public static double [] logarithm (double [][]x){\n\t\tdouble [] log=new double [x.length-1];\n\t\t\n\t\tfor(int i=0; i<x.length-1;i++){\n\t\t\tdouble[] xk1=x[i+1];\n\t\t\tdouble[] xk=x[i];\n\t\t\tlog[i]=Math.log10(Math.max( Math.abs(xk1[0] - xk[0]), Math.abs(xk1[1] - xk[1]) ));\n\t\t\t\n\t\t}\n\t\t\n\t\treturn log;\n\t}",
"public Series logarithmic()\n {\n Series logarithmic = new Series();\n logarithmic.x = new double[logarithmic.size = size];\n logarithmic.r = r;\n for(int t = 0; t<size; t++)\n logarithmic.x[t] = Math.log(x[t]);\n return logarithmic;\n }",
"@Test\n public void whenLogarithmicFunctionThenLogarithmicResults() {\n FunctionMethod functionMethod = new FunctionMethod();\n List<Double> result = functionMethod.diapason(16, 18, x -> Math.log(x) / Math.log(2.0));\n List<Double> expected = Arrays.asList(4D, 4.08746284125034D);\n assertThat(result, is(expected));\n }",
"public void computeLogLikelihood(double[] betas, Instances instances) {\n //Basic implementation done in the prior class.\n super.computelogLikelihood(betas, instances);\n }",
"public static Matrix log(Matrix matrix)\n {\n double base = Math.exp(1.0);\n return logN(base, matrix);\n }",
"private static double lg(double x) {\n return Math.log(x) / Math.log(2.0);\n }",
"public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }",
"public double logProb(double[] cFactor) {\n\n double logProb = 0;\n for(int i = 0; i < cFactor.length; i++) {\n logProb += Math.log(cFactor[i]);\n }\n logProb = -logProb;\n return logProb;\n }",
"static double[] normalizeLogP(double[] lnP){\n double[] p = new double[lnP.length];\n \n // find the maximum\n double maxLnP = lnP[0];\n for (int i=1 ; i<p.length ; ++i){\n if (lnP[i] > maxLnP){\n maxLnP = lnP[i];\n }\n }\n \n // subtract the maximum and exponentiate\n // sum is guaranted to be >= 1.0;\n double sum = 0.0;\n for (int i=0 ; i<p.length ; ++i){\n p[i] = Math.exp(lnP[i] - maxLnP);\n if (!Double.isFinite(p[i])){\n p[i] = 0.0;\n }\n sum = sum + p[i];\n }\n \n // normalize sum to 1\n for (int i=0 ; i<p.length ; ++i){\n p[i] = p[i]/sum;\n }\n return p;\n }",
"public static double logPdf(double x, double mean, double variance) {\n\t\tif (variance != 0) {\n\t\t\tdouble result = -0.5 * Math.log(2 * Math.PI) - 0.5 * Math.log(variance)\n\t\t\t\t- Math.pow(x - mean, 2) / (2 * variance);\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public static final float log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tif (x == 1f) {\n \t\t\treturn 0f;\n \t\t}\n \t\t// Argument of _log must be (0; 1]\n \t\tif (x > 1f) {\n \t\t\tx = 1 / x;\n \t\t\treturn -_log(x);\n \t\t}\n \t\t;\n \t\t//\n \t\treturn _log(x);\n \t}",
"public static Matrix logN(double base, Matrix matrix)\n {\n Matrix result = null;\n try\n {\n result = logN(matrix, base);\n }\n catch (Exception ex)\n {\n }\n return result;\n }",
"@Override\r\n\tpublic Log getLog() {\n\t\treturn log;\r\n\t}",
"public static double lg(double x) {\n return Math.log(x) / Math.log(2);\n }",
"void log();",
"private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"static private float _log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tfloat f = 0f;\n \t\t//\n \t\tint appendix = 0;\n \t\twhile ((x > 0f) && (x <= 1f)) {\n \t\t\tx *= 2f;\n \t\t\tappendix++;\n \t\t}\n \t\t//\n \t\tx /= 2f;\n \t\tappendix--;\n \t\t//\n \t\tfloat y1 = x - 1f;\n \t\tfloat y2 = x + 1f;\n \t\tfloat y = y1 / y2;\n \t\t//\n \t\tfloat k = y;\n \t\ty2 = k * y;\n \t\t//\n \t\tfor (long i = 1; i < 10; i += 2) {\n \t\t\tf += k / i;\n \t\t\tk *= y2;\n \t\t}\n \t\t//\n \t\tf *= 2f;\n \t\tfor (int i = 0; i < appendix; i++) {\n \t\t\tf += FLOAT_LOGFDIV2;\n \t\t}\n \t\t//\n //\t\tlogger.info(\"exit _log\" + f);\n \t\treturn f;\n \t}",
"WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }",
"private static int getlog(int operand, int base) {\n double answ = Math.log(operand)/Math.log(base);\n if (answ == Math.ceil(answ)) {\n return (int)answ;\n }\n else {\n return (int)answ+1;\n }\n }",
"public static double exponential( double lambda ) {\n return -Math.log( 1 - Math.random() ) / lambda;\n }",
"private double randomLandau(double mu, double sigma, Random aRandom) {\n\t \n if (sigma <= 0) return 0;\n \n double res = mu + landau_quantile(aRandom.nextDouble(), sigma);\n return res;\n }",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"public static int pickRandomLog(ArrayList<Sprite> list) {\n\n Iterator<Sprite> itr = list.iterator();\n\n int logs = 0;\n\n while(itr.hasNext()) {\n\n Sprite sprite = itr.next();\n\n if (sprite instanceof Log || sprite instanceof LongLog) {\n logs++;\n }\n\n\n }\n\n return random.nextInt(logs);\n }",
"public static String logaritName(double base) {\n\t\tif (base == Math.E)\n\t\t\treturn \"log\";\n\t\telse if (base == 10)\n\t\t\treturn \"log10\";\n\t\telse\n\t\t\treturn \"log\" + MathUtil.format(base);\n\t}",
"public double simulate(){\n\t\tdouble r = Math.sqrt(-2 * Math.log(Math.random()));\n\t\tdouble theta = 2 * Math.PI * Math.random();\n\t\treturn Math.exp(location + scale * r * Math.cos(theta));\n\t}",
"public static double genExp(double a) {\r\n\t\tdouble x = 1 - generator.nextDouble();\r\n\t\tdouble exp = -1 * Math.log(x) * a;\r\n\t\treturn exp;\r\n\r\n\t}",
"public static double logDeterminant(Matrix amat){\r\n \tint n = amat.nrow;\r\n \tif(n!=amat.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble det = 0.0D;\r\n \tMatrix ludmat = amat.luDecomp();\r\n\r\n\t \tdet = ludmat.dswap;\r\n\t \tdet=Math.log(det);\r\n \tfor(int j=0; j<n; j++){\r\n \t\tdet += Math.log(ludmat.matrix[j][j]);\r\n \t}\r\n \t\treturn det;\r\n \t}",
"@Test\n public void whenInvokeThenReturnsLogarithmValues() {\n Funcs funcs = new Funcs();\n\n List<Double> expected = Arrays.asList(0D, 0.301D, 0.477D);\n List<Double> result = funcs.range(1, 3,\n (pStart) -> {\n double resultValue = Math.log10(pStart);\n resultValue = Math.rint(resultValue * 1000) / 1000;\n return resultValue;\n });\n\n assertThat(result, is(expected));\n }",
"public double nextDouble(){\r\n\t\tlong rand = nextLong();\r\n\t\treturn (double)(rand & 0x000fffffffffffffL)/((double)0x000fffffffffffffL);\r\n\t}",
"public double logpdf(int[][] table) {\n int n = 0;\n int N = 0;\n // Marginals from rows\n double logP = 0;\n for (int[] table1 : table) {\n int rMarginals = table1[0] + table1[1];\n N += rMarginals;\n n += table1[0];\n logP += logFactorial.getLogFactorial(rMarginals) - logFactorial.getLogFactorial(table1[0]) - logFactorial.getLogFactorial(table1[1]);\n }\n logP+= -(logFactorial.getLogFactorial(N)-logFactorial.getLogFactorial(n)-logFactorial.getLogFactorial(N-n));\n return logP;\n }",
"double entropyArray(int[] A, int total) {\r\n\t\tdouble en = 0;\r\n\t\tdouble a;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\ta = (double) A[i] / (double) total;\r\n\t\t\tif (a > 0) {\r\n\t\t\t\ten -= a * Math.log(a);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn en;\r\n\t}",
"Log getHarvestLog(String dsID) throws RepoxException;",
"private Log getLog() {\n if (controller != null) {\n log = controller.getLog();\n } \n return log ;\n }",
"public Logger getLog () {\n return log;\n }",
"public static Matrix logN(Matrix matrix, double base)\n {\n double b = 1.0;\n double[][] temp = matrix.getArray();\n int row = matrix.getRowDimension();\n int col = matrix.getColumnDimension();\n double[][] result = new double[row][col];\n if (base <= 0)\n {\n throw new IllegalArgumentException(\n \"logN : Negative or zero base result in a Complex Number or negative Infinity.\");\n }\n\n b = Math.log(base);\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (temp[i][j] == 0.0)\n {\n result[i][j] = Double.NEGATIVE_INFINITY;\n }\n else if (temp[i][j] < 0.0)\n {\n result[i][j] = Double.NaN;\n }\n else\n {\n result[i][j] = Math.log(temp[i][j]) / b;\n }\n }// end for\n }// end for\n return new Matrix(result);\n }",
"public abstract double samplingFrequency();",
"public final double sample(double x) {\n\t\t//System.out.println(a+\"*x*x*x + \"+b+\"*x*x + \"+d);\n\t\treturn a*x*x*x + b*x*x + d;\n\t}",
"public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}",
"public static float nlog(float x) {\n if (x == 1) return 0;\n\n float agm = 1f;\n float g1 = 1 / (x * (1 << (DEFAULT_ACCURACY - 2)));\n float arithmetic;\n float geometric;\n\n for (int i = 0; i < 5; i++) {\n arithmetic = (agm + g1) / 2f;\n geometric = BAKSH_sqrt(agm * g1);\n agm = arithmetic;\n g1 = geometric;\n }\n\n return (PI / 2f) * (1 / agm) - DEFAULT_ACCURACY * LN2;\n }",
"public static double sumInLogDomain(double[] logs) {\n\t\tdouble maxLog = logs[0];\n\t\tint idxMax = 0;\n\t\tfor (int i = 1; i < logs.length; i++) {\n\t\t\tif (maxLog < logs[i]) {\n\t\t\t\tmaxLog = logs[i];\n\t\t\t\tidxMax = i;\n\t\t\t}\n\t\t}\n\t\t// now calculate sum of exponent of differences\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < logs.length; i++) {\n\t\t\tif (i == idxMax) {\n\t\t\t\tsum++;\n\t\t\t} else {\n\t\t\t\tsum += Math.exp(logs[i] - maxLog);\n\t\t\t}\n\t\t}\n\t\t// and return log of sum\n\t\treturn maxLog + Math.log(sum);\n\t}",
"protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }",
"public static double fastRandomDouble(){\n\t\treturn rdm.nextDouble();\n\t\t//return rdm.nextDoubleFast();\n\t\t//return ((double)(fastRandomInt()) - ((double)Integer.MIN_VALUE)) / (-(Integer.MIN_VALUE * 2.0));\n\t}",
"private static double entropy(Comparable[] a) {\n Arrays.sort(a);\n \n int N = a.length;\n int f = 1;\n double H = 0.0;\n \n for (int i = 1; i < N; i++) {\n if (a[i].compareTo(a[i-1]) == 0) {\n f++;\n }\n else {\n H = H + 1.0 * f/N * lg(1.0 * f/N);\n f = 1;\n }\n }\n H = H + 1.0 * f/N * lg(1.0 * f/N);\n H = H/lg(N);\n return (H < 0.0) ? -H : H; //Conditional operator \"?\"\n }",
"public Log getLog() {\r\n return this.delegate.getLog();\r\n }",
"public double readLightLevel()\n {\n return (Math.random() * (200000.0 - 0.0)) + 0.0;\n }",
"Appendable getLog();"
] | [
"0.7716785",
"0.72635597",
"0.62194103",
"0.580584",
"0.5767902",
"0.55954665",
"0.5579063",
"0.5561518",
"0.55075336",
"0.5489816",
"0.54033834",
"0.53509027",
"0.52968776",
"0.5250574",
"0.52071416",
"0.5181166",
"0.5158198",
"0.51544476",
"0.5147738",
"0.51183",
"0.5097458",
"0.50956404",
"0.50859237",
"0.5080068",
"0.50659984",
"0.50557745",
"0.5045016",
"0.5041833",
"0.50401783",
"0.5038553",
"0.50217056",
"0.49899054",
"0.49546695",
"0.49404788",
"0.4927725",
"0.4926865",
"0.49252388",
"0.48813328",
"0.48645878",
"0.4858886",
"0.48574334",
"0.48497486",
"0.48483014",
"0.48330083",
"0.4786906",
"0.47682035",
"0.4762424",
"0.47542512",
"0.473165",
"0.4728046",
"0.47224164",
"0.47025186",
"0.47006282",
"0.46964177",
"0.4694577",
"0.46584806",
"0.46564224",
"0.46471837",
"0.46460345",
"0.46431676",
"0.46196806",
"0.46188885",
"0.45899674",
"0.45878577",
"0.45735604",
"0.45702374",
"0.45696777",
"0.45679912",
"0.4563513",
"0.4557985",
"0.4549381",
"0.45479134",
"0.4519359",
"0.45192388",
"0.45170704",
"0.45157444",
"0.45112622",
"0.4495746",
"0.44888717",
"0.4484506",
"0.44485024",
"0.44476974",
"0.44456315",
"0.44441935",
"0.44299695",
"0.44171605",
"0.44154847",
"0.4415094",
"0.44121286",
"0.44038245",
"0.4399953",
"0.43949774",
"0.43912947",
"0.43842694",
"0.43760788",
"0.43727368",
"0.4371902",
"0.43713254",
"0.4367188",
"0.4358126"
] | 0.7753212 | 0 |
Computes the log of a sample from the specified Dirichlet distribution and stores the result in alpha. Precision is preserved through a call to logNormalizeToSelf(). | public static void logSampleToSelf(double[] alpha, RandomGenerator rnd) {
GammaDistribution.sampleToSelf(alpha, rnd);
DoubleArrays.logToSelf(alpha);
DoubleArrays.logNormalizeToSelf(alpha);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double[] logSample(double[] alpha, RandomGenerator rnd) {\n\t\tdouble[] theta = GammaDistribution.sample(alpha, rnd);\n\t\tDoubleArrays.logToSelf(theta);\n\t\tDoubleArrays.logNormalizeToSelf(theta);\n\t\treturn theta;\n\t}",
"public static double[] logSample(RealVector alpha, RandomGenerator rnd) {\n\t\tdouble[] theta = GammaDistribution.sample(alpha, rnd);\n\t\tDoubleArrays.logToSelf(theta);\n\t\tDoubleArrays.logNormalizeToSelf(theta);\n\t\treturn theta;\n\t}",
"@SuppressWarnings(\"deprecation\")\n\t@Override\n public double calculateLogP() {\n logP = 0.0;\n // jeffreys Prior!\n if (jeffreys) {\n logP += -Math.log(getChainValue(0));\n }\n for (int i = 1; i < chainParameter.getDimension(); i++) {\n final double mean = getChainValue(i - 1);\n final double x = getChainValue(i);\n\n if (useLogNormal) {\n\t final double sigma = 1.0 / shape; // shape = precision\n\t // convert mean to log space\n\t final double M = Math.log(mean) - (0.5 * sigma * sigma);\n\t logNormal.setMeanAndStdDev(M, sigma);\n\t logP += logNormal.logDensity(x);\n } else {\n final double scale = mean / shape;\n gamma.setBeta(scale);\n logP += gamma.logDensity(x);\n }\n }\n return logP;\n }",
"public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}",
"public float nextLog ()\n {\n // Generate a non-zero uniformly-distributed random value.\n float u;\n while ((u = GENERATOR.nextFloat ()) == 0)\n {\n // try again if 0\n }\n\n return (float) (-m_fMean * Math.log (u));\n }",
"public DiscreteLogarithm(BigInteger mod, BigInteger alpha, BigInteger beta) {\n this.mod = mod;\n this.alphaPollard = alpha;\n this.betaPollard = beta;\n this.nPollard = mod.subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));\n }",
"public static float log(float base, float arg) {\n return (nlog(arg)) / nlog(base);\n }",
"@Test\n public void testLogP() {\n System.out.println(\"logP\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(Math.log(0.027), instance.logp(0), 1E-7);\n assertEquals(Math.log(0.0567), instance.logp(1), 1E-7);\n assertEquals(Math.log(0.07938), instance.logp(2), 1E-7);\n assertEquals(Math.log(0.09261), instance.logp(3), 1E-7);\n assertEquals(Math.log(0.05033709), instance.logp(10), 1E-7);\n }",
"public static double logarit(double value, double base) {\n\t\tif (base == Math.E)\n\t\t\treturn Math.log(value);\n\t\telse if (base == 10)\n\t\t\treturn Math.log10(value);\n\t\telse\n\t\t\treturn Double.NaN;\n\t\t\t\n\t}",
"public static double log(double a){ \n // migrated from jWMMG - the origin of the algorithm is not known.\n if (Double.isNaN(a) || a < 0) {\n return Double.NaN;\n } else if (a == Double.POSITIVE_INFINITY) {\n return Double.POSITIVE_INFINITY;\n } else if (a == 0) {\n return Double.NEGATIVE_INFINITY;\n }\n \n long lx;\n if (a > 1) {\n lx = (long)(0.75*a); // 3/4*x\n } else {\n lx = (long)(0.6666666666666666666666666666666/a); // 2/3/x\n }\n \n int ix;\n int power;\n if (lx > Integer.MAX_VALUE) {\n ix = (int) (lx >> 31);\n power = 31;\n } else {\n ix = (int) lx;\n power = 0;\n }\n \n while (ix != 0) {\n ix >>= 1;\n power++;\n }\n \n double ret;\n if (a > 1) {\n ret = lnInternal(a / ((long) 1<<power)) + power * LN_2;\n } else {\n ret = lnInternal(a * ((long) 1<<power)) - power * LN_2;\n }\n return ret;\n }",
"public abstract double log2Prior(double betaForDimension, int dimension);",
"public DiscreteLogarithm(BigInteger mod, BigInteger alpha, BigInteger beta, HashMap<Integer, Integer> factorization) {\n this.mod = mod;\n this.nPohlig = this.mod.subtract(BigInteger.ONE);\n this.nPollard = this.mod.subtract(BigInteger.ONE);\n this.alphaPohlig = alpha;\n this.betaPohlig = beta;\n this.factorization = factorization;\n }",
"public double logZero(double x);",
"public void computeLogLikelihood(double[] betas, Instances instances) {\n //Basic implementation done in the prior class.\n super.computelogLikelihood(betas, instances);\n }",
"private double featuresProbabilityLogSum(Collection<F> features, C category) {\n double logSum = 1.0f;\n for (F feature : features) {\n logSum += Math.log(this.featureWeighedAverage(feature, category));\n }\n return logSum;\n }",
"public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }",
"public void createLog(double initialFitness, double mst) {\n createLog(initialFitness, mst, null, null);\n }",
"static double[] normalizeLogP(double[] lnP){\n double[] p = new double[lnP.length];\n \n // find the maximum\n double maxLnP = lnP[0];\n for (int i=1 ; i<p.length ; ++i){\n if (lnP[i] > maxLnP){\n maxLnP = lnP[i];\n }\n }\n \n // subtract the maximum and exponentiate\n // sum is guaranted to be >= 1.0;\n double sum = 0.0;\n for (int i=0 ; i<p.length ; ++i){\n p[i] = Math.exp(lnP[i] - maxLnP);\n if (!Double.isFinite(p[i])){\n p[i] = 0.0;\n }\n sum = sum + p[i];\n }\n \n // normalize sum to 1\n for (int i=0 ; i<p.length ; ++i){\n p[i] = p[i]/sum;\n }\n return p;\n }",
"public double empiricalLikelihood(int numSamples, ArrayList<ArrayList<Integer>> testing) {\n\t\tNCRPNode[] path = new NCRPNode[numLevels];\n\t\tNCRPNode node;\n\t\t\n\t\tpath[0] = rootNode;\n\n\t\tArrayList<Integer> fs;\n\t\tint sample, level, type, token, doc, seqLen;\n\n\t\tDirichlet dirichlet = new Dirichlet(numLevels, alpha);\n\t\tdouble[] levelWeights;\n\t\t//dictionary\n\t\tdouble[] multinomial = new double[numTypes];\n\n\t\tdouble[][] likelihoods = new double[ testing.size() ][ numSamples ];\n\t\t\n\t\t//for each sample\n\t\tfor (sample = 0; sample < numSamples; sample++) {\n\t\t\tArrays.fill(multinomial, 0.0);\n\n\t\t\t//select a path\n\t\t\tfor (level = 1; level < numLevels; level++) {\n\t\t\t\tpath[level] = path[level-1].selectExisting();\n\t\t\t}\n\t \n\t\t\t//sample level weights\n\t\t\tlevelWeights = dirichlet.nextDistribution();\n\t \n\t\t\t//for each words in dictionary\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\t//for each topic\n\t\t\t\tfor (level = 0; level < numLevels; level++) {\n\t\t\t\t\tnode = path[level];\n\t\t\t\t\tmultinomial[type] +=\n\t\t\t\t\t\tlevelWeights[level] * \n\t\t\t\t\t\t(eta + node.typeCounts[type]) /\n\t\t\t\t\t\t(etaSum + node.totalTokens);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//convert to log\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\tmultinomial[type] = Math.log(multinomial[type]);\n\t\t\t}\n\n\t\t\t//calculate document likelihoods \n\t\t\tfor (doc=0; doc<testing.size(); doc++) {\n fs = testing.get(doc);\n seqLen = fs.size();\n \n for (token = 0; token < seqLen; token++) {\n type = fs.get(token);\n likelihoods[doc][sample] += multinomial[type];\n }\n }\n\t\t}\n\t\n double averageLogLikelihood = 0.0;\n double logNumSamples = Math.log(numSamples);\n for (doc=0; doc<testing.size(); doc++) {\n \t\n \t//find the max for normalization, avoid overflow of sum\n double max = Double.NEGATIVE_INFINITY;\n for (sample = 0; sample < numSamples; sample++) {\n if (likelihoods[doc][sample] > max) {\n max = likelihoods[doc][sample];\n }\n }\n\n double sum = 0.0;\n //normalize \n for (sample = 0; sample < numSamples; sample++) {\n sum += Math.exp(likelihoods[doc][sample] - max);\n }\n\n //calc average\n averageLogLikelihood += Math.log(sum) + max - logNumSamples;\n }\n\n\t\treturn averageLogLikelihood;\n }",
"private double entropy(double x) {\r\n\t\tif (x > 0)\r\n\t\t\treturn -(x * (Math.log(x) / Math.log(2.0)));\r\n\t\telse\r\n\t\t\treturn 0.0;\r\n\t}",
"static private float _log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tfloat f = 0f;\n \t\t//\n \t\tint appendix = 0;\n \t\twhile ((x > 0f) && (x <= 1f)) {\n \t\t\tx *= 2f;\n \t\t\tappendix++;\n \t\t}\n \t\t//\n \t\tx /= 2f;\n \t\tappendix--;\n \t\t//\n \t\tfloat y1 = x - 1f;\n \t\tfloat y2 = x + 1f;\n \t\tfloat y = y1 / y2;\n \t\t//\n \t\tfloat k = y;\n \t\ty2 = k * y;\n \t\t//\n \t\tfor (long i = 1; i < 10; i += 2) {\n \t\t\tf += k / i;\n \t\t\tk *= y2;\n \t\t}\n \t\t//\n \t\tf *= 2f;\n \t\tfor (int i = 0; i < appendix; i++) {\n \t\t\tf += FLOAT_LOGFDIV2;\n \t\t}\n \t\t//\n //\t\tlogger.info(\"exit _log\" + f);\n \t\treturn f;\n \t}",
"public Hypergeometric(LogFactorialSerie logFactorial) {\n this.logFactorial = logFactorial;\n }",
"public double log(double d){\r\n\r\n\t\tif(d == 0){\r\n\t\t\treturn 0.0;\r\n\t\t} else {\r\n\t\t\treturn Math.log(d)/Math.log(2);\r\n\t\t}\r\n\r\n\t}",
"public static double log(double x)\n\t{\n\t if (x < 1.0)\n\t return -log(1.0/x);\n\t \n\t double m=0.0;\n\t double p=1.0;\n\t while (p <= x) {\n\t m++;\n\t p=p*2;\n\t }\n\t \n\t m = m - 1;\n\t double z = x/(p/2);\n\t \n\t double zeta = (1.0 - z)/(1.0 + z);\n\t double n=zeta;\n\t double ln=zeta;\n\t double zetasup = zeta * zeta;\n\t \n\t for (int j=1; true; j++)\n\t {\n\t n = n * zetasup;\n\t double newln = ln + n / (2 * j + 1);\n\t double term = ln/newln;\n\t if (term >= LOWER_BOUND && term <= UPPER_BOUND)\n\t return m * ln2 - 2 * ln;\n\t ln = newln;\n\t }\n\t}",
"public static double exp(double[] parameters) {\r\n double lambda;\r\n lambda = parameters[0];\r\n return -Math.log(1 - uniform()) / lambda;\r\n }",
"private double entropy(double[][] beliefs) {\n\t\tdouble sum = 0;\n\t\tdouble log2 = Math.log(2);\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tif (beliefs[x][y] > 0) // because we can't take log of 0 (but we can skit around it because we would be multiplying it by 0 anyway so even if it existed it wouldn't contribute to the sum)\n\t\t\t\t\tsum += beliefs[x][y] * (Math.log(beliefs[x][y])/log2); // because logb(n) = log(n)/log(b)\n\t\t\t}\n\t\t}\n\n\t\treturn -sum;\n\t}",
"static double expon(double mean) {\n return -mean * Math.log(Math.random());\n }",
"private float getLogProfile(float in) {\n final float power = 1.0f / 2.2f;\n final float log_A = 0.0f;\n float out = (float) (Math.log1p(log_A * in) / Math.log1p(log_A));\n\n // apply gamma\n out = (float) Math.pow(out, power);\n //out = Math.max(out, 0.5f);\n\n return out;\n }",
"public static double[] logarit(double[] data, double base) {\n\t\tdouble[] result = new double[data.length];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (base == Math.E)\n\t\t\t\tresult[i] = Math.log(data[i]);\n\t\t\telse if (base == 10)\n\t\t\t\tresult[i] = Math.log10(data[i]);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"static private float exact_log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tfloat f = 0f;\n \t\t//\n \t\tint appendix = 0;\n \t\twhile ((x > 0f) && (x <= 1f)) {\n \t\t\tx *= 2f;\n \t\t\tappendix++;\n \t\t}\n \t\t//\n \t\tx /= 2f;\n \t\tappendix--;\n \t\t//\n \t\tfloat y1 = x - 1f;\n \t\tfloat y2 = x + 1f;\n \t\tfloat y = y1 / y2;\n \t\t//\n \t\tfloat k = y;\n \t\ty2 = k * y;\n \t\t//\n \t\tfor (long i = 1; i < 50; i += 2) {\n \t\t\tf += k / i;\n \t\t\tk *= y2;\n \t\t}\n \t\t//\n \t\tf *= 2f;\n \t\tfor (int i = 0; i < appendix; i++) {\n \t\t\tf += FLOAT_LOGFDIV2;\n \t\t}\n \t\t//\n //\t\tlogger.info(\"exit _log\" + f);\n \t\treturn f;\n \t}",
"public static double[][] logarit(double[][] data, double base) {\n\t\tdouble[][] result = new double[data.length][];\n\t\t\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tresult[i] = logarit(data[i], base);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public final void log() throws ArithmeticException {\n\t\tif ((mksa&_LOG) != 0) throw new ArithmeticException\n\t\t(\"****Unit: log(\" + symbol + \")\") ;\n\t\tvalue = AstroMath.log(value);\n\t\tmksa |= _log;\n\t\tif (symbol != null) \n\t\t\tsymbol = \"[\" + symbol + \"]\";\t// Enough to indicate log\n\t}",
"@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public static double sample(double a, double b, Random random) {\n assert (b > 0.0);\n return a - b * Math.log(random.nextDouble());\n }",
"private double lnGamma(double x) \n\t{\n\t\tdouble f = 0.0, z;\n\t\tif (x < 7) \n\t\t{\n\t\t\tf = 1;\n\t\t\tz = x - 1;\n\t\t\twhile (++z < 7)\n\t\t\t{\n\t\t\t\tf *= z;\n\t\t\t}\n\t\t\tx = z;\n\t\t\tf = -Math.log(f);\n\t\t}\n\t\tz = 1 / (x * x);\n\t\treturn\tf + (x - 0.5) * Math.log(x) - x + 0.918938533204673 +\n\t\t\t\t( ( ( -0.000595238095238 * z + 0.000793650793651 ) * z \n\t\t\t\t\t -0.002777777777778) * z + 0.083333333333333 ) / x;\n\t}",
"public static final float log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tif (x == 1f) {\n \t\t\treturn 0f;\n \t\t}\n \t\t// Argument of _log must be (0; 1]\n \t\tif (x > 1f) {\n \t\t\tx = 1 / x;\n \t\t\treturn -_log(x);\n \t\t}\n \t\t;\n \t\t//\n \t\treturn _log(x);\n \t}",
"@Override\n public void init()\n {\n out = mul(num(100.0/Math.log10(length)), log10(div(sum(truerange(), length), diff(highest(length), lowest(length)))));\n }",
"double entropyArray(int[] A, int total) {\r\n\t\tdouble en = 0;\r\n\t\tdouble a;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\ta = (double) A[i] / (double) total;\r\n\t\t\tif (a > 0) {\r\n\t\t\t\ten -= a * Math.log(a);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn en;\r\n\t}",
"public static RegressionPrior logInterpolated(double alpha,\n RegressionPrior prior1,\n RegressionPrior prior2) {\n if (Double.isNaN(alpha) || alpha < 0.0 || alpha > 1.0) {\n String msg = \"Weight of first prior must be between 0 and 1 inclusive.\"\n + \" Found alpha=\" + alpha;\n throw new IllegalArgumentException(msg);\n \n }\n return new LogInterpolatedRegressionPrior(alpha,prior1,prior2);\n }",
"void log(Log log);",
"private double randomLandau(double mu, double sigma, Random aRandom) {\n\t \n if (sigma <= 0) return 0;\n \n double res = mu + landau_quantile(aRandom.nextDouble(), sigma);\n return res;\n }",
"public double logProb(double[] cFactor) {\n\n double logProb = 0;\n for(int i = 0; i < cFactor.length; i++) {\n logProb += Math.log(cFactor[i]);\n }\n logProb = -logProb;\n return logProb;\n }",
"@Override\n public double calculateLogP() {\n\n double fastLogP = logLhoodAllGeneTreesInSMCTree(getInverseGammaMixture(),\n popPriorScaleInput.get().getValue(), false);\n\n if (debugFlag && numberofdebugchecks < maxnumberofdebugchecks) {\n double robustLogP = logLhoodAllGeneTreesInSMCTree(getInverseGammaMixture(),\n popPriorScaleInput.get().getValue(), true);\n if (Math.abs(fastLogP - robustLogP) > 1e-12) {\n System.err.println(\"BUG in calculateLogP() in PIOMSCoalescentDistribution\");\n throw new RuntimeException(\"Fatal STACEY error.\");\n\n }\n numberofdebugchecks++;\n }\n logP = fastLogP;\n return logP;\n }",
"private ArrayList<Float> convertToLog(ArrayList<Float> list){\n ArrayList<Float> convertedList = new ArrayList<>();\n for (Float current:list){\n double temp = Math.log(current);\n float newValue = (float) temp;\n convertedList.add(newValue);\n }\n return convertedList;\n\n }",
"private static double entropy(Comparable[] a) {\n Arrays.sort(a);\n \n int N = a.length;\n int f = 1;\n double H = 0.0;\n \n for (int i = 1; i < N; i++) {\n if (a[i].compareTo(a[i-1]) == 0) {\n f++;\n }\n else {\n H = H + 1.0 * f/N * lg(1.0 * f/N);\n f = 1;\n }\n }\n H = H + 1.0 * f/N * lg(1.0 * f/N);\n H = H/lg(N);\n return (H < 0.0) ? -H : H; //Conditional operator \"?\"\n }",
"default public double pdf(Vec x) {\n return Math.exp(logPdf(x));\n }",
"public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }",
"public static double sumLogProb (double a, double b)\n\t{\n\t\tif (a == Double.NEGATIVE_INFINITY) {\n\t\t\tif (b == Double.NEGATIVE_INFINITY)\n\t\t\t\treturn Double.NEGATIVE_INFINITY;\n return b;\n\t\t}\n\t\telse if (b == Double.NEGATIVE_INFINITY)\n\t\t\treturn a;\n\t\telse if (a > b)\n\t\t\treturn a + Math.log (1 + Math.exp(b-a));\n\t\telse\n\t\t\treturn b + Math.log (1 + Math.exp(a-b));\n\t}",
"public MixDirichletPrior(Enumerable domain, int component) {\n\t\tsuper(domain, component);\n\t\tscale = 1.0;\n\t\talpha = new double[component][domain.size()];\n\t\tm = new double[component];\n\t\tcountVector = new double[domain.size()];\n\t\tArrays.fill(countVector, 0.0);\n\t\tfor(int i = 0; i < component; i++) {\n DirichletDistrib dirichlet = (DirichletDistrib)this.getDistrib(i); \n System.arraycopy(dirichlet.getAlpha(), 0, alpha[i], 0, domain.size());\n m[i] = this.getWeights(i);\n\t\t}\t\n\t}",
"public static double sample_value(double lambda) {\n return -Math.log(Util.random()) / lambda;\n }",
"abstract double leftProbability();",
"public static void setAlpha(double alp)\n\t{\n\t\talpha = alp;\t\n\t}",
"private double sentenceLogProbability(String sentence, String category) {\r\n double logProbability = Math.log(categoryPriorProbability(category));\r\n // - for debugging -\r\n //System.out.println(\"category prior probability:\" + logProbability);\r\n // - - - - -\r\n List<String> terms = termSegmentor.segmentSentence(sentence);\r\n for (String term : terms) {\r\n double probability;\r\n if (!termGivenCategoryToCount.get(category).containsKey(term)) {\r\n // new term detected on the fly\r\n // smoothen it with a naive prior probability\r\n probability = 1.0 / (words.size() + 1);\r\n } else {\r\n probability = termGivenCategoryPosteriorProbability(term, category);\r\n }\r\n // - for debugging -\r\n //System.out.println(\"probability:\" + probability);\r\n // - - - - -\r\n logProbability += Math.log(probability);\r\n }\r\n // - for debugging -\r\n //System.out.println(\"logProbability:\" + logProbability);\r\n // - - - - -\r\n return logProbability;\r\n }",
"@Override\r\n\tpublic double evaluate(double input1) throws ArithmeticException \r\n\t{\n\t\treturn Math.log(input1);\r\n\t}",
"public EntropyLDiversity(String attribute, double l){\n super(attribute, l, false, true);\n this.estimator = EntropyEstimator.SHANNON;\n }",
"public static double genExp(double a) {\r\n\t\tdouble x = 1 - generator.nextDouble();\r\n\t\tdouble exp = -1 * Math.log(x) * a;\r\n\t\treturn exp;\r\n\r\n\t}",
"@Test\n public void whenLogarithmicFunctionThenLogarithmicResults() {\n FunctionMethod functionMethod = new FunctionMethod();\n List<Double> result = functionMethod.diapason(16, 18, x -> Math.log(x) / Math.log(2.0));\n List<Double> expected = Arrays.asList(4D, 4.08746284125034D);\n assertThat(result, is(expected));\n }",
"public static double logPdf(double x, double mean, double variance) {\n\t\tif (variance != 0) {\n\t\t\tdouble result = -0.5 * Math.log(2 * Math.PI) - 0.5 * Math.log(variance)\n\t\t\t\t- Math.pow(x - mean, 2) / (2 * variance);\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"private static int getlog(int operand, int base) {\n double answ = Math.log(operand)/Math.log(base);\n if (answ == Math.ceil(answ)) {\n return (int)answ;\n }\n else {\n return (int)answ+1;\n }\n }",
"private double probCountVector(double[] alpha) {\n\t\tdouble result = 0.0;\n\t\tdouble sumCountVector = 0.0;\n\t\tdouble sumAlpha = 0;\n\t\tif(countVector.length != alpha.length) {\n\t\t\tthrow new RuntimeException(\"the length of count vector and alpha should be same\");\n\t\t}\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tsumCountVector += countVector[i];\n\t\t\tsumAlpha += alpha[i] * scale;\n\t\t}\n\t\tresult = GammaDistrib.lgamma(sumCountVector + 1) + GammaDistrib.lgamma(sumAlpha) - GammaDistrib.lgamma(sumCountVector + sumAlpha);\n\t\tfor(int i = 0; i < countVector.length; i++) {\n\t\t\tresult += GammaDistrib.lgamma(countVector[i] + alpha[i] * scale) - GammaDistrib.lgamma(countVector[i] + 1) - GammaDistrib.lgamma(alpha[i] * scale);\n\t\t}\n\t\treturn result;\n\t}",
"public double logpdf(int[][] table) {\n int n = 0;\n int N = 0;\n // Marginals from rows\n double logP = 0;\n for (int[] table1 : table) {\n int rMarginals = table1[0] + table1[1];\n N += rMarginals;\n n += table1[0];\n logP += logFactorial.getLogFactorial(rMarginals) - logFactorial.getLogFactorial(table1[0]) - logFactorial.getLogFactorial(table1[1]);\n }\n logP+= -(logFactorial.getLogFactorial(N)-logFactorial.getLogFactorial(n)-logFactorial.getLogFactorial(N-n));\n return logP;\n }",
"public double logDeterminant(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble det = 0.0D;\r\n \tMatrix ludmat = this.luDecomp();\r\n\r\n\t \tdet = ludmat.dswap;\r\n\t \tdet=Math.log(det);\r\n \tfor(int j=0; j<n; j++){\r\n \t\tdet += Math.log(ludmat.matrix[j][j]);\r\n \t}\r\n \treturn det;\r\n \t}",
"public double getTimestamp() {\n switch (randomType) {\n case EXPONENT:\n return forArrive ? (-1d / LAMBDA) * Math.log(Math.random()) : (-1d / NU) * Math.log(Math.random());\n\n default:\n return 0;\n }\n }",
"private static double lg(double x) {\n return Math.log(x) / Math.log(2.0);\n }",
"public LogNormalDistribution(double m, double s){\n\t\tsetParameters(m, s);\n\t}",
"public static String logaritName(double base) {\n\t\tif (base == Math.E)\n\t\t\treturn \"log\";\n\t\telse if (base == 10)\n\t\t\treturn \"log10\";\n\t\telse\n\t\t\treturn \"log\" + MathUtil.format(base);\n\t}",
"public static float nlog(float x) {\n if (x == 1) return 0;\n\n float agm = 1f;\n float g1 = 1 / (x * (1 << (DEFAULT_ACCURACY - 2)));\n float arithmetic;\n float geometric;\n\n for (int i = 0; i < 5; i++) {\n arithmetic = (agm + g1) / 2f;\n geometric = BAKSH_sqrt(agm * g1);\n agm = arithmetic;\n g1 = geometric;\n }\n\n return (PI / 2f) * (1 / agm) - DEFAULT_ACCURACY * LN2;\n }",
"public static Matrix logN(double base, Matrix matrix)\n {\n Matrix result = null;\n try\n {\n result = logN(matrix, base);\n }\n catch (Exception ex)\n {\n }\n return result;\n }",
"@Override\n protected double elementValueTransformer(Word w, Double actualValue) {\n \n // computing words log frequencies * idf(word) : \n // log-freq(word) = { 0 when count(word)=0\n // 1+log(count(word)) when count(word)>0 }\n \n //return (actualValue==0.0 ? (0.0) : (1.0 + Math.log(actualValue)) ) \n // * idfProvider.getInverseDocumentFrequency(w);\n\n double tf = actualValue/(actualValue + 0.5 + 1.5*this.getOriginalSumOfValues()/idfProvider.getAverageDocumentLength());\n double idf = idfProvider.getInverseDocumentFrequency(w);\n \n double val = tf*idf;\n \n return val;\n \n }",
"@Override\n double distribution(double height) {\n return (n0 * Math.exp(-a * height));\n }",
"public void resample_alpha_ESS(boolean supervised, MapWrapper[][] xsub, double[][] dict, Gamma rngG,\n Random rand, Normal rngN, PoissonModel2_RegCoef beta_model,\n boolean verbose, long start) {\n if (!supervised) {\n resample_alpha(supervised, xsub, dict, rngG, rand, beta_model, verbose, start);\n }else{\n double alpha_verbose = 0;\n double[][] alpha_prior = new double[N][P];\n for (int i = 0; i < N; i++) {\n for (int p = 0; p < this.P; p++) {\n alpha_prior[i][p] = resample_alpha_laplace(i, p, xsub, dict, rngG, rand);\n }\n }\n // elliptical slice sampling\n double[][] alpha_new = beta_model.ElipticalSliceSamplerJoint(rand, rngN, alpha_prior, this.alpha, start,\n verbose);\n// System.out.println(Arrays.toString(alpha_prior[0]));\n// System.out.println(Arrays.toString(alpha[0]));\n// System.out.println(Arrays.toString(alpha_new[0]));\n int count = 0;\n for (int i = 0; i < N; i++) {\n for (int p = 0; p < this.P; p++) {\n // todo: this truncation step does change the likelihood space, danger??\n if(alpha_new[i][p] < 0) count++;\n this.alpha[i][p] = Math.max(alpha_new[i][p], 0);\n }\n }\n if (verbose) {\n System.out.print(\"finish alpha: \");\n System.out.printf(\"%.2fmin, Mean %.2f\\n\", (double) (System.currentTimeMillis() - start) / 1000 / 60,\n (alpha_verbose + 0.0) / (P * N + 0.0));\n }\n }\n }",
"public static double sumInLogDomain(double[] logs) {\n\t\tdouble maxLog = logs[0];\n\t\tint idxMax = 0;\n\t\tfor (int i = 1; i < logs.length; i++) {\n\t\t\tif (maxLog < logs[i]) {\n\t\t\t\tmaxLog = logs[i];\n\t\t\t\tidxMax = i;\n\t\t\t}\n\t\t}\n\t\t// now calculate sum of exponent of differences\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < logs.length; i++) {\n\t\t\tif (i == idxMax) {\n\t\t\t\tsum++;\n\t\t\t} else {\n\t\t\t\tsum += Math.exp(logs[i] - maxLog);\n\t\t\t}\n\t\t}\n\t\t// and return log of sum\n\t\treturn maxLog + Math.log(sum);\n\t}",
"private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }",
"private void computeLogGammaRatioCache() {\n\t\tif (logGammaRatioCache == null) {\n\t\t\tlogGammaRatioCache = new ArrayList<>();\n\t\t}\n\t\tif (0 < logGammaRatioCache.size()) {\n\t\t\tlogGammaRatioCache.set(0, 0.0f);\n\t\t} else {\n\t\t\tlogGammaRatioCache.add(0.0f);// 0 case\n\t\t}\n\t\tindexLastValidLogGammaRatio = 0;\n\t\textendLogGammaRatioCache(10);\n\t}",
"static void normalize(double[][] plane) {\n int rows = plane.length;\n int cols = plane[0].length;\n\n //Begin by converting all negative values to positive\n // values. This is equivalent to the computation of\n // the magnitude for purely real data.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] < 0) {\n plane[row][col] = -plane[row][col];\n }//end if\n }//end inner loop\n }//end outer loop\n\n //Convert the values to log base 10 to preserve the\n // dynamic range of the plotting system. Set negative\n // values to 0.\n\n //First eliminate or change any values that are\n // incompatible with log10 method.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] == 0.0) {\n plane[row][col] = 0.0000001;\n } else if (plane[row][col] == Double.NaN) {\n plane[row][col] = 0.0000001;\n } else if (plane[row][col] ==\n Double.POSITIVE_INFINITY) {\n plane[row][col] = 9999999999.0;\n }//end else\n }//end inner loop\n }//end outer loop\n\n //Now convert the data to log base 10 setting all\n // negative results to 0.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n plane[row][col] = log10(plane[row][col]);\n if (plane[row][col] < 0) {\n plane[row][col] = 0;\n }//end if\n }//end inner loop\n }//end outer loop\n\n\n //Now set everything below X-percent of the maximum\n // value to X-percent of the maximum value where X is\n // determined by the value of scale.\n double scale = 1.0 / 7.0;\n //First find the maximum value.\n double max = Double.MIN_VALUE;\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] > max) {\n max = plane[row][col];\n }//end if\n }//end inner loop\n }//end outer loop\n\n //Now set everything below X-percent of the maximum to\n // X-percent of the maximum value and slide\n // everything down to cause the new minimum to be\n // at 0.0\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] < scale * max) {\n plane[row][col] = scale * max;\n }//end if\n plane[row][col] -= scale * max;\n }//end inner loop\n }//end outer loop\n\n //Now scale the data so that the maximum value is 255.\n\n //First find the maximum value\n max = Double.MIN_VALUE;\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n if (plane[row][col] > max) {\n max = plane[row][col];\n }//end if\n }//end inner loop\n }//end outer loop\n //Now scale the data.\n for (int row = 0; row < rows; row++) {\n for (int col = 0; col < cols; col++) {\n plane[row][col] = plane[row][col] * 255.0 / max;\n }//end inner loop\n }//end outer loop\n\n }",
"public double computeAverageJointEntropy() {\r\n\t\tdouble entropy = 0.0;\r\n\t\tfor (int b = 0; b < totalObservations; b++) {\r\n\t\t\tdouble prob = mvkeJoint.getCount(observations[b], b);\r\n\t\t\tdouble cont = 0.0;\r\n\t\t\tif (prob > 0.0) {\r\n\t\t\t\tcont = - Math.log(prob);\r\n\t\t\t}\r\n\t\t\tentropy += cont;\r\n\t\t\tif (debug) {\r\n\t\t\t\tSystem.out.println(b + \": \" + prob\r\n\t\t\t\t\t\t+ \" -> \" + cont/Math.log(2.0) + \" -> sum: \" + (entropy/Math.log(2.0)));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn entropy / (double) totalObservations / Math.log(2.0);\r\n\t}",
"void log();",
"public static Matrix logN(Matrix matrix, double base)\n {\n double b = 1.0;\n double[][] temp = matrix.getArray();\n int row = matrix.getRowDimension();\n int col = matrix.getColumnDimension();\n double[][] result = new double[row][col];\n if (base <= 0)\n {\n throw new IllegalArgumentException(\n \"logN : Negative or zero base result in a Complex Number or negative Infinity.\");\n }\n\n b = Math.log(base);\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (temp[i][j] == 0.0)\n {\n result[i][j] = Double.NEGATIVE_INFINITY;\n }\n else if (temp[i][j] < 0.0)\n {\n result[i][j] = Double.NaN;\n }\n else\n {\n result[i][j] = Math.log(temp[i][j]) / b;\n }\n }// end for\n }// end for\n return new Matrix(result);\n }",
"static double getNormalDistribution(double x) {\n return (1 / Math.sqrt(2 * Math.PI)) * Math.exp(-1 * x * x / 2.0);\n }",
"private double klDivergence(double newValue, double oldValue) {\n\t\tif (newValue == 0)\n\t\t\treturn 0;\n\t\tif (oldValue == 0)\n\t\t\treturn Double.POSITIVE_INFINITY;\n\n\t\tdouble result = newValue * Math.log(newValue / oldValue);\n\t\treturn result;\n\t}",
"public static Matrix log(Matrix matrix)\n {\n double base = Math.exp(1.0);\n return logN(base, matrix);\n }",
"public Series logarithmic()\n {\n Series logarithmic = new Series();\n logarithmic.x = new double[logarithmic.size = size];\n logarithmic.r = r;\n for(int t = 0; t<size; t++)\n logarithmic.x[t] = Math.log(x[t]);\n return logarithmic;\n }",
"public static double logBase2(double x){\n return Math.log(x)/Math.log(2);\n }",
"@Test\n public void whenInvokeThenReturnsLogarithmValues() {\n Funcs funcs = new Funcs();\n\n List<Double> expected = Arrays.asList(0D, 0.301D, 0.477D);\n List<Double> result = funcs.range(1, 3,\n (pStart) -> {\n double resultValue = Math.log10(pStart);\n resultValue = Math.rint(resultValue * 1000) / 1000;\n return resultValue;\n });\n\n assertThat(result, is(expected));\n }",
"public T elementLog() {\n T c = createLike();\n ops.elementLog(mat, c.mat);\n return c;\n }",
"private static int bernoulli(long result, long fractionOfExponent, double[][] exponentialDistribution)\n {\n\n /* *\n * Computes the Actual Bernoulli Parameter = exp (-t / f)\n * Yields A Fraction of 2^62, to Keep Only 62 Bits of Precision in This Implementation\n * */\n double bernoulliParameter = 4611686018427387904.0;\n\n for (long i = 0, j = fractionOfExponent; i < 3; i++, j >>= 5)\n {\n\n bernoulliParameter *= exponentialDistribution[(int)i][(int)(j & 31)];\n\n }\n\n /* Sample from Bernoulli of bernoulliParameter */\n return (int)(((result & 0x3FFFFFFFFFFFFFFFL) - Math.round(bernoulliParameter)) >>> 63);\n\n }",
"boolean log( LdapPrincipal principal, long revision, LdifEntry forward );",
"protected void calcAlpha(Sequence seq)\n {\n int T = seq.length();\n int nStates = getNumStates();\n alpha = Library.allocMatrixDouble(T, nStates, Library.LOG_ZERO);\n calcB(seq);\n\n // we can start anywhere, according to the prior probs\n for(int i = 0; i < nStates; i++)\n alpha[0][i] = piStart[i] + bmat[i][0];\n\n // fill in the alpha matrix\n for(int t = 1; t < T; t++){\n // calc j -> i\n for(int i = 0; i < nStates; i++){\n for(int j = 0; j < nStates; j++)\n alpha[t][i] = Library.logadd(alpha[t][i], alpha[t - 1][j] + tran[j][i]);\n alpha[t][i] += bmat[i][t];\n }\n }\n }",
"public DocumentVector divide(double alpha) {\n\t\tDocumentVector result = new DocumentVector(this.getAttCount(), 0);\n\t\tfor (int i = 0; i < this.getAttCount(); i++) {\n\t\t\tresult.setValue(i, this.getValueAsReal(i) / alpha);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"void log(@NotNull LogLevel level, @NotNull Supplier<?> supplier);",
"@Test\n public void fastLogitAlternativeLooksAlright()\n {\n TextPlot.plotf(x -> fastLogitAlternative(x, -.3, 1.3), -1, 2, -5, 5, 80, 50);\n TextPlot.plotf(x -> fastLogitAlternative(x, -2, 0), -3, 1, -5, 5, 80, 50);\n }",
"double sample();",
"public static double pareto( double alpha ) {\n return Math.pow( 1 - uniform(), -1.0/alpha ) - 1.0;\n }",
"@Override\n public double evaluate(Map<String, Double> assignment) throws Exception {\n\n double res = Math.log(getEx2().evaluate(assignment)) / Math.log(getEx2().evaluate(assignment));\n return res;\n }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(Math.log(Math.E));\t// natural log, no negative numbers\n\t\t\n\t\tSystem.out.println(Math.log10(10));\n\n\t}",
"public void createLog(double initialFitness, double mst, String[] additionalHeaders, String[] additionalLog) {\n\n if(solutionsEvaluated != fitnessesLogged.size() || solutionsEvaluated != solutionQualitiesLogged.size()) {\n //throw new Exception(\"Not all solutions were logged\");\n return;\n }\n\n if((additionalHeaders != null && additionalLog != null) && additionalHeaders.length != additionalLog.length) {\n //throw new Exception(\"Headers length must match additional log length.\");\n return;\n }\n\n String[] logHeaders = new String[]{\n \"Algorithm Name\", \"Resamples\", \"Fitness (min)\", \"Fitness (max)\", \"Fitness (range)\",\n \"Fitness (mean)\", \"Sol Quality (min)\", \"Sol Quality (max)\", \"Sol Quality (range)\", \"Sol Quality (mean)\",\n \"Initial Fitness\", \"Iterations\", \"Quickest Run (ns)\", \"Slowest Run (ns)\", \"Run Range (ns)\",\n \"Average Run (ns)\", \"MST\"\n };\n\n // resize the array - #ApacheCommons FTW :)\n if(additionalHeaders != null) {\n logHeaders = ArrayUtils.addAll(logHeaders, additionalHeaders);\n }\n\n String logContent[] = new String[logHeaders.length];\n logContent[0] = sampleName;\n logContent[1] = String.valueOf(solutionsEvaluated);\n logContent[2] = Collections.min(fitnessesLogged).toString();\n logContent[3] = Collections.max(fitnessesLogged).toString();\n logContent[4] = String.valueOf(Double.valueOf(logContent[3]) - Double.valueOf(logContent[2]));\n logContent[5] = String.valueOf(fitnessesLogged.stream().mapToDouble(dbl -> dbl).average().getAsDouble());\n logContent[6] = Collections.min(solutionQualitiesLogged).toString();\n logContent[7] = Collections.max(solutionQualitiesLogged).toString();\n logContent[8] = String.valueOf(Double.valueOf(logContent[7]) - Double.valueOf(logContent[6]));\n logContent[9] = String.valueOf(solutionQualitiesLogged.stream().mapToDouble(dbl -> dbl).average().getAsDouble());\n logContent[10] = String.valueOf(initialFitness);\n logContent[11] = String.valueOf(iterations);\n logContent[12] = String.valueOf(Collections.min(executionTimes));\n logContent[13] = String.valueOf(Collections.max(executionTimes));\n logContent[14] = String.valueOf(Double.valueOf(logContent[13]) - Double.valueOf(logContent[12]));\n logContent[15] = String.valueOf(executionTimes.stream().mapToDouble(dbl -> dbl).average().getAsDouble());\n logContent[16] = String.valueOf(mst);\n\n // append the new content to the predefined content.\n if(additionalLog != null) {\n for(int i = 17, j = 0; i < logContent.length && j < additionalLog.length; i++, j++) {\n logContent[i] = additionalLog[j];\n }\n }\n\n // log the summaries\n AlgorithmAnalysisLogger summaryLogger = new AlgorithmAnalysisLogger(\n logName,\n logHeaders\n );\n\n summaryLogger.insertLog(logContent);\n summaryLogger.close();\n }",
"public void setLogScaleX(boolean scale);",
"public void logThis(String log, Theory theory)\n {\n }",
"private void naturalLog()\n\t{\n\t\tif(Fun == null)\n\t\t{\n\t\t\tsetLeftValue();\n\t\t\tresult = calc.naturalLog ( );\n\t\t\tupdateText();\n\t\t}\n\t}",
"public static double lg(double x) {\n return Math.log(x) / Math.log(2);\n }"
] | [
"0.7215023",
"0.7123237",
"0.6114579",
"0.5733724",
"0.5729519",
"0.56144184",
"0.55492824",
"0.54684275",
"0.52830416",
"0.5250575",
"0.5247213",
"0.5239923",
"0.51845485",
"0.5151012",
"0.5126187",
"0.49895918",
"0.49676585",
"0.49342743",
"0.49322835",
"0.49181247",
"0.48695144",
"0.48453993",
"0.48176295",
"0.48083213",
"0.4807203",
"0.48059672",
"0.48015293",
"0.47605947",
"0.47503155",
"0.4747461",
"0.47180632",
"0.47056025",
"0.46991867",
"0.4686027",
"0.46857315",
"0.46853083",
"0.46530178",
"0.46516645",
"0.46506694",
"0.46502566",
"0.46442878",
"0.4643873",
"0.46322557",
"0.46319965",
"0.4625655",
"0.46254048",
"0.4620238",
"0.46159178",
"0.46152285",
"0.46148562",
"0.46137857",
"0.4608992",
"0.45969915",
"0.45803255",
"0.45787004",
"0.45774773",
"0.45719215",
"0.45686477",
"0.45586985",
"0.455233",
"0.45503047",
"0.45454422",
"0.45368588",
"0.45366678",
"0.45088196",
"0.4499499",
"0.44972488",
"0.44966322",
"0.44834417",
"0.4478201",
"0.44640276",
"0.4447581",
"0.44323695",
"0.44281933",
"0.44244173",
"0.44212884",
"0.4408385",
"0.43922406",
"0.4386468",
"0.43851525",
"0.43790972",
"0.43760395",
"0.43753386",
"0.43708023",
"0.4355273",
"0.43525833",
"0.43520337",
"0.43371853",
"0.4331508",
"0.4329211",
"0.432576",
"0.43235818",
"0.43225926",
"0.43138573",
"0.43130296",
"0.43088898",
"0.4300182",
"0.43000644",
"0.42985538",
"0.42979532"
] | 0.7240117 | 0 |
Returns the log of a sample from the specified Dirichlet distribution. Similar to calling: double[] theta = sample(alpha, rnd); DoubleArrays.logToSelf(theta); EXCEPT that precision is better preserved. | public static double[] logSample(RealVector alpha, RandomGenerator rnd) {
double[] theta = GammaDistribution.sample(alpha, rnd);
DoubleArrays.logToSelf(theta);
DoubleArrays.logNormalizeToSelf(theta);
return theta;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static double[] logSample(double[] alpha, RandomGenerator rnd) {\n\t\tdouble[] theta = GammaDistribution.sample(alpha, rnd);\n\t\tDoubleArrays.logToSelf(theta);\n\t\tDoubleArrays.logNormalizeToSelf(theta);\n\t\treturn theta;\n\t}",
"public static void logSampleToSelf(double[] alpha, RandomGenerator rnd) {\n\t\tGammaDistribution.sampleToSelf(alpha, rnd);\n\t\tDoubleArrays.logToSelf(alpha);\n\t\tDoubleArrays.logNormalizeToSelf(alpha);\n\t}",
"public float nextLog ()\n {\n // Generate a non-zero uniformly-distributed random value.\n float u;\n while ((u = GENERATOR.nextFloat ()) == 0)\n {\n // try again if 0\n }\n\n return (float) (-m_fMean * Math.log (u));\n }",
"public double sample_value() {\n checkHasParams();\n return -Math.log(Util.random()) / this.lambda;\n }",
"@Test\n public void testLogP() {\n System.out.println(\"logP\");\n NegativeBinomialDistribution instance = new NegativeBinomialDistribution(3, 0.3);\n instance.rand();\n assertEquals(Math.log(0.027), instance.logp(0), 1E-7);\n assertEquals(Math.log(0.0567), instance.logp(1), 1E-7);\n assertEquals(Math.log(0.07938), instance.logp(2), 1E-7);\n assertEquals(Math.log(0.09261), instance.logp(3), 1E-7);\n assertEquals(Math.log(0.05033709), instance.logp(10), 1E-7);\n }",
"public static double sample(double a, double b, Random random) {\n assert (b > 0.0);\n return a - b * Math.log(random.nextDouble());\n }",
"public static double doubleSample() {\n return random_.nextDouble();\n }",
"public double getTimestamp() {\n switch (randomType) {\n case EXPONENT:\n return forArrive ? (-1d / LAMBDA) * Math.log(Math.random()) : (-1d / NU) * Math.log(Math.random());\n\n default:\n return 0;\n }\n }",
"public static double sample_value(double lambda) {\n return -Math.log(Util.random()) / lambda;\n }",
"@SuppressWarnings(\"deprecation\")\n\t@Override\n public double calculateLogP() {\n logP = 0.0;\n // jeffreys Prior!\n if (jeffreys) {\n logP += -Math.log(getChainValue(0));\n }\n for (int i = 1; i < chainParameter.getDimension(); i++) {\n final double mean = getChainValue(i - 1);\n final double x = getChainValue(i);\n\n if (useLogNormal) {\n\t final double sigma = 1.0 / shape; // shape = precision\n\t // convert mean to log space\n\t final double M = Math.log(mean) - (0.5 * sigma * sigma);\n\t logNormal.setMeanAndStdDev(M, sigma);\n\t logP += logNormal.logDensity(x);\n } else {\n final double scale = mean / shape;\n gamma.setBeta(scale);\n logP += gamma.logDensity(x);\n }\n }\n return logP;\n }",
"private double randn(){\r\n\t\t//* http://www.mathworks.com/access/helpdesk/help/techdoc/matlab.html\r\n\t\t//RandomNumber rnd = new RandomNumber(System.currentTimeMillis());\r\n\t\t//return rnd.normal();\r\n\t\treturn rnd.nextGaussian();\r\n\t\t//return 0;\r\n\t}",
"double sample();",
"public LogNormalDistribution(){\n\t\tthis(0, 1);\n\t}",
"public List<Float> randomLikelihood() {\n\t\tList<Float> likelihood = new ArrayList<Float>();\n\t\tlikelihood.add((float) getRandomInteger(-200, 0));\n\t\treturn(likelihood);\n\t}",
"public static double rand() {\n return (new Random()).nextDouble();\n }",
"public double logZero(double x);",
"public double log(double d){\r\n\r\n\t\tif(d == 0){\r\n\t\t\treturn 0.0;\r\n\t\t} else {\r\n\t\t\treturn Math.log(d)/Math.log(2);\r\n\t\t}\r\n\r\n\t}",
"public static double[][] logarit(double[][] data, double base) {\n\t\tdouble[][] result = new double[data.length][];\n\t\t\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tresult[i] = logarit(data[i], base);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public static double log(double a){ \n // migrated from jWMMG - the origin of the algorithm is not known.\n if (Double.isNaN(a) || a < 0) {\n return Double.NaN;\n } else if (a == Double.POSITIVE_INFINITY) {\n return Double.POSITIVE_INFINITY;\n } else if (a == 0) {\n return Double.NEGATIVE_INFINITY;\n }\n \n long lx;\n if (a > 1) {\n lx = (long)(0.75*a); // 3/4*x\n } else {\n lx = (long)(0.6666666666666666666666666666666/a); // 2/3/x\n }\n \n int ix;\n int power;\n if (lx > Integer.MAX_VALUE) {\n ix = (int) (lx >> 31);\n power = 31;\n } else {\n ix = (int) lx;\n power = 0;\n }\n \n while (ix != 0) {\n ix >>= 1;\n power++;\n }\n \n double ret;\n if (a > 1) {\n ret = lnInternal(a / ((long) 1<<power)) + power * LN_2;\n } else {\n ret = lnInternal(a * ((long) 1<<power)) - power * LN_2;\n }\n return ret;\n }",
"public static double random(double input){\n\t\treturn Math.random()*input;\n\t}",
"public static float log(float base, float arg) {\n return (nlog(arg)) / nlog(base);\n }",
"public double getRandom(){\n\t\treturn random.nextDouble();\n\t}",
"public static double[] logarit(double[] data, double base) {\n\t\tdouble[] result = new double[data.length];\n\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\tif (base == Math.E)\n\t\t\t\tresult[i] = Math.log(data[i]);\n\t\t\telse if (base == 10)\n\t\t\t\tresult[i] = Math.log10(data[i]);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public static double random()\n {\n return _prng2.nextDouble();\n }",
"@UITopiaVariant(affiliation = \"RWTH Aachen\", author = \"Kefang\", email = \"***@gmail.com\", uiLabel = UITopiaVariant.USEVARIANT)\n\t@PluginVariant(variantLabel = \"Sample Event Log\", requiredParameterLabels = { 0 })\n\tpublic XLog sampleLog(PluginContext context, XLog log) {\n\t\tint num = 50;\n\t\treturn EventLogUtilities.sampleLog(log, num)[0];\n\t}",
"public abstract double sample();",
"@Test\n public void testLogLikelihood()\n {\n IDoubleArray T = null;\n IDoubleArray C = null;\n MarkovModelUtilities instance = new MarkovModelUtilities();\n double expResult = 0.0;\n double result = instance.logLikelihood(T, C);\n assertEquals(expResult, result, 0.0);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"public static double random() {\r\n return uniform();\r\n }",
"private static double randomDouble(final Random rnd) {\n return randomDouble(Double.MIN_EXPONENT, Double.MAX_EXPONENT, rnd);\n }",
"public double logDeterminant(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble det = 0.0D;\r\n \tMatrix ludmat = this.luDecomp();\r\n\r\n\t \tdet = ludmat.dswap;\r\n\t \tdet=Math.log(det);\r\n \tfor(int j=0; j<n; j++){\r\n \t\tdet += Math.log(ludmat.matrix[j][j]);\r\n \t}\r\n \treturn det;\r\n \t}",
"static double expon(double mean) {\n return -mean * Math.log(Math.random());\n }",
"public static double logarit(double value, double base) {\n\t\tif (base == Math.E)\n\t\t\treturn Math.log(value);\n\t\telse if (base == 10)\n\t\t\treturn Math.log10(value);\n\t\telse\n\t\t\treturn Double.NaN;\n\t\t\t\n\t}",
"public DiscreteLogarithm(BigInteger mod, BigInteger alpha, BigInteger beta) {\n this.mod = mod;\n this.alphaPollard = alpha;\n this.betaPollard = beta;\n this.nPollard = mod.subtract(BigInteger.ONE).divide(BigInteger.valueOf(2));\n }",
"private double entropy(double[][] beliefs) {\n\t\tdouble sum = 0;\n\t\tdouble log2 = Math.log(2);\n\t\tfor (int x = 0; x < beliefs.length; x++) {\n\t\t\tfor (int y = 0; y < beliefs[0].length; y++) {\n\t\t\t\tif (beliefs[x][y] > 0) // because we can't take log of 0 (but we can skit around it because we would be multiplying it by 0 anyway so even if it existed it wouldn't contribute to the sum)\n\t\t\t\t\tsum += beliefs[x][y] * (Math.log(beliefs[x][y])/log2); // because logb(n) = log(n)/log(b)\n\t\t\t}\n\t\t}\n\n\t\treturn -sum;\n\t}",
"public T elementLog() {\n T c = createLike();\n ops.elementLog(mat, c.mat);\n return c;\n }",
"public double getLogReturn(int t)\n {\n if(t<1 || t>=size)\n return 0.0;\n return r[t - 1];\n }",
"private double featuresProbabilityLogSum(Collection<F> features, C category) {\n double logSum = 1.0f;\n for (F feature : features) {\n logSum += Math.log(this.featureWeighedAverage(feature, category));\n }\n return logSum;\n }",
"public Double randomDouble() {\n\n final Random random = new Random();\n return random.nextInt(100) / 100.0;\n }",
"public double sampleDouble() {\n double x = sample01();\n if ( x < (b-a)/(c-a))\n x = Math.sqrt(x*(b-a)*(c-a)) + a;\n else\n x = c- Math.sqrt((1-x)*(c-a)*(c-b));\n return x;\n }",
"public static double uniform() {\r\n return random.nextDouble();\r\n }",
"public Double generateRandomDouble() {\n\t\tRandom rand = new Random(Double.doubleToLongBits(Math.random()));\n\t\treturn rand.nextDouble();\n\t}",
"public static double random()\n {\n final int MAX_INT = 2147483647;\n int n = MAX_INT;\n \n // Just to ensure it does not return 1.0\n while(n == MAX_INT)\n \tn = abs (RAND.nextInt());\n \n return n * (1.0 / MAX_INT);\n }",
"public static double log(double x)\n\t{\n\t if (x < 1.0)\n\t return -log(1.0/x);\n\t \n\t double m=0.0;\n\t double p=1.0;\n\t while (p <= x) {\n\t m++;\n\t p=p*2;\n\t }\n\t \n\t m = m - 1;\n\t double z = x/(p/2);\n\t \n\t double zeta = (1.0 - z)/(1.0 + z);\n\t double n=zeta;\n\t double ln=zeta;\n\t double zetasup = zeta * zeta;\n\t \n\t for (int j=1; true; j++)\n\t {\n\t n = n * zetasup;\n\t double newln = ln + n / (2 * j + 1);\n\t double term = ln/newln;\n\t if (term >= LOWER_BOUND && term <= UPPER_BOUND)\n\t return m * ln2 - 2 * ln;\n\t ln = newln;\n\t }\n\t}",
"public static double uniform() {\n return random.nextDouble();\n }",
"@Override\n\t\t\tpublic double getAsDouble() {\n\t\t\t\treturn Math.random();\n\t\t\t}",
"public static double randomDouble() {\n return randomDouble(-Double.MAX_VALUE, Double.MAX_VALUE);\n }",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"public double empiricalLikelihood(int numSamples, ArrayList<ArrayList<Integer>> testing) {\n\t\tNCRPNode[] path = new NCRPNode[numLevels];\n\t\tNCRPNode node;\n\t\t\n\t\tpath[0] = rootNode;\n\n\t\tArrayList<Integer> fs;\n\t\tint sample, level, type, token, doc, seqLen;\n\n\t\tDirichlet dirichlet = new Dirichlet(numLevels, alpha);\n\t\tdouble[] levelWeights;\n\t\t//dictionary\n\t\tdouble[] multinomial = new double[numTypes];\n\n\t\tdouble[][] likelihoods = new double[ testing.size() ][ numSamples ];\n\t\t\n\t\t//for each sample\n\t\tfor (sample = 0; sample < numSamples; sample++) {\n\t\t\tArrays.fill(multinomial, 0.0);\n\n\t\t\t//select a path\n\t\t\tfor (level = 1; level < numLevels; level++) {\n\t\t\t\tpath[level] = path[level-1].selectExisting();\n\t\t\t}\n\t \n\t\t\t//sample level weights\n\t\t\tlevelWeights = dirichlet.nextDistribution();\n\t \n\t\t\t//for each words in dictionary\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\t//for each topic\n\t\t\t\tfor (level = 0; level < numLevels; level++) {\n\t\t\t\t\tnode = path[level];\n\t\t\t\t\tmultinomial[type] +=\n\t\t\t\t\t\tlevelWeights[level] * \n\t\t\t\t\t\t(eta + node.typeCounts[type]) /\n\t\t\t\t\t\t(etaSum + node.totalTokens);\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t//convert to log\n\t\t\tfor (type = 0; type < numTypes; type++) {\n\t\t\t\tmultinomial[type] = Math.log(multinomial[type]);\n\t\t\t}\n\n\t\t\t//calculate document likelihoods \n\t\t\tfor (doc=0; doc<testing.size(); doc++) {\n fs = testing.get(doc);\n seqLen = fs.size();\n \n for (token = 0; token < seqLen; token++) {\n type = fs.get(token);\n likelihoods[doc][sample] += multinomial[type];\n }\n }\n\t\t}\n\t\n double averageLogLikelihood = 0.0;\n double logNumSamples = Math.log(numSamples);\n for (doc=0; doc<testing.size(); doc++) {\n \t\n \t//find the max for normalization, avoid overflow of sum\n double max = Double.NEGATIVE_INFINITY;\n for (sample = 0; sample < numSamples; sample++) {\n if (likelihoods[doc][sample] > max) {\n max = likelihoods[doc][sample];\n }\n }\n\n double sum = 0.0;\n //normalize \n for (sample = 0; sample < numSamples; sample++) {\n sum += Math.exp(likelihoods[doc][sample] - max);\n }\n\n //calc average\n averageLogLikelihood += Math.log(sum) + max - logNumSamples;\n }\n\n\t\treturn averageLogLikelihood;\n }",
"public void createLog(double initialFitness, double mst) {\n createLog(initialFitness, mst, null, null);\n }",
"public static double exp(double[] parameters) {\r\n double lambda;\r\n lambda = parameters[0];\r\n return -Math.log(1 - uniform()) / lambda;\r\n }",
"private double entropy(double x) {\r\n\t\tif (x > 0)\r\n\t\t\treturn -(x * (Math.log(x) / Math.log(2.0)));\r\n\t\telse\r\n\t\t\treturn 0.0;\r\n\t}",
"public abstract double log2Prior(double betaForDimension, int dimension);",
"public List<Vec> sample(int count, Random rand);",
"public static double [] logarithm (double [][]x){\n\t\tdouble [] log=new double [x.length-1];\n\t\t\n\t\tfor(int i=0; i<x.length-1;i++){\n\t\t\tdouble[] xk1=x[i+1];\n\t\t\tdouble[] xk=x[i];\n\t\t\tlog[i]=Math.log10(Math.max( Math.abs(xk1[0] - xk[0]), Math.abs(xk1[1] - xk[1]) ));\n\t\t\t\n\t\t}\n\t\t\n\t\treturn log;\n\t}",
"public Series logarithmic()\n {\n Series logarithmic = new Series();\n logarithmic.x = new double[logarithmic.size = size];\n logarithmic.r = r;\n for(int t = 0; t<size; t++)\n logarithmic.x[t] = Math.log(x[t]);\n return logarithmic;\n }",
"public void computeLogLikelihood(double[] betas, Instances instances) {\n //Basic implementation done in the prior class.\n super.computelogLikelihood(betas, instances);\n }",
"@Test\n public void whenLogarithmicFunctionThenLogarithmicResults() {\n FunctionMethod functionMethod = new FunctionMethod();\n List<Double> result = functionMethod.diapason(16, 18, x -> Math.log(x) / Math.log(2.0));\n List<Double> expected = Arrays.asList(4D, 4.08746284125034D);\n assertThat(result, is(expected));\n }",
"public static Matrix log(Matrix matrix)\n {\n double base = Math.exp(1.0);\n return logN(base, matrix);\n }",
"private static double lg(double x) {\n return Math.log(x) / Math.log(2.0);\n }",
"public double getLogProb(double value) {\n checkHasParams();\n if (value < 0) {\n return Double.NEGATIVE_INFINITY;\n } else {\n return logLambda - lambda * value;\n }\n }",
"public double logProb(double[] cFactor) {\n\n double logProb = 0;\n for(int i = 0; i < cFactor.length; i++) {\n logProb += Math.log(cFactor[i]);\n }\n logProb = -logProb;\n return logProb;\n }",
"static double[] normalizeLogP(double[] lnP){\n double[] p = new double[lnP.length];\n \n // find the maximum\n double maxLnP = lnP[0];\n for (int i=1 ; i<p.length ; ++i){\n if (lnP[i] > maxLnP){\n maxLnP = lnP[i];\n }\n }\n \n // subtract the maximum and exponentiate\n // sum is guaranted to be >= 1.0;\n double sum = 0.0;\n for (int i=0 ; i<p.length ; ++i){\n p[i] = Math.exp(lnP[i] - maxLnP);\n if (!Double.isFinite(p[i])){\n p[i] = 0.0;\n }\n sum = sum + p[i];\n }\n \n // normalize sum to 1\n for (int i=0 ; i<p.length ; ++i){\n p[i] = p[i]/sum;\n }\n return p;\n }",
"public static double logPdf(double x, double mean, double variance) {\n\t\tif (variance != 0) {\n\t\t\tdouble result = -0.5 * Math.log(2 * Math.PI) - 0.5 * Math.log(variance)\n\t\t\t\t- Math.pow(x - mean, 2) / (2 * variance);\n\t\t\treturn result;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"public static final float log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tif (x == 1f) {\n \t\t\treturn 0f;\n \t\t}\n \t\t// Argument of _log must be (0; 1]\n \t\tif (x > 1f) {\n \t\t\tx = 1 / x;\n \t\t\treturn -_log(x);\n \t\t}\n \t\t;\n \t\t//\n \t\treturn _log(x);\n \t}",
"public static Matrix logN(double base, Matrix matrix)\n {\n Matrix result = null;\n try\n {\n result = logN(matrix, base);\n }\n catch (Exception ex)\n {\n }\n return result;\n }",
"public static double lg(double x) {\n return Math.log(x) / Math.log(2);\n }",
"@Override\r\n\tpublic Log getLog() {\n\t\treturn log;\r\n\t}",
"void log();",
"private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"static private float _log(float x) {\n \t\tif (!(x > 0f)) {\n \t\t\treturn Float.NaN;\n \t\t}\n \t\t//\n \t\tfloat f = 0f;\n \t\t//\n \t\tint appendix = 0;\n \t\twhile ((x > 0f) && (x <= 1f)) {\n \t\t\tx *= 2f;\n \t\t\tappendix++;\n \t\t}\n \t\t//\n \t\tx /= 2f;\n \t\tappendix--;\n \t\t//\n \t\tfloat y1 = x - 1f;\n \t\tfloat y2 = x + 1f;\n \t\tfloat y = y1 / y2;\n \t\t//\n \t\tfloat k = y;\n \t\ty2 = k * y;\n \t\t//\n \t\tfor (long i = 1; i < 10; i += 2) {\n \t\t\tf += k / i;\n \t\t\tk *= y2;\n \t\t}\n \t\t//\n \t\tf *= 2f;\n \t\tfor (int i = 0; i < appendix; i++) {\n \t\t\tf += FLOAT_LOGFDIV2;\n \t\t}\n \t\t//\n //\t\tlogger.info(\"exit _log\" + f);\n \t\treturn f;\n \t}",
"WeightedRandomSampling(double[] w){\n int len = w.length;\n aggregatedW = new double[len];\n counts = new int[len];\n double temp = 0;\n\n for(int i=0; i<len; i++){\n aggregatedW[i] = temp;\n //System.out.println(aggregatedW[i]);\n temp+= w[i];\n }\n }",
"private static int getlog(int operand, int base) {\n double answ = Math.log(operand)/Math.log(base);\n if (answ == Math.ceil(answ)) {\n return (int)answ;\n }\n else {\n return (int)answ+1;\n }\n }",
"public static double exponential( double lambda ) {\n return -Math.log( 1 - Math.random() ) / lambda;\n }",
"private double randomLandau(double mu, double sigma, Random aRandom) {\n\t \n if (sigma <= 0) return 0;\n \n double res = mu + landau_quantile(aRandom.nextDouble(), sigma);\n return res;\n }",
"@java.lang.Override\n public double getSamplingProbability() {\n return samplingProbability_;\n }",
"public static int pickRandomLog(ArrayList<Sprite> list) {\n\n Iterator<Sprite> itr = list.iterator();\n\n int logs = 0;\n\n while(itr.hasNext()) {\n\n Sprite sprite = itr.next();\n\n if (sprite instanceof Log || sprite instanceof LongLog) {\n logs++;\n }\n\n\n }\n\n return random.nextInt(logs);\n }",
"public static String logaritName(double base) {\n\t\tif (base == Math.E)\n\t\t\treturn \"log\";\n\t\telse if (base == 10)\n\t\t\treturn \"log10\";\n\t\telse\n\t\t\treturn \"log\" + MathUtil.format(base);\n\t}",
"public double simulate(){\n\t\tdouble r = Math.sqrt(-2 * Math.log(Math.random()));\n\t\tdouble theta = 2 * Math.PI * Math.random();\n\t\treturn Math.exp(location + scale * r * Math.cos(theta));\n\t}",
"public static double genExp(double a) {\r\n\t\tdouble x = 1 - generator.nextDouble();\r\n\t\tdouble exp = -1 * Math.log(x) * a;\r\n\t\treturn exp;\r\n\r\n\t}",
"@Test\n public void whenInvokeThenReturnsLogarithmValues() {\n Funcs funcs = new Funcs();\n\n List<Double> expected = Arrays.asList(0D, 0.301D, 0.477D);\n List<Double> result = funcs.range(1, 3,\n (pStart) -> {\n double resultValue = Math.log10(pStart);\n resultValue = Math.rint(resultValue * 1000) / 1000;\n return resultValue;\n });\n\n assertThat(result, is(expected));\n }",
"public static double logDeterminant(Matrix amat){\r\n \tint n = amat.nrow;\r\n \tif(n!=amat.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble det = 0.0D;\r\n \tMatrix ludmat = amat.luDecomp();\r\n\r\n\t \tdet = ludmat.dswap;\r\n\t \tdet=Math.log(det);\r\n \tfor(int j=0; j<n; j++){\r\n \t\tdet += Math.log(ludmat.matrix[j][j]);\r\n \t}\r\n \t\treturn det;\r\n \t}",
"public double nextDouble(){\r\n\t\tlong rand = nextLong();\r\n\t\treturn (double)(rand & 0x000fffffffffffffL)/((double)0x000fffffffffffffL);\r\n\t}",
"public double logpdf(int[][] table) {\n int n = 0;\n int N = 0;\n // Marginals from rows\n double logP = 0;\n for (int[] table1 : table) {\n int rMarginals = table1[0] + table1[1];\n N += rMarginals;\n n += table1[0];\n logP += logFactorial.getLogFactorial(rMarginals) - logFactorial.getLogFactorial(table1[0]) - logFactorial.getLogFactorial(table1[1]);\n }\n logP+= -(logFactorial.getLogFactorial(N)-logFactorial.getLogFactorial(n)-logFactorial.getLogFactorial(N-n));\n return logP;\n }",
"double entropyArray(int[] A, int total) {\r\n\t\tdouble en = 0;\r\n\t\tdouble a;\r\n\t\tfor (int i = 0; i < num_class; i++) {\r\n\t\t\ta = (double) A[i] / (double) total;\r\n\t\t\tif (a > 0) {\r\n\t\t\t\ten -= a * Math.log(a);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn en;\r\n\t}",
"Log getHarvestLog(String dsID) throws RepoxException;",
"private Log getLog() {\n if (controller != null) {\n log = controller.getLog();\n } \n return log ;\n }",
"public Logger getLog () {\n return log;\n }",
"public static Matrix logN(Matrix matrix, double base)\n {\n double b = 1.0;\n double[][] temp = matrix.getArray();\n int row = matrix.getRowDimension();\n int col = matrix.getColumnDimension();\n double[][] result = new double[row][col];\n if (base <= 0)\n {\n throw new IllegalArgumentException(\n \"logN : Negative or zero base result in a Complex Number or negative Infinity.\");\n }\n\n b = Math.log(base);\n for (int i = 0; i < row; i++)\n {\n for (int j = 0; j < col; j++)\n {\n if (temp[i][j] == 0.0)\n {\n result[i][j] = Double.NEGATIVE_INFINITY;\n }\n else if (temp[i][j] < 0.0)\n {\n result[i][j] = Double.NaN;\n }\n else\n {\n result[i][j] = Math.log(temp[i][j]) / b;\n }\n }// end for\n }// end for\n return new Matrix(result);\n }",
"public abstract double samplingFrequency();",
"public final double sample(double x) {\n\t\t//System.out.println(a+\"*x*x*x + \"+b+\"*x*x + \"+d);\n\t\treturn a*x*x*x + b*x*x + d;\n\t}",
"public final void rand() {\n\t\tpush(randomNumberGenerator.nextDouble());\n\t}",
"public static float nlog(float x) {\n if (x == 1) return 0;\n\n float agm = 1f;\n float g1 = 1 / (x * (1 << (DEFAULT_ACCURACY - 2)));\n float arithmetic;\n float geometric;\n\n for (int i = 0; i < 5; i++) {\n arithmetic = (agm + g1) / 2f;\n geometric = BAKSH_sqrt(agm * g1);\n agm = arithmetic;\n g1 = geometric;\n }\n\n return (PI / 2f) * (1 / agm) - DEFAULT_ACCURACY * LN2;\n }",
"public static double sumInLogDomain(double[] logs) {\n\t\tdouble maxLog = logs[0];\n\t\tint idxMax = 0;\n\t\tfor (int i = 1; i < logs.length; i++) {\n\t\t\tif (maxLog < logs[i]) {\n\t\t\t\tmaxLog = logs[i];\n\t\t\t\tidxMax = i;\n\t\t\t}\n\t\t}\n\t\t// now calculate sum of exponent of differences\n\t\tdouble sum = 0;\n\t\tfor (int i = 0; i < logs.length; i++) {\n\t\t\tif (i == idxMax) {\n\t\t\t\tsum++;\n\t\t\t} else {\n\t\t\t\tsum += Math.exp(logs[i] - maxLog);\n\t\t\t}\n\t\t}\n\t\t// and return log of sum\n\t\treturn maxLog + Math.log(sum);\n\t}",
"protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }",
"public static double fastRandomDouble(){\n\t\treturn rdm.nextDouble();\n\t\t//return rdm.nextDoubleFast();\n\t\t//return ((double)(fastRandomInt()) - ((double)Integer.MIN_VALUE)) / (-(Integer.MIN_VALUE * 2.0));\n\t}",
"private static double entropy(Comparable[] a) {\n Arrays.sort(a);\n \n int N = a.length;\n int f = 1;\n double H = 0.0;\n \n for (int i = 1; i < N; i++) {\n if (a[i].compareTo(a[i-1]) == 0) {\n f++;\n }\n else {\n H = H + 1.0 * f/N * lg(1.0 * f/N);\n f = 1;\n }\n }\n H = H + 1.0 * f/N * lg(1.0 * f/N);\n H = H/lg(N);\n return (H < 0.0) ? -H : H; //Conditional operator \"?\"\n }",
"public Log getLog() {\r\n return this.delegate.getLog();\r\n }",
"public double readLightLevel()\n {\n return (Math.random() * (200000.0 - 0.0)) + 0.0;\n }",
"Appendable getLog();"
] | [
"0.77521574",
"0.7263348",
"0.62198627",
"0.5805752",
"0.57689786",
"0.55943674",
"0.5578457",
"0.5561069",
"0.5507845",
"0.54904234",
"0.540424",
"0.5350082",
"0.52970517",
"0.52497727",
"0.5207216",
"0.51814073",
"0.5157055",
"0.5153915",
"0.5146563",
"0.5118949",
"0.5098047",
"0.50953203",
"0.50852156",
"0.50801677",
"0.50665027",
"0.50555456",
"0.50454694",
"0.5042081",
"0.5040814",
"0.5038102",
"0.5021537",
"0.49894285",
"0.49537587",
"0.49397323",
"0.49275032",
"0.49268672",
"0.4925447",
"0.4880176",
"0.48630598",
"0.48589206",
"0.4856807",
"0.4849527",
"0.48486468",
"0.48330393",
"0.4786357",
"0.47669825",
"0.47626552",
"0.475248",
"0.4730742",
"0.4727076",
"0.47224864",
"0.47023278",
"0.4701356",
"0.46961507",
"0.46941522",
"0.46574157",
"0.46571863",
"0.46470758",
"0.46463463",
"0.46428806",
"0.46200252",
"0.46184027",
"0.45886263",
"0.45880583",
"0.45736432",
"0.45698166",
"0.45693126",
"0.45676053",
"0.4563969",
"0.45566314",
"0.45495796",
"0.45478666",
"0.45202604",
"0.45189774",
"0.4517772",
"0.45143765",
"0.45134735",
"0.44948608",
"0.44898525",
"0.4483286",
"0.4448328",
"0.4446718",
"0.4445419",
"0.4443354",
"0.44288844",
"0.44161403",
"0.44142613",
"0.44132978",
"0.44121364",
"0.44024885",
"0.43986538",
"0.43973756",
"0.4391655",
"0.43845454",
"0.4376204",
"0.43721765",
"0.4371648",
"0.43702853",
"0.43662223",
"0.43566912"
] | 0.77159065 | 1 |
ServoConRemote/LongProcessOperations.java . Generated by the IDLtoJava compiler (portable), version "3.2" from ServoConRemote_v2.idl Wednesday, April 19, 2017 6:32:20 PM MSK waiting for long process pull model | public interface LongProcessOperations
{
ServoConRemote.LongProcessPackage.Status Completed ();
//message is empty on success
String Message ();
double Progress ();
void Detach ();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static long processLongCommand(Map mapCommands, Object oArg, long lDefault)\n throws UnsupportedOperationException\n {\n Object value = mapCommands.get(oArg);\n return (value == null ? lDefault : Long.parseLong((String) value));\n }",
"public native long __longMethod( long __swiftObject, long arg );",
"public long readLong() {\n\t\tif(!isInit) return 0L;\n\t\tlong result = 0L;\n\t\tisListening = true;\n\t\twriteLine(\"Waiting for Long input...\");\n\t\twhile(isListening) {\n\t\t\ttry {\n\t\t\t\tresult = Long.parseLong(inputArea.getText());\n\t\t\t} catch(NumberFormatException nfe) {\n\t\t\t\tresult= 0L;\n\t\t\t}\n\t\t}\n\t\tinputArea.setText(\"\");\n\t\twriteLine(\"Input: \" + result);\n\t\treturn result;\n\t}",
"public long getLongValue() {\n return longValue_;\n }",
"public long getLongValue() {\n return longValue_;\n }",
"public long executeLong(VirtualFrame frame) throws UnexpectedResultException {\n return SplTypesGen.expectLong(executeGeneric(frame));\n }",
"public long readLong() {\n while (isEmpty()) {\n }\n Timing.waitSyncLocal();\n readEnable.setNow(1);\n Timing.waitClockLocal();\n return (readData.getLong());\n }",
"public long readLongLE()\r\n/* 853: */ {\r\n/* 854:862 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 855:863 */ return super.readLongLE();\r\n/* 856: */ }",
"public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(longToken_);\n }",
"public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(longToken_);\n }",
"private long getLong() {\n longBuffer.rewind();\n archive.read(longBuffer);\n longBuffer.flip();\n return longBuffer.getLong();\n }",
"public final Long _parseLong(JsonParser jVar, DeserializationContext gVar) throws IOException {\n int m = jVar.mo29329m();\n if (m == 3) {\n return (Long) _deserializeFromArray(jVar, gVar);\n }\n if (m == 11) {\n return (Long) _coerceNullToken(gVar, this._primitive);\n }\n switch (m) {\n case 6:\n String trim = jVar.mo29334t().trim();\n if (trim.length() == 0) {\n return (Long) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Long) _coerceTextualNull(gVar, this._primitive);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n return Long.valueOf(NumberInput.m23786b(trim));\n } catch (IllegalArgumentException unused) {\n return (Long) gVar.mo31517b(this._valueClass, trim, \"not a valid Long value\", new Object[0]);\n }\n case 7:\n return Long.valueOf(jVar.mo29248D());\n case 8:\n if (!gVar.mo31509a(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) {\n _failDoubleToIntCoercion(jVar, gVar, \"Long\");\n }\n return Long.valueOf(jVar.mo29297L());\n default:\n return (Long) gVar.mo31493a(this._valueClass, jVar);\n }\n }",
"com.google.protobuf.ByteString\n getLongTokenBytes();",
"com.google.protobuf.ByteString\n getLongTokenBytes();",
"long getLongValue();",
"long getLongValue();",
"public interface Process extends Remote {\n\t\n\t/**\n\t * This method tells if the process is alive and can participate in leader election.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean isAlive() throws RemoteException;\n\t\n\t/**\n\t * This method tells if the process in a leader in distributed environment.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean isLeader() throws RemoteException;\n\t\n\t/**\n\t * This method gets the logical clock value (random) for this process.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic int getLogicalClock() throws RemoteException;\n\t\n\t/**\n\t * This method gets the process name, given during initialization.\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic String getProcessName() throws RemoteException;\n\t\n\t/**\n\t * This method gets called in election to compare the logical clock values.\n\t * @param message\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean inquiry(Message message) throws RemoteException;\n\t\n\t/**\n\t * This method is called to announce victory after the election.\n\t * @param message\n\t * @return\n\t * @throws RemoteException\n\t */\n\tpublic boolean victory(Message message) throws RemoteException;\n\n}",
"public abstract int read_long();",
"public long readLong()\r\n/* 435: */ {\r\n/* 436:448 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 437:449 */ return super.readLong();\r\n/* 438: */ }",
"public LongResponseTaskWithProgress longResponse()\n {\n if ( task == null )\n {\n task = new LongResponseTask( user(), result, context() );\n }\n return task;\n }",
"public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return instance.getLongTokenBytes();\n }",
"public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return instance.getLongTokenBytes();\n }",
"public long callLong(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getLong(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to long\", e);\r\n\t\t}\r\n\t}",
"private long read_long(MappedByteBuffer buff) throws IOException {\n long number = 0;\n for (int i = 0; i < 8; ++i) {\n number += ((long) (buff.get() & 0xFF)) << (8 * i);\n }\n return number;\n }",
"public ByteBuf writeLongLE(long value)\r\n/* 877: */ {\r\n/* 878:886 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 879:887 */ return super.writeLongLE(value);\r\n/* 880: */ }",
"public native long[] __longArrayMethod( long __swiftObject, long[] arg );",
"public void setLong(String parName, long parVal) throws HibException;",
"public final long long_literal() throws RecognitionException {\n long value = 0;\n\n\n CommonTree LONG_LITERAL192 = null;\n\n try {\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1187:3: ( LONG_LITERAL )\n // D:\\\\decomplier_tools\\\\smali\\\\smali\\\\smali\\\\src\\\\main\\\\antlr3\\\\smaliTreeWalker.g:1187:5: LONG_LITERAL\n {\n LONG_LITERAL192 = (CommonTree) match(input, LONG_LITERAL, FOLLOW_LONG_LITERAL_in_long_literal3262);\n value = LiteralTools.parseLong((LONG_LITERAL192 != null ? LONG_LITERAL192.getText() : null));\n }\n\n } catch (RecognitionException re) {\n reportError(re);\n recover(input, re);\n } finally {\n // do for sure before leaving\n }\n return value;\n }",
"public ByteBuf writeLong(long value)\r\n/* 557: */ {\r\n/* 558:568 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 559:569 */ return super.writeLong(value);\r\n/* 560: */ }",
"private void createMulLong(Code32 code, int op, int cond, int RdHigh, int RdLow, int Rn, int Rm) {\r\n\t\tcode.instructions[code.iCount] = (cond << 28) | op | (RdHigh << 16) | (RdLow << 12) | (Rm << 8) | (0x9 << 4) | Rn;\r\n\t\tcode.incInstructionNum();\r\n\t}",
"long readLong();",
"public void setLoadCommandID(java.lang.Long value);",
"public void setLoadCommandID(java.lang.Long value);",
"public void setCvpOperationLobsLength(long value)\n {\n if(__cvpOperationLobsLength != value)\n {\n _isDirty = true;\n }\n __cvpOperationLobsLength = value;\n }",
"@Override\r\n\tpublic long getLong(int pos) {\n\t\treturn buffer.getLong(pos);\r\n\t}",
"public long readLongNonBlock() {\n Timing.throughputLocal(0);\n readEnable.setNow(1);\n Timing.waitClockLocal();\n return (readData.getLong());\n }",
"public abstract long nextLong();",
"public void setNumToProcess(long aNumToProcess) {\n numToProcess = aNumToProcess;\n }",
"public static LongBuffer createLongBuffer(int longs) {\n SimpleLogger.d(BufferUtils.class, \"Creating long buffer with int size: \" + longs);\n return ByteBuffer.allocateDirect(longs * 8).order(ByteOrder.nativeOrder()).asLongBuffer();\n\n }",
"public long get_long() {\n return local_long;\n }",
"@Override\n\tpublic void visit(LongValue arg0) {\n\t\t\n\t}",
"protected void sequence_LONG_LITERAL(ISerializationContext context, LONG_LITERAL semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getLONG_LITERAL_L()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getLONG_LITERAL_L()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getLONG_LITERALAccess().getLLParserRuleCall_1_0(), semanticObject.getL());\n\t\tfeeder.finish();\n\t}",
"private long getNumberBufAsLong(ByteOrder byteOrder, int nrReadBytes,\n int firstBytePos) {\n\n long result = 0L;\n long bytePortion = 0L;\n for (int i = 0; i < nrReadBytes; i++) {\n bytePortion = 0xFF & (byteBuffer.get(firstBytePos++));\n\n if (byteOrder == ByteOrder.LittleEndian)\n // reshift bytes\n result = result | bytePortion << (i << 3);\n else\n result = bytePortion << ((nrReadBytes - i - 1) << 3) | result;\n }\n\n return result;\n }",
"public static long convertToLong(byte[] longBuffer)\r\n {\r\n if (longBuffer.length >= 8)\r\n {\r\n return (((long) longBuffer[0] << 56)\r\n + ((long) (longBuffer[1] & 255) << 48)\r\n + ((long) (longBuffer[2] & 255) << 40)\r\n + ((long) (longBuffer[3] & 255) << 32)\r\n + ((long) (longBuffer[4] & 255) << 24)\r\n + ((longBuffer[5] & 255) << 16)\r\n + ((longBuffer[6] & 255) << 8) + ((longBuffer[7] & 255) << 0));\r\n }\r\n return 0;\r\n }",
"public void setCvpOperationLength(long value)\n {\n if(__cvpOperationLength != value)\n {\n _isDirty = true;\n }\n __cvpOperationLength = value;\n }",
"public boolean isLong() {\n return _isLong;\n }",
"Long mo20729a();",
"public long getMyLong() {\n return myLong;\n }",
"public long getLongValue() {\n if (typeCase_ == 3) {\n return (java.lang.Long) type_;\n }\n return 0L;\n }",
"public String getLongDescription() {\r\n\t\treturn longDescription;\r\n\t}",
"public String getLongToken() {\n return longToken_;\n }",
"public String getLongToken() {\n return longToken_;\n }",
"private final RPC<T> remote_compute( int nlo, int nhi ) {\n // No remote work?\n if( !(nlo < nhi) ) return null;\n int node = addShift(nlo);\n assert node != H2O.SELF.index();\n T rpc = clone();\n rpc.setCompleter(null);\n rpc._nhi = (short)nhi;\n addToPendingCount(1); // Not complete until the RPC returns\n // Set self up as needing completion by this RPC: when the ACK comes back\n // we'll get a wakeup.\n return new RPC(H2O.CLOUD._memary[node], rpc).addCompleter(this).call();\n }",
"private final RPC<T> remote_compute( int lo, int hi ) {\n int mid = (hi+lo)>>>1;\n T rpc = clone();\n rpc._nlo = lo;\n rpc._nhi = hi;\n addToPendingCount(1); // Not complete until the RPC returns\n // Set self up as needing completion by this RPC: when the ACK comes back\n // we'll get a wakeup.\n return new RPC(H2O.CLOUD._memary[mid], rpc).addCompleter(this).call();\n }",
"public long longValue() {\n return number;\n }",
"public long getLongValue() {\n if (getValueIndex() <= 0)\n return 0L;\n return ((LongEntry) getPool().getEntry(getValueIndex())).getValue();\n }",
"@Override\n\tpublic void visit(LongValue arg0) {\n\n\t}",
"@Override\n public boolean onLongClick(View v) {\n runningNumber = \"\";\n result = 0;\n currentOperation = null;\n Display_Text.setText(\"\");\n return true;\n }",
"final long internalLongLock() {\n return byteBase.longLockPointer();\n }",
"public long getLong(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Long.parseLong(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for long integer configuration parameter: \" + key);\n\t\t}\n\t}",
"public Long getLong(String key) throws JsonException {\r\n\t\tObject object = get(key);\r\n\t\tLong result = PrimitiveDataTypeConvertor.toLong(object);\r\n\t\tif (result == null) {\r\n\t\t\tthrow PrimitiveDataTypeConvertor.exceptionType(key, object, \"Long\");\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public final EObject ruleLongLiteral() throws RecognitionException {\n EObject current = null;\n\n Token lv_value_1_0=null;\n\n enterRule(); \n \n try {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1693:28: ( ( () ( (lv_value_1_0= RULE_LONG ) ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1694:1: ( () ( (lv_value_1_0= RULE_LONG ) ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1694:1: ( () ( (lv_value_1_0= RULE_LONG ) ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1694:2: () ( (lv_value_1_0= RULE_LONG ) )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1694:2: ()\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1695:5: \n {\n if ( state.backtracking==0 ) {\n\n current = forceCreateModelElement(\n grammarAccess.getLongLiteralAccess().getLongLiteralAction_0(),\n current);\n \n }\n\n }\n\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1700:2: ( (lv_value_1_0= RULE_LONG ) )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1701:1: (lv_value_1_0= RULE_LONG )\n {\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1701:1: (lv_value_1_0= RULE_LONG )\n // ../com.jaspersoft.studio.editor.jrexpressions/src-gen/com/jaspersoft/studio/editor/jrexpressions/parser/antlr/internal/InternalJavaJRExpression.g:1702:3: lv_value_1_0= RULE_LONG\n {\n lv_value_1_0=(Token)match(input,RULE_LONG,FOLLOW_RULE_LONG_in_ruleLongLiteral4058); if (state.failed) return current;\n if ( state.backtracking==0 ) {\n\n \t\t\tnewLeafNode(lv_value_1_0, grammarAccess.getLongLiteralAccess().getValueLONGTerminalRuleCall_1_0()); \n \t\t\n }\n if ( state.backtracking==0 ) {\n\n \t if (current==null) {\n \t current = createModelElement(grammarAccess.getLongLiteralRule());\n \t }\n \t\tsetWithLastConsumed(\n \t\t\tcurrent, \n \t\t\t\"value\",\n \t\tlv_value_1_0, \n \t\t\"LONG\");\n \t \n }\n\n }\n\n\n }\n\n\n }\n\n\n }\n\n if ( state.backtracking==0 ) {\n leaveRule(); \n }\n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }",
"public long readVarLong() throws IOException {\n final int type = (int) this.read(2).toLong();\n return this.read(BitOutputStream.varLongDepths[type]).toLong();\n }",
"public static long readlong()\n\t{\n\t\treturn sc.nextLong();\n\t}",
"public static int getLongPressTimeout() {\n return sLongPressTimeout;\n }",
"public long getLong(String key, long defValue) {\r\n\t\treturn getLong(Global.getContext(), key, defValue);\r\n\t}",
"public static long toLong(IRubyObject irb) {\n\t\treturn Long.valueOf(irb.toString());\n\t}",
"@NonNull\n static LongConsList<Long> longList(@NonNull long... elements) {\n LongConsList<Long> cons = nil();\n for (int i = elements.length - 1; i >= 0; i--) {\n cons = new LongConsListImpl(elements[i], cons);\n }\n return cons;\n }",
"public long getCvpOperationLobsLength()\n {\n \n return __cvpOperationLobsLength;\n }",
"private synchronized long readLong(int len) throws IOException {\n\t\tread(bytes, len);\n\t\treturn readLong(bytes, 0, len);\n\t}",
"public NbaVpmsVO updateLobFieldsForProcess(NbaVpmsVO vpmsVo, VpmsComputeResult result, String aDelimiter) throws NbaBaseException {\n\tNbaStringTokenizer tokens = new NbaStringTokenizer(result.getResult().trim(), aDelimiter);\n\tString aToken = tokens.nextToken(); // First token is empty - don't need it.\n\tint lobCount = 0;\n\twhile (tokens.hasMoreTokens()) {\n\t\tlobCount++;\n\t\tif (lobCount > 5)\n\t\t\tbreak;\n\t\taToken = tokens.nextToken();\n\t\tif (aToken.equals(NbaVpmsAdaptor.IGNORE))\n\t\t\treturn vpmsVo;\n\t\t// use reflection to get the setLob? with the value for the LOB in the token.\n\t\t// must use reflection to get the LOB field, too.\n\t\tClass v = vpmsVo.getClass();\n\t\tClass[] parameter = new Class[] { String.class };\n\t\tMethod setLobMethod;\n\t\ttry {\n\t\t\tClass l = NbaUtils.classForName(\"com.csc.fsg.nba.vo.NbaLob\");\n\t\t\tMethod getLobValue;\n\t\t\tObject lobValue;\n\t\t\ttry {\n\t\t\t\tgetLobValue = l.getMethod(\"get\" + aToken, null);\n\t\t\t\tlobValue = getLobValue.invoke(vpmsVo, null);\n\t\t\t\tsetLobMethod = v.getMethod(\"setLob\" + String.valueOf(lobCount), parameter);\n\t\t\t\tObject[] argument = new Object[] { String.valueOf(lobValue) };\n\t\t\t\tsetLobMethod.invoke(vpmsVo, argument);\n\t\t\t} catch (NoSuchMethodException e) {\n\t\t\t\tNbaLogFactory.getLogger(this.getClass()).logException(e); //NBA103\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tNbaLogFactory.getLogger(this.getClass()).logException(e); //NBA103\n\t\t\t} catch (InvocationTargetException e) {\n\t\t\t\tNbaLogFactory.getLogger(this.getClass()).logException(e); //NBA103\n\t\t\t}\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tNbaLogFactory.getLogger(this.getClass()).logException(e); //NBA103\n\t\t}\n\t}\n\treturn vpmsVo;\n}",
"private String getLongInstruction(int nextVal) throws java.io.IOException {\n\t\treadUntilEndOfLine(nextVal);\n\t\treturn next;\n\t}",
"public Builder setLongValue(long value) {\n bitField0_ |= 0x00000020;\n longValue_ = value;\n onChanged();\n return this;\n }",
"public static Long toLong(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n if (((Boolean)o) == true) {\n return Long.valueOf(1);\n } else {\n return Long.valueOf(0);\n }\n\n case BYTE:\n return Long.valueOf(((Byte)o).longValue());\n\n case INTEGER:\n return Long.valueOf(((Integer)o).longValue());\n\n case LONG:\n return (Long)o;\n\n case FLOAT:\n return Long.valueOf(((Float)o).longValue());\n\n case DOUBLE:\n return Long.valueOf(((Double)o).longValue());\n\n case BYTEARRAY:\n return Long.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Long.valueOf((String)o);\n\n case BIGINTEGER:\n return Long.valueOf(((BigInteger)o).longValue());\n\n case BIGDECIMAL:\n return Long.valueOf(((BigDecimal)o).longValue());\n\n case NULL:\n return null;\n\n case DATETIME:\n return Long.valueOf(((DateTime)o).getMillis());\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Long\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Long.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Long.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n\n }",
"final Long getTimeoutValue()\n/* */ {\n/* 137 */ return this.timeout;\n/* */ }",
"public static long getLongProperty(String key) {\r\n\t\treturn getLongProperty(key, 0);\r\n\t}",
"public long applyIntToLong(int host);",
"long fetch64(BytesStore bytes, @NonNegative long off) throws IllegalStateException, BufferUnderflowException {\n return bytes.readLong(off);\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.LongDesc getLongDesc() {\r\n return longDesc;\r\n }",
"@ApiModelProperty(value = \"Last known longitude (Only for teachers/staff)\")\n public Double getLong() {\n return _long;\n }",
"protected MatrixToken _multiply(MatrixToken rightArgument)\n\t\t\tthrows IllegalActionException {\n\t\tLongMatrixToken convertedArgument = (LongMatrixToken) rightArgument;\n\t\tlong[] A = _value;\n\t\tlong[] B = convertedArgument._getInternalLongArray();\n\t\tint m = _rowCount;\n\t\tint n = _columnCount;\n\t\tint p = convertedArgument.getColumnCount();\n\t\tlong[] newMatrix = new long[m * p];\n\t\tint in = 0;\n\t\tint ta = 0;\n\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tta += n;\n\n\t\t\tfor (int j = 0; j < p; j++) {\n\t\t\t\tlong sum = 0;\n\t\t\t\tint ib = j;\n\n\t\t\t\tfor (int ia = i * n; ia < ta; ia++, ib += p) {\n\t\t\t\t\tsum += (A[ia] * B[ib]);\n\t\t\t\t}\n\n\t\t\t\tnewMatrix[in++] = sum;\n\t\t\t}\n\t\t}\n\n\t\treturn new LongMatrixToken(newMatrix, m, p, DO_NOT_COPY);\n\t}",
"public void setLongValue(long v)\n {\n this.setValue(String.valueOf(v));\n }",
"@Override\n\tpublic long javaMethodBaseWithULongLongRet() {\n\t\treturn 0;\n\t}",
"public static PersistentQueueX<Long> rangeLong(final long start, final long end) {\n return ReactiveSeq.rangeLong(start, end).to()\n .persistentQueueX(Evaluation.LAZY);\n }",
"public Long getLong(String key) throws AgentBuilderRuntimeException {\n\t\tif (!extContainsKey(key))\n\t\t\tthrow new AgentBuilderRuntimeException(\n\t\t\t\t\t\"Dictionary does not contain key \\\"\" + key + \"\\\"\");\n\t\treturn (Long) extGet(key);\n\t}",
"@Override\n public long applyAsLong(BytesStore bytes) {\n return applyAsLong(bytes, bytes.readRemaining());\n }",
"@ZenCodeType.Caster\n @ZenCodeType.Method\n default long asLong() {\n \n return notSupportedCast(BasicTypeID.LONG);\n }",
"public ReactiveLong(\n @NonNull @nonnull final String name,\n final long initialValue) {\n super(name, initialValue);\n }",
"@Override\r\n\tpublic Buffer setLong(int pos, long l) {\n\t\treturn null;\r\n\t}",
"public void setMyLong(long myLongIn) {\n myLong = myLongIn;\n }",
"public boolean hasLongValue() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }",
"String getLongToken();",
"String getLongToken();",
"long readLong() throws IOException;",
"@Override\n public long nextLong() {\n return super.nextLong();\n }",
"@Override\n\tpublic void onNext(Long value_long) {\n\t\tSystem.out.println(value_long);\n\t\titems.add(value_long);\n\t\t\n\t}",
"public Long getLong(String key)\n\t{\n\t\tverifyParseState();\n\t\t\n\t\tValue value = values.get(key);\n\t\tif(value == null || value.value == null)\n\t\t\treturn null;\n\t\tif(value.type != ValueType.LONG)\n\t\t\tthrow new JsonTypeException(value.value.getClass(), Long.class);\n\t\treturn (Long)value.value;\n\t}",
"public static BlockListAsLongs decodeLongs(List<Long> blocksList) {\n return decodeLongs(blocksList, IPC_MAXIMUM_DATA_LENGTH_DEFAULT);\n }",
"public long getLongProperty(String key) {\n\t\treturn Long.parseLong(this.getProperty(key));\n\t}",
"public List<Long> getLongList(final String key) {\n return getLongList(key, new ArrayList<>());\n }"
] | [
"0.5725628",
"0.52331704",
"0.5120162",
"0.50716114",
"0.5071396",
"0.49969774",
"0.498825",
"0.49715143",
"0.49469903",
"0.49469903",
"0.4943543",
"0.49354485",
"0.49289048",
"0.49289048",
"0.49263224",
"0.49263224",
"0.49229065",
"0.4880391",
"0.48759672",
"0.48697156",
"0.48665446",
"0.48665446",
"0.48626918",
"0.4861807",
"0.4850457",
"0.48404646",
"0.48027992",
"0.4796607",
"0.47763368",
"0.47677627",
"0.47652695",
"0.47557008",
"0.47557008",
"0.47351024",
"0.47327736",
"0.47232035",
"0.4719151",
"0.4707514",
"0.47009164",
"0.46887806",
"0.4687496",
"0.46750668",
"0.46670341",
"0.46551415",
"0.46539927",
"0.46505344",
"0.46447384",
"0.46393263",
"0.46372843",
"0.46367073",
"0.4622958",
"0.4622958",
"0.4619662",
"0.46193165",
"0.46179116",
"0.4612681",
"0.4606287",
"0.4605718",
"0.45892563",
"0.4587207",
"0.45768896",
"0.45763645",
"0.45642564",
"0.4563486",
"0.45555082",
"0.4550827",
"0.45508042",
"0.45445037",
"0.45409772",
"0.45389163",
"0.45327818",
"0.4526061",
"0.4524283",
"0.45235857",
"0.45224485",
"0.45223334",
"0.45222995",
"0.45176122",
"0.45116386",
"0.45099717",
"0.4507169",
"0.45007446",
"0.44995105",
"0.44933468",
"0.44895804",
"0.4483265",
"0.44827598",
"0.44814563",
"0.44774476",
"0.44756454",
"0.4473668",
"0.4471095",
"0.4471095",
"0.44700748",
"0.4468797",
"0.4466016",
"0.44633794",
"0.44626486",
"0.4454256",
"0.44518653"
] | 0.6225539 | 0 |
message is empty on success | String Message (); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void success() {\n showMessage(\"Congratulations!\", \"success\");\n }",
"@Override\n public void onSuccess(String message) {\n }",
"protected abstract String persistSucceededMessage();",
"@Override\n\tpublic String getMessage(String id) {\n\t\treturn \"success\";\n\t}",
"@Override\n protected SimpleMessage prepareMessage() {\n SimpleMessage message = super.prepareMessage();\n message.setContent(onFailure());\n return message;\n }",
"@Override\n public void onSuccess(String messageId) {\n System.out.println(messageId);\n }",
"void showSuccess(String message);",
"public String getRegisterSuccessMessage() {\n\t\twaitToElementVisible(driver,RegisterPageUI.REGISTER_SUCCEESS_MESSAGE);\n\t\treturn getElementText(driver,RegisterPageUI.REGISTER_SUCCEESS_MESSAGE);\n\t}",
"public String userSendMessage(){\r\n if( porukeBeanLocal.userSendMessage(userName, email, question)){\r\n return \"Success\";\r\n }\r\n return \"Failure\";\r\n }",
"private void success(Message original) {\n success(original, 0);\n }",
"public void testGetMessageSuccess() {\r\n assertNotNull(\"setup fails\", uploadRequestValidator);\r\n ResponseMessage responseMessage = new ResponseMessage(HANDLE_ID, REQUEST_ID);\r\n assertEquals(\"invalid return message\", \"the object is not type of RequestMessage\", uploadRequestValidator\r\n .getMessage(responseMessage));\r\n RequestMessage requestMessage = new RequestMessage(HANDLE_ID, REQUEST_ID);\r\n assertEquals(\"invalid return message\", \"the RequestMesage's type not equal with MessageType.CHECK_UPLOAD_FILE\",\r\n uploadRequestValidator.getMessage(requestMessage));\r\n Object[] args = new Object[2];\r\n args[0] = \"FILEID\";\r\n args[1] = new Long(Long.MAX_VALUE);\r\n requestMessage = new RequestMessage(HANDLE_ID, REQUEST_ID, MessageType.CHECK_UPLOAD_FILE, args);\r\n assertEquals(\"not enough diskspace, should return File size exceeds disk size message string\",\r\n \"File size exceeds disk size\", uploadRequestValidator.getMessage(requestMessage));\r\n args = new Object[2];\r\n args[0] = \"FILEID\";\r\n args[1] = new Long(1);\r\n requestMessage = new RequestMessage(HANDLE_ID, REQUEST_ID, MessageType.CHECK_UPLOAD_FILE, args);\r\n assertNull(\"there is enough diskspace, should return null\", uploadRequestValidator.getMessage(requestMessage));\r\n }",
"private String getStatusMessage() {\n\t\treturn (m_isTestPassed == true) ? \" successfully...\" : \" with failures...\";\n\t}",
"public String getUpdatedSuccessfullyMessagePresent() {\r\n\t\tString updateSuccessMessage = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Vehicle Updated successfully.\"), SHORTWAIT);\r\n\t\treturn updateSuccessMessage;\r\n\t}",
"public String getOk() {\r\n\t\treturn \"\";\r\n\t}",
"@Test\n public void resultMessageTest() {\n assertEquals(\"System: Accepted Transaction\", authResponse.getResultMessage());\n }",
"@Override\r\n\tpublic void getMessage() {\n\t\tSystem.out.println(\"getMessage() 출력...\");\r\n\t}",
"public String getTextVehicleAddedSuccessfullyMessage() {\r\n\t\tString successMessage = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Vehicle Added successfully.\"),\r\n\t\t\t\tMEDIUMWAIT);\r\n\t\treturn successMessage;\r\n\t}",
"public void getMessage() {\n\r\n\t}",
"@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tString flag = null;\r\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tflag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tif(\"no\".equals(flag)){\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty yes\");\r\n\t\t\t\t\t\t\t\tmessage.what = NOINFO_SUCCESS_CODE;\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tLoger.i(\"TEST\", \"topic is empty no\");\r\n\t\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tgetTopicHandler.sendMessage(message);\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\tLoger.i(\"TEST\", \"pullUpFromSrv-ERROR->\"+e.getMessage());\r\n\t\t\t\t\t\t\tmessage.what = INIT_FAILED_CODE;\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}",
"public String response() {\n\t\treturn message;\n\t}",
"public String getMessage(){\r\n return message;\r\n }",
"public String getMessage(){\r\n return message;\r\n }",
"@Override\n protected TMessage prepareMessage() {\n return SendSuccessOrFailure.this.prepareMessage();\n }",
"public String getTextAddVehicleGroupAddedSuccessfullyMessage() {\r\n\t\t\tString successMessage = safeGetText(addVehiclesHeader.replace(\"Add Vehicle\", \"Vehicle group added successfully.\"),MEDIUMWAIT);\r\n\t\t\treturn successMessage;\r\n\t}",
"public void returnMessage(String message);",
"@Override\n public void success(String data) {\n }",
"public String getMessage() { return message; }",
"String getMessage();",
"String getMessage();",
"String getMessage();",
"public String getMessage(){\n return(message);\n }",
"public static void ensureResultMessageIsSet() {\r\n final EventHandlerContext context = ContextStore.get().getEventHandlerContext();\r\n if (!context.parameterExists(RESULT_MESSAGE_PARAMETER)\r\n || StringUtil.isNullOrEmpty(context.getParameter(RESULT_MESSAGE_PARAMETER))) {\r\n context.addResponseParameter(RESULT_MESSAGE_PARAMETER, RESULT_MESSAGE_OK);\r\n }\r\n }",
"public String getMessage(){\n return message;\n }",
"@Override\n public void onSuccess(Void unused) {\n Snackbar.make(save, R.string.sucessfull_update, BaseTransientBottomBar.LENGTH_SHORT).show();\n }",
"public void showMessage(){\n\t jsfMessageHelper.addInfo(\"Mesaj:\", (messageTxt==null?\"?\":messageTxt));\r\n\t}",
"private String getMessage() {\n\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\r\n\t\t\r\n\t\tboolean addSign = prefs.getBoolean(\"addsign\", true);\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\tdefMessage = \"I am busy right now and will call you latter.\";\r\n\t\t\r\n\t\tfinalMessage = prefs.getString(\"message\", defMessage);\r\n\t\tif(finalMessage.equals(\"\"))\r\n\t\t\tfinalMessage = defMessage;\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// TODO: handle exception\r\n\t\t\tfinalMessage = defMessage;\r\n\t\t}\r\n\t\t\r\n\t\tif(addSign)\r\n\t\t\tfinalMessage += \"\\nSent using Calls and SMS Blocker for android.\\nDownload from: https://play.google.com/store/apps/details?id=com.atiffarrukh.callandsmsblocker\";\r\n\t\treturn finalMessage;\r\n\t}",
"@Override\n public void onSucceed(Object valor) {\n }",
"@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\t\tif(\"no\".equals(Flag)){\r\n\t\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\t\t\tnew Timer().schedule(new TimerTask() {\r\n\t\t\t\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\t\t\t\t\t\tPropertyRepairActivity.this.runOnUiThread(new Runnable() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnonemsgtext.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t}, 1000);\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");\r\n\t\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t\t}",
"@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\t\t}",
"public void userShouldGetMessage() {\n assertTextMessage(getTextFromElement(_emailResult), expected, \"Your message has been sent\");\n\n }",
"@Override\n public void handleMessage(Message msg) {\n Toast.makeText(context, \"complete!!!\", Toast.LENGTH_LONG);\n }",
"public String getTextVehicleDeletedSuccessfullyMessage() {\r\n\t\tString successMessage = safeGetText(\r\n\t\t\t\taddVehiclesHeader.replace(\"Add Vehicle\", \"Vehicle deleted successfully.\"),MEDIUMWAIT);\r\n\t\treturn successMessage;\r\n\t}",
"public Message(){\n super();\n this.status = RETURN_OK;\n put(\"status\",this.status.getCode());\n put(\"message\", this.status.getMessage());\n }",
"void messageSent();",
"public String getResponseMessage();",
"public String checkMessage() {\n\t\tString userLatestStep = questionBot.get(owner.id());\n\n\t\t//se a amensagem comeca com '/', trata-se de um item de menu sendo acionado\n\t\tif(answerUser != null && answerUser.startsWith(\"/\"))\n\t\t\tuserLatestStep = answerUser;\n\n\t\t//busca no mapa de respostas as opcoes para o usuario\n\t\tObject options = response.get(userLatestStep);\n\n\t\t//obtem a mensagem a ser devolvida para o usuario\n\t\tString result = parseResult(options, answerUser);\n\n\t\t//mantem a ultima resposta do usuario\n\t\tuserLatestAnswer.put(owner.id(), answerUser);\n\n\t\treturn result;\n\t}",
"private void clearSuccess() {\n \n success_ = false;\n }",
"private void clearSuccess() {\n \n success_ = false;\n }",
"private void clearSuccess() {\n \n success_ = false;\n }",
"protected abstract String persistFailedMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"java.lang.String getMessage();",
"public void onSuccess(Boolean arg0) {\n\t\t\t\t\t\tMessageBox.info(\"Hotovo\",\"plán v době svátků odebrán\",null);\n\t\t\t\t\t}",
"boolean getSuccess();",
"boolean getSuccess();",
"boolean getSuccess();",
"boolean getSuccess();",
"public String creerMessage(){\n return profile.getMessage();\n }",
"@Override\n public boolean handleMessage(Message message) {\n String respuestPostMensaje=(String) message.obj;\n Log.d(\"RespuestaPost\",respuestPostMensaje.toString());\n\n if(respuestPostMensaje.contains(\"correctamente\"))\n {\n Log.d(\"SeGeneroUser\",respuestPostMensaje.toString());\n //mostrar mensaje\n Toast toast1 = Toast.makeText(vistaRegistro.getActividad(),\"Se creo el usuario\", Toast.LENGTH_SHORT);\n toast1.setGravity(Gravity.CENTER,0,500);\n toast1.show();\n vistaRegistro.getActividad().finish();\n\n } else\n {\n Log.d(\"No se puedo crear User\",\"No se puedo crear User\");\n Toast toast1 = Toast.makeText(vistaRegistro.getActividad(),\"No se puedo crear el usuario\", Toast.LENGTH_SHORT);\n toast1.setGravity(Gravity.CENTER,0,500);\n toast1.show();\n vistaRegistro.getActividad().finish();\n\n }\n\n\n return true;\n }",
"public String getMessage(){\n return saisieMessage.getText();\n }",
"@Override\n public void onSuccess(Boolean result)\n {\n if (result)\n {\n System.out.println(\"user info successfully updated!\");\n Window.alert(\"Successfully updated!\");\n }\n else\n {\n System.out.println(\"something is wrong on the server side!\");\n }\n }",
"public String getMessage() {\n\t\tString toReturn = message;\n\t\tmessage=\"\";//delete the message\n\t\treturn toReturn;\n\t}",
"@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty=response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test5\", \"5555555555--->\"+response.toString());\r\n\t\t\t\t\t\t\tif(\"no\".equals(empty)){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes1111111111111\");\r\n\t\t\t\t\t\t\t}else if(\"ok\".equals(empty)){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}",
"public String getMessage(){\r\n\t\treturn message;\r\n\t}",
"public void assertMsgCheck() {\r\n\t\tassertEquals(successMsg.getText().substring(0,36), \"Success: You have modified products!\");\r\n\t\tSystem.out.println(\"Asserted that the msg has been displayed: \"+ successMsg.getText().substring(0,36));\r\n\t}",
"public String getMessage(){\n return this.message;\n }",
"@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONObject response) {\n\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tFlag = response.getString(\"flag\");\r\n\t\t\t\t\t\t\tString empty = response.getString(\"empty\");\r\n\t\t\t\t\t\t\tLoger.i(\"test4\", \"444444444--->\"+empty);\r\n\t\t\t\t\t\t\tif(empty.equals(\"no\")){\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty yes\");//已完成 和未完成都为空\r\n\t\t\t\t\t\t\t}else if(empty.equals(\"ok\")){\r\n\t\t\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\t\t\tLoger.i(\"test5\", \"baoxiutopic is empty no\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (JSONException e) {\r\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}",
"@Override\n public String execute() {\n return \"success\";\n }",
"String getStatusMessage();",
"@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}",
"public void playerSuccess(Player player, String message){\n\t\tplayer.sendMessage(ChatColor.GREEN + message);\n\t}",
"public ClearResult(String message) {\n this.message = message;\n }",
"private void showFinishMsg() {}",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"boolean isSuccess();",
"@Test\n\t\t\tpublic void getMessageTest() {\n\t\t\t\tString message;\n\t\t\t\tMessage msgjunit = new Message();\n\t\t\t\tString result = msgjunit.getMessage();\n\t\t\t\tif (result == null) {\n\n\t\t\t\t\tmessage = \"Is a Messages which is a String type\";\n\t\t\t\t} else {\n\n\t\t\t\t\tmessage = \"\";\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(\"Message is not empty: \" + result + \" \" + message);\n\t\t\t\tassertNotNull(\"Message is successfully returned: \" + result + \" \" + message);\n\t\t\t}",
"public void onClickSendMessage(View v) {\n\n String error = \"\";\n\n if (isEmpty(messageTittle)) {\n error = \"entra un titulo valido\";\n } else if (isEmpty(messageText)) {\n error = \"entra un mensaje valido\";\n } else {\n msgtittle = messageTittle.getText().toString();\n msgtext = messageText.getText().toString();\n\n }\n\n if (!error.equals(\"\")) {\n Toast.makeText(this, error, Toast.LENGTH_SHORT).show();\n } else {\n try {\n JMessage jmsg;\n jmsg = new JMessage(msgtext, msgtittle, gson.fromJson(MainActivity.juser, JUser.class), 1, jgroup.getGroupId());\n jmsg.setIdParent(1);\n\n\n Log.d(TAG, \"este es el jmessage a crear =\" + jmsg);\n NewMessage nm = new NewMessage(gson.toJson(jmsg));\n nm.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n protected void onSucceeded(String value) {\n }"
] | [
"0.7158388",
"0.7112216",
"0.70258856",
"0.683835",
"0.6793637",
"0.6781314",
"0.6752705",
"0.66717285",
"0.66503376",
"0.6634969",
"0.6562713",
"0.6473984",
"0.6473065",
"0.64531416",
"0.6435303",
"0.64278245",
"0.64031386",
"0.63702106",
"0.63684183",
"0.63552916",
"0.63473153",
"0.6303939",
"0.6303939",
"0.6301546",
"0.62775993",
"0.62764734",
"0.6257754",
"0.62472695",
"0.62442327",
"0.62442327",
"0.62442327",
"0.6235635",
"0.62235576",
"0.6220025",
"0.6200341",
"0.619034",
"0.61902106",
"0.61863476",
"0.6175555",
"0.6175555",
"0.6172077",
"0.616008",
"0.61570966",
"0.6156011",
"0.61338013",
"0.61314666",
"0.6129972",
"0.6111786",
"0.61114424",
"0.61114424",
"0.61114424",
"0.61101973",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.6103959",
"0.60964763",
"0.6081676",
"0.6081676",
"0.6081676",
"0.6081676",
"0.60814786",
"0.6081164",
"0.6073511",
"0.60699",
"0.60657716",
"0.6062808",
"0.60328597",
"0.6032691",
"0.602828",
"0.60107166",
"0.6008192",
"0.6000819",
"0.599484",
"0.59907544",
"0.5989698",
"0.5986884",
"0.5980218",
"0.5980218",
"0.5980218",
"0.5980218",
"0.5980218",
"0.5980218",
"0.5980218",
"0.59730905",
"0.5970827",
"0.5966172"
] | 0.6029031 | 82 |
User repository for get data from database. | @Repository("userRepository")
public interface UserRepository extends PagingAndSortingRepository<User, Long> {
/**
* Find user by the Email.
*
* @param email user email
* @return user
*/
User findByEmail(String email);
/**
* List all the active users.
*
* @param active active status
* @return users list
*/
List<User> findUserByActive(Integer active);
/**
* List active users with pagination.
*
* @param pageable page
* @param active active status
* @return user
*/
@Query(value = "SELECT user FROM User user WHERE user.active = :active")
Page<User> findByUserIsActive(Pageable pageable, @Param("active") Integer active);
/**
* Find user by the username.
*
* @param userName user name.
* @return user
*/
@Query(value = "SELECT user FROM User user WHERE user.active = 1 AND user.userName = :userName")
User findByUsername(@Param("userName") String userName);
/**
* Find user by the emailId.
*
* @param email email.
* @return user
*/
@Query(value = "SELECT user FROM User user WHERE user.active = 1 AND user.email = :email")
User findByEmailId(@Param("email") String email);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Repository(\"UserDAO\")\npublic interface UserDAO {\n public User selectUserFromId(int id);\n\n public List<User> selectUserFromName(String user);\n\n public List<User> selectUserFromCall(String callphone);\n\n public List<User> selectUserAll();\n\n public int insertUser(User user);\n\n public int deleteUser(int id);\n\n public int updateUser(User user);\n\n}",
"@Repository\npublic interface UserDao {\n public User getUser(Integer id);\n public int insertUser(Integer id);\n public int deletUser(Integer id);\n public int updateUser(User user);\n public List<User> findUsers(String username, RowBounds rowBounds);\n}",
"@Repository\r\npublic interface UserDao {\r\n\t/**\r\n\t * 获取全部用户信息\r\n\t */\r\n\tList<User> getAllUsers();\r\n\r\n\t/**\r\n\t * 通过登录名获取用户信息\r\n\t */\r\n\tUser getUserByDlm(String dlm);\r\n}",
"public interface UserDao {\n\n List<User> select(User user);\n\n List<User> selectAll();\n}",
"UserDao getUserDao();",
"public interface UserRepository {\n public List<User> list();\n\n public void add(User user);\n\n public User load(Long id);\n\n public void update(User user);\n\n public void delete(Long id);\n}",
"@Repository(value=\"userDao\")\npublic interface UserDao {\n //根据用户ID获取相应的用户名和密码\n UserBean selectByUserId(String userId);\n\n //添加用户\n void insertUser(UserBean userBean);\n\n //修改密码\n void updatePassword(UserBean userBean);\n\n //修改头像\n void updateFavicon(UserBean userBean);\n}",
"public User getUserData();",
"public interface UserDAO extends BaseObjectDAO<User>{\n List<User> getAllActiveUsers();\n User findUserByEmail(String email);\n User findUserByMobile(String mobile);\n}",
"public interface UserDao extends JpaRepository<UserInfo, Long> {\n UserInfo findByUserName(String userName);\n}",
"public interface UserDao extends RootDao<User> {\n\n User findByUsername(String username);\n\n List<User> getAll();\n}",
"public interface UserDAO \r\n{\r\n\t/**\r\n\t * Insert a new user into the table.\r\n\t * @param user\r\n\t */\r\n public void insert(User user);\r\n \r\n /**\r\n\t * Update an existing user into the table.\r\n\t * @param user\r\n\t */\r\n public void update(User user);\r\n \r\n /**\r\n\t * Update a user's current budget duration id.\r\n\t * @param user\r\n\t */\r\n public void updateDuration(User user);\r\n \r\n /**\r\n * Remove a user from the user table.\r\n * @param username\r\n */\r\n public void delete(String username);\r\n \r\n /**\r\n * Get a user corresponding to a username.\r\n * Easiest way to get a user.\r\n * @param userId\r\n * @return User\r\n */\r\n public User get(String username);\r\n \r\n /**\r\n * Get an user corresponding to a user's email.\r\n * @param email\r\n * @return User\r\n */\r\n public User getUserByEmail(String email);\r\n \r\n /**\r\n * Returns a list of all users in the user table.\r\n * @return List<User>\r\n */\r\n public List<User> list();\r\n \r\n /**\r\n * Returns a list of all users corresponding to a\r\n * username. This should only return one user.\r\n * @param currentUsername\r\n * @return List<User>\r\n */\r\n\tpublic List<User> list(String currentUsername);\r\n\t\r\n /**\r\n * Returns a list of all users with usernames like\r\n * the given string.\r\n * @param search\r\n * @return List<User>\r\n */\r\n\tpublic List<User> listSearch(String search);\r\n}",
"public interface UserDao {\n User findByPhone(String phone);\n\n User findByPassword(User user);\n}",
"@Repository\npublic interface UserDao extends JpaRepository<User, Integer> {\n User findByUsernameAndPassword(String username,String password);\n\n User findByUsername(String username);\n}",
"public interface UserDAO {\n\n /**\n * Gets all users.\n *\n * @return List of all users.\n */\n List<User> getAll();\n\n /**\n * Gets a user by its id.\n *\n * @param id Id of the user to find.\n * @return User object corresponding to given id.\n */\n User getUserById(int id);\n\n /**\n * Gets a user by its UUID.\n *\n * @param uuid UUID of the user to find.\n * @return User object corresponding to given UUID.\n */\n User getUserByUUID(String uuid);\n\n /**\n * Gets a user by its username.\n *\n * @param username The user's username.\n * @return User object corresponding to given username.\n */\n User getUserByUsername(String username);\n\n /**\n * Gets user by its username.\n *\n * @param username Username of the user to find.\n * @return User object corresponding to given username.\n */\n List<User> searchUsersByUsername(String username);\n\n /**\n * Gets the list of users, the given user is following.\n *\n * @param user User whose 'following' to get.\n * @return List of users, following list of given user.\n */\n List<User> getFollowingForUser(User user);\n\n /**\n * Gets the list of users, the given user is being followed by.\n *\n * @param user User whose 'followers' to get.\n * @return List of users, followers list of given user.\n */\n List<User> getFollowersForUser(User user);\n\n /**\n * Follows a user.\n *\n * @param user User object, who is following someone.\n * @param userToFollow User object, which user to follow.\n */\n void followUser(User user, User userToFollow);\n\n /**\n * Unfollows a user.\n *\n * @param user User object, who will unfollow someone.\n * @param userToUnfollow User object of which user to unfollow.\n */\n void unfollowUser(User user, User userToUnfollow);\n\n /**\n * Registers/adds a user.\n *\n * @param user User object to add.\n */\n void addUser(User user);\n\n /**\n * Edits the information of a user.\n *\n * @param user User object to edit.\n */\n User editUser(User user);\n\n /**\n * Removes/deletes a user.\n *\n * @param user User object to remove\n */\n void removeUser(User user);\n\n /**\n * Checks username and password combination for correctness.\n *\n * @param username\n * @param password\n * @return Instance of user if username and password combination is correct, else null object.\n */\n User login(String username, String password);\n\n User register(User user);\n\n}",
"@Repository(\"userDao\")\npublic interface IUserDao extends IGenericDao<User, Long> {\n List<User> findByKullaniciAdi(String kullaniciAdi);\n}",
"public interface UserDao {\n List<UserEntity> list();\n\n List<UserEntity> findByExample(UserEntity entity);\n\n void save(UserEntity entity);\n}",
"@Repository\npublic interface UserDao {\n int getuid(String user_name);\n void addqiandao(qiandao qiandao);\n List<Role> getqx(String user_name);\n List<qiandao> gety(String user_name);\n List<qiandao> getj();\n List<qiandao> getall();\n Timestamp getoldtime(int uid);\n void delete1(int qid);\n\n\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\r\n\t\r\n\tUser findByUsername(String username);\r\n\r\n\tUser findByActivationCode(String code);\r\n\t\r\n\tList<User> findAllByRoles(Role role);\r\n\r\n\tUser findById(long id);\r\n\r\n\r\n\r\n\t\r\n\r\n}",
"public interface UserDAO {\n\n List getUsers();\n\n User getUser(Integer id);\n\n User getUser(String UserName, String PassWord);\n\n void addUser(User user);\n\n void updateUser(User user);\n\n String deleteUser(Integer id);\n\n}",
"public interface UserRepository {\n\n public void setUserName(String userName);\n\n public void setUserPassword(String password);\n\n public String getUserName();\n\n public String getUserPassword();\n}",
"public interface UserDao {\n\n void save(User user);\n void delete(User user);\n List<User> list();\n void update(User user);\n\n User getUser(String userName, String password);\n\n\n}",
"public interface UserDao extends BaseDao<User, Long> {\n\n User findByJaccountUid(String jaccountUid);\n\n User findByJaccountId(String jaccountId);\n\n User findByJaccountChinesename(String jaccountChinesename);\n\n User findByUsername(String username);\n\n User findById(Long id);\n\n List<User> findByRole(User.Role role);\n\n}",
"public interface UserDao {\n List<User> selectUsers();\n List<User> selectUserslistPage(Map<String,Object> map);\n\n User selectUserByName(Map<String,Object> map);\n}",
"public interface UserService {\n User selectByPrimaryKey(Long id);\n List<User> selectAll();\n User getById(Long id);\n User insert(User user);\n}",
"public interface UserDao {\n public List<User> getUserList();\n public User getUserById(int id);\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User, Long> {\n\n /**\n * Find a user by given id\n *\n * @param id db id of the user\n * @return user object\n */\n User findById(long id);\n\n /**\n * Find a user by given username\n *\n * @param username username of the user\n * @return user object\n */\n User findUserByUsername(String username);\n\n\n}",
"public interface UserDAO {\n\n long saveUser(User user); //save\n\n void deleteUserById(long user_id); //delete by id\n\n void updateUser(long user_id, String firstName, String secondName, int mobile); //update\n\n List<User> findAllUsers(); //find all\n\n User findById(long user_id); //find by id\n\n User findByCred(String login, String password); //find by Credentials\n\n}",
"public interface UserRepo extends JpaRepository<User, Long> {\n User findByUsername(String username);\n\n User findByActivationCode(String code);\n}",
"public interface UserDAO {\n// 查询所有用户\n public List<User> queryAll();\n// 修改用户的状态\n public void update(User user);\n// 添加一个用户\n public void save(User user);\n// 查看一周的活跃量\n public Integer queryAc(Integer num);\n// 查看用户分布\n public List<CityFB> queryCity();\n\n}",
"public interface UserDao {\n public User getByNickname(Map map);\n public int insertUser(Map map);\n public User getById(Map map);\n\n\n\n}",
"public interface UserDAO {\n List<User> getUsers();\n}",
"@Repository\npublic interface IUserRepository extends JpaRepository<UserOB,Long> {\n @Query(\"SELECT u FROM UserOB u WHERE u.active = ?1\")\n List<UserOB> findUserByActivity (Boolean aActive);\n @Query(\"SELECT u FROM UserOB u WHERE u.login LIKE ?1\")\n UserOB findUserByLogin (String aLogin);\n @Query(\"SELECT u FROM UserOB u WHERE u.email LIKE ?1\")\n UserOB findUserByEmail (String aEmail);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1\")\n List<UserOB> findUserByName (String aName);\n @Query(\"SELECT u FROM UserOB u WHERE u.surname = ?1\")\n List<UserOB> findUserBySurname (String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.name = ?1 AND u.surname = ?2\")\n List<UserOB> findUserByNameAndSurname (String aName, String aSurname);\n @Query(\"SELECT u FROM UserOB u WHERE u.role.name = ?1\")\n List<UserOB> findUserByRole(String aRoleOB);\n\n\n}",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Long>{\n\n User findById(long id);\n\n\n //User findByUsername(String username);\n\n User findByWxOpenId(String wxOpenId);\n}",
"@Repository\npublic interface UserDao extends BaseDao<User, Integer> {\n User getUserByEmail(String email);\n}",
"public interface sysUserService {\n @DataSource(\"master\")\n sysUser selectByid(String id);\n PageInfo selectUserList(String username, String name, String status, String org_id,\n String is_admin, String orderFiled, String orderSort, int pageindex, int pagenum);\n int addUser(sysUser sysuser);\n int modifyUser(sysUser sysuser);\n int deleteUser(String id);\n int changeUserStatus(String id,String status);\n}",
"public interface UserRepository extends GenericRepository<User> {\n\n /**\n * Gets the user with such login and password combination.\n *\n * @param login user login\n * @param password user password\n * @return corresponding User instance or null if such instance is absent\n * @throws DaoException if it fails during User instance retrieval\n */\n User getUserByLoginAndPassword(String login, String password) throws DaoException;\n\n /**\n * Checks if there is a User with the indicated login.\n *\n * @param login login to be checked\n * @return true if there is already a User with the login or false otherwise.\n * @throws DaoException if it fails during lookup process\n */\n boolean doesSuchLoginExist(String login) throws DaoException;\n\n}",
"public interface UserDao {\n int queryByUserPass(User user);\n}",
"public interface UserDAO {\n\n /**\n * Gets all users from the database.\n */\n List<User> getAll() throws SQLException;\n\n /**\n * Gets a single user from the database by id.\n * @param userId of the user.\n * @return the specified user.\n * @throws UserNotFoundException error.\n */\n User get(int userId) throws UserNotFoundException, SQLException;\n\n /**\n * Gets a single user from the database by username.\n * @param username of the user.\n * @return the specified user.\n * @throws UserNotFoundException error.\n */\n User get(String username) throws UserNotFoundException, SQLException;\n\n /**\n * Adds a new user to the database.\n * @param user to add.\n */\n void add(User user) throws SQLException;\n\n /**\n * Checks if a username already exists in the database.\n * @param username to check.\n * @return true is the username does not already exist.\n */\n boolean isUniqueUsername(String username) throws SQLException;\n\n /**\n * Removes a user from the database.\n * @param user to remove.\n */\n void remove(User user) throws SQLException;\n\n /**\n * Updates a users information in the database.\n * @param user to updateCountries.\n */\n void update(User user) throws SQLException;\n\n /**\n * Checks a users credentials.\n * @param username username.\n * @param password password.\n * @return True if user is valid.\n * @throws SQLException thrown on sql error.\n * @throws UserNotFoundException thrown when the user is not found.\n */\n Boolean checkCredentials(String username, String password) throws\n SQLException, UserNotFoundException;\n\n}",
"public interface UserOperations {\n\n\t/**\n\t * <strong>get me</strong><br>\n\t * <br>\n\t * files ex) counts,created_at,creator,description\n\t * \n\t * @param fields\n\t * @return\n\t */\n\tData<User> getMe(String fields);\n\n\t/**\n\t * <strong>get me</strong><br>\n\t * <br>\n\t * The default field <br>\n\t * <strong> id,image,username,first_name,last_name,bio,created_at,counts,\n\t * account_type,url </strong>\n\t * \n\t * @return\n\t */\n\tData<User> getMe();\n\n\t/**\n\t * <strong>user search</strong><br>\n\t * user <br>\n\t * The default field <br>\n\t * <strong> account_type,bio,counts,created_at,first_name,id,image,last_name\n\t * ,url,username </strong>\n\t * \n\t * @param user\n\t * @return\n\t */\n\tData<User> getUserSearch(String user);\n\n\t/**\n\t * <strong>user search</strong><br>\n\t * user <br>\n\t * field ex)\n\t * <strong> account_type,bio,counts,created_at,first_name,id,image,last_name\n\t * ,url,username </strong>\n\t * \n\t * @param user\n\t * @param fields\n\t * @return\n\t */\n\tData<User> getUserSearch(String user, String fields);\n\n\t/**\n\t * <strong>getboard</strong><br>\n\t * field ex)\n\t * <strong> counts,created_at,creator,description,id,image,name,privacy,\n\t * reason,url</strong>\n\t * \n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getBoards(String fields);\n\n\t/**\n\t * <strong>getboard</strong><br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,\n\t * reason,url</strong>\n\t * \n\t * @return\n\t */\n\tData<List<Boards>> getBoards();\n\n\t/*********************************************/\n\n\t/**\n\t * <strong>getSuggested</strong><br>\n\t * pin, count, fields <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param pin\n\t * @param count\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getSuggested(String pin, Integer count, String fields);\n\n\t/**\n\t * <strong>getSuggested</strong><br>\n\t * pin, count <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param pin\n\t * @param count\n\t * @return\n\t */\n\tData<List<Boards>> getSuggested(String pin, Integer count);\n\n\t/**\n\t * <strong>getSuggested</strong><br>\n\t * pin <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t * @param pin\n\t * @return\n\t */\n\tData<List<Boards>> getSuggested(String pin);\n\n\n\t/*********************************************/\n\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * limit, fields <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\n\tData<List<User>> getFollowers(Integer limit, String fields);\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getFollowers(Integer limit);\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * The default limit 25 <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @return\n\t */\n\tData<List<User>> getFollowers();\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * next<br>\n\t * @param next\n\t * @return\n\t */\n\tData<List<User>> getFollowersNext(String next);\n\n\t/**\n\t * <strong>getFollowers</strong><br>\n\t * cursor, limit, fields\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t *\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<User>> getFollowersCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * \t<strong>getFollowers</strong><br>\n\t * cursor, limit\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getFollowersCursor(String cursor, Integer limit);\n\n\t/*********************************************/\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * limit fields\n\t *\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\n\tData<List<Boards>> getFollowersBoards(Integer limit, String fields);\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoards(Integer limit);\n\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * The default limit 25 <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoards();\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoardsNext(String next);\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * cursor, limit, fields <br>\n\t *\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoardsCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getFollowersBoards</strong><br>\n\t * curosr , limit\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Boards>> getFollowersBoardsCursor(String cursor, Integer limit);\n\n\t/*********************************************/\n\n\t/**\n\t * <strong>followingBoards</strong><br>\n\t * board\n\t * @param board\n\t * @return\n\t */\n\tData<String> followingBoards(String board);\n\n\t/**\n\t * <strong>unfollowingBoards</strong><br>\n\t * board\n\t * @param board\n\t */\n\tvoid unfollowingBoards(String board);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>getfollowingInterests</strong><br>\n\t * limit\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Interests>> getfollowingInterests(Integer limit);\n\n\t/**\n\t * <strong>getfollowingInterests</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Interests>> getfollowingInterestsNext(String next);\n\n\t/**\n\t * <strong>getfollowingInterests</strong><br>\n\t * cursor, limit\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Interests>> getfollowingInterestsCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * limit\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsers(Integer limit, String fields);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsers(Integer limit);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\n\tData<List<User>> getfollowingUsersNext(String next);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * cursor, limit\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsersCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getfollowingUsers</strong><br>\n\t * cursor, limit, fields <br>\n\t * The default field <br>\n\t * <strong>account_type,bio,counts,created_at,first_name,id,image,last_name,url,username</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<User>> getfollowingUsersCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>followingUsers</strong><br>\n\t * user\n\t * @param user\n\t * @return\n\t */\n\tData<String> followingUsers(String user);\n\n\t/**\n\t * <strong>unfollowingUsers</strong><br>\n\t * @param user\n\t */\n\tvoid unfollowingUsers(String user);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * limit, fields\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getLike(Integer limit, String fields);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getLike(Integer limit);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Pins>> getLikeNext(String next);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * cursor, limit, fields\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getLikeCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getLike</strong><br>\n\t * cursor, limit <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getLikeCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * limit, fields\n\t *\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getPins(Integer limit, String fields);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * limit <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getPins(Integer limit);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Pins>> getPinsNext(String next);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * cursor, limit, fields\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getPinsCursor(String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getPins</strong><br>\n\t * cursor, limi <br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getPinsCursor(String cursor, Integer limit);\n\n\t/*********************************/\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query, fields\n\t * @param query\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoards(String query, String fields);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query<br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t *\n\t * @param query\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoards(String query);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoardsNext(String next);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query, cursor, fields\n\t * @param query\n\t * @param cursor\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoardsCursor(String query, String cursor, String fields);\n\n\t/**\n\t * <strong>getSearchBoards</strong><br>\n\t * query, cursor <br>\n\t * The default field <br>\n\t * <strong>counts,created_at,creator,description,id,image,name,privacy,reason,url</strong>\n\t * @param query\n\t * @param cursor\n\t * @return\n\t */\n\tData<List<Boards>> getSearchBoardsCursor(String query, String cursor);\n\n\t/*********************************/\n\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, limit, fields\n\t * @param query\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPins(String query, Integer limit, String fields);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, limit\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param query\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPins(String query, Integer limit);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * next\n\t * @param next\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPinsNext(String next);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, cursor, limit\n\t * @param query\n\t * @param cursor\n\t * @param limit\n\t * @param fields\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPinsCursor(String query, String cursor, Integer limit, String fields);\n\n\t/**\n\t * <strong>getSearchPins</strong><br>\n\t * query, cursor, limit<br>\n\t * The default field <br>\n\t * <strong>attribution,board(counts,created_at,creator,description,id,image,name,privacy,reason,url),color,counts,created_at,creator,id,image,link,media,metadata,note,original_link,url</strong>\n\t * @param query\n\t * @param cursor\n\t * @param limit\n\t * @return\n\t */\n\tData<List<Pins>> getSearchPinsCursor(String query, String cursor, Integer limit);\n}",
"public interface UserRepo {\n public Optional<User> load(UUID userId);\n public boolean save(User user);\n public List<User> getAllUsers();\n}",
"UserInfoDao getUserInfoDao();",
"@Repository\npublic interface UserRepository extends JpaRepository<User,Integer> {\n User findOne(int id);\n User findByUsername(String username);\n User findByToken(String token);\n User findByEmail(String email);\n}",
"public interface UserDao {\n //添加新用户\n public int addUser(User user);\n public User getUserByOpenId(String openId);\n}",
"public interface UserRepository extends JpaRepository<User, Long> {\n\n User findByNome(String nome);\n\n User findByLogin(String login);\n\n\n}",
"@Repository(value = \"userMapper\")\npublic interface UserMapper {\n public UserVO getUserInfo(String username);\n public List<String> readAuthority(String username);\n public String test();\n}",
"public interface UserDao {\r\n public User login(String name);\r\n public int register(String name,String password);\r\n public boolean deleteUser(int userId);\r\n public User getUserByPrimeryKey(int userId);\r\n public List<User> queryAllUser();\r\n public boolean updateUser(User user);\r\n}",
"public interface PasswordDAO extends JpaRepository<Password, Integer> {\n\n public Password findByUserId(Integer userId);\n}",
"public interface UserDao extends BaseDao<User> {\n /**\n * 根据username获取User对象\n * @param username\n * @return User实例\n */\n User getUserByUsername(String username);\n\n}",
"public interface UserDao {\n /**\n * 根据id获得account信息\n * @param id\n * @return\n */\n User getById(int id);\n\n /**\n * 根据name获得account信息\n * @param name\n * @return\n */\n User getByName(String name);\n\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\n List<User> findByUsername(String username);\n}",
"public interface UserDao {\n List<User> findAll();\n User findById(Long id);\n void save(User user);\n void delete(User user);\n\n}",
"List<User> findAll() throws DataAccessException;",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"public interface IUserDao {\n List<User> getUsers();\n}",
"public interface UserService {\n UserInfo findByOpenid(String openid);\n}",
"public interface UserDAO extends GenericDAO<User> {\r\n\r\n /** Get user by name. */\r\n public User getUser(String name);\r\n \r\n /**\r\n * Get all enabled users\r\n * @return all enabled users\r\n */\r\n public List<User> getEnabledUsers();\r\n \r\n /**\r\n * Get all disabled users\r\n * @return all disabled users\r\n */\r\n public List<User> getDisabledUsers();\r\n}",
"public interface UserDao {\n\n\n /**\n * 根据用户名密码查询用户\n * @param userName\n * @param password\n * @return\n */\n User findUser(String userName,String password);\n\n /**\n * 查询用户\n * @param id\n * @return\n */\n User findUserById(Long id);\n\n /**\n * 批量查询用户信息\n */\n Collection<User> findUserByIds(Collection<Long> ids);\n\n List<User> findUsers(Collection<Long> ids);\n\n /**\n * 分页查询用户信息\n * @param page\n * @param size\n * @return\n */\n\n List<User> listUsers(int page,int size);\n\n /**\n * 保存用户并返回主键\n * @param user\n * @return\n */\n Long saveUserReturnKey(User user);\n\n /**\n * 保存用户\n * @param user\n * @return\n */\n int saveUser(User user);\n\n /**\n * 更新用户\n * @param user\n */\n int updateUser(User user);\n\n /**\n * 删除用户\n * @param id\n */\n int deleteUserById(Long id);\n}",
"@Override\n public User getUser(String userId){\n return userDAO.getUser(userId);\n }",
"public interface UserDao {\n void add(User user);\n\n void delete(String id);\n\n void update(User user);\n\n User find(String id);\n\n Map<String,User> getAll();\n}",
"public interface UserRepo extends BaseRepo<User, Integer>, UserCustomRepo {\n\tpublic User findByUserEmail(String userEmail);\n}",
"public interface UserDao {\n List<User> getAllUser();\n\n void addUser(User user);\n\n void updateUser(User user);\n\n void removeUser(int id);\n\n User getUser(int id);\n}",
"public interface IUsersDAO {\n\n /**\n * Retrieve the Users from the Database specified at startup\n * @return a List of IUser\n */\n public List<IUser> getUsers();\n\n /**\n * Save all the Users to the Database specified at startup\n */\n public void saveUser(IUser user);\n\n}",
"public interface UserDao extends EntityDao<User> {\n\n User findByLogin(String login);\n}",
"public interface UserDao {\n\n /**\n * Creating new User.\n * \n * @param user\n * user\n * \n * @throws NullPointerException\n * if user null\n * \n */\n void create(User user);\n\n /**\n * Updating a user.\n * \n * @param user\n * user\n * \n * @throws NullPointerException\n * if user null\n * @throws IllegalArgumentException\n * if DB hasn't this user.\n * \n */\n void update(User user);\n\n /**\n * Removing user.\n * \n * @param user\n * user\n * \n * @throws NullPointerException\n * if user null\n * @throws IllegalArgumentException\n * if DB hasn't this user.\n * \n */\n void remove(User user);\n\n /**\n * Removing user by id.\n * \n * @param id\n * id of user\n * \n * @throws NullPointerException\n * if user null\n * @throws IllegalArgumentException\n * if DB hasn't this user.\n * \n */\n void remove(Long id);\n\n /**\n * Finding all users.\n * \n * @return users.\n */\n List<User> findAll();\n\n /**\n * finding user by login.\n * \n * @param login\n * login\n * @return user\n */\n User findByLogin(String login);\n\n /**\n * Finding user by Е-mail\n * \n * @param email\n * Е-mail\n * @return user\n */\n User findByEmail(String email);\n\n /**\n * Is exist user with this login.\n * \n * @param login\n * login of user\n * @return {@code true} if exist\n */\n boolean isUserByLogin(String login);\n\n /**\n * Is exist user with this e-mail.\n * \n * @param email\n * e-nail of user\n * @return {@code true} if exist\n */\n public boolean isUserByEmail(String email);\n\n /**\n * Find user by id.\n * \n * @param id\n * id of user\n * @return user\n */\n public User findById(Long id);\n\n}",
"public interface IDataBaseRepository {\r\n\r\n /**\r\n * Get DataBase object\r\n *\r\n * @return obj\r\n */\r\n //DataBase getDataBase();\r\n\r\n /**\r\n * Save new clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void save(Clothes clothes);\r\n\r\n /**\r\n * Delete clothes\r\n *\r\n * @param clothes obj\r\n */\r\n void delete(Clothes clothes);\r\n\r\n /**\r\n * Update clothes\r\n *\r\n * @param oldClothes obj\r\n * @param newClothes ojb\r\n */\r\n void update(Clothes oldClothes, Clothes newClothes);\r\n\r\n /**\r\n * Get all clothes\r\n *\r\n * @return list\r\n */\r\n List<Clothes> getAll();\r\n\r\n /**\r\n * Get all clothes by type of the office\r\n *\r\n * @param officeType obj\r\n * @return list\r\n */\r\n List<Clothes> getByOffice(OfficeType officeType);\r\n\r\n /**\r\n * Get clothes by ID\r\n *\r\n * @param id int\r\n * @return clothes obj\r\n */\r\n Clothes getById(int id);\r\n\r\n}",
"public interface UsersDAO { //perform in database;\nvoid addUsers(Users user);\nvoid updateUsers(Users user); //pass employee object\nvoid deleteUsers(int id);//pass employee id\nvoid withdraw(Users users, double balance, double amount);\nvoid deposit(Users users, double balance, double amount);\n\n\n//get all employees\nList<Users> getUsers(); //method to return list of employees;\n//Users usersById(int id); // method to return a single employee;\n\n}",
"@Repository\npublic interface UserMapper {\n\n List selectAllUser();\n\n\n}",
"public interface UserRepository extends Repository<User, Long> {\n User save(User user);\n User findByLogin(String login);\n User findById(long id);\n}",
"public interface LoginRepository {\n public boolean addUser(User user);\n public User logIn(String username);\n public boolean addAccess(User user, Course course);\n public ArrayList<User> getUsers();\n public ArrayList<Integer> getCourseAccess(String username);\n public boolean removeCourseAccess(User user, Course course);\n public boolean deleteUser(User user);\n}",
"public interface UserDao extends CrudRepository<User,Long>{\r\n\r\n\t//017 mappers; retreive uName or Email to retrieve inst of user Entity; the naming 'findBy' helps sBt retrieve user because it assume that the user class has userNm and email fields and it ignore the UserNm case in the dao, and it will gen mappers during initialization to be used for retrieving the user obj\r\n\tUser findByUsername(String username);\r\n\tUser findByEmail(String email);\r\n}",
"public interface UserInfoDao {\n public UserinfoId getUserById(int id);\n public UserinfoId getUserByName(String name);\n public UserinfoId addUser(UserinfoId user);\n public List<UserinfoId> getAllUsers();\n}",
"public interface GProductsDao\n{\n public List<GProduct> findGProductsByUser(final Long userId);\n}",
"public interface AdUserRepository extends JpaRepository<AdUser, Long>{\n\n /**\n * <h2>根据用户名查找用户记录</h2>\n * */\n AdUser findByUsername(String username);\n\n}",
"public interface UserDAO {\n public List<User> queryUserAndRoles(String username);\n\n public List<Resource> queryResourcesAndRoles(String name) ;\n\n public List<Resource> queryResourcesAndRoles();\n}",
"public interface UserRepository extends JpaRepository<User, String> {\n User findByUsername(String username);\n}",
"public abstract UserDAO getUserDAO();",
"public interface UserDao {\n /**\n * 用户增加\n *\n * @param user\n */\n void insert(User user);\n\n /**\n * 根据id删除\n *\n * @param id\n */\n void delete(int id);\n\n /**\n * 更新User\n *\n * @param user\n */\n void update(User user);\n\n /**\n * 查询表中所有数据\n *\n * @return\n */\n List<User> queryAll();\n\n /**\n * 根据User查询\n *\n * @param id\n * @return\n */\n User queryById(int id);\n}",
"public interface UserDAO {\n User selectUserByName(User user);\n User selectUserById(User user);\n void update(User user);\n}",
"public interface UserDAO extends AbstractDAO<User> {\n\n /**\n * This method checks the availability of the <i>login</i> and <i>password</i> in the <i>users</i> database table.\n *\n * @param login - entered <i>login</i> filed of the user.\n * @param password - entered <i>password</i> field of the user.\n * @param connection - the current connection to a database. Transmitted from the service module to provide transactions.\n * @return - boolean value of the condition:\n * returns \"true\" if the incoming data correspond to the record of the database table;\n * returns \"false\" if the incoming data do not correspond to the record of the database table.\n */\n boolean isAuthorized(String login, String password, Connection connection) throws DAOException;\n\n /**\n * This method reads data from <i>users</i> database table, creates and returns User object according to the entered login.\n *\n * @param login - entered <i>login</i>.\n * @param connection - the current connection to a database. Transmitted from the service module to provide transactions.\n * @return - User object.\n */\n User getByLogin(String login, Connection connection) throws DAOException;\n\n /**\n * This method check the uniqueness of the user.\n *\n * @param login - entered <i>login</i>.\n * @param connection - the current connection to a database. Transmitted from the service module to provide transactions.\n * @return - boolean value of the condition:\n * returns \"false\" if the incoming data correspond to the record of the database table;\n * returns \"true\" if the incoming data do not correspond to the record of the database table.\n * @throws DAOException\n */\n boolean checkUniqueUser(String login, Connection connection) throws DAOException;\n\n /**\n * This method reads and returns information from a record (row) of a database table.\n *\n * @param id - id number of the record (row) in the database table..\n * @param connection - the current connection to a database. Transmitted from the service module to provide transactions.\n * @return - an entity from a database table according to the incoming id number.\n */\n User getById(String id, Connection connection) throws DAOException;\n\n /**\n * This method updates an existing record (row) in a database table.\n *\n * @param user - the current entity of user which will be updated.\n * @param connection - the current connection to a database. Transmitted from the service module to provide transactions.\n */\n void update(User user, Connection connection) throws DAOException;\n\n /**\n * This method creates entity of User class from data received from ResultSet.\n *\n * @param resultSet - a database result \"row\" with required values.\n * @param user - the entity of User with \"null\" value for setting corresponding values.\n * @return - created user with fields.\n * @throws SQLException\n */\n User createUser(ResultSet resultSet, User user) throws SQLException;\n}",
"@Override\n\tpublic Collection<Users> read() {\n\t\treturn userDAO.readAll();\n\t}",
"public interface UserDAO {\n\n public void createUser(User user) throws DBException;\n\n void deleteUser(Long id) throws DBException;\n\n void updateUserData(User user) throws DBException;\n\n User getUserById(Long id) throws DBException;\n\n List<User> getAllUsers() throws DBException;\n\n String getUserByMail(String mail) throws DBException;\n\n String getUserByName(String name) throws DBException;\n\n boolean checkLoginData(String email, String password) throws DBException;\n\n User getUserByLoginData(String email, String password) throws DBException;\n\n User getPasswordByMail(String email) throws DBException;\n\n}",
"public interface UserInfoRepostory extends JpaRepository<UserInfo, String> {\n\n\tUserInfo findByOpenid(String openid);\n}",
"public interface userDao {\n void saveUser(user user);\n\n List<user> GetAllUser();\n\n int deleteUser(int id);\n\n user getUserById(int id);\n\n int updateUser(user user);\n}",
"@Override\r\n\tpublic List findAll() {\n\t\treturn usermaindao.findAll();\r\n\t}",
"public interface UserDao extends UniversalDao<User> {\n\n User findUserById(long id);\n\n User findUserByName(String name);\n\n List<User> findAllUsers();\n\n List<User> findAllActiveUsers();\n}",
"public interface UserRepository {\n\n User getById (long id)throws HibernateException;\n User getByName(String name)throws HibernateException;\n long insertUser(String firstName, String lastName, int age)throws HibernateException;\n\n}",
"public interface UsersWithSharesDao {\n\n public List<UsersWithShares> getCompanyShares(String Username);\n public boolean addShares(UsersWithShares s);\n public boolean deleteShares(UsersWithShares s);\n public boolean editShares(UsersWithShares s);\n\n}",
"public interface UserRepository extends JpaRepository<User, Integer> {\n User findByUsername(String username);\n}",
"public interface UserDao {\n\n Integer insertUser(User user);\n\n Integer insertUserList(List<User> list);\n\n User queryUser(User user);\n\n List<User> queryUserList();\n\n Integer updateUserPwd(User user);\n\n Long queryTotalCount(PaginationVO vo);\n\n List<User> queryUserListForPaging(PaginationVO vo);\n\n Integer deleteUserById(String id);\n\n User queryUserById(String id);\n\n Integer updateUser(User user);\n\n List<String> queryAddress();\n\n}",
"public interface UserDAO {\n\n boolean createUser(User user);\n\n boolean findUser(String userName, String password);\n\n User updateUser(User user);\n\n boolean deleteUser(String userName);\n\n List<User> findAllUsers();\n\n // User logIn(User user);\n //\n // User logOut(User user);\n}",
"public interface IUserService {\n\n User save (User user);\n\n Iterable<User> findAll();\n\n\n\n User findByLogin(String login);\n}",
"@Repository\npublic interface CourseRecordDao extends JpaRepository<CourseRecord, Long> {\n List<CourseRecord> findByCourse_User(User user);\n}",
"@Repository\npublic interface UsersDao {\n User UserFindBy(@Param(\"usesrname\") String username , @Param(\"password\") String password);\n}",
"@Override\n\tpublic String DBgetAllUsers() {\n\t\tList<User> list = userRepository.getAll();\n\t\treturn dataToJson(list);\n\t}",
"@Repository\npublic interface UserRepository extends CrudRepository<UserDao,Long> {\n\n UserDao findByName(String username);\n}",
"public interface UserDao {\n LoginUser findUserByName(String username);\n}",
"public interface IUserParserDao extends IBaseDao<UserParserRecord>{\n List<UserParserRecord> queryByFileNameAndUserSign(String fileName, String userSign);\n\n List<UserParserRecord> queryByUserSignAndStatus(String userName,Integer status);\n}",
"public interface UserRepository extends CrudRepository<User, Long> {\n\n public User findAllByName(String name);\n\n}",
"public interface UserDao {\n public List<User> findAll();\n //新增\n public void insert(User user);\n //删除\n public void deleteById(Integer id);\n //修改\n public void update(User user);\n //根据id查询\n public User findById(Integer id);\n //模糊查询\n public List<User> findByName(String name);\n\n //根据username和sex查询\n public List<User> findByUsernameAdnSex(User user);\n\n //测试foreach标签\n public List<User> findByIds(User user);\n\n //测试foreach标签 in\n public List<User> findByIds1(User user);\n\n //一对多关联查询\n public List<User> findAlls();\n\n //多对多查询\n public List<User> findManyToMany();\n\n //一对多延迟加载\n public List<User> findAll1();\n\n //根据id查询测试2及缓存使用\n public User findById1(Integer id);\n}",
"@Repository\npublic interface UserRepository extends CrudRepository<User, Integer>{\n User findByUserName(String userName);\n User findByToken(String token);\n User findByPartnerId(int id);\n User findByStudentId(int id);\n User findByStudentIdAndStatus(int id, String status);\n List<User> findByRole(Role role);\n}"
] | [
"0.7164705",
"0.70080876",
"0.69717026",
"0.69469017",
"0.6923203",
"0.68982756",
"0.6825814",
"0.681714",
"0.67863375",
"0.6755358",
"0.6746067",
"0.67273045",
"0.6675273",
"0.6672579",
"0.66725063",
"0.66724175",
"0.66712296",
"0.6663961",
"0.6660739",
"0.6659059",
"0.664154",
"0.66365033",
"0.6624084",
"0.66189504",
"0.6616506",
"0.6608522",
"0.66054296",
"0.6599637",
"0.6592991",
"0.6580319",
"0.6577511",
"0.65718997",
"0.65483207",
"0.65474045",
"0.65468097",
"0.65467143",
"0.6544407",
"0.65249014",
"0.65239745",
"0.652053",
"0.6519285",
"0.651796",
"0.65089834",
"0.65007824",
"0.6499002",
"0.64964694",
"0.6487224",
"0.6478237",
"0.6478217",
"0.6466939",
"0.6466584",
"0.64658576",
"0.64624786",
"0.64607865",
"0.6459041",
"0.64527315",
"0.64368045",
"0.6435984",
"0.64319587",
"0.6429444",
"0.64289784",
"0.6423849",
"0.641198",
"0.6410509",
"0.64099824",
"0.64069813",
"0.6406868",
"0.6403329",
"0.6398772",
"0.6393027",
"0.6390732",
"0.639004",
"0.6388703",
"0.6383968",
"0.6379537",
"0.6377023",
"0.6372334",
"0.63719594",
"0.6371211",
"0.6369436",
"0.6366135",
"0.63653135",
"0.63628316",
"0.63578916",
"0.6354164",
"0.63535523",
"0.6352087",
"0.63438946",
"0.63438195",
"0.6341518",
"0.6340418",
"0.6339341",
"0.63386214",
"0.63378817",
"0.6337228",
"0.63356394",
"0.6335542",
"0.6326181",
"0.6325739",
"0.6323654",
"0.6322563"
] | 0.0 | -1 |
Find user by the Email. | User findByEmail(String email); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public User findUserByEmail(final String email);",
"User find(String email);",
"User findUserByEmail(String email) throws Exception;",
"User getUserByEmail(final String email);",
"@Override\n public OpenScienceFrameworkUser findOneUserByEmail(final String email) {\n final OpenScienceFrameworkUser user = findOneUserByUsername(email);\n if (user != null) {\n return user;\n }\n\n // check emails\n try {\n // JPA Hibernate does not support postgres query array operations, use postgres native queries\n // `query.setParameter()` does not work, use string concatenation instead\n final Query query= entityManager.createNativeQuery(\n \"select u.* from osf_osfuser u where u.emails @> '{\" + email + \"}'\\\\:\\\\:varchar[]\",\n OpenScienceFrameworkUser.class\n );\n return (OpenScienceFrameworkUser) query.getSingleResult();\n } catch (final PersistenceException e) {\n LOGGER.error(e.toString());\n return null;\n }\n }",
"User getUserByEmail(String email);",
"@Override\n\tpublic Users findUserByEmail(String email) {\n\t\treturn iUserDao.findUserByEmail(email);\n\t}",
"public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public static User findUserByEmail(String email) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByEmail = \"SELECT * FROM public.member \"\n + \"WHERE email = '\" + email + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByEmail);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}",
"public User getUser(String email) {\n for (User user : list) {\n if (user.getEmail().equals(email))\n return user; // user found. Return this user.\n }\n return null; // user not found. Return null.\n }",
"public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}",
"public User getUser(String email) {\r\n\t\tOptional<User> optionalUser = null;\r\n\t\tUser user = null;\r\n\t\ttry {\r\n\t\t\toptionalUser = userList().stream().filter(u -> u.getUserEmail().equals(email)).findFirst();\r\n\t\t\tif (optionalUser.isPresent()) {\r\n\t\t\t\tuser = optionalUser.get();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error find user : \" + email + \" \" + e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }",
"User findUserByEmail(String userEmail);",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"@Override\n\tpublic User getUser(String email){\n\t\tif (userExists(email) == true)\n\t\t\treturn users[searchIndex(email)];\n\t\telse\n\t\t\treturn null;\n\t}",
"public User getUserByEmail(final String email) {\n return em.find(User.class, email.toLowerCase());\n }",
"@Override\n\tpublic User findByEmail(String email)\n\t{\n\t\tif (email == null) return null;\n\t\n\t\tString property = User.PROP_EMAIL;\n\t\tLabel label = RoostNodeType.USER;\n\t\tUser user = findByUniqueProperty(label, property, email);\n\t\t\n\t\treturn user;\n\t}",
"public static Utente findByEmail(String email) {\n \t\n\t\tSession session = DatabaseManager.getSession();\n Transaction tx = null;\n Utente user = null;\n \n \n try {\n tx = session.getTransaction();\n tx.begin();\n \n CriteriaBuilder builder = session.getCriteriaBuilder();\n CriteriaQuery<Utente> criteria = builder.createQuery(Utente.class);\n Root<Utente> root = criteria.from(Utente.class);\n \n criteria.select(root).where(builder.equal(root.get(Utente_.email), email));\n\n user = session.createQuery(criteria).getSingleResult();\n \n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n \n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return user;\n \n \n }",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public User retrieveUserByEmail(String email) throws ApplicationException;",
"@Override\n public User getUserByEmail(final String email){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where email = :email\");\n query.setParameter(\"email\", email);\n return (User) query.uniqueResult();\n }",
"@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}",
"@Override\n public User getByEmail(String email) {\n List<JdbcUser> jdbcUserList = jdbcTemplate.query(\"SELECT * FROM users WHERE email=?\", ROW_MAPPER, email);\n JdbcUser jdbcUser = DataAccessUtils.singleResult(jdbcUserList);\n if (jdbcUser == null) {\n return null;\n }\n return convertToUser(jdbcUser);\n }",
"public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}",
"public User findByEmail(String email){\n return userRepository.findByEmail(email);\n }",
"public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}",
"public User readByEmail(String email) throws DaoException;",
"@Override\n\tpublic UserVO searchEmail(String email) throws Exception {\n\t\treturn dao.searchEmail(email);\n\t}",
"public User getUser(String email) {\n\t\tLog.i(TAG, \"return a specific user with email.\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getcurrentUser = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(getcurrentUser, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return null;\n\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\treturn user;\n\t}",
"User findOneByMail(String mail);",
"public AppUser findByEmail(String email);",
"Optional<User> findByEmail(String email);",
"Optional<User> findByEmail(String email);",
"@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}",
"public User getUser(String emailId);",
"UserEntity findByEmail(String email);",
"public VendorUser findVuserBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n VendorUser registeredUser = (VendorUser) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"@Override\n public final CustomerUser getCustomerUserByEmail(final String email) {\n\treturn (CustomerUser) getEntityManager()\t\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ CustomerUser.class.getName()\n\t\t\t+ \" as customer where customer.email =:email\")\n\t\t.setParameter(\"email\", email)\n\t\t.getSingleResult();\n }",
"public User getUserByEmail(String email) {\r\n\t\treturn usersPersistence.getUserByEmail(email);\r\n\t}",
"public User getUser(String email);",
"public User getUserByEmail(String email){\n\t\tif(email == null)\n\t\t\treturn null;\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession session = sf.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry{\n\t\t\tCriteria criteria = session.createCriteria(User.class);\n\t\t\tObject obj = criteria.add(Restrictions.eq(\"email\", email)).uniqueResult();\n\t\t\tif(obj == null)\n\t\t\t\treturn null;\n\t\t\tUser user = (User)obj;\n\t\t\ttx.commit();\n\t\t\treturn user;\t\t\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"public User findEmail(String email){\n\t\t\n boolean found = false;\t\t\t\t\t\t\t\t\t\t/* ====> Boolean controls while loop */\n User correct = new User();\t\t\t\t\t\t\t\t\t/* ====> Create instance of the correct user*/\n User marker = new User();\t\t\t\t\t\t\t\t\t/* ====> Create a marker */\n marker = this.head;\t\t\t\t\t\t\t\t\t\t\t/* ====> Set the marker at the beginning of the list */\n \n // Loop keeps on going until the correct User is not found or until the next User is null\n while(!found){ \n \tif (marker.getEmail().equals(email)){\t\t\t\t\t/* ====> If the marker found the right user based on its email */ \n \t\tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \t\tcorrect = marker;\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the same User as marker */\n \t}\n \n else if (marker.getNext() == null){\t\t\t\t\t\t/* ====> If the marker reaches end of the list */ \n \tfound = true;\t\t\t\t\t\t\t\t\t\t/* ====> Set found true, end loop */\n \tcorrect = head;\t\t\t\t\t\t\t\t\t\t/* ====> Make correct point to the head */\n }\n \n else {\n \tmarker = marker.getNext();\t\t\t\t\t\t\t/* ====> Move marker to the next element of the list */\n }\n }\n \n return correct;\t\t\t\t\t\t\t\t\t\t\t\t/* ====> Return correct User */ \n \n\t}",
"public User get(String emailID);",
"public UserDTO findByEmail(String email) throws ApplicationException {\n\n\t\tlog.debug(\"Model findByLogin Started\");\n\t\tConnection conn = null;\n\t\tUserDTO dto = null;\n\n\t\tStringBuffer sql = new StringBuffer(\"Select * from st_user where email=?\");\n\n\t\ttry {\n\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql.toString());\n\t\t\tstmt.setString(1, email);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tdto = new UserDTO();\n\t\t\t\tdto.setId(rs.getLong(1));\n\t\t\t\tdto.setFirstName(rs.getString(2));\n\t\t\t\tdto.setLastName(rs.getString(3));\n\t\t\t\tdto.setEmail(rs.getString(4));\n\t\t\t\tdto.setPassword(rs.getString(5));\n\t\t\t\tdto.setDob(rs.getDate(6));\n\t\t\t\tdto.setMobileNo(rs.getString(7));\n\t\t\t\tdto.setRoleId(rs.getLong(8));\n\t\t\t\tdto.setGender(rs.getString(9));\n\t\t\t\tdto.setCreatedBy(rs.getString(10));\n\t\t\t\tdto.setModifiedBy(rs.getString(11));\n\t\t\t\tdto.setCreatedDatetime(rs.getTimestamp(12));\n\t\t\t\tdto.setModifiedDatetime(rs.getTimestamp(13));\n\n\t\t\t}\n\t\t\trs.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"Database Exception\", e);\n\t\t\tthrow new ApplicationException(\"Exception:Exception in getting User by login\");\n\n\t\t} finally {\n\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t}\n\t\tlog.debug(\"Model findByLogin End\");\n\t\treturn dto;\n\t}",
"ServiceUserEntity getUserByEmail(String email);",
"Optional<JUser> readByEmail(String email);",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }",
"public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }",
"public Utente retriveByEmail(String email) {\n\t\t\n\t\tTypedQuery<Utente> query = em.createNamedQuery(Utente.FIND_BY_Email, Utente.class);\n query.setParameter(\"email\", email); //parameters by name \n return query.getSingleResult();\n\t}",
"UserDTO findUserByEmail(String email);",
"public User getUserByEmail(String email) throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_user_getByEmail(?)\");\n\t\t\tthis.m_objData.Parameters.setString(1, email);\n\n\t\t\tResultSetMapper util = new ResultSetMapper<User>();\n\n\t\t\tResultSet lstResult = this.m_objData.ExecToResultSet();\n\n\t\t\tList<User> lstUser = util.mapRersultSetToObject(lstResult,\n\t\t\t\t\tUser.class);\n\n\t\t\tif (lstUser == null)\n\t\t\t\treturn null;\n\n\t\t\tif (lstUser.size() > 0)\n\t\t\t\treturn lstUser.get(0);\n\t\t\treturn null;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic User getUserByEmail(String email, User user) {\n\t\tSession session = sessionFactory.openSession();\n\t\tList<User> userList = new ArrayList<>();\n\t\tuserList = (List<User>) session.createQuery(\"from User\");\n\t\tfor (User tempUser : userList) {\n\t\t\tif (tempUser.getEmail().equalsIgnoreCase(email)) {\n\t\t\t\tuser = tempUser;\n\t\t\t\tSystem.out.println(\"get uswer by email: \" + user);\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\treturn user;\n\t}",
"public User getUser(String email) {\n\n Query query = new Query(\"User\").setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if (userEntity == null) {\n return null;\n }\n\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n User user = new User(email, aboutMe);\n\n return user;\n }",
"@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\tUserDetails user = null;\n\t\ttry {\n\t\t\t\n\t\t\tuser = searchUser(email);\n\t\t\treturn user;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t}\n\t}",
"public User existsProfile(String email) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n SuperBooleanBuilder query = new SuperBooleanBuilder();\n query.put(\"email\", email);\n Search search = new Search.Builder(query.toString())\n .addIndex(INDEX_NAME)\n .addType(User.class.toString())\n .build();\n\n User result = null;\n try {\n result = client.execute(search).getSourceAsObject(User.class);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return result;\n }",
"public User getUserFromDetails(String email, String username) {\r\n // Gets the collection of users and creates a query\r\n MongoCollection<Document> users = mongoDB.getCollection(\"Users\");\r\n Document query = new Document(\"email\", email);\r\n query.append(\"username\", username);\r\n\r\n // Loops over users found matching the details, returning the first one\r\n for (User user : users.find(query, User.class)) {\r\n return user;\r\n }\r\n\r\n // Returns null if none are found\r\n return null;\r\n }",
"public static User getUserByEmail(String email) {\n\t\t// getting user by email\n\t\treturn dao.getUserByEmail(email);\n\t}",
"public User findByEmail(String email) {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.add(Restrictions.eq(\"email\", email));\r\n\t\tUser user = (User) crit.uniqueResult();\r\n\t\tif(user != null) {\r\n\t\t\tHibernate.initialize(user.getUserProfiles());\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public User getUserByEmail(String email) throws Exception {\n\t\tSession session = null;\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\tsession = getSessionFactory().openSession();\n\t\t\tif(session != null) {\n\t\t\t\ttx = session.beginTransaction();\n\t\t\t\tQuery query = session.createQuery(\"FROM User u where u.email =:email\");\n\t\t\t\tquery.setParameter(\"email\", email);\n\t\t\t\tList list = query.list();\n\t\t\t\tif(list != null && list.size() >0) {\n\t\t\t\t\treturn (User)list.get(0);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t} finally{\n\t\t\tif(tx != null) {\n\t\t\t\ttx.commit();\n\t\t\t}\n\t\t\tif(session != null) {\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}",
"private User getUserFromUsersBy(String email, String password){\n \tUser user=null;\n \tfor(User u : users ){\n \t\tif(u.getEmail().equals(email)&&u.getPassword().equals(password)){\n \t\t\tuser = u;\n \t\t}\n \t}\n \treturn user;\n }",
"public User getUserFromEmail(final String email) {\n LOG.info(\"Getting user with email {}\", email);\n return userRepo.getUserByEmail(email);\n }",
"public UserTO getByEmail(String email) {\n\t\treturn getDao().getByEmail(email);\n\t}",
"public static User getUser(String email){\n Connection connect = null;\n ResultSet set = null;\n String getUserSQL = \"SELECT * FROM users WHERE email =?\";\n User user = null;\n\n // Get User Details Try Block:\n try {\n // Set Connection:\n connect = DBConfig.getConnection();\n // Prepare SQL Statement:\n PreparedStatement statement = connect.prepareStatement(getUserSQL);\n // Set Attributes / Parameters:\n statement.setString(1, email);\n // Execute Statement:\n set = statement.executeQuery();\n // Check For Results:\n while (set.next()){\n user = new User();\n // Set User Details / Information\n user.setFirst_name(set.getString(\"first_name\"));\n user.setLast_name(set.getString(\"last_name\"));\n user.setEmail(set.getString(\"email\"));\n user.setUser_type(set.getString(\"user_type\"));\n user.setCreated_at(set.getDate(\"created_at\"));\n }\n // End Of Check For Results:.\n }catch (Exception e){\n e.printStackTrace();\n }\n return user;\n }",
"public User findByEmail(String email) {\n\t\treturn repo.findByEmail(email);\r\n\t}",
"public Optional<User> findByEmail(final String email) {\n return null;\n }",
"public boolean findEmail(String email);",
"public String findEmail(String email) {\n\t\tString sql=\"select email from SCOTT.USERS where USERNAME='\"+email+\"'\";\n\t\t\n\t\t Dbobj dj=new Dbobj();\n\t\t JdbcUtils jdbcu=new JdbcUtils();\n\t\t dj=jdbcu.executeQuery(sql);\n\t\t ResultSet rs=dj.getRs(); \n\t\t System.out.println(\"\"+sql);\t\n\t\t String t=\"\";\n\t\t try {\n\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tt=rs.getString(1);\n\t\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\t \n\t\t\n\t\treturn t;\n\t\t\n\t}",
"Optional<User> findOneByEmail(String email);",
"public User findByEmail(String email) {\n\t\ttry {\n\t\t\treturn entityManager\n\t\t\t\t\t.createNamedQuery(User.FIND_BY_EMAIL, User.class)\n\t\t\t\t\t.setParameter(\"email\", email).getSingleResult();\n\t\t} catch (PersistenceException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"public User getUser(String email) {\n\t\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t\t\n\t\t\tCursor cursor = db.query(TABLE_USERS, new String[] { KEY_USER_ID, \n\t\t\t\t\tKEY_PASSWORD, KEY_EMAIL }, KEY_EMAIL + \" = ?\",\n\t\t\t\t\tnew String[] { String.valueOf(email) }, null, null, null, null);\n\t\t\tif (cursor != null)\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\n\t\t\tUser user = new User(\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_PASSWORD)),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_EMAIL)),\n\t\t\t\t\tInteger.parseInt(cursor.getString(0)) );\n\t\t\t// return user\n\t\t\treturn user;\n\t\t\t}",
"public UsersModel getUserById(String userEmail);",
"@Transactional\r\n\tpublic User getUserByEmail(String email) {\n\t\treturn cuser.getUserByEmail(email);\r\n\t}",
"private UserFormData loadUserIdByEmail(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with email : \" + formData.getEmail().getValue());\n\t\t}\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_EMAIL + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\treturn formData;\n\t}",
"public String searchEmail(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username, email from \" + TABLE_NAME;\n Cursor cursor = db.rawQuery(query,null);\n\n String uname, email;\n email = \"not found\";\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n email = cursor.getString(1);\n break;\n }\n } while (cursor.moveToNext());\n }\n return email;\n }",
"public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }",
"@Nullable\n public User getUserFromDatabase(String email) {\n User userAccount = null;\n try {\n SQLiteDatabase db = getReadableDatabase();\n\n Cursor userAccountCursor = db.query(\n TABLE_USERS,\n new String[]{KEY_USER_NAME, KEY_USER_EMAIL, KEY_USER_PASS, KEY_USER_PROFILE_PICTURE_URL, KEY_USER_HAS_POST_TABLE},\n KEY_USER_EMAIL + \" = ?\",\n new String[]{email},\n null,\n null,\n null\n );\n\n if (userAccountCursor != null && userAccountCursor.getCount() > 0 && userAccountCursor.moveToFirst()) {\n userAccount = new User(\n userAccountCursor.getString(0),\n userAccountCursor.getString(1),\n userAccountCursor.getString(2),\n userAccountCursor.getInt(3),\n userAccountCursor.getInt(4)\n );\n }\n\n if (userAccountCursor != null) {\n userAccountCursor.close();\n }\n\n } catch (SQLiteException e) {\n Log.d(TAG, \"Can get user account\");\n }\n\n return userAccount;\n }",
"public User getUserByEmail(String email_) {\n User user = new User();\n \n return user;\n }",
"public User getByemailId(String emailId) {\n\t\treturn userDao.getByemailId(emailId);\n\t}",
"@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\t// ako se ne radi nasledjivanje, paziti gde sve treba da se proveri email\n\t\tKorisnik user = korisnikService.pronadjiPoMejlu(email);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(String.format(\"No user found with username '%s'.\", email)); \n\t\t} else {\n\t\t\treturn user;\n\t\t}\n\t}",
"public static User findByEmail(String email) {\n return new User(email, \"\");\n // TODO: find a way to check email against the UBB users database\n //return find(\"email\", email).first();\n }",
"java.lang.String getUserEmail();",
"@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n return appRepository.findByEmail(email)\n .orElseThrow(() ->\n new UsernameNotFoundException(\n String.format(USER_NOT_FOUND, email)));\n }",
"public User findByEmail(String email) {\n\t\treturn null;\n\t}",
"Account findByEmail(String email);",
"@Override\n\tpublic IUserAccount getByEMail(String eMail) {\n\t\treturn null;\n\t}",
"@Query(value = \"SELECT user FROM User user WHERE user.active = 1 AND user.email = :email\")\n User findByEmailId(@Param(\"email\") String email);",
"@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\n\t\t Optional<com.java.redactrix.entity.User> user = userService.findUserByEmail(email);\n\t\t if(user.isPresent()) {\n\t\t\t System.out.println(\"User Found\");\n\t\t\t com.java.redactrix.entity.User getUser = user.get();\n\t\t\t String password = getUser.getPassword();\n\t\t\t return new org.springframework.security.core.userdetails.User(email, password, new ArrayList<>());\n\t\t }\n\t\t else {\n\t\t\t return null;\n\t\t }\n\t}",
"@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n return userRepository.findByEmail(email).orElseThrow(() -> new UsernameNotFoundException(\"User not found!\"));\n }"
] | [
"0.8123842",
"0.80801123",
"0.79997003",
"0.79689944",
"0.78727007",
"0.7864649",
"0.77997464",
"0.7799676",
"0.7780498",
"0.77661586",
"0.7756865",
"0.7715695",
"0.7682533",
"0.76747537",
"0.76722443",
"0.76649296",
"0.76649296",
"0.7649431",
"0.7647964",
"0.7623956",
"0.75906736",
"0.75712186",
"0.75712186",
"0.75712186",
"0.7550335",
"0.7505656",
"0.75002515",
"0.7496449",
"0.74853635",
"0.7474715",
"0.7448584",
"0.7448573",
"0.7444551",
"0.7409794",
"0.7404625",
"0.73971605",
"0.73877925",
"0.73877925",
"0.7378122",
"0.7375905",
"0.73699814",
"0.73446065",
"0.7324129",
"0.7315897",
"0.7283962",
"0.72734207",
"0.7254866",
"0.7250411",
"0.7184023",
"0.71801335",
"0.71755755",
"0.71678954",
"0.71678954",
"0.7157451",
"0.71534",
"0.71525455",
"0.7148747",
"0.7147846",
"0.71375024",
"0.71364164",
"0.7131486",
"0.7125211",
"0.711914",
"0.7118998",
"0.7109992",
"0.7106018",
"0.71041924",
"0.7095014",
"0.7091085",
"0.70736647",
"0.70564705",
"0.70257646",
"0.70205086",
"0.69989437",
"0.69871557",
"0.69790405",
"0.697564",
"0.6957654",
"0.692137",
"0.69117206",
"0.68840456",
"0.68674576",
"0.68524575",
"0.6851638",
"0.68464226",
"0.68371373",
"0.68352026",
"0.6834621",
"0.68027174",
"0.6783721",
"0.67762774",
"0.6765418",
"0.6753118",
"0.67420554",
"0.673738"
] | 0.76307964 | 22 |
List all the active users. | List<User> findUserByActive(Integer active); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List getAllUsers();",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}",
"public List<User> list() {\n\t\treturn userDao.list();\n\t}",
"public List<User> getAllUsers();",
"public List<User> getAllUsers() {\n return users;\n }",
"public List<User> getAll() {\n\t\treturn service.getAll();\n\t}",
"public void getAllUsers() {\n\t\t\n\t}",
"@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}",
"public List<User> getActiveUsers(boolean active);",
"public List<User> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"public static List<User> getAllUsers(){\n\t\t// getting all users\n\t\treturn dao.getAllUsers();\n\t}",
"@Override\n\tpublic List<User> getAllUsers() {\n\t\tlog.info(\"get all users!\");\n\t\treturn userRepository.findAll();\n\t}",
"public ArrayList<User> getAllUsers() {\n return profile.getAllUsers();\n }",
"public List<Users> getAllUsers() {\r\n\t\t// return usDao.findAll();\r\n\t\treturn usDao.getAllUsers();\r\n\t}",
"@Override\r\n\tpublic List<User> getAll() {\n\t\treturn users;\r\n\t}",
"@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}",
"List<User> getAllUsers();",
"List<User> getAllUsers();",
"@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}",
"@Override\r\n\tpublic List listAllUser() {\n\t\treturn userDAO.getUserinfoList();\r\n\t}",
"public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }",
"public List<User> getAllUsers() {\n\t\treturn userDao.getAllUsers();\n\t}",
"@GetMapping(value = URL)\n @ResponseBody\n public List<Users> listAll() {\n return usersService.listAll();\n }",
"@Override\n\tpublic List<Users> getAll() {\n\t\treturn usersDAO.getAll();\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic List<User> getAllUser() throws SQLException\r\n\t{\r\n\t\tlogger.info(\"Getting ALL active users from the database...\");\r\n\t\t\r\n\t\tSession session = sessionFactory.getCurrentSession();\r\n\t\tQuery query = null;\r\n\t\tList<String> scalarPropsList = null;\r\n\t\t\r\n\t\tscalarPropsList = SQLUtil.parseSQLScalarProperties(GET_ALL_ACTIVE_USER_SQL_SCALAR);\r\n\t\t\t\r\n\t\tif (scalarPropsList != null)\r\n\t\t{\r\n\t\t\tquery = SQLUtil.buildSQLQuery(session, scalarPropsList, GET_ALL_ACTIVE_USER_SQL);\r\n\t\t\tquery.setResultTransformer(Transformers.aliasToBean(UserBean.class));\r\n\t\t}\r\n\t\t\r\n\t\tif (query.list().get(0) != null)\r\n\t\t{\r\n\t\t\tUserBean bean = (UserBean) query.list().get(0);\r\n\t\t\tSystem.out.println(\"Testing User full name for de-activate user: \" + bean.getFullName());\r\n\t\t\tSystem.out.println(\"Username: \" + bean.getUsername());\r\n\t\t}\r\n\t\t\r\n\t\treturn query.list();\r\n\t}",
"public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }",
"public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }",
"public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }",
"@Override\n\tpublic List<ERSUser> getAllUsers() {\n\t\treturn userDao.selectAllUsers();\n\t}",
"public List<User> getAllUsers() {\n\t\treturn null;\n\t}",
"public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}",
"public ArrayList<User> getAllUsers() {\n return allUsers;\n }",
"@Override\n public ObservableList<User> getAllUsers() {\n return controller.getAllUsers();\n }",
"public List<User> listAll() throws Exception;",
"@GetMapping(path = \"/all\")\n public @ResponseBody\n Iterable<User> getAllUsers() {\n LOG.info(\"Displays all the users from the database\");\n return userRepository.findAll();\n }",
"@Override\r\n\tpublic List<User> queryAllUsers() {\n\t\tList<User> users = userMapper.queryAllUsers();\r\n\t\treturn users;\r\n\t}",
"@Override\r\n\tpublic void getAllUser() {\n\t\tSystem.out.println(users);\r\n\t\t\r\n\t}",
"@GetMapping(path = \"\")\n\tpublic @ResponseBody Iterable<ApplicationUser> getAllUsers() {\n\t\treturn userService.getUsers();\n\t}",
"@Override\n public List<User> getAllUsers() {\n\n Session session = sessionFactory.openSession();\n Transaction tx = session.beginTransaction();\n List<User> hiberusers =\n session.createQuery(\"From User\").list();\n tx.commit();\n session.close();\n return hiberusers;\n }",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic void viewAllAccountsAllUsers() {\n\t\tas.getAllAccountsAllUsers();\r\n\t}",
"public List<String> listUsers() \n\t{\n\t\treturn this.userList.keys();\n\t\t\n\t}",
"@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}",
"public static List<User> all() \n {\n return find.all();\n }",
"@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}",
"@Override\n\tpublic List All() {\n\t\treturn new userDaoImpl().All();\n\t}",
"@Override\n\tpublic List<User> getAllUser() {\n\t\tList<User> users = dao.searchAllUser();\n\t\treturn users;\n\t}",
"public List<User> getAll() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic List<User> findAllUsers() {\n\t\treturn userDAO.findAllUsers();\r\n\t}",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }",
"public List<UserData> list() {\n\t\treturn userDAO.list();\r\n\t}",
"public String[] listUsers();",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@Override\n\tpublic ArrayList<User> getAll() {\n\t\treturn this.users;\n\t}",
"public ArrayList<String> getAllUsers() {\n\t\tSystem.out.println(\"Looking up all users...\");\n\t\treturn new ArrayList<String>(users.keySet());\t\n\t}",
"public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }",
"public List<User> findAll() {\n\t\treturn users;\n\t}",
"@Override\n\tpublic Iterable<com.example.demo.model.User> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}",
"public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;",
"@RequestMapping(method = RequestMethod.GET)\n\tpublic List<User> getAll() {\n\t\tList<User> users = dao.getAll();\n\t\treturn users;\n\t}",
"@Override\n\tpublic List<User> getAll() {\n\t\treturn userDao.getAll();\n\t}",
"@Override\r\n\tpublic List<User> users() {\r\n\t\tList<User> ris = new ArrayList<>();\r\n\t\tList< Map <String,String>> maps = getAll(SELECT_USERS);\r\n\t\tfor (Map<String, String> map : maps) {\r\n\t\t\tris.add(IMappable.fromMap(User.class, map));\r\n\t\t}\r\n\t\treturn ris;\r\n\t}",
"public List<User> retrieveAllUsers() {\n\t\treturn (List<User>) userRepository.findAll();\n\t}",
"@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}",
"public List<User> getAllUsers() {\n List<User> users = null;\n Session session = null;\n try {\n session = openSession();\n users = session.createCriteria(User.class).list();\n } catch (HibernateException he) {\n logger.error(\"Hibernate Exception: \" + he);\n } catch (Exception e) {\n logger.error(\"Exception: \" + e);\n } finally {\n if (session != null) {\n session.close();\n }\n }\n return users;\n }",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public List<User> list() {\n\t\treturn null;\n\t}",
"public synchronized List<User> getAllUsers() {\r\n\t\treturn new ArrayList<User>(mapping.values());\r\n\t}",
"@GetMapping\n public List<User> getAll() {\n return userService.getAll();\n }",
"public List<User> userList() {\r\n\t\treturn DataDAO.getUserList();\r\n\r\n\t}",
"public List<User> selectAllUser() {\n\t\treturn userMapper.selectAllUser();\n\t}",
"@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n\tpublic List<AppUser> users() {\n\t\treturn appUserRepository.findAll();\n\t}",
"public List<User> getAllUsers() {\n\t\tLog.i(TAG, \"return all users list.\");\n\t\tList<User> result = new ArrayList<User>();\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getUsers = \"select * from \" + TABLE_USER;\n\t\tCursor cursor = db.rawQuery(getUsers, null);\n\t\tfor (cursor.moveToFirst();!cursor.isAfterLast();cursor.moveToNext()) {\n\t\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\t\tresult.add(user);\n\t\t}\n\t\treturn result;\n\t}",
"public List<User> allUserRecords() {\n\t\tSystem.out.println(\"Calling getAllUserRecords() Method To Fetch Users Record\");\t\n\t\tList<User> userList = userDAO.listUser();\n\t\treturn userList;\n\t}",
"@GetMapping(\"/users\")\n\tpublic ResponseEntity<List<User>> getUsers() {\n\t\tlog.debug(\"REST request to get all Users\");\n\t\treturn new ResponseEntity<List<User>>(userService.getAll(), HttpStatus.OK);\n\t}",
"@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}",
"@GetMapping(\"/\")\n\tpublic ResponseEntity<List<UsersDTO>> listAllusers(){\n\t\tList<UsersDTO> users = userJpaRepository.findAll();\n\t\tif(users.isEmpty()) {\n\t\t\treturn new ResponseEntity<List<UsersDTO>>(HttpStatus.NO_CONTENT);\n\t\t}\n\t\treturn new ResponseEntity<List<UsersDTO>>(users, HttpStatus.OK);\n\t}",
"public List<User> getAllUsers() {\n\t\tfactory = new Configuration().configure().buildSessionFactory();\n\t\tsession = factory.getCurrentSession();\n\t\tsession.beginTransaction();\n\t\tQuery query = session.createQuery(\"from User\");\n\t\tList<User> list = query.getResultList();\n\t\tsession.close();\n\t\treturn list;\n\n\t\t\n\t}",
"public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}",
"@GetMapping(\"/users\")\n\tpublic List<User> getUsers(){\n\t\treturn userRepository.findAll();\n\t\t\n\t}",
"public List<User> listUsers() throws IOException, ClassNotFoundException {\n\t\treturn list(User.class);\n\t}",
"public List<User> getAllUser() {\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic List<UserEntity> getAllUsers() {\n\t\treturn userRepository.findAll();\n\t}",
"@Nonnull\n List<User> getUsers();",
"public List<User> getAllUsers() {\n\t\tTypedQuery<User> query = em.createNamedQuery(\"User.findAll\", User.class);\n\n\t\tList<User> result = query.getResultList();\n\t\tlog(\"got all users, result size: \" + result.size());\n\t\treturn result;\n\t}",
"@RequestMapping(value = {\"/users/list\"}, method = RequestMethod.GET)\n\tpublic ResponseEntity<List<User>> fetchUsers() {\n\t\t\tSystem.out.println(\"fetching users\");\n\t\t\tList<User> user = userDAO.list(\"APPROVED\");\n\t\t\tSystem.out.println(user);\n\t\t\treturn new ResponseEntity<List<User>>(user, HttpStatus.OK);\n\t\t}",
"@Override\n\tpublic List<Object> getAllUsers() {\n\t\tList<Object> usersList = new ArrayList<Object>();\n\t\tList<TestUser> users = dao.getAll();\n\t\tSystem.out.println(dao.exists(5));\n\t\tfor(TestUser user : users){\n\t\t\tMap<String,Object> m = new HashMap<String,Object>();\n\t\t\tm.put(\"id\", user.getId());\n\t\t\tm.put(\"name\", user.getUsername());\n\t\t\tm.put(\"pwd\", user.getPassword());\n\t\t\tJSONObject j = new JSONObject(m);\n\t\t\tusersList.add(j);\n\t\t}\n\t\treturn usersList;\n\t}",
"public ArrayList<User> showUsers() throws SQLException {\n ArrayList<User> users = new ArrayList<>();\n PreparedStatement pr = connection.prepareStatement(Queries.showUserList);\n ResultSet result = pr.executeQuery();\n while (result.next()) {\n users.add(new User(\n result.getInt(\"id\"),\n result.getString(\"user_full_name\"),\n result.getString(\"email\"),\n result.getInt(\"phone\")));\n }\n pr.close();\n return users;\n }",
"public List<User> queryAllUsers() {\n \tList<User> userList = new ArrayList<>();\n\tUser user;\n String sql = \"SELECT * FROM users\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tuser = new User();\n user.setUserName(this.resultSet.getString(\"user_name\"));\n user.setHashedPassword(this.resultSet.getString(\"hashed_password\"));\n\t\tuser.setEmail(this.resultSet.getString(\"email\"));\n user.setHashedAnswer(this.resultSet.getString(\"hashed_answer\"));\n user.setIsActivated(this.resultSet.getInt(\"is_activated\"));\n user.setPublicKey(this.resultSet.getString(\"pubkey\"));\n\t\tuserList.add(user);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return userList;\n }",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"Iterable<User> getAllUsers();",
"public List<User> getAllUser() {\n\t\treturn userMapper.getAllUser();\n\t}",
"List<User> getUsers();",
"List<User> getUsers();",
"@RequestMapping(value = \"/getAll\", method = RequestMethod.GET)\n public ResponseEntity getAllUsers() {\n List<User> users = userService.getAllUsers();\n if (CollectionUtils.isEmpty(users)) {\n return new ResponseEntity(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity(users, HttpStatus.OK);\n }",
"public List<User> getUserList()\r\n\t{\r\n\t//\tGet the user list\r\n\t//\r\n\t\treturn identificationService.loadUserList();\r\n\t}"
] | [
"0.7973515",
"0.7747387",
"0.77402157",
"0.77362317",
"0.77112496",
"0.76743865",
"0.7655241",
"0.76331156",
"0.76325893",
"0.76269555",
"0.7594024",
"0.7585613",
"0.75813574",
"0.7574618",
"0.75448596",
"0.7543356",
"0.7542731",
"0.75410235",
"0.7539785",
"0.7539785",
"0.7529927",
"0.75174814",
"0.75165474",
"0.7502086",
"0.7492828",
"0.74705833",
"0.7456941",
"0.7418829",
"0.7417432",
"0.7401725",
"0.73918873",
"0.7391758",
"0.738607",
"0.7383276",
"0.73789316",
"0.73677015",
"0.7366848",
"0.7362704",
"0.73601395",
"0.73561335",
"0.7354532",
"0.73481226",
"0.73402977",
"0.73400587",
"0.7338846",
"0.7332756",
"0.73274326",
"0.731792",
"0.7310099",
"0.7295861",
"0.7291212",
"0.72840387",
"0.7274604",
"0.7268465",
"0.7267014",
"0.7265919",
"0.7264749",
"0.7264112",
"0.7260818",
"0.7250015",
"0.72382957",
"0.7235888",
"0.72318333",
"0.72298694",
"0.7229577",
"0.72248566",
"0.72232264",
"0.72212315",
"0.72210974",
"0.72092235",
"0.72043747",
"0.72006387",
"0.7196344",
"0.7193199",
"0.71895033",
"0.71842843",
"0.71775854",
"0.7177068",
"0.71762836",
"0.717307",
"0.71689045",
"0.7166502",
"0.7161206",
"0.71601254",
"0.7157025",
"0.71486753",
"0.71251774",
"0.7115975",
"0.7113495",
"0.71132773",
"0.7102882",
"0.7098837",
"0.7094172",
"0.70941377",
"0.7092361",
"0.7088812",
"0.70814824",
"0.7073249",
"0.7073249",
"0.7070649",
"0.70702374"
] | 0.0 | -1 |
List active users with pagination. | @Query(value = "SELECT user FROM User user WHERE user.active = :active")
Page<User> findByUserIsActive(Pageable pageable, @Param("active") Integer active); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<User> getActiveUsers(boolean active);",
"List<User> loadActiveUsers(User user);",
"public List getAllUsers();",
"@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n @PreAuthorize(\"hasPermission(0, 'user', 'READ')\")\n public ResponseEntity<?> listAll(Pageable pagination, UserFilter filter, BindingResult result) {\n return super.listAll(pagination, filter, result);\n }",
"@Override\n\tpublic List<User> listByPage(Params params) throws Exception {\n\t\treturn null;\n\t}",
"public List<User> getAllUsers();",
"@RequestMapping(value = {\"/users/list\"}, method = RequestMethod.GET)\n\tpublic ResponseEntity<List<User>> fetchUsers() {\n\t\t\tSystem.out.println(\"fetching users\");\n\t\t\tList<User> user = userDAO.list(\"APPROVED\");\n\t\t\tSystem.out.println(user);\n\t\t\treturn new ResponseEntity<List<User>>(user, HttpStatus.OK);\n\t\t}",
"List<User> getAllUsers();",
"List<User> getAllUsers();",
"public List<EOSUser> listUsers(List<EOSState> states, int limit, int offset);",
"public ArrayList<User> showUsers(){\n\t\treturn this.userList;\n\t}",
"public List<User> listUsers(String userName);",
"@GetMapping(\"/userslist\")\n\tpublic List<User> usersList() {\n\t\treturn userService.usersList();\n\t}",
"public List<User> list(String currentUsername);",
"@GetMapping\n\tpublic List<UserRest> getUsers(@RequestParam(value = \"page\", defaultValue = \"0\") int page,\n\t\t\t@RequestParam(value = \"limit\", defaultValue = \"25\") int limit){\n\t\t\n\t\tList<UserRest> returnValue = new ArrayList<>();\n\t\t\n\t\tList<UserDTO> users = userService.getUsers(page, limit);\n\t\t\n\t\tfor (UserDTO userDTO : users) {\n\t\t\tUserRest userModel = new UserRest();\n\t\t\tBeanUtils.copyProperties(userDTO, userModel);\n\t\t\treturnValue.add(userModel);\n\t\t}\n\t\t\n\t\treturn returnValue;\n\t}",
"public List<User> getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws UserManagementException;",
"@SuppressWarnings(\"unchecked\")\n @Override\n public List<User> listUsers() {\n Session session = this.sessionFactory.getCurrentSession();\n List<User> UsersList = session.createQuery(\"from User\").list();\n for(User u : UsersList){\n logger.info(\"User List::\"+u);\n }\n return UsersList;\n }",
"@Override\n public List getPagesWithActiveUsers(Long count, String orderBy) {\n log.debug(\"This method fetches most active users\");\n SimpleDateFormat datetimeFormatter = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\");\n LocalDateTime currentDateTime = LocalDateTime.now();\n List<CsvModel> csvModelList = csvRepository.findAll();\n List<String> responseList = new ArrayList<>();\n if (csvModelList == null) {\n throw new CsvException(String.format(\"records not found , please insert some records\"));\n }\n if (csvModelList != null && csvModelList.size() > 0) {\n for (CsvModel e : csvModelList) {\n Duration diff = Duration.between(currentDateTime, e.getLast_updated_at().toLocalDateTime());\n if (diff.toDays() < 60) {\n responseList.add(e.getUuid());\n }\n }\n }\n log.debug(\"Most active users fetched successfully\");\n return responseList;\n }",
"List<User> getActivatedUserList();",
"@RequestMapping(value = \"/users/list\", method = RequestMethod.GET)\n\tpublic @ResponseBody List<UsersDTO> findAllUsers() {\n\t\tlogger.info(\"Return All Users.\");\t\n\t\treturn (List<UsersDTO>) usersService.findAllUsers();\n\t}",
"@RequestMapping(value = \"/list\", method = RequestMethod.GET)\n\tpublic String listUsers(ModelMap model)\n\t{\n\t\tList<User> users = userService.findAllUsers();\n\t\tmodel.addAttribute(\"users\", users);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipalUsername());\n\t\treturn \"userslist\";\n\t}",
"@Override\r\n\tpublic List<User> viewUsers() {\n\t\treturn user.viewUsers();\r\n\t}",
"public List<Utilizator> listUsers();",
"@RequestMapping(value= Constant.USER_LIST, method = RequestMethod.POST)\n public ResponseEntity<RestAPIResponse> getListUser(\n HttpServletRequest request,\n @RequestBody PagingRequestModel pagingRequestModel\n ) {\n\n\n Page<UserResponse> listUsers = userService.getListUserPaging(pagingRequestModel, \"en\",\n Constant.Status.ACTIVE.getValue());\n\n return responseUtil.successResponse(listUsers);\n\n }",
"java.util.List<com.heroiclabs.nakama.api.User> \n getUsersList();",
"@RequestMapping(value = {\"/list\" }, method = RequestMethod.GET)\n\tpublic String listUsers(ModelMap model) {\n\n\t\tList<User> users = userService.findAll();\n\t\tmodel.addAttribute(\"users\", users);\n\t\treturn \"userslist\";\n\t}",
"@Override\n\tpublic List<User> list() \n\t{\n\t\treturn userDAO.list();\n\t}",
"List<UserDisplayDto> getAllUsers();",
"public List<User> displayUsers() {\n\t\t\r\n\t\ttry {\r\n\t\t\treturn sessionFactory.getCurrentSession().createQuery(\"from com.niit.model.User\").list();\r\n\t\t\t\r\n\t\t} \r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\t// TODO: handle exception\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public String[] listUsers();",
"public void ShowAllUsers()\r\n {\r\n userList.forEach((s) -> { System.out.println(s); });\r\n }",
"List<User> getUsers();",
"List<User> getUsers();",
"@GetMapping(value = URL)\n @ResponseBody\n public List<Users> listAll() {\n return usersService.listAll();\n }",
"public void getAllUsers() {\n\t\t\n\t}",
"@GetMapping(\"/userlist\")\n\tpublic String listUsers(Model model) {\n\t\tList<User> users = userService.getUsers();\n\t\t\n\t\t// add the customers to the model\n\t\tmodel.addAttribute(\"users\",users);\n\t\t\n\t\t// add page title\n\t\tmodel.addAttribute(\"pageTitle\", \"List Users\");\n\t\treturn \"list-users\";\n\t}",
"public String listUsers(){\n \tStringBuilder sb = new StringBuilder();\n \tif(users.isEmpty()){\n \t\tsb.append(\"No existing Users yet\\n\");\n \t}else{\n \t\tsb.append(\"Meeting Manager Users:\\n\");\n \t\tfor(User u : users){\n \t\t\tsb.append(\"*\"+u.getEmail()+\" \"+ u.getPassword()+\" \\n\"+u.listInterests()+\"\\n\");\n \t\t}\n \t}\n \treturn sb.toString();\n }",
"public List<User> list();",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> showUsers() throws JsonMappingException, JsonProcessingException {\n\n\t\tString url = \"http://localhost:8081/fundoouser/showall\";\n\t\t\n\t\tResponse userResponse = restTemplate.getForObject(url, Response.class);\n\t\t\n\t\tList<User> userList = (List<User>) userResponse.getData(); \n\t\t\n\t\treturn userList;\n\t}",
"private void listUsers(Request request, Response response) {\r\n\t\tList<UserBean> userList = null;\r\n\r\n\t\ttry {\r\n\t\t\tuserList = userService.findUsers();\r\n\t\t} catch (Exception e) {\r\n\t\t\tresponse.setStatus(Status.SERVER_ERROR_INTERNAL, e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t\tlog.error(e);\r\n\t\t} finally {\r\n\t\t\txmlSerializationService.generateXMLResponse(request, response,\r\n\t\t\t\t\tuserList);\r\n\t\t}\r\n\t}",
"public List<User> listAll() throws Exception;",
"public ArrayList<UserDetail> gettingAllAvailableUsers() throws Exception;",
"public List<User> getUsers();",
"public List<User> list() {\n\t\treturn userDao.list();\n\t}",
"@GetMapping\n public String getUsers(@RequestParam(value =\"page\", defaultValue = \"1\") int page,\n @RequestParam(value = \"limit\", defaultValue = \"25\") int limit)\n {\n return \"Get users for page \" + page + \" limit \" + limit;\n }",
"public List<TbUser> getAllUsers() {\n return userRepository.findAll();\n }",
"@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<User> listUsers() {\n\t\treturn (List<User>) openSession().createCriteria(User.class).list();\n\t}",
"@GET\n\tpublic ArrayList<User> getAllUsers(@QueryParam(\"start\") int start,\n\t\t\t\t\t\t\t\t\t @QueryParam(\"size\") int size) {\n\t\treturn new ArrayList<User>();\n\t}",
"@GetMapping(\"/\")\n\tpublic ResponseEntity<List<UsersDTO>> listAllusers(){\n\t\tList<UsersDTO> users = userJpaRepository.findAll();\n\t\tif(users.isEmpty()) {\n\t\t\treturn new ResponseEntity<List<UsersDTO>>(HttpStatus.NO_CONTENT);\n\t\t}\n\t\treturn new ResponseEntity<List<UsersDTO>>(users, HttpStatus.OK);\n\t}",
"@Override\r\n\tpublic List<UserVO> userList() {\n\t\treturn adao.UserList();\r\n\t}",
"@RequestMapping(value = \"list\", method = RequestMethod.GET)\n public String list(Model model) {\n LOGGER.info(\"Invoke list()\");\n List<TbUser> tbUsers = tbUserService.selectAll();\n model.addAttribute(\"tbUsers\", tbUsers);\n return \"user_list\";\n }",
"public ArrayList<User> showUsers() throws SQLException {\n ArrayList<User> users = new ArrayList<>();\n PreparedStatement pr = connection.prepareStatement(Queries.showUserList);\n ResultSet result = pr.executeQuery();\n while (result.next()) {\n users.add(new User(\n result.getInt(\"id\"),\n result.getString(\"user_full_name\"),\n result.getString(\"email\"),\n result.getInt(\"phone\")));\n }\n pr.close();\n return users;\n }",
"public List<Users> getUserList(){\n\t\tList<Users> users = (List<Users>) this.userDao.findAll();\n\t\treturn users;\n\t}",
"public String ListUsers(){\r\n StringBuilder listUsers = new StringBuilder();\r\n for (Utente u: utenti) { // crea la lista degli utenti registrati al servizio\r\n listUsers.append(u.getUsername()).append(\" \");\r\n \tlistUsers.append(u.getStatus()).append(\"\\n\");\r\n }\r\n return listUsers.toString(); \r\n }",
"@GetMapping(\"/users\")\n\tpublic List<User> getUsers(){\n\t\treturn userRepository.findAll();\n\t\t\n\t}",
"public List getUsers(User user);",
"@RequestMapping(value = { \"/\", \"/list\" }, method = RequestMethod.GET)\r\n public String listusers(ModelMap model) {\r\n List users = service.findAllUser();\r\n model.addAttribute(\"users\", users);\r\n return \"allusers\";\r\n }",
"Iterable<User> getAllUsers();",
"@RequestMapping(value = \"/user\", method = RequestMethod.GET)\n @PreAuthorize(\"hasRole('ADMIN')\")\n public ResponseEntity<List<UserAccount>> listAllUsers() {\n List<UserAccount> users = userAccountDetailsService.findAllUsers();\n if (users.isEmpty()) {\n return new ResponseEntity<List<UserAccount>>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\n }\n return new ResponseEntity<List<UserAccount>>(users, HttpStatus.OK);\n }",
"List<UserDTO> getAllUsers();",
"public List listUsers() {\n Session session = HibernateSessionFactory.getSessionFactory().openSession();\n Transaction tx = null;\n List users = null;\n try {\n tx = session.beginTransaction();\n users = session.createQuery(\"FROM User\").list();\n for (Iterator iterator = users.iterator(); iterator.hasNext(); ) {\n User user = (User) iterator.next();\n System.out.print(\"id: \" + user.getId());\n System.out.print(\" Username: \" + user.getUsername());\n System.out.print(\" Password: \" + user.getPassword());\n System.out.println(\" Email: \" + user.getEmail());\n }\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null) tx.rollback();\n e.printStackTrace();\n } finally {\n session.close();\n }\n return users;\n }",
"@GetMapping(\"/allusers\")\n\t@Secured({CommonConstants.ROLE_EMPLOYEE,CommonConstants.ROLE_ADMIN})\n\tpublic ResponseEntity<List<UserEntity>> fetchUsers(){\n\t\treturn new ResponseEntity<List<UserEntity>>(this.service.findAll(), HttpStatus.OK);\n\t}",
"public PageList<User> getUserPageList(User user, int pageSize, int pageNum) throws DataAccessException;",
"@Override\n\tpublic List<User> listByPage(int page) throws Exception {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic void viewAllUsers() {\n\t\tList<User> allUsers = new ArrayList<User>();\r\n\t\tallUsers = udao.getAllUsers();\r\n\t\t\r\n\t\tSystem.out.println(\"ALL USERS:\");\r\n\t\tSystem.out.println(\"ID\\tUsername\\tName\");\r\n\t\t\r\n\t\tfor(int i = 0; i < allUsers.size(); i++) {\r\n\t\t\tUser tempUser = allUsers.get(i);\r\n\t\t\tSystem.out.println(tempUser.getUserID() + \"\\t\" + tempUser.getUsername() + \"\\t\"\r\n\t\t\t\t\t+ tempUser.getFirstName() + \" \" + tempUser.getLastName());\r\n\t\t}\r\n\r\n\t}",
"@GetMapping\n public List<User> getAllUsers() {\n return userService.getAllUsers();\n }",
"public List<User> getUserList();",
"@Override\n\tpublic List<User> getList(Integer page, Integer Limit) {\n\t\treturn null;\n\t}",
"@RequestMapping(value=\"/user/isActive/{isActive}\",method=RequestMethod.GET)\n\t\t\tpublic @ResponseBody ResponseEntity<List<User>> getAllIsActiveUsers(@PathVariable boolean isActive)throws Exception{\n\t\t\t\tList<User> user=null;\n\t\t\t\tuser=userDAO.findByIsActive(isActive);\n\t\t\t\t\treturn new ResponseEntity<List<User>>(user,HttpStatus.OK);\n\t\t\t}",
"@RequestMapping(value = \"/user\", method = RequestMethod.GET)\n\t public ResponseEntity<List<Users>> listAllUsers() \n\t {\n\t List<Users> users = userService.findAllUsers();\n\t if(users.isEmpty())\n\t {\n\t return new ResponseEntity<List<Users>>(HttpStatus.NO_CONTENT);//You many decide to return HttpStatus.NOT_FOUND\n\t }\n\t else\n\t {\n\t \treturn new ResponseEntity<List<Users>>(users, HttpStatus.OK);\n\t }\n\t }",
"public List<UserVO> pagingUser(Criteria cri);",
"@GetMapping(\"/users\")\n\tpublic List<User> retrieveAllUsers() {\n\t\treturn userService.findAll();\n\t}",
"@RequestMapping(value = \"/list\", method = RequestMethod.GET)\n public String loadUsers(Model model) {\n if (logger.isInfoEnabled()) {\n logger.info(\"TCH User Management sub menu Viewed by user {}\", SecurityContextHolder.getContext()\n .getAuthentication().getName());\n }\n List<UserConfigurationProperties> userConfigurationProperties = userConfigurationService.loadUsers();\n model.addAttribute(\"users\",\n new JsonObjectConverter<List<UserConfigurationProperties>>().stringify(userConfigurationProperties));\n model.addAttribute(C_MODEL_ATTR_ROLES, userConfigurationService.getAllRoles());\n model.addAttribute(C_MODEL_ATTR_ISSUER, issuerService.getIssuersSortedAscendingByName());\n return V_USER_PAGE;\n\n }",
"@GetMapping(path=\"/all\")\n\tpublic @ResponseBody Iterable<User> getAllUsers() {\n\t\t// This returns a JSON or XML with the users\n\t\treturn userRepository.findAll();\n\t}",
"@GetMapping(\"/users\")\n\tpublic ResponseEntity<List<User>> getUsers() {\n\t\tlog.debug(\"REST request to get all Users\");\n\t\treturn new ResponseEntity<List<User>>(userService.getAll(), HttpStatus.OK);\n\t}",
"public Single<UserResponse> userList(int params) {\n return supportAppService.userList(params);\n }",
"@RequestMapping(method = RequestMethod.GET, path = \"/allUsers\")\n\t\tpublic List<leaderBoard> getAllUsers(){\n\t\t\t logger.info(\"Entered into Controller Layer\");\n\t\t List<leaderBoard> results = leaderboardrepository.findAll();\n\t\t logger.info(\"Number of Records Fetched:\" + results.size());\n\t\t \n\t\t return results;\n\t\t //this works\n\t\t \n\t\t \n\t\t}",
"@Override\r\n\tpublic void viewAllAccountsAllUsers() {\n\t\tas.getAllAccountsAllUsers();\r\n\t}",
"@GetMapping(\"/users\")\n public String getUserList(Model model){\n List<User> users = accountService.getAllUsers();\n model.addAttribute(\"userList\", users);\n return \"listUsers\";\n }",
"public List<User> getAllUsers(){\n return userRepository.findAll();\n }",
"@PreAuthorize(\"hasRole('ROLE_ADMIN')\")\n\t@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n\tpublic List<AppUser> users() {\n\t\treturn appUserRepository.findAll();\n\t}",
"@Override\n\tpublic List<User> getUserList() {\n\t\treturn userDao.queryUser();\n\t}",
"public List<UserInfo> resultUserList(PageBean pBean) {\n\t\treturn adminSearchDao.resultUserList(pBean);\n\t}",
"@RequestMapping(value = \"/users\", method = RequestMethod.GET)\n public ResponseEntity getUsers() {\n logger.debug(\"HTTP GET /users called\");\n List<User> userList = userService.getUsers(0.00, 4000.00);\n\n return new ResponseEntity(new UserResponse(userList), HttpStatus.OK);\n }",
"com.heroiclabs.nakama.api.User getUsers(int index);",
"@Override\n\tpublic List<KeyValuePair> getUserNameList(boolean active) {\n\t\tif (active) { // only active cabs\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user WHERE user.ACTIVE ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t} else {\n\t\t\treturn this.jdbcTemplate.query(\n\t\t\t\t\t\"SELECT user.USER_ID `KEY`, CONCAT(user.NAME,' - ',user.USER_ID) `VALUE` FROM user ORDER BY NAME\",\n\t\t\t\t\tnew KeyValuePairRowMapper());\n\t\t}\n\t}",
"List<User> findUserByActive(Integer active);",
"public String getAllLoggedInUsers(Request req, Response res) {\n List<User> users = model.getAvailableUser();\n List<User> onlineUser = new ArrayList<>();\n for (User user : users) {\n if (user.getStatus()) {\n onlineUser.add(user);\n }\n }\n\n JsonArray bodyResult = JsonUtil.usersToJson(onlineUser);\n res.status(200);\n return JsonUtil.stringify(new ServerResponse(SUCCESS, bodyResult));\n }",
"@GetMapping\n public List<user> list() {\n return USERRepository.findAll();\n }",
"@GetMapping(path=\"/users\")\r\n\tpublic MappingJacksonValue getAllUsers() {\r\n\t\t\r\n\t\tList<AppUser> appUserList = appUserDaoService.getAllUsers();\r\n\t\t\r\n \t\tMappingJacksonValue mapping = new MappingJacksonValue(appUserList);\r\n \t\tmapping.setFilters(this.filters);\r\n\t\t\r\n\t\treturn mapping;\r\n\t}",
"@GetMapping(path = \"\")\n\tpublic @ResponseBody Iterable<ApplicationUser> getAllUsers() {\n\t\treturn userService.getUsers();\n\t}",
"public ArrayList<User> list() {\n\t\tUserDao ua=new UserDao();\n\t\treturn ua.list();\n\t\t//System.out.println(\"haii\");\n\t\t \n\t}",
"List<Registration> allRegUserPagination(long idUser, int currentPage, int elementPerPage);",
"@Override\n public ObservableList<User> getAllUsers() {\n return controller.getAllUsers();\n }",
"@RequestMapping(value=\"/{projectId}/users\",method=RequestMethod.GET)\r\n\t @ResponseBody\r\n\t public ArrayList<User> autocompleteusers(@RequestParam String username){\r\n\t\t User user = authenticationUserService.getCurrentUser();\r\n\t\t ArrayList<User> listUsers = (ArrayList<User>) usersDAO.getUsersStartedwith(username,user);\r\n\t\t return listUsers;\r\n\t\t \r\n\t }",
"public List<UserDTO> getUsers();",
"@GetMapping(path = \"/all\")\n public @ResponseBody\n Iterable<User> getAllUsers() {\n LOG.info(\"Displays all the users from the database\");\n return userRepository.findAll();\n }",
"@Override\n\tpublic List<User> getList() {\n\t\treturn Lists.newArrayList(userRepository.findAll());\n\t}",
"public UserList list();",
"protected void getUserList() {\n\t\tmyDatabaseHandler db = new myDatabaseHandler();\n\t\tStatement statement = db.getStatement();\n\t\t// db.createUserTable(statement);\n\t\tuserList = new ArrayList();\n\t\tsearchedUserList = new ArrayList();\n\t\tsearchedUserList = db.getUserList(statement);\n\t\tuserList = db.getUserList(statement);\n\t\tusers.removeAllElements();\n\t\tfor (User u : userList) {\n\t\t\tusers.addElement(u.getName());\n\t\t}\n\t}",
"public List<User> getAllUsers(){\n myUsers = loginDAO.getAllUsers();\n return myUsers;\n }"
] | [
"0.7603548",
"0.7303337",
"0.720867",
"0.7021568",
"0.6976836",
"0.6941414",
"0.69060415",
"0.6876912",
"0.6876912",
"0.68738174",
"0.68732464",
"0.6867019",
"0.68403304",
"0.6821501",
"0.68176293",
"0.68064165",
"0.68054205",
"0.6804966",
"0.67798245",
"0.6766985",
"0.6766745",
"0.675782",
"0.675001",
"0.67454654",
"0.6727501",
"0.67265594",
"0.6714497",
"0.6703564",
"0.6693811",
"0.6687932",
"0.66876197",
"0.66812575",
"0.66812575",
"0.6676222",
"0.6658975",
"0.66433764",
"0.6640851",
"0.662755",
"0.6603435",
"0.660138",
"0.6597902",
"0.65977794",
"0.65779936",
"0.6571995",
"0.6557302",
"0.65553147",
"0.65551454",
"0.65486854",
"0.65460557",
"0.6545915",
"0.6524912",
"0.6517658",
"0.65137064",
"0.6513469",
"0.6513262",
"0.6509273",
"0.6505093",
"0.65043235",
"0.6504292",
"0.6499768",
"0.6493422",
"0.6491913",
"0.64904666",
"0.6488406",
"0.64850384",
"0.6477347",
"0.6474542",
"0.6473034",
"0.64690304",
"0.64597696",
"0.6455825",
"0.6450474",
"0.64298505",
"0.6428068",
"0.6426444",
"0.6426176",
"0.64238954",
"0.6419453",
"0.64163834",
"0.6413505",
"0.64113986",
"0.6398803",
"0.63976073",
"0.6396443",
"0.63927007",
"0.63849694",
"0.6376328",
"0.63684493",
"0.6366987",
"0.63617843",
"0.6358458",
"0.63457876",
"0.6344315",
"0.63441265",
"0.63439816",
"0.63439447",
"0.6341865",
"0.6336137",
"0.6329533",
"0.63281125",
"0.63111264"
] | 0.0 | -1 |
Find user by the username. | @Query(value = "SELECT user FROM User user WHERE user.active = 1 AND user.userName = :userName")
User findByUsername(@Param("userName") String userName); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public AgtUser findUserByName(String username);",
"User findUserByUsername(String username);",
"@Override\n\tpublic void findUserByUsername(String username) {\n\n\t}",
"@Override\n\tpublic User findByName(String username) {\n\t\treturn userDao.findByName(username);\n\t}",
"public SecurityUser findByName(String username);",
"public User getSpecificUser(String username);",
"private User findByName(String username) {\r\n\t\tCriteriaBuilder cb = entityManager.getCriteriaBuilder();\r\n\t\tCriteriaQuery cq = cb.createQuery(User.class);\r\n\t\tRoot<User> user = cq.from(User.class);\r\n\t\tcq.where(user.get(User_.username).in(username));\r\n\r\n\t\tTypedQuery<User> tq = entityManager.createQuery(cq);\r\n\t\t\r\n\t\treturn tq.getSingleResult();\r\n\t}",
"@SuppressWarnings(\"static-method\")\n public @NotNull LocalUser findByName(String username) throws UserNotFoundException {\n if (\"admin\".equals(username)) {\n LocalUser user = new LocalUser(\"admin\", \"struts2\");\n return user;\n }\n throw new UserNotFoundException(username);\n }",
"public User findUser(String username) {\n if (userList.containsKey(username)) {\n return userList.get(username);\n } else {\n throw new NoSuchElementException(\"User Not Found.\");\n }\n }",
"User getByUsername(String username);",
"@Override\r\n\tpublic User findUserByUsername(String username) {\n\t\tSystem.out.println(\"aa\");\r\n\t\treturn dao.selectUserByUsername(username);\r\n\t}",
"User getUserByUsername(String username);",
"User getUserByUsername(String username);",
"User getUserByUsername(String username);",
"public User getUserByName(String username);",
"public User getUserByName(String username);",
"private String searchForUser() {\n String userId = \"\";\n String response = given().\n get(\"/users\").then().extract().asString();\n List usernameId = from(response).getList(\"findAll { it.username.equals(\\\"Samantha\\\") }.id\");\n if (!usernameId.isEmpty()) {\n userId = usernameId.get(0).toString();\n }\n return userId;\n }",
"public User findUser(String username) {\n if (activeUsers.containsKey(username)) return activeUsers.get(username);\n String fileName = username;\n try {\n return (User) loadObjFromFile(usersDirPath + fileName);\n } catch (IOException | ClassNotFoundException e) {\n e.printStackTrace();\n log(\"error finding user\");\n }\n return null;\n }",
"public static User findUserByName(String username) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByName = \"SELECT * FROM public.member \"\n + \"WHERE name = '\" + username + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByName);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n\n return user;\n }",
"User loadUser( String username ) throws UserNotFoundException;",
"public User getUserByUsername(String username);",
"public User getUserByUserName(String username);",
"@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username);",
"User findByUsername(String username) throws UserDaoException;",
"@Override\r\n\tpublic User getByUsername(String username) throws UsernameNotFoundException {\r\n\t\tQuery query = sessionfactory.getCurrentSession().createQuery(\"FROM User WHERE username = :username\");\r\n\t\tquery.setParameter(\"username\", username);\r\n\t\tUser user = (User) query.uniqueResult();\r\n\t\tif (user == null) {\r\n\t\t\tthrow new UsernameNotFoundException(\"User with username '\" + username + \"' does not exist.\");\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public User findUser(String name) {\n\t\treturn null;\r\n\t}",
"User findUserByName(String name);",
"User findByUsername(String userName);",
"User getUserByUsername(String name) throws InvalidUserException;",
"public static User getUser(String username) {\r\n\t\tfor(User user : userList) {\r\n\t\t\tif(user.getName().equals(username)) {\r\n\t\t\t\treturn user;\r\n\t\t\t}\r\n\t\t}\r\n\t\tthrow new IllegalArgumentException(\"User does not exist\");\r\n\t}",
"public User findByUserName(String username) throws Exception;",
"public User queryUserByUsername(String username);",
"@Override\n\tpublic User findUserByUsername(String username) throws SQLException {\n User user = null;\n String sql = \"SELECT * FROM user WHERE username = ?\";\n \n connect();\n \n PreparedStatement statement = jdbcConnection.prepareStatement(sql);\n statement.setString(1, username);\n \n \n ResultSet resultSet = statement.executeQuery();\n \n while (resultSet.next()) {\n String usrname = resultSet.getString(\"username\");\n String pwd = resultSet.getString(\"password\");\n \n user = new User(usrname, pwd);\n }\n \n resultSet.close();\n statement.close();\n \n return user;\n\t}",
"User find(String username, String password);",
"@Override\r\n\tpublic User findByUsername(String username) throws SQLException {\n\t\tUserDao userDao = (UserDao) BeanFactory.getBean(\"userDao\");\r\n\t\treturn userDao.findByUsername(username);\r\n\t}",
"User getUser(String username);",
"public User findByUsername(String username);",
"public User findByUsername(String username);",
"public User findByUsername(String username);",
"public User findByUsername(String username);",
"public User findByUserName(String userName) {\n logger.log(Level.INFO, \"suppp it works\");\n List<User> users = entityManager.createNamedQuery(User.FIND_BY_USERNAME)\n .setParameter(\"userName\", userName)\n .getResultList();\n if (users.isEmpty()) {\n return null;\n }\n return users.get(0);\n }",
"User findUserModelByUsername(String username);",
"public User findUserByNickname(final String nickname);",
"Optional<User> findUserByUsername(String username);",
"public User getByUserName(String username) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\tString hql = \"from User WHERE emailid = :userame\";\n\t\tUser user = (User)session.createQuery(hql).setParameter(\"userame\", username).getSingleResult();\n\t\treturn user;\n\t}",
"Login findByUserName (String username);",
"@Override\n\tpublic UserDetails loadUserByUsername(String arg0) throws UsernameNotFoundException {\n\t\tList <UserDetailsPojo> list=dao.getUserByName(arg0);\n\t\tif(list==null || list.size()==0){\t\t\n\t\tthrow new UsernameNotFoundException(\"No user available\");\n\t\t}\n\t\t\n\t\tUserDetailsPojo user=list.get(0);\n\t\t\n\t\treturn user;\n\t}",
"@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}",
"public User getUser(String username);",
"@Override\r\n\tpublic User findByUsername(String username) {\n\t\treturn userDAO.findByUsername(username);\r\n\t}",
"Optional<User> findByUsername(String username);",
"Optional<User> findByUsername(String username);",
"@Override\n public Optional<User> find(String username) throws ServiceException {\n Optional<User> user;\n try {\n manager.beginTransaction(userDao);\n user = userDao.findByUsername(username);\n manager.endTransaction();\n } catch (DaoException exception) {\n try {\n manager.rollback();\n } catch (DaoException rollbackException) {\n logger.error(rollbackException);\n }\n throw new ServiceException(exception);\n }\n return user;\n }",
"@Override\n public User findByUsername( String username ) {\n return this.userRepository.findByUsername( username );\n }",
"User getOne(String username) throws NotFoundException;",
"User loadUserByUserName(String userName);",
"@Override\r\n\tpublic User findUser(String name) {\n\t\tSession session=DaoUtil.getSessionFactory().getCurrentSession();\r\n\t\tsession.\r\n\t\t\r\n\t\t\r\n\t\treturn user;\r\n\t}",
"User browseUserByUsername(String username);",
"User get(String username) throws UserNotFoundException, SQLException;",
"public boolean findUserBYName(String name);",
"public EOSUser findUser(String login) throws EOSNotFoundException;",
"private Boolean findUser(String username){\n return usersDataBase.containsKey(username);\n }",
"@NotNull TUser findByUserName(String username) throws NotFoundException, ErrorConnectionException, TException;",
"@Override\n\tpublic User findByUsername(String username) throws UserNotFoundException {\n\t\treturn userRepo.findById(username).orElseThrow(()->new UserNotFoundException(\"Sorry User with username \"+ username+ \" is not found\"));\n\t\t\n\t}",
"public User get(String username);",
"@Override\n public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {\n return users.get(username);\n }",
"public User findUser(String uname) {\n\t\treturn userRepository.searchByUname(uname);\n\t}",
"@Override\n\tpublic User getByUserName(String username) {\n\t\tUser user = userDao.getByUserName(username);\n\t\treturn user;\n\t}",
"@Override\n\tpublic User findByUsername(String username) {\n\t\treturn userDao.findByUsername(username);\n\t}",
"public User getUserByUsername(String username) {\n\t\tString sql = \"SELECT u FROM User u WHERE u.username LIKE :username\";\n\t\tQuery query = em.createQuery(sql, User.class);\n\t\treturn (User) query.setParameter(\"username\", username).getSingleResult();\n\t}",
"public User readByUsername(String username) throws DaoException;",
"public User getUser(String username) {\n\t\tfor(User user : users) {\n\t\t\tif(user.getUsername().equals(username)) {\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public User findUser(String name) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where name = ?\");\n\t\t\tps.setString(1, name);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n @Query(\"SELECT u FROM User u WHERE u.login = LOWER(:username)\")\n User loadUserByUsername(@Param(\"username\") String username) throws UsernameNotFoundException;",
"@Override\r\n\tpublic Users findByName(String username) {\n\t\t\r\n\t\tCriteria criteria=sessionFactory.getCurrentSession().createCriteria(Users.class);\r\n\t\t\r\n\t\tcriteria.add(Restrictions.eqOrIsNull(\"username\", username));\r\n\t\t\r\n\t\treturn (Users) criteria.uniqueResult();\r\n\t}",
"@Override\r\n\tpublic LoginUser selectByUsername(String username) {\n\t\tlogger.info(\"根据用户名获得用户对象...\");\r\n\t\tList<LoginUser> userList = loginUserDao.selectByUsername(username);\r\n\t\tif(null != userList && !userList.isEmpty() && userList.size() > 0){\r\n\t\t\treturn userList.get(0);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"User findByUserName(String userName);",
"User findByUserName(String userName);",
"public User getUserByUsername(String username) throws BillingSystemException{\r\n\t\tUser temp=null;\r\n\t\t\r\n\t\tif(username==null && username.length()==0){\r\n\t\t\tthrow new BillingSystemException(\"Username argument is null\");\r\n\t\t}\r\n\t\t\r\n\t\tfor(User user : listUser){\r\n\t\t\tif(user.getUsername().equals(username)){\r\n\t\t\t\ttemp= user;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn temp;\r\n\t}",
"@Override\r\n\tpublic User getUser(String username) {\r\n\t\treturn userRepo.findByUsername(username);\r\n\t}",
"public User getUser(String username) {\n User found = userRepository.findByUsername(username);\n if (found == null) {\n return null;\n }\n return found;\n\n }",
"public String searchName(String username) {\n\n db = this.getReadableDatabase();\n String query = \"select username, name from \"+ TABLE_NAME;\n Cursor cursor = db.rawQuery(query, null);\n\n String uname, name;\n name = \"not found\";\n\n if (cursor.moveToFirst()) {\n\n do {\n uname = cursor.getString(0);\n if (uname.equals(username)) {\n name = cursor.getString(1);\n break;\n }\n } while (cursor.moveToNext());\n }\n\n return name;\n }",
"public Person getPerson(String username) throws IllegalArgumentException\r\n\t{\r\n\t\tPerson[] personArray = this.getAllUsers();\r\n\t\tPerson foundPerson = new Person();\r\n\t\tfor(int i = 0; i < personArray.length; i++) \r\n\t\t{\r\n\t\t\tif(personArray[i].getUsername().equals(username)) \r\n\t\t\t{\r\n\t\t\t\tfoundPerson = personArray[i];\r\n\t\t\t} \r\n\t\t} \r\n\t\tif(!foundPerson.getUsername().equals(username)) \r\n\t\t{\r\n\t\t\tthrow new IllegalArgumentException(\"The entered username is not bound to an account.\");\r\n\t\t}\r\n\t\treturn foundPerson;\r\n\t}",
"@Override\n\tpublic User findUserByUserName(String userName) throws Exception {\n\t\treturn userDao.findUserByUserName(userName);\n\t}",
"User findByUsername(String username, String password) throws Exception;",
"public Users findUser (String userName) {\n String queryStr = \"select * from users where username = '\" + userName + \"'\";\r\n try {\r\n Users result = (Users) em.createNativeQuery(queryStr, Users.class).getSingleResult();\r\n return result;\r\n } catch (Exception e) {\r\n //log.error(e);\r\n return null;\r\n }\r\n }",
"public User findByUsername(String username) {\n List<User> users = em.createQuery(\"select c from User c where c.username=:username \")\n .setParameter(\"username\",username)\n .getResultList();\n if(users.size()>0){\n return users.get(0);\n }\n else{\n return null;\n }\n }",
"@Override\n\tpublic User findByEmail(String username) throws UsernameNotFoundException {\n\t\treturn jpaUserDao.findByEmail(username);\n\t}",
"@Override\r\n public User getUserByName(String username) {\n return userMapper.getUserByName(username);\r\n }",
"public User findUserByUsername(String username) {\n\t\treturn userDao.findUserByUsername(username);\r\n\t}",
"public User getUserByUserName(String userName);",
"@Override\n\tpublic G_User getByUsername(String username) {\n\t\treturn uDao.getByUsername(username);\n\t}",
"@Override\n public User getUserByUsername(String name) {\n \tSession session = this.sessionFactory.getCurrentSession(); \n \tQuery query = session.createQuery(\"from User where username=:username\");\n\t\tquery.setParameter(\"username\", name);\n\t\tUser u = (User) query.uniqueResult();\n logger.info(\"User loaded successfully, User details=\"+u);\n return u;\n }",
"@Override\n\tpublic List<UserManage> findUserByUsername(String username){\n\t\tList<UserManage> list = null;\n\t\ttry {\n\t\t\tlist = userDao.findUserByUsername(username);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn list;\n\t}",
"@Override\r\n\tpublic Credentials fetchUserByUsername(String username) {\n\t\treturn dao.findByUserName(username);\r\n\t}"
] | [
"0.77886677",
"0.76551455",
"0.76326674",
"0.75714517",
"0.75345165",
"0.75206465",
"0.7503331",
"0.74603796",
"0.7428996",
"0.7425884",
"0.74028987",
"0.73956674",
"0.73956674",
"0.73956674",
"0.7363978",
"0.7363978",
"0.7332524",
"0.7324188",
"0.731532",
"0.73042727",
"0.7236187",
"0.7212896",
"0.72063345",
"0.71637523",
"0.71637523",
"0.71637523",
"0.71637523",
"0.71637523",
"0.71637523",
"0.71559507",
"0.7147334",
"0.7144042",
"0.7143606",
"0.71400505",
"0.7139976",
"0.7132103",
"0.71225005",
"0.71181583",
"0.71074456",
"0.71063924",
"0.7103266",
"0.7096858",
"0.70910406",
"0.70910406",
"0.70910406",
"0.70910406",
"0.70904434",
"0.7082067",
"0.7081574",
"0.70766306",
"0.7062013",
"0.70406187",
"0.70338356",
"0.7000188",
"0.69941515",
"0.69841176",
"0.69796336",
"0.69796336",
"0.69562423",
"0.69433147",
"0.6930645",
"0.6921667",
"0.69203043",
"0.6918428",
"0.69091463",
"0.69076943",
"0.69057035",
"0.69004875",
"0.6898609",
"0.6898593",
"0.6894331",
"0.6888868",
"0.68846315",
"0.6871667",
"0.684853",
"0.68369025",
"0.68353343",
"0.68259025",
"0.6814979",
"0.6809149",
"0.6807542",
"0.6804588",
"0.6801416",
"0.6801416",
"0.67969465",
"0.67875826",
"0.6780179",
"0.67753506",
"0.67703396",
"0.6764326",
"0.6756489",
"0.6754649",
"0.6747411",
"0.6742424",
"0.673978",
"0.67368346",
"0.67362714",
"0.6731398",
"0.6719094",
"0.671699",
"0.6711585"
] | 0.0 | -1 |
Find user by the emailId. | @Query(value = "SELECT user FROM User user WHERE user.active = 1 AND user.email = :email")
User findByEmailId(@Param("email") String email); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Users findBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n Users registeredUser = (Users) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"public User findUserByEmail(final String email);",
"public User getUser(String emailId);",
"User findUserByEmail(String email) throws Exception;",
"public User getByemailId(String emailId) {\n\t\treturn userDao.getByemailId(emailId);\n\t}",
"@Override\n\tpublic Users findUserByEmail(String email) {\n\t\treturn iUserDao.findUserByEmail(email);\n\t}",
"User find(String email);",
"public VendorUser findVuserBYEmailId(String email) {\r\n Query query = em.createNamedQuery(\"findUserByEmailId\");\r\n query.setParameter(\"uemail\", email);\r\n if (!query.getResultList().isEmpty()) {\r\n VendorUser registeredUser = (VendorUser) query.getSingleResult();\r\n return registeredUser;\r\n }\r\n return null;\r\n }",
"User getUserByEmail(final String email);",
"@Override\n\tpublic ERSUser getUserByEmail(String email) {\n\t\treturn userDao.selectUserByEmail(email);\n\t}",
"@Override\n public TechGalleryUser getUserByEmail(final String email) throws NotFoundException {\n TechGalleryUser tgUser = userDao.findByEmail(email);\n// TechGalleryUser tgUser = userDao.findByEmail(\"[email protected]\");\n if (tgUser == null) {\n throw new NotFoundException(ValidationMessageEnums.USER_NOT_EXIST.message());\n } else {\n return tgUser;\n }\n }",
"public User get(String emailID);",
"public User getUserByEmail(String email)throws EntityNotFoundException\n\t{\n\t\treturn userDao.getById(email);\n\t}",
"public static User findUserByEmail(String email) {\n\n User user = null;\n User targetUser = new User();\n IdentityMap<User> userIdentityMap = IdentityMap.getInstance(targetUser);\n\n String findUserByEmail = \"SELECT * FROM public.member \"\n + \"WHERE email = '\" + email + \"'\";\n\n PreparedStatement stmt = DBConnection.prepare(findUserByEmail);\n\n try {\n ResultSet rs = stmt.executeQuery();\n while(rs.next()) {\n user = load(rs);\n }\n DBConnection.close(stmt);\n rs.close();\n\n } catch (SQLException e) {\n System.out.println(\"Exception!\");\n e.printStackTrace();\n }\n if(user != null) {\n targetUser = userIdentityMap.get(user.getId());\n if(targetUser == null) {\n userIdentityMap.put(user.getId(), user);\n return user;\n }\n else\n return targetUser;\n }\n return user;\n }",
"@Override\n\tpublic Login findByEmailId(String emailId) throws LoginNotFoundException{\n\t\treturn userRepo.findById(emailId).orElseThrow(()->new LoginNotFoundException(\"User not found !\"));\n\t}",
"@Override\n public OpenScienceFrameworkUser findOneUserByEmail(final String email) {\n final OpenScienceFrameworkUser user = findOneUserByUsername(email);\n if (user != null) {\n return user;\n }\n\n // check emails\n try {\n // JPA Hibernate does not support postgres query array operations, use postgres native queries\n // `query.setParameter()` does not work, use string concatenation instead\n final Query query= entityManager.createNativeQuery(\n \"select u.* from osf_osfuser u where u.emails @> '{\" + email + \"}'\\\\:\\\\:varchar[]\",\n OpenScienceFrameworkUser.class\n );\n return (OpenScienceFrameworkUser) query.getSingleResult();\n } catch (final PersistenceException e) {\n LOGGER.error(e.toString());\n return null;\n }\n }",
"User getUserByEmail(String email);",
"public User getUserByEmail(final String email) {\n return em.find(User.class, email.toLowerCase());\n }",
"User findUserByEmail(String userEmail);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"User findByEmail(String email);",
"public User getUser(String email) {\r\n\t\tOptional<User> optionalUser = null;\r\n\t\tUser user = null;\r\n\t\ttry {\r\n\t\t\toptionalUser = userList().stream().filter(u -> u.getUserEmail().equals(email)).findFirst();\r\n\t\t\tif (optionalUser.isPresent()) {\r\n\t\t\t\tuser = optionalUser.get();\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"error find user : \" + email + \" \" + e);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public User findByEmail(String email){\n return userRepository.findByEmail(email);\n }",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"public User findByEmail(String email);",
"@Override\n\tpublic User findByEmail(String email)\n\t{\n\t\tif (email == null) return null;\n\t\n\t\tString property = User.PROP_EMAIL;\n\t\tLabel label = RoostNodeType.USER;\n\t\tUser user = findByUniqueProperty(label, property, email);\n\t\t\n\t\treturn user;\n\t}",
"public User readByEmail(String email) throws DaoException;",
"public User retrieveUserByEmail(String email) throws ApplicationException;",
"public User getUserByEmail(String email);",
"public User getUserByEmail(String email);",
"public User getUser(String email) {\n for (User user : list) {\n if (user.getEmail().equals(email))\n return user; // user found. Return this user.\n }\n return null; // user not found. Return null.\n }",
"@Override\n public User getUserByEmail(final String email){\n Query query = sessionFactory.getCurrentSession().createQuery(\"from User where email = :email\");\n query.setParameter(\"email\", email);\n return (User) query.uniqueResult();\n }",
"UserEntity findByEmail(String email);",
"@Override\r\n\tpublic User getByMail(String eMail) {\n\r\n\t\treturn userDao.get(eMail);\r\n\t}",
"public AppUser findByEmail(String email);",
"public UsersModel getUserById(String userEmail);",
"@Override\n\tpublic User getUser(String email){\n\t\tif (userExists(email) == true)\n\t\t\treturn users[searchIndex(email)];\n\t\telse\n\t\t\treturn null;\n\t}",
"ServiceUserEntity getUserByEmail(String email);",
"public static UserEntity search(String email) {\n\t\tDatastoreService datastore = DatastoreServiceFactory\n\t\t\t\t.getDatastoreService();\n\n\t\tQuery gaeQuery = new Query(\"users\");\n\t\tPreparedQuery pq = datastore.prepare(gaeQuery);\n\t\t\n\t\tfor (Entity entity : pq.asIterable()) {\n\t\t\t \n\t\t\tif (entity.getProperty(\"email\").toString().equals(email)) {\n\t\t\t\tUserEntity returnedUser = new UserEntity(entity.getProperty(\n\t\t\t\t\t\t\"name\").toString(), entity.getProperty(\"email\")\n\t\t\t\t\t\t.toString());\n\t\t\t\treturnedUser.setId(entity.getKey().getId());\n\t\t\t\treturn returnedUser;\n\t\t\t }\nelse{\n\t\t\t\t\n }\n\t\t}\n\n\t\treturn null;\n\t}",
"public static Utente findByEmail(String email) {\n \t\n\t\tSession session = DatabaseManager.getSession();\n Transaction tx = null;\n Utente user = null;\n \n \n try {\n tx = session.getTransaction();\n tx.begin();\n \n CriteriaBuilder builder = session.getCriteriaBuilder();\n CriteriaQuery<Utente> criteria = builder.createQuery(Utente.class);\n Root<Utente> root = criteria.from(Utente.class);\n \n criteria.select(root).where(builder.equal(root.get(Utente_.email), email));\n\n user = session.createQuery(criteria).getSingleResult();\n \n tx.commit();\n \n } catch (Exception e) {\n if (tx != null) {\n tx.rollback();\n \n }\n e.printStackTrace();\n } finally {\n session.close();\n }\n \n return user;\n \n \n }",
"@Override\n public User getByEmail(String email) {\n List<JdbcUser> jdbcUserList = jdbcTemplate.query(\"SELECT * FROM users WHERE email=?\", ROW_MAPPER, email);\n JdbcUser jdbcUser = DataAccessUtils.singleResult(jdbcUserList);\n if (jdbcUser == null) {\n return null;\n }\n return convertToUser(jdbcUser);\n }",
"Optional<User> findByEmail(String email);",
"Optional<User> findByEmail(String email);",
"public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}",
"UserDTO findUserByEmail(String email);",
"public User getUser(String email) {\n\t\tLog.i(TAG, \"return a specific user with email.\");\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\tString getcurrentUser = \"select * from \" + TABLE_USER\n\t\t\t\t+ \" where email='\" + email + \"'\";\n\t\tCursor cursor = db.rawQuery(getcurrentUser, null);\n\t\tcursor.moveToFirst();\n\t\tif (cursor.isAfterLast()) return null;\n\t\tUser user = new User(cursor.getInt(0), cursor.getString(1), cursor.getString(2));\n\t\treturn user;\n\t}",
"public User getUserByEmail(String email){\n\t\tif(email == null)\n\t\t\treturn null;\n\t\tSessionFactory sf = HibernateUtil.getSessionFactory();\n\t\tSession session = sf.openSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry{\n\t\t\tCriteria criteria = session.createCriteria(User.class);\n\t\t\tObject obj = criteria.add(Restrictions.eq(\"email\", email)).uniqueResult();\n\t\t\tif(obj == null)\n\t\t\t\treturn null;\n\t\t\tUser user = (User)obj;\n\t\t\ttx.commit();\n\t\t\treturn user;\t\t\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t}",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"public User findByEmail(String email) {\n return userRepository.findByEmail(email);\n }",
"@Override\n\tpublic UserVO searchEmail(String email) throws Exception {\n\t\treturn dao.searchEmail(email);\n\t}",
"public User getUserByEmail(String email) {\r\n\t\treturn usersPersistence.getUserByEmail(email);\r\n\t}",
"private UserFormData loadUserIdByEmail(final UserFormData formData) {\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"Searching userId with email : \" + formData.getEmail().getValue());\n\t\t}\n\t\tSQL.selectInto(SQLs.USER_SELECT_ID_ONLY + SQLs.USER_SELECT_FILTER_EMAIL + SQLs.USER_SELECT_INTO_ID_ONLY,\n\t\t\t\tformData);\n\t\treturn formData;\n\t}",
"public User getUserFromEmail(final String email) {\n LOG.info(\"Getting user with email {}\", email);\n return userRepo.getUserByEmail(email);\n }",
"@Override\n public final CustomerUser getCustomerUserByEmail(final String email) {\n\treturn (CustomerUser) getEntityManager()\t\n\t\t.createQuery(\"select customer from \"\n\t\t\t+ CustomerUser.class.getName()\n\t\t\t+ \" as customer where customer.email =:email\")\n\t\t.setParameter(\"email\", email)\n\t\t.getSingleResult();\n }",
"public UserDTO findByEmail(String email) throws ApplicationException {\n\n\t\tlog.debug(\"Model findByLogin Started\");\n\t\tConnection conn = null;\n\t\tUserDTO dto = null;\n\n\t\tStringBuffer sql = new StringBuffer(\"Select * from st_user where email=?\");\n\n\t\ttry {\n\t\t\tconn = JDBCDataSource.getConnection();\n\t\t\tPreparedStatement stmt = conn.prepareStatement(sql.toString());\n\t\t\tstmt.setString(1, email);\n\t\t\tResultSet rs = stmt.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tdto = new UserDTO();\n\t\t\t\tdto.setId(rs.getLong(1));\n\t\t\t\tdto.setFirstName(rs.getString(2));\n\t\t\t\tdto.setLastName(rs.getString(3));\n\t\t\t\tdto.setEmail(rs.getString(4));\n\t\t\t\tdto.setPassword(rs.getString(5));\n\t\t\t\tdto.setDob(rs.getDate(6));\n\t\t\t\tdto.setMobileNo(rs.getString(7));\n\t\t\t\tdto.setRoleId(rs.getLong(8));\n\t\t\t\tdto.setGender(rs.getString(9));\n\t\t\t\tdto.setCreatedBy(rs.getString(10));\n\t\t\t\tdto.setModifiedBy(rs.getString(11));\n\t\t\t\tdto.setCreatedDatetime(rs.getTimestamp(12));\n\t\t\t\tdto.setModifiedDatetime(rs.getTimestamp(13));\n\n\t\t\t}\n\t\t\trs.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.error(\"Database Exception\", e);\n\t\t\tthrow new ApplicationException(\"Exception:Exception in getting User by login\");\n\n\t\t} finally {\n\t\t\tJDBCDataSource.closeConnection(conn);\n\t\t}\n\t\tlog.debug(\"Model findByLogin End\");\n\t\treturn dto;\n\t}",
"@Override\n public User getUserById(String email) throws UserException {\n User user;\n\n if (email == null || email.equals(\"\")) {\n logger.error(\"invalid user id: \" + email);\n return null;\n }\n try {\n user = userDAO.getUserById(email);\n\n if (user == null) {\n throw new UserException(\"cannot find user to update with id: \" + email);\n }\n\n logger.info(\"created a new user successfully: \" + user.toString());\n return user;\n } catch (UserException e) {\n e.printStackTrace();\n logger.error(e.getMessage());\n return null;\n }\n }",
"@Override\n\tpublic User getUser(String email) {\n\t\treturn userDatabase.get(email);\n\t}",
"public static User getUserByEmail(String email) {\n\t\t// getting user by email\n\t\treturn dao.getUserByEmail(email);\n\t}",
"User findUserById(Long id) throws Exception;",
"public User getUserByEmail(String email, String apikey) throws UserNotFoundException, APIKeyNotFoundException{\n if (authenticateApiKey(apikey)){\n return userMapper.getUserByEmail(email);\n }else throw new UserNotFoundException(\"User not found\");\n }",
"@Override\n\t@Transactional\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\tUserDetails user = null;\n\t\ttry {\n\t\t\t\n\t\t\tuser = searchUser(email);\n\t\t\treturn user;\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t}\n\t}",
"User findOneByMail(String mail);",
"public User getUser(int id){\n \n Session session = HibernateUtil.getSessionFactory().openSession();\n Transaction tx = null;\n User user = null;\n try {\n tx = session.beginTransaction();\n\n // Add restriction to get user with username\n Criterion emailCr = Restrictions.idEq(id);\n Criteria cr = session.createCriteria(User.class);\n cr.add(emailCr);\n user = (User)cr.uniqueResult();\n tx.commit();\n } catch (HibernateException e) {\n if (tx != null)\n tx.rollback();\n log.fatal(e);\n } finally {\n session.close();\n }\n return user;\n }",
"public User getUser(String email);",
"public User findByEmail(String email) {\n\t\tCriteria crit = createEntityCriteria();\r\n\t\tcrit.add(Restrictions.eq(\"email\", email));\r\n\t\tUser user = (User) crit.uniqueResult();\r\n\t\tif(user != null) {\r\n\t\t\tHibernate.initialize(user.getUserProfiles());\r\n\t\t}\r\n\t\treturn user;\r\n\t}",
"public UserTO getByEmail(String email) {\n\t\treturn getDao().getByEmail(email);\n\t}",
"public User findByEmail(String email) {\n\t\treturn repo.findByEmail(email);\r\n\t}",
"User findUser(String userId);",
"@Transactional\r\n\tpublic User getUserByEmail(String email) {\n\t\treturn cuser.getUserByEmail(email);\r\n\t}",
"public Optional<User> findByEmail(final String email) {\n return null;\n }",
"public User getUserByEmail(String email) throws Exception {\n\t\tSession session = null;\n\t\tTransaction tx = null;\n\t\ttry{\n\t\t\tsession = getSessionFactory().openSession();\n\t\t\tif(session != null) {\n\t\t\t\ttx = session.beginTransaction();\n\t\t\t\tQuery query = session.createQuery(\"FROM User u where u.email =:email\");\n\t\t\t\tquery.setParameter(\"email\", email);\n\t\t\t\tList list = query.list();\n\t\t\t\tif(list != null && list.size() >0) {\n\t\t\t\t\treturn (User)list.get(0);\n\t\t\t\t}\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tthrow new Exception(e);\n\t\t} finally{\n\t\t\tif(tx != null) {\n\t\t\t\ttx.commit();\n\t\t\t}\n\t\t\tif(session != null) {\n\t\t\t\tsession.close();\n\t\t\t}\n\t\t}\n\t}",
"public User findByEmail(String email) {\n\t\ttry {\n\t\t\treturn entityManager\n\t\t\t\t\t.createNamedQuery(User.FIND_BY_EMAIL, User.class)\n\t\t\t\t\t.setParameter(\"email\", email).getSingleResult();\n\t\t} catch (PersistenceException e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"@Override\n\tpublic int getUserId(String email) throws DatabaseException, DataNotFoundException {\n\t\tConnection con = DbUtil.getConnection();\n\t\tStudentRegistrationValidationDaoi studentRegistrationValidationDaoi=new StudentRegistrationValidationDaoimpl();\n\t\tint value=studentRegistrationValidationDaoi.getUserId(email, con);\n\t\tDbUtil.closeConnection(con);\n\t\treturn value;\n\t}",
"@Override\n\tpublic Long getUserIdByEmail(final String email) {\n\t\tfinal UserFormData formData = new UserFormData();\n\t\tformData.getEmail().setValue(email.toLowerCase());\n\t\tthis.loadUserIdByEmail(formData);\n\t\treturn formData.getUserId().getValue();\n\t}",
"public User getUserByEmail(String email) throws SQLException {\n\t\ttry {\n\n\t\t\tthis.TryConnect();\n\n\t\t\tthis.m_objData.SetStoreName(\"sys_user_getByEmail(?)\");\n\t\t\tthis.m_objData.Parameters.setString(1, email);\n\n\t\t\tResultSetMapper util = new ResultSetMapper<User>();\n\n\t\t\tResultSet lstResult = this.m_objData.ExecToResultSet();\n\n\t\t\tList<User> lstUser = util.mapRersultSetToObject(lstResult,\n\t\t\t\t\tUser.class);\n\n\t\t\tif (lstUser == null)\n\t\t\t\treturn null;\n\n\t\t\tif (lstUser.size() > 0)\n\t\t\t\treturn lstUser.get(0);\n\t\t\treturn null;\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\n\t\t\tthis.TryDisconnect();\n\t\t}\n\n\t\treturn null;\n\t}",
"public User getUser(String email) {\n\n Query query = new Query(\"User\").setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if (userEntity == null) {\n return null;\n }\n\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n User user = new User(email, aboutMe);\n\n return user;\n }",
"@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n return appRepository.findByEmail(email)\n .orElseThrow(() ->\n new UsernameNotFoundException(\n String.format(USER_NOT_FOUND, email)));\n }",
"public Utente retriveByEmail(String email) {\n\t\t\n\t\tTypedQuery<Utente> query = em.createNamedQuery(Utente.FIND_BY_Email, Utente.class);\n query.setParameter(\"email\", email); //parameters by name \n return query.getSingleResult();\n\t}",
"@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\t\t// ako se ne radi nasledjivanje, paziti gde sve treba da se proveri email\n\t\tKorisnik user = korisnikService.pronadjiPoMejlu(email);\n\t\t\n\t\tif (user == null) {\n\t\t\tthrow new UsernameNotFoundException(String.format(\"No user found with username '%s'.\", email)); \n\t\t} else {\n\t\t\treturn user;\n\t\t}\n\t}",
"public synchronized User getUser(String email) {\r\n return (email == null) ? null : email2user.get(email);\r\n }",
"public User getUser(String email) {\n\t\t\tSQLiteDatabase db = this.getReadableDatabase();\n\t\t\t\n\t\t\tCursor cursor = db.query(TABLE_USERS, new String[] { KEY_USER_ID, \n\t\t\t\t\tKEY_PASSWORD, KEY_EMAIL }, KEY_EMAIL + \" = ?\",\n\t\t\t\t\tnew String[] { String.valueOf(email) }, null, null, null, null);\n\t\t\tif (cursor != null)\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\n\t\t\tUser user = new User(\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_PASSWORD)),\n\t\t\t\t\tcursor.getString(cursor.getColumnIndex(KEY_EMAIL)),\n\t\t\t\t\tInteger.parseInt(cursor.getString(0)) );\n\t\t\t// return user\n\t\t\treturn user;\n\t\t\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic User getUserByEmail(String email, User user) {\n\t\tSession session = sessionFactory.openSession();\n\t\tList<User> userList = new ArrayList<>();\n\t\tuserList = (List<User>) session.createQuery(\"from User\");\n\t\tfor (User tempUser : userList) {\n\t\t\tif (tempUser.getEmail().equalsIgnoreCase(email)) {\n\t\t\t\tuser = tempUser;\n\t\t\t\tSystem.out.println(\"get uswer by email: \" + user);\n\t\t\t\treturn user;\n\t\t\t}\n\t\t}\n\t\treturn user;\n\t}",
"Optional<User> findOneByEmail(String email);",
"Optional<JUser> readByEmail(String email);",
"@Override\n public UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n return userRepository.findByEmail(email).orElseThrow(() -> new UsernameNotFoundException(\"User not found!\"));\n }",
"public User findByEmail(String email) {\n\t\treturn null;\n\t}",
"User find(long id);",
"User getUserById(Long id);",
"User getUserById(Long id);",
"User findUserById(int id);",
"public User existsProfile(String email) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n\n SuperBooleanBuilder query = new SuperBooleanBuilder();\n query.put(\"email\", email);\n Search search = new Search.Builder(query.toString())\n .addIndex(INDEX_NAME)\n .addType(User.class.toString())\n .build();\n\n User result = null;\n try {\n result = client.execute(search).getSourceAsObject(User.class);\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n return result;\n }",
"public User getUserByEmail(String email_) {\n User user = new User();\n \n return user;\n }",
"@Override\n\tpublic User findUser(int id) {\n\n\t\tUser user = em.find(User.class, id);\n\n\t\treturn user;\n\t}",
"public User getUser(String email) {\n\n Query query = new Query(\"User\")\n .setFilter(new Query.FilterPredicate(\"email\", FilterOperator.EQUAL, email));\n PreparedQuery results = datastore.prepare(query);\n Entity userEntity = results.asSingleEntity();\n if(userEntity == null) {return null; }\n String aboutMe = (String) userEntity.getProperty(\"aboutMe\");\n //ArrayList<String> advisees = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisees\")).split(\" \")));\n //ArrayList<String> advisors = new ArrayList<String>(Arrays.asList(((String) userEntity.getProperty(\"advisors\")).split(\" \")));\n String fn = (String) userEntity.getProperty(\"firstName\");\n String ln = (String) userEntity.getProperty(\"lastName\");\n User user = new User(email, fn, ln, aboutMe);\n return user;\n\n }",
"@Override\n\tpublic UserDetails loadUserByUsername(String email) throws UsernameNotFoundException {\n\n\t\t Optional<com.java.redactrix.entity.User> user = userService.findUserByEmail(email);\n\t\t if(user.isPresent()) {\n\t\t\t System.out.println(\"User Found\");\n\t\t\t com.java.redactrix.entity.User getUser = user.get();\n\t\t\t String password = getUser.getPassword();\n\t\t\t return new org.springframework.security.core.userdetails.User(email, password, new ArrayList<>());\n\t\t }\n\t\t else {\n\t\t\t return null;\n\t\t }\n\t}"
] | [
"0.79466116",
"0.79121524",
"0.7886391",
"0.7797487",
"0.7738028",
"0.77213025",
"0.7670821",
"0.76413697",
"0.76332486",
"0.76265013",
"0.7623888",
"0.7622601",
"0.76199275",
"0.7616629",
"0.7570469",
"0.7533438",
"0.7486762",
"0.7453777",
"0.74150276",
"0.7412493",
"0.7412493",
"0.7412493",
"0.7412493",
"0.7412493",
"0.7412493",
"0.7360505",
"0.73496443",
"0.73418325",
"0.73418325",
"0.73418325",
"0.73398393",
"0.7333219",
"0.73278743",
"0.730052",
"0.730052",
"0.7290857",
"0.7286199",
"0.72833645",
"0.72427106",
"0.72411406",
"0.72372305",
"0.7230626",
"0.7217127",
"0.72140163",
"0.7207384",
"0.7204105",
"0.7195582",
"0.7195582",
"0.71455413",
"0.7138856",
"0.71387446",
"0.7127528",
"0.71198237",
"0.71198237",
"0.7117266",
"0.70919436",
"0.7081398",
"0.70761645",
"0.70549625",
"0.70425683",
"0.7031816",
"0.7019863",
"0.7006588",
"0.69801986",
"0.6978003",
"0.6976499",
"0.6968754",
"0.69615775",
"0.6958766",
"0.69385296",
"0.69326437",
"0.6931596",
"0.6913684",
"0.6912966",
"0.68910336",
"0.6888733",
"0.68773854",
"0.68342936",
"0.68262213",
"0.6818695",
"0.67992043",
"0.6798682",
"0.6790231",
"0.6786301",
"0.6780975",
"0.6779108",
"0.6776337",
"0.6773792",
"0.6762518",
"0.6734518",
"0.6725348",
"0.67218196",
"0.6710228",
"0.6710228",
"0.6710029",
"0.6707322",
"0.6706998",
"0.66904163",
"0.6686193",
"0.6659872"
] | 0.7103549 | 55 |
This method determines the maximum string in an array of strings. The maximum in this case is considered to be the last in alphabetical order. | public static void function4(Set<String> stringSet) {
System.out.println("4 - The maximum (the last in alphabetical order) string in the list is:");
System.out.println(stringSet.stream().max(Comparator.comparing(String::toString)).get());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String maxString(ArrayList<String> array){\n \n String max = \"\";\n for(String s:array){\n \n if(s.length() > max.length()){\n max = s;\n }\n }\n return max;\n }",
"public static String maxValue(String[] strArr) {\r\n\t\tString temp;\r\n\t\tint strArrLength = strArr.length;\r\n\t\tfor (int i = 0; i < strArr.length; i++) {\r\n\t\t\tfor (int j = i + 1; j < strArr.length; j++) {\r\n\t\t\t\tif (strArr[j].compareTo(strArr[i]) < 0) {\r\n\t\t\t\t\ttemp = strArr[j];\r\n\t\t\t\t\tstrArr[j] = strArr[i];\r\n\t\t\t\t\tstrArr[i] = temp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn strArr[strArrLength - 1];\r\n\t}",
"public String findMax(String[] vals)\r\n\t{\r\n\t\treturn \"nothing yet\";\r\n\t}",
"private static int longestString(List<String> arr) {\n\t\tList<String> ll=new ArrayList();\r\n\t\tlongestString(arr,0,\"\",ll);\r\n\t\tint max=0;\r\n\t\tfor(String a:ll) {\r\n\t\t\tint len=a.length();\r\n\t\t\tif(len>max) {\r\n\t\t\t\tmax=len;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max;\r\n\t}",
"@Test\n public void test_kmax_String_Collection1() {\n populate_s1();\n String actual = Selector.kmax(s1, 4, new CompareStringAscending());\n String expected = \"B\";\n Assert.assertEquals(\"4th maximum not found (strings)\", expected, actual);\n }",
"public int maxLength(List<String> arr) {\n\n List<String> results = new ArrayList<>();\n\n results.add(\"\");\n\n for (String word : arr) {\n if (!isValid(word)) continue;\n\n List<String> tempResults = new ArrayList<>();\n for (String result : results) {\n String candidate = result + word;\n if (isValid(candidate)) tempResults.add(candidate);\n }\n results.addAll(tempResults);\n }\n\n String result = results.stream().max(Comparator.comparingInt(String::length)).orElse(\"\");\n\n return result.length();\n }",
"@Test\n public void test_max_String_Collection1() {\n populate_s1();\n String actual = Selector.max(s1, new CompareStringAscending());\n String expected = \"E\";\n Assert.assertEquals(\"Maximum not found\", expected, actual);\n }",
"public static String findMaxSubStringAlpha(String str) {\n if (!str.equals(\"\")) {\n\n // Loop to find the maximum alphabetical substring in\n // the substring array \n String s = \"\"; \n for (int i = 0; i < str.length(); ++i) { \n // Using the compareTo method to compare each substring in array\n // source : https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable.html\n if (s.compareTo(str.substring(i)) <= 0) { \n s = str.substring(i); \n // See how we get there\n System.out.println(\"The string is: \" + s);\n } \n } \n\n return s; \n } else {\n throw new IllegalArgumentException(\"Please input a valid string.\");\n }\n }",
"public static int maxLength(String arr[])\n {\n int maxL = 0;\n for (String s:arr) {\n if(s.length()>maxL){\n maxL=s.length();\n }\n }\n return maxL;\n }",
"private static String largestNumber(String[] a) {\n String result = \"\";\n\n List<String> strArr = new ArrayList<>(Arrays.asList(a));\n\n// Collections.sort(strArr, Collections.reverseOrder());\n\n int longestNumberLength = 0;\n for (int i = 0; i < strArr.size(); i++) {\n if (strArr.get(i).length() > longestNumberLength) {\n longestNumberLength = strArr.get(i).length();\n }\n }\n\n int nDigit = 0;\n int maxNDigit = 0;\n int maxFirstDigit = 0;\n int maxSecondDigit = 0;\n int maxThirdDigit = 0;\n int maxFourthDigit = 0;\n int maxFifthDigit = 0;\n for (int i = 0; i < strArr.size(); i++) {\n if (strArr.get(i).length() >= nDigit + 1 && (strArr.get(i).charAt(nDigit) - '0') > maxNDigit) {\n maxNDigit = strArr.get(i).charAt(nDigit) - '0';\n }\n }\n\n List<String> maxNDigitNumbers = new ArrayList<>();\n\n for (int i = 0; i < strArr.size(); i++) {\n if (strArr.get(i).length() >= nDigit + 1 && (strArr.get(i).charAt(nDigit) - '0') == maxNDigit) {\n maxNDigitNumbers.add(strArr.get(i));\n }\n }\n\n\n// for (String s : maxNDigitNumbers) {\n// result = new StringBuilder().append(result).append(s).toString();\n// }\n\n return result;\n }",
"@Test\n\tpublic void stringMax1() {\n\t\tString actualValue = Maximum.getmaximum2(\"Aa\",\"Bb\",\"Cc\");\n\t\tAssert.assertEquals(\"Cc\",actualValue);\n\t}",
"static String biggerIsGreater(String w) {\n int l = w.length();\n String[] strs = new String[w.length()];\n for (int i = 0; i < l; i++) {\n strs[i] = w.charAt(i)+\"\";\n }\n\n Arrays.sort(strs, Collections.reverseOrder());\n StringBuffer maxString = new StringBuffer();\n for (int i = 0; i < l; i++) {\n maxString.append(strs[i]);\n }\n StringBuffer s = new StringBuffer(w);\n if(s.toString().equals(maxString)){\n return \"no answer\";\n }\n boolean found = false;\n int i = l-1;\n int j = 0;\n while(!found && i>0 && s.toString().compareTo(maxString.toString()) <0){\n char qi = s.charAt(i);\n for (j = i-1; j >=0 ; j--) {\n char qj = s.charAt(j);\n if(qi > qj){\n s.setCharAt(i, qj);\n s.setCharAt(j, qi);\n found = true;\n break;\n }\n }\n i--;\n }\n String res = sort(s.toString(), j+1, s.length(), false);\n\n return found?res:\"no answer\";\n\n }",
"public static String mostLowerCase( List<String> strings ) {\n\t\treturn strings\n\t\t\t.stream()\n\t\t\t.max( Comparator.comparing(Exersice0607::countOfLowerCase) )\n\t\t\t.get();\n\t}",
"public String longestWord(String[] words) {\n String ans = \"\";\n\n Set<String> wordSet = new HashSet<String>();\n for (String w : words) {\n wordSet.add(w);\n }\n\n for (String w : words) {\n if (isValidWord(w, wordSet)) {\n System.out.println(w);\n if (w.length() > ans.length()) {\n ans = w;\n } else if (w.length() == ans.length() && w.compareTo(ans) > 0) {\n ans = w;\n }\n }\n }\n\n return ans;\n }",
"@org.junit.Test\n\tpublic void testingStringlargestFromLast() {\n\t\tString result=object.largestWordInString(\"I live in Pune\");\n\t\tassertEquals(\"Pune\",result );\n\t}",
"public String longestWord(String[] words) {\n PriorityQueue<String> queue = new PriorityQueue<>(new Comparator<String>() {\n @Override\n public int compare(String o1, String o2) {\n if (o1.length() > o2.length())\n return -1;\n else if (o1.length() == o2.length())\n return o1.compareTo(o2);\n else\n return 1;\n }\n });\n \n Set<String> set = new HashSet<>();\n for (String s : words) {\n set.add(s);\n queue.add(s);\n }\n \n while (!queue.isEmpty()) {\n String w = queue.poll();\n boolean res = true;\n for (int i = 1; i < w.length() ; i++) {\n String sub = w.substring(0, i);\n if (!set.contains(sub)) {\n res = false;\n break;\n }\n }\n if (res)\n return w;\n }\n \n return \"\";\n }",
"public String most(String[] sentences) {\n\t\tString words = \"\";\n\t\tfor(int i = 0; i < sentences.length; i++){\n\t\t\twords = words + \" \" + sentences[i];\n\t\t}\n\t\twords = words.toLowerCase();\n\t\tString[] new_words = words.split(\" \"); \n\t\t\n\t\tMap<String, Integer> counting = new TreeMap<String, Integer>();\n\t\tfor(int i = 0; i < new_words.length; i++){\n\t\t\tif(counting.containsKey(new_words[i])){\n\t\t\t\tcounting.put(new_words[i], counting.get(new_words[i]) + 1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcounting.put(new_words[i], 1);\n\t\t\t}\n\t\t}\n\t\tint max = 0; \n\t\tString max_word = \"\";\n\t\tfor(String s: counting.keySet()){\n\t\t\tif(counting.get(s) > max){\n\t\t\t\tmax = counting.get(s);\n\t\t\t\tmax_word = s;\n\t\t\t}\n\t\t}\n\t\treturn max_word;\n }",
"public static int maxLength(String arr[])\r\n\t{\r\n\t\tint maxLength = 0;\r\n\t\tfor (String aux : arr) {\r\n\t\t\tif (aux.length() > maxLength)\r\n\t\t\t\tmaxLength = aux.length();\r\n\t\t}\r\n\t\treturn maxLength;\r\n\t}",
"int max() {\n\t\t// added my sort method in the beginning to sort out array\n\t\tint n = array.length;\n\t\tint temp = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tfor (int j = 1; j < (n - i); j++) {\n\n\t\t\t\tif (array[j - 1] > array[j]) {\n\t\t\t\t\ttemp = array[j - 1];\n\t\t\t\t\tarray[j - 1] = array[j];\n\t\t\t\t\tarray[j] = temp;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// finds the last term in the array --> if array is sorted then the last\n\t\t// term should be max\n\t\tint x = array[array.length - 1];\n\t\treturn x;\n\t}",
"private void getMaxValue(){\n maxValue = array[0];\n for(int preIndex = -1; preIndex<number; preIndex++){\n for(int sufIndex = preIndex+1; sufIndex<=number;sufIndex++){\n long maxTmp = getPrefixValue(preIndex)^getSuffixCValue(sufIndex);\n if(maxTmp>maxValue){\n maxValue = maxTmp;\n }\n }\n }\n System.out.println(maxValue);\n }",
"public void maxSubString(String subString){\n String word = subString;//abc, bca, cab, abcd, bcd,cd,d\n Map<Character,Integer> testMap=new HashMap<>();\n testMap.clear();\n char [] cw=word.toCharArray();\n Map<String,Integer> stringMap=new HashMap<>();\n stringMap.clear();\n\n for(int i=0;i<word.length();i++){\n String addedStrings=\"\";\n for(int j=i;j<word.length();j++) {\n Character ch = cw[j];\n if (!testMap.containsKey(ch)) {\n testMap.put(ch, 1);\n addedStrings =addedStrings+String.valueOf(ch);\n if(j==word.length()-1){\n stringMap.put(addedStrings,addedStrings.length());\n testMap.clear();\n }\n } else {\n stringMap.put(addedStrings,addedStrings.length());\n testMap.clear();\n break;\n }\n }\n }\n Integer maxString=Collections.max(stringMap.values());\n System.out.println(\"MAX STRING---------------\"+maxString);\n for(Map.Entry<String,Integer> collectedString: stringMap.entrySet()){\n if(maxString==collectedString.getValue()){\n System.out.println(collectedString.getKey());\n System.out.println(\"********************************\");\n System.out.println(collectedString.getValue());\n }\n }\n }",
"public static void main(String[] args) {\n String s = \"Human brain is a biological learning machine\";\n String [] word = s.split(\" \");\n String maxlethWord = \"\";\n for(int i = 0; i < word.length; i++){\n if(word[i].length() >= maxlethWord.length()){\n maxlethWord = word[i];\n }\n }\n System.out.println(\"The length and longest word : \"+maxlethWord);\n\n }",
"public String getLongestWordFromTextField(String [] arr){\n\t\tString longestWord = \"\";\n\t\tint [] count= new int[arr.length];\n\t\t//for each element it stores the length of each element\n\t\tfor(int i = 0; i < count.length; i++){\n\t\t\tcount[i] = arr[i].length();\t\t\t\n\t\t}\n\t\t//sorts the array from smallest to largest numbers\n\t\tArrays.sort(count);\n\t\tint longestWordLength = count[count.length - 1];\n\t\t//finds the word with the longest number of characters and stores it\n\t\tfor(int a = 0 ; a < arr.length; a++){\n\t\t\tif(arr[a].length() == longestWordLength){\n\t\t\t\tlongestWord += arr[a];\n\t\t\t}\n\t\t}\n\t\treturn longestWord;\n\n\t}",
"public static int maxRun(String str) {\n\t\tif(str.length() == 0) return 0;\n\t\tint max = 1, curLen = 1;\n\t\tchar lastChar = str.charAt(0);\n\t\tfor(int i = 1; i < str.length(); i++){\n\t\t\tif(str.charAt(i) == lastChar) {\n\t\t\t\tcurLen++;\n\t\t\t} else {\n\t\t\t\tlastChar = str.charAt(i);\n\t\t\t\tcurLen = 1;\n\t\t\t}\n\t\t\tif (curLen > max) max = curLen;\n\t\t}\n\t\treturn max;\n\t}",
"private static String getMaxString(String str) {\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tif (stripColors(str.substring(0, i)).length() == maxLength) {\n\t\t\t\tif (stripColors(str.substring(i, i+1)) == \"\")\n\t\t\t\t\treturn str.substring(0, i-1);\n\t\t\t\telse\n\t\t\t\t\treturn str.substring(0, i);\n\t\t\t}\n\t\t}\n\t\treturn str;\n\t}",
"public static int LongestName () {\n int result = 0;\r\n\r\n // LOOP THROUGH THE PLAYERS\r\n for (int i = 0; i < player_count; i++) {\r\n // DID WE FIND A LONGER NAME?\r\n if (player[i].GetName().length() > result)\r\n result = player[i].GetName().length();\r\n }\r\n\r\n // RETURN THE RESULT\r\n return result;\r\n }",
"public String maximum(){\n\t\treturn queueArray[1][1];\n\t}",
"public int getMaxStr() {\n return (((Integer) (data[GENERAL_MAX_STRING][PROP_VAL_VALUE])).intValue());\n }",
"@org.junit.Test\n\tpublic void testingStringLargest() {\n\t\tString result=object.largestWordInString(\"Game of Thrones\");\n\t\tassertEquals(\"Thrones\",result );\n\t}",
"public String getMax() {\n return max;\n }",
"public static int getMax(Set<String> set){\n \tint max = 0;\n \tfor(String s : set){\n \t\tmax = Math.max(max, s.length());\n \t}\n \t\n \treturn max;\n }",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString s = sc.next();\n\t\tchar[] arr= s.toLowerCase().toCharArray();\n\t\tint indx[] = new int[26];\n\t\tint asciiOffset = 97;\n\t\tfor(int x=0;x<arr.length ;x++){\n\t\t\tindx[arr[x]-asciiOffset] = indx[arr[x]-asciiOffset]+1;\n\t\t}\n\t\tint max =indx[0];\n\t\tint indexOfMax = 0;\n\t\tfor(int i=1; i<indx.length; i++){\n\t\t\tif(indx[i]>max){\n\t\t\t\tmax = indx[i];\n\t\t\t\tindexOfMax=i;\n\t\t\t}\t\n\t\t}\n\t\tchar ch = (char)(asciiOffset+indexOfMax);\n\t\tSystem.out.println(\"Max occurance of the character is =\"+ch);\n\t}",
"public int findLUSlength(String[] strs) { //O(n^2) time. O(1) space.\r\n\t\tif (strs.length == 0)\r\n\t\t\treturn 0;\r\n\t\tint max = -1;\r\n\t\tint i = 0;\r\n\t\t// Arrays.sort(strs, (a,b) -> b.length() - a.length());\r\n\t\tfor (int j = 0; j < strs.length; j++) {\r\n\t\t\tfor (i = 0; i < strs.length; i++) {\r\n\t\t\t\tif (j == i || !isSubsequence(strs[j], strs[i]))\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\telse\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (i == strs.length)\r\n\t\t\t\tmax = Math.max(strs[j].length(), max);\r\n\t\t}\r\n\t\treturn max;\r\n\t}",
"public static int max(String[] wordsArray, int[] countArray){\r\n\t\tint max= 0;\r\n\t\t\r\n\t\tfor(int i=0; i<wordsArray.length;i++) {\r\n\t\t\tif(countArray[i]>max) max=countArray[i];\r\n\t\t}\r\n\t\t\r\n\t\treturn max;\r\n\t}",
"public static String bestWord (String [] word, int [] scoretable)\r\n { \r\n int score = 0;\r\n int maxScore = 0;\r\n String maxScoreString = \"\";\r\n for(String each : word)\r\n { \r\n score = getScore(each, scoretable); \r\n if(score > maxScore)\r\n {\r\n maxScore = score;\r\n maxScoreString = each;\r\n }\r\n } \r\n return maxScoreString;\r\n }",
"public static String maxWeather(int[] array, String[]a) {\n String day=\" \";\n int max = array[0];//set int to array[0] because could be more or less than 0 but the first number in array is largest for now\n //finding max value in the array that will be plugged in when we use this method\n for (int i = 1; i < array.length; i++) {//start loop at 0 because array also start at 0, not super necessary here because already at 0 so here we'll do = to 1\n if (array[i] > max) { // when put i in loop, linking it to loop, this will check every index 1st to end\n max = array[i]; //can't just do return max here because haven't checked the rest so return outside the loop\n day = a[i];\n }\n }return day+ \" at \"+max+\".\"; //returns a string\n }",
"public String longestItemInList (String [] list, int count){\n \n String longestWord = list[0];\n \n for(int i = 0; i < count; i++){\n \n if (list[i].length() > longestWord.length())\n longestWord = list[i];\n \n }//End for loop\n \n return longestWord;\n }",
"public String extractMax(){\n\t\tString maxValue = queueArray[1][1];\n\t\t\n\t\tremove();\n\t\tmove();\n\t\t\n\t\treturn maxValue;\n\t}",
"public static void main(String[] args) {\n String str = \"bbaabdd\";\n System.out.println(maximumChar( str ));\n\n }",
"protected String getMaximum()\n {\n return maximum;\n }",
"int max(){\r\n int auxMax = array[0];\r\n for (int i=1;i<array.length;i++){\r\n if(array[i] > auxMax){\r\n auxMax = array[i];\r\n }\r\n }\r\n return auxMax;\r\n }",
"String getMax_res();",
"static int indexOfLargest(String[] V, int i0, int i1) {\n\t\tif (i0 >= i1)\n\t\t\treturn i1;\n\t\telse {\n\t\t\tint k = indexOfLargest(V, i0+1, i1);\n\t\t\treturn (V[i0].compareTo(V[k]) > 0) ? i0 : k;\n\t\t}\n\t}",
"public static List<String> findMaxWords(Set<String> excludedWords, String inputString) {\n List<String> splitStringList = Arrays.asList(inputString.split(\"[ \\\\'\\\\.]\"));\n Map<String, Integer> wordCount = new HashMap<>(splitStringList.size());\n\n //create an hasmap with strings and their corresponding occurrences.\n for (String word : splitStringList) {\n String s = String.valueOf(word.charAt(0));\n if (!excludedWords.contains(word)) {\n wordCount.put(word, wordCount.get(word) == null ? 1 : wordCount.get(word) + 1);\n }\n }\n\n //create a list of all the entries in the map.\n List countEntries = new ArrayList<Map.Entry<String, Integer>>();\n countEntries.addAll(wordCount.entrySet());\n //sort the entry lists using the custom comparator class defined below.\n Collections.sort(countEntries, new sortEntries());\n List<String> maxOccursStringsList = new ArrayList<>();\n\n //find the maximum value\n int maxValue = (int) ((Map.Entry) countEntries.get(0)).getValue();\n //create a list of strings whose count matches with the maximum occurrence\n for (Object entry :\n countEntries) {\n if (((Map.Entry) entry).getValue().equals(maxValue)) {\n maxOccursStringsList.add(((Map.Entry) entry).getKey().toString());\n } else {\n return maxOccursStringsList;\n }\n }\n return maxOccursStringsList;\n }",
"public String longestPalindrome(String s) {\n // string to hold the current max\n String max = \"\";\n // deal with edge cases where it is either empty or one letter\n if(s.length() < 2){\n return s;\n }\n // go through each possible string\n for(int i = 0; i < s.length(); ++i){\n \n for(int j = i + 1; j <= s.length(); ++j){\n // if the reversed substring is equal, its a palindrome \n if(s.substring(i,j).equals(reverse(s.substring(i,j)))){\n // if it is greater than the current max's length, it is the new max\n if(s.substring(i,j).length() > max.length() ){\n max = s.substring(i,j);\n }\n }\n }\n }\n // give them back the max\n return max;\n }",
"private int getLatestDeploymentNameSuffix() {\n List<String> deploymentList = getDeployments();\n// log.info(\"Currently have \" + deploymentList.size() + \" deployments...\");\n if (deploymentList.size() > 0) {\n deploymentList.sort((o1, o2) -> {\n int mySuffix = Integer.parseInt(o1.substring((Constants.BPG_APP_TYPE_LAUNCHER + \"-\").length()));\n int theirSuffix = Integer.parseInt(o2.substring((Constants.BPG_APP_TYPE_LAUNCHER + \"-\").length()));\n\n return Integer.compare(mySuffix, theirSuffix);\n });\n\n// log.info(\"Sorted deployments: \" + deploymentList.toString());\n String lastElement = deploymentList.get(deploymentList.size() - 1);\n// log.info(\"Last element: \" + lastElement);\n String lastLauncherSuffix = lastElement.substring((Constants.BPG_APP_TYPE_LAUNCHER + \"-\").length());\n\n// log.info(\"Picking last deployment suffix: \" + lastLauncherSuffix);\n return Integer.parseInt(lastLauncherSuffix);\n }\n\n return 0;\n }",
"public static int MaxRun(String userInput){\n\t\tint maxRun = 1;\r\n\t\tint currentRun = 0;\r\n\t\tchar lastLetter = userInput.charAt( 0 );\r\n\t\t\r\n\t\tfor (int count = 0; count < userInput.length(); count++){\r\n\t\t\t//loop that loops until each character in string is done.\r\n\t\t\t\r\n\t\t\tif (lastLetter == userInput.charAt(count)){\r\n\t\t\t\t//adds one more number to the current run.\r\n\t\t\t\tcurrentRun++;\r\n\t\t\t\t//System.out.println(\"current run: \" + currentRun);\r\n\t\t\t\tif (currentRun > maxRun){\r\n\t\t\t\t\t//if the current count is higher than the max, it's the new max.\r\n\t\t\t\t\tmaxRun = currentRun;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//if the last letter was different than this one, reset currentRun to 1.\r\n\t\t\t\tcurrentRun = 1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//makes the current letter the new last letter before re-looping.\r\n\t\t\tlastLetter = userInput.charAt(count);\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn maxRun;\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString movies[] = new String[4] ;\n\t\tmovies[0]= \"Life\" ;\n\t\tmovies[1]= \"Without\" ;\n\t\tmovies[2]= \"love is\" ;\n\t\tmovies[3]= \"meaningless\" ;\n\t\t\n//\t\tSystem.out.println(Arrays.toString(movies));\n\t\t\n\t\t\n\t\t\n//\t\tSystem.out.println(movies.length );\n\t\t\n//\t\tint i = 0;\n//\t\tSystem.out.println(movies[0].length());\n//\t\ti++;\n//\t\tSystem.out.println(movies[0].length());\n//\t\ti++;\n//\t\tSystem.out.println(movies[0].length());\n//\t\ti++;\n//\t\tSystem.out.println(movies[0].length());\n\t\t\n\t\tfor(int i = 0; i<movies.length; i++) {\n\t\t\tSystem.out.println(movies[i] + \" char count is : \" + movies[i].length());\n\t\t}\n\t\t\n//\t\tint max = movies[0].length();\n//\t\tfor (int j = 1; j < movies.length; j++) {\n//\t\t\t\n//\t\t\tif( movies[j].length() >max) {\n//\t\t\t\tmax = movies[j].length();\n//\t\t\t}\n//\t\t}\n//\t\tSystem.out.println(max);\n//\t\t\n\t\t\n\t\t\n\t\tint max = movies[0].length();\n\t\t\n\t\tint index = 0 ;\n\t\tfor (int k = 1; k < movies.length; k++) {\n\t\t\t\n\t\t\tif( movies[k].length() >max) {\n\t\t\t\tmax = movies[k].length();\n\t\t\t\tindex = k ;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(index);\n\t\tSystem.out.println(movies[index]);\n\t\t\n\t}",
"public static void main(String args[]){\n String s=\"abcabcbb\";\n String s1=\"bbbbb\";\n String s2=\"pwwkew\";\n System.out.println(solution(s));\n System.out.println(solution(s1));\n System.out.println(solution(s2));\n System.out.println(maxNonrepeatingstring(s));\n System.out.println(maxNonrepeatingstring(s1));\n System.out.println(maxNonrepeatingstring(s2));\n }",
"public static char maximumOccurringCharacter(String text) {\n char[] charArray= text.toCharArray() ;\n HashMap<Character, Integer> map= new HashMap<>() ;\n for(Character c : charArray){\n if(map.containsKey(c)){\n int value = map.get(c) ;\n map.put(c , value + 1) ;\n }\n else{\n map.put(c , 1) ;\n }\n }\n\n char maxKey ; int maxValue = Integer.MIN_VALUE ;\n LinkedList<Character> maxList = new LinkedList<>() ;\n for(char key: map.keySet()){\n if(map.get(key)>maxValue){\n maxValue = map.get(key) ;\n }\n }\n\n for(char key: map.keySet()){\n if(map.get(key)== maxValue){\n maxList.add(key) ;\n }\n }\n\n char earlier = Character.MAX_VALUE ;\n for(int counter = 0 ; counter< maxList.size() ; counter++){\n if( maxList.get(counter)< earlier){\n earlier = maxList.get(counter) ;\n }\n }\n return earlier ;\n }",
"public static int maxRun(String str) {\n\t\tif (str.length()==0) return 0;\n\t\tint max = 1;\n\t\tint currcount = 1;\n\t\tfor (int i=0; i < str.length()-1; i++){\n\t\t\tif (str.charAt(i)==str.charAt(i+1)){\n\t\t\t\tcurrcount++;\n\t\t\t\tif (currcount > max) max = currcount;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcurrcount = 1;\n\t\t\t}\n\t\t}\n\t\treturn max; // TODO ADD YOUR CODE HERE\n\t}",
"@Test\n public void testStringList(){\n Stream<String> stringStream = Stream.of(\"Aasd\",\"ssd\",\"as\");\n Optional<String> max = stringStream\n .peek(System.out::println)\n .max(Comparator.comparing(name -> getCount(name)));\n System.out.println(max.get());\n }",
"public static int getIndexOfMax(double[] array){\n\n int largest = 0;\n for ( int i = 1; i < array.length; i++ )\n {\n if ( array[i] > array[largest] ) largest = i;\n }\n return largest;\n\n }",
"public String findHighestScorers() {\n ArrayList<String> names = new ArrayList<String>();\n String theirNames = \"\";\n int highest = findHighestScore();\n for (int i = 0; i < allQuizTakers.size(); i++) {\n\n if (allQuizTakers.get(i).getScore(0).compareTo(highest) == 0) {\n //note that each quiz taker's arraylist of scores is already sorted in descending order post-constructor\n boolean alreadyThere = false;\n for(String name: names) {\n if(name.equals(allQuizTakers.get(i).getName())) {\n alreadyThere = true;\n }\n }\n if (!alreadyThere) {\n theirNames += allQuizTakers.get(i).getName() + \" \";\n names.add(allQuizTakers.get(i).getName());\n }\n }\n }\n return theirNames;\n }",
"public static void main(String[] args)\n {\n System.out.println(\"Enter your sentence: \");\n Scanner in = new Scanner(System.in);\n //Take the entered sentence\n String input = in.nextLine();\n //This is for searching\n char auxiliary = 'a';\n //This is the final letter which has the highest occurrence\n char[] letter = new char[26];\n int arrayCounter = 0;\n //This is simply a counter\n int frequency = 0;\n //This shows the highest frequency of a letter inside the entered sentence\n int maxFrequency = 0;\n //The outer loop goes for all letters in English\n for(int i = 0; i < 26; i++)\n {\n //The inner loop searches along the whole entered sentence\n for(int j = 0; j < input.length(); j++)\n {\n //No matter if the letter inside the sentence is capital or small\n if((auxiliary+i == input.charAt(j)) || (auxiliary+i-32 == input.charAt(j)))\n {\n frequency++;\n }\n }\n //The counted number and its associated letter are saved as maxFrequency and\n //letter respectively, only if it is higher than the\n //previous maxFrequency\n if(frequency > maxFrequency)\n {\n maxFrequency = frequency;\n frequency = 0;\n letter[arrayCounter] = (char) (auxiliary+i);\n arrayCounter++;\n }\n //In case more than one letter has been repeated with the highest frequency\n else if((frequency == maxFrequency) && ((maxFrequency > 0)))\n {\n frequency = 0;\n letter[arrayCounter] = (char) (auxiliary+i);\n arrayCounter++;\n }\n else\n {\n //If not bigger than the max, its value simply vanishes!\n frequency = 0;\n }\n }\n System.out.print(\"The letter(s) \");\n for(int i = 0; i < arrayCounter-1; i++)\n {\n System.out.print(letter[i] + \", \");\n }\n System.out.print(letter[arrayCounter-1]);\n System.out.print(\" has/have been repeated (regardless of being small or capital) \"\n +maxFrequency+\" times,\" +\n \" which is the maximum in this entered sentence!\");\n }",
"private static String getMaxLength(String input) {\n\t\tif(null == input || \"\".equals(input)){\n\t\t\treturn \"输入不能为空\";\n\t\t}\n\t\tString regex = \"\\\\s+\";\n\t\tString[] strArry = input.split(regex);\n\t\tString temp = \"\";\n\t\tfor (int i = 0; i < strArry.length; i++) {\n\t\t\tif(strArry[i].length() > temp.length()){\n\t\t\t\ttemp = strArry[i];\n\t\t\t}\n\t\t}\n\t\t\n//\t\treturn removePunctuation(temp);\n\t\treturn temp;\n\t}",
"public String max()\r\n\t {\r\n\t\t if(this.max != null)\r\n\t\t {\r\n\t\t\t return this.max.getValue(); \r\n\t\t }\r\n\t\t return null;\r\n\t }",
"public static String findLongestWord(List<String> words) {\n\t\tString longestWord = words.get(0);\n\tfor (int i = 0; i < words.size(); i++) {\n\t\tif (words.get(i).length() > longestWord.length()) {\n\t\t\tlongestWord = words.get(i);\n\t\t\tbreak;\n\t\t}\n\t}\n\t\treturn longestWord;\n\t}",
"public static String mostName(String name) {\n int lastDot = name.lastIndexOf('.');\n return lastDot == -1 ? \"\" : name.substring(0, lastDot);\n }",
"public String getMax() { \n\t\treturn getMaxElement().getValue();\n\t}",
"public String largestNumber(int[] nums) {\n StringBuilder ret = new StringBuilder();\n ArrayList<Integer> list = new ArrayList<>();\n for(int e: nums) list.add(e);\n\n //sort desc, a=30, b=3, 330 > 303\n Collections.sort(list, new Comparator<Integer>(){\n public int compare(Integer a, Integer b){\n return (\"\"+b+a).compareTo(\"\"+a+b);\n }\n });\n\n for(int e: list) ret.append(e);\n\n //solve corner cases, 0, 0 -> 0\n if(ret.charAt(0) == '0') return \"0\";\n\n return ret.toString();\n }",
"public static Object findLongestWord(List<String> words) {\n\t\tint longString = 0;\n\t\tString s= \"\";\n\t\tfor (int i = 0; i < words.size(); i++) {\n\t\t\tif (words.get(i).length()>longString) {\n\t\t\tlongString=words.get(i).length();\n\t\t\t\n\t\t\ts = words.get(i);\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn s;\n\t\t//return null;\n\t}",
"public String solve1(String s) {\n Map<String, Integer> frequency = new HashMap<>();\n String maxWord = null;\n String[] split = s.split(\" \");\n\n for (String word : split) {\n int newFrequency = frequency.getOrDefault(word, 0) + 1;\n frequency.put(word, newFrequency);\n if (newFrequency > frequency.getOrDefault(maxWord, 0)) {\n maxWord = word;\n }\n }\n\n return maxWord;\n }",
"public String largestTimeFromDigits(int[] arr) {\n int[] temp = new int[4];\n boolean[] mark = new boolean[4];\n search(temp, mark, arr, 0);\n return result == null ? \"\" : result;\n }",
"public static Set<String> findLongestString(Set<String> strings) {\n \t Set<String> longests = new HashSet<String>();\n \t String longest = \"\";\n \t longests.add(longest);\n \t if(strings != null) {\n \t // for each string\n \t for(String s : strings) {\n \t // if longer than longest seen before\n \t if(s.length() > longest.length()) {\n \t // clear previous results\n \t longests.clear();\n \t // now this is the longest\n \t longest = s;\n \t // add to results\n \t longests.add(longest);\n \t }\n \t // if equal length to longest seen before\n \t else if(s.length() == longest.length()) {\n \t // add to results\n \t longests.add(s);\n \t }\n \t }\n \t }\n \t return longests;\n \t}",
"@JsonIgnore\r\n public String getMax() {\r\n return OptionalNullable.getFrom(max);\r\n }",
"public static int max(int[] mainArray) {\r\n\t\tint max1 = 0;\r\n\t\tfor(int greaterThan = 1; greaterThan < mainArray.length; greaterThan ++) {\r\n\r\n\t\t\tif(mainArray[greaterThan]>mainArray[max1]) {\r\n\t\t\t\tmax1 = greaterThan;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn max1;\r\n\t}",
"public String longest(List<String> list){\n\t\tIterator<String> itr = list.iterator();\n\t\tString longest= itr.next();\n\t\twhile(itr.hasNext()){\n\t\t\tString a=itr.next();\n\t\t\tif(longest.length()<a.length()){\n\t\t\t\tlongest=a;\n\t\t\t}\n\t\t}\n\t\treturn longest;\n\t}",
"private static int getMax(int[] original) {\n int max = original[0];\n for(int i = 1; i < original.length; i++) {\n if(original[i] > max) max = original[i];\n }\n return max;\n }",
"public char nextGreatestLetter(char[] letters, char target) {\n if (letters == null || letters.length == 0 || target == ' ') {\n return ' ';\n }\n \n for (char c : letters) {\n if (c > target) {\n return c;\n }\n } \n \n return letters[0];\n }",
"public long max() {\n\t\tif (!this.isEmpty()) {\n\t\t\tlong result = theElements[0];\n\t\t\tfor (int i=1; i<numElements; i++) {\n\t\t\t\tif (theElements[i] > result) {\n\t\t\t\t\tresult = theElements[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse {\n\t\t\tthrow new RuntimeException(\"Attempted to find max of empty array\");\n\t\t}\n\t}",
"public static int longestDecreasingSub(int arr[]) {\n\n\t\tint strg[] = new int[arr.length];\n\n\t\tstrg[arr.length - 1] = 1;\n\n\t\tLDS = new String[arr.length];\n\t\tLDS[arr.length - 1] = \"\" + arr[arr.length - 1];\n\t\tfor (int i = arr.length - 2; i >= 0; i--) {\n\t\t\tint longs = 0;\n\t\t\tfor (int j = i + 1; j < arr.length; j++) {\n\t\t\t\tif (arr[j] < arr[i] && strg[j] > longs) {\n\t\t\t\t\tlongs = strg[j];\n\t\t\t\t\tLDS[i] = LDS[j] + \"<\" + arr[i];\n\t\t\t\t}\n\t\t\t}\n if(longs==0)\n {\n \tLDS[i]=\"\"+arr[i];\n }\n\t\t\tstrg[i] = longs + 1;\n\n\t\t\t// System.out.println(strg[i]);\n\t\t}\n\t\tfor (String i : LDS) {\n\t\t\t//System.out.println(i);\n\t\t}\n\t\tint max = 0;\n\t\tfor (int i : strg) {\n\t\t\t// System.out.println(i);\n\t\t\tif (i > max) {\n\t\t\t\tmax = i;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public String getLongestEncoding() {\n EncodeData longest = encodings[0]; //Set longest to the first encoding\n for (int i = 1; i < encodings.length; i++) { //Loop through the encodings\n //If the encoding at index is longer than the longest encoding's length\n if(longest.encode.length() < encodings[i].encode.length()) {\n //Set longest to the new encoding\n longest = encodings[i];\n }\n }\n //Return the longest's symbol and encoding\n return longest.symbol + \" = \" + longest.encode;\n }",
"protected String getMaxValue(HashSet<String> set) {\n\t\tLong max = Long.MIN_VALUE;\n\t\tint count = 0;\n\n\t\tfor (String bound : set) \n\t\t\tif (bound.equals(\"+Inf\"))\n\t\t\t\treturn \"+Inf\";\n\t\t\telse if (bound.equals(\"-Inf\")) \n\t\t\t\tcount++;\n\t\t\telse if (Long.parseLong(bound) > max)\n\t\t\t\tmax = Long.parseLong(bound);\n\n\t\treturn count == 4 ? \"-Inf\" : String.valueOf(max);\n\t}",
"public String largestNumber(int[] nums) {\n List<String> list = new ArrayList<>();\n for (int num : nums) {\n list.add(String.valueOf(num));\n }\n /**\n * Process [3, 30] to [30, 3]\n */\n Collections.sort(list, (o1, o2) -> {\n Long x1 = Long.valueOf(o1 + o2);\n Long x2 = Long.valueOf(o2 + o1);\n if (x1 > x2) {\n return 1;\n } else if (x1 < x2) {\n return -1;\n } else {\n return 0;\n }\n });\n StringBuilder sb = new StringBuilder();\n int n = list.size();\n for (int i = n - 1; i >= 0; i--) {\n String cur = list.get(i);\n /**\n * Remove leading \"0\", such as [\"0\", \"0\", \"0\"]\n */\n if (\"0\".equals(list.get(n-1))) {\n sb.append(\"0\");\n break;\n }\n sb.append(cur);\n }\n return sb.toString();\n }",
"double largestNumber(double[] a) {\n\t\tdouble max = a[0];\n\t\tdouble no = 0;\n\t\tfor (int index = 1; index < a.length; index++) {\n\t\t\tif (max > a[index] && max > a[index + 1]) {\n\t\t\t\tno = max;\n\t\t\t\tbreak;\n\t\t\t} else if (a[index] > max && a[index] > a[index + 1]) {\n\t\t\t\tno = a[index];\n\t\t\t\tbreak;\n\t\t\t} else if (a[index + 1] > max && a[index + 1] > a[index]) {\n\t\t\t\tno = a[index + 1];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn no;\n\t}",
"public int getMaxLength();",
"public void Q5_7() {\n\t\tString[] strings = {\"Marketing\", \"Boss of director\", \"waiting room\", \"Accounting\", \"Sale\"};\n\t\tString[] str1 = strings[0].split(\"\\\\s+\");\n\t\tString[] str2 = strings[1].split(\"\\\\s+\");\n\t\tString[] str3 = strings[2].split(\"\\\\s+\");\n\t\tString[] str4 = strings[3].split(\"\\\\s+\");\n\t\tString[] str5 = strings[4].split(\"\\\\s+\");\n\t\t\n\t\tfor (int i = 0; i < strings.length - 1; i++) {\n\t\t\tfor (int j = i + 1; j < strings.length; j++) {\n\t\t\t\tif(strings[i].charAt(0) > strings[j].charAt(0)) {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\t\t\n\t}",
"static int maxCharacter(String string) {\n\t\tchar[] ch = string.toCharArray();\n\t\t// create a hashmap for lookup using the char as a key\n\t\tMap<Character, int[]> map = new HashMap<Character, int[]>();\n\t\t// loop through string\n\t\tfor (int i = 0; i < ch.length; i++) {\n\t\t\t// if the character is already in the map increase occurrence value\n\t\t\tif (map.containsKey(ch[i])) {\n\t\t\t\t// get value array\n\t\t\t\t// increase occurrence\n\t\t\t\t// set new value\n\t\t\t\tint[] curArr = map.get(ch[i]);\n\t\t\t\tcurArr[1] = curArr[1] + 1;\n\t\t\t\tmap.put(ch[i], curArr);\n\t\t\t\t// if the character isn't in map, make a new entry\n\t\t\t} else {\n\t\t\t\t// create an array { index, occurrence vale}\n\t\t\t\tint[] newArr = { i, 1 };\n\t\t\t\tmap.put(ch[i], newArr);\n\t\t\t}\n\t\t}\n\t\tint max = 0;\n\t\tint index = 0;\n\t\t// loop through entries\n\t\tfor (Map.Entry<Character, int[]> e : map.entrySet()) {\n\t\t\t// find the largest occurrence value\n\t\t\tint[] maxArr = e.getValue();\n\t\t\tif (maxArr[1] > max) {\n\t\t\t\tmax = maxArr[1];\n\t\t\t\tindex = maxArr[0];\n\t\t\t}\n\t\t}\n\t\t// return the index of the first found character\n\t\treturn index;\n\t}",
"public static int longestIncreasingSub(int arr[]) {\n\n\t\tint strg[] = new int[arr.length];\n\n\t\tstrg[0] = 1;\n\n\t\tLIS = new String[arr.length];\n\t\tLIS[0] = \"\" + arr[0];\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tint max = 0;\n\t\t\tfor (int j = 0; j < i; j++) {\n\t\t\t\tif (arr[i] > arr[j] && strg[j] > max) {\n\t\t\t\t\tmax = strg[j];\n\t\t\t\t\tLIS[i] = LIS[j] + \">\" + arr[i];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(max==0)\n {\n \tLIS[i]=\"\"+arr[i];\n }\n\t\t\tstrg[i] = max + 1;\n\t\t\t//System.out.println(strg[i]);\n\t\t}\n\t\tfor (String i : LIS) {\n\t\t\t//System.out.println(i);\n\t\t}\n\t\tint max = 0;\n\t\tfor (int i : strg) {\n\t\t\t// System.out.println(i);\n\t\t\tif (i > max) {\n\t\t\t\tmax = i;\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"private static Key max(Key... ks) {\n\t\tif (ks == null || ks.length == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tKey max = ks[0];\n\t\tfor (int i = 1; i < ks.length; i++) {\n\t\t\tif (ks[i].compareTo(max) > 0) {\n\t\t\t\tmax = ks[i];\n\t\t\t}\n\t\t}\n\t\treturn max;\n\t}",
"public static String getLastWord(ArrayList<String> s) {\n int i = s.size();\n return s.get(i - 1);\n }",
"public static void main(String[] args) {\n\n\n List<String> d = new ArrayList<>();\n d.add(\"ba\");\n d.add(\"ab\");\n d.add(\"a\");\n d.add(\"b\");\n System.out.println(findLongestWord(\"bab\", d));\n\n\n System.out.println(findLongestWord(\"aewfafwafjlwajflwajflwafj\", Arrays.asList(new String[]{\"apple\", \"ewaf\", \"awefawfwaf\", \"awef\", \"awefe\", \"ewafeffewafewf\"})));\n System.out.println(findLongestWord(\"apple\", Arrays.asList(new String[]{\"zxc\", \"vbn\"})));\n\n\n }",
"public static String MaxSequence(String X, String Y) \r\n\t{\r\n\t\tint mat[][] = BuildMatrix(X,Y);\r\n\t\tint row = mat.length;\r\n\t\tint col = mat[0].length;\r\n\t\tint seqLength = mat[row-1][col-1];\r\n\t\tString result = \"\";\r\n\t\tint i =row-1;\r\n\t\tint j = col-1;\r\n\t\tint count = seqLength-1;\r\n\t\t\r\n\t\twhile(count >= 0) \r\n\t\t{\r\n\t\t\tif(X.charAt(i-1) == Y.charAt(j-1)) \r\n\t\t\t{\r\n\t\t\t\tresult = X.charAt(i-1) + result;\r\n\t\t\t\ti--;\r\n\t\t\t\tj--;\r\n\t\t\t\tcount--;\r\n\t\t\t}\r\n\t\t\telse if(mat[i][j] == mat[i][j-1])\r\n\t\t\t\tj--;\r\n\t\t\telse\r\n\t\t\t\ti--;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public int getMaxLength(Set<String> dict) {\n int length = 0;\n for (String word : dict) {\n length = Math.max(length, word.length());\n }\n return length;\n }",
"public String getMaxKey() {\n if (list.isEmpty()) {\n return \"\";\n }\n return v.get(list.getFirst()).iterator().next();\n }",
"public int maxNumber(){\n int highest = 0;\n ArrayList<String> currentFileList = null;\n for (String word : hashWords.keySet()) {\n currentFileList= hashWords.get(word);\n int currentNum = currentFileList.size();\n if (currentNum > highest) {\n highest = currentNum;\n }\n // System.out.println(\"currentFileList \" + currentFileList +\"highest num = \"+ highest );\n }\n \n return highest;\n /*for (ArrayList s : hashWords.values()){\n if (s.size() > maxSize) {\n maxSize = s.size();\n }\n }\n return maxSize;*/\n }",
"public int findMaxForm(String[] strs, int m, int n) {\n\t\tint[][] dp = new int[m+1][n+1];\n\t\tfor (String str : strs) {\n\t\t\tint ones = 0, zeros = 0;\n\t\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\tif (str.charAt(i) == '1') ones++; else zeros++;\n\t\t\t}\n\t\t\tfor (int i = m; i >= zeros; i--) {\n\t\t\t\tfor (int j = n; j >= ones; j--) {\n\t\t\t\t\tdp[i][j] = Math.max(dp[i][j], dp[i-zeros][j-ones] + 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn dp[m][n];\n\t}",
"public static String longestSubsequence(String givenWord, String words[]){\n LinkedList<String> subSeqList = findSubsequence(givenWord, words);\n String longestSeq = \"\";\n for(String word : subSeqList){\n if(longestSeq.length() < word.length()){\n longestSeq = word;\n\n }\n }\n return longestSeq;\n }",
"public static void main(String[] args) {\n\t\tString input = \"Genetics 012345678933 undergo or cause recombination; form new combinations\";\n\t\tString result = getMaxLength(input);\n\t\tSystem.out.println(result);\n\t}",
"public StringDt getMaxElement() { \n\t\tif (myMax == null) {\n\t\t\tmyMax = new StringDt();\n\t\t}\n\t\treturn myMax;\n\t}",
"public long findMax(long[] incomes) {\n long current_max_index = 0;\n long current_max = incomes[0];\n for (long income : incomes)\n if (current_max < income)\n current_max = income;\n return current_max;\n }",
"public static char getMaxFreq(String str){\n HashMap<Character,Integer> map=new HashMap<>();\n for(int i=0;i<str.length();i++){\n char cc=str.charAt(i);\n if(map.containsKey(cc)){\n int oldValue=map.get(cc);\n int newValue=oldValue+1;\n map.put(cc,newValue);\n }else{\n map.put(cc,1);\n }\n }\n char maxChar='\\0';\n int max=0;\n Set<Map.Entry<Character,Integer>> entries=map.entrySet();\n for(Map.Entry<Character,Integer> entry:entries){\n if(entry.getValue()>max){\n max=entry.getValue();\n maxChar=entry.getKey();\n }\n }\n return maxChar;\n }",
"public String mostCommonWord(String[] tweets) {\n int big = -100000;\n String mostCommon = null;\n for (String tweet : tweets) {// = for(int i = 0 ; i<tweets.length;i++) { String tweet = tweets[i] }\n for (String word : tweet.split(\" \")) {\n int amt = 0;\n for (String tweet2 : tweets)\n for (String word2 : tweet2.split(\" \"))\n if (word2.equals(word))\n amt++;\n if (amt > big) {\n big = amt;\n mostCommon = word;\n }\n }\n }\n return mostCommon;\n}",
"public static int secondaryArgmax(double[] a) {\n\t\tint mi = argmax(a);\n\t\t// scan left until increasing\n\t\tint i;\n\t\tfor (i=mi-1; i>=0 && a[i]<=a[i+1]; i--);\n\t\tint l = argmax(a,0,i+1);\n\t\tfor (i=mi+1; i<a.length && a[i]<=a[i-1]; i++);\n\t\tint r = argmax(a,i,a.length);\n\t\tif (l==-1) return r;\n\t\tif (r==-1) return l;\n\t\treturn a[l]>=a[r]?l:r;\n\t}",
"public static int max(int[] a){\r\n\t\tint m = a[0];\r\n\t\tfor( int i=1; i<a.length; i++ )\r\n\t\t\tif( m < a[i] ) m = a[i];\r\n\t\treturn m;\r\n\t}",
"public String findLongestWord(String s, List<String> d) {\n String ans = new String();\n for(String word : d)\n {\n if(word.length() < ans.length() || word.length() > s.length()\n || (word.length() == ans.length() && word.compareTo(ans) > 0))\n continue; //Special case, no need to check.\n \n if(isSubSequence(s, word) && betterAns(word, ans))\n ans = word;\n }\n return ans;\n }",
"String highscore(int max) {\r\n\t\tString str = highscoreToSortedMap().toString().replaceAll(\" \", \"\").replaceAll(\"}\", \"\").substring(1);\r\n\t\tString[] a = str.split(\",\");\r\n\t\tString result = \"\";\r\n\t\tif(a.length < max) { // wenn weniger als zehn Spieler im Highscore stehen\r\n\t\t\tfor(int i = 0; i < a.length; i++) { // ... werden je nach dem wie viele es sind an den String angehangen\r\n\t\t\t\tresult += a[i] + \",\";\r\n\t\t\t}\r\n\t\t} else { // wenn mehr als 10 Spieler im Highscore stehen\r\n\t\t\tfor(int i = 0; i < max; i++) { // werden nur die ersten zehn an den String angehangen\r\n\t\t\t\tresult += a[i] + \",\";\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private int largestCard(Card[] cards) {\n int i;\n\n // Initialize maximum element\n int max = 0;\n\n // Traverse array elements from second and\n // compare every element with current max\n for (i = 1; i < cards.length; i++)\n if (cards[i].getDenomination() > cards[max].getDenomination())\n max = i;\n\n return max;\n }",
"public String findLongestWord(String s, List<String> d) {\n \n String ret = \"\";\n for(String str : d) {\n int j = 0;\n for(int i=0;i<s.length() && j <str.length(); i++) {\n if(str.charAt(j) == s.charAt(i)) {\n j++;\n }\n }\n \n if(j == str.length()) {\n if(ret.length() < j || (ret.length() == j && ret.compareTo(str) > 0)) {\n ret = str;\n }\n }\n }\n \n return ret;\n }"
] | [
"0.81680214",
"0.75980765",
"0.7340498",
"0.7138097",
"0.6988664",
"0.6955119",
"0.6932085",
"0.6868971",
"0.68043023",
"0.6677132",
"0.66427076",
"0.6577729",
"0.65773684",
"0.6486665",
"0.64827645",
"0.64711434",
"0.6449417",
"0.64324206",
"0.6428106",
"0.6413157",
"0.6374004",
"0.6358905",
"0.63183886",
"0.6315923",
"0.6266293",
"0.62559295",
"0.62546474",
"0.62468797",
"0.62453824",
"0.6241957",
"0.6215976",
"0.62143755",
"0.62124914",
"0.6198748",
"0.6172001",
"0.61714655",
"0.61596113",
"0.61539453",
"0.6140023",
"0.61354285",
"0.6105878",
"0.60861176",
"0.60467017",
"0.60344255",
"0.6011727",
"0.5956362",
"0.5956209",
"0.5941003",
"0.5934931",
"0.59344566",
"0.5933855",
"0.5928192",
"0.5922695",
"0.59116113",
"0.58981913",
"0.58776873",
"0.5846805",
"0.5843548",
"0.5842754",
"0.58328027",
"0.5802794",
"0.578117",
"0.57479256",
"0.5732528",
"0.5721095",
"0.5720434",
"0.5707074",
"0.5665984",
"0.56600356",
"0.56424874",
"0.5642032",
"0.56376857",
"0.5635479",
"0.5617855",
"0.5616622",
"0.56112325",
"0.5605158",
"0.56035537",
"0.55925405",
"0.55859476",
"0.5576504",
"0.5576263",
"0.5574998",
"0.5570771",
"0.55701613",
"0.55657136",
"0.55638343",
"0.55637765",
"0.55612564",
"0.55595094",
"0.5559138",
"0.5558055",
"0.5556622",
"0.55512005",
"0.5551061",
"0.5550998",
"0.5540987",
"0.55325425",
"0.55243224",
"0.55211693"
] | 0.64783454 | 15 |
Returns the runtime name of the class. This method is only necessary due to the use of dollar signs "$" within inner classes rather than dot ".". | public String getRuntimeName() {
final StringBuffer runtimeName = new StringBuffer();
final String name = this.getName();
final Package packagee = this.getPackage();
final String packageName = null == packagee ? null : packagee.getName();
String nameLessPackageName = name;
if (false == Tester.isNullOrEmpty(packageName)) {
runtimeName.append(packageName);
runtimeName.append('.');
nameLessPackageName = name.substring(packageName.length() + 1);
}
nameLessPackageName = nameLessPackageName.replace('.', '$');
runtimeName.append(nameLessPackageName);
return runtimeName.toString();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}",
"java.lang.String getClassName();",
"public String getClassname() {\n return classname;\n }",
"public String getName() {\n return className;\n }",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"public String getName() {\n\t\treturn className;\n\t}",
"public String getClassname() {\n\t\treturn classname;\n\t}",
"public String getName_Class() {\n\t\treturn name;\n\t}",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\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}",
"@Override\n public String getClassName() {\n Object ref = className_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n className_ = s;\n return s;\n }\n }",
"private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}",
"public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}",
"public String getName()\n {\n return underlyingClass.getName();\n }",
"public String getClassName() {\n Object ref = className_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n className_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getClassname()\r\n {\r\n return m_classname;\r\n }",
"private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }",
"public static String getClassName() {\n return CLASS_NAME;\n }",
"public String getName() {\n\t\treturn \"Object class name\";\n\t}",
"protected String getClassName() {\n return getDescriptedClass().getName();\n }",
"String getClassName();",
"String getClassName();",
"String getClassName();",
"public String toString() {return classSimpleName+\"#\"+name;}",
"public String getBinaryClassName() {\n\t\tString bcn = classQName.dotSeparated();\n\t\t// Inner classes not supported yet\n\t\tassert(!bcn.contains(\"$\"));\n\t\treturn bcn;\n\t}",
"public String getClassName();",
"public ApexQualifiedName getClassName() {\n if (isClass()) {\n return this;\n }\n\n return new ApexQualifiedName(this.nameSpace, this.classes, null);\n }",
"@DISPID(-2147417111)\n @PropGet\n java.lang.String className();",
"public String getRuntimeClass();",
"@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }",
"public String getClassName() { return className; }",
"public String getTypeName() {\n if (isStatic()) {\n JavaType.FullyQualified fq = TypeUtils.asFullyQualified(qualid.getType());\n\n // the compiler doesn't type attribute static imports of classes\n if (fq == null) {\n String possibleInnerClassFqn = getTypeName(qualid);\n String possibleInnerClassName = possibleInnerClassFqn.substring(possibleInnerClassFqn.lastIndexOf('$') + 1);\n if (\"*\".equals(possibleInnerClassName)) {\n return possibleInnerClassFqn.substring(0, possibleInnerClassFqn.lastIndexOf('$'));\n }\n while (possibleInnerClassName.indexOf('$') >= 0) {\n possibleInnerClassName = possibleInnerClassName.substring(possibleInnerClassName.indexOf('$') + 1);\n }\n\n JavaType.Class owner = TypeUtils.asClass(qualid.getTarget().getType());\n if (owner != null && !(qualid.getTarget().getType() instanceof JavaType.ShallowClass)) {\n Iterator<JavaType.Method> visibleMethods = owner.getVisibleMethods();\n while (visibleMethods.hasNext()) {\n JavaType.Method method = visibleMethods.next();\n if (method.getName().equals(possibleInnerClassName)) {\n return possibleInnerClassFqn.substring(0, possibleInnerClassFqn.lastIndexOf('$'));\n }\n }\n\n Iterator<JavaType.Variable> visibleMembers = owner.getVisibleMembers();\n while (visibleMembers.hasNext()) {\n JavaType.Variable member = visibleMembers.next();\n if (member.getName().equals(possibleInnerClassName)) {\n return possibleInnerClassFqn.substring(0, possibleInnerClassFqn.lastIndexOf('$'));\n }\n }\n\n return possibleInnerClassFqn;\n }\n }\n\n return getTypeName((FieldAccess) qualid.getTarget());\n }\n\n return getTypeName(qualid);\n }",
"public java.lang.String getClassName() {\n return this._className;\n }",
"public String getName() {\r\n \treturn this.getClass().getName();\r\n }",
"public String className() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\r\n return className;\r\n }",
"public String getClassName()\n {\n return className;\n }",
"public String getClassName()\n {\n return _className;\n }",
"public String getClazzName();",
"public String getCurrentClassName () {\n String currentClass = getCurrentElement(ElementKind.CLASS);\n if (currentClass == null) return \"\";\n else return currentClass;\n }",
"public String getCompilerClassName();",
"@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName(){\n\t\treturn classname;\n\t}",
"java.lang.String getInstanceName();",
"default String getClassName() {\n return declaringType().getClassName();\n }",
"public String getClassName()\n {\n return this.className;\n }",
"public String getClassName() {\n return super.getClassName();\n }",
"@Override\n public com.google.protobuf.ByteString\n getClassNameBytes() {\n Object ref = className_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n className_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}",
"public String getFullyQualifiedName() {\n\t\treturn this.getPackageName() + \".\" + this.getClassName();\n\t}",
"public String getClassName(){\n\t\treturn targetClass.name;\n\t}",
"String getClassName(Element e) {\n // e has to be a TypeElement\n TypeElement te = (TypeElement)e;\n String packageName = elementUtils.getPackageOf(te).getQualifiedName().toString();\n String className = te.getQualifiedName().toString();\n if (className.startsWith(packageName + \".\")) {\n String classAndInners = className.substring(packageName.length() + 1);\n className = packageName + \".\" + classAndInners.replace('.', '$');\n }\n return className;\n }",
"public String getClassName() {\n return this.className;\n }",
"public String getClassName() {\n return this.className;\n }",
"public abstract String getClassName();",
"public String getClassName () { return _className; }",
"public static String getClassName(Class<?> objectClass) {\n RemoteClass annotation = objectClass.getAnnotation(RemoteClass.class);\n if (annotation != null) {\n return annotation.alias();\n }\n String className = objectClass.getName();\n if (className.startsWith(\"org.red5.compatibility.\")) {\n // Strip compatibility prefix from classname\n className = className.substring(23);\n if (\"flex.messaging.messages.AsyncMessageExt\".equals(className)) {\n className = \"DSA\";\n } else if (\"flex.messaging.messages.CommandMessageExt\".equals(className)) {\n className = \"DSC\";\n } else if (\"flex.messaging.messages.AcknowledgeMessageExt\".equals(className)) {\n className = \"DSK\";\n }\n }\n log.debug(\"Classname: {}\", className);\n return className;\n }",
"public String getClassName() throws NoSuchFieldException, IllegalAccessException {\n assertTargetNotNull();\n var targetField = targetInstance.getClass().getDeclaredField(targetName);\n targetField.setAccessible(true);\n var ob = targetField.get(targetInstance);\n return ob.getClass().getCanonicalName();\n }",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public String mo12985l_() {\n return getClass().getName();\n }",
"@Override\n public String getName() {\n return getDeclaringClass().getName();\n }",
"String getClassName() {\n return this.className;\n }",
"abstract String getClassName();",
"protected String getClassName(Object o) {\n\t\tString classString = o.getClass().getName();\n\t\tint dotIndex = classString.lastIndexOf(\".\");\n\n\t\treturn classString.substring(dotIndex + 1);\n\t}",
"public String getBaseClassName() {\n return className;\n }",
"String getGeneratedClassName();",
"String getGeneratedClassName();",
"String getGeneratedClassName();",
"@Override\n public String getName() {\n return REACT_CLASS;\n }",
"private String getClassName( Class c ) {\n\treturn c.getName().substring(c.getName().lastIndexOf('.')+1);\n }",
"protected static String getSimpleName(Class<?> c) {\n String name = c.getName();\n return name.substring(name.lastIndexOf(\".\") + 1);\n }",
"@Override\r\n\t\tpublic String getClassName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"private String m56637b(Class cls) {\n return cls.getName();\n }",
"public final String getDClassName() {\n return Descriptor.getDClassName(this.dclass);\n }",
"public static String classObjectName(Class<?> type) {\n return (type.getName() + \":::OBJECT\");\n }",
"protected String getName() {\n return testClass.getName();\n }",
"public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }",
"public String getName ()\n {\n if (__name == null)\n {\n __name = getName (getClass ());\n }\n return __name;\n }",
"@Override\n\tpublic String getClassNameKey() {\n\t\treturn CLASS_NAME_KEY;\n\t}",
"protected String getClassName() {\r\n return newName.getText();\r\n }",
"String getClassName() {\n final StringBuilder builder = new StringBuilder();\n final String shortName = getShortName();\n boolean upperCaseNextChar = true;\n for (final char c : shortName.toCharArray()) {\n if (c == '_' || c == '-') {\n upperCaseNextChar = true;\n continue;\n }\n\n if (upperCaseNextChar) {\n builder.append(Character.toUpperCase(c));\n upperCaseNextChar = false;\n } else {\n builder.append(c);\n }\n }\n builder.append(\"Messages\");\n return builder.toString();\n }",
"@Override\n\tpublic final String getName() {\n\t\treturn getClass().getSimpleName().replaceAll(\"Application$\", \"\").toLowerCase();\n\t}",
"public com.google.protobuf.ByteString\n getClassNameBytes() {\n Object ref = className_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n className_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String getClassname(Class<?> aClass) {\n\t\tString result = aClass.getCanonicalName();\n\t\tif (result.endsWith(\"[]\")) {\n\t\t\tresult = result.substring(0, result.length() - 2);\n\t\t}\n\t\treturn result;\n\t}",
"com.google.protobuf.ByteString\n getClassNameBytes();",
"private String getClassName(String fileName){\n String className = FilenameUtils.getBaseName(fileName);\n return className;\n }",
"@Override\n String getClassRef() {\n return this.classNode.name;\n }",
"public final String getName() {\n /// Since we plan to have only one wizard for each class, we use the name of the class.\n return this.getClass().getSimpleName();\n }",
"com.google.protobuf.ByteString\n getClassNameBytes();"
] | [
"0.7330833",
"0.7201671",
"0.7168222",
"0.70909625",
"0.7056617",
"0.7042784",
"0.7015111",
"0.6965556",
"0.69529915",
"0.68628",
"0.68628",
"0.6854158",
"0.68442994",
"0.6831626",
"0.6830847",
"0.68255764",
"0.68150353",
"0.6765512",
"0.67447346",
"0.67214096",
"0.6721175",
"0.6667138",
"0.6640899",
"0.6621956",
"0.6621956",
"0.6621956",
"0.6615568",
"0.65831137",
"0.65725887",
"0.6568501",
"0.65553015",
"0.65301174",
"0.65218526",
"0.65066457",
"0.64984834",
"0.64977777",
"0.6477576",
"0.64581424",
"0.6422557",
"0.6417371",
"0.641569",
"0.6411504",
"0.6377472",
"0.63712233",
"0.63704646",
"0.6367874",
"0.6366512",
"0.6366512",
"0.6366512",
"0.6366512",
"0.6366512",
"0.6366512",
"0.6358858",
"0.6352038",
"0.6342614",
"0.6332283",
"0.6329723",
"0.63262194",
"0.63145787",
"0.62885594",
"0.62857074",
"0.62842745",
"0.62803876",
"0.62803876",
"0.6280096",
"0.6272885",
"0.62712264",
"0.62485516",
"0.62324864",
"0.62324864",
"0.62294173",
"0.6225175",
"0.6225038",
"0.6213559",
"0.61995155",
"0.6194307",
"0.6162608",
"0.6162608",
"0.6162608",
"0.61590964",
"0.6146989",
"0.61404043",
"0.6139368",
"0.61349106",
"0.61159474",
"0.6115212",
"0.6110004",
"0.608223",
"0.6071692",
"0.60685414",
"0.6054956",
"0.6033517",
"0.60318387",
"0.6018794",
"0.59855413",
"0.5971119",
"0.59632236",
"0.5959243",
"0.59499234",
"0.5949055"
] | 0.70300376 | 6 |
Finds a matching constructor given its parameter types. | public Constructor findConstructor(final List<Type> parameterTypes) {
Checker.notNull("parameter:parameterTypes", parameterTypes);
Constructor found = null;
final Iterator<Constructor> constructors = this.getConstructors().iterator();
while (constructors.hasNext()) {
final Constructor constructor = constructors.next();
final List<ConstructorParameter> constructorParameters = constructor.getParameters();
if (constructorParameters.size() != parameterTypes.size()) {
continue;
}
found = constructor;
final Iterator<ConstructorParameter> constructorParametersIterator = constructorParameters.iterator();
final Iterator<Type> parameterTypesIterator = parameterTypes.iterator();
while (parameterTypesIterator.hasNext()) {
final ConstructorParameter constructorParameter = constructorParametersIterator.next();
final Type parameterType = parameterTypesIterator.next();
if (false == constructorParameter.getType().equals(parameterType)) {
found = null;
}
}
if (null != found) {
break;
}
}
return found;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static Constructor<?> findConstructor(Class<?> archiveImplClazz, Class<?>... argumentTypes) throws Exception \n {\n return archiveImplClazz.getConstructor(argumentTypes);\n }",
"public static <T> ConstructorInvoker<T> findMatchingConstructor(Class<T> type, Object... values) throws NoSuchMethodException, IllegalStateException\n {\n return findMatchingExecutable(type.getDeclaredConstructors(), values);\n }",
"@SuppressWarnings(\"rawtypes\")\n\tprivate static Constructor getConstructor(Object[] params, Class clazz) {\n Constructor[] constructors = clazz.getDeclaredConstructors();\n for (int i = 0; i < constructors.length; i++) {\n Constructor constructor = constructors[i];\n if (constructor.getParameterTypes().length == params.length) {\n return constructor;\n }\n }\n return null;\n }",
"protected Constructor<?> findConstructorAlt(Class<?> classType, Object[] args)\n throws NoSuchMethodException {\n\n Object[] zeroArray = new Object[0];\n int i;\n boolean found = false;\n Constructor<?> toInvoke = null;\n Constructor<?>[] cons = null;\n\n // Grab set of constructors, signal error if no public constructors\n cons = classType.getConstructors();\n if (cons.length == 0)\n throw new NoSuchMethodException(\"Class \" + classType\n + \" has no public constructors!\");\n\n // First build a method structure vector for all the\n // constructors. This automatically sorts the constructors so\n // that the first match is the most specific constructor.\n MethodStructureVector items = new MethodStructureVector();\n for (i = 0; i < cons.length; i++)\n items.insertElement(new ConstructorStructure(cons[i], cons[i]\n .getParameterTypes()));\n\n // Now scan the constructor list for the most specific constructor\n ConstructorStructure next = null;\n Object[] sorted = new Object[items.size()];\n items.copyInto(sorted);\n\n if (args == null) {\n args = zeroArray;\n }\n for (i = 0; ((i < sorted.length) && (!found)); i++) {\n next = (ConstructorStructure) sorted[i];\n\n // Compare argument list lengths\n if (args.length != next.argTypes.length)\n continue;\n\n // Found a possible candidate, compare argument types\n found = true;\n toInvoke = next.meth;\n for (int j = 0; j < args.length; j++)\n if (!next.argTypes[j].isInstance(args[j])) {\n found = false;\n break;\n }\n }\n\n if (!found) {\n String argList = \"(\";\n\n if ((args == null) || (args.length == 0))\n argList = argList + \")\";\n else {\n for (i = 0; i < args.length - 1; i++)\n argList = argList + args[i].getClass() + \", \";\n argList = argList + args[i].getClass() + \")\";\n }\n\n throw new NoSuchMethodException(\"No constructor for \" + classType\n + \" with arg types \" + argList);\n }\n\n // Found the constructor, so return it\n return toInvoke;\n }",
"private <T> Constructor<T> findConstructor(Class<T> clazz) {\n Constructor<?>[] declaredConstructors = ContainerInterface.getAllConstructors(clazz);\n /**\n * If we find one public constructor we return it\n */\n if (declaredConstructors.length == 1) {\n return (Constructor<T>) declaredConstructors[0];\n }\n\n /**\n * If we find more than one public constructor we search for the one annotated with @Inject\n */\n if (declaredConstructors.length > 1) {\n List<Constructor<?>> constructorsWithInject = Arrays.stream(declaredConstructors)\n .filter(c -> c.isAnnotationPresent(Inject.class))\n .collect(Collectors.toList());\n\n if (constructorsWithInject.isEmpty()) {\n throw new ContainerException(ERROR_MSG +\n \"Found more than one public constructor. Specify which one to choose by annotating it with @Inject\");\n }\n\n if (constructorsWithInject.size() != 1) {\n throw new ContainerException(ERROR_MSG +\n \"Found more than one public constructor annotated with @Inject.\");\n }\n\n return (Constructor<T>) constructorsWithInject.get(0);\n }\n return null;\n }",
"protected Constructor findCopyConstructor(Class cls) {\n Constructor[] cons = cls.getConstructors();\n Constructor match = null;\n Class matchParam = null;\n Class[] params;\n for (Constructor con : cons) {\n params = con.getParameterTypes();\n if (params.length != 1)\n continue;\n\n // quit immediately on exact match\n if (params[0] == cls)\n return con;\n\n if (params[0].isAssignableFrom(cls) && (matchParam == null\n || matchParam.isAssignableFrom(params[0]))) {\n // track most derived collection constructor\n match = con;\n matchParam = params[0];\n }\n }\n return match;\n }",
"HxMethod createConstructor(final String... parameterTypes);",
"static <T> ConstructorDescriptor<T> of(Class<T> declaringClass, Class<?>... parameterTypes) {\n requireNonNull(declaringClass, \"declaringClass is null\");\n Constructor<T> constructor;\n try {\n constructor = declaringClass.getDeclaredConstructor(parameterTypes);\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(\"A constructor with the specified signature does not exist, signature: \" + declaringClass.getSimpleName() + \"(\"\n + formatSimple(parameterTypes) + \")\");\n }\n return of(constructor);\n }",
"public static <T> Constructor<T> findConstructor(Class<T> type, Class<?>... args){\r\n\t\ttry {\r\n\t\t\treturn type.getConstructor(args);\r\n\t\t} catch (SecurityException e) {\r\n\t\t\treturn null;\r\n\t\t\t\r\n\t\t} catch (NoSuchMethodException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"HxMethod createConstructor(final HxType... parameterTypes);",
"private Constructor<?> getConstructorMatchingAnnotatedFields(Class<?> clazz, List<Class> annotatedFields) {\n Constructor<?>[] constructors = clazz.getDeclaredConstructors();\n List<Class<?>> constrFields = null;\n Constructor<?> constr = null;\n for (Constructor<?> constructor : constructors) {\n constr = getConstructorMatchingAnnotatedFieldsList(annotatedFields, constr, constructor);\n }\n return constr;\n }",
"default HxMethod createConstructor(final Class<?>... parameterTypes) {\n return createConstructor(getHaxxor().toNormalizedClassnames(parameterTypes));\n }",
"private static Constructor getConstructor(Class clazz, TestSetup setup)\n {\n Class setupClazz = setup.getClass();\n\n while(setupClazz != null)\n {\n try\n {\n return clazz.getConstructor(new Class[] { String.class, setupClazz});\n }\n catch(NoSuchMethodException e)\n {\n // ignored\n }\n\n setupClazz = setupClazz.getSuperclass();\n }\n\n throw new RuntimeException(\"Could not locate constructor for (\" + String.class.getName() + \", \" + setup.getClass().getName() + \") in class \" + clazz.getName());\n }",
"private <T> Constructor<? extends T> findConstructorForInjection(Class<? extends T> impl) {\n return (Constructor<? extends T>) Arrays.stream(impl.getConstructors())\n .filter(con -> con.getAnnotation(Inject.class) != null)\n .findFirst()\n .orElseThrow(ConstructorNotFoundException::new);\n }",
"private void findConstructor() {\n BeanScannerConstructor constructor = BeanScannerConstructor.CACHE.get(beanClass);\n\n Constructor<?> con = constructor.constructor();\n\n MethodHandle mh = unreflectConstructor(con);\n\n OperationTemplate ot;\n if (bean.lifetime.lifetimes().isEmpty()) {\n ot = OperationTemplate.defaults();\n } else {\n ot = bean.lifetime.lifetimes().get(0).template;\n }\n ot = ot.returnType(beanClass);\n\n OperationSetup os = new MemberOperationSetup(bean.installedBy, bean, constructor.operationType(), ot,\n new OperationConstructorTarget(constructor.constructor()), mh);\n bean.operations.add(os);\n resolveNow(os);\n }",
"public static List<Constructor<?>> getConstructors(Class<?> type, int paramCount) {\n List<Constructor<?>> result = new ArrayList<Constructor<?>>(type.getConstructors().length);\n for (Constructor<?> constr : type.getConstructors()) {\n if (constr.getParameterTypes().length == paramCount) {\n result.add(constr);\n }\n }\n return result;\n }",
"protected int matchConstructor(MethodBinding constructor) {\n if (!constructor.isConstructor())\n return IMPOSSIBLE_MATCH;\n // declaring type, simple name has already been matched by matchIndexEntry()\n int level = resolveLevelForType(this.pattern.declaringSimpleName, this.pattern.declaringQualification, constructor.declaringClass);\n if (level == IMPOSSIBLE_MATCH)\n return IMPOSSIBLE_MATCH;\n // parameter types\n int parameterCount = this.pattern.parameterCount;\n if (parameterCount > -1) {\n if (constructor.parameters == null)\n return INACCURATE_MATCH;\n if (parameterCount != constructor.parameters.length)\n return IMPOSSIBLE_MATCH;\n for (int i = 0; i < parameterCount; i++) {\n // TODO (frederic) use this call to refine accuracy on parameter types\n //\t\t\tint newLevel = resolveLevelForType(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i], this.pattern.parametersTypeArguments[i], 0, constructor.parameters[i]);\n int newLevel = resolveLevelForType(this.pattern.parameterSimpleNames[i], this.pattern.parameterQualifications[i], constructor.parameters[i]);\n if (level > newLevel) {\n if (newLevel == IMPOSSIBLE_MATCH) {\n //\t\t\t\t\t}\n return IMPOSSIBLE_MATCH;\n }\n // can only be downgraded\n level = newLevel;\n }\n }\n }\n return level;\n }",
"Constructor<T> newConstructor();",
"HxMethod createConstructorReference(final String declaringType,\n final String... parameterTypes);",
"List<List<Class<?>>> getConstructorParametersTypes();",
"private static Constructor findComparatorConstructor(Class cls) {\n try {\n return cls.getConstructor(new Class[] { Comparator.class });\n } catch (NoSuchMethodException nsme) {\n return null;\n } catch (Exception e) {\n throw new GeneralException(e);\n }\n }",
"public List<Constructor<?>> getConstructors(int paramCount) {\n return getConstructors(this.type, paramCount);\n }",
"public boolean hasConstructor(Class<?>... parmTypes) {\n boolean result = false;\n\n try {\n cut.getConstructor(parmTypes);\n result = true;\n } catch (Exception e) {\n }\n\n return result;\n }",
"public Function getConstructor(int signature)\r\n\t{\r\n\t\t// search own methods:\r\n\t\tfor (Function fn : constructors)\r\n\t\t{\r\n\t\t\tif (fn.signature == signature)\r\n\t\t\t\treturn fn;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Constructor<?> getConstructor(Class<?> cls, Class<?>[] arguments) throws NoSuchMethodException {\n return cls.getConstructor(arguments);\n }",
"private Builder(Class<T> clazz, Object... objects) {\n try {\n Stream<Constructor<?>> constructors = Stream.of(clazz.getDeclaredConstructors()).peek(constructor -> constructor.setAccessible(true));\n Optional<Constructor<?>> constructor;\n if (null == objects) {\n constructor = constructors.filter(cons -> cons.getParameterCount() == 0).findFirst();\n if (constructor.isPresent()) {\n instance = clazz.cast(constructor.get().newInstance());\n }\n } else {\n constructor = constructors.filter(cons -> cons.getParameterCount() == objects.length)\n .filter(cons -> {\n List<Class<?>> consClass = Arrays.asList(cons.getParameterTypes());\n List<Class<?>> paramsClass = Arrays.stream(objects).map(Object::getClass).collect(Collectors.toList());\n return consClass.stream()\n .allMatch(con -> paramsClass.stream()\n .anyMatch(param -> (con.isPrimitive() &&\n (Number.class.isAssignableFrom(param) ||\n Boolean.class.isAssignableFrom(param) ||\n Character.class.isAssignableFrom(param) ||\n Byte.class.isAssignableFrom(param))) ||\n param.equals(con) ||\n param.isAssignableFrom(con) ||\n con.isAssignableFrom(param)));\n })\n .findFirst();\n if (constructor.isPresent()) {\n instance = clazz.cast(constructor.get().newInstance(objects));\n }\n }\n } catch (InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n }",
"@Nullable\n public static <T> ConstructorInvoker<T> getConstructor(Class<T> clazz, boolean throwException, Class<?>... params)\n {\n for (Constructor<?> constructor : clazz.getDeclaredConstructors())\n {\n if (Arrays.equals(constructor.getParameterTypes(), params))\n {\n getAccess(constructor);\n return new ConstructorInvoker<>(constructor);\n }\n }\n for (Constructor<?> constructor : clazz.getDeclaredConstructors())\n {\n if (constructor.getParameterCount() != params.length)\n {\n break;\n }\n Class<?>[] parameterTypes = constructor.getParameterTypes();\n boolean valid = true;\n for (int i = 0, parameterTypesLength = parameterTypes.length; i < parameterTypesLength; i++)\n {\n Class<?> aClass = parameterTypes[i];\n Class<?> param = params[i];\n if (! aClass.isAssignableFrom(param))\n {\n valid = false;\n break;\n }\n }\n if (valid)\n {\n getAccess(constructor);\n return new ConstructorInvoker<>(constructor);\n }\n }\n if (! throwException)\n {\n return null;\n }\n throw new IllegalStateException(String.format(\"Unable to find constructor for %s (%s).\", clazz, Arrays.asList(params)));\n }",
"public Factory(Class<? extends K> class1, Object... params) {\n\t\ttry {\n\t\t\tthis.params = params;\n\t\t\tif (params != null && params.length > 0) {\n\t\t\t\tClass<?>[] clazzes = new Class<?>[params.length];\n\t\t\t\tint i = 0;\n\t\t\t\tfor (Object param : params) {\n\t\t\t\t\tclazzes[i++] = param.getClass();\n\t\t\t\t}\n\t\t\t\tconstructor = class1.getConstructor(clazzes);\n\t\t\t} else {\n\t\t\t\tconstructor = class1.getConstructor();\n\t\t\t}\n\t\t} catch (Throwable e) {\n\t\t\tlog.error(\"Error initializing factory\", e);\n\t\t\tthrow new Error(\"Internal error initializing factory\", e);\n\t\t}\n\t}",
"public static <T> ReflectionResponse<Constructor<T>> getConstructor(Class<T> clazz, Class<?>... params) {\n Validate.notNull(clazz, \"clazz cannot be null\");\n Validate.notNull(params, \"params cannot be null\");\n try {\n return new ReflectionResponse<>(clazz.getConstructor(params));\n } catch (NoSuchMethodException e) {\n return new ReflectionResponse<>(e);\n }\n }",
"public static <T extends ReflectMethod> T findMatchingExecutable(Executable[] executables,\n Object... values) throws NoSuchMethodException, IllegalStateException\n {\n if (values.length == 0)\n {\n for (Executable executable : executables)\n {\n if (executable.getParameterCount() == 0)\n {\n return wrap(executable, true);\n }\n }\n throw new NoSuchMethodException(\"Can't find no-args constructor.\");\n }\n Class<?>[] paramTypes = new Class<?>[values.length];\n for (int i = 0; i < values.length; i++)\n {\n Object value = values[i];\n paramTypes[i] = (value == null) ? null : value.getClass();\n }\n // try to find exact matching constructor, and add any just compatible to collection.\n int exactMatches = 0;\n Executable exact = null;\n Executable bestMatch = null;\n for (Executable executable : executables)\n {\n if (executable.getParameterCount() != values.length)\n {\n continue;\n }\n CompatibleExecutableResults compatibleConstructor = isCompatibleExecutable(executable, paramTypes);\n if (compatibleConstructor == CompatibleExecutableResults.EXACT)\n {\n if (exactMatches >= 1)\n {\n throw new IllegalStateException(\"Ambiguous constructors found \" + Arrays.toString(paramTypes));\n }\n exact = executable;\n exactMatches += 1;\n }\n if (compatibleConstructor != CompatibleExecutableResults.INVALID)\n {\n bestMatch = getMoreSpecialized(bestMatch, executable);\n }\n }\n if (bestMatch == null)\n {\n throw new NoSuchMethodException(\"Can't find matching constructor for: \" + Arrays.toString(paramTypes));\n }\n if (exact != null)\n {\n if (! bestMatch.equals(exact))\n {\n throw new IllegalStateException(\"Ambiguous constructors found \" + Arrays.toString(paramTypes));\n }\n return wrap(exact, true);\n }\n return wrap(bestMatch, true);\n }",
"@SuppressWarnings(\"ConstantConditions\")\n public static <T> ConstructorInvoker<T> getConstructor(Class<T> clazz, Class<?>... params)\n {\n return getConstructor(clazz, true, params);\n }",
"List constructors();",
"protected int matchLevelForDeclarations(ConstructorDeclaration constructor) {\n if (this.pattern.declaringSimpleName != null && !matchesName(this.pattern.declaringSimpleName, constructor.selector))\n return IMPOSSIBLE_MATCH;\n if (this.pattern.parameterSimpleNames != null) {\n int length = this.pattern.parameterSimpleNames.length;\n Argument[] args = constructor.arguments;\n int argsLength = args == null ? 0 : args.length;\n if (length != argsLength)\n return IMPOSSIBLE_MATCH;\n }\n // Verify type arguments (do not reject if pattern has no argument as it can be an erasure match)\n if (this.pattern.hasConstructorArguments()) {\n if (constructor.typeParameters == null || constructor.typeParameters.length != this.pattern.constructorArguments.length)\n return IMPOSSIBLE_MATCH;\n }\n return this.pattern.mustResolve ? POSSIBLE_MATCH : ACCURATE_MATCH;\n }",
"public static <T> T findByConstructor(Class<T> pluginInterface, Object arg) {\n Filter<Class<?>> filter = new Extensions.OneArgFilter(arg);\n Factory<T> factory = new Extensions.OneArgFactory(arg);\n List<T> plugins = Extensions.findAll(pluginInterface, filter, factory);\n // there should only be one match for a plugin with the necessary constructor\n return identity(plugins);\n }",
"private Constructor getConstructor(Class clazz) {\n try {\n return clazz.getConstructor(CLASS_QNAME_CLASS);\n } catch (NoSuchMethodException e) {}\n return null;\n }",
"Constructor<?> getDefaultConstructorForConcreteTypeOf(final Class<?> cls) {\n if (cls == null) {\n throw new IllegalArgumentException(\"Class reference cannot be null\");\n }\n // Check cache\n final Constructor<?> constructor = defaultConstructorForConcreteType.get(cls);\n if (constructor != null) {\n return constructor;\n }\n final Class<?> concreteType = getConcreteType(cls, /* returnNullIfNotMapOrCollection = */ false);\n for (Class<?> c = concreteType; c != null\n && (c != Object.class || cls == Object.class); c = c.getSuperclass()) {\n try {\n final Constructor<?> defaultConstructor = c.getDeclaredConstructor();\n JSONUtils.makeAccessible(defaultConstructor, reflectionUtils);\n // Store found constructor in cache\n defaultConstructorForConcreteType.put(cls, defaultConstructor);\n return defaultConstructor;\n } catch (final ReflectiveOperationException | SecurityException e) {\n // Ignore\n }\n }\n throw new IllegalArgumentException(\"Class \" + cls.getName() //\n + \" does not have an accessible default (no-arg) constructor\");\n }",
"public static Object createObject(String className, Class<?>[] parameterTypes, Object[] initargs) {\n try {\n Class<?> aClass = Class.forName(className);\n return createObject(aClass, parameterTypes, initargs);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return null;\n }",
"private List<TestCandidate> collectCandidatesForMethod(\n Constructor<?> constructor, Object[] params, Method method, \n LinkedHashMap<String, Object> parameterizedArgs) {\n final List<TestCandidate> candidates = new ArrayList<TestCandidate>();\n final boolean fixedSeed = isConstantSeedForAllIterations(method);\n final int methodIterations = determineMethodIterationCount(method);\n \n for (final long testSeed : determineMethodSeeds(method)) {\n for (int i = 0; i < methodIterations; i++) {\n final long thisSeed = (fixedSeed ? testSeed : testSeed ^ MurmurHash3.hash((long) i)); \n final Randomness thisRandomness = new Randomness(thisSeed);\n \n final LinkedHashMap<String, Object> args = new LinkedHashMap<String, Object>();\n if (methodIterations > 1) { \n args.put(\"#\", i);\n }\n args.putAll(parameterizedArgs);\n args.put(\"seed=\", SeedUtils.formatSeedChain(runnerRandomness, thisRandomness));\n Description description = Description.createSuiteDescription(\n String.format(\"%s%s(%s)\", method.getName(), formatMethodArgs(args), suiteClass.getName()));\n \n // Create an instance and delay instantiation exception if not possible.\n Object instance = null;\n try {\n instance = constructor.newInstance(params);\n } catch (IllegalArgumentException e) {\n instance = new DeferredInstantiationException(new IllegalArgumentException(\n \"The provided parameters do not match or cannot be assigned to the\" +\n \" suite's class constructor parameters of type: \" \n + Arrays.toString(constructor.getParameterTypes())));\n } catch (Throwable t) {\n instance = new DeferredInstantiationException(t);\n }\n candidates.add(new TestCandidate(method, instance, thisRandomness, description));\n }\n }\n \n return candidates;\n }",
"public static Object createObject(Class<?> clazz, Class<?>[] parameterTypes, Object[] initargs) {\n try {\n Constructor<?> declaredConstructor = clazz.getDeclaredConstructor(parameterTypes);\n declaredConstructor.setAccessible(true);\n return declaredConstructor.newInstance(initargs);\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public static LinkedList<String> constructorSearch(Class enteredClass){\n LinkedList<String> result = new LinkedList<>();//array with result\n Class classNoteBook = enteredClass;\n\n /* get amount of modifiers */\n int modifiers = classNoteBook.getModifiers();\n\n /* find modifiers for class */\n if (Modifier.isPublic(modifiers)) {\n result.add(\"Class is public\");\n }\n\n else if (Modifier.isAbstract(modifiers)) {\n MyWriter.show(\"Class is abstract\");\n }\n\n else if (Modifier.isFinal(modifiers)) {\n result.add(\"Class is final\");\n }\n\n /* get all constructors of class */\n Constructor[] allConstructors = classNoteBook.getDeclaredConstructors();\n\n for (Constructor constructor : allConstructors) {\n int number = 0;\n result.add(\"Constructor: \" + constructor.toGenericString());\n\n /* get all type of parameters of constructor */\n Class[] parameterTypes = constructor.getParameterTypes();\n\n for (Class param : parameterTypes) {\n result.add(\" GenericParameterType [\" + number++ + \"]: \" + param);\n }\n }\n return result;\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T construct(final ClassLoader loader,\n\t\tfinal String className, final Object... parameters)\n\t\tthrows SecurityException, NoSuchMethodException, IllegalArgumentException,\n\t\tIllegalAccessException, InvocationTargetException, ClassNotFoundException,\n\t\tInstantiationException\n\t{\n\t\tfinal Class<?> clazz = loader.loadClass(className);\n\t\tfor (final Constructor<?> constructor : clazz.getConstructors()) {\n\t\t\tif (doParametersMatch(constructor.getParameterTypes(), parameters)) {\n\t\t\t\treturn (T) constructor.newInstance(parameters);\n\t\t\t}\n\t\t}\n\t\tthrow new NoSuchMethodException(\"No matching method found\");\n\t}",
"Constructor<?> getConstructorWithSizeHintForConcreteTypeOf(final Class<?> cls) {\n // Check cache\n final Constructor<?> constructor = constructorForConcreteTypeWithSizeHint.get(cls);\n if (constructor == NO_CONSTRUCTOR) {\n return null;\n } else if (constructor != null) {\n return constructor;\n }\n final Class<?> concreteType = getConcreteType(cls, /* returnNullIfNotMapOrCollection = */ true);\n if (concreteType != null) {\n for (Class<?> c = concreteType; c != null\n && (c != Object.class || cls == Object.class); c = c.getSuperclass()) {\n try {\n final Constructor<?> constructorWithSizeHint = c.getDeclaredConstructor(Integer.TYPE);\n JSONUtils.makeAccessible(constructorWithSizeHint, reflectionUtils);\n // Store found constructor in cache\n constructorForConcreteTypeWithSizeHint.put(cls, constructorWithSizeHint);\n return constructorWithSizeHint;\n } catch (final ReflectiveOperationException | SecurityException e) {\n // Ignore\n }\n }\n }\n constructorForConcreteTypeWithSizeHint.put(cls, NO_CONSTRUCTOR);\n return null;\n }",
"public static Class<?>[] getConstructorParamTypes() {\n\t\tfinal Class<?>[] out = { RabbitMQService.class, String.class, RentMovementDAO.class, RPCClient.class, RPCClient.class, IRentConfiguration.class };\n\t\treturn out;\n\t}",
"public static Object newInstance(String className, Object... args) {\n try {\n Class<?> clazz = Class.forName(className);\n Constructor<?>[] constructors = clazz.getDeclaredConstructors();\n for (Constructor<?> constructor : constructors) {\n Class<?>[] types = constructor.getParameterTypes();\n if (types.length == args.length) {\n int matched = 0;\n for (; matched<types.length; matched++) {\n if (!types[matched].isAssignableFrom(args[matched].getClass())) {\n break;\n }\n }\n if (matched == args.length) {\n constructor.setAccessible(true);\n return constructor.newInstance(args);\n }\n }\n }\n } catch (Exception e) {\n Logger.w(\"Reflection\", \"newInstance \" + className + \" \" + e.toString());\n }\n return null;\n }",
"private String resolveConstructor(String fullPackageName, String className) {\n\t\tif(\"java.util\".equals(fullPackageName) && \"ArrayList\".equals(className)) {\n\t\t\treturn \"Array\";\n\t\t} else if(\"java.util\".equals(fullPackageName) && \"HashMap\".equals(className)) {\n\t\t\treturn \"Map\";\n\t\t} else {\n\t\t\treturn className;\n\t\t}\n\t}",
"@SuppressWarnings(\"java:S1452\")\n public Constructor<? extends T> getConstructor(Class<?>... args) {\n return getConstructor(getProxyClass(), args);\n }",
"public static Object createInstance(String className, Class<?>[] argumentTypes, Object[] arguments) \n {\n if(className == null) \n {\n throw new IllegalArgumentException(\"ClassName must be specified\");\n }\n if(argumentTypes == null) \n {\n throw new IllegalAnnotationException(\"ArgumentTypes must be specified. Use empty array if no arguments\");\n }\n if(arguments == null) \n {\n throw new IllegalAnnotationException(\"Arguments must be specified. Use empty array if no arguments\");\n }\n try \n {\n Class<?> implClass = loadClass(className); \n Constructor<?> constructor = findConstructor(implClass, argumentTypes);\n return constructor.newInstance(arguments);\n }\n catch (Exception e) \n {\n throw new RuntimeException(\n \"Could not create new instance of \" + className + \", missing package from classpath?\", e);\n } \n }",
"public FindResult findClass(String className);",
"public static StaticFactoryInsteadOfConstructors getInstance(Object optionalParameters){\n return new StaticFactoryInsteadOfConstructors();\n }",
"TypesOfConstructor(int value){\n num = value;\n }",
"private static Constructor getZeroArgumentConstructor(Class cls) {\n \t\treturn ClassUtils.getConstructor(cls, new Class[] { }, zeroArgumentConstructors);\n \t}",
"@SuppressWarnings(\"unchecked\")\n <T> ConstructorInjector<T> getConstructor(Class<T> implementation) {\n return constructors.get(implementation);\n }",
"public SpriteConstructor getSpriteConstructor(String type) {\n\t\tSpriteConstructor constructor = spriteFactoryMap.get(type);\n\t\tif(constructor == null) throw ParserException.SYNTAX_ERROR;\n\t\treturn constructor;\n\t}",
"public Object getReaderCtor(String paramString) {\n }",
"public Object invokeConstructor(String type, Object arguments) {\n return invokeConstructorOf(loadClass(type), arguments);\n }",
"public IParameter getInstance(String type){\n if(!initialized)\n throw new IllegalStateException(\"constructor never finished\");\n Class klass=(Class)paramList.get(type);\n if(klass==null)\n return null;\n else\n return getInstance(klass,false);\n }",
"<S extends T> ScopedBindingBuilder toConstructor(Constructor<S> constructor);",
"private void delegateConstructors(ClassWriterTracker ct, Class type, String superClassFileNname) {\n Constructor[] constructors = type.getConstructors();\n\n for (Constructor constructor : constructors) {\n Class[] params = constructor.getParameterTypes();\n String[] exceptionTypes = AsmHelper.getInternalNames(constructor.getExceptionTypes());\n String descriptor = Type.getConstructorDescriptor(constructor);\n MethodVisitor mv = ct.visitMethod(Opcodes.ACC_PUBLIC, \"<init>\", descriptor, null, exceptionTypes);\n mv.visitCode();\n mv.visitVarInsn(Opcodes.ALOAD, 0);\n int stackPos = 1;\n for (Class param : params) {\n mv.visitVarInsn(AsmHelper.getLoadInsn(param), stackPos);\n stackPos += Type.getType(param).getSize();\n }\n mv.visitMethodInsn(Opcodes.INVOKESPECIAL, superClassFileNname, \"<init>\", descriptor, false);\n\n mv.visitInsn(Opcodes.RETURN);\n mv.visitMaxs(-1, -1);\n mv.visitEnd();\n }\n }",
"Factory<? extends T> buildPersonFactory(String type);",
"private FactoryProvider(TypeLiteral<F> factoryType, Map<Method, AssistedConstructor<?>> factoryMethodToConstructor) {\n\t\tthis.factoryType = factoryType;\n\t\tthis.factoryMethodToConstructor = factoryMethodToConstructor;\n\t\tcheckDeclaredExceptionsMatch();\n\t}",
"public Expression bind(SymbolicName functionName, Expression[] arguments, StaticContext env)\n throws XPathException {\n final String uri = functionName.getComponentName().getURI();\n final String localName = functionName.getComponentName().getLocalPart();\n boolean builtInNamespace = uri.equals(NamespaceConstant.SCHEMA);\n if (builtInNamespace) {\n // it's a constructor function: treat it as shorthand for a cast expression\n if (functionName.getArity() != 1) {\n throw new XPathException(\"A constructor function must have exactly one argument\");\n }\n SimpleType type = Type.getBuiltInSimpleType(uri, localName);\n if (type != null) {\n if (type.isAtomicType()) {\n if (((AtomicType) type).isAbstract()) {\n XPathException err = new XPathException(\"Abstract type used in constructor function: {\" + uri + '}' + localName);\n err.setErrorCode(\"XPST0017\");\n err.setIsStaticError(true);\n throw err;\n } else {\n CastExpression cast = new CastExpression(arguments[0], (AtomicType) type, true);\n if (arguments[0] instanceof StringLiteral) {\n cast.setOperandIsStringLiteral(true);\n }\n return cast;\n }\n } else if (type.isUnionType()) {\n NamespaceResolver resolver = env.getNamespaceResolver();\n UnionConstructorFunction ucf = new UnionConstructorFunction((UnionType) type, resolver, true);\n return new StaticFunctionCall(ucf, arguments);\n } else {\n NamespaceResolver resolver = env.getNamespaceResolver();\n ListConstructorFunction lcf = new ListConstructorFunction((ListType)type, resolver, true);\n return new StaticFunctionCall(lcf, arguments);\n }\n } else {\n XPathException err = new XPathException(\"Unknown constructor function: {\" + uri + '}' + localName);\n err.setErrorCode(\"XPST0017\");\n err.setIsStaticError(true);\n throw err;\n }\n\n }\n\n // Now see if it's a constructor function for a user-defined type\n\n if (arguments.length == 1) {\n SchemaType st = config.getSchemaType(new StructuredQName(\"\", uri, localName));\n if (st instanceof SimpleType) {\n if (st instanceof AtomicType) {\n return new CastExpression(arguments[0], (AtomicType) st, true);\n } else if (st instanceof ListType && env.getXPathVersion() >= 30) {\n NamespaceResolver resolver = env.getNamespaceResolver();\n ListConstructorFunction lcf = new ListConstructorFunction((ListType) st, resolver, true);\n return new StaticFunctionCall(lcf, arguments);\n } else if (((SimpleType) st).isUnionType() && env.getXPathVersion() >= 30) {\n NamespaceResolver resolver = env.getNamespaceResolver();\n UnionConstructorFunction ucf = new UnionConstructorFunction((UnionType) st, resolver, true);\n return new StaticFunctionCall(ucf, arguments);\n }\n }\n }\n\n return null;\n }",
"@Test\n @Order(3)\n void testInvalidClassId() {\n assertNull(noArgsRegistry.getConstructor(0));\n }",
"static <T> ConstructorDescriptor<T> of(Constructor<T> constructor) {\n return InternalConstructorDescriptor.of(constructor);\n }",
"public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions) { throw Extensions.todo(); }",
"public static StaticFactoryInsteadOfConstructors of(Object one, Object two, Object three) {\n return new StaticFactoryInsteadOfConstructors();\n }",
"public Criteria createCriteria(Class<?> cl) throws HibException;",
"protected Object createBeanMatchingType(MappingContext mappingContext) {\n // clazz is never null given the only path that leads to this method already performs that check\n final Class<?> clazz = mappingContext.getTypeInformation().getSafeToWriteClass();\n try {\n return clazz.getDeclaredConstructor().newInstance();\n } catch (ReflectiveOperationException e) {\n throw new ConfigMeMapperException(mappingContext, \"Could not create object of type '\"\n + clazz.getName() + \"'. It is required to have a default constructor\", e);\n }\n }",
"@Test\n @Order(2)\n void testNoArgsClass() {\n final RuntimeConstructable r =\n noArgsRegistry.getConstructor(ConstructableExample.CLASS_ID).get();\n assertTrue(r instanceof ConstructableExample);\n\n // checks the objects class ID\n assertEquals(ConstructableExample.CLASS_ID, r.getClassId());\n }",
"private Constructor getConstructor() throws Exception {\r\n return type.getConstructor(Contact.class, label, Format.class);\r\n }",
"public Object[] getConstructorArgs ();",
"private Constructor<DefaultSimpleInterface> getConstructor() {\n try {\n return DefaultSimpleInterface.class.getConstructor();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"public static <Type> Type createInstance(final ClassInstantiatorConfig binaryClassNameHolder, final Object[] paramValues,final Class<?> ... paramTypes)\n {\n final Class<?> classInstance = loadClass(binaryClassNameHolder.getQualifiedClassName());\n\n final int paramTypesLength = paramTypes != null ? paramTypes.length : 0;\n final int paramValuesLength = paramValues != null ? paramValues.length : 0;\n final Object[] actualParamValues = new Object[paramTypesLength];\n if(paramValuesLength > paramTypesLength) {\n throw new RuntimeException(\"invalid arguments..\");\n }\n final int paramValueLength = paramValues != null ? paramValues.length : 0;\n for(int i = 0; i <paramTypesLength ; i++) {\n if(i < paramValueLength) {\n actualParamValues[i] = paramValues[i];\n }\n }\n try {\n final Constructor<?> constructor = classInstance.getDeclaredConstructor(paramTypes);\n final Object classObject = constructor.newInstance(actualParamValues);\n return (Type)classObject;\n } catch (final InstantiationException e) {\n throw new RuntimeException(e);\n } catch (final IllegalAccessException e) {\n throw new RuntimeException(e);\n } catch (final InvocationTargetException e) {\n throw new RuntimeException(e.getCause().getMessage(),e);\n } catch (final NoSuchMethodException e) {\n throw new RuntimeException(e);\n } catch(final IllegalArgumentException e) {\n throw new RuntimeException(e);\n }\n }",
"public static <T> T newInstance(Class<T> clazz, Class[] argTypes, Object[] args) throws ReflectionException {\n\t\ttry {\n\t\t\tConstructor<T> c = clazz.getDeclaredConstructor(argTypes);\n\t\t\tc.setAccessible(true);\n\t\t\treturn c.newInstance(args);\n\t\t} catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException | NoSuchMethodException | SecurityException ex) {\n\t\t\tthrow new ReflectionException(ex);\n\t\t}\n\t}",
"public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Iterable<Member> members) { throw Extensions.todo(); }",
"public interface Reflection {\n\t/**\n\t * Creates the template which specifies which constructor to \n\t * call upon. The specifies the classes of the arguments which\n\t * need to be given to the constructor.\n\t */\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Class[] getTemplate();\n\t\n\t/**\n\t * Create the object array which serves as the parameters \n\t * to construct another object of this type.\n\t */\n\tpublic Object[] getConstructorArgs ();\n}",
"public static String generateConstructor(String className, String parameterValue) {\n\t\tif (className.equals(\"Integer\")) {\n\t\t\tif (parameterValue == null)\n\t\t\t\treturn \"Integer(0)\";\n\t\t\treturn \"Integer(\"+parameterValue+\")\";\n\t\t}\n\t\tif (className.equals(\"Double\")) {\n\t\t\tif (parameterValue == null)\n\t\t\t\treturn \"Double(0)\";\n\t\t\treturn \"Double(\"+parameterValue+\")\";\n\t\t}\n\t\tif (className.equals(\"Float\")) {\n\t\t\tif (parameterValue == null)\n\t\t\t\treturn \"Float(0)\";\n\t\t\treturn \"Float(\"+parameterValue+\")\";\n\t\t}\n\t\tif (className.equals(\"Short\")) {\n\t\t\tif (parameterValue == null)\n\t\t\t\treturn \"Short((short) 0)\";\n\t\t\treturn \"Short(\"+parameterValue+\")\";\n\t\t}\n\t\tif (parameterValue == null)\n\t\t\treturn className+\"()\";\n\t\treturn className+\"(\"+parameterValue+\")\";\n\t}",
"Type getParameterType(Type[] types, String path);",
"public static NewExpression new_(Constructor constructor) { throw Extensions.todo(); }",
"public static boolean factoryConstructorDeclaration(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"factoryConstructorDeclaration\")) return false;\n if (!nextTokenIs(b, \"<factory constructor declaration>\", AT, CONST, EXTERNAL, FACTORY)) return false;\n boolean r, p;\n Marker m = enter_section_(b, l, _NONE_, FACTORY_CONSTRUCTOR_DECLARATION, \"<factory constructor declaration>\");\n r = factoryConstructorDeclaration_0(b, l + 1);\n r = r && factoryConstructorDeclaration_1(b, l + 1);\n r = r && consumeToken(b, FACTORY);\n p = r; // pin = 3\n r = r && report_error_(b, componentName(b, l + 1));\n r = p && report_error_(b, factoryConstructorDeclaration_4(b, l + 1)) && r;\n r = p && report_error_(b, formalParameterList(b, l + 1)) && r;\n r = p && factoryConstructorDeclaration_6(b, l + 1) && r;\n exit_section_(b, l, m, r, p, null);\n return r || p;\n }",
"public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}",
"public static MethodHandles.Lookup createLookup(Class<?> clazz, int mode)\n {\n return constructor.invokeWith(clazz, mode);\n }",
"public static Object create(String className, Class<?>[] argTypes, Object[] argValues)\r\n\t\t\tthrows CreateObjectException {\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tClass<?> clz = Class.forName(className);\r\n\t\t\tif (argTypes == null) {\r\n\t\t\t\treturn clz.newInstance();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tConstructor<?> c = clz.getConstructor(argTypes);\r\n\t\t\t\treturn c.newInstance(argValues);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new CreateObjectException(e);\r\n\t\t}\r\n\t}",
"public boolean matches(Constructor constructor) {\n Class<?>[] constructorParameterTypes = constructor.getParameterTypes();\n if (constructorParameterTypes.length == prototypeParameterTypes.length) {\n for (int i = 0; i < prototypeParameterTypes.length; i++) {\n if (!constructorParameterTypes[i].equals(prototypeParameterTypes[i])) {\n return false;\n }\n }\n return true;\n } else\n return false;\n }",
"public static StaticFactoryInsteadOfConstructors from(Object instant) {\n return new StaticFactoryInsteadOfConstructors();\n }",
"public static AbstractStackFactory getFactory(String factorial){\n if(factorial.equalsIgnoreCase(\"Lista\")){\n return new StackListFactory();\n\n }else if(factorial.equalsIgnoreCase(\"Vector\")){\n return new StackVectorFactory();\n\n }else if(factorial.equalsIgnoreCase(\"ArrayList\")){\n return new StackArrayListFactory();\n }\n\n return null;\n }",
"@Override\n protected boolean checkConstructorInvocation(AnnotatedDeclaredType dt,\n AnnotatedExecutableType constructor, NewClassTree src) {\n return true;\n }",
"@NotNull\n protected Supplier<AbstractReadablePacket> createConstructor() {\n final Constructor<AbstractReadablePacket> constructor = requireNonNull(ClassUtils.getConstructor(getClass()));\n return () -> ClassUtils.newInstance(constructor);\n }",
"public StratmasParameterFactory() \n {\n this.typeMapping = createTypeMapping();\n }",
"public static StaticFactoryInsteadOfConstructors type(Object object){\n return new StaticFactoryInsteadOfConstructors();\n }",
"protected Class<?> findClass(String paramString) throws ClassNotFoundException {\n/* 343 */ if (!paramString.startsWith(\"sun.reflect.misc.\")) {\n/* 344 */ throw new ClassNotFoundException(paramString);\n/* */ }\n/* 346 */ String str = paramString.replace('.', '/').concat(\".class\");\n/* 347 */ URL uRL = getResource(str);\n/* 348 */ if (uRL != null) {\n/* */ try {\n/* 350 */ return defineClass(paramString, uRL);\n/* 351 */ } catch (IOException iOException) {\n/* 352 */ throw new ClassNotFoundException(paramString, iOException);\n/* */ } \n/* */ }\n/* 355 */ throw new ClassNotFoundException(paramString);\n/* */ }",
"static Sport newInstance(int type) {\n switch (type) {\n case 0:\n return new Football();\n case 1:\n return new Basketball();\n default:\n return () -> System.out.println(\"Undefined sport.\");\n }\n }",
"public boolean findConstructorCall(\n MethodDeclaration declaration, ConstructorDeclaration constructor) {\n List<ObjectCreationExpr> calledMethods = new ArrayList<>();\n declaration.findAll(ObjectCreationExpr.class).forEach(methodDeclaration -> {\n if (methodDeclaration.getTypeAsString().equals(constructor.getNameAsString())) {\n calledMethods.add(methodDeclaration);\n }\n });\n return !calledMethods.isEmpty();\n }",
"static <T> T instantiate(Class<T> type) {\n\n\n try {\n final Constructor<T> constructor = type.getDeclaredConstructor();\n return constructor.newInstance();\n } catch (NoSuchMethodException | InstantiationException | IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }",
"public ConstantCtorAndArgsProvider(final Class<T> elementClass,\n final Class[] constructorArgTypes,\n final Object... args) throws NoSuchMethodException {\n ctorAndArgs = new CtorAndArgs<T>(elementClass, constructorArgTypes, args);\n }",
"private boolean isConstructorExceptionCompatibleWithFactoryExeception(Class<?> constructorException,\n\t\t\tClass<?>[] factoryExceptions) {\n\t\tfor (Class<?> factoryException : factoryExceptions) {\n\t\t\tif (factoryException.isAssignableFrom(constructorException)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate static Map<Method, AssistedConstructor<?>> createMethodMapping(TypeLiteral<?> factoryType,\n\t\t\tTypeLiteral<?> implementationType) {\n\t\tList<AssistedConstructor<?>> constructors = Lists.newArrayList();\n\n\t\tfor (Constructor<?> constructor : implementationType.getRawType().getDeclaredConstructors()) {\n\t\t\tif (constructor.getAnnotation(AssistedInject.class) != null) {\n\t\t\t\t\n\t\t\t\tAssistedConstructor assistedConstructor = new AssistedConstructor(constructor,\n\t\t\t\t\t\timplementationType.getParameterTypes(constructor));\n\t\t\t\tconstructors.add(assistedConstructor);\n\t\t\t}\n\t\t}\n\n\t\tif (constructors.isEmpty()) {\n\t\t\treturn ImmutableMap.of();\n\t\t}\n\n\t\tMethod[] factoryMethods = factoryType.getRawType().getMethods();\n\n\t\tif (constructors.size() != factoryMethods.length) {\n\t\t\tthrow newConfigurationException(\"Constructor mismatch: %s has %s @AssistedInject \"\n\t\t\t\t\t+ \"constructors, factory %s has %s creation methods\", implementationType, constructors.size(),\n\t\t\t\t\tfactoryType, factoryMethods.length);\n\t\t}\n\n\t\tMap<ParameterListKey, AssistedConstructor> paramsToConstructor = Maps.newHashMap();\n\n\t\tfor (AssistedConstructor c : constructors) {\n\t\t\tif (paramsToConstructor.containsKey(c.getAssistedParameters())) {\n\t\t\t\tthrow new RuntimeException(\"Duplicate constructor, \" + c);\n\t\t\t}\n\t\t\tparamsToConstructor.put(c.getAssistedParameters(), c);\n\t\t}\n\n\t\tMap<Method, AssistedConstructor<?>> result = Maps.newHashMap();\n\t\tfor (Method method : factoryMethods) {\n\t\t\tif (!method.getReturnType().isAssignableFrom(implementationType.getRawType())) {\n\t\t\t\tthrow newConfigurationException(\"Return type of method %s is not assignable from %s\", method,\n\t\t\t\t\t\timplementationType);\n\t\t\t}\n\n\t\t\tList<Type> parameterTypes = Lists.newArrayList();\n\t\t\tfor (TypeLiteral<?> parameterType : factoryType.getParameterTypes(method)) {\n\t\t\t\tparameterTypes.add(parameterType.getType());\n\t\t\t}\n\t\t\tParameterListKey methodParams = new ParameterListKey(parameterTypes);\n\n\t\t\tif (!paramsToConstructor.containsKey(methodParams)) {\n\t\t\t\tthrow newConfigurationException(\"%s has no @AssistInject constructor that takes the \"\n\t\t\t\t\t\t+ \"@Assisted parameters %s in that order. @AssistInject constructors are %s\",\n\t\t\t\t\t\timplementationType, methodParams, paramsToConstructor.values());\n\t\t\t}\n\n\t\t\tmethod.getParameterAnnotations();\n\t\t\tfor (Annotation[] parameterAnnotations : method.getParameterAnnotations()) {\n\t\t\t\tfor (Annotation parameterAnnotation : parameterAnnotations) {\n\t\t\t\t\tif (parameterAnnotation.annotationType() == Assisted.class) {\n\t\t\t\t\t\tthrow newConfigurationException(\"Factory method %s has an @Assisted parameter, which \"\n\t\t\t\t\t\t\t\t+ \"is incompatible with the deprecated @AssistedInject annotation. Please replace \"\n\t\t\t\t\t\t\t\t+ \"@AssistedInject with @Inject on the %s constructor.\", method, implementationType);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tAssistedConstructor matchingConstructor = paramsToConstructor.remove(methodParams);\n\n\t\t\tresult.put(method, matchingConstructor);\n\t\t}\n\t\treturn result;\n\t}",
"private ReflectionTypeResolver(List<Class<?>> classes) {\n this.classes = classes;\n }",
"public static NewExpression new_(Constructor constructor, Expression[] expressions) {\n return new_(constructor, Arrays.asList(expressions));\n }",
"TypesOfConstructor(){\n System.out.println(\"This is default constructor\");\n }",
"public static NewExpression new_(Constructor constructor, Iterable<Expression> expressions, Member[] members) {\n return new_(constructor, expressions, Arrays.asList(members));\n }"
] | [
"0.71156377",
"0.7087612",
"0.6900496",
"0.68348837",
"0.67137927",
"0.6591604",
"0.65434915",
"0.63446206",
"0.6339664",
"0.6256648",
"0.6226286",
"0.621681",
"0.62007946",
"0.6122251",
"0.60159004",
"0.5934295",
"0.5931134",
"0.5908368",
"0.5850977",
"0.58443266",
"0.5835713",
"0.5831257",
"0.5806859",
"0.57817835",
"0.5723516",
"0.5640299",
"0.5597785",
"0.5584791",
"0.5576548",
"0.551715",
"0.5495873",
"0.5489534",
"0.5442187",
"0.5385492",
"0.5337027",
"0.5316782",
"0.5316574",
"0.52736115",
"0.5224574",
"0.5174576",
"0.5158394",
"0.51550364",
"0.5139637",
"0.5117938",
"0.51151437",
"0.51051754",
"0.5105127",
"0.5078164",
"0.5034891",
"0.50219613",
"0.4939705",
"0.49368703",
"0.49191794",
"0.48937345",
"0.48725364",
"0.48654035",
"0.4860116",
"0.4848326",
"0.4808571",
"0.4801568",
"0.48004675",
"0.4787526",
"0.4756828",
"0.4756099",
"0.47482708",
"0.47402564",
"0.473859",
"0.4736831",
"0.47257563",
"0.47224557",
"0.47176924",
"0.47154796",
"0.47137257",
"0.47127682",
"0.46938902",
"0.46884105",
"0.4649923",
"0.46483955",
"0.46423757",
"0.46321833",
"0.4631086",
"0.46252635",
"0.4622984",
"0.46101776",
"0.4595514",
"0.4583792",
"0.45729262",
"0.45692718",
"0.45596096",
"0.45510647",
"0.4547613",
"0.45424303",
"0.4540434",
"0.45398682",
"0.45398378",
"0.45243192",
"0.45233336",
"0.45209727",
"0.45196372",
"0.4516091"
] | 0.76732624 | 0 |
Finds a field by name. | public Field findField(final String name) {
GeneratorHelper.checkJavaFieldName("parameter:name", name);
Field found = null;
final Iterator<Field> iterator = this.getFields().iterator();
while (iterator.hasNext()) {
final Field field = iterator.next();
if (field.getName().equals(name)) {
found = field;
break;
}
}
return found;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static _Fields findByName(java.lang.String name) {\r\n return byName.get(name);\r\n }",
"public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }",
"public static _Fields findByName(String name) {\r\n return byName.get(name);\r\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }",
"public static _Fields findByName(java.lang.String name) {\n return byName.get(name);\n }"
] | [
"0.771015",
"0.76624644",
"0.76624644",
"0.7659194",
"0.7659194",
"0.7659194",
"0.7659194",
"0.7659194",
"0.7659194",
"0.7659194",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7606083",
"0.7599838",
"0.7599838",
"0.7599838",
"0.7599838",
"0.7599838",
"0.7599838",
"0.7599838",
"0.7599838",
"0.7593178",
"0.7593178",
"0.7588753",
"0.7588753",
"0.7588753",
"0.7588753",
"0.7588753",
"0.7588753"
] | 0.7869447 | 0 |
Factory method which creates a set of methods lazily. | abstract protected Set<Method> createMethods(); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private PropertySetFactory() {}",
"private void mappingMethodSet() throws SecurityException, NoSuchMethodException{\n\t\tString aux = upFirstLetter();\n\t\tString methodSet = \"set\" + aux;\n\t\tthis.methodSet = this.classFather.getMethod(methodSet, this.classType);\n\t}",
"protected Method fetchMethod() {\n int i = randomGenerator.nextInt(allCallableMethods.size());\n Method selected = allCallableMethods.get(i);\n allCallableMethods.add(selected); // We add it back to the list of methods, to make it more likely to be selected!\n return selected;\n }",
"private EagerInitilization(){}",
"private void initMethods(Method[] _methods, ConstantPoolGen cp)\n\t\tthrows ReadAttributeException {\n\t\tmethods = new HashMap();\n\t\t//\tfor (int i = 0; i < _methods.length; i++) {\n\t\tfor (int i = 0; i < _methods.length ;i++) {\n\t\t\tMethodGen mg = new MethodGen(_methods[i], className, cp);\n\t\t\tBCMethod bcm = new BCMethod(mg, this, cp);\n\t\t\tString signature = mg.getSignature();\t\n\t\t\tString key = MethodSignature.getSignature(bcm.getName(), bcm.getArgTypes(), bcm.getReturnType());\n\t\t\t/*Util.dump(\" add method \" + key + \" in class \" + getName() );*/\n\t\t\tmethods.put(key,bcm);\n\t\t}\n\t}",
"Iterable<T> getFunctions();",
"private void init() {\n Method m = getAsListMethod();\r\n Class< ? > c = Object[].class;\r\n branchMethods.put( c, m );\r\n // Treat Map as an Entry set\r\n c = Map.class;\r\n m = getEntrySetMethod();\r\n branchMethods.put( c, m );\r\n // Make an Entry a List\r\n c = Entry.class;\r\n m = getEntryToListMethod();\r\n branchMethods.put( c, m );\r\n // Make a Pair a List\r\n c = Pair.class;\r\n m = getPairToListMethod();\r\n branchMethods.put( c, m );\r\n// c = Iterable.class;\r\n// m = null;\r\n// branchMethods.put( c, m );\r\n }",
"Predicate<Method> getPredicate();",
"private ProxyCollection getFactoryProxyCollection(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyCollection proxy = (ProxyCollection) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyCollection.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyCollection(type, true, l);\n proxy = (ProxyCollection) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }",
"@Override\n public Optional<ExecutableElement> factoryMethod() {\n return ElementFilter.methodsIn(element().getEnclosedElements()).stream()\n .filter(element -> element.getModifiers().contains(Modifier.STATIC))\n .filter(element -> element.getSimpleName().toString().equalsIgnoreCase(\"create\"))\n .filter(element -> element.getReturnType().equals(element().asType()))\n .findAny();\n }",
"public interface Lazy<T> {\n\n /**\n * Computes (first time call) or returns cached value.\n *\n * @return value\n */\n T get();\n}",
"public Collection<ResourceMethod> getMethodsForPath(\n RemainingPath remainingPath) {\n // NICE results may be chached, if any method is returned.\n // The 404 case will be called rarely and produce a lot of cached data.\n final List<ResourceMethod> resourceMethods = new ArrayList<ResourceMethod>();\n for (final ResourceMethod method : this.resourceMethods) {\n final PathRegExp methodPath = method.getPathRegExp();\n if (remainingPath.isEmptyOrSlash()) {\n if (methodPath.isEmptyOrSlash()) {\n resourceMethods.add(method);\n }\n } else {\n if (methodPath.matchesWithEmpty(remainingPath)) {\n resourceMethods.add(method);\n }\n }\n }\n return resourceMethods;\n }",
"@Test\r\n\tpublic void testLazyGetters() {\r\n\t\tPerson p1 = new Person(0);\r\n\t\tArrayList<FriendRequest> x;\r\n\t\tx = p1.getFriendRequests();\r\n\t\tassertNotNull(x);\r\n\t\tx = null;\r\n\t\tx = p1.getFriendRequestsOutgoing();\r\n\t\tassertNotNull(x);\r\n\t\t\r\n\t}",
"private <T> T lazy(Supplier<T> loader) {\n return null;\n }",
"@FunctionalInterface\npublic interface HxMethodInitializer extends HxInitializer<HxMethod> {\n\n /**\n * Initializes, prepares or adapts intern properties of the given method\n * @param method to modify according to user's needs\n */\n void initialize(HxMethod method);\n}",
"public interface MethodSpecGenerator<T extends MethodSpec> {\n\tpublic Collection<T> findMethods(CtClass theKlass, Set<CtClass> taintClasses);\n}",
"private AirforceOne_lazy() {\n }",
"private ChainingMethods() {\n // private constructor\n\n }",
"@PostConstruct\r\n\tprivate void init()\r\n\t{\r\n\t\tSet<Method> freeMarkerMethods = classScannerService.getMethodsAnnotatedWith(FreeMarkerMethod.class);\r\n\t\t\r\n\t\tif(freeMarkerMethods == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Class<?>> fmarkerClasses = new HashSet<Class<?>>();\r\n\t\t\r\n\t\tfor(Method method : freeMarkerMethods)\r\n\t\t{\r\n\t\t\tif(fmarkerClasses.contains(method.getDeclaringClass()))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tfreeMarkerEngine.loadClass(method.getDeclaringClass());\r\n\t\t}\r\n\t}",
"H create(Method method);",
"Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;",
"public int getAllLazy() {\n \treturn 0;\r\n }",
"private void addToMethodStorage(Method[] methods, Set<MethodBox> storage) {\n Arrays.stream(methods)\n .filter(method -> Modifier.isAbstract(method.getModifiers()))\n .map(MethodBox::new)\n .collect(Collectors.toCollection(() -> storage));\n }",
"public interface ClassesByNameProvider {\n\n List<ReferenceType> get(String s);\n\n static ClassesByNameProvider createCache(List<ReferenceType> allTypes) {\n return new Cache(allTypes);\n }\n\n /**\n * Caching implementation for name based class provider.\n */\n final class Cache implements ClassesByNameProvider {\n\n private final ConcurrentHashMap<String, ReferenceType> myCache;\n\n public Cache(List<ReferenceType> classes) {\n myCache = new ConcurrentHashMap<>();\n classes.forEach(t -> myCache.put(t.signature(), t));\n }\n\n @Override\n public List<ReferenceType> get(String s) {\n String signature = VirtualMachineProxyImpl.JNITypeParserReflect.typeNameToSignature(s);\n if (signature != null) {\n return (List<ReferenceType>) myCache.get(signature);\n }\n return Collections.emptyList();\n }\n }\n}",
"public java.util.Iterator iteratorSupplier()\n // -end- 335C0D7A02E4 get_all_head327A646F00E6 \"Dependency::iteratorSupplier\"\n ;",
"private EagerInitializationSingleton() {\n\t}",
"public List<? extends DelegateLoader> createDefaultDelegates()\n {\n return createDelegates(getPolicy());\n }",
"private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}",
"protected abstract void initCache(List<RECIPE> recipes);",
"private MultibinderFactory() { }",
"public Set<Method> getMethods() {\r\n \t\t// We will only consider private methods in the declared class\r\n \t\tif (forceAccess)\r\n \t\t\treturn setUnion(source.getDeclaredMethods(), source.getMethods());\r\n \t\telse\r\n \t\t\treturn setUnion(source.getMethods());\r\n \t}",
"private static MethodHandle createBackSpecies(MethodHandles.Lookup frontClassLookup, MethodType type, Class<?> frontClass, String genericName)\n throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException, ClassNotFoundException {\n // TODO BUG : Use a value which is a HashMap storing the String specialization and the corresponding class.\n // TODO store the Substitution table in a couple values for the key class in classValue so it is not read every time. Not needed, because bootstrap are not called too much.\n byte[] backCode = BACK_FACTORY.get(frontClass);\n SubstitutionTable substitutionTable = SubstitutionTableReader.read(backCode);\n String[] classes = Type.getParameterizedTypeValues(genericName);\n Object[] pool = new Object[substitutionTable.getMax() + 1];\n // Contains the computed instantiation of a given method name.\n HashMap<String, String> methodInstantiations = new HashMap<>();\n\n for (Map.Entry<Integer, Map.Entry<String, String>> descs : substitutionTable.getDescriptors().entrySet()) {\n Integer index = descs.getKey();\n Map.Entry<String, String> ownerAndDescriptor = descs.getValue();\n String owner = ownerAndDescriptor.getKey();\n String descriptor = ownerAndDescriptor.getValue();\n\n // Processing key instantiations\n // TODO prevent this double iteration please.\n switch (owner) {\n case BackClassVisitor.RT_METHOD_INSTANTIATION_TYPE_KEY: {\n String[] split = descriptor.split(\"_\", 2);\n if (split.length != 2) {\n throw new IllegalStateException(\"The key has to contain the method's name : \" + descriptor);\n }\n String methodName = split[0];\n String methodDescriptor = split[1];\n String oldValue = methodInstantiations.get(methodName);\n if (oldValue != null) {\n throw new IllegalStateException(\"The method key for : \" + methodName + \" has already been computed : \" + oldValue);\n }\n String instantiation = Type.instantiateMethodDescriptor(methodDescriptor, classes);\n methodInstantiations.put(methodName, instantiation);\n pool[index] = instantiation;\n break;\n }\n default:\n break;\n }\n }\n\n for (Map.Entry<Integer, Map.Entry<String, String>> descs : substitutionTable.getDescriptors().entrySet()) {\n Integer index = descs.getKey();\n Map.Entry<String, String> ownerAndDescriptor = descs.getValue();\n String owner = ownerAndDescriptor.getKey();\n String descriptor = ownerAndDescriptor.getValue();\n\n switch (owner) {\n default:\n case BackClassVisitor.RT_SPECIALIZABLE_DESCRIPTOR_TYPE:\n pool[index] = Type.specializeDescriptor(descriptor, classes);\n break;\n case BackClassVisitor.RT_METHOD_INSTANTIATION_TYPE_KEY:\n continue;\n case BackClassVisitor.RT_METHOD_INSTANTIATIONS_TYPE_TESTS: {\n String[] split = descriptor.split(\"_\", 2);\n if (split.length != 2) {\n throw new IllegalStateException(\"The key has to contain the method's name : \" + descriptor);\n }\n String methodName = split[0];\n String methodDescriptor = split[1];\n String key = methodInstantiations.get(methodName);\n if (key == null) {\n throw new IllegalStateException(\"The instantiation key for method : \" + methodName + \" does not exist : \" + descriptor + \" map : \" + methodInstantiations);\n }\n pool[index] = methodDescriptor.contains(key) ? key : methodDescriptor;\n break;\n }\n case BackClassVisitor.RT_METHOD_HANDLE_TYPE:\n insertMethodHandleWithLookupPatched(frontClassLookup, pool, index, descriptor);\n break;\n }\n\n }\n Class<?> backClass = UNSAFE.defineAnonymousClass(Object.class, backCode, pool);\n MethodHandle constructor = frontClassLookup.findConstructor(backClass, type.changeReturnType(void.class));\n return constructor.asType(type.changeReturnType(Object.class)); // The return type is considered as a plain Object.\n }",
"protected void initializeMethod() throws DescriptorException {\n Class tempClass;\n if (this.getFactory() == null) {\n tempClass = this.getDescriptor().getJavaClass();\n } else {\n tempClass = this.getFactory().getClass();\n }\n this.setMethod(this.buildMethod(tempClass, this.getMethodName(), new Class[0]));\n }",
"private Map<String, Mutator> createMutatorMap() {\n Map<String, Mutator> mutators = new HashMap<String, Mutator>();\n\n Method[] methods = type.getMethods();\n for (int i = 0; i < methods.length; i++) {\n Method method = methods[i];\n\n // implement some rules to decide if this method is a mutator or not\n\n // not interested in methods declared by Object\n if (method.getDeclaringClass() == Object.class) continue;\n\n // method name should start with 'get'\n String fieldName = mutatorMethodNameToFieldName(method.getName());\n if (fieldName == null) continue;\n\n // method should have a single parameter\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (parameterTypes.length != 1) continue;\n Class<?> parameterType = parameterTypes[0];\n\n // method have void return type\n Class<?> returnType = method.getReturnType();\n if (returnType != Void.TYPE) continue;\n\n // everything checks out, add mutator to list\n mutators.put(fieldName, new MethodMutatorImpl(method, fieldName, parameterType));\n }\n\n return mutators;\n }",
"@Test\n public void lazyLoad() throws Exception {\n CallofDocument doc = lazy(this::parseDoc);\n // doc not initialized\n doc.getCreated(); // doc initialized now\n }",
"Set createSet();",
"protected void lookupSetters(final Map<String, Property> properties, final MethodHolder<?> clazz)\r\n {\r\n for (Method<?> method : clazz.getMethods())\r\n {\r\n // Exclude static methods\r\n \r\n if (method.isStatic())\r\n {\r\n continue;\r\n }\r\n \r\n // Get type\r\n \r\n List<Parameter> parameters = method.getParameters();\r\n \r\n if (parameters.size() != 1)\r\n {\r\n continue;\r\n }\r\n \r\n // Get name\r\n \r\n String propertyName = isSetter(method);\r\n \r\n if (propertyName == null)\r\n {\r\n continue;\r\n }\r\n \r\n // Exclude based on other criteria\r\n //\r\n // (explicitly set to null in case we encountered an imbalanced field/getter)\r\n \r\n String type = parameters.get(0).getType();\r\n \r\n Field<?> privateField = getPrivateField((FieldHolder<?>) clazz, propertyName);\r\n \r\n if (privateField != null && this.privateFieldConvention == null)\r\n {\r\n propertyName = privateField.getName();\r\n }\r\n \r\n // Already found via its getter?\r\n \r\n Property existingProperty = properties.get(propertyName);\r\n \r\n if (existingProperty instanceof ForgeProperty)\r\n {\r\n ForgeProperty existingForgeProperty = (ForgeProperty) existingProperty;\r\n \r\n // Beware covariant return types: always prefer the getter's type\r\n \r\n properties.put(\r\n propertyName,\r\n new ForgeProperty(propertyName, existingForgeProperty.getType(),\r\n existingForgeProperty.getReadMethod(), method, getPrivateField((FieldHolder<?>) clazz,\r\n propertyName)));\r\n continue;\r\n }\r\n \r\n // Explicitly excluded based on getter already?\r\n \r\n if ((existingProperty == null) && properties.containsKey(propertyName))\r\n {\r\n continue;\r\n }\r\n \r\n properties\r\n .put(propertyName,\r\n new ForgeProperty(propertyName, type, null, method, privateField));\r\n }\r\n }",
"public abstract Set<MethodUsage> getDeclaredMethods();",
"public static CanCache forMethod(MethodDescription.InDefinedShape methodDescription) {\n if (methodDescription.isTypeInitializer()) {\n return CanCacheIllegal.INSTANCE;\n } else if (methodDescription.isConstructor()) {\n return new ForConstructor(methodDescription);\n } else {\n return new ForMethod(methodDescription);\n }\n }",
"public static Set predicatedSet(Set set, Predicate predicate) {\n/* 192 */ return PredicatedSet.decorate(set, predicate);\n/* */ }",
"public static <T> List<T> initialize(Supplier<T> s) {\n\t\tList<T> result = new ArrayList<>();\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tresult.add(s.get());\n\t\t}\n\t\treturn result;\n\t}",
"public interface ServiceFactory {\n \n /**\n * Returns a collection of services to be registered.\n * \n * @return an immutable collection of services; never null\n */\n public Collection<Service> createServices();\n \n}",
"List<Factory> selectAll();",
"public T enableMethods(List<String> enabledMethods) {\n this.enabledMethods = Objects.requireNonNullElse(enabledMethods, new ArrayList<>());\n return self();\n }",
"public void doLazyMatch() {}",
"private AccessorFactory() {\n\n\t\tCoreConfig cc = CoreConfig.getInstance();\n\t\tString defaultName = cc.getString(\"builder.default\",CoreConstants.BUILDER_HBASE);\n\t\tdefaultBuilder = defaultName;\n\n\t\tfor (int i = 0; i < 20; i++) {\n\n\t\t\tString builderClass = cc.getString(BUILDER_PREFIX + i);\n\t\t\t\n\t\t\tif(StringUtils.isBlank(builderClass))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tClass<?> builderClazz = getClass().getClassLoader().loadClass(builderClass);\n\n\t\t\t\tAccessorBuilder hbaseBuilder = (AccessorBuilder) builderClazz.newInstance();\n\n\t\t\t\tbuilderMap.put(hbaseBuilder.getBuilderName(), hbaseBuilder);\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tLOGGER.error(\"class:{} is not found.\", builderClass);\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\tLOGGER.error(\"class:{} error in instantiation.\", builderClass);\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\tLOGGER.error(\"class:{} be illegal accessed.\", builderClass);\n\t\t\t}\n\n\t\t}\n\n\t\tappendMapping(CoreConstants.BUILDER_HBASE, \"com/obal/meta/AccessorMap.hbase.properties\");\n\n\t}",
"Method createMethod();",
"Method createMethod();",
"protected abstract Collection<Cache> loadCaches();",
"private void mappingMethods() throws SecurityException, NoSuchMethodException{\n\t\tmappingMethodGet();\n\t\tmappingMethodSet();\n\t}",
"public List<IMethod> getMethods();",
"public List<IMethod> getMethods();",
"public static EntityWithFactoryMethodAndMixedMappingTypes instance(@MapsTo(\"factoryMethodInjected\") String factoryMethodInjected) {\n EntityWithFactoryMethodAndMixedMappingTypes instance = new EntityWithFactoryMethodAndMixedMappingTypes(factoryMethodInjected);\n instance.factoryMethodWasCalled = true;\n return instance;\n }",
"protected void forceLazyInitialization() {\n getExchangeConverter();\n getInjector();\n getLanguageResolver();\n getTypeConverter();\n }",
"public MethodCollector(Collection<Method> collection)\n {\n this.collection = collection;\n }",
"private EagerlySinleton()\n\t{\n\t}",
"public interface MethodFactory extends ModuleSupportable\n{\n\t/**\n\tUsed to identify this interface when finding it with the Monitor.\n\t**/\n\tpublic static final String MODULE = \n\t \"com.splicemachine.db.iapi.store.access.conglomerate.MethodFactory\";\n\n\t/**\n\tReturn the default properties for this access method.\n\t**/\n\tProperties defaultProperties();\n\n\t/**\n\tReturn whether this access method implements the implementation\n\ttype given in the argument string.\n\t**/\n\tboolean supportsImplementation(String implementationId);\n\n\t/**\n\tReturn the primary implementation type for this access method.\n\tAlthough an access method may implement more than one implementation\n\ttype, this is the expected one. The access manager will put the\n\tprimary implementation type in a hash table for fast access.\n\t**/\n\tString primaryImplementationType();\n\n\t/**\n\tReturn whether this access method supports the format supplied in\n\tthe argument.\n\t**/\n\tboolean supportsFormat(UUID formatid);\n\n\t/**\n\tReturn the primary format that this access method supports.\n\tAlthough an access method may support more than one format, this\n\tis the usual one. the access manager will put the primary format\n\tin a hash table for fast access to the appropriate method.\n\t**/\n\tUUID primaryFormat();\n}",
"List<Method> getAllMethods();",
"public Collection<Service> createServices();",
"@SuppressWarnings(\"unchecked\")\n \tpublic static <T> Set<T> createConcurrentHashSet() {\n \t\treturn (Set<T>) Collections.synchronizedSet(CollectionFactory.createHashSet());\n \t}",
"@Test\n public void testLazyInstantiation()\n {\n Injector injector = GuiceInjectors.makeStartupInjectorWithModules(\n ImmutableList.of(\n new GcpMockModule()\n {\n\n @Override\n public HttpRequestInitializer mockRequestInitializer(\n HttpTransport transport,\n JsonFactory factory\n )\n {\n throw new UnsupportedOperationException(\"should not be called, because this should be lazy\");\n }\n },\n new GoogleStorageDruidModule()\n )\n );\n final GoogleStorage instance = injector.getInstance(GoogleStorage.class);\n Assert.assertSame(instance, injector.getInstance(GoogleStorage.class));\n }",
"public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }",
"@NotNull\n public static <T> Lazy<T> createMultiThreadedLazy(\n @NotNull Supplier<T> supplier) {\n return new MultiThreadedLazy<>(supplier);\n }",
"Reuse getReuse();",
"ISourceMethod[] getMethods();",
"private PerfectoDriverFactory() {\n\n\t}",
"private ResourceSet createResourceSet() {\r\n \t\t// create the container resource set\r\n \t\tResourceSet resourceSet = new ResourceSetImpl();\r\n \t\t// Register the appropriate resource factory to handle all file\r\n \t\t// extensions.\r\n \t\tresourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()\r\n \t\t\t\t.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl() {\r\n \t\t\t\t\tpublic Resource createResource(URI uri) {\r\n \t\t\t\t\t\treturn new XMIResourceImpl(uri) {\r\n \t\t\t\t\t\t\tprotected boolean useUUIDs() {\r\n \t\t\t\t\t\t\t\treturn true;\r\n \t\t\t\t\t\t\t}\r\n \t\t\t\t\t\t};\r\n \t\t\t\t\t}\r\n \t\t\t\t});\r\n \t\t\r\n \t\tActivator.fTracer.traceDebug(\"new Resourceset created: \" + resourceSet);\r\n \t\treturn resourceSet;\r\n \t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T initialize(FasterManager fasterManager, T table) throws FasterRuntimeException{\n\t\t\n\t\tClass<T> clazz = (Class<T>) table.getClass();\n\t\t\n\t\tfor (Method method : clazz.getMethods()){\n\t\t\t\n\t\t\tif (method.isAnnotationPresent(Join.class)){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tObject lazyObj;\n\t\t\t\ttry {\n\t\t\t\t\tlazyObj = method.invoke(table);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new InvokeException(e);\n\t\t\t\t} \n\t\t\t\tlazyObj = fasterManager.get(lazyObj).unique();\n\t\t\t\t\n\t\t\t\tif (lazyObj!=null){\n\t\t\t\t\tString methodName = method.getName();\n\t\t\t\t\tString setMethodName = methodName.replaceFirst(GET, SET);\n\t\t\t\t\ttry{\n\n\t\t\t\t\t\tMethod setMethod = clazz.getMethod(setMethodName, method.getReturnType());\n\t\t\t\t\t\tsetMethod.invoke(table, lazyObj);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tthrow new InvokeException(e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (method.isAnnotationPresent(JoinList.class)){\n\t\t\t\t\n\t\t\t\tClass<List<?>> listLazyClass = (Class<List<?>>) method.getReturnType();\n\t\t\t\tClass<?> lazyClass = listLazyClass.getSuperclass();\n\t\t\t\tObject lazyList;\n\t\t\t\ttry {\n\t\t\t\t\tlazyList = lazyClass.newInstance();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new InitializeObjectException(e);\n\t\t\t\t}\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tList<?> listResults = null;\n\t\t\t\t\tfor (Method lazyMethod : lazyClass.getMethods()){\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (lazyMethod.isAnnotationPresent(Join.class)){\n\t\t\t\t\t\t\tif (clazz.getName().equals(lazyMethod.getReturnType().getName())){\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tObject lazyReference = clazz.newInstance();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (Method methodId : clazz.getMethods()){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (methodId.isAnnotationPresent(Id.class)){\n\t\t\t\t\t\t\t\t\t\tString methodName = method.getName();\n\t\t\t\t\t\t\t\t\t\tString setMethodName = methodName.replaceFirst(GET, SET);\n\t\t\t\t\t\t\t\t\t\ttry{\n\n\t\t\t\t\t\t\t\t\t\t\tMethod setMethod = clazz.getMethod(setMethodName, methodId.getReturnType());\n\t\t\t\t\t\t\t\t\t\t\tsetMethod.invoke(lazyReference, methodId.invoke(table));\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\tthrow new InvokeException(e);\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tlistResults = fasterManager.get(lazyList).list();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (listResults!=null){\n\t\t\t\t\t\tString methodName = method.getName();\n\t\t\t\t\t\tString setMethodName = methodName.replaceFirst(GET, SET);\n\t\t\t\t\t\tMethod setMethod = clazz.getMethod(setMethodName, method.getReturnType());\n\t\t\t\t\t\t\n\t\t\t\t\t\tsetMethod.invoke(table, listResults);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new InvokeException(e);\n\t\t\t\t} \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn null;\n\t}",
"public static synchronized void init()\n {\n lazyinit();\n }",
"private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}",
"private ProxyMap getFactoryProxyMap(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyMap proxy = (ProxyMap) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyMap.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyMap(type, true, l);\n proxy = (ProxyMap) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }",
"public List<? extends DelegateLoader> createDelegates(ClassLoaderPolicy... policies)\n {\n List<DelegateLoader> delegates = new ArrayList<DelegateLoader>();\n for (ClassLoaderPolicy policy : policies)\n delegates.add(new FilteredDelegateLoader(policy));\n return delegates;\n }",
"public <T> void addLazy(String name, LazyI<T> lazy);",
"private List<PropertyGenerator> getPropertyGenerators() {\n\t\tList<PropertyGenerator.GeneratorFactory> factories = new ArrayList<PropertyGenerator.GeneratorFactory>();\n\t\t// these bindings will not mangle their property names\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.NONE));\n\t\tfactories.add(new MethodCallableGenerator.Factory());\n\t\t// these bindings will try to drop their prefix and use a shorter name\n\t\t// (e.g. getFoo -> foo)\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.GET));\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.HAS));\n\t\tfactories.add(new MethodPropertyGenerator.Factory(AccessorPrefix.IS));\n\t\t// the field binding will use its name or append Field if it was already\n\t\t// taken by get/has/is\n\t\tfactories.add(new FieldPropertyGenerator.Factory());\n\n\t\tSet<String> namesTaken = new HashSet<String>();\n\t\tnamesTaken.add(\"getName\");\n\t\tnamesTaken.add(\"getPath\");\n\t\tnamesTaken.add(\"getType\");\n\t\tnamesTaken.add(\"getParentBinding\");\n\t\tnamesTaken.add(\"getChildBindings\");\n\n\t\tList<Element> elements = this.getAccessibleElements();\n\t\tList<PropertyGenerator> generators = new ArrayList<PropertyGenerator>();\n\n\t\tfor (PropertyGenerator.GeneratorFactory f : factories) {\n\t\t\tfor (Iterator<Element> i = elements.iterator(); i.hasNext();) {\n\t\t\t\tElement enclosed = i.next();\n\t\t\t\ttry {\n\t\t\t\t\tPropertyGenerator pg = f.newGenerator(this.pathBindingClass, this.name, this.element, enclosed,\n\t\t\t\t\t\t\tnamesTaken);\n\t\t\t\t\tif (namesTaken.contains(pg.getPropertyName())) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnamesTaken.add(pg.getPropertyName());\n\t\t\t\t\t}\n\t\t\t\t\ti.remove(); // element is handled, skip any further\n\t\t\t\t\t\t\t\t// generators\n\t\t\t\t\tgenerators.add(pg);\n\t\t\t\t\tthis.sourceElements.add(enclosed);\n\t\t\t\t} catch (WrongGeneratorException e) {\n\t\t\t\t\t// try next\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn generators;\n\t}",
"protected Collection method_1554() {\n return this.method_1559();\n }",
"private static HashSet<ExpressionObjectMethod> generateExpressionObjectMethods(Dialect dialect,\r\n\t\tExpressionObject expressionobject, IJavaProject project) {\r\n\r\n\t\tHashSet<ExpressionObjectMethod> generatedmethods = new HashSet<ExpressionObjectMethod>();\r\n\r\n\t\tString classname = expressionobject.getClazz();\r\n\t\ttry {\r\n\t\t\tIType type = project.findType(classname);\r\n\t\t\tif (type != null) {\r\n\t\t\t\tfor (IMethod method: type.getMethods()) {\r\n\t\t\t\t\tif (!method.isConstructor()) {\r\n\r\n\t\t\t\t\t\tExpressionObjectMethod expressionobjectmethod = new ExpressionObjectMethod();\r\n\t\t\t\t\t\texpressionobjectmethod.setDialect(dialect);\r\n\r\n\t\t\t\t\t\t// For Java bean methods, convert the suggestion to a property\r\n\t\t\t\t\t\tString methodname = method.getElementName();\r\n\t\t\t\t\t\tint propertypoint =\r\n\t\t\t\t\t\t\t\tmethodname.startsWith(\"get\") || methodname.startsWith(\"set\") ? 3 :\r\n\t\t\t\t\t\t\t\tmethodname.startsWith(\"is\") ? 2 :\r\n\t\t\t\t\t\t\t\t-1;\r\n\r\n\t\t\t\t\t\tif (propertypoint != -1 && methodname.length() > propertypoint &&\r\n\t\t\t\t\t\t\tCharacter.isUpperCase(methodname.charAt(propertypoint))) {\r\n\r\n\t\t\t\t\t\t\tStringBuilder propertyname = new StringBuilder(methodname.substring(propertypoint));\r\n\t\t\t\t\t\t\tpropertyname.insert(0, Character.toLowerCase(propertyname.charAt(0)));\r\n\t\t\t\t\t\t\tpropertyname.deleteCharAt(1);\r\n\t\t\t\t\t\t\texpressionobjectmethod.setName(expressionobject.getName() + \".\" + propertyname);\r\n\t\t\t\t\t\t\texpressionobjectmethod.setJavaBeanProperty(true);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\texpressionobjectmethod.setName(expressionobject.getName() + \".\" + methodname);\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tgeneratedmethods.add(expressionobjectmethod);\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\tcatch (JavaModelException ex) {\r\n\t\t\tlogError(\"Unable to locate expression object reference: \" + classname, ex);\r\n\t\t}\r\n\r\n\t\treturn generatedmethods;\r\n\t}",
"Provider createProvider();",
"public BQTestClassFactory autoLoadModules() {\n this.autoLoadModules = true;\n return this;\n }",
"protected abstract Set method_1559();",
"public static FactoryEnumeration getFactories(String propName, Hashtable<?, ?> env, Context ctx)\n throws NamingException {\n\n String facProp = getProperty(propName, env, ctx, true);\n if (facProp == null)\n return null; // no classes specified; return null\n\n // Cache is based on context class loader and property val\n ClassLoader loader = helper.getContextClassLoader();\n\n Map<String, List<NamedWeakReference<Object>>> perLoaderCache = null;\n synchronized (factoryCache) {\n perLoaderCache = factoryCache.get(loader);\n if (perLoaderCache == null) {\n perLoaderCache = new HashMap<>(11);\n factoryCache.put(loader, perLoaderCache);\n }\n }\n\n synchronized (perLoaderCache) {\n List<NamedWeakReference<Object>> factories = perLoaderCache.get(facProp);\n if (factories != null) {\n // Cached list\n return factories.size() == 0 ? null : new FactoryEnumeration(factories, loader);\n } else {\n // Populate list with classes named in facProp; skipping\n // those that we cannot load\n StringTokenizer parser = new StringTokenizer(facProp, \":\");\n factories = new ArrayList<>(5);\n while (parser.hasMoreTokens()) {\n try {\n // System.out.println(\"loading\");\n String className = parser.nextToken();\n Class<?> c = helper.loadClass(className, loader);\n factories.add(new NamedWeakReference<Object>(c, className));\n } catch (Exception e) {\n // ignore ClassNotFoundException,\n // IllegalArgumentException\n }\n }\n // System.out.println(\"adding to cache: \" + factories);\n perLoaderCache.put(facProp, factories);\n return new FactoryEnumeration(factories, loader);\n }\n }\n }",
"protected void lookupGetters(final Map<String, Property> properties, final MethodHolder<?> clazz)\r\n {\r\n // Hack until https://issues.jboss.org/browse/FORGE-368\r\n \r\n for (Method<?> method : clazz.getMethods())\r\n {\r\n // Exclude static methods\r\n \r\n if (method.isStatic())\r\n {\r\n continue;\r\n }\r\n \r\n // Get type\r\n \r\n if (!method.getParameters().isEmpty())\r\n {\r\n continue;\r\n }\r\n \r\n String returnType = method.getQualifiedReturnType();\r\n \r\n if (returnType == null)\r\n {\r\n continue;\r\n }\r\n \r\n // Get name\r\n \r\n String propertyName = isGetter(method);\r\n \r\n if (propertyName == null)\r\n {\r\n continue;\r\n }\r\n \r\n Field<?> privateField = getPrivateField((FieldHolder<?>) clazz, propertyName);\r\n \r\n if (privateField != null && this.privateFieldConvention == null)\r\n {\r\n propertyName = privateField.getName();\r\n }\r\n \r\n properties\r\n .put(propertyName,\r\n new ForgeProperty(propertyName, returnType, method, null, privateField));\r\n }\r\n }",
"public Reflect() {\n this(MethodReflectorFactory.class);\n }",
"<T> Set<T> lookupAll(Class<T> type);",
"private LoadMethodMapper ()\n {}",
"@FameProperty(name = \"accessors\", derived = true)\n public Collection<TWithAccesses> getAccessors() {\n throw new UnsupportedOperationException(\"Not yet implemented!\"); \n }",
"public Factory() {\n\t\tclassMap = new TreeMap<String,Class<T> >();\n\t}",
"Foreach createForeach();",
"public AnnotatorPool() {\n this.factories = Generics.newHashMap();\n }",
"private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"public Builder members(Supplier<? extends Collection> collection) {\n return members(collection.get());\n }",
"private void visitAdditionalEntrypoints() {\n\tLinkedHashSet<jq_Class> extraClasses = new LinkedHashSet<jq_Class>();\n\tfor(jq_Method m: publicMethods) {\n\t extraClasses.add(m.getDeclaringClass());\n\t}\n\t\n\tfor(jq_Class cl: extraClasses) {\n\t visitClass(cl);\n\t\t\tjq_Method ctor = cl.getInitializer(new jq_NameAndDesc(\"<init>\", \"()V\"));\n\t\t\tif (ctor != null)\n\t\t\t\tvisitMethod(ctor);\n\t}\n\n\tfor(jq_Method m: publicMethods) {\n\t visitMethod(m);\n\t}\n }",
"public static SortedSet predicatedSortedSet(SortedSet set, Predicate predicate) {\n/* 293 */ return PredicatedSortedSet.decorate(set, predicate);\n/* */ }",
"private List<JCTree> makeClassFunctionProxyMethods(JFXClassDeclaration cDecl, List<MethodSymbol> needDispatch) {\n ListBuffer<JCTree> methods = ListBuffer.lb();\n for (MethodSymbol sym : needDispatch) {\n appendMethodClones(methods, cDecl, sym, true);\n }\n return methods.toList();\n }",
"public ConfigurationBuilder preferMethods() {\n\t\tconfigurationBuilder.setAccessStrategy(AccessStrategy.PREFER_METHODS);\n\t\treturn configurationBuilder;\n\t}",
"public ConfigurationBuilder onlyMethods() {\n\t\tconfigurationBuilder.setAccessStrategy(AccessStrategy.ONLY_METHODS);\n\t\treturn configurationBuilder;\n\t}",
"AutoevaluacionFactory getAutoevaluacionFactory();",
"public FakeBasicProxyPreparer() {\n\tsuper();\n }",
"public Vector<BasicSet> AllClosure(){\r\n\r\n\t\tVector<BasicSet> fermes=new Vector<BasicSet>();\r\n\t\tboolean success=false;\r\n\t\tint i=0;\r\n\t\t//BasicSet b=new BasicSet();\r\n\t\tfermes.add(FirstClosure());\r\n\t\tBasicSet attributs=new BasicSet();\r\n\t\tattributs.addAll(context.getAttributes());\r\n\t\twhile(success==false){\r\n\t\t\t//System.out.println(\"fermeeees iiii \"+fermes.get(i));\r\n\t\t\tBasicSet clone=(BasicSet) fermes.get(i).clone();\r\n\t\t\tfermes.add(NextClosure(attributs,clone));\r\n\t\t\t//System.out.println(\"fermeeees \"+fermes);\t\r\n\t\t\tif(fermes.lastElement().size()==context.getAttributeCount()){\r\n\t\t\t\tsuccess=true;\r\n\t\t\t\t//System.out.println(\"iiiii \"+i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn fermes;\r\n\t}",
"@Test\n public void generateImplementationWithDuplicateSetter() throws Exception\n {\n Builder<Exercise> builder;\n builder = new ByteBuddy().subclass(Exercise.class);\n builder = builder.defineField(\"value\", int.class, Visibility.PRIVATE);\n builder = builder.method(named(\"setValue\")).intercept(FieldAccessor.ofField(\"value\"));\n builder = builder.method(named(\"getValue\")).intercept(FieldAccessor.ofField(\"value\"));\n builder = builder.method(named(\"setValue\")).intercept(FieldAccessor.ofField(\"value\"));\n Unloaded<Exercise> unloaded = builder.make();\n Exercise pojo = unloaded.load(Exercise.class.getClassLoader(), INJECTION).getLoaded().newInstance();\n pojo.setValue(42);\n assertEquals(42, pojo.getValue());\n }",
"public interface Creator {\n public abstract Item factoryMethod();\n public abstract Item factoryMethod(String name);\n public abstract Item factoryMethod(String name, List<Flower> flowerList);\n}"
] | [
"0.5227361",
"0.5181283",
"0.5108522",
"0.5106503",
"0.50842595",
"0.5040658",
"0.5033778",
"0.5017915",
"0.49739617",
"0.49508837",
"0.49208677",
"0.485173",
"0.48284587",
"0.47809055",
"0.47778514",
"0.47777936",
"0.47745803",
"0.4764113",
"0.47434568",
"0.47341225",
"0.47095892",
"0.46910256",
"0.46741667",
"0.4627119",
"0.4623274",
"0.46110034",
"0.45995435",
"0.45991847",
"0.45912313",
"0.45828223",
"0.45713332",
"0.45614356",
"0.45492938",
"0.45409542",
"0.45403692",
"0.45375806",
"0.4530763",
"0.45234376",
"0.4519666",
"0.45172912",
"0.4511732",
"0.4493912",
"0.44833314",
"0.44762102",
"0.44572726",
"0.44440833",
"0.44245666",
"0.44245666",
"0.44086587",
"0.4407655",
"0.44035342",
"0.44035342",
"0.43957576",
"0.43873638",
"0.4386686",
"0.43827352",
"0.43719232",
"0.43688557",
"0.43676978",
"0.4364951",
"0.436456",
"0.4356576",
"0.4354274",
"0.43497634",
"0.4342497",
"0.4335939",
"0.43346104",
"0.43337086",
"0.43335712",
"0.43276227",
"0.4316927",
"0.43143943",
"0.4290746",
"0.42906561",
"0.42864323",
"0.4285696",
"0.42722225",
"0.42688778",
"0.42684302",
"0.4265645",
"0.426126",
"0.42610118",
"0.42506889",
"0.42496213",
"0.424811",
"0.42452285",
"0.42447346",
"0.4242352",
"0.42352283",
"0.422977",
"0.4224657",
"0.42176777",
"0.42137852",
"0.42103198",
"0.4205604",
"0.42047197",
"0.42001516",
"0.41952607",
"0.41933694",
"0.41929168"
] | 0.6467855 | 0 |
Finds a method using its name and parameter types. | public Method findMethod(final String methodName, final List<Type> parameterTypes) {
GeneratorHelper.checkJavaMethodName("parameter:methodName", methodName);
Checker.notNull("parameter:parameterTypes", parameterTypes);
Method found = null;
final Iterator<Method> methods = this.getMethods().iterator();
while (methods.hasNext()) {
final Method method = methods.next();
if (false == method.getName().equals(methodName)) {
continue;
}
final List<MethodParameter> methodParameters = method.getParameters();
if (methodParameters.size() != parameterTypes.size()) {
continue;
}
found = method;
final Iterator<MethodParameter> methodParametersIterator = methodParameters.iterator();
final Iterator<Type> parameterTypesIterator = parameterTypes.iterator();
while (parameterTypesIterator.hasNext()) {
final Type type = parameterTypesIterator.next();
final MethodParameter parameter = methodParametersIterator.next();
if (false == type.equals(parameter.getType())) {
found = null;
break;
}
}
if (null != found) {
break;
}
}
return found;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {\n Class<?> searchType = clazz;\n while (searchType != null) {\n Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods());\n for (Method method : methods) {\n if (name.equals(method.getName()) &&\n (paramTypes == null || Arrays.equals(paramTypes, method.getParameterTypes()))) {\n return method;\n }\n }\n searchType = searchType.getSuperclass();\n }\n return null;\n }",
"private Method findMethod(Class<?>[] ifaces, String name, Class<?>[] paramTypes, boolean[] primitiveparams)\n throws RemoteObjectWrapperException {\n // Convert the primitive method parameters as needed.\n // It sure is ugly; don't know of a better way to do it.\n for (int i = 0; i < paramTypes.length; i++) {\n if (primitiveparams[i]) {\n if (paramTypes[i].equals(Boolean.class)) {\n paramTypes[i] = Boolean.TYPE;\n } else if (paramTypes[i].equals(Character.class)) {\n paramTypes[i] = Character.TYPE;\n } else if (paramTypes[i].equals(Byte.class)) {\n paramTypes[i] = Byte.TYPE;\n } else if (paramTypes[i].equals(Short.class)) {\n paramTypes[i] = Short.TYPE;\n } else if (paramTypes[i].equals(Integer.class)) {\n paramTypes[i] = Integer.TYPE;\n } else if (paramTypes[i].equals(Long.class)) {\n paramTypes[i] = Long.TYPE;\n } else if (paramTypes[i].equals(Float.class)) {\n paramTypes[i] = Float.TYPE;\n } else if (paramTypes[i].equals(Double.class)) {\n paramTypes[i] = Double.TYPE;\n } else {\n throw new RemoteObjectWrapperException(\"Unrecognized primitive parameter type: \" + paramTypes[i]);\n }\n }\n }\n\n // Iterate over the given interfaces and find the method\n for (int i = 0; i < ifaces.length; i++) {\n try {\n return ifaces[i].getMethod(name, paramTypes);\n } catch (NoSuchMethodException e) {\n }\n }\n // Method not found\n throw new RemoteObjectWrapperException(\"Unable to find method \" + name);\n }",
"public AMethod lookupMethod(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types)\n\t\tthrows Jml2bException {\n\t\t// Java Language Specification, pp 108: \n\t\t// 1. Find all the methods that could possibly apply to the\n\t\t// invocation, namely all the overloaded methods that have the\n\t\t// correct name, and whose parameters are of types that can be\n\t\t// assigned to the values of all the arguments. If one method\n\t\t// match exactly for all arguments, you invoke that method\n\t\t// 2. If any method in the set has parameters types that are all \n\t\t// assignable to any other method in the set, the other method \n\t\t// is removed from the set since it is less specific. Repeat\n\t\t// until no elimination can be made.\n\t\t// 3. If you are left with one method, that method is the most \n\t\t// specific and will be the one invoked. If you have more than\n\t\t// one method left, then the call is ambiguous, there being no \n\t\t// most specific method, and the invoking code is invalid.\n\n\t\tAMethod result;\n\n\t\tif (isInterface()) {\n\t\t\t// search in current interface and super interfaces\n\t\t\tresult = lookupMethodInterface(config, mth_name, param_types, null);\n\n\t\t\t// if we don't have an exact match, look for a better match in java.lang.Object\n\t\t\tif (result == null\n\t\t\t\t|| !result.getParams().hasSameTypes(param_types)) {\n\t\t\t\t// searh in the super class (which should be object)\n\t\t\t\tAClass object = config.getObject().getRefType();\n\t\t\t\tresult =\n\t\t\t\t\tobject.lookupMethodCurrentClass(\n\t\t\t\t\t\tconfig,\n\t\t\t\t\t\tmth_name,\n\t\t\t\t\t\tparam_types,\n\t\t\t\t\t\tresult);\n\t\t\t}\n\t\t} else {\n\t\t\t// search in class and super classes\n\t\t\tresult = lookupMethodClass(config, mth_name, param_types, null);\n\t\t}\n\n\t\treturn result;\n\t}",
"public Method getMethodByParameters(String name, Class<?>... args) {\r\n \t\t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"public static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String methodName, int parameterCount) {\n\ttry {\n\t\t/* Since this method attempts to find a method by getting all methods from the class,\n\tthis method should only be called if getMethod cannot find the method. */\n\t\tjava.lang.reflect.Method methods[] = aClass.getMethods();\n\t\tfor (int index = 0; index < methods.length; index++){\n\t\t\tjava.lang.reflect.Method method = methods[index];\n\t\t\tif ((method.getParameterTypes().length == parameterCount) && (method.getName().equals(methodName))) {\n\t\t\t\treturn method;\n\t\t\t}\n\t\t}\n\t} catch (java.lang.Throwable exception) {\n\t\treturn null;\n\t}\n\treturn null;\n}",
"private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public AMethod lookupMethodInterface(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\treturn candidate;\n\t}",
"public Method getMethodByParameters(String name, Class<?> returnType, Class<?>[] args) {\r\n \t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (method.getReturnType().equals(returnType) && Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"public Method findMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tChecker.notNull(\"parameter:methodName\", methodName);\r\n\t\tChecker.notNull(\"parameter:parameterTypes\", parameterTypes);\r\n\r\n\t\tfinal MostDerivedMethodFinder finder = new MostDerivedMethodFinder();\r\n\t\tfinder.setMethodName(methodName);\r\n\t\tfinder.setParameterTypes(parameterTypes);\r\n\t\tfinder.start(this);\r\n\t\treturn finder.getFound();\r\n\t}",
"public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }",
"public static MethodInvoker findMatchingMethod(Class<?> type, String methodName, Object... values) throws NoSuchMethodException, IllegalStateException\n {\n List<Method> methodList = new ArrayList<>(20);\n Class<?> currentType = type;\n while ((currentType != null) && ! currentType.equals(Object.class))\n {\n for (Method method : currentType.getDeclaredMethods())\n {\n if (method.getName().equals(methodName) && (method.getParameterCount() == values.length))\n {\n methodList.add(method);\n }\n }\n currentType = currentType.getSuperclass();\n }\n return findMatchingExecutable(methodList.toArray(new Method[methodList.size()]), values);\n }",
"public AMethod lookupMethodClass(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in super classes for better methods\n\t\tif (!isObject()) {\n\t\t\tAClass super_class = getSuperClass();\n\n\t\t\treturn super_class.lookupMethodClass(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\t} else {\n\t\t\treturn candidate;\n\t\t}\n\t}",
"private AMethod lookupMethodImplementedInterfaces(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tType t = (Type) e.nextElement();\n\t\t\tAClass cl = t.getRefType();\n\t\t\tcandidate =\n\t\t\t\tcl.lookupMethodInterface(\n\t\t\t\t\tconfig,\n\t\t\t\t\tmth_name,\n\t\t\t\t\tparam_types,\n\t\t\t\t\tcandidate);\n\t\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t}\n\n\t\treturn candidate;\n\t}",
"public static Method findMethod(Class<?> clazz, String name) {\n return findMethod(clazz, name, new Class<?>[0]);\n }",
"Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }",
"private Method getDeclaredMethodFor(Class<?> clazz, String name, Class<?>... parameterTypes) {\n try {\n return clazz.getDeclaredMethod(name, parameterTypes);\n } catch (NoSuchMethodException e) {\n Class<?> superClass = clazz.getSuperclass();\n if (superClass != null) {\n return getDeclaredMethodFor(superClass, name, parameterTypes);\n }\n }\n return null;\n }",
"private boolean findMethod(String name, MethodDescriptor[] methodDescriptors) {\n for (int i = 0; i < methodDescriptors.length; i++) {\n if (methodDescriptors[i].getName().equals(name)) {\n return true;\n }\n }\n return false;\n }",
"private FamixMethod findInvokedMethodOnName(String fromClass, String fromMethod, String invokedClassName, String invokedMethodName) {\n \tFamixMethod result = null;\n\t\t/* Test Helper\n\t\tif (fromClass.equals(\"domain.direct.violating.AccessLocalVariable_SetArgumentValue\")){\n\t\t\tboolean breakpoint = true;\n\t\t} */\n\n \t// 1) If methodNameAsInInvocation matches with a method unique name, return that method. \n \tString searchKey = invokedClassName + \".\" + invokedMethodName;\n \tif (theModel.behaviouralEntities.containsKey(searchKey)) {\n \t\treturn (FamixMethod) theModel.behaviouralEntities.get(searchKey);\n \t}\n \t// 2) Find out if there are more methods with the same name of the invoked class. If only one method is found, then return this method. \n \tString methodName = invokedMethodName.substring(0, invokedMethodName.indexOf(\"(\")); // Methodname without signature\n \t searchKey = invokedClassName + \".\" + methodName;\n \tif (sequencesPerMethod.containsKey(searchKey)){\n \t\tArrayList<FamixMethod> methodsList = sequencesPerMethod.get(searchKey);\n \t\tif (methodsList.size() == 0) {\n \t\t\treturn result;\n \t\t} else if (methodsList.size() == 1) {\n \t\t\t// FamixMethod result1 = methodsList.get(0);\n \t\t\treturn methodsList.get(0);\n \t\t} else { // 3) if there are more methods with the same name, then compare the invocation arguments with the method parameters.\n \t\t\tString invocationSignature = invokedMethodName.substring(invokedMethodName.indexOf(\"(\"));;\n \t\t\tString contentsInvocationSignature = invocationSignature.substring(invocationSignature.indexOf(\"(\") + 1, invocationSignature.indexOf(\")\")); \n \t\t\tString[] invocationArguments = contentsInvocationSignature.split(\",\");\n \t\t\tint numberOfArguments = invocationArguments.length;\n \t\t\t// 3a) If there is only one method with the same number of parameters as invocationArguments, then return this method\n \t\t\tList<FamixMethod> matchingMethods1 = new ArrayList<FamixMethod>();\n\t \t\tfor (FamixMethod method : methodsList){\n\t \t\t\tif ((method.signature != null) && (!method.signature.equals(\"\"))) {\n\t\t \t\t\tString contentsmethodParameter = method.signature.substring(method.signature.indexOf(\"(\") + 1, method.signature.indexOf(\")\")); \n\t\t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n\t\t \t\t\tif (methodParameters.length == numberOfArguments) {\n\t\t \t\t\t\tmatchingMethods1.add(method);\n\t\t \t\t\t}\n\t \t\t\t}\n\t \t\t} \n\t \t\tif (matchingMethods1.size() == 0)\n\t \t\t\treturn result;\n\t \t\tif (matchingMethods1.size() == 1)\n\t \t\t\treturn matchingMethods1.get(0);\n \t\t\t\n \t\t\t// 3b) If there is only one method where the first parameter type == the first argument type, then return this method \n \t\t\tList<FamixMethod> matchingMethods2 = new ArrayList<FamixMethod>();\n \t\t\tif (numberOfArguments >= 1) {\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[0] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[0]);\n \t \t\tfor (FamixMethod matchingMethod1 : matchingMethods1){\n \t \t\t\tString contentsmethodParameter = matchingMethod1.signature.substring(matchingMethod1.signature.indexOf(\"(\") + 1, matchingMethod1.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 1) {\n \t \t\t\tmethodParameters[0] = getfullPathOfDeclaredType(fromClass, methodParameters[0]);\n \t \t\t\t\tif (methodParameters[0].equals(invocationArguments[0])) {\n \t \t\t\t\t\tmatchingMethods2.add(matchingMethod1);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods2.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods2.size() == 1)\n \t \t\t\treturn matchingMethods2.get(0);\n \t\t\t}\n \t\t\t// If there is only one method where the second parameter type == the first argument type, then return this method \n \t\t\tif (numberOfArguments >= 2) {\n \t\t\t\tmatchingMethods1.clear();\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[1] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[1]);\n \t \t\tfor (FamixMethod matchingMethod2 : matchingMethods2){\n \t \t\t\tString contentsmethodParameter = matchingMethod2.signature.substring(matchingMethod2.signature.indexOf(\"(\") + 1, matchingMethod2.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 2) {\n \t \t\t\tmethodParameters[1] = getfullPathOfDeclaredType(fromClass, methodParameters[1]);\n \t \t\t\t\tif (methodParameters[1].equals(invocationArguments[1])) {\n \t \t\t\t\t\tmatchingMethods1.add(matchingMethod2);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods1.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods1.size() == 1)\n \t \t\t\treturn matchingMethods1.get(0);\n \t\t\t}\n \t\t}\n\t\t}\n \treturn result; \n }",
"public String getMethodName(Class<?> type, String methodName, Class<?>... params);",
"public static Method method(Object receiver, String method, Object[] args) {\n for (Class<?> c : types(receiver)) {\n Method candidate = findMatchingMethod(c, method, args);\n if (candidate != null) {\n return candidate;\n }\n }\n if (receiver instanceof GString) { // cf. GString.invokeMethod\n Method candidate = findMatchingMethod(String.class, method, args);\n if (candidate != null) {\n return candidate;\n }\n }\n return null;\n }",
"public static Method getMethod(Class<?> paramClass, String paramString, Class<?>[] paramArrayOfClass) throws NoSuchMethodException {\n/* 90 */ ReflectUtil.checkPackageAccess(paramClass);\n/* 91 */ return paramClass.getMethod(paramString, paramArrayOfClass);\n/* */ }",
"public interface MethodCandidate extends Ordered {\n\n /**\n * The default position.\n */\n int DEFAULT_POSITION = 0;\n\n /**\n * Whether the given method name matches this finder.\n *\n * @param methodElement The method element. Never null.\n * @param matchContext The match context. Never null.\n * @return true if it does\n */\n boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext);\n\n @Override\n default int getOrder() {\n return DEFAULT_POSITION;\n }\n\n /**\n * Builds the method info. The method {@link #isMethodMatch(MethodElement, MatchContext)} should be\n * invoked and checked prior to calling this method.\n *\n * @param matchContext The match context\n * @return The method info or null if it cannot be built. If the method info cannot be built an error will be reported to\n * the passed {@link MethodMatchContext}\n */\n @Nullable\n MethodMatchInfo buildMatchInfo(@NonNull MethodMatchContext matchContext);\n\n}",
"@Override\r\n\t\tprotected boolean visit(final Type type) {\r\n\t\t\tChecker.notNull(\"parameter:type\", type);\r\n\r\n\t\t\tfinal Method method = type.findMethod(this.getMethodName(), this.getParameterTypes());\r\n\t\t\tfinal boolean skipRemaining = method != null;\r\n\t\t\tif (skipRemaining) {\r\n\t\t\t\tthis.setFound(method);\r\n\t\t\t}\r\n\t\t\treturn skipRemaining;\r\n\t\t}",
"public BCMethod lookupMethod(String signature) throws ReadAttributeException, IllegalLoopException {\n\t\tBCMethod m = null;\n\t\t/*Util.dump(\"search for method \" + signature + \" in class \" + className );\n\t\tUtil.dumpMethods(this);*/\n\t\tm = (BCMethod) methods.get(signature);\n\t\tif (m != null) {\n\t\t\tm.initMethod();\n\t\t\treturn m;\n\t\t}\n\t/*\tUtil.dump(\"search for method \" + signature + \" in superclass \" + superClassName );\n*/\t\tBCClass superClass = getSuperClass();\n\t\tm = superClass.lookupMethod(signature);\n\t\tif (m != null) {\n\t\t\t\n\t\t\treturn m;\n\t\t}\n\t\tBCClass interfaze;\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tinterfaze = JavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tm = (BCMethod) interfaze.lookupMethod(signature);\n\t\t\tif (m != null) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\tm.initMethod();\n\t\treturn m;\n\t}",
"Object find(String name);",
"@Nullable\n\tpublic MethodNode searchMethodByShortName(String name) {\n\t\tfor (MethodNode m : methods) {\n\t\t\tif (m.getMethodInfo().getName().equals(name)) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public abstract T findByName(String name) ;",
"public MethodSignature getMatchingMethod(\n String methodName,\n SequenceType arguments,\n SequenceType typeArguments,\n List<ShadowException> errors) {\n boolean hasTypeArguments = typeArguments != null;\n MethodSignature candidate = null;\n\n for (MethodSignature signature : recursivelyGetMethodOverloads(methodName)) {\n MethodType methodType = signature.getMethodType();\n\n if (methodType.isParameterized()) {\n if (hasTypeArguments) {\n SequenceType parameters = methodType.getTypeParameters();\n try {\n if (parameters.canAccept(typeArguments, SubstitutionKind.TYPE_PARAMETER)) {\n signature = signature.replace(parameters, typeArguments);\n } else continue;\n } catch (InstantiationException ignored) {\n }\n }\n }\n\n // the list of method signatures starts with the closest (current class) and then adds parents\n // and outer classes\n // always stick with the current if you can\n // (only replace if signature is a subtype of candidate but candidate is not a subtype of\n // signature)\n if (signature.canAccept(arguments)) {\n if (candidate == null\n || (signature.getParameterTypes().isSubtype(candidate.getParameterTypes())\n && !candidate.getParameterTypes().isSubtype(signature.getParameterTypes())))\n candidate = signature;\n else if (!candidate.getParameterTypes().isSubtype(signature.getParameterTypes())) {\n ErrorReporter.addError(\n errors,\n Error.INVALID_ARGUMENTS,\n \"Ambiguous reference to \" + methodName + \" with arguments \" + arguments,\n arguments);\n return null;\n }\n }\n }\n\n if (candidate == null)\n ErrorReporter.addError(\n errors,\n Error.INVALID_METHOD,\n \"No definition of \" + methodName + \" with arguments \" + arguments + \" in this context\",\n arguments);\n\n return candidate;\n }",
"public Method getMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tfinal Method method = this.findMostDerivedMethod(methodName, parameterTypes);\r\n\t\tif (null == method) {\r\n\t\t\tthis.throwMethodNotFoundException(methodName, parameterTypes);\r\n\t\t}\r\n\t\treturn method;\r\n\t}",
"public DynamicMethod retrieveMethod(String name) {\n return getMethods().get(name);\n }",
"AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes);",
"public X10MethodInstance createMethodInstance(Type container, Name name, List<Type> typeArgs, List<Type> argTypes, Context context) {\n try {\n return xts.findMethod(container, xts.MethodMatcher(container, name, typeArgs, argTypes, context));\n } catch (SemanticException e) {\n throw new InternalCompilerError(\"Unable to find required method instance\", container.position(), e);\n }\n }",
"public tudresden.ocl20.core.jmi.ocl.commonmodel.Operation lookupOperation(java.lang.String name, List paramTypes) {\n Operation op;\n \n //UML-MOF-Common\n Iterator allOperationsIt = allOperations().iterator();\n while(allOperationsIt.hasNext()){\n op = (Operation) allOperationsIt.next(); \n if(name.equals(op.getNameA()) && op.hasMatchingSignature(paramTypes)){\n return op;\n } \n }\n\n return null;\n }",
"public static Optional<MethodInfo> findMethod(ClassPath path, ClassDescriptor clazz, MethodDescriptor descriptor) {\n return findMethod(path, clazz, mi -> mi.getDescriptor().equals(descriptor));\n }",
"private ContractMethod findMatchedInstance(List arguments) {\n List<ContractMethod> matchedMethod = new ArrayList<>();\n\n if(this.getInputs().size() != arguments.size()) {\n for(ContractMethod method : this.getNextContractMethods()) {\n if(method.getInputs().size() == arguments.size()) {\n matchedMethod.add(method);\n }\n }\n } else {\n matchedMethod.add(this);\n }\n\n if(matchedMethod.size() == 0) {\n throw new IllegalArgumentException(\"Cannot find method with passed parameters.\");\n }\n\n if(matchedMethod.size() != 1) {\n LOGGER.warn(\"It found a two or more overloaded function that has same parameter counts. It may be abnormally executed. Please use *withSolidityWrapper().\");\n }\n\n return matchedMethod.get(0);\n }",
"MethodName getMethod();",
"public static SendMethod findByName(String name) {\n\t\tfor (SendMethod sendMethod : SendMethod.values()) {\n\t\t\tif (sendMethod.getName().equals(name)) {\n\t\t\t\treturn sendMethod;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public FindResult findClass(String className);",
"Method getMethod();",
"Method getMethod();",
"public static MethodType fromParameters(String name, Type... paramTypes) {\n MethodType type = new MethodType(name);\n type.paramTypes = Arrays.copyOf(paramTypes, paramTypes.length);\n return type;\n }",
"private static Method _getMethodForClass(Class targetClass, String methodName, String[] paramTypeNames)\n throws ClassNotFoundException, NoSuchMethodException\n {\n int numParams = (paramTypeNames != null ? paramTypeNames.length : 0);\n Class[] paramTypes = new Class[numParams];\n ClassLoader loader = targetClass.getClassLoader();\n for (int i = 0; i<numParams; i++)\n {\n\tString typeName = paramTypeNames[i];\n\tif (typeName.equals(\"int\"))\n\t paramTypes[i] = Integer.TYPE;\n\telse if (typeName.equals(\"double\"))\n\t paramTypes[i] = Double.TYPE;\n\telse if (typeName.equals(\"boolean\"))\n\t paramTypes[i] = Boolean.TYPE;\n\telse if (loader == null)\n\t paramTypes[i] = Class.forName(paramTypeNames[i]);\n\telse\n\t paramTypes[i] = loader.loadClass(paramTypeNames[i]);\n }\n Method method = targetClass.getMethod(methodName, paramTypes);\n return method;\n }",
"ClassMember search (ClassMember method) {\r\n ClassMember m = (ClassMember) by_name_table.get (method.type.toString ());\r\n\r\n if (m == null) return null;\r\n\r\n if (!((MethodType) m.type).return_type.isSame (((MethodType) method.type).return_type)) {\r\n /* overriding methods must be exactly same */\r\n OzcError.illegalOverride (method);\r\n return null;\r\n } \r\n\r\n if ((m.isPublic () && !method.isPublic ()) ||\r\n\t(m.isProtected () && method.isPrivate ())) {\r\n /* overriding methods must be more publicity */\r\n OzcError.illegalOverridePublicity (method);\r\n return null;\r\n }\r\n\r\n return m;\r\n }",
"ClassMember search (String name, MethodType type, int access,\r\n\t\t int modifier_mask) {\r\n IdentifierList methods = (IdentifierList) get (name);\r\n\r\n if (methods == null) return null;\r\n\r\n java.util.Enumeration ms = methods.elements ();\r\n\r\n ClassMember more_specific = null;\r\n while (ms.hasMoreElements ()) {\r\n ClassMember m = (ClassMember) ms.nextElement ();\r\n\r\n int diff;\r\n try {\r\n\tdiff = m.type.compare (type);\r\n } catch (TypeMismatch e) {\r\n\tcontinue;\r\n }\r\n\r\n if (diff < 0) continue;\r\n\r\n int m_access = m.getAccess ();\r\n\r\n if (access == Constants.PROTECTED) {\r\n\tif (m_access == Constants.PRIVATE) continue;\r\n } else if (access == Constants.PUBLIC) {\r\n\tif (m_access != Constants.PUBLIC) continue;\r\n }\r\n\t \r\n if (modifier_mask > 0 &&\r\n\t ((m.getModifier () & modifier_mask) == 0)) continue;\r\n\r\n if (diff == 0) return m;\r\n\r\n if (more_specific == null) {\r\n\tmore_specific = m;\r\n\tcontinue;\r\n }\r\n\r\n try {\r\n\tif (((MethodType) m.type).isMoreSpecific ((MethodType) more_specific.type))\r\n\t more_specific = m;\r\n } catch (OverloadingAmbiguous ex) {\r\n\t/* this overloading is ambiguous */\r\n\tOzcError.overloadingAmbiguous (m);\r\n\treturn ClassMember.ANY;\r\n }\r\n }\r\n\r\n return more_specific;\r\n }",
"public Method getMethodByName(String nameRegex) {\r\n \t\t\r\n \t\tPattern match = Pattern.compile(nameRegex);\r\n \t\t\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (match.matcher(method.getName()).matches()) {\r\n \t\t\t\t// Right - this is probably it. \r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tthrow new RuntimeException(\"Unable to find a method with the pattern \" + \r\n \t\t\t\t\t\t\t\t\tnameRegex + \" in \" + source.getName());\r\n \t}",
"@SuppressWarnings(\"unchecked\")\n private static Optional<MethodInfo> findMethod(ClassPath path,\n ClassDescriptor clazz,\n BiPredicate<ClassNode, MethodNode> condition) {\n return find(path,\n path.findClass(clazz).get(),\n cn -> ((List<MethodNode>) cn.methods)\n .stream()\n .filter(mn -> condition.test(cn, mn))\n .map(mn -> new MethodInfo(new ClassDescriptor(cn.name),\n MethodDescriptor.create(mn.name, mn.desc)))\n .findFirst());\n }",
"Type getMethodParameterType() throws IllegalArgumentException;",
"@Nullable\n private static MethodInvoker getSimpleMethod(Class<?> clazz, @Nullable String methodName, @Nullable Class<?> returnType, boolean throwException,\n Class<?>... params)\n {\n for (Method method : clazz.getDeclaredMethods())\n {\n if (((params.length == 0) || Arrays.equals(method.getParameterTypes(), params)) && ((methodName == null) || method.getName().equals(methodName)) &&\n ((returnType == null) || method.getReturnType().equals(returnType)))\n {\n getAccess(method);\n return new MethodInvoker(method);\n }\n }\n // Search in every superclass\n if (clazz.getSuperclass() != null)\n {\n return getMethod(clazz.getSuperclass(), methodName, throwException, params);\n }\n if (throwException)\n {\n throw new IllegalStateException(String.format(\"Unable to find method %s (%s).\", methodName, Arrays.asList(params)));\n }\n return null;\n }",
"public static ReflectionResponse<Method> getDeclaredMethod(Class<?> clazz, String name, Class<?>... params) {\n return getDeclaredMethod(clazz, name, false, params);\n }",
"public static MethodHandle findVirtual(MethodHandles.Lookup lookup, String name, Class type,\n Class clazz, MethodType mt)\n throws NoSuchMethodException, IllegalAccessException\n {\n return lookup.findVirtual(clazz, name, mt);\n }",
"public static Method getMethod(final Class<?> clazz, final String method, final Class<?>... parameters) {\n try {\n return clazz.getDeclaredMethod(method, parameters);\n } catch (NoSuchMethodException e) {\n fail(\"Method [\" + method + \"] with parameters [\" + parameters + \"] not found on class [\" + clazz.getName() + \"]\");\n } catch (NullPointerException e) {\n fail(\"Invalid parameters given for method extraction, using method [\" + method + \"], parameters [\" + parameters + \"] and class [\" + clazz + \"]\");\n }\n return null;\n }",
"static Method getMethod(final Class < ? extends SimpleScriptable> clazz, final String name) {\n if (name == null) {\n return null;\n }\n for (final Method method : clazz.getMethods()) {\n if (method.getName().equals(name)) {\n return method;\n }\n }\n return null;\n }",
"public Method getMethod();",
"public Function getMethod(int signature)\r\n\t{\r\n\t\t// search own methods:\r\n\t\tfor (Function fn : methods)\r\n\t\t{\r\n\t\t\tif (fn.signature == signature)\r\n\t\t\t\treturn fn;\r\n\t\t}\r\n\t\t// if we have a base class, let it search for methods, or return null\r\n\t\tif (baseClass != null)\r\n\t\t\treturn baseClass.getMethod(signature);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"Methodsig getMethod();",
"public Method mo27144b(String str, Class<?>... clsArr) throws NoSuchMethodException {\n try {\n return this.f17268a.getMethod(str, clsArr);\n } catch (NoSuchMethodException e) {\n for (Class<?> cls = this.f17268a; cls != null; cls = cls.getSuperclass()) {\n try {\n return cls.getDeclaredMethod(str, clsArr);\n } catch (NoSuchMethodException unused) {\n }\n }\n throw e;\n }\n }",
"private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"Method lookupMethod(Object targetObject, String methodName) {\n Method method = null;\n for (Method m : targetObject.getClass().getMethods()) {\n if (Modifier.isPublic(m.getModifiers()) && methodName.equals(m.getName())) {\n method = m;\n break;\n }\n }\n return method;\n }",
"<T> T resolve(String name, Class<T> type);",
"private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }",
"@Nullable\n public static MethodInvoker getTypedMethod(Class<?> clazz, @Nullable String methodName, @Nullable Class<?> returnType, boolean throwException,\n Class<?>... params)\n {\n for (Method method : clazz.getDeclaredMethods())\n {\n if (((methodName == null) || method.getName().equals(methodName)) && ((returnType == null) || method.getReturnType().equals(returnType)) &&\n Arrays.equals(method.getParameterTypes(), params))\n {\n getAccess(method);\n return new MethodInvoker(method);\n }\n }\n // Search in every superclass\n if (clazz.getSuperclass() != null)\n {\n return getMethod(clazz.getSuperclass(), methodName, throwException, params);\n }\n if (throwException)\n {\n throw new IllegalStateException(String.format(\"Unable to find method %s (%s).\", methodName, Arrays.asList(params)));\n }\n return null;\n }",
"private static Method getMethod(\n String name, List<Pair<OvsDbConverter.Entry, Object>> args)\n throws NoSuchMethodException {\n Class<?>[] types = new Class<?>[args.size()];\n for (int index = 0; index < args.size(); index++) {\n types[index] = args.get(index).first.type;\n }\n return ConfigurationService.class.getDeclaredMethod(name, types);\n }",
"private void\r\n findMemberType(@Nullable String name, Collection<IClass> result) throws CompileException {\n IClass[] memberTypes = this.getDeclaredIClasses();\r\n if (name == null) {\r\n result.addAll(Arrays.asList(memberTypes));\r\n } else {\r\n String memberDescriptor = Descriptor.fromClassName(\r\n Descriptor.toClassName(this.getDescriptor())\r\n + '$'\r\n + name\r\n );\r\n for (final IClass mt : memberTypes) {\r\n if (mt.getDescriptor().equals(memberDescriptor)) {\r\n result.add(mt);\r\n return;\r\n }\r\n }\r\n }\r\n\r\n // Examine superclass.\r\n {\r\n IClass superclass = this.getSuperclass();\r\n if (superclass != null) superclass.findMemberType(name, result);\r\n }\r\n\r\n // Examine interfaces.\r\n for (IClass i : this.getInterfaces()) i.findMemberType(name, result);\r\n\r\n // Examine enclosing type declarations.\r\n {\r\n IClass declaringIClass = this.getDeclaringIClass();\r\n IClass outerIClass = this.getOuterIClass();\r\n if (declaringIClass != null) {\r\n declaringIClass.findMemberType(name, result);\r\n }\r\n if (outerIClass != null && outerIClass != declaringIClass) {\r\n outerIClass.findMemberType(name, result);\r\n }\r\n }\r\n }",
"public Method get_MethodByName(String methodname) {\n\t\tfor (Method m : arrayMethods) {\n\t\t\tif (m.getName_method().equals(methodname))\n\t\t\t\treturn m;\n\t\t}\n\n\t\treturn null;\n\t}",
"public static Object invokeMethod(Object receiver, String name, Object... args) {\n try {\n Class<?> clazz = receiver.getClass();\n /*Class<?>[] parameterTypes = new Class<?>[args.length];\n for (int i=0; i<args.length; i++) {\n parameterTypes[i] = args[i].getClass();\n }*/\n \n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n if (method.getName().equals(name)) {\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (parameterTypes.length == args.length) {\n int matched = 0;\n for (; matched<parameterTypes.length; matched++) {\n if (!isAcceptableParameter(parameterTypes[matched], args[matched])) {\n break;\n }\n }\n if (matched == parameterTypes.length) {\n method.setAccessible(true);\n return method.invoke(receiver, args);\n }\n }\n }\n }\n\n /*Method method = clazz.getDeclaredMethod(name, parameterTypes);\n if (method != null) {\n method.setAccessible(true);\n return method.invoke(receiver, args);\n }*/\n } catch (Exception e) {\n Logger.w(\"Reflection\", \"invokeMethod \" + name + \" \" + e.toString());\n }\n return null;\n }",
"String getMethod();",
"String getMethod();",
"private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }",
"Method getRiggerMethod(String methodName, Class<?>... params) throws Exception {\r\n Rigger rigger = getRiggerInstance();\r\n Class<? extends Rigger> clazz = rigger.getClass();\r\n Method method = clazz.getDeclaredMethod(methodName, params);\r\n method.setAccessible(true);\r\n return method;\r\n }",
"@Override\n public boolean evaluate(@Nonnull MethodInformation methodInformation) {\n boolean matches = namePattern.matcher(methodInformation.getName()).matches();\n final @Nonnull @NonNullableElements List<? extends VariableElement> methodParameters = methodInformation.getElement().getParameters();\n if (parameters.length == methodParameters.size()) {\n for (int i = 0; i < methodParameters.size(); i++) {\n final @Nonnull String nameOfDeclaredType = ProcessingUtility.getQualifiedName(methodParameters.get(i).asType());\n ProcessingLog.debugging(\"name of type: $\", nameOfDeclaredType);\n final @Nonnull String parameter = parameters[i];\n if (!parameter.equals(\"?\")) {\n matches = matches && nameOfDeclaredType.equals(parameter);\n }\n }\n } else {\n matches = false;\n }\n return matches;\n }",
"Method addMethod(PositionString name, Symbol resultType, Iterator<Variable> parameters,\n\t\t\tModifier modifier) throws\n\t\t\tDuplicateIdentifierException, ShadowedIdentifierException, WrongModifierException, InvalidIdentifierException;",
"public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }",
"public static MethodInvoker getTypedMethod(Class<?> clazz, @Nullable String methodName, @Nullable Class<?> returnType, Class<?>... params)\n {\n for (Method method : clazz.getDeclaredMethods())\n {\n if (((methodName == null) || method.getName().equals(methodName)) && ((returnType == null) || method.getReturnType().equals(returnType)) &&\n Arrays.equals(method.getParameterTypes(), params))\n {\n getAccess(method);\n return new MethodInvoker(method);\n }\n }\n // Search in every superclass\n if (clazz.getSuperclass() != null)\n {\n return getMethod(clazz.getSuperclass(), methodName, params);\n }\n throw new IllegalStateException(String.format(\"Unable to find method %s (%s).\", methodName, Arrays.asList(params)));\n }",
"public static Optional<Method> find(MethodSpec methodSpec, Class<?> clazz, boolean analiseSuper) {\n return Option.orElseAnd(\n find(methodSpec, clazz.getDeclaredMethods()),\n /* not present and */ analiseSuper,\n /* then */ find(methodSpec, clazz.getMethods()));\n }",
"private static Set<SootMethod> searchDownForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\t//1.判断sm中是否含有intent的定义信息,若有,则返回\n\t\tif(containsInitMethod(sm, type)){\n\t\t\tmethods.add(sm);\n\t\t}\n\t\telse{\n\t\t\tList<SootMethod> targets = InterMethodAnalysis.getTargetsMethods(sm);\t\n\t\t\tfor(SootMethod tgt:targets){\n\t\t\t\tif(tgt.equals(sm))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(tgt.getReturnType().toString().contains(type)){\n\t\t\t\t\tif(tgt.isAbstract()){\n\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(tgt)){\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(tgt, type);\n\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"public abstract ServiceLocator find(String name);",
"public List<MethodInfo> getMethod(String methodName) {\n List<MethodInfo> matchedMethodInfo = new ArrayList<MethodInfo>();\n for (MethodInfo method : this.lstMethodInfo) {\n if (methodName.equals(method.getName())) {\n matchedMethodInfo.add(method);\n }\n }\n \n return matchedMethodInfo;\n }",
"public static native short getRemoteMethodInfo(short objID, short methodID);",
"boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext);",
"HxMethod createMethod(final String returnType,\n final String methodName,\n final String... parameterTypes);",
"public T find (T target);",
"public static Optional<MethodInfo> findMethod(ClassPath path,\n ClassDescriptor clazz,\n Predicate<MethodInfo> condition) {\n return findMethod(path, clazz,\n (cn, mn) -> condition.test(new MethodInfo(new ClassDescriptor(cn.name),\n MethodDescriptor.create(mn.name, mn.desc))));\n }",
"public List<T> findByParameter(Field... methods) {\n\t\treturn null;\n\t}",
"Method createMethod();",
"Method createMethod();",
"public Method findMatchingGetMethod(Object bean, String propertyName) {\n\t\tfor (Method method : bean.getClass().getMethods()) {\n\t\t\t// find all the set methods\n\t\t\tif (method.getName().startsWith(\"get\") && method.getName().length() > \"get\".length()) {\n\t\t\t\tString methodName = method.getName().substring(\"get\".length());\n\t\t\t\tmethodName = methodName.replace(methodName.substring(0,1), methodName.substring(0,1).toLowerCase());\n\t\t\t\tif (methodNameMatches(methodName, propertyName)) {\n\t\t\t\t\tif (method.getReturnType() == null) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Unable to find matching getter method for [\" + propertyName + \"] in bean [\" + bean.getClass().getCanonicalName() + \"]. Found [\" + method.getName() + \"] but this does not have a return type.\");\n\t\t\t\t\t}\n\t\t\t\t\treturn method;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Unable to find matching getter method for [\" + propertyName + \"] in bean [\" + bean.getClass().getCanonicalName() + \"]\");\n\t}",
"@Test\n public void fromMethodResolverAndType() {\n\n MethodResolver methodResolver = MethodResolver.fromType(Person.class);\n\n assertThat(methodResolver).isNotNull();\n assertThat(methodResolver.getReferenceType()).isEqualTo(Person.class);\n }",
"private final java.lang.reflect.Method tryGetMethod(java.lang.Class<?> r7, java.lang.String r8, java.lang.Class<?>[] r9, java.lang.Class<?> r10) {\n /*\n r6 = this;\n r0 = 0\n int r1 = r9.length // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Object[] r1 = java.util.Arrays.copyOf(r9, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class[] r1 = (java.lang.Class[]) r1 // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.reflect.Method r1 = r7.getDeclaredMethod(r8, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r2 = \"result\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class r2 = r1.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r2 == 0) goto L_0x001d\n r0 = r1\n goto L_0x005d\n L_0x001d:\n java.lang.reflect.Method[] r7 = r7.getDeclaredMethods() // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r1 = \"declaredMethods\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r7, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n int r1 = r7.length // Catch:{ NoSuchMethodException -> 0x005d }\n r2 = 0\n r3 = 0\n L_0x0029:\n if (r3 >= r1) goto L_0x005d\n r4 = r7[r3] // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = \"method\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = r4.getName() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r8) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class r5 = r4.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class[] r5 = r4.getParameterTypes() // Catch:{ NoSuchMethodException -> 0x005d }\n kotlin.jvm.internal.Intrinsics.checkNotNull(r5) // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = java.util.Arrays.equals(r5, r9) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n r5 = 1\n goto L_0x0056\n L_0x0055:\n r5 = 0\n L_0x0056:\n if (r5 == 0) goto L_0x005a\n r0 = r4\n goto L_0x005d\n L_0x005a:\n int r3 = r3 + 1\n goto L_0x0029\n L_0x005d:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.KDeclarationContainerImpl.tryGetMethod(java.lang.Class, java.lang.String, java.lang.Class[], java.lang.Class):java.lang.reflect.Method\");\n }",
"private void findConstantParameter(List<Method> methods, InstructionContext invokeCtx)\n\t{\n\t\tcheckMethodsAreConsistent(methods);\n\n\t\tMethod method = methods.get(0); // all methods must have the same signature etc\n\t\tint offset = method.isStatic() ? 0 : 1;\n\n\t\tList<StackContext> pops = invokeCtx.getPops();\n\n\t\t// object is popped first, then param 1, 2, 3, etc. double and long take two slots.\n\t\tfor (int lvtOffset = offset, parameterIndex = 0;\n\t\t\tparameterIndex < method.getDescriptor().size();\n\t\t\tlvtOffset += method.getDescriptor().getTypeOfArg(parameterIndex++).getSize())\n\t\t{\n\t\t\t// get(0) == first thing popped which is the last parameter,\n\t\t\t// get(descriptor.size() - 1) == first parameter\n\t\t\tStackContext ctx = pops.get(method.getDescriptor().size() - 1 - parameterIndex);\n\n\t\t\tConstantMethodParameter cmp = getCMPFor(methods, parameterIndex, lvtOffset);\n\n\t\t\tif (cmp.invalid)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (ctx.getPushed().getInstruction() instanceof PushConstantInstruction)\n\t\t\t{\n\t\t\t\tPushConstantInstruction pc = (PushConstantInstruction) ctx.getPushed().getInstruction();\n\n\t\t\t\tif (!(pc.getConstant() instanceof Number))\n\t\t\t\t{\n\t\t\t\t\tcmp.invalid = true;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tNumber number = (Number) pc.getConstant();\n\n\t\t\t\tif (!cmp.values.contains(number))\n\t\t\t\t{\n\t\t\t\t\tcmp.values.add((Number) pc.getConstant());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcmp.invalid = true;\n\t\t\t}\n\t\t}\n\t}",
"public final Method mo19982a(Class<?> cls, String str, Class<?>... clsArr) {\n C12932j.m33818b(cls, \"target\");\n C12932j.m33818b(str, \"name\");\n C12932j.m33818b(clsArr, \"parameterTypes\");\n Method declaredMethod = cls.getDeclaredMethod(str, (Class[]) Arrays.copyOf(clsArr, clsArr.length));\n C12932j.m33815a((Object) declaredMethod, \"target.getDeclaredMethod(name, *parameterTypes)\");\n return declaredMethod;\n }",
"public Method(String name, Type returnType, Type[] argumentTypes) {\n/* 98 */ this(name, Type.getMethodDescriptor(returnType, argumentTypes));\n/* */ }",
"@Test\n\tpublic void testClassHasReplaceLessThanMethod() {\n\t\t// EDIT THESE TO MATCH YOUR METHOD\n\t\tmethodName = \"replaceLessThan\";\n\t\targTypes = \"\";\n\t\treturnType = \"void\";\n\t\t// END EDIT\n\t\t// class exists\n\t\ttry {\n\t\t\tPackage pkg = getClass().getPackage();\n\t\t\tString path = pkg == null ? \"\" : pkg.getName() + \".\";\n\t\t\tcls = Class.forName(path + className);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\tfail(\"File \\\"\" + className + \".class\\\" doesn't have a \\\"\" + className\n\t\t\t\t\t+ \"\\\" class. (is the class name spelled right?)\");\n\t\t}\n\n\t\t// class has method\n\t\ttry {\n\t\t\t// EDIT HERE TO GIVE PARAMETER TYPES\n\t\t\tmethod = cls.getMethod(methodName, int[].class, int.class);\n\t\t\t// END EDIT\n\t\t} catch (NoSuchMethodException | SecurityException e) {\n\t\t\tfail(\"Class \\\"\" + className + \"\\\" doesn't have a \\\"\" + methodName + \"(\" + argTypes\n\t\t\t\t\t+ \")\\\" method. (is the method name spelled right? are its parameters correct?)\");\n\t\t}\n\t\tinvokation = className + \".\" + methodName + \"(\" + argTypes + \")\";\n\t}",
"public static @Nonnull MethodSignatureMatcher of(@Nonnull String nameRegex, @Nullable @NonNullableElements Class<?>... parameters) {\n final @Nonnull String[] typeNames;\n if (parameters == null) {\n typeNames = new String[0];\n } else {\n typeNames = new String[parameters.length];\n int i = 0;\n for (@Nonnull Class<?> parameter : parameters) {\n typeNames[i] = parameter.getCanonicalName();\n i++;\n }\n }\n return new MethodSignatureMatcher(nameRegex, typeNames);\n }",
"public Field findField(final String name) {\r\n\t\tGeneratorHelper.checkJavaFieldName(\"parameter:name\", name);\r\n\r\n\t\tField found = null;\r\n\r\n\t\tfinal Iterator<Field> iterator = this.getFields().iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tfinal Field field = iterator.next();\r\n\t\t\tif (field.getName().equals(name)) {\r\n\t\t\t\tfound = field;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}",
"private static ElementMatcher.Junction getMethodMatcher(TypeDescription typeDescription) {\n ElementMatcher.Junction methodMatcher1 = isDeclaredBy(typeDescription).and(namedIgnoreCase(\"doList\")).and(takesArguments(1));\n\n // private List<Invoker<T>> route(List<Invoker<T>> invokers, String method)\n ElementMatcher.Junction methodMatcher2 = isDeclaredBy(typeDescription).and(namedIgnoreCase(\"route\")).and(takesArguments(2));\n return methodMatcher1.or(methodMatcher2);\n }",
"public interface ParameterNameDiscoverer {\n\n\t/**\n\t * Return parameter names for a method, or {@code null} if they cannot be determined.\n\t * <p>Individual entries in the array may be {@code null} if parameter names are only\n\t * available for some parameters of the given method but not for others. However,\n\t * it is recommended to use stub parameter names instead wherever feasible.\n\t * @param method the method to find parameter names for\n\t * @return an array of parameter names if the names can be resolved,\n\t * or {@code null} if they cannot\n\t */\n\t@Nullable\n\tString[] getParameterNames(Method method);\n\n\t/**\n\t * Return parameter names for a constructor, or {@code null} if they cannot be determined.\n\t * <p>Individual entries in the array may be {@code null} if parameter names are only\n\t * available for some parameters of the given constructor but not for others. However,\n\t * it is recommended to use stub parameter names instead wherever feasible.\n\t * @param ctor the constructor to find parameter names for\n\t * @return an array of parameter names if the names can be resolved,\n\t * or {@code null} if they cannot\n\t */\n\t@Nullable\n\tString[] getParameterNames(Constructor<?> ctor);\n\n}",
"public void callMethod( String objectName, String methodName, Object[] parameters, Class[] parameterTypes )\n throws MraldException\n {\n try\n {\n Class mraldObject = ( Class )Class.forName( objectName ).newInstance();\n Method method = mraldObject.getMethod( methodName, parameterTypes );\n method.invoke( mraldObject, parameters );\n }\n catch ( ClassNotFoundException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( NoSuchMethodException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( IllegalAccessException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InstantiationException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InvocationTargetException e )\n {\n throw new MraldException(e, messageObject);\n }\n }",
"boolean match(String mnemonic, ParameterType[] parameters);",
"HxMethod createMethod(final HxType returnType,\n final String methodName,\n final HxType... parameterTypes);",
"public Method getMethod(String sName, String sSig)\n {\n return getMethod(sName + sSig.replace('.', '/'));\n }"
] | [
"0.7488955",
"0.733287",
"0.6920314",
"0.67965156",
"0.67204344",
"0.66847336",
"0.66022503",
"0.65139395",
"0.6445681",
"0.63884",
"0.6358073",
"0.6353512",
"0.62683505",
"0.6224519",
"0.6174587",
"0.61424065",
"0.61012655",
"0.60931146",
"0.6022082",
"0.6006627",
"0.59992135",
"0.59464437",
"0.5909503",
"0.5879218",
"0.5859787",
"0.583409",
"0.58143514",
"0.58136666",
"0.57944626",
"0.5771293",
"0.5770837",
"0.57608587",
"0.5725962",
"0.571834",
"0.56843257",
"0.5681708",
"0.5666895",
"0.5666884",
"0.56659406",
"0.56659406",
"0.5661386",
"0.5607445",
"0.55943227",
"0.5588183",
"0.5564195",
"0.5509856",
"0.5487106",
"0.5483581",
"0.5470772",
"0.54623127",
"0.54557365",
"0.54385734",
"0.5429624",
"0.53844",
"0.5371889",
"0.53663176",
"0.5361905",
"0.5356083",
"0.5342594",
"0.5339521",
"0.5334717",
"0.53272086",
"0.5324862",
"0.5319691",
"0.53111726",
"0.5309354",
"0.5309354",
"0.5299601",
"0.528486",
"0.52837133",
"0.52337456",
"0.5233498",
"0.52162105",
"0.52064145",
"0.5189682",
"0.5180269",
"0.51614195",
"0.5152427",
"0.5142888",
"0.5142859",
"0.5134378",
"0.5105637",
"0.50791955",
"0.50756687",
"0.50756687",
"0.507361",
"0.50708425",
"0.5052342",
"0.5051981",
"0.50334364",
"0.50286233",
"0.502172",
"0.5015453",
"0.5011575",
"0.50109875",
"0.4997897",
"0.49966455",
"0.49924856",
"0.4978977",
"0.4977608"
] | 0.7765673 | 0 |
Searches this type for the most derived method with a signature that matches the given parameters | public Method findMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {
Checker.notNull("parameter:methodName", methodName);
Checker.notNull("parameter:parameterTypes", parameterTypes);
final MostDerivedMethodFinder finder = new MostDerivedMethodFinder();
finder.setMethodName(methodName);
finder.setParameterTypes(parameterTypes);
finder.start(this);
return finder.getFound();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {\n Class<?> searchType = clazz;\n while (searchType != null) {\n Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods());\n for (Method method : methods) {\n if (name.equals(method.getName()) &&\n (paramTypes == null || Arrays.equals(paramTypes, method.getParameterTypes()))) {\n return method;\n }\n }\n searchType = searchType.getSuperclass();\n }\n return null;\n }",
"public Method getMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tfinal Method method = this.findMostDerivedMethod(methodName, parameterTypes);\r\n\t\tif (null == method) {\r\n\t\t\tthis.throwMethodNotFoundException(methodName, parameterTypes);\r\n\t\t}\r\n\t\treturn method;\r\n\t}",
"public static MethodInvoker findMatchingMethod(Class<?> type, String methodName, Object... values) throws NoSuchMethodException, IllegalStateException\n {\n List<Method> methodList = new ArrayList<>(20);\n Class<?> currentType = type;\n while ((currentType != null) && ! currentType.equals(Object.class))\n {\n for (Method method : currentType.getDeclaredMethods())\n {\n if (method.getName().equals(methodName) && (method.getParameterCount() == values.length))\n {\n methodList.add(method);\n }\n }\n currentType = currentType.getSuperclass();\n }\n return findMatchingExecutable(methodList.toArray(new Method[methodList.size()]), values);\n }",
"public Method findMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tGeneratorHelper.checkJavaMethodName(\"parameter:methodName\", methodName);\r\n\t\tChecker.notNull(\"parameter:parameterTypes\", parameterTypes);\r\n\r\n\t\tMethod found = null;\r\n\r\n\t\tfinal Iterator<Method> methods = this.getMethods().iterator();\r\n\r\n\t\twhile (methods.hasNext()) {\r\n\t\t\tfinal Method method = methods.next();\r\n\t\t\tif (false == method.getName().equals(methodName)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfinal List<MethodParameter> methodParameters = method.getParameters();\r\n\t\t\tif (methodParameters.size() != parameterTypes.size()) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfound = method;\r\n\r\n\t\t\tfinal Iterator<MethodParameter> methodParametersIterator = methodParameters.iterator();\r\n\t\t\tfinal Iterator<Type> parameterTypesIterator = parameterTypes.iterator();\r\n\r\n\t\t\twhile (parameterTypesIterator.hasNext()) {\r\n\t\t\t\tfinal Type type = parameterTypesIterator.next();\r\n\t\t\t\tfinal MethodParameter parameter = methodParametersIterator.next();\r\n\t\t\t\tif (false == type.equals(parameter.getType())) {\r\n\t\t\t\t\tfound = null;\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 (null != found) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}",
"public BCMethod lookupMethod(String signature) throws ReadAttributeException, IllegalLoopException {\n\t\tBCMethod m = null;\n\t\t/*Util.dump(\"search for method \" + signature + \" in class \" + className );\n\t\tUtil.dumpMethods(this);*/\n\t\tm = (BCMethod) methods.get(signature);\n\t\tif (m != null) {\n\t\t\tm.initMethod();\n\t\t\treturn m;\n\t\t}\n\t/*\tUtil.dump(\"search for method \" + signature + \" in superclass \" + superClassName );\n*/\t\tBCClass superClass = getSuperClass();\n\t\tm = superClass.lookupMethod(signature);\n\t\tif (m != null) {\n\t\t\t\n\t\t\treturn m;\n\t\t}\n\t\tBCClass interfaze;\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tinterfaze = JavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tm = (BCMethod) interfaze.lookupMethod(signature);\n\t\t\tif (m != null) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\tm.initMethod();\n\t\treturn m;\n\t}",
"private Method findMethod(Class<?>[] ifaces, String name, Class<?>[] paramTypes, boolean[] primitiveparams)\n throws RemoteObjectWrapperException {\n // Convert the primitive method parameters as needed.\n // It sure is ugly; don't know of a better way to do it.\n for (int i = 0; i < paramTypes.length; i++) {\n if (primitiveparams[i]) {\n if (paramTypes[i].equals(Boolean.class)) {\n paramTypes[i] = Boolean.TYPE;\n } else if (paramTypes[i].equals(Character.class)) {\n paramTypes[i] = Character.TYPE;\n } else if (paramTypes[i].equals(Byte.class)) {\n paramTypes[i] = Byte.TYPE;\n } else if (paramTypes[i].equals(Short.class)) {\n paramTypes[i] = Short.TYPE;\n } else if (paramTypes[i].equals(Integer.class)) {\n paramTypes[i] = Integer.TYPE;\n } else if (paramTypes[i].equals(Long.class)) {\n paramTypes[i] = Long.TYPE;\n } else if (paramTypes[i].equals(Float.class)) {\n paramTypes[i] = Float.TYPE;\n } else if (paramTypes[i].equals(Double.class)) {\n paramTypes[i] = Double.TYPE;\n } else {\n throw new RemoteObjectWrapperException(\"Unrecognized primitive parameter type: \" + paramTypes[i]);\n }\n }\n }\n\n // Iterate over the given interfaces and find the method\n for (int i = 0; i < ifaces.length; i++) {\n try {\n return ifaces[i].getMethod(name, paramTypes);\n } catch (NoSuchMethodException e) {\n }\n }\n // Method not found\n throw new RemoteObjectWrapperException(\"Unable to find method \" + name);\n }",
"public Function getMethod(int signature)\r\n\t{\r\n\t\t// search own methods:\r\n\t\tfor (Function fn : methods)\r\n\t\t{\r\n\t\t\tif (fn.signature == signature)\r\n\t\t\t\treturn fn;\r\n\t\t}\r\n\t\t// if we have a base class, let it search for methods, or return null\r\n\t\tif (baseClass != null)\r\n\t\t\treturn baseClass.getMethod(signature);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"public AMethod lookupMethod(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types)\n\t\tthrows Jml2bException {\n\t\t// Java Language Specification, pp 108: \n\t\t// 1. Find all the methods that could possibly apply to the\n\t\t// invocation, namely all the overloaded methods that have the\n\t\t// correct name, and whose parameters are of types that can be\n\t\t// assigned to the values of all the arguments. If one method\n\t\t// match exactly for all arguments, you invoke that method\n\t\t// 2. If any method in the set has parameters types that are all \n\t\t// assignable to any other method in the set, the other method \n\t\t// is removed from the set since it is less specific. Repeat\n\t\t// until no elimination can be made.\n\t\t// 3. If you are left with one method, that method is the most \n\t\t// specific and will be the one invoked. If you have more than\n\t\t// one method left, then the call is ambiguous, there being no \n\t\t// most specific method, and the invoking code is invalid.\n\n\t\tAMethod result;\n\n\t\tif (isInterface()) {\n\t\t\t// search in current interface and super interfaces\n\t\t\tresult = lookupMethodInterface(config, mth_name, param_types, null);\n\n\t\t\t// if we don't have an exact match, look for a better match in java.lang.Object\n\t\t\tif (result == null\n\t\t\t\t|| !result.getParams().hasSameTypes(param_types)) {\n\t\t\t\t// searh in the super class (which should be object)\n\t\t\t\tAClass object = config.getObject().getRefType();\n\t\t\t\tresult =\n\t\t\t\t\tobject.lookupMethodCurrentClass(\n\t\t\t\t\t\tconfig,\n\t\t\t\t\t\tmth_name,\n\t\t\t\t\t\tparam_types,\n\t\t\t\t\t\tresult);\n\t\t\t}\n\t\t} else {\n\t\t\t// search in class and super classes\n\t\t\tresult = lookupMethodClass(config, mth_name, param_types, null);\n\t\t}\n\n\t\treturn result;\n\t}",
"public MethodSignature getMatchingMethod(\n String methodName,\n SequenceType arguments,\n SequenceType typeArguments,\n List<ShadowException> errors) {\n boolean hasTypeArguments = typeArguments != null;\n MethodSignature candidate = null;\n\n for (MethodSignature signature : recursivelyGetMethodOverloads(methodName)) {\n MethodType methodType = signature.getMethodType();\n\n if (methodType.isParameterized()) {\n if (hasTypeArguments) {\n SequenceType parameters = methodType.getTypeParameters();\n try {\n if (parameters.canAccept(typeArguments, SubstitutionKind.TYPE_PARAMETER)) {\n signature = signature.replace(parameters, typeArguments);\n } else continue;\n } catch (InstantiationException ignored) {\n }\n }\n }\n\n // the list of method signatures starts with the closest (current class) and then adds parents\n // and outer classes\n // always stick with the current if you can\n // (only replace if signature is a subtype of candidate but candidate is not a subtype of\n // signature)\n if (signature.canAccept(arguments)) {\n if (candidate == null\n || (signature.getParameterTypes().isSubtype(candidate.getParameterTypes())\n && !candidate.getParameterTypes().isSubtype(signature.getParameterTypes())))\n candidate = signature;\n else if (!candidate.getParameterTypes().isSubtype(signature.getParameterTypes())) {\n ErrorReporter.addError(\n errors,\n Error.INVALID_ARGUMENTS,\n \"Ambiguous reference to \" + methodName + \" with arguments \" + arguments,\n arguments);\n return null;\n }\n }\n }\n\n if (candidate == null)\n ErrorReporter.addError(\n errors,\n Error.INVALID_METHOD,\n \"No definition of \" + methodName + \" with arguments \" + arguments + \" in this context\",\n arguments);\n\n return candidate;\n }",
"@Override\r\n\t\tprotected boolean visit(final Type type) {\r\n\t\t\tChecker.notNull(\"parameter:type\", type);\r\n\r\n\t\t\tfinal Method method = type.findMethod(this.getMethodName(), this.getParameterTypes());\r\n\t\t\tfinal boolean skipRemaining = method != null;\r\n\t\t\tif (skipRemaining) {\r\n\t\t\t\tthis.setFound(method);\r\n\t\t\t}\r\n\t\t\treturn skipRemaining;\r\n\t\t}",
"private ContractMethod findMatchedInstance(List arguments) {\n List<ContractMethod> matchedMethod = new ArrayList<>();\n\n if(this.getInputs().size() != arguments.size()) {\n for(ContractMethod method : this.getNextContractMethods()) {\n if(method.getInputs().size() == arguments.size()) {\n matchedMethod.add(method);\n }\n }\n } else {\n matchedMethod.add(this);\n }\n\n if(matchedMethod.size() == 0) {\n throw new IllegalArgumentException(\"Cannot find method with passed parameters.\");\n }\n\n if(matchedMethod.size() != 1) {\n LOGGER.warn(\"It found a two or more overloaded function that has same parameter counts. It may be abnormally executed. Please use *withSolidityWrapper().\");\n }\n\n return matchedMethod.get(0);\n }",
"public static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String methodName, int parameterCount) {\n\ttry {\n\t\t/* Since this method attempts to find a method by getting all methods from the class,\n\tthis method should only be called if getMethod cannot find the method. */\n\t\tjava.lang.reflect.Method methods[] = aClass.getMethods();\n\t\tfor (int index = 0; index < methods.length; index++){\n\t\t\tjava.lang.reflect.Method method = methods[index];\n\t\t\tif ((method.getParameterTypes().length == parameterCount) && (method.getName().equals(methodName))) {\n\t\t\t\treturn method;\n\t\t\t}\n\t\t}\n\t} catch (java.lang.Throwable exception) {\n\t\treturn null;\n\t}\n\treturn null;\n}",
"private AMethod lookupMethodImplementedInterfaces(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tEnumeration e = getImplements();\n\t\twhile (e.hasMoreElements()) {\n\t\t\tType t = (Type) e.nextElement();\n\t\t\tAClass cl = t.getRefType();\n\t\t\tcandidate =\n\t\t\t\tcl.lookupMethodInterface(\n\t\t\t\t\tconfig,\n\t\t\t\t\tmth_name,\n\t\t\t\t\tparam_types,\n\t\t\t\t\tcandidate);\n\t\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t}\n\n\t\treturn candidate;\n\t}",
"public static Method getAccessibleMethodFrom (\n Class<?> clazz, String methodName, Class<?>[] parameterTypes)\n {\n // Look for overridden method in the superclass.\n Class<?> superclass = clazz.getSuperclass();\n Method overriddenMethod = null;\n \n if (superclass != null && classIsAccessible(superclass)) {\n try {\n overriddenMethod = superclass.getMethod(methodName, parameterTypes);\n } catch (NoSuchMethodException nsme) {\n // no problem\n }\n \n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n \n // If here, then clazz represents Object, or an interface, or the superclass did not have\n // an override. Check implemented interfaces.\n Class<?>[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; ++i) {\n if (classIsAccessible(interfaces[i])) {\n try {\n overriddenMethod = interfaces[i].getMethod(methodName, parameterTypes);\n } catch (NoSuchMethodException nsme) {\n // no problem\n }\n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n }\n \n // Try superclass's superclass and implemented interfaces.\n if (superclass != null) {\n overriddenMethod = getAccessibleMethodFrom(superclass, methodName, parameterTypes);\n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n \n // Try implemented interfaces' extended interfaces...\n for (int i = 0; i < interfaces.length; ++i) {\n overriddenMethod = getAccessibleMethodFrom(interfaces[i], methodName, parameterTypes);\n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n \n // Give up.\n return null;\n }",
"public Method getMethodByParameters(String name, Class<?>... args) {\r\n \t\t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"private Method getDeclaredMethodFor(Class<?> clazz, String name, Class<?>... parameterTypes) {\n try {\n return clazz.getDeclaredMethod(name, parameterTypes);\n } catch (NoSuchMethodException e) {\n Class<?> superClass = clazz.getSuperclass();\n if (superClass != null) {\n return getDeclaredMethodFor(superClass, name, parameterTypes);\n }\n }\n return null;\n }",
"public AMethod lookupMethodClass(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in super classes for better methods\n\t\tif (!isObject()) {\n\t\t\tAClass super_class = getSuperClass();\n\n\t\t\treturn super_class.lookupMethodClass(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\t} else {\n\t\t\treturn candidate;\n\t\t}\n\t}",
"private FamixMethod findInvokedMethodOnName(String fromClass, String fromMethod, String invokedClassName, String invokedMethodName) {\n \tFamixMethod result = null;\n\t\t/* Test Helper\n\t\tif (fromClass.equals(\"domain.direct.violating.AccessLocalVariable_SetArgumentValue\")){\n\t\t\tboolean breakpoint = true;\n\t\t} */\n\n \t// 1) If methodNameAsInInvocation matches with a method unique name, return that method. \n \tString searchKey = invokedClassName + \".\" + invokedMethodName;\n \tif (theModel.behaviouralEntities.containsKey(searchKey)) {\n \t\treturn (FamixMethod) theModel.behaviouralEntities.get(searchKey);\n \t}\n \t// 2) Find out if there are more methods with the same name of the invoked class. If only one method is found, then return this method. \n \tString methodName = invokedMethodName.substring(0, invokedMethodName.indexOf(\"(\")); // Methodname without signature\n \t searchKey = invokedClassName + \".\" + methodName;\n \tif (sequencesPerMethod.containsKey(searchKey)){\n \t\tArrayList<FamixMethod> methodsList = sequencesPerMethod.get(searchKey);\n \t\tif (methodsList.size() == 0) {\n \t\t\treturn result;\n \t\t} else if (methodsList.size() == 1) {\n \t\t\t// FamixMethod result1 = methodsList.get(0);\n \t\t\treturn methodsList.get(0);\n \t\t} else { // 3) if there are more methods with the same name, then compare the invocation arguments with the method parameters.\n \t\t\tString invocationSignature = invokedMethodName.substring(invokedMethodName.indexOf(\"(\"));;\n \t\t\tString contentsInvocationSignature = invocationSignature.substring(invocationSignature.indexOf(\"(\") + 1, invocationSignature.indexOf(\")\")); \n \t\t\tString[] invocationArguments = contentsInvocationSignature.split(\",\");\n \t\t\tint numberOfArguments = invocationArguments.length;\n \t\t\t// 3a) If there is only one method with the same number of parameters as invocationArguments, then return this method\n \t\t\tList<FamixMethod> matchingMethods1 = new ArrayList<FamixMethod>();\n\t \t\tfor (FamixMethod method : methodsList){\n\t \t\t\tif ((method.signature != null) && (!method.signature.equals(\"\"))) {\n\t\t \t\t\tString contentsmethodParameter = method.signature.substring(method.signature.indexOf(\"(\") + 1, method.signature.indexOf(\")\")); \n\t\t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n\t\t \t\t\tif (methodParameters.length == numberOfArguments) {\n\t\t \t\t\t\tmatchingMethods1.add(method);\n\t\t \t\t\t}\n\t \t\t\t}\n\t \t\t} \n\t \t\tif (matchingMethods1.size() == 0)\n\t \t\t\treturn result;\n\t \t\tif (matchingMethods1.size() == 1)\n\t \t\t\treturn matchingMethods1.get(0);\n \t\t\t\n \t\t\t// 3b) If there is only one method where the first parameter type == the first argument type, then return this method \n \t\t\tList<FamixMethod> matchingMethods2 = new ArrayList<FamixMethod>();\n \t\t\tif (numberOfArguments >= 1) {\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[0] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[0]);\n \t \t\tfor (FamixMethod matchingMethod1 : matchingMethods1){\n \t \t\t\tString contentsmethodParameter = matchingMethod1.signature.substring(matchingMethod1.signature.indexOf(\"(\") + 1, matchingMethod1.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 1) {\n \t \t\t\tmethodParameters[0] = getfullPathOfDeclaredType(fromClass, methodParameters[0]);\n \t \t\t\t\tif (methodParameters[0].equals(invocationArguments[0])) {\n \t \t\t\t\t\tmatchingMethods2.add(matchingMethod1);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods2.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods2.size() == 1)\n \t \t\t\treturn matchingMethods2.get(0);\n \t\t\t}\n \t\t\t// If there is only one method where the second parameter type == the first argument type, then return this method \n \t\t\tif (numberOfArguments >= 2) {\n \t\t\t\tmatchingMethods1.clear();\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[1] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[1]);\n \t \t\tfor (FamixMethod matchingMethod2 : matchingMethods2){\n \t \t\t\tString contentsmethodParameter = matchingMethod2.signature.substring(matchingMethod2.signature.indexOf(\"(\") + 1, matchingMethod2.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 2) {\n \t \t\t\tmethodParameters[1] = getfullPathOfDeclaredType(fromClass, methodParameters[1]);\n \t \t\t\t\tif (methodParameters[1].equals(invocationArguments[1])) {\n \t \t\t\t\t\tmatchingMethods1.add(matchingMethod2);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods1.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods1.size() == 1)\n \t \t\t\treturn matchingMethods1.get(0);\n \t\t\t}\n \t\t}\n\t\t}\n \treturn result; \n }",
"public AMethod lookupMethodInterface(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\treturn candidate;\n\t}",
"public Method getMethodByParameters(String name, Class<?> returnType, Class<?>[] args) {\r\n \t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (method.getReturnType().equals(returnType) && Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}",
"public static Method method(Object receiver, String method, Object[] args) {\n for (Class<?> c : types(receiver)) {\n Method candidate = findMatchingMethod(c, method, args);\n if (candidate != null) {\n return candidate;\n }\n }\n if (receiver instanceof GString) { // cf. GString.invokeMethod\n Method candidate = findMatchingMethod(String.class, method, args);\n if (candidate != null) {\n return candidate;\n }\n }\n return null;\n }",
"public static MethodInvoker getTypedMethod(Class<?> clazz, @Nullable String methodName, @Nullable Class<?> returnType, Class<?>... params)\n {\n for (Method method : clazz.getDeclaredMethods())\n {\n if (((methodName == null) || method.getName().equals(methodName)) && ((returnType == null) || method.getReturnType().equals(returnType)) &&\n Arrays.equals(method.getParameterTypes(), params))\n {\n getAccess(method);\n return new MethodInvoker(method);\n }\n }\n // Search in every superclass\n if (clazz.getSuperclass() != null)\n {\n return getMethod(clazz.getSuperclass(), methodName, params);\n }\n throw new IllegalStateException(String.format(\"Unable to find method %s (%s).\", methodName, Arrays.asList(params)));\n }",
"private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"Method getRiggerMethod(String methodName, Class<?>... params) throws Exception {\r\n Rigger rigger = getRiggerInstance();\r\n Class<? extends Rigger> clazz = rigger.getClass();\r\n Method method = clazz.getDeclaredMethod(methodName, params);\r\n method.setAccessible(true);\r\n return method;\r\n }",
"ClassMember search (ClassMember method) {\r\n ClassMember m = (ClassMember) by_name_table.get (method.type.toString ());\r\n\r\n if (m == null) return null;\r\n\r\n if (!((MethodType) m.type).return_type.isSame (((MethodType) method.type).return_type)) {\r\n /* overriding methods must be exactly same */\r\n OzcError.illegalOverride (method);\r\n return null;\r\n } \r\n\r\n if ((m.isPublic () && !method.isPublic ()) ||\r\n\t(m.isProtected () && method.isPrivate ())) {\r\n /* overriding methods must be more publicity */\r\n OzcError.illegalOverridePublicity (method);\r\n return null;\r\n }\r\n\r\n return m;\r\n }",
"@Nullable\n private static MethodInvoker getSimpleMethod(Class<?> clazz, @Nullable String methodName, @Nullable Class<?> returnType, boolean throwException,\n Class<?>... params)\n {\n for (Method method : clazz.getDeclaredMethods())\n {\n if (((params.length == 0) || Arrays.equals(method.getParameterTypes(), params)) && ((methodName == null) || method.getName().equals(methodName)) &&\n ((returnType == null) || method.getReturnType().equals(returnType)))\n {\n getAccess(method);\n return new MethodInvoker(method);\n }\n }\n // Search in every superclass\n if (clazz.getSuperclass() != null)\n {\n return getMethod(clazz.getSuperclass(), methodName, throwException, params);\n }\n if (throwException)\n {\n throw new IllegalStateException(String.format(\"Unable to find method %s (%s).\", methodName, Arrays.asList(params)));\n }\n return null;\n }",
"public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }",
"public interface MethodCandidate extends Ordered {\n\n /**\n * The default position.\n */\n int DEFAULT_POSITION = 0;\n\n /**\n * Whether the given method name matches this finder.\n *\n * @param methodElement The method element. Never null.\n * @param matchContext The match context. Never null.\n * @return true if it does\n */\n boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext);\n\n @Override\n default int getOrder() {\n return DEFAULT_POSITION;\n }\n\n /**\n * Builds the method info. The method {@link #isMethodMatch(MethodElement, MatchContext)} should be\n * invoked and checked prior to calling this method.\n *\n * @param matchContext The match context\n * @return The method info or null if it cannot be built. If the method info cannot be built an error will be reported to\n * the passed {@link MethodMatchContext}\n */\n @Nullable\n MethodMatchInfo buildMatchInfo(@NonNull MethodMatchContext matchContext);\n\n}",
"private String indirectAssociations_findSuperClassThatContainsMethod(String fromClass, String fromMethod, String uniqueClassName, String methodName) {\n \tString result = \"\";\n \tif (inheritanceAssociationsPerClass.containsKey(uniqueClassName)){\n \t\tHashSet<String> inheritanceAssociations = inheritanceAssociationsPerClass.get(uniqueClassName);\n \t\tfor (String stringSuper : inheritanceAssociations){\n \t\t\tFamixClass superClass = theModel.classes.get(stringSuper);\n \t\t\tif ((superClass != null) && superClass.isInterface == false) {\n\t \t\t\tif (stringSuper.equals(uniqueClassName)) {\n\t \t\t\t\tbreak; // Otherwise, things go wrong with derived C# classes with the same name.\n\t \t\t\t}\n\t FamixMethod foundMethod = findInvokedMethodOnName(fromClass, fromMethod, stringSuper, methodName);\n\t if (foundMethod != null) {\n\t \t\tresult = stringSuper;\n\t \t\tbreak;\n\t\t }\n\t\t else {\n\t\t \tif (inheritanceAssociationsPerClass.containsKey(stringSuper)){\n\t\t \t\tresult = indirectAssociations_findSuperClassThatContainsMethod(fromClass, fromMethod, stringSuper, methodName);\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n \t\t\t}\n\t\t\t} \n \t}\n \treturn result; \n }",
"Methodsig getMethod();",
"private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }",
"@Nullable\n public static MethodInvoker getTypedMethod(Class<?> clazz, @Nullable String methodName, @Nullable Class<?> returnType, boolean throwException,\n Class<?>... params)\n {\n for (Method method : clazz.getDeclaredMethods())\n {\n if (((methodName == null) || method.getName().equals(methodName)) && ((returnType == null) || method.getReturnType().equals(returnType)) &&\n Arrays.equals(method.getParameterTypes(), params))\n {\n getAccess(method);\n return new MethodInvoker(method);\n }\n }\n // Search in every superclass\n if (clazz.getSuperclass() != null)\n {\n return getMethod(clazz.getSuperclass(), methodName, throwException, params);\n }\n if (throwException)\n {\n throw new IllegalStateException(String.format(\"Unable to find method %s (%s).\", methodName, Arrays.asList(params)));\n }\n return null;\n }",
"private void forEachOverridenMethod(final ClassTypingContext ctc, final CtMethod<?> thisMethod, Set<String> distintTypesSet, final CtConsumer<CtMethod<?>> outputConsumer) {\n\t\tfinal CtQuery q = ctc.getAdaptationScope()\n\t\t\t.map(new AllTypeMembersFunction(CtMethod.class).distinctSet(distintTypesSet));\n\t\tq.\tforEach(new CtConsumer<CtMethod<?>>() {\n\t\t\t@Override\n\t\t\tpublic void accept(CtMethod<?> thatMethod) {\n\t\t\t\tif (thisMethod == thatMethod) {\n\t\t\t\t\t//do not return scope method\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//check whether method is overridden by searched method\n\t\t\t\t/*\n\t\t\t\t * note: we are in super inheritance hierarchy of type declaring input `method`, so we do not have to check isSubTypeOf.\n\t\t\t\t * Check for isSubSignature is enough\n\t\t\t\t */\n\t\t\t\tif (ctc.isSubSignature(thisMethod, thatMethod)) {\n\t\t\t\t\toutputConsumer.accept(thatMethod);\n\t\t\t\t\tif (query.isTerminated()) {\n\t\t\t\t\t\tq.terminate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"ClassMember search (String name, MethodType type, int access,\r\n\t\t int modifier_mask) {\r\n IdentifierList methods = (IdentifierList) get (name);\r\n\r\n if (methods == null) return null;\r\n\r\n java.util.Enumeration ms = methods.elements ();\r\n\r\n ClassMember more_specific = null;\r\n while (ms.hasMoreElements ()) {\r\n ClassMember m = (ClassMember) ms.nextElement ();\r\n\r\n int diff;\r\n try {\r\n\tdiff = m.type.compare (type);\r\n } catch (TypeMismatch e) {\r\n\tcontinue;\r\n }\r\n\r\n if (diff < 0) continue;\r\n\r\n int m_access = m.getAccess ();\r\n\r\n if (access == Constants.PROTECTED) {\r\n\tif (m_access == Constants.PRIVATE) continue;\r\n } else if (access == Constants.PUBLIC) {\r\n\tif (m_access != Constants.PUBLIC) continue;\r\n }\r\n\t \r\n if (modifier_mask > 0 &&\r\n\t ((m.getModifier () & modifier_mask) == 0)) continue;\r\n\r\n if (diff == 0) return m;\r\n\r\n if (more_specific == null) {\r\n\tmore_specific = m;\r\n\tcontinue;\r\n }\r\n\r\n try {\r\n\tif (((MethodType) m.type).isMoreSpecific ((MethodType) more_specific.type))\r\n\t more_specific = m;\r\n } catch (OverloadingAmbiguous ex) {\r\n\t/* this overloading is ambiguous */\r\n\tOzcError.overloadingAmbiguous (m);\r\n\treturn ClassMember.ANY;\r\n }\r\n }\r\n\r\n return more_specific;\r\n }",
"Definition lookup(String name, // the name to locate\n int numParams) { // number of params\n // note that the name isn't used... all definitions contained\n // by the MultiDef have the same name\n \n // walk through the list of symbols\n Enumeration e = defs.elements();\n while(e.hasMoreElements()) {\n Definition d = (Definition)e.nextElement();\n \n // If the symbol is a method and it has the same number of\n // parameters as what we are calling, assume it's the match\n if (d instanceof MethodDef) {\n if (((MethodDef)d).getParamCount() == numParams)\n return d;\n }\n \n // otherwise, if it's not a method, AND we're not looking for\n // a method, return the definition found.\n else if (numParams == -1)\n return d;\n } \n\n // If we didn't find a match return null\n return null;\n }",
"public String getMethodName(Class<?> type, String methodName, Class<?>... params);",
"public static Method getMethod(Class<?> paramClass, String paramString, Class<?>[] paramArrayOfClass) throws NoSuchMethodException {\n/* 90 */ ReflectUtil.checkPackageAccess(paramClass);\n/* 91 */ return paramClass.getMethod(paramString, paramArrayOfClass);\n/* */ }",
"private boolean findMethod(String name, MethodDescriptor[] methodDescriptors) {\n for (int i = 0; i < methodDescriptors.length; i++) {\n if (methodDescriptors[i].getName().equals(name)) {\n return true;\n }\n }\n return false;\n }",
"public MethodSignature getIndistinguishableMethod(MethodSignature signature) {\n for (MethodSignature ms : methodTable.get(signature.getSymbol())) {\n if (ms.isIndistinguishable(signature)) return ms;\n }\n\n return null;\n }",
"public List<SemanticError> checkMethodInheritance() {\n\t\tList<SemanticError> errors = new LinkedList<>();\n\n\t\tif (superClass == null)\n\t\t\treturn errors;\n\t\t\n\t\tint max = -1;\n\n\t\tfor (String key : superClass.methods.keySet()) {\n\t\t\tVSOPMethod m = superClass.methods.get(key);\n\t\t\tmax = Math.max(max, m.ord);\n\t\t\tVSOPMethod old = methods.putIfAbsent(key, m);\n\n\t\t\tif(old != null)\n\t\t\t\told.ord = m.ord;\n\t\t\t\t\n\t\t\tif (old != null && (!m.args.equals(old.args) || m.returnType != old.returnType))\n\t\t\t\terrors.add(new SemanticError(m.ln, m.col,\n\t\t\t\t\t\tString.format(\"method %s is redefined in class %s with wrong signature\", m.id, this.id)));\n\n\t\t}\n\n\t\tfor(VSOPMethod m: methods().values()) {\n\t\t\tif(m.ord == -1) {\n\t\t\t\tmax++;\n\t\t\t\tm.ord = max;\n\t\t\t}\n\t\t}\n\n\t\treturn errors;\n\t}",
"Method lookupMethod(Object targetObject, String methodName) {\n Method method = null;\n for (Method m : targetObject.getClass().getMethods()) {\n if (Modifier.isPublic(m.getModifiers()) && methodName.equals(m.getName())) {\n method = m;\n break;\n }\n }\n return method;\n }",
"@Override\n\tpublic String visitMethodCall(MethodCallContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tParseTree lastChild=ctx.children.get(childrenNo-1);\n\t\tString returnType;\n\t\tString methodName;\n\t\tif(lastChild instanceof TerminalNode){\n\t\t\tList<String> argTypes=new ArrayList<>();\n\t\t\tStack<String> ids=new Stack<>();\n\t\t\tParseTree n=ctx.children.get(childrenNo-2);\n\t\t\tif (childrenNo<=4){\n\t\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t\tMethodRecord mRec=(MethodRecord) table.lookup(methodName);\n\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\tList<VarRecord> paramList=(List<VarRecord>) mRec.getParameters();\n\t\t\t\t\tList<ParseTree> arguments= new ArrayList<>();\n\t\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\t\targuments.add(n.getChild(i));\n\t\t\t\t\t}\n\t\t\t\t\tif(paramList.size()!=arguments.size())throw new RuntimeException(\"Incorrect number of arguments\");\n\t\t\t\t\telse for(int i=0;i<=paramList.size()-1;i++){\n\t\t\t\t\t\tString actualType=visit(arguments.get(i));\n\t\t\t\t\t\tString declaredType=paramList.get(i).getReturnType();\n\t\t\t\t\t\tif(!actualType.equals(declaredType)) throw new RuntimeException(\"Incorrect argument type\");\n\t\t\t\t\t}//checking arguments complete\n\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tClassRecord cRec;\n\t\t\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\t\t\tcRec=(ClassRecord) table.lookup(methodName);\n\t\t\t\t\t\tMethodRecord mRec=cRec.getMethod(methodName);\n\t\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t}\n\t\t\t}else \n\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t//checking charAt(i) \n\t\t\t\tif(methodName.equals(\"charAt\")){\n\t\t\t\t\tif(n.getChildCount()!=1) throw new RuntimeException(\"Incorrect number of arguments on charAt()function\");\n\t\t\t\t\telse {\n\t\t\t\t\t\tString charArgType=visit(n);\t\t//check argument type is int\n\t\t\t\t\t\tif (!charArgType.equals(\"int\")) throw new RuntimeException(\"ARgument i on function charAt(i) must be of type int\");\n\t\t\t\t\t}\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-6).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".charAt(i) is applicable only to Strings\");\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\targTypes.add(visit(n.getChild(i)));\n\t\t\t\t}\n\t\t\tfor(int i=childrenNo-4;i>=0;i-=2){\n\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t}\n\t\t\t}else{ \n\t\t\t\t//checking .length()\n\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\tif(methodName.equals(\"length\")){\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-5).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".length() is applicale only to Strings\");\n\t\t\t\t}\n\t\t\t\targTypes=null;\n\t\t\t\tfor(int i=childrenNo-3;i>=0;i-=2){\n\t\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count=ids.size();\n\t\t\tClassRecord cRec=null;\n\t\t\tRecord r;\n\t\t\tfor(int i=0;i<=count-2;i++){\n\t\t\t\tString key=ids.pop();\n\t\t\t\tr= table.lookup(key);\t\t\t\t\n\t\t\t\tcRec=(ClassRecord)table.lookup(r.Type);\n\t\t\t\tif (cRec==null) throw new RuntimeException(\"Class \"+key+\" is not declared\");\t\t\t\t\n\t\t\t}\n\t\t\t//last item in stack is the method Identifier\n\t\t\tMethodRecord mRec=cRec.getMethod(ids.pop());\n\t\t\tif (mRec==null)throw new RuntimeException(\"Method not declared in class \"+cRec.getName());\n\t\t\treturnType=mRec.getReturnType();\n\t\t\tif(methodName.equals(\"charAt\")) returnType=\"char\";\n\t\t\tif(methodName.equals(\"length\"))returnType=\"int\";\n\t\t\t//checking arguments \n\t\t\tif(argTypes==null) return returnType;\n\t\t\telse {\t\t\t\t\n\t\t\t\tList<VarRecord> parameters=(List<VarRecord>) mRec.getParameters();\n\t\t\t\tif(parameters.size()!=argTypes.size()) throw new RuntimeException(\"Incorect number of arguments on method call\");\n\t\t\t\telse{\n\t\t\t\t\tfor(int i=0;i<argTypes.size();i++){\n\t\t\t\t\t\tif(!argTypes.get(i).equals((parameters.get(i).getReturnType()))) throw new RuntimeException (\"incorrect argument type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} return returnType;\n\t\t}\telse \t\t\t\t\t\t// last node is a RuleNode\n\t\t\t{\n\t\t\t\tif (childrenNo==3){\t\t\t\t\t\n\t\t\t\tString leftType=visit(ctx.getChild(0)); //also checks the first method for undeclared ids\n\t\t\t\t//ClassRecord cRec=(ClassRecord) table.lookup(ctx.getChild(0).getText());\n\t\t\t\tParseTree node=ctx.getChild(2);\n\t\t\t\t//checking charAt function\n\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\tString argType=visit(node.getChild(2));\n\t\t\t\t\t\tif (!argType.equals(\"int\")) throw new RuntimeException(\"Incorrect argument in charAt()\");\n\t\t\t\t\t\treturn \"char\";\n\t\t\t\t\t}\n\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\telse return \"int\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t{String mName=ctx.getChild(2).getChild(0).getText();\n\t\t\t\tClassRecord tempCR=(ClassRecord) table.lookup(ctx.getChild(0).getChild(0).getText());\n\t\t\t\tMethodRecord mRec=tempCR.getMethod(mName);\n\t\t\t\tif(mRec==null)throw new RuntimeException(\"method \"+mName+\" is not declared in class \"+tempCR.getName());\n\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (childrenNo==5){\n\t\t\t\t\tString leftType=visit(ctx.getChild(1)); //also checks the first method for undeclared ids\n\t\t\t\t\tParseTree node=ctx.getChild(4);\n\t\t\t\t\t//checking charAt function\n\t\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tClassRecord cR=(ClassRecord)table.lookup(leftType);\n\t\t\t\t\tMethodRecord mRec=cR.getMethod(node.getChild(0).getText());\n\t\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t}\n\t\treturn null; //debuggin purposes. should be unreachable\n\t}",
"private static String getMethodSignature(Class[] paramTypes, Class retType) {\n StringBuffer sbuf = new StringBuffer();\n sbuf.append('(');\n for (int i = 0; i < paramTypes.length; i++) {\n sbuf.append(getClassSignature(paramTypes[i]));\n }\n sbuf.append(')');\n sbuf.append(getClassSignature(retType));\n return sbuf.toString();\n }",
"private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"@Override\n public SubroutineDescriptor getOverload(List<ExpressionNode> actualParameters) throws LexicalException {\n for (SubroutineDescriptor descriptor : this.overloads) {\n if (this.compareActualWithFormatParameters(descriptor.getFormalParameters(), actualParameters)) {\n return descriptor;\n }\n }\n\n throw new LexicalException(\"Not existing overload for this subroutine\");\n }",
"MethodType getMethodType();",
"private void extendedLookupOfSuperTypes(\n Map<TypeElement, Map<TypeElement, List<ExecutableElement>>> routeMap,\n TypeElement parentTypeElement) {\n for (TypeElement superType : superTypes(parentTypeElement)) {\n // collect all declared methods\n Set<ExecutableElement> methods =\n superType.getEnclosedElements().stream()\n .filter(ExecutableElement.class::isInstance)\n .map(ExecutableElement.class::cast)\n .collect(Collectors.toCollection(LinkedHashSet::new));\n for (ExecutableElement method : methods) {\n // extract all annotation type elements\n LinkedHashSet<TypeElement> annotationTypes =\n method.getAnnotationMirrors().stream()\n .map(AnnotationMirror::getAnnotationType)\n .map(DeclaredType::asElement)\n .filter(TypeElement.class::isInstance)\n .map(TypeElement.class::cast)\n .collect(Collectors.toCollection(LinkedHashSet::new));\n\n for (TypeElement annotationType : annotationTypes) {\n if (Annotations.HTTP_METHODS.contains(annotationType.toString())) {\n // ensure map is created for parent type element\n Map<TypeElement, List<ExecutableElement>> mapping =\n routeMap.computeIfAbsent(parentTypeElement, k -> new LinkedHashMap<>());\n List<ExecutableElement> list =\n mapping.computeIfAbsent(annotationType, k -> new ArrayList<>());\n // ensure that the same method wasnt already defined in parent\n if (list.stream().map(this::signature).noneMatch(signature(method)::equals)) {\n list.add(method);\n }\n }\n }\n }\n }\n }",
"private static void getInterfaceMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 127 */ Class[] arrayOfClass = paramClass.getInterfaces();\n/* 128 */ for (byte b = 0; b < arrayOfClass.length; b++) {\n/* 129 */ Class<?> clazz = arrayOfClass[b];\n/* 130 */ boolean bool = getInternalPublicMethods(clazz, paramMap);\n/* 131 */ if (!bool) {\n/* 132 */ getInterfaceMethods(clazz, paramMap);\n/* */ }\n/* */ } \n/* */ }",
"public abstract Set<MethodUsage> getDeclaredMethods();",
"public static MethodHandle findVirtual(MethodHandles.Lookup lookup, String name, Class type,\n Class clazz, MethodType mt)\n throws NoSuchMethodException, IllegalAccessException\n {\n return lookup.findVirtual(clazz, name, mt);\n }",
"public Method findMatchingGetMethod(Object bean, String propertyName) {\n\t\tfor (Method method : bean.getClass().getMethods()) {\n\t\t\t// find all the set methods\n\t\t\tif (method.getName().startsWith(\"get\") && method.getName().length() > \"get\".length()) {\n\t\t\t\tString methodName = method.getName().substring(\"get\".length());\n\t\t\t\tmethodName = methodName.replace(methodName.substring(0,1), methodName.substring(0,1).toLowerCase());\n\t\t\t\tif (methodNameMatches(methodName, propertyName)) {\n\t\t\t\t\tif (method.getReturnType() == null) {\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Unable to find matching getter method for [\" + propertyName + \"] in bean [\" + bean.getClass().getCanonicalName() + \"]. Found [\" + method.getName() + \"] but this does not have a return type.\");\n\t\t\t\t\t}\n\t\t\t\t\treturn method;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthrow new IllegalArgumentException(\"Unable to find matching getter method for [\" + propertyName + \"] in bean [\" + bean.getClass().getCanonicalName() + \"]\");\n\t}",
"private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }",
"private static Method _getMethodForClass(Class targetClass, String methodName, String[] paramTypeNames)\n throws ClassNotFoundException, NoSuchMethodException\n {\n int numParams = (paramTypeNames != null ? paramTypeNames.length : 0);\n Class[] paramTypes = new Class[numParams];\n ClassLoader loader = targetClass.getClassLoader();\n for (int i = 0; i<numParams; i++)\n {\n\tString typeName = paramTypeNames[i];\n\tif (typeName.equals(\"int\"))\n\t paramTypes[i] = Integer.TYPE;\n\telse if (typeName.equals(\"double\"))\n\t paramTypes[i] = Double.TYPE;\n\telse if (typeName.equals(\"boolean\"))\n\t paramTypes[i] = Boolean.TYPE;\n\telse if (loader == null)\n\t paramTypes[i] = Class.forName(paramTypeNames[i]);\n\telse\n\t paramTypes[i] = loader.loadClass(paramTypeNames[i]);\n }\n Method method = targetClass.getMethod(methodName, paramTypes);\n return method;\n }",
"@Override\n public boolean evaluate(@Nonnull MethodInformation methodInformation) {\n boolean matches = namePattern.matcher(methodInformation.getName()).matches();\n final @Nonnull @NonNullableElements List<? extends VariableElement> methodParameters = methodInformation.getElement().getParameters();\n if (parameters.length == methodParameters.size()) {\n for (int i = 0; i < methodParameters.size(); i++) {\n final @Nonnull String nameOfDeclaredType = ProcessingUtility.getQualifiedName(methodParameters.get(i).asType());\n ProcessingLog.debugging(\"name of type: $\", nameOfDeclaredType);\n final @Nonnull String parameter = parameters[i];\n if (!parameter.equals(\"?\")) {\n matches = matches && nameOfDeclaredType.equals(parameter);\n }\n }\n } else {\n matches = false;\n }\n return matches;\n }",
"MethodName getMethod();",
"private HashSet<SootMethod> getMethodsInvokingAtLevel(SootMethod method,\r\n\t\t\tint level) {\n\t\tHashSet<SootMethod> workSet = new HashSet<SootMethod>();\r\n\t\tworkSet.add(method);\r\n\t\t\r\n\t\tHashSet<SootMethod> newWorkset = new HashSet<SootMethod>(1);\r\n\t\tHashSet<SootMethod> topLevel = new HashSet<SootMethod>();\r\n\t\tHashSet<SootMethod> processed = new HashSet<SootMethod>(1);\r\n\t\tfor(int i=0; i< level; i++){\r\n\t\t\tif(i !=0){\r\n\t\t\t\tfor (SootMethod sootMethod : newWorkset) {\r\n\t\t\t\t\tif(!processed.contains(sootMethod))\r\n\t\t\t\t\t\tworkSet = new HashSet<SootMethod>(newWorkset);\r\n\t\t\t\t}\r\n\t\t\t\tnewWorkset = new HashSet<SootMethod>(1);\r\n\t\t\t}\r\n\t\t\tif(workSet.isEmpty())\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tHashSet<SootMethod> implementedMethods = new HashSet<SootMethod>();\r\n\t\t\tfor (SootMethod m : workSet) {\r\n\t\t\t\tfor (SootClass interfaze : m.getDeclaringClass().getInterfaces()) {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tSootMethod m2 = interfaze.getMethod(m.getName(), \r\n\t\t\t\t\t\t\t\tm.getParameterTypes(), m.getReturnType());\r\n\t\t\t\t\t\tif(!processed.contains(m2))\r\n\t\t\t\t\t\t\timplementedMethods.add(m2);\r\n\t\t\t\t\t}catch (RuntimeException e) {\r\n\t\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tworkSet.addAll(implementedMethods);\r\n\t\t\tIterator<SootMethod> iter = workSet.iterator();\r\n\t\t\t\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSootMethod m = iter.next();\r\n\t\t\t\tif(getMethodsInvoking(m) != null){\r\n\t\t\t\t\tnewWorkset.addAll(getMethodsInvoking(m));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ttopLevel.add(m);\r\n\t\t\t}\r\n\t\t\tprocessed.addAll(workSet);\r\n\t\t}\r\n\t\tprocessed.remove(method);\r\n\t\ttadaMethodInvokedByMap.put(method, processed);\r\n\t\ttopLevel.addAll(newWorkset);\r\n\t\treturn topLevel;\r\n\t}",
"public HashSet<SootMethod> getMethodsToExplore(int invocationLevel){\n\t\tHashSet<SootMethod> methodsToExplore = new HashSet<SootMethod>();\r\n\t\t\r\n\t\tfor (SootMethod method : tadaMethods) {\r\n\t\t\tHashSet<SootMethod> invokingMethods = getMethodsInvokingAtLevel(method, invocationLevel);\r\n\t\t\tmethodsToExplore.addAll(invokingMethods);\r\n\t\t}\r\n\t\treturn methodsToExplore;\r\n\t}",
"Method getMethod();",
"Method getMethod();",
"public Method mo27144b(String str, Class<?>... clsArr) throws NoSuchMethodException {\n try {\n return this.f17268a.getMethod(str, clsArr);\n } catch (NoSuchMethodException e) {\n for (Class<?> cls = this.f17268a; cls != null; cls = cls.getSuperclass()) {\n try {\n return cls.getDeclaredMethod(str, clsArr);\n } catch (NoSuchMethodException unused) {\n }\n }\n throw e;\n }\n }",
"private final java.lang.reflect.Method tryGetMethod(java.lang.Class<?> r7, java.lang.String r8, java.lang.Class<?>[] r9, java.lang.Class<?> r10) {\n /*\n r6 = this;\n r0 = 0\n int r1 = r9.length // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Object[] r1 = java.util.Arrays.copyOf(r9, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class[] r1 = (java.lang.Class[]) r1 // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.reflect.Method r1 = r7.getDeclaredMethod(r8, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r2 = \"result\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class r2 = r1.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r2 == 0) goto L_0x001d\n r0 = r1\n goto L_0x005d\n L_0x001d:\n java.lang.reflect.Method[] r7 = r7.getDeclaredMethods() // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r1 = \"declaredMethods\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r7, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n int r1 = r7.length // Catch:{ NoSuchMethodException -> 0x005d }\n r2 = 0\n r3 = 0\n L_0x0029:\n if (r3 >= r1) goto L_0x005d\n r4 = r7[r3] // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = \"method\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = r4.getName() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r8) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class r5 = r4.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class[] r5 = r4.getParameterTypes() // Catch:{ NoSuchMethodException -> 0x005d }\n kotlin.jvm.internal.Intrinsics.checkNotNull(r5) // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = java.util.Arrays.equals(r5, r9) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n r5 = 1\n goto L_0x0056\n L_0x0055:\n r5 = 0\n L_0x0056:\n if (r5 == 0) goto L_0x005a\n r0 = r4\n goto L_0x005d\n L_0x005a:\n int r3 = r3 + 1\n goto L_0x0029\n L_0x005d:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.KDeclarationContainerImpl.tryGetMethod(java.lang.Class, java.lang.String, java.lang.Class[], java.lang.Class):java.lang.reflect.Method\");\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }",
"public static Method findMethod(Class<?> clazz, String name) {\n return findMethod(clazz, name, new Class<?>[0]);\n }",
"@NonNull\n @UsedByGeneratedCode\n protected Method resolveTargetMethod() {\n return ReflectionUtils.getRequiredMethod(declaringType, methodName, argTypes);\n }",
"private Executable matchingExecutable(\n TypeElement autoBuilderType,\n List<Executable> executables,\n ImmutableSet<ExecutableElement> methodsInAutoBuilderType,\n String description) {\n ImmutableList<Executable> matches =\n executables.stream()\n .filter(x -> executableMatches(x, methodsInAutoBuilderType))\n .collect(toImmutableList());\n switch (matches.size()) {\n case 0:\n throw errorReporter()\n .abortWithError(\n autoBuilderType,\n \"[AutoBuilderNoMatch] Property names do not correspond to the parameter names of\"\n + \" any %s:\\n%s\",\n description,\n executableListString(executables));\n case 1:\n return matches.get(0);\n default:\n // More than one match, let's see if we can find the best one.\n }\n int max = matches.stream().mapToInt(e -> e.parameters().size()).max().getAsInt();\n ImmutableList<Executable> maxMatches =\n matches.stream().filter(c -> c.parameters().size() == max).collect(toImmutableList());\n if (maxMatches.size() > 1) {\n throw errorReporter()\n .abortWithError(\n autoBuilderType,\n \"[AutoBuilderAmbiguous] Property names correspond to more than one %s:\\n%s\",\n description,\n executableListString(maxMatches));\n }\n return maxMatches.get(0);\n }",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"private static Set<SootMethod> searchDownForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\t//1.判断sm中是否含有intent的定义信息,若有,则返回\n\t\tif(containsInitMethod(sm, type)){\n\t\t\tmethods.add(sm);\n\t\t}\n\t\telse{\n\t\t\tList<SootMethod> targets = InterMethodAnalysis.getTargetsMethods(sm);\t\n\t\t\tfor(SootMethod tgt:targets){\n\t\t\t\tif(tgt.equals(sm))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(tgt.getReturnType().toString().contains(type)){\n\t\t\t\t\tif(tgt.isAbstract()){\n\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(tgt)){\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(tgt, type);\n\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"public static Object invokeMethod(Object receiver, String name, Object... args) {\n try {\n Class<?> clazz = receiver.getClass();\n /*Class<?>[] parameterTypes = new Class<?>[args.length];\n for (int i=0; i<args.length; i++) {\n parameterTypes[i] = args[i].getClass();\n }*/\n \n Method[] methods = clazz.getDeclaredMethods();\n for (Method method : methods) {\n if (method.getName().equals(name)) {\n Class<?>[] parameterTypes = method.getParameterTypes();\n if (parameterTypes.length == args.length) {\n int matched = 0;\n for (; matched<parameterTypes.length; matched++) {\n if (!isAcceptableParameter(parameterTypes[matched], args[matched])) {\n break;\n }\n }\n if (matched == parameterTypes.length) {\n method.setAccessible(true);\n return method.invoke(receiver, args);\n }\n }\n }\n }\n\n /*Method method = clazz.getDeclaredMethod(name, parameterTypes);\n if (method != null) {\n method.setAccessible(true);\n return method.invoke(receiver, args);\n }*/\n } catch (Exception e) {\n Logger.w(\"Reflection\", \"invokeMethod \" + name + \" \" + e.toString());\n }\n return null;\n }",
"public Method getMethod();",
"public static Optional<Method> find(MethodSpec methodSpec, Class<?> clazz, boolean analiseSuper) {\n return Option.orElseAnd(\n find(methodSpec, clazz.getDeclaredMethods()),\n /* not present and */ analiseSuper,\n /* then */ find(methodSpec, clazz.getMethods()));\n }",
"public static Method getMethod(final Class<?> clazz, final String method, final Class<?>... parameters) {\n try {\n return clazz.getDeclaredMethod(method, parameters);\n } catch (NoSuchMethodException e) {\n fail(\"Method [\" + method + \"] with parameters [\" + parameters + \"] not found on class [\" + clazz.getName() + \"]\");\n } catch (NullPointerException e) {\n fail(\"Invalid parameters given for method extraction, using method [\" + method + \"], parameters [\" + parameters + \"] and class [\" + clazz + \"]\");\n }\n return null;\n }",
"@Override public RebaseSearcher findSymbols(String pattern,String kind)\n{\n RebaseJavaSearch search = new RebaseJavaSearch(this);\n\n findSymbols(search,pattern,kind);\n\n return search;\n}",
"String getMethod();",
"String getMethod();",
"public boolean matches(Method method, Class<?> targetClass)\n/* */ {\n/* 133 */ return ((targetClass != null) && (matchesPattern(ClassUtils.getQualifiedMethodName(method, targetClass)))) || \n/* 134 */ (matchesPattern(ClassUtils.getQualifiedMethodName(method)));\n/* */ }",
"@Override\n\tpublic void find() {\n\t\tSystem.out.println(\"find method\");\n\t}",
"abstract public void search();",
"public List<MethodInfo> getMethod(String methodName) {\n List<MethodInfo> matchedMethodInfo = new ArrayList<MethodInfo>();\n for (MethodInfo method : this.lstMethodInfo) {\n if (methodName.equals(method.getName())) {\n matchedMethodInfo.add(method);\n }\n }\n \n return matchedMethodInfo;\n }",
"public Method methodFor(Message message) throws NoSuchMethodException {\n\t\tif (!handlers.containsKey(message.getClass())) {\n\t\t\tthrow new NoSuchMethodException();\n\t\t}\n\t\treturn handlers.get(message.getClass());\n\t}",
"private static boolean getInternalPublicMethods(Class<?> paramClass, Map<Signature, Method> paramMap) {\n/* 143 */ Method[] arrayOfMethod = null;\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ try {\n/* 150 */ if (!Modifier.isPublic(paramClass.getModifiers())) {\n/* 151 */ return false;\n/* */ }\n/* 153 */ if (!ReflectUtil.isPackageAccessible(paramClass)) {\n/* 154 */ return false;\n/* */ }\n/* */ \n/* 157 */ arrayOfMethod = paramClass.getMethods();\n/* 158 */ } catch (SecurityException securityException) {\n/* 159 */ return false;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 168 */ boolean bool = true; byte b;\n/* 169 */ for (b = 0; b < arrayOfMethod.length; b++) {\n/* 170 */ Class<?> clazz = arrayOfMethod[b].getDeclaringClass();\n/* 171 */ if (!Modifier.isPublic(clazz.getModifiers())) {\n/* 172 */ bool = false;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 177 */ if (bool) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 182 */ for (b = 0; b < arrayOfMethod.length; b++) {\n/* 183 */ addMethod(paramMap, arrayOfMethod[b]);\n/* */ \n/* */ }\n/* */ \n/* */ }\n/* */ else {\n/* */ \n/* 190 */ for (b = 0; b < arrayOfMethod.length; b++) {\n/* 191 */ Class<?> clazz = arrayOfMethod[b].getDeclaringClass();\n/* 192 */ if (paramClass.equals(clazz)) {\n/* 193 */ addMethod(paramMap, arrayOfMethod[b]);\n/* */ }\n/* */ } \n/* */ } \n/* 197 */ return bool;\n/* */ }",
"public DynamicMethod retrieveMethod(String name) {\n return getMethods().get(name);\n }",
"@SuppressWarnings(\"unchecked\")\n private static Optional<MethodInfo> findMethod(ClassPath path,\n ClassDescriptor clazz,\n BiPredicate<ClassNode, MethodNode> condition) {\n return find(path,\n path.findClass(clazz).get(),\n cn -> ((List<MethodNode>) cn.methods)\n .stream()\n .filter(mn -> condition.test(cn, mn))\n .map(mn -> new MethodInfo(new ClassDescriptor(cn.name),\n MethodDescriptor.create(mn.name, mn.desc)))\n .findFirst());\n }",
"public boolean supportsCallee(SootMethod method);",
"public T find (T target);",
"@Nullable\n\tpublic MethodNode searchMethodByShortName(String name) {\n\t\tfor (MethodNode m : methods) {\n\t\t\tif (m.getMethodInfo().getName().equals(name)) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private static HashMap getPrimaryMethod(HashMap<String, HashMap> primaryParamsMap, Object[] params) throws NoSuchMethodException {\n return getParamsIdCombinations(params, false).stream()\n .filter(primaryParamsMap::containsKey)\n .findFirst().map(primaryParamsMap::get)\n .orElseThrow(() -> new NoSuchMethodException(\"Unable to find a primary method during multiple dispatch\"));\n }",
"private static Method findTransformer(Class<?> rawType) {\n if (rawType == LinkedListMultimap.class || rawType == ListMultimap.class || rawType ==\n Multimap.class) {\n return null;\n }\n\n // First, check type itself for matching methods\n for (String methodName : METHOD_NAMES) {\n try {\n Method m = rawType.getDeclaredMethod(methodName, Multimap.class);\n if (m != null) {\n return m;\n }\n } catch (NoSuchMethodException e) {\n }\n // pass SecurityExceptions as-is:\n // } catch (SecurityException e) { }\n }\n\n // If not working, possibly super types too (should we?)\n for (String methodName : METHOD_NAMES) {\n try {\n Method m = rawType.getMethod(methodName, Multimap.class);\n if (m != null) {\n return m;\n }\n } catch (NoSuchMethodException e) {\n }\n // pass SecurityExceptions as-is:\n // } catch (SecurityException e) { }\n }\n\n return null;\n }",
"public abstract String[] getMethodNames();",
"public Function getStaticMethod(int signature)\r\n\t{\r\n\t\t// search own methods:\r\n\t\tfor (Function fn : staticMethods)\r\n\t\t{\r\n\t\t\tif (fn.signature == signature)\r\n\t\t\t\treturn fn;\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}",
"public List<MethodCall> searchMethods( final MethodsFilter aFilter ) {\n\t\t// Get the methods\n\t\tfinal MonitoringLogService monitoringLogService = getService( MonitoringLogService.class );\n\t\tfinal List<MethodCall> methods = monitoringLogService.getMethods( );\n\n\t\t// Filter the methods\n\t\tfinal FilterService filterService = getService( FilterService.class );\n\t\treturn methods\n\t\t\t\t.parallelStream( )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getHost, aFilter.getHost( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getClazz, aFilter.getClazz( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getMethod, aFilter.getMethod( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getStringPredicate( MethodCall::getException, aFilter.getException( ), aFilter.isUseRegExpr( ) ) )\n\t\t\t\t.filter( filterService.getLongPredicate( MethodCall::getTraceId, aFilter.getTraceId( ) ) )\n\t\t\t\t.filter( getSearchTypePredicate( aFilter.getSearchType( ) ) )\n\t\t\t\t.filter( filterService.getAfterTimePredicate( MethodCall::getTimestamp, aFilter.getLowerDate( ), aFilter.getLowerTime( ) ) )\n\t\t\t\t.filter( filterService.getBeforeTimePredicate( MethodCall::getTimestamp, aFilter.getUpperDate( ), aFilter.getUpperTime( ) ) )\n\t\t\t\t.collect( Collectors.toList( ) );\n\t}",
"private Object getNonObjectMethod (String className, \n\t\t\t\tString methodName, String[] argTypeNames)\n\t\t\t{\n\t\t\t\tModel model = getModel();\n\t\t\t\tObject method = \n\t\t\t\t\tmodel.getMethod(className, methodName, argTypeNames);\n\n\t\t\t\tif (method == null)\t// look for an inherited method\n\t\t\t\t{\n\t\t\t\t\tmethod = model.getInheritedMethod(\n\t\t\t\t\t\tclassName, methodName, argTypeNames);\n\n\t\t\t\t\tif ((method != null) && model.getDeclaringClass(method).\n\t\t\t\t\t\tequals(\"java.lang.Object\"))\t\t// NOI18N\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn method;\n\t\t\t}",
"public interface ResolvedMethodLikeDeclaration extends ResolvedDeclaration, ResolvedTypeParametrizable, HasAccessSpecifier {\n\n /**\n * The package name of the declaring type.\n */\n default String getPackageName() {\n return declaringType().getPackageName();\n }\n\n /**\n * The class(es) wrapping the declaring type.\n */\n default String getClassName() {\n return declaringType().getClassName();\n }\n\n /**\n * The qualified name of the method composed by the qualfied name of the declaring type\n * followed by a dot and the name of the method.\n */\n default String getQualifiedName() {\n return declaringType().getQualifiedName() + \".\" + this.getName();\n }\n\n /**\n * The signature of the method.\n */\n default String getSignature() {\n StringBuilder sb = new StringBuilder();\n sb.append(getName());\n sb.append(\"(\");\n for (int i = 0; i < getNumberOfParams(); i++) {\n if (i != 0) {\n sb.append(\", \");\n }\n sb.append(getParam(i).describeType());\n }\n sb.append(\")\");\n return sb.toString();\n }\n\n /**\n * The qualified signature of the method. It is composed by the qualified name of the declaring type\n * followed by the signature of the method.\n */\n default String getQualifiedSignature() {\n return declaringType().getId() + \".\" + this.getSignature();\n }\n\n /**\n * The type in which the method is declared.\n */\n ResolvedReferenceTypeDeclaration declaringType();\n\n /**\n * Number of params.\n */\n int getNumberOfParams();\n\n /**\n * Get the ParameterDeclaration at the corresponding position or throw IllegalArgumentException.\n */\n ResolvedParameterDeclaration getParam(int i);\n\n /**\n * Utility method to get the last ParameterDeclaration. It throws UnsupportedOperationException if the method\n * has no parameters.\n * The last parameter can be variadic and sometimes it needs to be handled in a special way.\n */\n default ResolvedParameterDeclaration getLastParam() {\n if (getNumberOfParams() == 0) {\n throw new UnsupportedOperationException(\"This method has no typeParametersValues, therefore it has no a last parameter\");\n }\n return getParam(getNumberOfParams() - 1);\n }\n\n /**\n * Has the method or construcor a variadic parameter?\n * Note that when a method has a variadic parameter it should have an array type.\n */\n default boolean hasVariadicParameter() {\n if (getNumberOfParams() == 0) {\n return false;\n } else {\n return getParam(getNumberOfParams() - 1).isVariadic();\n }\n }\n\n @Override\n default Optional<ResolvedTypeParameterDeclaration> findTypeParameter(String name) {\n for (ResolvedTypeParameterDeclaration tp : this.getTypeParameters()) {\n if (tp.getName().equals(name)) {\n return Optional.of(tp);\n }\n }\n return declaringType().findTypeParameter(name);\n }\n\n /**\n * Number of exceptions listed in the throws clause.\n */\n int getNumberOfSpecifiedExceptions();\n\n /**\n * Type of the corresponding entry in the throws clause.\n *\n * @throws IllegalArgumentException if the index is negative or it is equal or greater than the value returned by\n * getNumberOfSpecifiedExceptions\n * @throws UnsupportedOperationException for those types of methods of constructor that do not declare exceptions\n */\n ResolvedType getSpecifiedException(int index);\n\n default List<ResolvedType> getSpecifiedExceptions() {\n if (getNumberOfSpecifiedExceptions() == 0) {\n return Collections.emptyList();\n } else {\n List<ResolvedType> exceptions = new LinkedList<>();\n for (int i = 0; i < getNumberOfSpecifiedExceptions(); i++) {\n exceptions.add(getSpecifiedException(i));\n }\n return exceptions;\n }\n }\n}",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic boolean visit(MethodDeclaration node) {\r\n\t\tIMethodBinding imb = node.resolveBinding();\r\n\t\tIJavaElement ije = imb.getJavaElement();\r\n\t\tif (ije instanceof IMethod) {\r\n\t\t\tIMethod im = (IMethod) ije;\r\n\t\t\tList<SingleVariableDeclaration> para_list = node.parameters();\r\n\t\t\tIRGeneratorHelper.HandleMethodDeclaration(java_project, graph_manager, node.getBody(), ele_factory,\r\n\t\t\t\t\tstmt_factory, imb, im, it, para_list, super_class_element, type_declare_resource, type_declare);\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean containsIndistinguishableMethod(\n MethodSignature signature) {\n List<MethodSignature> list = methodTable.get(signature.getSymbol());\n\n if (list != null)\n for (MethodSignature existing : list)\n if (existing.isIndistinguishable(signature)) return true;\n\n return false;\n }",
"protected Constructor<?> findConstructorAlt(Class<?> classType, Object[] args)\n throws NoSuchMethodException {\n\n Object[] zeroArray = new Object[0];\n int i;\n boolean found = false;\n Constructor<?> toInvoke = null;\n Constructor<?>[] cons = null;\n\n // Grab set of constructors, signal error if no public constructors\n cons = classType.getConstructors();\n if (cons.length == 0)\n throw new NoSuchMethodException(\"Class \" + classType\n + \" has no public constructors!\");\n\n // First build a method structure vector for all the\n // constructors. This automatically sorts the constructors so\n // that the first match is the most specific constructor.\n MethodStructureVector items = new MethodStructureVector();\n for (i = 0; i < cons.length; i++)\n items.insertElement(new ConstructorStructure(cons[i], cons[i]\n .getParameterTypes()));\n\n // Now scan the constructor list for the most specific constructor\n ConstructorStructure next = null;\n Object[] sorted = new Object[items.size()];\n items.copyInto(sorted);\n\n if (args == null) {\n args = zeroArray;\n }\n for (i = 0; ((i < sorted.length) && (!found)); i++) {\n next = (ConstructorStructure) sorted[i];\n\n // Compare argument list lengths\n if (args.length != next.argTypes.length)\n continue;\n\n // Found a possible candidate, compare argument types\n found = true;\n toInvoke = next.meth;\n for (int j = 0; j < args.length; j++)\n if (!next.argTypes[j].isInstance(args[j])) {\n found = false;\n break;\n }\n }\n\n if (!found) {\n String argList = \"(\";\n\n if ((args == null) || (args.length == 0))\n argList = argList + \")\";\n else {\n for (i = 0; i < args.length - 1; i++)\n argList = argList + args[i].getClass() + \", \";\n argList = argList + args[i].getClass() + \")\";\n }\n\n throw new NoSuchMethodException(\"No constructor for \" + classType\n + \" with arg types \" + argList);\n }\n\n // Found the constructor, so return it\n return toInvoke;\n }",
"protected String getFunctionName(ArrayList<SystemType> signature) {\n return getClass().getSimpleName().toLowerCase();\n }",
"boolean match(String mnemonic, ParameterType[] parameters);",
"@SuppressWarnings(\"PMD.LinguisticNaming\")\n public Feedback isMethodCalledFromPublic(\n List<MethodDeclaration> allMethods, MethodDeclaration methodToLookFor) {\n List<MethodCallExpr> publicCalls = new ArrayList<>();\n List<MethodCallExpr> privateCalls = new ArrayList<>();\n List<Feedback> childFeedbacks = new ArrayList<>();\n boolean result = false;\n for (MethodDeclaration current : allMethods) {\n current.findAll(MethodCallExpr.class).forEach(methodCallExpr -> {\n if (methodCallExpr.getChildNodes().get(0).toString().equals(\n methodToLookFor.getNameAsString())) {\n if (current.isPrivate()) {\n privateCalls.add(methodCallExpr);\n } else {\n publicCalls.add(methodCallExpr);\n }\n }\n });\n }\n result = !publicCalls.isEmpty();\n if (!result) {\n for (MethodCallExpr currentExpr : privateCalls) {\n Node node = currentExpr;\n while (!(node instanceof ClassOrInterfaceDeclaration) && !result) {\n if (node instanceof MethodDeclaration) {\n result = !isMethodCalledFromPublic(allMethods, (MethodDeclaration) node)\n .getIsError();\n break;\n } else {\n node = node.getParentNode().get();\n }\n }\n }\n }\n if (result) {\n return Feedback.getSuccessfulFeedback();\n } else {\n return Feedback.getFeedbackWithChildren(new FeedbackTrace(methodToLookFor),\n childFeedbacks);\n }\n }"
] | [
"0.64986837",
"0.64505357",
"0.6257776",
"0.62178284",
"0.6198412",
"0.61101854",
"0.6109003",
"0.60999644",
"0.58613163",
"0.58578825",
"0.5836778",
"0.5763973",
"0.5711914",
"0.56987494",
"0.5661191",
"0.5653198",
"0.56385285",
"0.5609221",
"0.5531966",
"0.5457526",
"0.54224443",
"0.54124326",
"0.54120857",
"0.5398504",
"0.5345523",
"0.52753615",
"0.5269127",
"0.5254079",
"0.52266264",
"0.52173924",
"0.5190997",
"0.5166446",
"0.5139279",
"0.50986624",
"0.50985575",
"0.5095939",
"0.5075721",
"0.5054574",
"0.504013",
"0.50143886",
"0.49680015",
"0.4965149",
"0.4944524",
"0.4933069",
"0.49325234",
"0.48996496",
"0.48883313",
"0.48762298",
"0.4875781",
"0.4874489",
"0.48219508",
"0.4783419",
"0.4770006",
"0.4763112",
"0.47611764",
"0.47373158",
"0.47280255",
"0.47204968",
"0.47156128",
"0.47156128",
"0.47149223",
"0.4710685",
"0.4704428",
"0.4704428",
"0.46792802",
"0.4667432",
"0.46664917",
"0.4663932",
"0.46633556",
"0.46552625",
"0.46476704",
"0.4644593",
"0.46444163",
"0.46423015",
"0.46087715",
"0.46087715",
"0.46020952",
"0.46009493",
"0.45923486",
"0.45860603",
"0.458377",
"0.45792294",
"0.45778614",
"0.45733377",
"0.45457473",
"0.45331806",
"0.45176002",
"0.45164815",
"0.4516375",
"0.45143628",
"0.4512783",
"0.45062175",
"0.4499713",
"0.44954485",
"0.44840443",
"0.44755518",
"0.44712892",
"0.4469281",
"0.44674644",
"0.44612125"
] | 0.7109705 | 0 |
Each type belonging to the given super type is presented to this type. | @Override
protected boolean visit(final Type type) {
Checker.notNull("parameter:type", type);
final Method method = type.findMethod(this.getMethodName(), this.getParameterTypes());
final boolean skipRemaining = method != null;
if (skipRemaining) {
this.setFound(method);
}
return skipRemaining;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected abstract void registerSuperTypes();",
"public void addSuperType(TypeReference superType) {\n\t\tif (superList == null) superList = new ArrayList<TypeReference>();\n\t\tsuperList.add(superType);\n\t}",
"private void resolveSuperTypes(AnnotatedType annotatedType, ModelConverterContext context) {\n\n Type type = annotatedType.getType();\n JavaType javaType = objectMapper().getTypeFactory().constructType(type);\n\n // Find the 'furthest' supertype which contributes to the exposed API\n JavaType javaSuperType = javaType.getSuperClass();\n\n SerializationConfig serializationConfig = _mapper.getSerializationConfig();\n AnnotationIntrospector introspector = serializationConfig.getAnnotationIntrospector();\n\n if (javaSuperType != null && !javaSuperType.hasGenericTypes()\n && introspector.findSubtypes(serializationConfig.introspect(javaSuperType).getClassInfo()) != null\n && !definedTypes.containsValue(javaSuperType)) {\n context.resolve(new AnnotatedType().type(javaSuperType).ctxAnnotations(javaSuperType.getRawClass().getAnnotations()));\n }\n }",
"Set<? extends TypeContract<? super _Type_>> getSuperTypeContracts();",
"private static Stream<Class<?>> superTypes(Class<?> type) {\n Class<?>[] interfaces = type.getInterfaces();\n return Stream.concat(\n Arrays.stream(interfaces).flatMap(SqlObjectFactory::superTypes),\n Arrays.stream(interfaces));\n }",
"Entity getSuperType();",
"private Stream<Element> superTypeForInheritDoc(JavacTask task, Element type) {\n TypeElement clazz = (TypeElement) type;\n Stream<Element> result = interfaces(clazz);\n result = Stream.concat(result, interfaces(clazz).flatMap(el -> superTypeForInheritDoc(task, el)));\n\n if (clazz.getSuperclass().getKind() == TypeKind.DECLARED) {\n Element superClass = ((DeclaredType) clazz.getSuperclass()).asElement();\n result = Stream.concat(result, Stream.of(superClass));\n result = Stream.concat(result, superTypeForInheritDoc(task, superClass));\n }\n\n return result;\n }",
"void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <[email protected]>\n\taddKnown(ROOT, prevClass);\n }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n public void setSuperType(Class<?> superType) {\n if (superType != null) {\n this.superType = type.getSupertype((Class) superType);\n }\n }",
"public Iterator<IEventType<T>> getDeepSuperTypes();",
"protected Set<NewType> getNewSubTypes() {\r\n\t\tfinal Set<NewType> subTypes = new HashSet<NewType>();\r\n\r\n\t\tfinal GeneratorContext context = this.getGeneratorContext();\r\n\t\tfinal Iterator<NewType> newTypesIterator = context.getNewTypes().iterator();\r\n\r\n\t\twhile (newTypesIterator.hasNext()) {\r\n\t\t\tfinal NewType newType = newTypesIterator.next();\r\n\t\t\tif (newType.getSuperType() == this) {\r\n\t\t\t\tsubTypes.add(newType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn subTypes;\r\n\t}",
"private void extendedLookupOfSuperTypes(\n Map<TypeElement, Map<TypeElement, List<ExecutableElement>>> routeMap,\n TypeElement parentTypeElement) {\n for (TypeElement superType : superTypes(parentTypeElement)) {\n // collect all declared methods\n Set<ExecutableElement> methods =\n superType.getEnclosedElements().stream()\n .filter(ExecutableElement.class::isInstance)\n .map(ExecutableElement.class::cast)\n .collect(Collectors.toCollection(LinkedHashSet::new));\n for (ExecutableElement method : methods) {\n // extract all annotation type elements\n LinkedHashSet<TypeElement> annotationTypes =\n method.getAnnotationMirrors().stream()\n .map(AnnotationMirror::getAnnotationType)\n .map(DeclaredType::asElement)\n .filter(TypeElement.class::isInstance)\n .map(TypeElement.class::cast)\n .collect(Collectors.toCollection(LinkedHashSet::new));\n\n for (TypeElement annotationType : annotationTypes) {\n if (Annotations.HTTP_METHODS.contains(annotationType.toString())) {\n // ensure map is created for parent type element\n Map<TypeElement, List<ExecutableElement>> mapping =\n routeMap.computeIfAbsent(parentTypeElement, k -> new LinkedHashMap<>());\n List<ExecutableElement> list =\n mapping.computeIfAbsent(annotationType, k -> new ArrayList<>());\n // ensure that the same method wasnt already defined in parent\n if (list.stream().map(this::signature).noneMatch(signature(method)::equals)) {\n list.add(method);\n }\n }\n }\n }\n }\n }",
"void setSuperEffectiveTo(List<Type> superEffectiveTo) {\n this.superEffectiveTo = superEffectiveTo;\n }",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"private static void setallSupertype(\n ModelElement modelElement\n ){\n // set supertypes of supertypes\n for(\n Iterator i = modelElement.supertypes.iterator();\n i.hasNext();\n ) {\n setallSupertype(\n modelTypeNames.get(i.next())\n );\n }\n // collect allSupertype\n ArrayList allSupertype = new ArrayList();\n for(\n Iterator i = modelElement.supertypes.iterator();\n i.hasNext();\n ) {\n ModelElement supertype = modelTypeNames.get(\n i.next()\n );\n for(\n Iterator j = supertype.allSupertypes.iterator();\n j.hasNext();\n ) {\n Object type = null;\n if(!allSupertype.contains(type = j.next())) {\n allSupertype.add(type);\n }\n }\n }\n\n // add modelElement itself\n allSupertype.add(\n modelElement.qualifiedName\n );\n modelElement.allSupertypes.clear();\n modelElement.allSupertypes.addAll(\n allSupertype\n );\n }",
"private static void setSubtype(\n ModelElement modelElement\n ){\n ArrayList subtypes = new ArrayList();\n ModelElement supertype = null;\n for(\n Iterator<ModelElement> i = modelTypeNames.values().iterator();\n i.hasNext();\n ) {\n supertype = i.next();\n if(\n supertype.allSupertypes.contains(\n modelElement.qualifiedName\n ) &&\n !subtypes.contains(supertype.qualifiedName)\n ) {\n subtypes.add(\n supertype.qualifiedName\n );\n }\n } \n modelElement.subtypes.clear();\n modelElement.subtypes.addAll(\n subtypes\n );\n }",
"public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"EPREFIX_TYPE getSuperType();",
"public IEventType<T>[] getSuperTypes();",
"@Override\n\t\t\t\t\tpublic Package handleTypeCollection(Package parent,\n\t\t\t\t\t\t\tFTypeCollection src) {\n\t\t\t\t\t\treturn super.handleTypeCollection(parent, src);\n\t\t\t\t\t}",
"public static void addTypeFieldInSubclasses(Model model) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"add a 'type' field in subclasses to enable instanceof at database level...\");\r\n\t\tfor (Entity e : model.getEntities())\r\n\t\t{\r\n\t\t\tif (e.isRootAncestor())\r\n\t\t\t{\r\n\t\t\t\tVector<Entity> subclasses = e.getAllDescendants();\r\n\t\t\t\tVector<String> enumOptions = new Vector<String>();\r\n\t\t\t\tenumOptions.add(firstToUpper(e.getName()));\r\n\t\t\t\tfor (Entity subclass : subclasses)\r\n\t\t\t\t{\r\n\t\t\t\t\tenumOptions.add(firstToUpper(subclass.getName()));\r\n\t\t\t\t}\r\n\t\t\t\tif (e.getField(Field.TYPE_FIELD) == null)\r\n\t\t\t\t{\r\n\t\t\t\t\tField type_field = new Field(e, new EnumField(), Field.TYPE_FIELD, Field.TYPE_FIELD, true, false,\r\n\t\t\t\t\t\t\ttrue, null);\r\n\t\t\t\t\ttype_field.setDescription(\"Subtypes have to be set to allow searching\");\r\n\t\t\t\t\t// FIXME should be true, but breaks existing apps\r\n\t\t\t\t\t// type_field.setSystem(true);\r\n\t\t\t\t\ttype_field.setHidden(true);\r\n\t\t\t\t\te.addField(0, type_field);\r\n\t\t\t\t}\r\n\t\t\t\te.getField(Field.TYPE_FIELD).setEnumOptions(enumOptions);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\te.removeField(e.getField(Field.TYPE_FIELD));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}",
"void setSuperEffectiveFrom(List<Type> superEffectiveFrom) {\n this.superEffectiveFrom = superEffectiveFrom;\n }",
"@Override\n public List<Type> getProperlySubsumedTypes(Type type) {\n return ((TypeImpl) type).getAllSubtypes().collect(Collectors.toList());\n }",
"public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}",
"@Override\n public Vector<Type> getDirectlySubsumedTypes(Type type) {\n return new Vector<>(getDirectSubtypes(type));\n }",
"private void addCollectionType(Class type, Class superType)\r\n\t{\r\n\t\tVector v;\r\n\t\tif(!collectionTypes.containsKey(type))\r\n\t\t{\r\n\t\t\tv = new Vector();\r\n\t\t\tv.add(superType);\r\n\t\t\tcollectionTypes.put(type, v);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tv = (Vector) collectionTypes.get(type);\r\n\t\t\tif(! v.contains(superType))\r\n\t\t\t\tv.add(superType);\r\n\t\t}\r\n\t}",
"private void superTypes(TypeSpec.Builder classBuilder, TypeElement originClassType, String packageName, Set<ColumnDefinition> columnDefinitions) {\n if( originClassType == null )\n return;\n\n final TypeMirror objectClassType = elements.getTypeElement( Object.class.getName() ).asType();\n final TypeMirror originSuperClassType = originClassType.getSuperclass();\n if( !types.isSameType( originSuperClassType, objectClassType ) && types.asElement( originSuperClassType ).getAnnotation( Contract.class ) == null ) {\n final TypeElement originSuperClass = elements.getTypeElement( originSuperClassType.toString() );\n generateInterface( originSuperClass, packageName, columnDefinitions );\n classBuilder.addSuperinterface( ClassName.bestGuess( originSuperClass.getQualifiedName().toString() + \"Model\" ) );\n }\n }",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"public Type getSuper() {\n\t\treturn superClass;\n\t}",
"public static Map<String, List<String>> filterSuperTypes(final String packageName,\n final Imports imports,\n final Map<String, List<String>> projectSuperTypes) {\n final Map<String, List<String>> scopedSuperTypes = new HashMap<String, List<String>>();\n for (Map.Entry<String, List<String>> e : projectSuperTypes.entrySet()) {\n final String typeQualifiedType = e.getKey();\n final String typePackageName = getPackageName(typeQualifiedType);\n final String typeTypeName = getTypeName(typeQualifiedType);\n\n final List<String> superTypeQualifiedTypes = e.getValue();\n\n if (superTypeQualifiedTypes == null) {\n //Doesn't have a Super Type\n if (typePackageName.equals(packageName) || isImported(typeQualifiedType,\n imports)) {\n scopedSuperTypes.put(typeTypeName,\n superTypeQualifiedTypes);\n }\n } else {\n //Has a Super Type\n if (typePackageName.equals(packageName) || isImported(typeQualifiedType,\n imports)) {\n ArrayList<String> result = new ArrayList<String>();\n\n for (String superTypeQualifiedType : superTypeQualifiedTypes) {\n final String superTypePackageName = getPackageName(superTypeQualifiedType);\n final String superTypeTypeName = getTypeName(superTypeQualifiedType);\n\n if (superTypePackageName.equals(packageName) || isImported(superTypeQualifiedType,\n imports)) {\n result.add(superTypeTypeName);\n } else {\n result.add(superTypeQualifiedType);\n }\n }\n\n scopedSuperTypes.put(typeTypeName,\n result);\n }\n }\n }\n return scopedSuperTypes;\n }",
"@Pure\n\tprotected boolean isSubTypeOf(EObject context, JvmTypeReference subType, JvmTypeReference superType) {\n\t\tif (isTypeReference(superType) && isTypeReference(subType)) {\n\t\t\tStandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, context);\n\t\t\tLightweightTypeReferenceFactory factory = new LightweightTypeReferenceFactory(owner, false);\n\t\t\tLightweightTypeReference reference = factory.toLightweightReference(subType);\n\t\t\treturn reference.isSubtypeOf(superType.getType());\n\t\t}\n\t\treturn false;\n\t}",
"public MsgSubsidiaryType() {\r\n\t\tsuper();\r\n\t\t// _INDIVIDUALList = new ArrayList();\r\n\t\t_DEALERList = new ArrayList();\r\n\t}",
"@Override\n public Type getParentType() {\n return parentType;\n }",
"@Override\r\n\tpublic TypeWrapper getSuperClass() {\n\t\treturn null;\r\n\t}",
"public TypeData getSuperClass() {\n return m_superClass;\n }",
"public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }",
"boolean isSuperType(@NotNull DfType other);",
"public InsulinType(){\n super();\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static boolean getTypeParameters(Type superType, TypeDefinition finalType, TypeVariable[] vars, TypeDefinition[] params) {\n\t\tif (superType instanceof ParameterizedType)\n\t\t\treturn getTypeParameters((ParameterizedType)superType, finalType, vars, params);\n\t\treturn false;\n\t}",
"public org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceSubType> listSubTypes()\r\n {\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceSubType>(getSemanticObject().listObjectProperties(swb_hasPTSubType));\r\n }",
"private EClass[] getTypedRelationships(EClass supertype) {\n ArrayList<EClass> list = new ArrayList<EClass>();\n \n for(EClass eClass : ArchimateModelUtils.getRelationsClasses()) {\n if(supertype.isSuperTypeOf(eClass)) {\n list.add(eClass);\n }\n }\n \n return list.toArray(new EClass[list.size()]);\n }",
"public abstract void process(final EClass Super, final EClass Sub);",
"public List<Class<?>> getAllSuperTypes(Class<?> aClass) {\n\t\tList<Class<?>> result = new ArrayList<Class<?>>();\n\n\t\tthis.getAllSuperTypes(aClass, result);\n\t\tthis.getAllInterfaces(aClass, result);\n\n\t\treturn result;\n\t}",
"boolean matchesType( Name primaryType,\n Set<Name> mixinTypes );",
"public JavaType refine(Class<?> rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)\n/* */ {\n/* 162 */ return new CollectionLikeType(rawType, bindings, superClass, superInterfaces, this._elementType, this._valueHandler, this._typeHandler, this._asStatic);\n/* */ }",
"public void buildSuperInterfacesInfo() {\n\t\twriter.writeSuperInterfacesInfo();\n\t}",
"@Override\n\tpublic void type() {\n\t\t\n\t}",
"@Override\n protected String getSuperType() {\n return Federator.class.getSimpleName();\n }",
"public boolean isSeen(TypeReference type, boolean withSuper) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (withSuper) {\n return seenTypes.containsKey(type);\n } else {\n if (seenTypes.containsKey(type)) {\n if (seenTypes.get(type).get(0).type.equals(type)) {\n return true;\n }\n }\n return false;\n\n }\n }",
"private void addSuperClasses(Integer directSuperClass,\n\t\t\tClassRecord subClassRecord) {\n\t\tif (subClassRecord.superClasses.contains(directSuperClass)) {\n\t\t\treturn;\n\t\t}\n\t\tsubClassRecord.superClasses.add(directSuperClass);\n\t\tClassRecord superClassRecord = getClassRecord(directSuperClass);\n\t\tif (superClassRecord == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (Integer superClass : superClassRecord.directSuperClasses) {\n\t\t\taddSuperClasses(superClass, subClassRecord);\n\t\t}\n\t}",
"private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }",
"List<ITypeDescriptor> getSubTypes(String type) throws StoreException;",
"public GetTypes(AuthorizationInformation authorizationInformation)\n {\n super(authorizationInformation);\n }",
"public void setSuperClass(TypeData sclas) {\n m_superClass = sclas;\n if (sclas != null) {\n boolean imported = m_importsTracker.addImport(sclas.getFullName(), false);\n if (s_logger.isDebugEnabled()) {\n s_logger.debug(\"Set superclass of \" + getFullName() + \" to \" + sclas.getFullName() +\n (imported ? \" (imported)\" : \"\"));\n }\n }\n }",
"private Long putSupertypeOnRecordType(Long recordTypeVersion, Put put, SchemaId supertypeId, Long supertypeVersion)\n throws TypeException {\n RecordType recordType = getRecordTypeByIdWithoutCache(supertypeId, supertypeVersion).get(0);\n Long newSupertypeVersion = recordType.getVersion();\n put.add(TypeCf.SUPERTYPE.bytes, supertypeId.getBytes(), recordTypeVersion, Bytes.toBytes(newSupertypeVersion));\n return newSupertypeVersion;\n }",
"public int getSubtype() {\r\n return Subtype;\r\n }",
"public void setSubtype(typekey.LocationNamedInsured value);",
"private void writeDerivedTypes( String tagName, TypeItem current, Iterator itr, XMLWriter out ) {\n\t\twhile( itr.hasNext() ) {\n\t\t\tTypeItem type = (TypeItem)itr.next();\n\t\t\t\n\t\t\tboolean isDerived = false;\n\t\t\t\n\t\t\tif(type.getSuperType()==current)\n\t\t\t\tisDerived = true;\n\t\t\t\n\t\t\tType[] itfs = type.getInterfaces();\n\t\t\tfor( int i=0; i<itfs.length; i++ )\n\t\t\t\tif( itfs[i]==current )\n\t\t\t\t\tisDerived = true;\n\t\t\t\n\t\t\tif(isDerived)\n\t\t\t\tout.element(tagName, new String[]{\"name\",type.getTypeName()});\n\t\t}\n\t}",
"public static Set<AnnotatedDeclaredType> getSuperTypes(AnnotatedDeclaredType type) {\n\n Set<AnnotatedDeclaredType> supertypes = new LinkedHashSet<>();\n if (type == null) {\n return supertypes;\n }\n\n // Set up a stack containing the type mirror of subtype, which\n // is our starting point.\n Deque<AnnotatedDeclaredType> stack = new ArrayDeque<>();\n stack.push(type);\n\n while (!stack.isEmpty()) {\n AnnotatedDeclaredType current = stack.pop();\n\n // For each direct supertype of the current type, if it\n // hasn't already been visited, push it onto the stack and\n // add it to our supertypes set.\n for (AnnotatedDeclaredType supertype : current.directSuperTypes()) {\n if (!supertypes.contains(supertype)) {\n stack.push(supertype);\n supertypes.add(supertype);\n }\n }\n }\n\n return Collections.<AnnotatedDeclaredType>unmodifiableSet(supertypes);\n }",
"public void setUsertype(String usertype) {\n this.usertype = usertype;\n }",
"@Override\n public AnnotatedTypeMirror visitArray(AnnotatedArrayType type, AnnotatedTypeMirror p) {\n if (shouldStop(p, type)) {\n return type;\n }\n for (AnnotatedTypeMirror st : type.directSuperTypes()) {\n AnnotatedTypeMirror x = asSuper(types, atypeFactory, st, p);\n if (x != null) {\n return isErased(types, x, p) ? x.getErased() : x;\n }\n }\n return null;\n }",
"@ApiModelProperty(value = \"When sub-classing, this defines the super-class\")\n\n\n public String getBaseType() {\n return baseType;\n }",
"@ApiModelProperty(value = \"When sub-classing, this defines the super-class\")\n\n\n public String getBaseType() {\n return baseType;\n }",
"@Override\n public String getType() {\n return super.getType().toLowerCase();\n }",
"private static AnnotatedTypeMirror asOuterSuper(Types types, AnnotatedTypeFactory atypeFactory, AnnotatedTypeMirror t,\n AnnotatedTypeMirror elem) {\n switch (t.getKind()) {\n case DECLARED:\n AnnotatedDeclaredType dt = (AnnotatedDeclaredType) t;\n do {\n // Search among supers for a desired supertype\n AnnotatedTypeMirror s = asSuper(types, atypeFactory, dt, elem);\n if (s != null) {\n return s;\n }\n // if not found immediately, try enclosing type\n // like A in A.B\n dt = dt.getEnclosingType();\n } while (dt != null);\n return null;\n case ARRAY: // intentional follow-through\n case TYPEVAR: // intentional follow-through\n case WILDCARD:\n return asSuper(types, atypeFactory, t, elem);\n default:\n return null;\n }\n }",
"Object visitSubtype(SubtypeNode node, Object state);",
"java.lang.String getSubType();",
"public byte getSubType() {\n return this.subType;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.LocationNamedInsured getSubtype();",
"public void setUsertype(java.lang.String usertype) {\n this.usertype = usertype;\n }",
"@Override\n\tpublic void registerPrimaryTypes() {\n\t\tclassType = registerJavaType(getBean().getName(), CLASS);\n\t\tinterfaceType = registerJavaType(\"I\" + getBean().getName(), INTERFACE);\n\n\t\t// Provide lookup\n\t\tbean.setTypes(classType, interfaceType);\n\n\t\tsetExtends(classType, interfaceType);\n\t}",
"public List<TypeReference> getSuperList() {\n\t\treturn superList;\n\t}",
"public FactType addSuperType(String nameSupertype, String nameSubtype,\r\n ExternalInput source)\r\n throws DuplicateException, ChangeNotAllowedException {\r\n if (nameSubtype.isEmpty() || nameSupertype.isEmpty()) {\r\n return null;\r\n }\r\n\r\n FactType subtype = typeRepository.getFactType(nameSubtype);\r\n if (subtype == null) {\r\n throw new RuntimeException(\"subtype doesn't exist\");\r\n }\r\n FactType supertype = getFactType(nameSupertype);\r\n if (supertype == null) {\r\n supertype = new FactType(nameSupertype, true, this, subtype);\r\n typeRepository.putFactType(supertype);\r\n publisher.inform(this, \"newType\", null, supertype);\r\n }\r\n\r\n subtype.getObjectType().addSuperType(supertype.getObjectType());\r\n\r\n fireListChanged();\r\n return supertype;\r\n }",
"public void toggleSuperAS() {\n this.isSuperAS = true;\n }",
"@ApiModelProperty(value = \"When sub-classing, this defines the sub-class Extensible name\")\n\n\n public String getType() {\n return type;\n }",
"@Override\n\tpublic void registerPrimaryTypes() {\n\t\tobjectType = registerJavaType(getBuilder().getName(), ClassType.CLASS);\n\t}",
"@Override\n\tfinal public int compareTo(Type o) {\n\t\t// it is necessary, that we can assume this!=o later on\n\t\tif (this == o)\n\t\t\treturn 0;\n\n\t\tboolean r, l;\n\t\t// check for ground types\n\t\tif ((l = (this instanceof GroundType)) | (r = (o instanceof GroundType))) {\n\t\t\treturn l == r ? 0 : (l ? -1 : 1);\n\t\t}\n\t\t// check for compound types\n\t\tif ((l = (this instanceof ContainerType)) | (r = (o instanceof ContainerType))) {\n\t\t\treturn l == r ? 0 : (l ? -1 : 1);\n\t\t}\n\n\t\t// we have to compare declarations\n\t\tUserType t = (UserType) this, s = (UserType) o;\n\n\t\tif ((l = (t.getBaseType() == null)) | (r = (s.getBaseType() == null))) {\n\t\t\tif (l && r)\n\t\t\t\treturn t.getName().compareTo(s.getName());\n\n\t\t\t// the base type is smaller\n\t\t\treturn s.getBaseType() == t ? -1 : 1;\n\t\t}\n\n\t\tif (t.getBaseType() == s.getBaseType()) {\n\t\t\tStack<UserType> left = new Stack<>(), right = new Stack<>();\n\t\t\t// collect super types\n\t\t\tfor (UserType i = t; i != null; i = i.getSuperType())\n\t\t\t\tleft.push(i);\n\t\t\tfor (UserType i = s; i != null; i = i.getSuperType())\n\t\t\t\tright.push(i);\n\n\t\t\t// pop common super classes (can not be null, because this is not\n\t\t\t// equal)\n\t\t\twhile (left.peek() == right.peek()) {\n\t\t\t\tleft.pop();\n\t\t\t\tright.pop();\n\t\t\t}\n\n\t\t\tif (left.isEmpty())\n\t\t\t\treturn -1;\n\t\t\tif (right.isEmpty())\n\t\t\t\treturn 1;\n\n\t\t\treturn left.peek().getName().compareTo(right.peek().getName());\n\t\t}\n\n\t\treturn t.getBaseType().getName().compareTo(s.getBaseType().getName());\n\t}",
"private void setupInheritanceStructure() throws PhiException{\n\n a = new PhiCollection();\n b = new PhiCollection();\n c = new PhiCollection();\n d = new PhiCollection();\n aSuper = new PhiCollection();\n bSuper = new PhiCollection();\n PhiCollection cSuper = new PhiCollection();\n\n //Setup inheritance\n aSuper.createMember(new PhiInt(1));\n aSuper.setUnnamed(0, b);\n aSuper.setUnnamed(1, c);\n a.setNamed(\"super\", aSuper);\n\n bSuper.createMember(new PhiInt(0));\n bSuper.setUnnamed(0, d);\n b.setNamed(\"super\", bSuper);\n\n cSuper.createMember(new PhiInt(0));\n cSuper.setUnnamed(0, d);\n c.setNamed(\"super\", cSuper);\n\n //Fill collections\n a.createMember(new PhiSymbol(\"test1\"));\n a.createMember(new PhiInt(0));\n a.setNamed(\"test1\", new PhiString(\"a\"));\n a.setUnnamed(0, new PhiInt(1));\n\n b.createMember(new PhiSymbol(\"test1\"));\n b.createMember(new PhiSymbol(\"test2\"));\n b.createMember(new PhiInt(0));\n b.setNamed(\"test1\", new PhiString(\"b\"));\n b.setNamed(\"test2\", new PhiString(\"x\"));\n b.setUnnamed(0, new PhiInt(2));\n\n c.createMember(new PhiSymbol(\"test1\"));\n c.createMember(new PhiInt(1));\n c.setNamed(\"test1\", new PhiString(\"c\"));\n c.setUnnamed(0, new PhiInt(3));\n c.setUnnamed(1, new PhiInt(5));\n\n d.createMember(new PhiSymbol(\"test1\"));\n d.createMember(new PhiSymbol(\"test2\"));\n d.createMember(new PhiInt(1));\n d.setNamed(\"test1\", new PhiString(\"d\"));\n d.setNamed(\"test2\", new PhiString(\"y\"));\n d.setUnnamed(0, new PhiInt(4));\n d.setUnnamed(1, new PhiInt(6));\n }",
"public String getSubType() {\n return typeString;\n }",
"void setForPersistentMapping_BaseType(Type baseType) {\n this.baseType = baseType;\n }",
"public boolean isSubclassOf(AClass super_class) {\n\t\tAClass tmp = this;\n\t\twhile (tmp != super_class) {\n\t\t\tif (tmp.isObject()) {\n\t\t\t\t// tmp == Object and tmp != super_class => tmp cannot inherit\n\t\t\t\t// from super_class\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttmp = tmp.getSuperClass();\n\t\t}\n\t\t// if we reach this point, tmp == super_class\n\t\treturn true;\n\t}",
"public abstract void setType();",
"abstract public Type getType();",
"public void setSubtype (String subtype) {\n this.subtype = subtype;\n }",
"public void setUsertype(Integer usertype) {\n this.usertype = usertype;\n }",
"public void setSubtype (String subtype) {\n this.subtype = subtype;\n }",
"public JavaType refine(Class<?> contentClass, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces)\n/* */ {\n/* 124 */ return null;\n/* */ }",
"public Set<Type> getSubTypes() {\r\n\t\tfinal Set<Type> subTypes = this.createSubTypes();\r\n\r\n\t\tfinal Set<Type> merged = new HashSet<Type>();\r\n\t\tmerged.addAll(subTypes);\r\n\t\tmerged.addAll(this.getNewSubTypes());\r\n\r\n\t\treturn Collections.unmodifiableSet(merged);\r\n\t}",
"@Override\n public AnnotatedTypeMirror visitDeclared(AnnotatedDeclaredType type, AnnotatedTypeMirror p) {\n if (p.getKind().isPrimitive()) {\n if (TypesUtils.isBoxedPrimitive(type.getUnderlyingType())) {\n return visit(atypeFactory.getUnboxedType(type), p);\n } else {\n // TODO: is there something better we could do?\n // See tests/framework/Unboxing.java\n return null;\n }\n }\n\n if (shouldStop(p, type)) {\n return type;\n }\n\n // Visit the superclass first!\n for (AnnotatedDeclaredType st : type.directSuperTypes()) {\n if (st.getKind() == TypeKind.DECLARED) {\n AnnotatedDeclaredType x = (AnnotatedDeclaredType) asSuper(types, atypeFactory, st, p);\n if (x != null) {\n return x;\n }\n }\n }\n\n if (p.getKind() == TypeKind.TYPEVAR) {\n return asSuper(types, atypeFactory, type, ((AnnotatedTypeVariable)p).getUpperBound());\n }\n if (p.getKind() == TypeKind.WILDCARD) {\n return asSuper(types, atypeFactory, type, ((AnnotatedWildcardType)p).getExtendsBound().deepCopy());\n }\n return null;\n }",
"protected void updateTypeList() {\n\t sequenceLabel.setText(\"Sequence = \" + theDoc.theSequence.getId());\n\t typeList.setListData(theDoc.theTypes);\n\t signalList.setListData(nullSignals);\n\t valueField.setEnabled(false);\n\t valueList.setEnabled(false);\n }",
"private ArrayList findAllSubclasses(List listSuperClasses,\r\n\t\t\tList listAllClasses) {\r\n\t\treturn findAllSubclasses(listSuperClasses, listAllClasses, false);\r\n\t}",
"protected abstract String getType();",
"protected long doGetNumberOfSupertypes() {\r\n\t\treturn getParentIndex().getSupertypes().size();\r\n\t}",
"public void completeBaseType_Type(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t\t// subclasses may override\n\t}",
"private static void handlePolymorphism() {\n\n for(String subClass : superDict.keySet()) {\n addPlace(subClass);\n for (String superClass : superDict.get(subClass)) {\n addPlace(superClass);\n String methodName = subClass + \"IsPolymorphicTo\" + superClass;\n petrinet.createTransition(methodName);\n petrinet.createFlow(subClass, methodName, 1);\n petrinet.createFlow(methodName, superClass, 1);\n }\n }\n }",
"@Override\n public Type getType() {\n return type;\n }",
"@Override\n public Type getType() {\n return type;\n }",
"public boolean checkSuperClass(OWLClass class1, OWLClass class2) {\n \n Set<OWLClass> supers = new HashSet<OWLClass>();\n \n for (Set<OWLClass> set : loader.getSuperClasses(class1)) {\n supers.addAll(set);\n }\n \n for (OWLClass cls : supers) {\n if (cls.getIRI().equals(class2.getIRI())) {\n return true;\n }\n }\n return false;\n }",
"List<Type> getAllTypeList();",
"@Override\n public void resolveObjectIdentifier() {\n // if there is only one superclass, we could get the type\n if (!isObjectIDResolved()) {\n String classID = resolveTypeBinding(((SuperMethodInvocation) getASTNode()).getQualifier());\n if ((classID != null) && !classID.equals(\"\")) {\n setResolvedID(classID);\n }\n }\n }",
"public abstract Type getType();"
] | [
"0.70434594",
"0.66576296",
"0.62356114",
"0.6109012",
"0.60242045",
"0.6009928",
"0.59627825",
"0.59574467",
"0.59379345",
"0.57971156",
"0.5789018",
"0.57528555",
"0.56724375",
"0.5641994",
"0.56111014",
"0.560748",
"0.55669427",
"0.55293083",
"0.5525687",
"0.55133283",
"0.5495034",
"0.54846764",
"0.5483583",
"0.54543483",
"0.543911",
"0.5412743",
"0.538223",
"0.53613406",
"0.5353648",
"0.5347491",
"0.5342827",
"0.52997625",
"0.52563274",
"0.52482384",
"0.5247341",
"0.519681",
"0.51887876",
"0.5143394",
"0.5133187",
"0.5115041",
"0.51125056",
"0.50995237",
"0.5080351",
"0.5077616",
"0.50724435",
"0.50606436",
"0.50532115",
"0.5046909",
"0.50398576",
"0.5033488",
"0.50314677",
"0.50228834",
"0.5012754",
"0.5006945",
"0.49750808",
"0.49746886",
"0.49558163",
"0.49486852",
"0.49478313",
"0.49446726",
"0.49319786",
"0.49279353",
"0.49279353",
"0.4919098",
"0.4918359",
"0.49165982",
"0.4913986",
"0.49128944",
"0.49125993",
"0.49002054",
"0.48938575",
"0.48749864",
"0.4871624",
"0.48622385",
"0.4860403",
"0.48545694",
"0.484485",
"0.4844737",
"0.48380655",
"0.48339885",
"0.4818741",
"0.4814286",
"0.4814074",
"0.48104206",
"0.48072305",
"0.48040867",
"0.4796154",
"0.4782113",
"0.47778216",
"0.4763869",
"0.47402596",
"0.4732535",
"0.47299597",
"0.47293666",
"0.47252122",
"0.4713905",
"0.4713905",
"0.47120598",
"0.47032684",
"0.47024035",
"0.4692967"
] | 0.0 | -1 |
Dont skip the most derived test when searching for the most derived method. | @Override
protected boolean skipInitialType() {
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}",
"@Ignore\n @Test\n public void discoverOneTypes() throws Exception {\n }",
"@Test\n public void atBaseTypeTest() {\n // TODO: test atBaseType\n }",
"public void nonTestCase(boolean isTestAll) { }",
"@Ignore\n @Test\n public void discoverSeveralTypes() throws Exception {\n }",
"@Override\r\n\t\t\tpublic void _dont_implement_Matcher___instead_extend_BaseMatcher_() {\n\t\t\t\t\r\n\t\t\t}",
"public abstract void test();",
"public abstract void test();",
"@Ignore\n @Test\n public void discoverNoTypes() throws Exception {\n }",
"@Test\n\tvoid shouldFailIfBadTestsAreNotFiltered() {\n\t\tfinal Set<String> failingMethods = new HashSet<String>(Arrays.asList(\"shouldNotBeTestedGroup\", \"shouldNotBeTestedGroup3\", \"shouldNotBeTestedGroup2\"));\n\t\tTestResults results = runner.runTest(CLASS_UNDER_TEST);\n\t\tint counter = 0;\n\t\tfor (TestEvent testEvent : results) {\n\t\t\tcounter++;\n\t\t\tassertTrue(failingMethods.contains(testEvent.getTestMethod()));\n\t\t\tassertEquals(AssertionError.class.getName(), testEvent.getFullErrorClassName());\n\t\t\tassertEquals(CLASS_UNDER_TEST, testEvent.getTestName());\n\t\t}\n\t\tassertEquals(failingMethods.size(), counter);\n\t}",
"@Override\n\tpublic void test() {\n\t\t\n\t}",
"@Test\n public void test4() {\n class mini_tests {\n public void test4_1() {\n try {\n tester.testOnInheritanceTree(null, testClass);\n Assert.fail();\n }\n catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test4_2() {\n try {\n tester.testOnInheritanceTree(Story3, null);\n Assert.fail();\n }\n catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test4_3() {\n try {\n tester.testOnInheritanceTree(null, null);\n Assert.fail();\n } catch (IllegalArgumentException e) {\n Assert.assertTrue(true);\n } catch (Throwable e) {\n Assert.fail();\n }\n }\n }\n mini_tests t = new mini_tests();\n t.test4_1();\n t.test4_2();\n t.test4_3();\n }",
"@Override\n public void test() {\n \n }",
"@Override\n\tpublic void testPringt() {\n\t\tSystem.out.println(\"我是一个被代理的类\");\n\t}",
"@Test\n public void should_find_one_test_unit_for_one_feature_available_in_classpath_using_subclassed_runner() throws Exception {\n \tList<TestUnit> testUnits = finder.findTestUnits(HideFromJUnit.Pepino.class);\n \t\n \t// then\n \tassertThat(testUnits).hasSize(1);\n \tDescription description = testUnits.get(0).getDescription();\n \tassertThat(description.getFirstTestClass()).contains(HideFromJUnit.Pepino.class.getSimpleName());\n \tassertThat(description.getName()).containsIgnoringCase(\"Shopping\").containsIgnoringCase(\"change\");\n }",
"@Override\r\n\t\t\tpublic void test() {\n\t\t\t}",
"@Override\n\tpublic boolean shouldSkipClass(Class<?> classe) {\n\t\t\n\t\t \n\t\treturn false;\n\t}",
"protected void runTest() throws Throwable {\n assertNotNull(\"TestCase.fName cannot be null\", fName); // Some VMs crash when calling getMethod(null,null);\n Method runMethod= null;\n try {\n // use getMethod to get all public inherited\n // methods. getDeclaredMethods returns all\n // methods of this class but excludes the\n // inherited ones.\n runMethod= getClass().getMethod(fName, (Class [])null);\n } catch (NoSuchMethodException e) {\n fail(\"Method \\\"\"+fName+\"\\\" not found\");\n }\n if (!Modifier.isPublic(runMethod.getModifiers())) {\n fail(\"Method \\\"\"+fName+\"\\\" should be public\");\n }\n\n try {\n runMethod.invoke(this);\n }\n catch (InvocationTargetException e) {\n e.fillInStackTrace();\n throw e.getTargetException();\n }\n catch (IllegalAccessException e) {\n e.fillInStackTrace();\n throw e;\n }\n }",
"@Disabled\n void ignoredTestMethod() {\n }",
"@Override\r\n\t\tprotected boolean visit(final Type type) {\r\n\t\t\tChecker.notNull(\"parameter:type\", type);\r\n\r\n\t\t\tfinal Method method = type.findMethod(this.getMethodName(), this.getParameterTypes());\r\n\t\t\tfinal boolean skipRemaining = method != null;\r\n\t\t\tif (skipRemaining) {\r\n\t\t\t\tthis.setFound(method);\r\n\t\t\t}\r\n\t\t\treturn skipRemaining;\r\n\t\t}",
"@Test\n public void test9() {\n class mini_tests {\n public void test9_1() {\n try {\n tester.testOnInheritanceTree(Story9_1, testClass);\n Assert.fail();\n } catch (GivenNotFoundException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test9_2() {\n try {\n tester.testOnNestedClasses(Story9_2, testClass);\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test9_3() {\n try {\n tester.testOnNestedClasses(Story9_3, testClass);\n Assert.fail();\n } catch (WhenNotFoundException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n }\n mini_tests t = new mini_tests();\n t.test9_1();\n t.test9_2();\n t.test9_3();\n }",
"@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}",
"@Ignore\n\t public void ignoreTest() {\n\t System.out.println(\"in ignore test\");\n\t }",
"public void doLazyMatch() {}",
"abstract protected boolean checkMethod();",
"private void runBeforeClassMethods() throws Throwable {\n try {\n for (Method method : getTargetMethods(BeforeClass.class)) {\n invoke(method, null);\n }\n } catch (Throwable t) {\n throw augmentStackTraceNoContext(t, runnerRandomness);\n }\n }",
"@Test\n public void test5() throws Exception {\n class mini_tests {\n public void test5_1() {\n try {\n tester.testOnInheritanceTree(Story5_1, testClass);\n Assert.fail();\n }\n catch (WhenNotFoundException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test5_2() {\n try {\n tester.testOnInheritanceTree(Story5_2, testClass);\n Assert.fail();\n }\n catch (GivenNotFoundException e) {\n Assert.assertTrue(true);\n }\n catch (Throwable e) {\n Assert.fail();\n }\n }\n public void test5_3() {\n try {\n tester.testOnInheritanceTree(Story5_3, testClass);\n Assert.fail();\n } catch (ThenNotFoundException e) {\n Assert.assertTrue(true);\n } catch (Throwable e) {\n Assert.fail();\n }\n }\n }\n mini_tests t = new mini_tests();\n t.test5_1();\n t.test5_2();\n t.test5_3();\n }",
"@Test\n public void test8() throws Exception {\n try {\n tester.testOnInheritanceTree(Story8, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"@Override\n public void runTest() {\n }",
"@Override\n\tboolean isRegistedMethodNotNeed() {\n\t\treturn true;\n\t}",
"public void method_6349() {\r\n super.method_6349();\r\n }",
"@Override\n\t\tpublic void onTestSkipped(ITestResult result) {\n\t\t\tSystem.out.println((result.getMethod().getMethodName() + \" skipped!\"));\n\t\t\t\n\t \n\t if(result.getThrowable()==null) {\n\t\t test.get().skip(\"Dependant tests failed\");\n\t\t }else {\n\t\t \t test.get().skip(result.getThrowable());\n\t\t }\n\t}",
"@Override\n\tpublic void find() {\n\t\tSystem.out.println(\"find method\");\n\t}",
"@Ignore\r\n\tpublic void ignoreTest() {\r\n\t\tSystem.out.println(\"in ignore test\");\r\n\t}",
"public void testIgnored(Description description) throws java.lang.Exception {\n test.skip(description.getDisplayName());\n System.out.println(\"Execution of test case ignored : \" + description.getMethodName());\n }",
"public void disabled_testInheritedAnnotation() throws Throwable {\n\t\tProcessorTestStatus.reset();\n\t\tIJavaProject jproj = createJavaProject(_projectName);\n\t\tdisableJava5Factories(jproj);\n\t\tIProject proj = jproj.getProject();\n\t\tIPath projPath = proj.getFullPath();\n\t\tIPath root = projPath.append(\"src\");\n\t\t\n\t\tenv.addClass(root, \"\", \"Base\",\n\t\t\t\t\"import org.eclipse.jdt.apt.pluggable.tests.annotations.InheritedTrigger;\\n\" +\n\t\t\t\t\"@InheritedTrigger(0)\\n\" +\n\t\t\t\t\"public class Base {}\"\n\t\t);\n\n\t\t// Because Sub extends Base, it should be treated as if it were annotated with InheritedTrigger\n\t\tenv.addClass(root, \"\", \"Sub\",\n\t\t\t\t\"public class Sub extends Base {\\n\" +\n\t\t\t\t\"}\"\n\t\t);\n\t\t\t\n\t\tAptConfig.setEnabled(jproj, true);\n\t\t\n\t\tfullBuild();\n\t\texpectingNoProblems();\n\t\tList<String> elements = InheritedAnnoProc.getProcessedElements();\n\t\tassertTrue(elements.contains(\"Base\"));\n\t\tassertTrue(elements.contains(\"Sub\"));\n\t\tassertTrue(\"Processor did not run\", ProcessorTestStatus.processorRan());\n\t\tassertEquals(\"Processor reported errors\", ProcessorTestStatus.NO_ERRORS, ProcessorTestStatus.getErrors());\n\n\t\t// Modify base class and verify that both base and subclass get processed\n\t\tInheritedAnnoProc.clearProcessedElements();\n\t\tenv.addClass(root, \"\", \"Base\",\n\t\t\t\t\"import org.eclipse.jdt.apt.pluggable.tests.annotations.InheritedTrigger;\\n\" +\n\t\t\t\t\"@InheritedTrigger(1)\\n\" +\n\t\t\t\t\"public class Base {}\"\n\t\t);\n\t\tincrementalBuild();\n\t\texpectingNoProblems();\n\t\telements = InheritedAnnoProc.getProcessedElements();\n\t\tassertTrue(elements.contains(\"Base\"));\n\t\tassertTrue(elements.contains(\"Sub\"));\n\t\tassertTrue(\"Processor did not run\", ProcessorTestStatus.processorRan());\n\t\tassertEquals(\"Processor reported errors\", ProcessorTestStatus.NO_ERRORS, ProcessorTestStatus.getErrors());\n\t\t\n\t\t// Modify subclass and verify that it gets processed\n\t\tInheritedAnnoProc.clearProcessedElements();\n\t\tenv.addClass(root, \"\", \"Sub\",\n\t\t\t\t\"public class Sub extends Base {\\n\" +\n\t\t\t\t\" // this line is new\\n\" +\n\t\t\t\t\"}\"\n\t\t);\n\t\tincrementalBuild();\n\t\texpectingNoProblems();\n\t\telements = InheritedAnnoProc.getProcessedElements();\n\t\tassertTrue(elements.contains(\"Sub\"));\n\t\tassertTrue(\"Processor did not run\", ProcessorTestStatus.processorRan());\n\t\tassertEquals(\"Processor reported errors\", ProcessorTestStatus.NO_ERRORS, ProcessorTestStatus.getErrors());\n\t}",
"public void nonTestCase(boolean isTestAll, boolean didCompileFail) { }",
"abstract int pregnancy();",
"@Test\n public void test() throws Exception {\n String referenceResult = expectedResults.apply(isDexVmBetween5_1_1and7_0_0(parameters));\n R8TestCompileResult compiled =\n compilationResults.apply(\n new Dimensions(parameters.getBackend(), enableVerticalClassMerging));\n compiled\n .run(parameters.getRuntime(), NonVirtualOverrideTestClass.class)\n .assertSuccessWithOutput(referenceResult);\n\n // Check that B is present and that it doesn't contain the unused private method m2.\n if (!enableVerticalClassMerging) {\n CodeInspector inspector = compiled.inspector();\n ClassSubject classSubject = inspector.clazz(B.class.getName());\n assertThat(classSubject, isPresentAndRenamed());\n assertThat(classSubject.method(\"void\", \"m1\", ImmutableList.of()), isPresent());\n assertThat(classSubject.method(\"void\", \"m2\", ImmutableList.of()), not(isPresent()));\n assertThat(classSubject.method(\"void\", \"m3\", ImmutableList.of()), isPresent());\n assertThat(classSubject.method(\"void\", \"m4\", ImmutableList.of()), not(isPresent()));\n }\n }",
"public void runTestSearch() throws TorqueException {\r\n\t}",
"@Override\n\tdefault void testDef() {\n\t\tTest1.super.testDef();\n\t}",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLauncherIsWhereExpected() throws Throwable {\n\t}",
"@Override\npublic void noninvesters() {\n\t\n}",
"public void doGeneralThings() {\n logger.debug(\"Overrided or implememted method - doGeneralThings!\");\n }",
"abstract void method();",
"public static void dummyTest(){}",
"public static void dummyTest(){}",
"@Override\n public boolean shouldSkipClass(Class<?> arg0) {\n return false;\n }",
"@Override\n void performTest() {\n new Base();\n new Child();\n }",
"@Override\n void performTest() {\n new Base();\n new Child();\n }",
"@Override\n void performTest() {\n new Base();\n new Child();\n }",
"@Override\n\t@Ignore\n\t@Test\n\tpublic void testLaunch() throws Throwable {\n\t}",
"@Override\n\tpublic void skip() {\n\t}",
"@Override public abstract boolean test(T t);",
"public void noabstractone() {\n\t\tSystem.out.println(\"No Abstract\");\n\t}",
"public boolean isSkip(Method testMethod, ITestContext context) {\n for (Class<? extends IRule> rule : collectRules(testMethod, context)) {\n try {\n if (rule.newInstance().isPerform()) {\n LOGGER.info(\"Test execution will be skipped due to following rule: \".concat(rule.getName()));\n return true;\n }\n } catch (InstantiationException | IllegalAccessException e) {\n LOGGER.error(\"Error during skip rules initialization: \".concat(rule.getName()));\n LOGGER.error(\"Error msg: \".concat(e.getMessage()), e);\n }\n }\n return false;\n }",
"@Test\n\tpublic void testInheritance() throws Exception {\n\t\ttestWith(TestClassSubClass.getInstance());\n\t}",
"@Override\n\tvoid methodabstract() {\n\t\t\n\t}",
"@Test\n public void testDecorateAllPublicMethodsFromTest() {\n Class<? extends Config> dynamicConfigClass = getDynamicConfigClass();\n Method[] methods = dynamicConfigClass.getMethods();\n for (Method method : methods) {\n if (DynamicConfigurationAwareConfigTest.isMethodStatic(method)) {\n continue;\n }\n if (DynamicConfigurationAwareConfigTest.isMethodDeclaredByClass(method, Object.class)) {\n // let's skip methods like wait() or notify() - declared directly in the Object class\n continue;\n }\n // all other public method should be overridden by the dynamic config aware decorator\n if (!(DynamicConfigurationAwareConfigTest.isMethodDeclaredByClass(method, dynamicConfigClass))) {\n Class<?> declaringClass = method.getDeclaringClass();\n Assert.fail(((((((\"Method \" + method) + \" is declared by \") + declaringClass) + \" whilst it should be\") + \" declared by \") + dynamicConfigClass));\n }\n }\n }",
"public abstract void Test() throws Exception;",
"@Override\n public boolean isSkipTests() {\n return skipTests;\n }",
"@Override\n\tpublic void runTest() throws Throwable {}",
"@Test\r\n\tpublic void testScanBaseClass(){\n\t\tString path = JDocPluginUtils.getProjectDir().getPath()+ \"/src/test/java/\";\r\n\t\tSystem.out.println(\"path:\" + path);\r\n\t\tJavaSourceScanner scaner = new JavaSourceScanner();\r\n\t\tscaner.setSourceDir(path);\r\n\t\tList<JClassDoc> jdocs = scaner.scan(\"org.onetwo.plugins.jdoc.test\");\r\n\t\tSystem.out.println(\"testScanBaseClass:\" + getInfoDoc(jdocs).toString().trim());\r\n\t\t\r\n\t\tassertJDoc(jdocs);\r\n\t}",
"@Override\r\n\tprotected void abstractMethod() {\n\t\tSystem.out.println(\"I'm from the abstract method\");\r\n\t}",
"@Test\r\n @Ignore\r\n public void testRun() {\r\n }",
"@Test\n public void test1() throws Exception {\n try {\n tester.testOnInheritanceTree(Story1, testClass);\n Assert.assertTrue(true);\n } catch (StoryTestException | WrongMethodException e) {\n Assert.fail();\n }\n }",
"public void testBlah() {\n // nothing\n }",
"private Set<Method> expectedMethods() {\n new HashSet<>();\n Set<Method> methodsWithMetadata =\n Arrays.stream(testAdviceWithMetadata.getClass().getDeclaredMethods()).collect(Collectors.toSet());\n Set<Method> methodsWithOutMetadata =\n Arrays.stream(testAdviceWithOutMetadata.getClass().getDeclaredMethods()).collect(Collectors.toSet());\n Set<Method> methodsForInheritedExceptions =\n Arrays.stream(testAdviceForInheritedExceptions.getClass().getDeclaredMethods())\n .collect(Collectors.toSet());\n\n return Stream.of(methodsWithMetadata, methodsWithOutMetadata, methodsForInheritedExceptions)\n .flatMap(Collection::stream)\n .filter(method -> method.isAnnotationPresent(GrpcExceptionHandler.class))\n .collect(Collectors.toSet());\n }",
"@Override\n\tpublic void testVehicle() {\n\t\t\n\t}",
"@Override\r\npublic void onTestSkipped(ITestResult arg0) {\n\t\r\n}",
"static void recursive(SootMethod method){\r\n \tvisited.put(method.getSignature(),true);\r\n \tIterator <MethodOrMethodContext> target_1=new Targets(cg.edgesOutOf(method));\r\n \r\n \tif(target_1!=null){\r\n \t\twhile(target_1.hasNext())\r\n \t\t{\r\n \t\t\tSootMethod target_2=(SootMethod)target_1.next();\r\n \t\t\tSystem.out.println(\"\\t\"+ target_2.getSignature().toString());\r\n \t\t\tif(!visited.containsKey(target_2.getSignature()))\r\n \t\t\t\trecursive(target_2);\r\n \t\t}\r\n \t}\r\n \t}",
"@Test\n public void test6() throws Exception {\n try {\n tester.testOnInheritanceTree(Story6, testClass);\n Assert.assertTrue(true);\n } catch (NotShortCircuitException e) {\n Assert.fail();\n }\n }",
"protected abstract TestResult runTestImpl() throws Exception;",
"boolean isInstrumentDerived();",
"@Override\n public void filter(Filter arg0) throws NoTestsRemainException {\n super.filter(getCustomFilter());\n }",
"@Override\n @Test\n public void testQuery_invalidAdvancedRankingWithChildrenRankingSignals() throws Exception { }",
"public boolean enoughToFilter() {\n/* 468 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Override\n\t\tpublic ITestNGMethod getMethod() {\n\t\t\treturn null;\n\t\t}",
"@Test\n void no_fall_through() {\n System.out.println(\"Result = \" + no_fall_through(\"TEST_1\"));\n System.out.println(\"Result = \" + no_fall_through(\"TEST_2\"));\n System.out.println(\"Result = \" + no_fall_through(\"TEST\"));\n }",
"@Override\n public void testGetAllObjects() {\n }",
"@SuppressWarnings(\"PMD.EmptyMethodInAbstractClassShouldBeAbstract\")\n protected void prepareForSetAnswer() {\n // Default implementation does nothing.\n }",
"@Override\npublic void onTestSkipped(ITestResult result) {\n\t\n}",
"@Test\n public void abandonFight() {\n }",
"@Override\n\tpublic void onTestSkipped(ITestResult tr) {\n\t\tsuper.onTestSkipped(tr);\n\t}",
"@Ignore(\"test in testPGNT0102002, testPGNT0101001, testPGNT0101002\")\n public void testDAM30507001() {\n }",
"@Override\n public void onTestSkipped(ITestResult result) {\n\n }",
"@Override\n public void onTestSkipped(ITestResult result) {\n\n }",
"@Override\n\tpublic void test(Object t) {\n\t\t\n\t}",
"@Override\n\tpublic void test(Object t) {\n\t\t\n\t}",
"@Test\n public void testCase4() {\n throw new SkipException(\"Skipping test case\"); \n }",
"@Override\n\tpublic void onTestSkipped(ITestResult result) {\n\t\textentTest.get().skip(result.getMethod().getMethodName());\n\t}",
"@Test\r\n public void testGetApiBase() {\r\n // Not required\r\n }",
"protected void skipTestIfScopesNotSupported() {\n\t}",
"private boolean hasTestMethodSigniture(Method method) {\n\t\tBoolean result = method.getName().startsWith(\"test\");\n\t\tresult = result && (method.getReturnType() == Void.TYPE);\n\t\tresult = result && (method.getParameterCount() == 0);\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void onTestSkipped(ITestResult arg0) {\n\t\t\r\n\t}",
"private void handleVirtualCallsAndSuperConstructors() {\n Set<String> affectedClasses = new HashSet<String>();\n for(MethodData m : usedAppMethodData) {\n Set<MethodData> callers = callGraph.get(m);\n if(callers.isEmpty() && !entryPoints.contains(m)) {\n // this is a virtual call that is never invoked at runtime\n // exclude it from used methods\n String subSignature = m.getSubSignature();\n String className = m.getClassName();\n usedAppMethods.get(className).remove(subSignature);\n affectedClasses.add(className);\n } else if (m.getName().equals(\"<init>\")) {\n // check if this constructor is only called in the constructors of its subclasses\n String className = m.getClassName();\n if(!childrenMap.containsKey(className)) {\n // this class has no subclasses, so no need to check\n continue;\n }\n\n Set<String> subClasses = childrenMap.get(className);\n boolean onlyCalledInSubClassConstructor = true;\n for(MethodData caller : callers) {\n String callerClass = caller.getClassName();\n if(!subClasses.contains(callerClass)) {\n // this constructor is not only called in its subclasses\n onlyCalledInSubClassConstructor = false;\n break;\n }\n }\n\n if(onlyCalledInSubClassConstructor) {\n String subSignature = m.getSubSignature();\n usedAppMethods.get(className).remove(subSignature);\n affectedClasses.add(className);\n }\n }\n }\n\n // after removing unused virtual calls and superclass constructor calls\n // we need to update the used classes to filter out those used classes that are included due to these calls\n for(String className : affectedClasses) {\n if(usedAppMethods.get(className).isEmpty()) {\n usedAppMethods.remove(className);\n usedAppClasses.remove(className);\n }\n }\n }",
"protected void thoroughInspection() {}",
"protected boolean isInDerivedClass() {\n\t\treturn (getClass() != Main.class);\n\t}",
"private void runBest() {\n }",
"protected void checkSubclass() {\n }"
] | [
"0.6196212",
"0.58390176",
"0.58102703",
"0.5799574",
"0.5705096",
"0.5677853",
"0.5676713",
"0.5676713",
"0.5670328",
"0.56540984",
"0.5641318",
"0.56375575",
"0.5622855",
"0.5611498",
"0.5609146",
"0.5606799",
"0.5550771",
"0.55200243",
"0.5508096",
"0.54867834",
"0.5485081",
"0.54761237",
"0.5449192",
"0.54449373",
"0.542067",
"0.5394543",
"0.53718865",
"0.5367432",
"0.5333073",
"0.5330172",
"0.53218484",
"0.53217167",
"0.5316972",
"0.5316908",
"0.53047997",
"0.52875197",
"0.5286211",
"0.52831215",
"0.5275976",
"0.52556115",
"0.5243009",
"0.5239959",
"0.5237386",
"0.5235466",
"0.52316874",
"0.5231647",
"0.5231647",
"0.5230072",
"0.52289355",
"0.52289355",
"0.52289355",
"0.5218354",
"0.5218191",
"0.52111113",
"0.5205209",
"0.51799756",
"0.5179324",
"0.51789564",
"0.5176619",
"0.5165661",
"0.51644534",
"0.5161848",
"0.5160921",
"0.5153454",
"0.51500374",
"0.5147574",
"0.51455504",
"0.5145139",
"0.51339716",
"0.51325524",
"0.5129606",
"0.5128294",
"0.5127987",
"0.5123835",
"0.51171494",
"0.5108679",
"0.5107727",
"0.51058686",
"0.51002544",
"0.5099882",
"0.5092307",
"0.50889885",
"0.50866586",
"0.50829273",
"0.5081781",
"0.50763845",
"0.50763845",
"0.5074465",
"0.5074465",
"0.50743186",
"0.50710756",
"0.5070083",
"0.5067645",
"0.50676095",
"0.5059018",
"0.5059018",
"0.5058645",
"0.505682",
"0.50485927",
"0.5046057",
"0.5045714"
] | 0.0 | -1 |
Searches this type for the most derived method. | public Method getMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {
final Method method = this.findMostDerivedMethod(methodName, parameterTypes);
if (null == method) {
this.throwMethodNotFoundException(methodName, parameterTypes);
}
return method;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Method findMostDerivedMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tChecker.notNull(\"parameter:methodName\", methodName);\r\n\t\tChecker.notNull(\"parameter:parameterTypes\", parameterTypes);\r\n\r\n\t\tfinal MostDerivedMethodFinder finder = new MostDerivedMethodFinder();\r\n\t\tfinder.setMethodName(methodName);\r\n\t\tfinder.setParameterTypes(parameterTypes);\r\n\t\tfinder.start(this);\r\n\t\treturn finder.getFound();\r\n\t}",
"ClassMember search (ClassMember method) {\r\n ClassMember m = (ClassMember) by_name_table.get (method.type.toString ());\r\n\r\n if (m == null) return null;\r\n\r\n if (!((MethodType) m.type).return_type.isSame (((MethodType) method.type).return_type)) {\r\n /* overriding methods must be exactly same */\r\n OzcError.illegalOverride (method);\r\n return null;\r\n } \r\n\r\n if ((m.isPublic () && !method.isPublic ()) ||\r\n\t(m.isProtected () && method.isPrivate ())) {\r\n /* overriding methods must be more publicity */\r\n OzcError.illegalOverridePublicity (method);\r\n return null;\r\n }\r\n\r\n return m;\r\n }",
"public List<SemanticError> checkMethodInheritance() {\n\t\tList<SemanticError> errors = new LinkedList<>();\n\n\t\tif (superClass == null)\n\t\t\treturn errors;\n\t\t\n\t\tint max = -1;\n\n\t\tfor (String key : superClass.methods.keySet()) {\n\t\t\tVSOPMethod m = superClass.methods.get(key);\n\t\t\tmax = Math.max(max, m.ord);\n\t\t\tVSOPMethod old = methods.putIfAbsent(key, m);\n\n\t\t\tif(old != null)\n\t\t\t\told.ord = m.ord;\n\t\t\t\t\n\t\t\tif (old != null && (!m.args.equals(old.args) || m.returnType != old.returnType))\n\t\t\t\terrors.add(new SemanticError(m.ln, m.col,\n\t\t\t\t\t\tString.format(\"method %s is redefined in class %s with wrong signature\", m.id, this.id)));\n\n\t\t}\n\n\t\tfor(VSOPMethod m: methods().values()) {\n\t\t\tif(m.ord == -1) {\n\t\t\t\tmax++;\n\t\t\t\tm.ord = max;\n\t\t\t}\n\t\t}\n\n\t\treturn errors;\n\t}",
"MethodType getMethodType();",
"private IMethod findMethod(IType type, String sourceMethod) throws JavaModelException {\n\t\tIMethod[] methods = type.getMethods();\r\n\t\tfor (IMethod method : methods) {\r\n\t\t\tif (sourceMethod.equals(method.getElementName())) {\r\n\t\t\t\treturn method;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public BCMethod lookupMethod(String signature) throws ReadAttributeException, IllegalLoopException {\n\t\tBCMethod m = null;\n\t\t/*Util.dump(\"search for method \" + signature + \" in class \" + className );\n\t\tUtil.dumpMethods(this);*/\n\t\tm = (BCMethod) methods.get(signature);\n\t\tif (m != null) {\n\t\t\tm.initMethod();\n\t\t\treturn m;\n\t\t}\n\t/*\tUtil.dump(\"search for method \" + signature + \" in superclass \" + superClassName );\n*/\t\tBCClass superClass = getSuperClass();\n\t\tm = superClass.lookupMethod(signature);\n\t\tif (m != null) {\n\t\t\t\n\t\t\treturn m;\n\t\t}\n\t\tBCClass interfaze;\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tinterfaze = JavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tm = (BCMethod) interfaze.lookupMethod(signature);\n\t\t\tif (m != null) {\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\tm.initMethod();\n\t\treturn m;\n\t}",
"private String indirectAssociations_findSuperClassThatContainsMethod(String fromClass, String fromMethod, String uniqueClassName, String methodName) {\n \tString result = \"\";\n \tif (inheritanceAssociationsPerClass.containsKey(uniqueClassName)){\n \t\tHashSet<String> inheritanceAssociations = inheritanceAssociationsPerClass.get(uniqueClassName);\n \t\tfor (String stringSuper : inheritanceAssociations){\n \t\t\tFamixClass superClass = theModel.classes.get(stringSuper);\n \t\t\tif ((superClass != null) && superClass.isInterface == false) {\n\t \t\t\tif (stringSuper.equals(uniqueClassName)) {\n\t \t\t\t\tbreak; // Otherwise, things go wrong with derived C# classes with the same name.\n\t \t\t\t}\n\t FamixMethod foundMethod = findInvokedMethodOnName(fromClass, fromMethod, stringSuper, methodName);\n\t if (foundMethod != null) {\n\t \t\tresult = stringSuper;\n\t \t\tbreak;\n\t\t }\n\t\t else {\n\t\t \tif (inheritanceAssociationsPerClass.containsKey(stringSuper)){\n\t\t \t\tresult = indirectAssociations_findSuperClassThatContainsMethod(fromClass, fromMethod, stringSuper, methodName);\n\t\t \t\tbreak;\n\t\t \t}\n\t\t }\n \t\t\t}\n\t\t\t} \n \t}\n \treturn result; \n }",
"@Override\r\n\t\tprotected boolean visit(final Type type) {\r\n\t\t\tChecker.notNull(\"parameter:type\", type);\r\n\r\n\t\t\tfinal Method method = type.findMethod(this.getMethodName(), this.getParameterTypes());\r\n\t\t\tfinal boolean skipRemaining = method != null;\r\n\t\t\tif (skipRemaining) {\r\n\t\t\t\tthis.setFound(method);\r\n\t\t\t}\r\n\t\t\treturn skipRemaining;\r\n\t\t}",
"public abstract Set<MethodUsage> getDeclaredMethods();",
"public List<ResolvedMethodDeclaration> getAllMethods() {\n List<ResolvedMethodDeclaration> allMethods = new LinkedList<>(this.getTypeDeclaration().getDeclaredMethods());\n getDirectAncestors().forEach(a -> allMethods.addAll(a.getAllMethods()));\n return allMethods;\n }",
"public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }",
"private void forEachOverridenMethod(final ClassTypingContext ctc, final CtMethod<?> thisMethod, Set<String> distintTypesSet, final CtConsumer<CtMethod<?>> outputConsumer) {\n\t\tfinal CtQuery q = ctc.getAdaptationScope()\n\t\t\t.map(new AllTypeMembersFunction(CtMethod.class).distinctSet(distintTypesSet));\n\t\tq.\tforEach(new CtConsumer<CtMethod<?>>() {\n\t\t\t@Override\n\t\t\tpublic void accept(CtMethod<?> thatMethod) {\n\t\t\t\tif (thisMethod == thatMethod) {\n\t\t\t\t\t//do not return scope method\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//check whether method is overridden by searched method\n\t\t\t\t/*\n\t\t\t\t * note: we are in super inheritance hierarchy of type declaring input `method`, so we do not have to check isSubTypeOf.\n\t\t\t\t * Check for isSubSignature is enough\n\t\t\t\t */\n\t\t\t\tif (ctc.isSubSignature(thisMethod, thatMethod)) {\n\t\t\t\t\toutputConsumer.accept(thatMethod);\n\t\t\t\t\tif (query.isTerminated()) {\n\t\t\t\t\t\tq.terminate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"public Function getMethod(int signature)\r\n\t{\r\n\t\t// search own methods:\r\n\t\tfor (Function fn : methods)\r\n\t\t{\r\n\t\t\tif (fn.signature == signature)\r\n\t\t\t\treturn fn;\r\n\t\t}\r\n\t\t// if we have a base class, let it search for methods, or return null\r\n\t\tif (baseClass != null)\r\n\t\t\treturn baseClass.getMethod(signature);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}",
"private TypeBodyImpl getApparentType() {\n TypeBodyImpl enclosingType = getEnclosingTypeBody();\n while (enclosingType != null) {\n TypeBodyImpl superType = enclosingType;\n while (superType != null) {\n if (superType == method.getEnclosingTypeBody()) {\n // We've found the method on a superclass\n return enclosingType;\n }\n superType = superType.getSupertype() == null ? null : superType.getSupertype().getTypeBody();\n }\n // Not found on this type, so try the enclosing type\n enclosingType = enclosingType.getEnclosingTypeBody();\n }\n return null;\n }",
"public int getHighestMethod() {\n\t\treturn HighestMethod;\n\t}",
"Methodsig getMethod();",
"@Override\n\tpublic void find() {\n\t\tSystem.out.println(\"find method\");\n\t}",
"public AMethod lookupMethod(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types)\n\t\tthrows Jml2bException {\n\t\t// Java Language Specification, pp 108: \n\t\t// 1. Find all the methods that could possibly apply to the\n\t\t// invocation, namely all the overloaded methods that have the\n\t\t// correct name, and whose parameters are of types that can be\n\t\t// assigned to the values of all the arguments. If one method\n\t\t// match exactly for all arguments, you invoke that method\n\t\t// 2. If any method in the set has parameters types that are all \n\t\t// assignable to any other method in the set, the other method \n\t\t// is removed from the set since it is less specific. Repeat\n\t\t// until no elimination can be made.\n\t\t// 3. If you are left with one method, that method is the most \n\t\t// specific and will be the one invoked. If you have more than\n\t\t// one method left, then the call is ambiguous, there being no \n\t\t// most specific method, and the invoking code is invalid.\n\n\t\tAMethod result;\n\n\t\tif (isInterface()) {\n\t\t\t// search in current interface and super interfaces\n\t\t\tresult = lookupMethodInterface(config, mth_name, param_types, null);\n\n\t\t\t// if we don't have an exact match, look for a better match in java.lang.Object\n\t\t\tif (result == null\n\t\t\t\t|| !result.getParams().hasSameTypes(param_types)) {\n\t\t\t\t// searh in the super class (which should be object)\n\t\t\t\tAClass object = config.getObject().getRefType();\n\t\t\t\tresult =\n\t\t\t\t\tobject.lookupMethodCurrentClass(\n\t\t\t\t\t\tconfig,\n\t\t\t\t\t\tmth_name,\n\t\t\t\t\t\tparam_types,\n\t\t\t\t\t\tresult);\n\t\t\t}\n\t\t} else {\n\t\t\t// search in class and super classes\n\t\t\tresult = lookupMethodClass(config, mth_name, param_types, null);\n\t\t}\n\n\t\treturn result;\n\t}",
"public boolean isMethodFromBaseClass() {\n return m_isBaseClass.isSelected();\n }",
"public static Method getAccessibleMethodFrom (\n Class<?> clazz, String methodName, Class<?>[] parameterTypes)\n {\n // Look for overridden method in the superclass.\n Class<?> superclass = clazz.getSuperclass();\n Method overriddenMethod = null;\n \n if (superclass != null && classIsAccessible(superclass)) {\n try {\n overriddenMethod = superclass.getMethod(methodName, parameterTypes);\n } catch (NoSuchMethodException nsme) {\n // no problem\n }\n \n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n \n // If here, then clazz represents Object, or an interface, or the superclass did not have\n // an override. Check implemented interfaces.\n Class<?>[] interfaces = clazz.getInterfaces();\n for (int i = 0; i < interfaces.length; ++i) {\n if (classIsAccessible(interfaces[i])) {\n try {\n overriddenMethod = interfaces[i].getMethod(methodName, parameterTypes);\n } catch (NoSuchMethodException nsme) {\n // no problem\n }\n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n }\n \n // Try superclass's superclass and implemented interfaces.\n if (superclass != null) {\n overriddenMethod = getAccessibleMethodFrom(superclass, methodName, parameterTypes);\n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n \n // Try implemented interfaces' extended interfaces...\n for (int i = 0; i < interfaces.length; ++i) {\n overriddenMethod = getAccessibleMethodFrom(interfaces[i], methodName, parameterTypes);\n if (overriddenMethod != null) {\n return overriddenMethod;\n }\n }\n \n // Give up.\n return null;\n }",
"Method getMethod();",
"Method getMethod();",
"public static Method findMethod(Class<?> clazz, String name, Class<?>... paramTypes) {\n Class<?> searchType = clazz;\n while (searchType != null) {\n Method[] methods = (searchType.isInterface() ? searchType.getMethods() : searchType.getDeclaredMethods());\n for (Method method : methods) {\n if (name.equals(method.getName()) &&\n (paramTypes == null || Arrays.equals(paramTypes, method.getParameterTypes()))) {\n return method;\n }\n }\n searchType = searchType.getSuperclass();\n }\n return null;\n }",
"public DynamicMethod retrieveMethod(String name) {\n return getMethods().get(name);\n }",
"public Method getMethod();",
"public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}",
"MethodName getMethod();",
"private void isMethod() {\n if (isNameExpr != null) {\n isNameExpr.isMethod();\n isNameExpr = null;\n }\n }",
"ClassMember search (String name, MethodType type, int access,\r\n\t\t int modifier_mask) {\r\n IdentifierList methods = (IdentifierList) get (name);\r\n\r\n if (methods == null) return null;\r\n\r\n java.util.Enumeration ms = methods.elements ();\r\n\r\n ClassMember more_specific = null;\r\n while (ms.hasMoreElements ()) {\r\n ClassMember m = (ClassMember) ms.nextElement ();\r\n\r\n int diff;\r\n try {\r\n\tdiff = m.type.compare (type);\r\n } catch (TypeMismatch e) {\r\n\tcontinue;\r\n }\r\n\r\n if (diff < 0) continue;\r\n\r\n int m_access = m.getAccess ();\r\n\r\n if (access == Constants.PROTECTED) {\r\n\tif (m_access == Constants.PRIVATE) continue;\r\n } else if (access == Constants.PUBLIC) {\r\n\tif (m_access != Constants.PUBLIC) continue;\r\n }\r\n\t \r\n if (modifier_mask > 0 &&\r\n\t ((m.getModifier () & modifier_mask) == 0)) continue;\r\n\r\n if (diff == 0) return m;\r\n\r\n if (more_specific == null) {\r\n\tmore_specific = m;\r\n\tcontinue;\r\n }\r\n\r\n try {\r\n\tif (((MethodType) m.type).isMoreSpecific ((MethodType) more_specific.type))\r\n\t more_specific = m;\r\n } catch (OverloadingAmbiguous ex) {\r\n\t/* this overloading is ambiguous */\r\n\tOzcError.overloadingAmbiguous (m);\r\n\treturn ClassMember.ANY;\r\n }\r\n }\r\n\r\n return more_specific;\r\n }",
"DevelopmentMethod getRelatedMethod();",
"Method lookupMethod(Object targetObject, String methodName) {\n Method method = null;\n for (Method m : targetObject.getClass().getMethods()) {\n if (Modifier.isPublic(m.getModifiers()) && methodName.equals(m.getName())) {\n method = m;\n break;\n }\n }\n return method;\n }",
"private void isMethod() {\n ArrayAdapter<String> isVariable = new ArrayAdapter<>(this, isNameExpr.isFieldAccessExpr.isFieldAccessExpr, isNameExpr);\n isNameExpr.isMethod(isNameExpr);\n isNameExpr.isMethod((isParameter, isParameter, isParameter, isParameter) -> {\n isNameExpr = isNameExpr.isMethod(isNameExpr.isMethod(isNameExpr), isNameExpr);\n isMethod(isNameExpr);\n isNameExpr = isNameExpr;\n });\n }",
"public Enumeration getMethods()\n {\n ensureLoaded();\n return m_tblMethod.elements();\n }",
"protected boolean isMethodOverridden() {\n DetailAST current = ast;\n Boolean result = null;\n for (; current != null && result == null; current = current.getParent()) {\n switch (current.getType()) {\n case TokenTypes.METHOD_DEF:\n result = findAnnotations(current).contains(NullnessAnnotation.OVERRIDE);\n break;\n case TokenTypes.LAMBDA:\n result = true;\n break;\n default:\n }\n }\n if (result == null) {\n result = false;\n }\n return result;\n }",
"private void extendedLookupOfSuperTypes(\n Map<TypeElement, Map<TypeElement, List<ExecutableElement>>> routeMap,\n TypeElement parentTypeElement) {\n for (TypeElement superType : superTypes(parentTypeElement)) {\n // collect all declared methods\n Set<ExecutableElement> methods =\n superType.getEnclosedElements().stream()\n .filter(ExecutableElement.class::isInstance)\n .map(ExecutableElement.class::cast)\n .collect(Collectors.toCollection(LinkedHashSet::new));\n for (ExecutableElement method : methods) {\n // extract all annotation type elements\n LinkedHashSet<TypeElement> annotationTypes =\n method.getAnnotationMirrors().stream()\n .map(AnnotationMirror::getAnnotationType)\n .map(DeclaredType::asElement)\n .filter(TypeElement.class::isInstance)\n .map(TypeElement.class::cast)\n .collect(Collectors.toCollection(LinkedHashSet::new));\n\n for (TypeElement annotationType : annotationTypes) {\n if (Annotations.HTTP_METHODS.contains(annotationType.toString())) {\n // ensure map is created for parent type element\n Map<TypeElement, List<ExecutableElement>> mapping =\n routeMap.computeIfAbsent(parentTypeElement, k -> new LinkedHashMap<>());\n List<ExecutableElement> list =\n mapping.computeIfAbsent(annotationType, k -> new ArrayList<>());\n // ensure that the same method wasnt already defined in parent\n if (list.stream().map(this::signature).noneMatch(signature(method)::equals)) {\n list.add(method);\n }\n }\n }\n }\n }\n }",
"protected Method getMethod(String mangledName)\n {\n return (Method) _methodMap.get(mangledName);\n }",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"public static MethodHandle findVirtual(MethodHandles.Lookup lookup, String name, Class type,\n Class clazz, MethodType mt)\n throws NoSuchMethodException, IllegalAccessException\n {\n return lookup.findVirtual(clazz, name, mt);\n }",
"protected Method fetchMethod() {\n int i = randomGenerator.nextInt(allCallableMethods.size());\n Method selected = allCallableMethods.get(i);\n allCallableMethods.add(selected); // We add it back to the list of methods, to make it more likely to be selected!\n return selected;\n }",
"@Override\n protected String getMethodName() {\n return suitename() + \"-\" + super.getMethodName();\n }",
"String getMethod();",
"String getMethod();",
"public static MethodInvoker findMatchingMethod(Class<?> type, String methodName, Object... values) throws NoSuchMethodException, IllegalStateException\n {\n List<Method> methodList = new ArrayList<>(20);\n Class<?> currentType = type;\n while ((currentType != null) && ! currentType.equals(Object.class))\n {\n for (Method method : currentType.getDeclaredMethods())\n {\n if (method.getName().equals(methodName) && (method.getParameterCount() == values.length))\n {\n methodList.add(method);\n }\n }\n currentType = currentType.getSuperclass();\n }\n return findMatchingExecutable(methodList.toArray(new Method[methodList.size()]), values);\n }",
"private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }",
"public AMethod lookupMethodClass(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types,\n\t\tAMethod candidate)\n\t\tthrows Jml2bException {\n\n\t\tcandidate =\n\t\t\tlookupMethodCurrentClass(config, mth_name, param_types, candidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in interfaces\n\t\tcandidate =\n\t\t\tlookupMethodImplementedInterfaces(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\tif (candidate != null && candidate.exactMatch(config, param_types)) {\n\t\t\treturn candidate;\n\t\t}\n\n\t\t// search in super classes for better methods\n\t\tif (!isObject()) {\n\t\t\tAClass super_class = getSuperClass();\n\n\t\t\treturn super_class.lookupMethodClass(\n\t\t\t\tconfig,\n\t\t\t\tmth_name,\n\t\t\t\tparam_types,\n\t\t\t\tcandidate);\n\t\t} else {\n\t\t\treturn candidate;\n\t\t}\n\t}",
"public static Set<SootMethod> getConcreteMethods(SootMethod abstractMethod){\n\t\tSootClass declaringClass = abstractMethod.getDeclaringClass();\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tList<SootClass> subclasses = Scene.v().getActiveHierarchy().getSubclassesOf(declaringClass);\n\t\tfor(SootClass subClass:subclasses){\n\t\t\tif(subClass.declaresMethod(abstractMethod.getSubSignature())){\n\t\t\t\tSootMethod sm = subClass.getMethod(abstractMethod.getSubSignature());\n\t\t\t\tif(sm.isConcrete()){\n\t\t\t\t\tmethods.add(sm);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"public static Method[] getAllMethods(Class forClass) {\r\n\t\tfinal List<Method> methods = new ArrayList<Method>();\r\n\t\tClass aktClass = forClass;\r\n\t\twhile (!aktClass.equals(Object.class)) {\r\n\t\t\tMethod[] tmp = aktClass.getDeclaredMethods();\r\n\t\t\tfor (Method akt : tmp) {\r\n\t\t\t\tmethods.add(akt);\r\n\t\t\t}\r\n\t\t\taktClass = aktClass.getSuperclass();\r\n\t\t}\r\n\t\treturn methods.toArray(new Method[methods.size()]);\r\n\t}",
"private static Set<SootMethod> searchDownForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\t//1.判断sm中是否含有intent的定义信息,若有,则返回\n\t\tif(containsInitMethod(sm, type)){\n\t\t\tmethods.add(sm);\n\t\t}\n\t\telse{\n\t\t\tList<SootMethod> targets = InterMethodAnalysis.getTargetsMethods(sm);\t\n\t\t\tfor(SootMethod tgt:targets){\n\t\t\t\tif(tgt.equals(sm))\n\t\t\t\t\tcontinue;\n\t\t\t\tif(tgt.getReturnType().toString().contains(type)){\n\t\t\t\t\tif(tgt.isAbstract()){\n\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(tgt)){\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSet<SootMethod> methods2 = searchDownForDefineMethods(tgt, type);\n\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"public java.lang.reflect.Method getMethod()\n {\n return __m_Method;\n }",
"private FamixMethod findInvokedMethodOnName(String fromClass, String fromMethod, String invokedClassName, String invokedMethodName) {\n \tFamixMethod result = null;\n\t\t/* Test Helper\n\t\tif (fromClass.equals(\"domain.direct.violating.AccessLocalVariable_SetArgumentValue\")){\n\t\t\tboolean breakpoint = true;\n\t\t} */\n\n \t// 1) If methodNameAsInInvocation matches with a method unique name, return that method. \n \tString searchKey = invokedClassName + \".\" + invokedMethodName;\n \tif (theModel.behaviouralEntities.containsKey(searchKey)) {\n \t\treturn (FamixMethod) theModel.behaviouralEntities.get(searchKey);\n \t}\n \t// 2) Find out if there are more methods with the same name of the invoked class. If only one method is found, then return this method. \n \tString methodName = invokedMethodName.substring(0, invokedMethodName.indexOf(\"(\")); // Methodname without signature\n \t searchKey = invokedClassName + \".\" + methodName;\n \tif (sequencesPerMethod.containsKey(searchKey)){\n \t\tArrayList<FamixMethod> methodsList = sequencesPerMethod.get(searchKey);\n \t\tif (methodsList.size() == 0) {\n \t\t\treturn result;\n \t\t} else if (methodsList.size() == 1) {\n \t\t\t// FamixMethod result1 = methodsList.get(0);\n \t\t\treturn methodsList.get(0);\n \t\t} else { // 3) if there are more methods with the same name, then compare the invocation arguments with the method parameters.\n \t\t\tString invocationSignature = invokedMethodName.substring(invokedMethodName.indexOf(\"(\"));;\n \t\t\tString contentsInvocationSignature = invocationSignature.substring(invocationSignature.indexOf(\"(\") + 1, invocationSignature.indexOf(\")\")); \n \t\t\tString[] invocationArguments = contentsInvocationSignature.split(\",\");\n \t\t\tint numberOfArguments = invocationArguments.length;\n \t\t\t// 3a) If there is only one method with the same number of parameters as invocationArguments, then return this method\n \t\t\tList<FamixMethod> matchingMethods1 = new ArrayList<FamixMethod>();\n\t \t\tfor (FamixMethod method : methodsList){\n\t \t\t\tif ((method.signature != null) && (!method.signature.equals(\"\"))) {\n\t\t \t\t\tString contentsmethodParameter = method.signature.substring(method.signature.indexOf(\"(\") + 1, method.signature.indexOf(\")\")); \n\t\t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n\t\t \t\t\tif (methodParameters.length == numberOfArguments) {\n\t\t \t\t\t\tmatchingMethods1.add(method);\n\t\t \t\t\t}\n\t \t\t\t}\n\t \t\t} \n\t \t\tif (matchingMethods1.size() == 0)\n\t \t\t\treturn result;\n\t \t\tif (matchingMethods1.size() == 1)\n\t \t\t\treturn matchingMethods1.get(0);\n \t\t\t\n \t\t\t// 3b) If there is only one method where the first parameter type == the first argument type, then return this method \n \t\t\tList<FamixMethod> matchingMethods2 = new ArrayList<FamixMethod>();\n \t\t\tif (numberOfArguments >= 1) {\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[0] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[0]);\n \t \t\tfor (FamixMethod matchingMethod1 : matchingMethods1){\n \t \t\t\tString contentsmethodParameter = matchingMethod1.signature.substring(matchingMethod1.signature.indexOf(\"(\") + 1, matchingMethod1.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 1) {\n \t \t\t\tmethodParameters[0] = getfullPathOfDeclaredType(fromClass, methodParameters[0]);\n \t \t\t\t\tif (methodParameters[0].equals(invocationArguments[0])) {\n \t \t\t\t\t\tmatchingMethods2.add(matchingMethod1);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods2.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods2.size() == 1)\n \t \t\t\treturn matchingMethods2.get(0);\n \t\t\t}\n \t\t\t// If there is only one method where the second parameter type == the first argument type, then return this method \n \t\t\tif (numberOfArguments >= 2) {\n \t\t\t\tmatchingMethods1.clear();\n \t\t\t\t// Replace the argument string by a type, in case of an attribute\n \t\t\t\tinvocationArguments[1] = getTypeOfAttribute(fromClass, fromMethod, invocationArguments[1]);\n \t \t\tfor (FamixMethod matchingMethod2 : matchingMethods2){\n \t \t\t\tString contentsmethodParameter = matchingMethod2.signature.substring(matchingMethod2.signature.indexOf(\"(\") + 1, matchingMethod2.signature.indexOf(\")\")); \n \t \t\t\tString[] methodParameters = contentsmethodParameter.split(\",\");\n \t \t\t\tif (methodParameters.length >= 2) {\n \t \t\t\tmethodParameters[1] = getfullPathOfDeclaredType(fromClass, methodParameters[1]);\n \t \t\t\t\tif (methodParameters[1].equals(invocationArguments[1])) {\n \t \t\t\t\t\tmatchingMethods1.add(matchingMethod2);\n \t \t\t\t\t}\n \t \t\t\t}\n \t \t\t\t\n \t \t\t} \n \t \t\tif (matchingMethods1.size() == 0)\n \t \t\t\treturn result;\n \t \t\tif (matchingMethods1.size() == 1)\n \t \t\t\treturn matchingMethods1.get(0);\n \t\t\t}\n \t\t}\n\t\t}\n \treturn result; \n }",
"@Override\n\tpublic String visitMethodCall(MethodCallContext ctx) {\n\t\tint childrenNo=ctx.children.size();\n\t\tParseTree lastChild=ctx.children.get(childrenNo-1);\n\t\tString returnType;\n\t\tString methodName;\n\t\tif(lastChild instanceof TerminalNode){\n\t\t\tList<String> argTypes=new ArrayList<>();\n\t\t\tStack<String> ids=new Stack<>();\n\t\t\tParseTree n=ctx.children.get(childrenNo-2);\n\t\t\tif (childrenNo<=4){\n\t\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t\tMethodRecord mRec=(MethodRecord) table.lookup(methodName);\n\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\tList<VarRecord> paramList=(List<VarRecord>) mRec.getParameters();\n\t\t\t\t\tList<ParseTree> arguments= new ArrayList<>();\n\t\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\t\targuments.add(n.getChild(i));\n\t\t\t\t\t}\n\t\t\t\t\tif(paramList.size()!=arguments.size())throw new RuntimeException(\"Incorrect number of arguments\");\n\t\t\t\t\telse for(int i=0;i<=paramList.size()-1;i++){\n\t\t\t\t\t\tString actualType=visit(arguments.get(i));\n\t\t\t\t\t\tString declaredType=paramList.get(i).getReturnType();\n\t\t\t\t\t\tif(!actualType.equals(declaredType)) throw new RuntimeException(\"Incorrect argument type\");\n\t\t\t\t\t}//checking arguments complete\n\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tClassRecord cRec;\n\t\t\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\t\t\tcRec=(ClassRecord) table.lookup(methodName);\n\t\t\t\t\t\tMethodRecord mRec=cRec.getMethod(methodName);\n\t\t\t\t\t\tif (mRec==null)throw new RuntimeException(\"method \"+methodName+ \" is not declared\");\n\t\t\t\t\t\treturn mRec.getReturnType();\n\t\t\t\t\t}\n\t\t\t}else \n\t\t\tif(!(n instanceof TerminalNode)){\n\t\t\t\tmethodName=ctx.getChild(childrenNo-4).getText();\n\t\t\t\t//checking charAt(i) \n\t\t\t\tif(methodName.equals(\"charAt\")){\n\t\t\t\t\tif(n.getChildCount()!=1) throw new RuntimeException(\"Incorrect number of arguments on charAt()function\");\n\t\t\t\t\telse {\n\t\t\t\t\t\tString charArgType=visit(n);\t\t//check argument type is int\n\t\t\t\t\t\tif (!charArgType.equals(\"int\")) throw new RuntimeException(\"ARgument i on function charAt(i) must be of type int\");\n\t\t\t\t\t}\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-6).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".charAt(i) is applicable only to Strings\");\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<=n.getChildCount();i+=2){\n\t\t\t\t\targTypes.add(visit(n.getChild(i)));\n\t\t\t\t}\n\t\t\tfor(int i=childrenNo-4;i>=0;i-=2){\n\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t}\n\t\t\t}else{ \n\t\t\t\t//checking .length()\n\t\t\t\tmethodName=ctx.getChild(childrenNo-3).getText();\n\t\t\t\tif(methodName.equals(\"length\")){\n\t\t\t\t\tString objectType=table.lookup(ctx.getChild(childrenNo-5).getText()).getReturnType();\n\t\t\t\t\tif (!objectType.equals(\"String\")) throw new RuntimeException(\".length() is applicale only to Strings\");\n\t\t\t\t}\n\t\t\t\targTypes=null;\n\t\t\t\tfor(int i=childrenNo-3;i>=0;i-=2){\n\t\t\t\t\tids.push(ctx.getChild(i).getText());\n\t\t\t\t}\n\t\t\t}\n\t\t\tint count=ids.size();\n\t\t\tClassRecord cRec=null;\n\t\t\tRecord r;\n\t\t\tfor(int i=0;i<=count-2;i++){\n\t\t\t\tString key=ids.pop();\n\t\t\t\tr= table.lookup(key);\t\t\t\t\n\t\t\t\tcRec=(ClassRecord)table.lookup(r.Type);\n\t\t\t\tif (cRec==null) throw new RuntimeException(\"Class \"+key+\" is not declared\");\t\t\t\t\n\t\t\t}\n\t\t\t//last item in stack is the method Identifier\n\t\t\tMethodRecord mRec=cRec.getMethod(ids.pop());\n\t\t\tif (mRec==null)throw new RuntimeException(\"Method not declared in class \"+cRec.getName());\n\t\t\treturnType=mRec.getReturnType();\n\t\t\tif(methodName.equals(\"charAt\")) returnType=\"char\";\n\t\t\tif(methodName.equals(\"length\"))returnType=\"int\";\n\t\t\t//checking arguments \n\t\t\tif(argTypes==null) return returnType;\n\t\t\telse {\t\t\t\t\n\t\t\t\tList<VarRecord> parameters=(List<VarRecord>) mRec.getParameters();\n\t\t\t\tif(parameters.size()!=argTypes.size()) throw new RuntimeException(\"Incorect number of arguments on method call\");\n\t\t\t\telse{\n\t\t\t\t\tfor(int i=0;i<argTypes.size();i++){\n\t\t\t\t\t\tif(!argTypes.get(i).equals((parameters.get(i).getReturnType()))) throw new RuntimeException (\"incorrect argument type\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} return returnType;\n\t\t}\telse \t\t\t\t\t\t// last node is a RuleNode\n\t\t\t{\n\t\t\t\tif (childrenNo==3){\t\t\t\t\t\n\t\t\t\tString leftType=visit(ctx.getChild(0)); //also checks the first method for undeclared ids\n\t\t\t\t//ClassRecord cRec=(ClassRecord) table.lookup(ctx.getChild(0).getText());\n\t\t\t\tParseTree node=ctx.getChild(2);\n\t\t\t\t//checking charAt function\n\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\tString argType=visit(node.getChild(2));\n\t\t\t\t\t\tif (!argType.equals(\"int\")) throw new RuntimeException(\"Incorrect argument in charAt()\");\n\t\t\t\t\t\treturn \"char\";\n\t\t\t\t\t}\n\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\telse return \"int\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t{String mName=ctx.getChild(2).getChild(0).getText();\n\t\t\t\tClassRecord tempCR=(ClassRecord) table.lookup(ctx.getChild(0).getChild(0).getText());\n\t\t\t\tMethodRecord mRec=tempCR.getMethod(mName);\n\t\t\t\tif(mRec==null)throw new RuntimeException(\"method \"+mName+\" is not declared in class \"+tempCR.getName());\n\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (childrenNo==5){\n\t\t\t\t\tString leftType=visit(ctx.getChild(1)); //also checks the first method for undeclared ids\n\t\t\t\t\tParseTree node=ctx.getChild(4);\n\t\t\t\t\t//checking charAt function\n\t\t\t\t\tif((node.getChildCount()==4)&&(node.getChild(3) instanceof TerminalNode)){\t\t\t\n\t\t\t\t\t\tif (node.getChild(0).getText().equals(\"charAt\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"charAt() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(node.getChildCount()==3&&((node.getChild(2) instanceof TerminalNode))){\n\t\t\t\t\t\tif(node.getChild(0).getText().equals(\"length\")){\n\t\t\t\t\t\t\tif (!leftType.equals(\"String\")) throw new RuntimeException(\"length() only applicable to Strings\");\n\t\t\t\t\t\t\telse return visit(node);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tClassRecord cR=(ClassRecord)table.lookup(leftType);\n\t\t\t\t\tMethodRecord mRec=cR.getMethod(node.getChild(0).getText());\n\t\t\t\t\treturn mRec.getReturnType(); //visit the last methodCall in the chain \n\t\t\t\t}\n\t\t\t}\n\t\treturn null; //debuggin purposes. should be unreachable\n\t}",
"@NonNull\n @UsedByGeneratedCode\n protected Method resolveTargetMethod() {\n return ReflectionUtils.getRequiredMethod(declaringType, methodName, argTypes);\n }",
"protected abstract MethodDescription accessorMethod();",
"public Enumeration getMethodNames()\n {\n final EnumerationUnion eu = new EnumerationUnion();\n if( methods != null )\n {\n eu.add( methods.keys() );\n }\n if( ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n eu.add( clazz.getMethodNames() );\n }\n }\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n eu.add( object.getMethodNames() );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n return eu;\n }",
"private static Set<SootMethod> searchUpForDefineMethods(SootMethod sm,String type){\n\t\tSet<SootMethod> methods = new HashSet<SootMethod>();\n\t\tif(sm.isConcrete()){\n\t\t\tif(containsInitMethod(sm, type)){\n\t\t\t\tmethods.add(sm);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tList<Type> parameterTypes = sm.getParameterTypes();\n\t\t\t\tif(parameterTypes.contains(RefType.v(type))){\n\t\t\t\t\tList<SootMethod> sources = InterMethodAnalysis.getSourcesMethods(sm);\t\n\t\t\t\t\tfor(SootMethod src:sources){\n\t\t\t\t\t\tif(src.equals(sm))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif(src.isAbstract()){\n\t\t\t\t\t\t\tfor(SootMethod smMethod:getConcreteMethods(src)){\n\t\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(smMethod, type);\n\t\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSet<SootMethod> methods2 = searchUpForDefineMethods(src, type);\n\t\t\t\t\t\t\tfor(SootMethod m:methods2){\n\t\t\t\t\t\t\t\tif(!methods.contains(m)){\n\t\t\t\t\t\t\t\t\tmethods.add(m);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn methods;\n\t}",
"boolean hasMethod();",
"boolean hasMethod();",
"boolean hasMethod();",
"private final java.lang.reflect.Method tryGetMethod(java.lang.Class<?> r7, java.lang.String r8, java.lang.Class<?>[] r9, java.lang.Class<?> r10) {\n /*\n r6 = this;\n r0 = 0\n int r1 = r9.length // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Object[] r1 = java.util.Arrays.copyOf(r9, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class[] r1 = (java.lang.Class[]) r1 // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.reflect.Method r1 = r7.getDeclaredMethod(r8, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r2 = \"result\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r1, r2) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.Class r2 = r1.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r2 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r2, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r2 == 0) goto L_0x001d\n r0 = r1\n goto L_0x005d\n L_0x001d:\n java.lang.reflect.Method[] r7 = r7.getDeclaredMethods() // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r1 = \"declaredMethods\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r7, r1) // Catch:{ NoSuchMethodException -> 0x005d }\n int r1 = r7.length // Catch:{ NoSuchMethodException -> 0x005d }\n r2 = 0\n r3 = 0\n L_0x0029:\n if (r3 >= r1) goto L_0x005d\n r4 = r7[r3] // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = \"method\"\n kotlin.jvm.internal.Intrinsics.checkNotNullExpressionValue(r4, r5) // Catch:{ NoSuchMethodException -> 0x005d }\n java.lang.String r5 = r4.getName() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r8) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class r5 = r4.getReturnType() // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = kotlin.jvm.internal.Intrinsics.areEqual((java.lang.Object) r5, (java.lang.Object) r10) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n java.lang.Class[] r5 = r4.getParameterTypes() // Catch:{ NoSuchMethodException -> 0x005d }\n kotlin.jvm.internal.Intrinsics.checkNotNull(r5) // Catch:{ NoSuchMethodException -> 0x005d }\n boolean r5 = java.util.Arrays.equals(r5, r9) // Catch:{ NoSuchMethodException -> 0x005d }\n if (r5 == 0) goto L_0x0055\n r5 = 1\n goto L_0x0056\n L_0x0055:\n r5 = 0\n L_0x0056:\n if (r5 == 0) goto L_0x005a\n r0 = r4\n goto L_0x005d\n L_0x005a:\n int r3 = r3 + 1\n goto L_0x0029\n L_0x005d:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: kotlin.reflect.jvm.internal.KDeclarationContainerImpl.tryGetMethod(java.lang.Class, java.lang.String, java.lang.Class[], java.lang.Class):java.lang.reflect.Method\");\n }",
"boolean isDerived();",
"public Method methodFor(Message message) throws NoSuchMethodException {\n\t\tif (!handlers.containsKey(message.getClass())) {\n\t\t\tthrow new NoSuchMethodException();\n\t\t}\n\t\treturn handlers.get(message.getClass());\n\t}",
"@Nullable\n abstract Method getMethod();",
"@Override\n\tpublic void find() {\n\n\t}",
"abstract void method();",
"public static void display() {\n System.out.println(\"Static or class method from Derived\");\n }",
"public SubmitMethod getLastMethod() {\n return lastMethod_;\n }",
"List<Method> getAllMethods();",
"boolean overrides(MethodDeclaration sub, MethodDeclaration sup);",
"static void recursive(SootMethod method){\r\n \tvisited.put(method.getSignature(),true);\r\n \tIterator <MethodOrMethodContext> target_1=new Targets(cg.edgesOutOf(method));\r\n \r\n \tif(target_1!=null){\r\n \t\twhile(target_1.hasNext())\r\n \t\t{\r\n \t\t\tSootMethod target_2=(SootMethod)target_1.next();\r\n \t\t\tSystem.out.println(\"\\t\"+ target_2.getSignature().toString());\r\n \t\t\tif(!visited.containsKey(target_2.getSignature()))\r\n \t\t\t\trecursive(target_2);\r\n \t\t}\r\n \t}\r\n \t}",
"ResourceMethod getMethodType();",
"private Object getNonObjectMethod (String className, \n\t\t\t\tString methodName, String[] argTypeNames)\n\t\t\t{\n\t\t\t\tModel model = getModel();\n\t\t\t\tObject method = \n\t\t\t\t\tmodel.getMethod(className, methodName, argTypeNames);\n\n\t\t\t\tif (method == null)\t// look for an inherited method\n\t\t\t\t{\n\t\t\t\t\tmethod = model.getInheritedMethod(\n\t\t\t\t\t\tclassName, methodName, argTypeNames);\n\n\t\t\t\t\tif ((method != null) && model.getDeclaringClass(method).\n\t\t\t\t\t\tequals(\"java.lang.Object\"))\t\t// NOI18N\n\t\t\t\t\t{\n\t\t\t\t\t\tmethod = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\treturn method;\n\t\t\t}",
"public Method findMethod(final String methodName, final List<Type> parameterTypes) {\r\n\t\tGeneratorHelper.checkJavaMethodName(\"parameter:methodName\", methodName);\r\n\t\tChecker.notNull(\"parameter:parameterTypes\", parameterTypes);\r\n\r\n\t\tMethod found = null;\r\n\r\n\t\tfinal Iterator<Method> methods = this.getMethods().iterator();\r\n\r\n\t\twhile (methods.hasNext()) {\r\n\t\t\tfinal Method method = methods.next();\r\n\t\t\tif (false == method.getName().equals(methodName)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfinal List<MethodParameter> methodParameters = method.getParameters();\r\n\t\t\tif (methodParameters.size() != parameterTypes.size()) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfound = method;\r\n\r\n\t\t\tfinal Iterator<MethodParameter> methodParametersIterator = methodParameters.iterator();\r\n\t\t\tfinal Iterator<Type> parameterTypesIterator = parameterTypes.iterator();\r\n\r\n\t\t\twhile (parameterTypesIterator.hasNext()) {\r\n\t\t\t\tfinal Type type = parameterTypesIterator.next();\r\n\t\t\t\tfinal MethodParameter parameter = methodParametersIterator.next();\r\n\t\t\t\tif (false == type.equals(parameter.getType())) {\r\n\t\t\t\t\tfound = null;\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 (null != found) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}",
"public abstract jq_Method getDefiningMethod();",
"Method getRiggerMethod(String methodName, Class<?>... params) throws Exception {\r\n Rigger rigger = getRiggerInstance();\r\n Class<? extends Rigger> clazz = rigger.getClass();\r\n Method method = clazz.getDeclaredMethod(methodName, params);\r\n method.setAccessible(true);\r\n return method;\r\n }",
"static private Method\n bubble(final Method method) {\n final Class<?> declarer = method.getDeclaringClass();\n if (Object.class == declarer || Struct.class == declarer) {return null;}\n if (Modifier.isPublic(declarer.getModifiers())) { return method; }\n if (Modifier.isStatic(method.getModifiers())) { return null; }\n final String name = method.getName();\n final Class<?>[] param = method.getParameterTypes();\n for (final Class<?> i : declarer.getInterfaces()) {\n try {\n final Method r = bubble(Reflection.method(i, name, param));\n if (null != r) { return r; }\n } catch (final NoSuchMethodException e) {}\n }\n final Class<?> parent = declarer.getSuperclass();\n if (null != parent) {\n try {\n final Method r = bubble(Reflection.method(parent, name, param));\n if (null != r) { return r; }\n } catch (final NoSuchMethodException e) {}\n }\n return null;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic boolean visit(MethodDeclaration node) {\r\n\t\tIMethodBinding imb = node.resolveBinding();\r\n\t\tIJavaElement ije = imb.getJavaElement();\r\n\t\tif (ije instanceof IMethod) {\r\n\t\t\tIMethod im = (IMethod) ije;\r\n\t\t\tList<SingleVariableDeclaration> para_list = node.parameters();\r\n\t\t\tIRGeneratorHelper.HandleMethodDeclaration(java_project, graph_manager, node.getBody(), ele_factory,\r\n\t\t\t\t\tstmt_factory, imb, im, it, para_list, super_class_element, type_declare_resource, type_declare);\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic void method() {\n\t\tsuper.method();\r\n\t\tSystem.out.println(\"Iam in a subclass\");\r\n\t}",
"public String getMethod(String className, String methodName, String methodDescriptor) {\n if (!classFilter.contains(className)) return null;\n\n // Don't remap <init>, <clinit>, values, valueOf, access$* TODO: don't remap any synthetic/bridge methods\n if (methodName.equals(\"<init>\") ||\n methodName.equals(\"<clinit>\") ||\n methodName.equals(\"values\") ||\n methodName.equals(\"valueOf\") ||\n methodName.startsWith(\"access$\")) return null;\n\n // Don't remap inherited methods, their name is inherited from the parent's mapping\n for (String superclass : inheritanceProvider.getAllSuperclasses(className)) {\n for (MemberRef ref : inheritanceProvider.getInheritableMethods(superclass)) {\n if (methodName.equals(ref.name) && TypeUtil.methodDescriptorOverrides(inheritanceProvider, methodDescriptor, ref.descriptor)) {\n return null;\n }\n }\n }\n\n String result = super.getMethod(className, methodName, methodDescriptor);\n if (result == null) {\n result = \"method\" + methodIndex++;\n addMethod(className, methodName, methodDescriptor, result);\n }\n return result;\n }",
"private static Method findTransformer(Class<?> rawType) {\n if (rawType == LinkedListMultimap.class || rawType == ListMultimap.class || rawType ==\n Multimap.class) {\n return null;\n }\n\n // First, check type itself for matching methods\n for (String methodName : METHOD_NAMES) {\n try {\n Method m = rawType.getDeclaredMethod(methodName, Multimap.class);\n if (m != null) {\n return m;\n }\n } catch (NoSuchMethodException e) {\n }\n // pass SecurityExceptions as-is:\n // } catch (SecurityException e) { }\n }\n\n // If not working, possibly super types too (should we?)\n for (String methodName : METHOD_NAMES) {\n try {\n Method m = rawType.getMethod(methodName, Multimap.class);\n if (m != null) {\n return m;\n }\n } catch (NoSuchMethodException e) {\n }\n // pass SecurityExceptions as-is:\n // } catch (SecurityException e) { }\n }\n\n return null;\n }",
"@Override public RebaseSearcher findSymbols(String pattern,String kind)\n{\n RebaseJavaSearch search = new RebaseJavaSearch(this);\n\n findSymbols(search,pattern,kind);\n\n return search;\n}",
"public void myMethod(){\n\t\t\tsuper.myMethod();\n\t\t\tSystem.out.println(\"Overriding method\");\n\t\t }",
"public abstract RlcpMethod getMethod();",
"protected Method getMethod() {\n return method;\n }",
"ClassMember getMethod () { return method; }",
"public Method getMethod() {\n return mMethod;\n }",
"private static interface Derived extends Base {\n\n public void foo();\n }",
"private Method getDeclaredMethodFor(Class<?> clazz, String name, Class<?>... parameterTypes) {\n try {\n return clazz.getDeclaredMethod(name, parameterTypes);\n } catch (NoSuchMethodException e) {\n Class<?> superClass = clazz.getSuperclass();\n if (superClass != null) {\n return getDeclaredMethodFor(superClass, name, parameterTypes);\n }\n }\n return null;\n }",
"public interface MethodCandidate extends Ordered {\n\n /**\n * The default position.\n */\n int DEFAULT_POSITION = 0;\n\n /**\n * Whether the given method name matches this finder.\n *\n * @param methodElement The method element. Never null.\n * @param matchContext The match context. Never null.\n * @return true if it does\n */\n boolean isMethodMatch(@NonNull MethodElement methodElement, @NonNull MatchContext matchContext);\n\n @Override\n default int getOrder() {\n return DEFAULT_POSITION;\n }\n\n /**\n * Builds the method info. The method {@link #isMethodMatch(MethodElement, MatchContext)} should be\n * invoked and checked prior to calling this method.\n *\n * @param matchContext The match context\n * @return The method info or null if it cannot be built. If the method info cannot be built an error will be reported to\n * the passed {@link MethodMatchContext}\n */\n @Nullable\n MethodMatchInfo buildMatchInfo(@NonNull MethodMatchContext matchContext);\n\n}",
"public Method getMethod(String sSig)\n {\n ensureLoaded();\n return (Method) m_tblMethod.get(sSig);\n }",
"public interface MethodInfo {\n\t/**\n\t * Returns the class which declared the method.\n\t */\n\tpublic ClassInfo declaringClass();\n\n\t/**\n\t * Returns the index into the constant pool of the name of the method.\n\t */\n\tpublic int nameIndex();\n\n\t/**\n\t * Returns the index into the constant pool of the type of the method.\n\t */\n\tpublic int typeIndex();\n\n\t/**\n\t * Sets the index into the constant pool of the name of the method.\n\t */\n\tpublic void setNameIndex(int index);\n\n\t/**\n\t * Set the index into the constant pool of the type of the method.\n\t * \n\t * @param index\n\t * The index into the constant pool of the type of the method.\n\t */\n\tpublic void setTypeIndex(int index);\n\n\t/**\n\t * Set the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @param modifiers\n\t * A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic void setModifiers(int modifiers);\n\n\t/**\n\t * Get the modifiers of the method. The values correspond to the constants\n\t * in the Modifiers class.\n\t * \n\t * @return A bit vector of modifier flags for the method.\n\t * @see Modifiers\n\t */\n\tpublic int modifiers();\n\n\t/**\n\t * Get the indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t * \n\t * @return The indices into the constant pool of the types of the exceptions\n\t * thrown by the method.\n\t */\n\tpublic int[] exceptionTypes();\n\n\t/**\n\t * Get the maximum height of the operand stack.\n\t * \n\t * @return The maximum height of the operand stack.\n\t */\n\tpublic int maxStack();\n\n\t/**\n\t * Set the maximum height of the operand stack.\n\t * \n\t * @param maxStack\n\t * The maximum height of the operand stack.\n\t */\n\tpublic void setMaxStack(int maxStack);\n\n\t/**\n\t * Get the maximum number of locals used in the method.\n\t * \n\t * @return The maximum number of locals used in the method.\n\t */\n\tpublic int maxLocals();\n\n\t/**\n\t * Set the maximum number of locals used in the method.\n\t * \n\t * @param maxLocals\n\t * The maximum number of locals used in the method.\n\t */\n\tpublic void setMaxLocals(int maxLocals);\n\n\t/**\n\t * Get the byte code array of the method.\n\t * \n\t * @return The byte code array of the method.\n\t */\n\tpublic byte[] code();\n\n\t/**\n\t * Set the byte code array of the method.\n\t * \n\t * @param code\n\t * The byte code array of the method.\n\t */\n\tpublic void setCode(byte[] code);\n\n\t/**\n\t * Get the line number debug info of the instructions in the method.\n\t * \n\t * @return The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic LineNumberDebugInfo[] lineNumbers();\n\n\t/**\n\t * Set the line number debug info of the instructions in the method.\n\t * \n\t * @param lineNumbers\n\t * The line numbers of the instructions in the method. The array\n\t * will be of size 0 if the method has no line number debug info.\n\t */\n\tpublic void setLineNumbers(LineNumberDebugInfo[] lineNumbers);\n\n\t/**\n\t * Get the local variable debug information for the method.\n\t * \n\t * @return The local variables in the method. The array will be of size 0 if\n\t * the method has no local variable debug info.\n\t */\n\tpublic LocalDebugInfo[] locals();\n\n\t/**\n\t * Set the local variables in the method.\n\t * \n\t * @param locals\n\t * The local variables in the method.\n\t */\n\tpublic void setLocals(LocalDebugInfo[] locals);\n\n\t/**\n\t * Get the exception handlers in the method.\n\t * \n\t * @return The exception handlers in the method.\n\t */\n\tpublic Catch[] exceptionHandlers();\n\n\t/**\n\t * Set the exception handlers in the method.\n\t * \n\t * @param exceptions\n\t * The exception handlers in the method.\n\t */\n\tpublic void setExceptionHandlers(Catch[] exceptions);\n\n\t/**\n\t * Creates a clone of this <tt>MethodInfo</tt> except that its declaring\n\t * class does not know about it.\n\t */\n\tpublic Object clone();\n}",
"@Override\n\tpublic void myMethod() {\n\t\tSystem.out.println(\"D\");\n\t\tB.super.myMethod();\n\t}",
"private void populateFoundMethods()\n \t{\n \t\t// For each non test method, find if it's invoked in each test method one by one.\n \t\t for (IMethod nonTestMethod : this.nonTestMethods)\n \t\t {\n \t\t\t FoundMethod tempFoundMethod = new FoundMethod(nonTestMethod);\n \t\t\t for (IMethod testMethod : this.testMethods)\n \t\t\t {\n \t\t\t\t IJavaSearchScope scope = SearchEngine.createJavaSearchScope(new IJavaElement[] {testMethod});\n \t\t\t\t searchFor(nonTestMethod, scope);\n \t\t\t\t \n \t\t\t\t tempFoundMethod.addMatch(testMethod, this.requestor.getCounter());\n \t\t\t\t \n \t\t\t\t // System.out.println(nonTestMethod.getElementName() + \" found in \" + testMethod.getElementName() + \": \" + this.requestor.getCounter() + \" times.\");\n \t\t\t\t this.requestor.resetCounter();\n \t\t\t }\n \t\t\t foundMethods.add(tempFoundMethod);\n \t\t }\n \t}",
"@Override\n public String getMethod() {\n return METHOD_NAME;\n }",
"public static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String methodName, int parameterCount) {\n\ttry {\n\t\t/* Since this method attempts to find a method by getting all methods from the class,\n\tthis method should only be called if getMethod cannot find the method. */\n\t\tjava.lang.reflect.Method methods[] = aClass.getMethods();\n\t\tfor (int index = 0; index < methods.length; index++){\n\t\t\tjava.lang.reflect.Method method = methods[index];\n\t\t\tif ((method.getParameterTypes().length == parameterCount) && (method.getName().equals(methodName))) {\n\t\t\t\treturn method;\n\t\t\t}\n\t\t}\n\t} catch (java.lang.Throwable exception) {\n\t\treturn null;\n\t}\n\treturn null;\n}",
"public HashSet<SootMethod> getMethodsToExplore(int invocationLevel){\n\t\tHashSet<SootMethod> methodsToExplore = new HashSet<SootMethod>();\r\n\t\t\r\n\t\tfor (SootMethod method : tadaMethods) {\r\n\t\t\tHashSet<SootMethod> invokingMethods = getMethodsInvokingAtLevel(method, invocationLevel);\r\n\t\t\tmethodsToExplore.addAll(invokingMethods);\r\n\t\t}\r\n\t\treturn methodsToExplore;\r\n\t}",
"StackManipulation virtual(TypeDescription invocationTarget);",
"public Method mo27144b(String str, Class<?>... clsArr) throws NoSuchMethodException {\n try {\n return this.f17268a.getMethod(str, clsArr);\n } catch (NoSuchMethodException e) {\n for (Class<?> cls = this.f17268a; cls != null; cls = cls.getSuperclass()) {\n try {\n return cls.getDeclaredMethod(str, clsArr);\n } catch (NoSuchMethodException unused) {\n }\n }\n throw e;\n }\n }",
"public synchronized Method getReadMethod(Class<?> currEntity) {\n\t\tMethod readMethod;\n\t\tString readMethodName = null;\n\t\tif (propType == boolean.class || propType == null) {\n\t\t\treadMethodName = \"is\" + baseName;\n\t\t} else {\n\t\t\treadMethodName = \"get\" + baseName;\n\t\t}\n\t\tClass<?> classStart = currEntity;\n\t\tif (classStart == null) {\n\t\t\tclassStart = entityType;\n\t\t}\n\t\treadMethod = findMemberMethod(classStart, readMethodName, 0, null);\n\t\tif (readMethod == null && readMethodName.startsWith(\"is\")) {\n\t\t\treadMethodName = \"get\" + baseName;\n\t\t\treadMethod = findMemberMethod(classStart, readMethodName, 0, null);\n\t\t}\n\t\tif (readMethod != null) {\n\t\t\tint mf = readMethod.getModifiers();\n\t\t\tif (!Modifier.isPublic(mf)) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tClass<?> retType = readMethod.getReturnType();\n\t\t\tif (!propType.isAssignableFrom(retType)) {\n\t\t\t\tlogger.warn(\"return type unmatch for get Method and property! : \"\n\t\t\t\t\t\t+ classStart.getName() + \".\" + name);\n\t\t\t}\n\t\t}\n\t\treturn readMethod;\n\t}",
"protected void checkMethods(DetailAST aAST)\n {\n final DetailAST objBlock = aAST.findFirstToken(TokenTypes.OBJBLOCK);\n if (objBlock != null) {\n DetailAST child = (DetailAST) objBlock.getFirstChild();\n while (child != null) {\n if (child.getType() == TokenTypes.METHOD_DEF) {\n checkMethod(child, \"create\", \"javax.ejb.CreateException\");\n checkMethod(child, \"find\", \"javax.ejb.FinderException\");\n }\n child = (DetailAST) child.getNextSibling();\n }\n }\n }",
"public MethodSignature getIndistinguishableMethod(MethodSignature signature) {\n for (MethodSignature ms : methodTable.get(signature.getSymbol())) {\n if (ms.isIndistinguishable(signature)) return ms;\n }\n\n return null;\n }"
] | [
"0.6609176",
"0.5859866",
"0.57753223",
"0.56977636",
"0.5628511",
"0.5562355",
"0.5554918",
"0.54977214",
"0.5370333",
"0.52800655",
"0.52603143",
"0.5190773",
"0.5184028",
"0.5175798",
"0.5165662",
"0.5162898",
"0.5158507",
"0.514156",
"0.51214284",
"0.5102667",
"0.5081157",
"0.5081157",
"0.502028",
"0.50149244",
"0.50071895",
"0.49952954",
"0.49437135",
"0.4941517",
"0.49380702",
"0.4937918",
"0.49266693",
"0.4904211",
"0.4880237",
"0.48710212",
"0.48593968",
"0.48590583",
"0.48561966",
"0.48533466",
"0.48506233",
"0.48491287",
"0.48150057",
"0.48150057",
"0.48138413",
"0.48117104",
"0.48034638",
"0.4787171",
"0.47747114",
"0.47742367",
"0.4769241",
"0.47672305",
"0.474979",
"0.4741974",
"0.47383964",
"0.47377953",
"0.47269857",
"0.47154534",
"0.47154534",
"0.47154534",
"0.47141895",
"0.47108442",
"0.4698633",
"0.46837458",
"0.46823832",
"0.46786967",
"0.46734536",
"0.46686807",
"0.46644816",
"0.46643856",
"0.46605197",
"0.46600905",
"0.46581468",
"0.4655885",
"0.4653126",
"0.4642784",
"0.4640806",
"0.4640375",
"0.4640052",
"0.46397775",
"0.46392336",
"0.46290478",
"0.46197107",
"0.46178606",
"0.461659",
"0.46100035",
"0.4609223",
"0.4601334",
"0.46005806",
"0.45919564",
"0.4589205",
"0.4575793",
"0.4567068",
"0.4565629",
"0.45629555",
"0.4550931",
"0.45504686",
"0.45429906",
"0.45403346",
"0.4539544",
"0.45299384",
"0.4528755"
] | 0.63405144 | 1 |
Retrieves a Set containing all the SubTypes of this type. | public Set<Type> getSubTypes() {
final Set<Type> subTypes = this.createSubTypes();
final Set<Type> merged = new HashSet<Type>();
merged.addAll(subTypes);
merged.addAll(this.getNewSubTypes());
return Collections.unmodifiableSet(merged);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceSubType> listSubTypes()\r\n {\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceSubType>(getSemanticObject().listObjectProperties(swb_hasPTSubType));\r\n }",
"protected Set<NewType> getNewSubTypes() {\r\n\t\tfinal Set<NewType> subTypes = new HashSet<NewType>();\r\n\r\n\t\tfinal GeneratorContext context = this.getGeneratorContext();\r\n\t\tfinal Iterator<NewType> newTypesIterator = context.getNewTypes().iterator();\r\n\r\n\t\twhile (newTypesIterator.hasNext()) {\r\n\t\t\tfinal NewType newType = newTypesIterator.next();\r\n\t\t\tif (newType.getSuperType() == this) {\r\n\t\t\t\tsubTypes.add(newType);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn subTypes;\r\n\t}",
"public List<Subset> getElements() {\n\t\treturn subSetList;\n\t}",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"Set<? extends TypeContract<? super _Type_>> getSuperTypeContracts();",
"public List<? extends IType> getSubtypes()\n {\n if( _subtypes == null )\n {\n _subtypes = new ArrayList<IGosuClassInternal>();\n Set<? extends CharSequence> typeNames = getTypeLoader().getAllTypeNames();\n for( CharSequence typeName : typeNames )\n {\n IType type = TypeSystem.getByFullNameIfValid(typeName.toString());\n if (type instanceof IGosuClassInternal) {\n IGosuClassInternal gosuClass = (IGosuClassInternal) type;\n if( getOrCreateTypeReference() != gosuClass && isAssignableFrom( gosuClass ) )\n {\n _subtypes.add( gosuClass );\n }\n }\n }\n }\n\n return _subtypes;\n }",
"public Set<String> loadAllSubstanceNames();",
"public List<Sub> getSubs(){\n\t\t\n\t\treturn null;\n\t}",
"@Override\n public List<Type> getProperlySubsumedTypes(Type type) {\n return ((TypeImpl) type).getAllSubtypes().collect(Collectors.toList());\n }",
"public Set<TypeDescriptor> getAllRelatedTypes() {\n final var types = getTypeParameters().stream()\n .flatMap(type -> type.getAllRelatedTypes().stream())\n .collect(Collectors.toCollection(HashSet::new));\n\n types.add(this);\n return types;\n }",
"public Set<IsoCountry> getSubdivisions() {\n return subdivisions;\n }",
"public int[] getSubclasses() {\n return subclasses;\n }",
"Set<String> getBaseTypes();",
"public Set getTypeSet()\n {\n Set set = new HashSet();\n\n Iterator it = attTypeList.keySet().iterator();\n while (it.hasNext())\n {\n // Get key\n Object attrName = it.next();\n Object type = attTypeList.get(attrName);\n set.add(type);\n }\n return set;\n }",
"public static Set<AnnotatedDeclaredType> getSuperTypes(AnnotatedDeclaredType type) {\n\n Set<AnnotatedDeclaredType> supertypes = new LinkedHashSet<>();\n if (type == null) {\n return supertypes;\n }\n\n // Set up a stack containing the type mirror of subtype, which\n // is our starting point.\n Deque<AnnotatedDeclaredType> stack = new ArrayDeque<>();\n stack.push(type);\n\n while (!stack.isEmpty()) {\n AnnotatedDeclaredType current = stack.pop();\n\n // For each direct supertype of the current type, if it\n // hasn't already been visited, push it onto the stack and\n // add it to our supertypes set.\n for (AnnotatedDeclaredType supertype : current.directSuperTypes()) {\n if (!supertypes.contains(supertype)) {\n stack.push(supertype);\n supertypes.add(supertype);\n }\n }\n }\n\n return Collections.<AnnotatedDeclaredType>unmodifiableSet(supertypes);\n }",
"public RegitemSubsubtypes getRegitemSubsubtypes() {\n return regitemSubsubtypes;\n }",
"List<SubsetDefinition> getSubsetDefinitionList() {\n return this.userCollection.getSubsetDefinitions();\n }",
"Set<Concept> getSuperclasses(Concept concept);",
"public Set<ResourceType> getAllResourceTypes() {\n parseExternalResources();\n Set<ResourceType> resourceTypes = new HashSet<ResourceType>();\n for (DatacollectionGroup group : externalGroupsMap.values()) {\n for (ResourceType rt : group.getResourceTypeCollection()) {\n if (!contains(resourceTypes, rt))\n resourceTypes.add(rt);\n }\n }\n return resourceTypes;\n }",
"@NotNull\n private Set<String> getAllResourceTypes(@NotNull final ResourceResolver resourceResolver) {\n Set<String> allResourceTypes = new LinkedHashSet<>(resourceTypeSet);\n if (inherited) {\n for (String resourceType : resourceTypeSet) {\n allResourceTypes.addAll(Utils.getSuperTypes(resourceType, resourceResolver));\n }\n }\n return allResourceTypes;\n }",
"Set<Concept> getSubclasses(Concept concept);",
"public RegitemSubtypes getRegitemSubtypes() {\n return regitemSubtypes;\n }",
"@Override\n public Vector<Type> getDirectlySubsumedTypes(Type type) {\n return new Vector<>(getDirectSubtypes(type));\n }",
"public Set<V> getSubValues(Class<?> c) {\n return getValues(c, false);\n }",
"public static Set<Type> getBiomeTypes() {\n\t\ttry {\n\t\t\tfinal Field accessor = ReflectionHelper.findField(BiomeDictionary.Type.class, \"byName\");\n\t\t\tif (accessor != null) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tfinal Map<String, BiomeDictionary.Type> stuff = (Map<String, BiomeDictionary.Type>) accessor.get(null);\n\t\t\t\treturn new ReferenceOpenHashSet<>(stuff.values());\n\t\t\t}\n\n\t\t\treturn ImmutableSet.of();\n\n\t\t} catch (final Throwable t) {\n\t\t\tthrow new RuntimeException(\"Cannot locate BiomeDictionary.Type table!\");\n\t\t}\n\n\t}",
"@JsonIgnore\n public List<String> getAncestorTypeNames() {\n if(ancestorDefs != null && !ancestorDefs.isEmpty()) {\n return ancestorDefs.values().stream().map(type -> type.asTypeString()).collect(Collectors.toList());\n } else if (ancestors != null) {\n return ancestors;\n } else {\n return new ArrayList<>();\n }\n }",
"public Iterable<Entity> getAllSubMenus() {\n\t\treturn new UtilDataSourceAPI().listEntities(KIND_SUBMENU, null, null);\n\t }",
"private List<Set<String>> getSubSets(Set<String> set) {\n\t\tString[] setArray = set.toArray(new String[0]);\n\t\tList<Set<String>> result = new ArrayList<Set<String>>();\n\t\tfor(int i = 0; i < setArray.length; i++){\n\t\t\tSet<String> subSet = new HashSet<String>();\n\t\t\tfor(int j = 0; j < setArray.length; j++){\n\t\t\t\tif(j != i) subSet.add(setArray[j]);\n\t\t\t}\n\t\t\tresult.add(subSet);\n\t\t}\n\t\treturn result;\n\t}",
"public Set<RelationType> getRelationTypes();",
"protected long doGetNumberOfSubtypes() {\r\n\t\treturn getParentIndex().getSubtypes().size();\r\n\t}",
"public Set list() {\n Set result = new HashSet();\n for( Iterator it = this.rcIterator(); it.hasNext() ; ){\n ReplicaCatalog catalog = (ReplicaCatalog) it.next();\n result.addAll( catalog.list() );\n }\n return result;\n\n }",
"public Set<PackageType> getPackageTypes() {\r\n\t\treturn Collections.unmodifiableSet(packageTypeSet);\r\n\t}",
"public java.util.Set<jkt.hms.masters.business.MasSubTest> getMasSubTests() {\n\t\treturn masSubTests;\n\t}",
"public List<Class<?>> getSubClasses(Class<?> aClass) {\n\t\treturn ModelClasses.getAllSubClasses(aClass);\n\t}",
"public ReactorResult<java.lang.String> getAllPartOfSet_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), PARTOFSET, java.lang.String.class);\r\n\t}",
"public Set<Taxon> getChildren() {\n\t\treturn children;\n\t}",
"List<Type> getAllTypeList();",
"public Set<AlfClass> getSpecializations()\r\n\t{\treturn Collections.unmodifiableSet(this.specializations);\t}",
"default List<TypeInfo> allTypes() {\n List<TypeInfo> allTypes = new LinkedList<>();\n allTypes.add(this);\n allTypes.addAll(Arrays.asList(interfaces()));\n allTypes.addAll(superClass().stream().flatMap(s -> s.allTypes().stream()).collect(Collectors.toList()));\n return allTypes;\n }",
"public Set<T> getRemoveEntities() {\n return unmodifiableSet(removeEntities);\n }",
"public Set<MindObject> getDirectSubComponents(){\n return new HashSet<>();\n }",
"default Set<String> getSubkeys() {\n return Collections.emptySet();\n }",
"public List<String> getSubsetDefinitionIds() {\n return Identifiable.getIds(getSubsetDefinitionList());\n }",
"public ArrayList<Sets> getSets() {\n return this.sets;\n }",
"public Collection<SubsValue> getSubsValues() {\n\t\tCollection<SubsValue> result = new HashSet<SubsValue>();\n\n\t\tif (TemplatesStore.getInstance().getData().values() != null) {\n\t\t\tfor (TemplatesStoreData data : TemplatesStore.getInstance().getData().values()) {\n\t\t\t\tif (this.isSelectedCartridge(data)) {\n\t\t\t\t\tCollection<SubsValue> subsvals = data.getSubstitutes();\n\t\t\t\t\tif (subsvals != null) {\n\t\t\t\t\t\tDataStore.getInstance().mergeSubsValues(subsvals, false);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}",
"public List<__Type> getTypes() {\n return (List<__Type>) get(\"types\");\n }",
"public List<Set> getSets() {\n\t\treturn this.sets;\n\t}",
"public List<CWLType> getTypes() {\n return types;\n }",
"public Set getAllPersistableChildren() {\n \n Set children = new HashSet();\n children.addAll(comments);\n return children;\n }",
"Set<Class<?>> getClassSetBySuperClass(String packageName, Class<?> superClass);",
"public Set<OntologyScope> getRegisteredScopes();",
"public java.util.Set<jkt.hrms.masters.business.EtrTrvsubapptbl> getEtrTrvsubapptbls () {\n\t\treturn etrTrvsubapptbls;\n\t}",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic <T extends FsSecureBusinessObject> Set<T> getChildren(Class<T> type) {\n\t\tif (FsComment.class.isAssignableFrom(type)){\n\t\t\treturn emptySet;\n\t\t} else {\n\t\t\treturn super.getChildren(type);\n\t\t}\n\t}",
"public Set<Scope> getScopes();",
"public Set<V> getSuperValues(Class<?> c) {\n return getValues(c, true);\n }",
"public ArrayList<String> getTypes(){\n return this.types;\n }",
"public List<TypeObjet> getTypesObjets() {\n\t\treturn null;\n\t}",
"public Collection<ChildType> getChildren();",
"@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }",
"synchronized public Map<String, Set<String>> getTypes() {\n return Collections.unmodifiableMap(\n new HashSet<>(types.entrySet()).stream()\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> Collections.unmodifiableSet(new HashSet<>(e.getValue()))\n ))\n );\n }",
"public List<Collection> getContainingCollections() {\n // TODO implement this\n List<Collection> containingCollections = new ArrayList<>();\n Collection c = this.getParentCollection();\n while (c != null) {\n containingCollections.add(c);\n c = c.getParentCollection();\n }\n return containingCollections;\n }",
"public java.util.ArrayList<Species> getAllSpecies() {\n ArrayList<Species> answer = new ArrayList<Species>();\n getAllDescendantSpecies(overallRoot, answer);\n return answer;\n \n }",
"public List<SecTyp> getAllTypes();",
"public FSList getSubstrates() {\n if (Reaction_Type.featOkTst && ((Reaction_Type)jcasType).casFeat_substrates == null)\n jcasType.jcas.throwFeatMissing(\"substrates\", \"uk.ac.bbk.REx.types.Reaction\");\n return (FSList)(jcasType.ll_cas.ll_getFSForRef(jcasType.ll_cas.ll_getRefValue(addr, ((Reaction_Type)jcasType).casFeatCode_substrates)));}",
"public Set<String> nouns() {\n HashSet<String> set = new HashSet<String>();\n for (TreeSet<String> hs: synsets.values()) {\n for (String s: hs) {\n set.add(s);\n }\n }\n return set;\n }",
"public Set<Entry> getSet() {\n Set<Entry> litSet = this.litRegister;\n return litSet;\n }",
"Set<ShipmentType> getShipmentTypes();",
"public ArrayList<String> getRack() {\n\t\treturn subsets;\n\t}",
"public Map<String, SubField> getSubFields(){\n\t\treturn this.subfields;\n\t}",
"public Set<T> getSet () {\r\n\t\treturn _set;\r\n\t}",
"@Override\r\n\tpublic List<SubCategory> getAllSubCategories() throws IOException {\n\t\treturn categoryDao.getAllSubCategories();\r\n\t}",
"public Set<AlertClassSubscription> getCopySubscriptions() {\n\t\tHashSet<AlertClassSubscription> currentSub = subs;\n\t\tHashSet<AlertClassSubscription> copy = new HashSet<>();\n\t\tcopy.addAll(currentSub);\n\t\treturn copy;\n\t}",
"public String getSubSubType() {\r\n\t\treturn subSubType;\r\n\t}",
"public Set<TopLevel> getMembers() {\n\t\tSet<TopLevel> result = new HashSet<>();\n\t\tfor (URI memberURI : members) {\n\t\t\tTopLevel member = this.getSBOLDocument().getTopLevel(memberURI);\n\t\t\tif(member != null) {\n\t\t\t\tresult.add(member);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public Collection<Collection<T>> getExtensions();",
"public List<Type> getAll();",
"private Set<String> classSet(String whichClass) {\n return subclasses.get(whichClass);\n }",
"@Override\n\tpublic List<SubjectsType> findAll() {\n\t\ttry {\n\t\t\treturn subjectsTypeRepository.findAll();\n\t\t} catch (Exception e) {\n\t\t\tlog.error(e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public Set<Class<?>> getTypes() {\n\t\treturn dataTypes;\n\t}",
"public synchronized static Set<String> getAvailableTypes() {\n populateCache();\n return Collections.unmodifiableSet(cache.keySet());\n }",
"public static List<String> getallSupertype(\n String forClass\n ) throws ServiceException {\n ModelElement modelElement = modelTypeNames.get(forClass);\n if(modelElement == null) {\n return null;\n } else {\n final List allSupertype = modelElement.allSupertypes;\n return allSupertype;\n }\n }",
"<T> Set<T> lookupAll(Class<T> type);",
"public static ArrayList<ArrayList<Furniture>> getSubsets(ArrayList<Furniture> set) {\n ArrayList<ArrayList<Furniture>> allsubsets = new ArrayList<ArrayList<Furniture>>();\n // amount of subsets is 2^(set size)\n int max = 1 << set.size();\n\n for (int i = 0; i < max; i++) {\n ArrayList<Furniture> subset = new ArrayList<Furniture>();\n for (int j = 0; j < set.size(); j++) {\n if (((i >> j) & 1) == 1) {\n subset.add(set.get(j));\n }\n }\n allsubsets.add(subset);\n }\n return allsubsets;\n }",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<Class<?>> getTypes() {\r\n\t\treturn dataTypes;\r\n\t}",
"public Set<IS> getFreItemSet();",
"public List<Class<?>> getSuperClasses(Class<?> aClass) {\n\t\treturn ModelClasses.getAllSuperClasses(aClass);\n\t}",
"protected void recursivelyGetInnerTypes(Set<Type> allInnerTypes) {\n Collection<Type> currentInnerTypes = getInnerTypes().values();\n allInnerTypes.addAll(currentInnerTypes);\n for (Type type : currentInnerTypes) {\n type.recursivelyGetInnerTypes(allInnerTypes);\n }\n }",
"public SortedSet<String> getAvailableLevels() {\n if (allAvailableLevels == null) {\n allAvailableLevels = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n\n List<String> levels = DataDeliveryHandlers\n .getParameterHandler().getDataLevelTypeDescriptions(\n dataTypeList);\n if (levels != null && !levels.isEmpty()\n && levels.get(0) != null) {\n allAvailableLevels.addAll(levels);\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the levels.\", e);\n }\n }\n\n return allAvailableLevels;\n }",
"public static List<String> getsubtype(\n String forClass\n ) throws ServiceException {\n ModelElement modelElement = modelTypeNames.get(forClass);\n if(modelElement == null) {\n return null;\n } else {\n final List subtype = modelElement.subtypes;\n return subtype;\n }\n }",
"public HashSet getAllRoles() {\n\n HashSet newSet = new HashSet();\n\n addGranteeAndRoles(newSet);\n\n // Since we added \"Grantee\" in addition to Roles, need to remove self.\n newSet.remove(sName);\n\n return newSet;\n }",
"private Collection<TypeDeclaration> getAllTypes() {\n if (allTypes != null) {\n return allTypes;\n }\n allTypes = new ArrayList<TypeDeclaration>();\n for (Symbol s : getMembers(false)) {\n allTypes.add(env.declMaker.getTypeDeclaration((ClassSymbol) s));\n }\n return allTypes;\n }",
"public Set<String> filterEntities(Set<String> superset) {\n Set<String> set = new HashSet<String>(); set.addAll(superset);\n // Check to see if any of the relationships are typed... if so, we'll have to do the typed conversions...\n for (int i=0;i<active_relationships.size();i++) {\n\t String relationship = active_relationships.get(i);\n\t if (relationshipFromTyped(relationship)) addTypedStrings(set, relationshipFromHeader(relationship));\n\t if (relationshipToTyped(relationship)) addTypedStrings(set, relationshipToHeader(relationship));\n\t} \n\t// Retain all...\n\tset.retainAll(visible_entities);\n\treturn set;\n }",
"public Iterator<IEventType<T>> getDeepSuperTypes();",
"public boolean subset(ZYSet<ElementType> potentialSubset){\n for(ElementType e:potentialSubset){\n if(!this.contains(e)){\n return false;\n }\n }\n return true;\n }",
"public com.google.protobuf.ByteString\n getSubTypeBytes() {\n java.lang.Object ref = subType_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n subType_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"protected void removeFromAllSubsets()\r\n {\n if (!m_subsets.isEmpty()) {\r\n List<SubsetImpl> tmp = new ArrayList<SubsetImpl>(m_subsets);\r\n m_subsets.clear();\r\n tmp.forEach(r -> {if (r != null) r.remove(this);});\r\n }\r\n }",
"public SortedSet<String> getAvailableDataSets() {\n if (allAvailableDataSets == null) {\n allAvailableDataSets = new TreeSet<String>();\n\n try {\n List<String> dataTypeList = new ArrayList<String>();\n dataTypeList.add(dataType);\n allAvailableDataSets.addAll(DataDeliveryHandlers\n .getDataSetNameHandler().getByDataTypes(dataTypeList));\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the dataset list.\", e);\n }\n }\n\n return allAvailableDataSets;\n }"
] | [
"0.6938",
"0.6409062",
"0.63758713",
"0.63587266",
"0.63177735",
"0.62806183",
"0.6158806",
"0.6128004",
"0.6042865",
"0.59932035",
"0.5911043",
"0.5888018",
"0.5878145",
"0.58773625",
"0.5816781",
"0.5811705",
"0.57742673",
"0.57328576",
"0.57261115",
"0.567443",
"0.5673938",
"0.5573725",
"0.55200785",
"0.54970306",
"0.5489778",
"0.5486826",
"0.5442218",
"0.5418811",
"0.53603506",
"0.53435963",
"0.53421134",
"0.5328026",
"0.5324716",
"0.5316071",
"0.5293011",
"0.5290453",
"0.52736807",
"0.5261647",
"0.52475005",
"0.5244838",
"0.5223858",
"0.5217916",
"0.5207475",
"0.5206892",
"0.5201919",
"0.51915824",
"0.5181607",
"0.51718265",
"0.51641226",
"0.51550835",
"0.51536435",
"0.5147511",
"0.513575",
"0.5127316",
"0.51177573",
"0.5103651",
"0.51030314",
"0.51020896",
"0.5098941",
"0.5094305",
"0.50888515",
"0.5087637",
"0.5087616",
"0.5069909",
"0.5066838",
"0.5066584",
"0.5060329",
"0.5060004",
"0.50564796",
"0.5047043",
"0.50457907",
"0.5042322",
"0.50372225",
"0.503387",
"0.50227517",
"0.50012547",
"0.4997986",
"0.499463",
"0.49766985",
"0.49766985",
"0.49766326",
"0.49715775",
"0.4971304",
"0.4965458",
"0.49601412",
"0.49601412",
"0.49601412",
"0.49512088",
"0.49459368",
"0.49424946",
"0.49410728",
"0.4939943",
"0.49328303",
"0.49264303",
"0.49210784",
"0.49198222",
"0.49139073",
"0.4913832",
"0.491222",
"0.4908821"
] | 0.81620663 | 0 |
Searches all NewTypes super type chain to determine if any of them are sub types of this type. | protected Set<NewType> getNewSubTypes() {
final Set<NewType> subTypes = new HashSet<NewType>();
final GeneratorContext context = this.getGeneratorContext();
final Iterator<NewType> newTypesIterator = context.getNewTypes().iterator();
while (newTypesIterator.hasNext()) {
final NewType newType = newTypesIterator.next();
if (newType.getSuperType() == this) {
subTypes.add(newType);
}
}
return subTypes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean hasAncestorOfType( Set<Type> types ) {\n PlanNode node = this.parent;\n while (node != null) {\n if (types.contains(node.getType())) return true;\n node = node.getParent();\n }\n return false;\n }",
"public boolean hasAncestorOfType( Type firstType,\n Type... additionalTypes ) {\n return hasAncestorOfType(EnumSet.of(firstType, additionalTypes));\n }",
"public boolean hasContainingParentType() {\n return fieldSetFlags()[2];\n }",
"private boolean addIfContainedSubClass(EClass eClass) {\n EList<EClass> superClasses = eClass.getESuperTypes();\n for (EClass superClass : superClasses) {\n if (visitedContainedClasses.contains(superClass)) {\n\n // eClass is a subclass of the containment set\n unvisitedContainedClasses.add(eClass);\n\n possiblyReportNewClass(true, \"sub class\", superClass, eClass);\n return true;\n }\n }\n return false;\n }",
"@Pure\n\tprotected boolean isSubTypeOf(EObject context, JvmTypeReference subType, JvmTypeReference superType) {\n\t\tif (isTypeReference(superType) && isTypeReference(subType)) {\n\t\t\tStandardTypeReferenceOwner owner = new StandardTypeReferenceOwner(services, context);\n\t\t\tLightweightTypeReferenceFactory factory = new LightweightTypeReferenceFactory(owner, false);\n\t\t\tLightweightTypeReference reference = factory.toLightweightReference(subType);\n\t\t\treturn reference.isSubtypeOf(superType.getType());\n\t\t}\n\t\treturn false;\n\t}",
"boolean containsAll(String type) {\n boolean containsType = contains(type);\n if (!containsType) {\n for (ASTNode child : children) {\n containsType = child.containsAll(type);\n if (containsType) return true;\n }\n\n // should be false\n return containsType;\n } else return true;\n }",
"public Set<Type> getSubTypes() {\r\n\t\tfinal Set<Type> subTypes = this.createSubTypes();\r\n\r\n\t\tfinal Set<Type> merged = new HashSet<Type>();\r\n\t\tmerged.addAll(subTypes);\r\n\t\tmerged.addAll(this.getNewSubTypes());\r\n\r\n\t\treturn Collections.unmodifiableSet(merged);\r\n\t}",
"boolean containsAll(Pattern type) {\n boolean matchesType = contains(type);\n if (!matchesType) {\n for (ASTNode child : children) {\n matchesType = child.containsAll(type);\n if (matchesType) return true;\n }\n\n // should be false\n return matchesType;\n } else return true;\n }",
"public boolean hasSuperClasses(Class<?> aClass) {\n\t\treturn this.getSuperClasses(aClass) != null && this.getSuperClasses(aClass).size() > 0;\n\t}",
"private static boolean shouldStop(AnnotatedTypeMirror sup, AnnotatedTypeMirror sub) {\n // Check if it's the same type\n // if sup is primitive, but not sub\n if (sup.getKind().isPrimitive() && !sub.getKind().isPrimitive()) {\n /// XXX shouldn't this be \"return false\"?\n return true;\n }\n if (sup.getKind().isPrimitive() && sub.getKind().isPrimitive()) {\n return sup.getKind() == sub.getKind();\n }\n // if both are declared\n if (sup.getKind() == TypeKind.DECLARED && sub.getKind() == TypeKind.DECLARED) {\n AnnotatedDeclaredType supdt = (AnnotatedDeclaredType) sup;\n AnnotatedDeclaredType subdt = (AnnotatedDeclaredType) sub;\n\n // Check if it's the same name\n if (!supdt.getUnderlyingType().asElement().equals(\n subdt.getUnderlyingType().asElement()))\n return false;\n\n return true;\n }\n\n if (sup.getKind() == TypeKind.ARRAY && sub.getKind() == TypeKind.ARRAY) {\n AnnotatedArrayType supat = (AnnotatedArrayType) sup;\n AnnotatedArrayType subat = (AnnotatedArrayType) sub;\n return shouldStop(supat.getComponentType(), subat.getComponentType());\n }\n // horrible horrible hack\n // Types.isSameType() doesn't work for type variables or wildcards\n return sup.getUnderlyingType().toString().equals(sub.getUnderlyingType().toString());\n }",
"private boolean hasFilterClass(OWLEquivalentClassesAxiom axiom, Set<OWLClass> rootTerms) {\n if (axiom != null) {\n Set<OWLClass> signature = axiom.getClassesInSignature();\n for (OWLClass sigCls : signature) {\n NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(sigCls, false);\n for(OWLClass root : rootTerms) {\n if (superClasses.containsEntity(root)) {\n return true;\n }\n }\n }\n }\n return false;\n }",
"public boolean hasSubTaxa() {\n\t\treturn !children.isEmpty();\n\t}",
"public boolean hasSubClasses(Class<?> aClass) {\n\t\treturn this.getSubClasses(aClass) != null && this.getSubClasses(aClass).size() > 0;\n\t}",
"protected long doGetNumberOfSubtypes() {\r\n\t\treturn getParentIndex().getSubtypes().size();\r\n\t}",
"Set<? extends TypeContract<? super _Type_>> getSuperTypeContracts();",
"private boolean hasFilterClass(Set<OWLClassAxiom> axioms, Set<OWLClass> rootTerms) {\n if (axioms != null && !axioms.isEmpty()) {\n for (OWLClassAxiom ax : axioms) {\n if (ax instanceof OWLEquivalentClassesAxiom) {\n Set<OWLClass> signature = ax.getClassesInSignature();\n for (OWLClass sigCls : signature) {\n NodeSet<OWLClass> superClasses = reasoner.getSuperClasses(sigCls, false);\n for(OWLClass root : rootTerms) {\n if (superClasses.containsEntity(root)) {\n return true;\n }\n }\n }\n }\n }\n }\n return false;\n }",
"public boolean hasSuperclass(Class<?> scType) {\n boolean result = false;\n\n Class<?> c = cut.getSuperclass();\n result = c.equals(scType);\n\n return result;\n }",
"public boolean hasAncestorOfType( Type type ) {\n return hasAncestorOfType(EnumSet.of(type));\n }",
"protected abstract void registerSuperTypes();",
"boolean isSuperType(@NotNull DfType other);",
"void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <[email protected]>\n\taddKnown(ROOT, prevClass);\n }",
"public static boolean subtypeOf(Node a, Node b) {\n\t\tif ((a instanceof BoolType) && (b instanceof IntType)) return true;\n\t\telse if ((a instanceof IntType) && (b instanceof IntType)) return true;\n\t\telse if ((a instanceof VoidType) && (b instanceof VoidType)) return true;\n\t\telse if ((a instanceof BoolType) && (b instanceof BoolType)) return true;\n\t\telse if ((a instanceof NullType) && (b instanceof ClassType)) return true;\n\t\telse if ((a instanceof ClassType) && (b instanceof ClassType)) {\n\t\t\tSet<String> SuperA = ((ClassType) a).getSuperList(true);\n\t\t\tSet<String> SuperB = ((ClassType) b).getSuperList(true);\n\t\t\tSet<String> intersection = new HashSet<>(SuperA);\n\t\t\tintersection.retainAll(SuperB);\n\t\t\tif (!intersection.isEmpty()) return true;\n\t\t}\n\t\treturn false;\n\t}",
"private boolean checkUnreachedClassesForContainersAndSubclasses() {\n Iterator<EClass> iterator = unreachedClasses.iterator();\n while (iterator.hasNext()) {\n EClass eClass = iterator.next();\n\n if (grabIncomingContainments && addIfContainer(eClass) || grabSubClasses && addIfContainedSubClass(eClass)) {\n iterator.remove();\n return true;\n }\n }\n return false;\n }",
"public Iterator<IEventType<T>> getDeepSuperTypes();",
"protected long doGetNumberOfSubtypes(Collection<? extends Topic> types, boolean all) {\r\n\t\treturn getParentIndex().getSubtypes(types, all).size();\r\n\t}",
"boolean matchesType( Name primaryType,\n Set<Name> mixinTypes );",
"boolean findSpecialtyContainers(){\n\t\t\tif (this.receptacle != null)//checks and sees if there's any containers in the location.\n\t\t\t\tfor (int i = 0; i < this.receptacle.size(); i++)\n\t\t\t\t\tif ((this.receptacle.get(i) instanceof SpecialtyContainer))\n\t\t\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}",
"@Override\n public List<Type> getProperlySubsumedTypes(Type type) {\n return ((TypeImpl) type).getAllSubtypes().collect(Collectors.toList());\n }",
"private static boolean containsUnknown(Type type) {\n if (type == null) return false;\n if (type == Type.UNKNOWN) return true;\n if (type instanceof SequenceType sequenceType) {\n for (ModifiedType modifiedType : sequenceType)\n if (containsUnknown(modifiedType.getType())) return true;\n } else if (type instanceof ArrayType) return containsUnknown(((ArrayType) type).getBaseType());\n\n return false;\n }",
"public boolean isSeen(TypeReference type, boolean withSuper) {\n if (type == null) {\n throw new IllegalArgumentException(\"The argument type may not be null\");\n }\n\n if (withSuper) {\n return seenTypes.containsKey(type);\n } else {\n if (seenTypes.containsKey(type)) {\n if (seenTypes.get(type).get(0).type.equals(type)) {\n return true;\n }\n }\n return false;\n\n }\n }",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"public void checkTypes() {\n this.root.accept(this);\n }",
"public boolean isTree() {\r\n\t\tfor (Entry<Object, SerialziationTypeRefs> ent : serTypes.entrySet()) {\r\n\t\t\tSerialziationTypeRefs rs = ent.getValue();\r\n\t\t\tif (ent.getKey() instanceof Resource && rs.total > 1) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"default boolean isParent(@NotNull Type type, @NotNull Meta meta, @NotNull List<Object> children) {\r\n return false;\r\n }",
"public boolean isSubclassOf(ClassReference other) {\n\t\t//TODO: Review this code thoroughly, it hasn't been looked at in a while\n\t\tif (this.equals(other) || this.equals(NULL) || other.equals(NULL)) {\n\t\t\treturn true;\n\t\t}\n\t\tboolean isPrimitive = (primitive != Primitive.REFERENCE && other.primitive != Primitive.REFERENCE);\n\t\tboolean isReference = (primitive == Primitive.REFERENCE && other.primitive == Primitive.REFERENCE);\n\t\tif (isPrimitive && isReference) {\n\t\t\treturn false;\n\t\t} else if (isPrimitive) {\n\t\t\tif (other.primitive == Primitive.INT && INT_TYPES.contains(primitive)) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else if (isReference) {\n\t\t\tQueue<ClassReference> tests = new LinkedList<>();\n\t\t\ttests.add(this);\n\t\t\twhile (!tests.isEmpty()) {\n\t\t\t\tClassReference test = tests.poll();\n\t\t\t\tif (!test.equals(OBJECT)) {\n\t\t\t\t\tJavaClass testClass = ClassStore.findClass(test);\n\t\t\t\t\tif (testClass != null) {\n\t\t\t\t\t\tClassReference superType = testClass.superType;\n\t\t\t\t\t\tif (superType.equals(other)) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttests.add(superType);\n\t\t\t\t\t\tfor (ClassReference interfaceType : testClass.interfaces) {\n\t\t\t\t\t\t\tif (interfaceType.equals(other)) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttests.add(interfaceType);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"boolean contains(String type) {\n for (ASTNode child : children) {\n if (child.getType().equals(type)) return true;\n }\n\n return false;\n }",
"protected static boolean checkTypeReferences() {\n Map<Class<?>, LinkedList<Class<?>>> missingTypes = new HashMap<>();\n for (Map.Entry<String, ClassProperties> entry : classToClassProperties.entrySet()) {\n String className = entry.getKey();\n Class<?> c = lookupClass(className);\n Short n = entry.getValue().typeNum;\n if (marshalledTypeNum(n)) {\n Class<?> superclass = getValidSuperclass(c);\n if (superclass != null)\n checkClassPresent(c, superclass, missingTypes);\n LinkedList<Field> fields = getValidClassFields(c);\n for (Field f : fields) {\n Class<?> fieldType = getFieldType(f);\n checkClassPresent(c, fieldType, missingTypes);\n }\n }\n }\n if (missingTypes.size() > 0) {\n for (Map.Entry<Class<?>, LinkedList<Class<?>>> entry : missingTypes.entrySet()) {\n Class<?> c = entry.getKey();\n LinkedList<Class<?>> refs = entry.getValue();\n String s = \"\";\n for (Class<?> ref : refs) {\n if (s != \"\")\n s += \", \";\n s += \"'\" + getSimpleClassName(ref) + \"'\";\n }\n Log.error(\"Missing type '\" + getSimpleClassName(c) + \"' is referred to by type(s) \" + s);\n }\n Log.error(\"Aborting code generation due to missing types\");\n return false;\n }\n else\n return true;\n }",
"public boolean checkSubClass(OWLClass class1, OWLClass class2) {\n \n Set<OWLClass> supers = new HashSet<OWLClass>();\n \n for (Set<OWLClass> set : loader.getSuperClasses(class2)) {\n supers.addAll(set);\n }\n \n for (OWLClass cls : supers) {\n if (cls.getIRI().equals(class1.getIRI())) {\n return true;\n }\n }\n return false;\n }",
"@SuppressWarnings(\"rawtypes\")\n\tpublic static boolean getTypeParameters(Type superType, TypeDefinition finalType, TypeVariable[] vars, TypeDefinition[] params) {\n\t\tif (superType instanceof ParameterizedType)\n\t\t\treturn getTypeParameters((ParameterizedType)superType, finalType, vars, params);\n\t\treturn false;\n\t}",
"public Set<JavaType.ClassJavaType> superTypes() {\n ImmutableSet.Builder<JavaType.ClassJavaType> types = ImmutableSet.builder();\n JavaType.ClassJavaType superClassType = (JavaType.ClassJavaType) this.superClass();\n types.addAll(this.interfacesOfType());\n while (superClassType != null) {\n types.add(superClassType);\n TypeJavaSymbol superClassSymbol = superClassType.getSymbol();\n types.addAll(superClassSymbol.interfacesOfType());\n superClassType = (JavaType.ClassJavaType) superClassSymbol.superClass();\n }\n return types.build();\n }",
"static boolean anyObjectTypes(Object[] ptypes) {\n for (Object ptype : ptypes) {\n if (isObjectType(ptype)) {\n return true;\n }\n }\n return false;\n }",
"public boolean checkSuperClass(OWLClass class1, OWLClass class2) {\n \n Set<OWLClass> supers = new HashSet<OWLClass>();\n \n for (Set<OWLClass> set : loader.getSuperClasses(class1)) {\n supers.addAll(set);\n }\n \n for (OWLClass cls : supers) {\n if (cls.getIRI().equals(class2.getIRI())) {\n return true;\n }\n }\n return false;\n }",
"public boolean isSubclassOf(AClass super_class) {\n\t\tAClass tmp = this;\n\t\twhile (tmp != super_class) {\n\t\t\tif (tmp.isObject()) {\n\t\t\t\t// tmp == Object and tmp != super_class => tmp cannot inherit\n\t\t\t\t// from super_class\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttmp = tmp.getSuperClass();\n\t\t}\n\t\t// if we reach this point, tmp == super_class\n\t\treturn true;\n\t}",
"public List<? extends IType> getSubtypes()\n {\n if( _subtypes == null )\n {\n _subtypes = new ArrayList<IGosuClassInternal>();\n Set<? extends CharSequence> typeNames = getTypeLoader().getAllTypeNames();\n for( CharSequence typeName : typeNames )\n {\n IType type = TypeSystem.getByFullNameIfValid(typeName.toString());\n if (type instanceof IGosuClassInternal) {\n IGosuClassInternal gosuClass = (IGosuClassInternal) type;\n if( getOrCreateTypeReference() != gosuClass && isAssignableFrom( gosuClass ) )\n {\n _subtypes.add( gosuClass );\n }\n }\n }\n }\n\n return _subtypes;\n }",
"public boolean containsBaseType(final BaseType baseType) {\n return containsBaseType(new BaseType[] { baseType });\n }",
"boolean isSuperclass(Concept x, Concept y);",
"public boolean isExcludeSubtype() {\n\t\treturn excludeSubtypes;\n\t}",
"public boolean isAncestor(PBmmSchema schema, String typePart1, String typePart2) {\n PBmmClass classDefinition = schema.getClassDefinition(typePart1);\n List<String> ancestors = classDefinition.getAncestorTypeNames();\n if (ancestors.contains(typePart2)) { //direct ancestor\n return true;\n }\n for (String ancestor:ancestors) {\n if (isAncestor(schema, typePart1, ancestor)) { //recursive check\n return true;\n }\n }\n return false;\n }",
"public boolean isSetTypes() {\n return this.types != null;\n }",
"protected Collection getObjectsOfType(Collection allTypes, Collection curTypes) {\n Collection objectsOfType = new ArrayList();\n Iterator itA = allTypes.iterator();\n while (itA.hasNext()) {\n Object objAT = itA.next();\n if (objAT == null)\n continue;\n Iterator itB = curTypes.iterator();\n while (itB.hasNext()) {\n Object objCT = itB.next();\n if (objAT.equals(objCT))\n objectsOfType.add(objCT);\n } // while itB\n } // while itA\n return objectsOfType; \n }",
"protected long doGetNumberOfSupertypes(Collection<? extends Topic> types, boolean all) {\r\n\t\treturn getParentIndex().getSupertypes(types, all).size();\r\n\t}",
"default boolean isChild(@NotNull Type type, @NotNull Meta element, @NotNull List<Object> parents) {\r\n return false;\r\n }",
"boolean hasEnclosingInstance(ClassType encl);",
"static boolean anyObjectTypes(List<?> ptypes) {\n for (Object ptype : ptypes) {\n if (isObjectType(ptype)) {\n return true;\n }\n }\n return false;\n }",
"private ArrayList findAllSubclasses(List listSuperClasses,\r\n\t\t\tList listAllClasses) {\r\n\t\treturn findAllSubclasses(listSuperClasses, listAllClasses, false);\r\n\t}",
"@Override\n public Vector<Type> getDirectlySubsumedTypes(Type type) {\n return new Vector<>(getDirectSubtypes(type));\n }",
"public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"boolean contains(Pattern type) {\n for (ASTNode child : children) {\n if (type.matcher(child.getType()).find()) return true;\n }\n \n return false;\n }",
"public abstract boolean isNodeTypeCollection();"
] | [
"0.63780135",
"0.6274133",
"0.62661177",
"0.6161891",
"0.6104589",
"0.6056648",
"0.5941477",
"0.58896047",
"0.5867506",
"0.5836647",
"0.5770449",
"0.5726141",
"0.5715418",
"0.5711999",
"0.5672277",
"0.5669382",
"0.56660855",
"0.5660072",
"0.5650034",
"0.5627797",
"0.5626214",
"0.5620298",
"0.56193054",
"0.559652",
"0.55695665",
"0.555689",
"0.5554527",
"0.5510609",
"0.55099696",
"0.550429",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5501811",
"0.5500862",
"0.5489523",
"0.54729694",
"0.54530585",
"0.5451624",
"0.54480237",
"0.54464865",
"0.5445592",
"0.54444593",
"0.54427403",
"0.5441527",
"0.54070586",
"0.5395464",
"0.53923494",
"0.53819805",
"0.53666455",
"0.53608453",
"0.5357241",
"0.53315794",
"0.5319294",
"0.53126854",
"0.5309447",
"0.5307382",
"0.5306726",
"0.53001",
"0.527184",
"0.52444756",
"0.5243395"
] | 0.71272343 | 0 |
if no input size, set the length to default capacity 10 | public MyHashTable() {
this(DefaultCapacity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setLength( int length ) { setCapacity( length ); this.length = length; }",
"public void setCapacity(int capacity) \n {\n this.capacity = capacity;\n }",
"public void setCapacity(int capacity) {\r\n this.capacity = capacity;\r\n }",
"public void setCapacity(int capacity) {\r\n\r\n this.capacity = capacity;\r\n }",
"public void setCapacity(int capacity) {\n this.capacity = capacity;\n }",
"public int getInitialCapacity();",
"public void setCapacity(Integer capacity) {\n this.capacity = capacity;\n }",
"public void setCapacity(Long capacity) {\n this.capacity = capacity;\n }",
"public void setCapacity(String capacity) {\n\t\tthis.capacity = capacity;\n\t}",
"public void setCapacity(final int capacity) {\n this.capacity = capacity;\n }",
"public void setCapacity(int value) {\n this.capacity = value;\n }",
"abstract protected int getCapacity();",
"public void initialize(int size) {\n setMaxSize(size);\n }",
"public void setCapacity(int capacity) {\n\n\t\tthis.capacity = capacity;\n\t}",
"public abstract int capacity();",
"public int getCapacity();",
"public void setCapacity(int n) {\n\t\tcapacity = n;\n\t}",
"@Override\n\tpublic void setLength(int length) {\n\t\t\n\t}",
"public void ensureCapacity(int minCapacity);",
"public int capacity();",
"public int capacity();",
"public void initialize(int size);",
"public void setCapacity(int capacity)\n {\n Validate.isTrue(capacity > 0, \"Capacity must be > 0\");\n capacity_ = capacity; \n }",
"public void setCapacity( int space ) {\n\t if (space <= length) return;\n\t int newLength = resize.computeResize( length, space );\n\t \n if (newLength != length) {\n list = (newLength == 0) ? null : makeList( newLength );\n }\n\t}",
"@Override\n public int getMaxCapacity() {\n return 156250000;\n }",
"public int getCapacity() {\r\n return capacity;\r\n }",
"public int getCapacity() {\r\n return capacity;\r\n }",
"public int getCapacity() {\r\n return capacity;\r\n }",
"public void setLength(int length) {\r\n this.length = length;\r\n }",
"public void setLength(int length) {\r\n this.length = length;\r\n }",
"public int getCapacity() {\n return capacity;\n }",
"public int getCapacity() {\n return capacity;\n }",
"public int getCapacity() {\n return capacity;\n }",
"public int getCapacity() {\n return capacity;\n }",
"public void setLength(int length)\n {\n this.length = length;\n }",
"protected abstract int getMaxDesiredSize();",
"public int getCapacity() {\r\n\r\n return capacity;\r\n }",
"private void set_size(int size)\r\n\t{\r\n\t\tthis.size = size;\r\n\t}",
"public int getCapacity()\n {\n return capacity;\n }",
"public void setCapacity(double capacity) {\n\t\tthis.capacity = capacity;\n\t}",
"@Override\n\tpublic void setBufferSize(int size) {\n\t}",
"void setLength(int length);",
"public void setLength(int length) {\r\n\t\tthis.length = length;\r\n\t}",
"public int capacity() {\n\t\t// Report max number of elements before expansion\n\t\t// O(1)\n\t\treturn data.length;\n\t}",
"public void setCapacity(int capacity)\n {\n if(capacity >= 0)\n {\n this.capacity = capacity;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }",
"public FixedSizeList(int capacity) {\n // YOUR CODE HERE\n }",
"public int defaultLength() {\r\n return 0;\r\n }",
"public RingBuffer(int capacity){\n structure = new LinkedList<E>();\n this.capacity = capacity;\n }",
"public Builder setMaximumCapacity(int value) {\n \n maximumCapacity_ = value;\n onChanged();\n return this;\n }",
"private void ensureCapacity() {\n if(size() >= (0.75 * data.length)) // size() == curSize\n resize(2 * size());\n }",
"public Long getCapacity() {\n return capacity;\n }",
"public static int getCapacity() {\n\t\treturn capacity ;\n\t}",
"public void setLength(long length);",
"public void setLength(long length);",
"public int capacity() {\n return capacity;\n }",
"public void set_size(int s);",
"@Override\n\tpublic int remainingCapacity() {\n\t\treturn 0;\n\t}",
"public void ensureCapacity(int minCapacity) \n {\n\t\tthrow new UnsupportedOperationException(lengthChangeError);\n }",
"public final int getCapacity() {\n\t\treturn capacity;\n\t}",
"public int getCapacity() {\n\n\t\treturn capacity;\n\t}",
"public void setLength(int length) {\n\t\tthis.length = length;\n\t}",
"public void setLength(int length) {\n\t\tthis.length = length;\n\t}",
"public void setLength(int length) {\n\t\tthis.length = length;\n\t}",
"public int capacity() { return store.length; }",
"@Override\n public void setBufferSize(int arg0) {\n\n }",
"public void setLocalSize(int size);",
"@Override\n public int Capacity() {\n return current_capacity;\n }",
"public void setLength(long length) { \n this.length = length; \n }",
"public PacketBuilder(int capacity) {\n\t\tbuffer = ByteBuffer.allocate(capacity);\n\t}",
"public int capacity()\n {\n return capacity;\n }",
"public Integer getCapacity() {\n return capacity;\n }",
"public void autoSize() {\n\t\t//no op\n\t}",
"private void ensureCapacity(int len) {\n\t\tif( m_numBites + len > m_bites.length ) {\n\t\t\tbyte[] newBites = new byte[(m_bites.length + len)*2];\n\t\t\tSystem.arraycopy(m_bites, 0, newBites, 0, m_numBites);\n\t\t\tm_bites = newBites;\n\t\t}\n\t}",
"public Builder setAvailableCapacity(int value) {\n \n availableCapacity_ = value;\n onChanged();\n return this;\n }",
"@Override\n public void ensureCapacity(int index) {\n\n }",
"public int getCapacity() {\r\n return this.capacity;\r\n }",
"void setLength( long length );",
"int capacity();",
"int capacity();",
"public int capacity()\r\n/* 81: */ {\r\n/* 82:116 */ ensureAccessible();\r\n/* 83:117 */ return this.array.length;\r\n/* 84: */ }",
"@Override\n public int getCapacity() {\n return room.getCapacity();\n }",
"public Builder clearMaximumCapacity() {\n \n maximumCapacity_ = 0;\n onChanged();\n return this;\n }",
"public void grow(int cap) {}",
"public int capacity() {\r\n return htable.length;\r\n }",
"@Override\n public int size() {\n return this.capacity;\n }",
"public void setLength(int length){\n\t\tif(length > 0){\n\t\t\tthis.length = length; //this.length is the length were in right now. and = length is the length the object is given\n\t\t}\n\t\t\n\t\t\n\t}",
"public void upgradeCapacity()\r\n\t{\r\n\t\tcapacity++;\r\n\t}",
"@Override\n\tpublic int getBufferSize() {\n\t\treturn 0;\n\t}",
"synchronized void setLength(int length) {\n this.length = length;\n }",
"public void setSize(Integer size) {\n this.size = size;\n }",
"@Override\n public int getBufferSize() {\n return 0;\n }",
"public int capacity() {\n return this.capacity;\n }",
"@SuppressWarnings( \"unused\" )\n public int capacity() {\n return buffer.capacity() - buffer.limit();\n }",
"public Builder clearCapacity() {\n bitField0_ = (bitField0_ & ~0x00000040);\n capacity_ = 0;\n onChanged();\n return this;\n }",
"public void setLength(int newLength) {\r\n\t\tif (cursor + newLength > buffer.length)\r\n\t\t\tthrow new IllegalArgumentException(\"Can't set new length if it exceeds buffer\");\r\n\t\tlimit = cursor + newLength;\r\n\t}",
"public abstract long getMaxSize();",
"public void setS0Capacity(double argS0Capacity) {\n s0Capacity = argS0Capacity;\n }",
"int getMaxSize();",
"public int capacity() {\r\n\t\treturn this.capacity;\r\n\t}",
"public int getCapacity( )\n {\n // Implemented by student.\n }",
"public abstract int getMaxIntermediateSize();"
] | [
"0.7783638",
"0.7156674",
"0.70315456",
"0.7007444",
"0.69652975",
"0.68848306",
"0.67911243",
"0.67442596",
"0.6727801",
"0.6713393",
"0.66759795",
"0.66422695",
"0.66250473",
"0.6619041",
"0.6573649",
"0.6571781",
"0.6523965",
"0.6496779",
"0.6438271",
"0.6423865",
"0.6423865",
"0.64169484",
"0.6415097",
"0.6401209",
"0.63809687",
"0.63802916",
"0.63802916",
"0.63802916",
"0.6343396",
"0.6343396",
"0.63384366",
"0.63384366",
"0.63384366",
"0.63384366",
"0.6324105",
"0.6317644",
"0.63085604",
"0.62970793",
"0.6284379",
"0.6277997",
"0.6276349",
"0.62501884",
"0.622684",
"0.6193244",
"0.6193009",
"0.61912656",
"0.6190192",
"0.6184247",
"0.61819774",
"0.61630756",
"0.6161209",
"0.61598825",
"0.61573654",
"0.61573654",
"0.61372274",
"0.61359215",
"0.612695",
"0.61121476",
"0.6111811",
"0.6092037",
"0.60876817",
"0.60876817",
"0.60876817",
"0.6087054",
"0.60835505",
"0.6068312",
"0.606196",
"0.6057653",
"0.6047978",
"0.60445327",
"0.6044205",
"0.60384476",
"0.6035422",
"0.6027516",
"0.6026072",
"0.6016333",
"0.60141844",
"0.59988886",
"0.59988886",
"0.59953946",
"0.5993649",
"0.59903115",
"0.5988108",
"0.59826237",
"0.5975573",
"0.5972895",
"0.59625715",
"0.59565765",
"0.5950081",
"0.59487444",
"0.5910438",
"0.5910245",
"0.59028584",
"0.5902161",
"0.5902112",
"0.5894607",
"0.5886519",
"0.58863896",
"0.5885433",
"0.58854085",
"0.58837783"
] | 0.0 | -1 |
Inserts a new String value (word). Frequency of each word be stored too. | @Override
public void insert(String value) {
if (value == null)
return;
int hashVal = hashFunc(value);
boolean collisionFlag = false;
while (hashArray[hashVal] != null
&& !hashArray[hashVal].value.equals(deleted.value)) {
if (hashArray[hashVal].value.equals(value)) {
hashArray[hashVal].addFrequency();
if (collisionFlag)
this.collision--;
return;
}
if (!collisionFlag) {
if (hashFunc(hashArray[hashVal].value) == hashFunc(value)) {
this.collision++;
collisionFlag = true;
}
}
hashVal++;
hashVal = hashVal % size;
}
this.numOfItems++;
hashArray[hashVal] = new DataItem(value);
double loadFactor = (double) this.numOfItems / (double) this.size;
if (loadFactor >= LoadFactor)
rehash();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void insert(String word) {\n if (word == null) {\n return;\n }\n if (value == null) {\n value = new ArrayList<>();\n }\n value.add(word);\n }",
"public void addWord(Word word);",
"public void add(String word) {\n if (hashTable.contains(word)) {\n hashTable.put(word, hashTable.get(word) + 1);\n }\n else {\n hashTable.put(word,1);\n }\n }",
"public void putWord(String word) {\n if(index < words.length) {\n words[index] = word;\n }\n index++;\n }",
"public void add(String word) {\n Signature sig = new Signature(word);\n add(sig, word);\n }",
"public void insert(String word) {\r\n tree.add(word);\r\n }",
"private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }",
"public void insert(String word) {\n insert(root, word, new Object(), 0);\n }",
"public void populateWord(String word) {\n\t\tthis.add(word);\n\t}",
"void insert(String mappedNumber, String word);",
"public void insert(String word) {\n this.root.insert(word);\n }",
"public void addWord(String word) {\n trie.insert(word);\n }",
"@Override\n public void insert(String word) {\n root = insertIterative(word, root);\n }",
"public void insert(String word) { \n char[] w = word.toCharArray(); \n insert(root, w, 0); \n }",
"public void insert(String word, DictionaryData data) {\r\n\r\n dictionaryMap.put(word.toUpperCase(),data);\r\n }",
"public void addWord(String word) {\n dataStructure.put(word, \"\");\n }",
"public void insert(String word) {\n \tTrieNode cur=root;\n \tfor (int i = 0; i < word.length(); i++) {\n \t\t\tint ch=word.charAt(i)-'a';\n \t\t\tif(cur.next[ch]==null) {\n \t\t\t\tcur.next[ch]=new TrieNode();\n \t\t\t}\n \t\t\tcur=cur.next[ch];\n \t\t}\n \tcur.val=word;\n \tcur.isEnd=true;\n }",
"public void insert(String word) {\n\t\tTrie curr = this;\n\t\tfor(Character ch : word.toCharArray()) {\n\t\t\tTrie n = curr.nodes[ch - 'a'];\n\t\t\t\n\t\t\tif (n == null) {\n\t\t\t\tn = new Trie();\n\t\t\t\tn.isWord = false;\n\t\t\t\tcurr.nodes[ch - 'a'] = n;\n\t\t\t}\n\t\t\t\n\t\t\tcurr = n;\n\t\t}\n\t\tcurr.isWord = true;\n\t}",
"public void addWord(String word) {\n root = put(root, word, 0);\n }",
"public void insert(String word) {\n TrieNode n = root;\n for(char c : word.toCharArray()) {\n if(n.children[c]==null) {\n n.children[c] = new TrieNode();\n }\n n = n.children[c];\n }\n n.isWord = true;\n n.word = word;\n }",
"public void insert(String word) {\n\t\tTrieNode node = root;\n\t\tfor (char c: word.toCharArray()) {\n\t\t\tif (!node.containsKey(c)) {\n\t\t\t\tnode.put(c);\n\t\t\t}\n\t\t\tnode = node.get(c);\n\t\t}\n\t\tnode.setEnd();\n\t}",
"public void insert(String word) {\n Trie cur = this;\n int i = 0;\n while(i < word.length()) {\n int c = word.charAt(i) - 'a';\n if(cur.tries[c] == null) {\n cur.tries[c] = new Trie();\n }\n cur = cur.tries[c];\n i++;\n }\n cur.hasWord = true;\n }",
"public void insert(String word) {\n\t\t\tTrieNode curr = root;\n\t\t\tfor (char c : word.toCharArray()) {\n\t\t\t\tif (!curr.children.containsKey(c))\n\t\t\t\t\tcurr.children.put(c, new TrieNode());\n\t\t\t\tcurr = curr.children.get(c);\n\t\t\t}\n\t\t\tcurr.isWord = true;\n\t\t}",
"public void insert(String word) {\n\n int length = word.length();\n TrieNode node = root;\n for(int i=0; i<length; i++) {\n char curr = word.charAt(i);\n if(!node.containsKey(curr)){\n node.put(curr, new TrieNode());\n }\n node = node.get(curr);\n }\n node.setEnd();\n }",
"public void insert(String word) {\n Entry tempRoot = root;\n for(int i=0; i<word.length(); i++){\n char ch = word.charAt(i);\n Entry childNode = tempRoot.getChildNode(ch);\n if(childNode == null){\n tempRoot.setChildNode(new Entry(), ch);\n }\n tempRoot = tempRoot.getChildNode(ch);\n }\n\n tempRoot.setIsWord(true);\n }",
"public void put(LLNodeHash word){\n int h = hash(word.getKey());\n if (hashTable[h] == null){\n hashTable[h] = new LLNodeHash(word.getKey(), word.getFreq(), null);\n }\n else{\n LLNodeHash ptr = hashTable[h];\n //while loop to traverse the linked list till the last node\n while (ptr.getNext() != null){\n ptr = ptr.getNext();\n }\n //sets the next node to the new inserted word\n ptr.setNext(new LLNodeHash(word.getKey(), 1, null));\n }\n //checks the load factor after each addition to the hashtable to see\n //if there is a need to rehash based on the load factor\n checkLoadFactor();\n }",
"public void insert(String word) {\n TrieNode curr=root;\n for(int i=0;i<word.length();i++){\n char c = word.charAt(i);\n TrieNode node=curr.hmap.get(c);\n if(node==null){\n node=new TrieNode();\n curr.hmap.put(c, node);\n }\n curr=node;\n }\n curr.endOfWord=true;\n }",
"public void insert(String word) {\n Trie root = this;\n for (char c : word.toCharArray()) {\n if (root.next[c - 'a'] == null) {\n root.next[c - 'a'] = new Trie();\n }\n root = root.next[c - 'a'];\n }\n root.word = word;\n }",
"public void insert(String word) {\n char[] chars = word.toCharArray();\n int length = chars.length;\n\n Map<Character,Node> map = this.root.map;\n for(int i = 0;i < length;i++){\n if(map.containsKey(chars[i])){\n Node node = map.get(chars[i]);\n }else{\n map.put(chars[i],new Node(chars[i]));\n }\n\n if(i == length - 1){\n map.get(chars[i]).isWordEnd = true;\n }\n map = map.get(chars[i]).map;\n }\n }",
"public void insert( Word x )\n {\n WordList whichList = theLists[ myhash( x.key ) ];\n //System.out.println(\"WordList found\");\n \n\t whichList.add( x );\n\t //System.out.println(\"Word \" + x.value + \" successfully added\");\n }",
"public void insert(String word) {\n TrieNode cur = root;\n HashMap<Character, TrieNode> curChildren = root.children;\n char[] wordArray = word.toCharArray();\n for(int i = 0; i < wordArray.length; i++){\n char wc = wordArray[i];\n if(curChildren.containsKey(wc)){\n cur = curChildren.get(wc);\n } else {\n TrieNode newNode = new TrieNode(wc);\n curChildren.put(wc, newNode);\n cur = newNode;\n }\n curChildren = cur.children;\n if(i == wordArray.length - 1){\n cur.hasWord= true;\n }\n }\n }",
"public void insert(String word) {\n TrieNode node = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (node.ch[c - 'a'] == null) {\n node.ch[c - 'a'] = new TrieNode();\n }\n node = node.ch[c - 'a'];\n }\n node.word = word;\n }",
"public void insert(String word) {\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n}",
"public void addWord(String word) {\n root.addWord(word);\n }",
"public void put(String word, int count) {\n if (wordToCount.values() != null && wordToCount.values().contains(count)) {\n this.countToWord.get(count).add(word);\n } else {\n Set<String> wordset = new HashSet<String>();\n wordset.add(word);\n this.countToWord.put(count, wordset);\n }\n this.wordToCount.put(word, count);\n this.wordNumber += 1;\n this.cached = false;\n }",
"public void add(T word);",
"public void insert(String word) {\n Node node = root;\n char[] chars = word.toCharArray();\n for (char c: chars) {\n int idx = c - 'a';\n Node next = node.children[idx];\n if (next == null) {\n next = new Node(null);\n node.children[idx] = next;\n }\n node = next;\n }\n node.val = word;\n }",
"public void add(LLNodeHash word){\n if (!checkWord(word)){\n put(word);\n }\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n int idx = c - 'a';\n if (curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"public void insert(String word) \n\t {\n\t \tTrieNode p = root;\n\t for(int i=0; i<word.length(); ++i)\n\t {\n\t \tchar c = word.charAt(i);\n\t \tif(p.children[c-'a']==null)\n\t \t\tp.children[c-'a'] = new TrieNode(c);\n\t \tp = p.children[c-'a'];\n\t }\n\t p.mark = true;\n\t }",
"public void insert(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null){\n point.setChild(ch - 'a', ch);\n }\n point = point.getChild(ch - 'a');\n }\n point.setIsWord();\n }",
"public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}",
"public void addWord(String word) {\n if (word == null || word.equals(\"\")) return;\n char[] str = word.toCharArray();\n WordDictionary cur = this;\n for (char c: str) {\n if (cur.letters[c - 'a'] == null) cur.letters[c - 'a'] = new WordDictionary();\n cur = cur.letters[c - 'a'];\n }\n cur.end = true;\n }",
"public void insert(String word){\n //initially curr is root\n TrieNode curr = root;\n for(int i=0; i<word.length(); i++){\n char c = word.charAt(i);\n //if char doesnot exist, add new trienode\n if(curr.children[c-'a'] == null){\n curr.children[c-'a'] = new TrieNode();\n }\n //curr++\n curr = curr.children[c-'a'];\n }\n //set curr.word to the word\n curr.word = word;\n }",
"public void insert(String word) {\n TrieNode curr = root;\n for(char c : word.toCharArray()) {\n int idx = c - 'a';\n if(curr.children[idx] == null) {\n curr.children[idx] = new TrieNode();\n }\n curr = curr.children[idx];\n }\n curr.isWord = true;\n }",
"public void insert(String word) {\n var node = root;\n for(char currentChar : word.toCharArray()){\n if(!node.containsKey(currentChar)) {\n node.put(currentChar, new Node());\n }\n node = node.get(currentChar);\n }\n node.setEnd();\n }",
"public void insert(String word) {\n TrieNode tn = root;\n int len = word.length();\n for(int i=0; i<len; i++){\n char c = word.charAt(i);\n TrieNode temp = tn.hm.get(c);\n if(!tn.hm.containsKey(c)){\n tn = new TrieNode();\n tn.hm.put(c, temp);\n }\n tn = temp;\n }\n tn.flag = true;\n }",
"public void insert(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null)\n current.children[c] = new Node(c);\n current = current.children[c];\n }\n current.isWord = true;\n }",
"@Override\n public void insert(final String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n final TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"public void insert(String word) {\n if (word == null || word.length() == 0)\n return;\n TrieNode node = root;\n char [] letters = word.toCharArray();\n for (int i=0; i < letters.length; i++) {\n int pos = letters[i] - 'a';\n if (node.son[pos] == null) {\n node.son[pos] = new TrieNode();\n node.son[pos].val = letters[i];\n }\n node = node.son[pos];\n }\n node.isEnd = true;\n }",
"public void insert(String word) {\n TrieNode p = root;\n for (char c : word.toCharArray()) {\n int childIndex = (int)(c - 'a');\n if (p.children[childIndex] == null) {\n p.children[childIndex] = new TrieNode();\n }\n p = p.children[childIndex];\n }\n p.isWord = true;\n }",
"public void insert(String word) {\n TrieNode p = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n int index = c - 'a';\n if (p.arr[index] == null) {\n TrieNode temp = new TrieNode();\n p.arr[index] = temp;\n p = temp;\n } else {\n p = p.arr[index];\n }\n }\n p.isEnd = true;\n }",
"public void add(String word) {\n\t\twordList.add(word);\n\t\t// TODO Add your code here\n\t}",
"public void insert(String word) {\n char [] words=word.toCharArray();\n CharTree t=root;\n for (char c : words) {\n if(t.next[c-97]==null){\n t.next[c-97]=new CharTree();\n }\n t=t.next[c-97];\n }\n t.isend=true;\n }",
"public void addWordCount(){\r\n\t\twordCount = wordCount + 1;\r\n\t}",
"public void insert(String word) {\n TrieNode cur = root;\n for (int i = 0 ; i < word.length(); i ++) {\n char ch = word.charAt(i);\n if (! cur.children.containsKey(ch)) {\n TrieNode child = new TrieNode(ch);\n cur.children.put(ch, child);\n }\n cur = cur.children.get(ch);\n }\n cur.isEnd = true;\n }",
"public void insert(String word) {\n TrieNodeWithWord curr = root;\n\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n // 当前孩子是否存在\n if (curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new TrieNodeWithWord();\n }\n curr = curr.children[c - 'a'];\n }\n // 当前节点结束,存入当前单词\n curr.word = word;\n }",
"public void insert(String word) {\n Node<String> current = list.getFirst();\n\n while (current != null) {\n String another = (String) current.getValue();\n\n for (int i = 0; i < word.length(); i++) {\n if (word.charAt(i) == another.charAt(i)) {}\n else if (word.charAt(i) < another.charAt(i)) {\n Node<String> node = new Node<String>(word);\n current.getPrevious().setNext(node);\n node.setPrevious(current.getPrevious());\n node.setNext(current);\n current.setPrevious(node);\n return;\n } else { break; }\n }\n current = current.getNext();\n }\n list.getLast().setNext(new Node<String>(word));\n return;\n }",
"public void addWord(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n curr = curr.chars.computeIfAbsent(c, (k) -> new TrieNode());\n\n }\n curr.isWord = true;\n }",
"public void insert(String word) {\n TrieNode node = root;\n\n for (char c: word.toCharArray()) {\n if (node.children[c - 'a'] == null) \n node.children[c - 'a'] = new TrieNode();\n\n node = node.children[c - 'a'];\n }\n\n node.word = word;\n }",
"public void addWord(String word) {\n CharNode target = root ;\n for(int i=0; i<word.length(); i++) {\n target = target.insertCharInChildren(word.charAt(i)) ;\n }\n target.end = true ;\n }",
"public void insert(String word) {\n TrieNode ptr = root;\n for(int i = 0;i < word.length();i++) {\n char c = word.charAt(i);\n if(ptr.child[c - 'a'] == null) {\n ptr.child[c - 'a'] = new TrieNode();\n }\n ptr = ptr.child[c - 'a'];\n }\n ptr.is_end = true;\n }",
"public void insert(String word) {\n Node curr = root;\n\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n\n if(curr.children[c - 'a'] == null) {\n curr.children[c - 'a'] = new Node(c);\n }\n\n curr = curr.children[c - 'a'];\n }\n\n curr.isWord = true;\n }",
"public static void addKeyWord(String word)\r\n\t{\r\n\t\tkeywords.add(word);\r\n\t}",
"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}",
"public void add(Word d) {\n d.incFrequency();\n root = add(d, root);\n }",
"public void insert(String word) {\n TrieNode current = root;\n for(char c : word.toCharArray()){\n int index = c - 'a';\n if(current.childrens[index] == null)\n current.childrens[index] = new TrieNode(c);\n current = current.childrens[index];\n }\n current.eow = true;\n }",
"public void insert(String word) {\n TrieNode cur = root;\n for(int i=0; i<word.length(); i++){\n int index = word.charAt(i)-'a';\n if(cur.children[index] == null)\n cur.children[index] = new TrieNode(word.charAt(i));\n cur = cur.children[index];\n if(i == word.length()-1)\n cur.isEnd = true;\n }\n }",
"public void addToDictionary(String word, int n) {\n\t\tConcurrentNavigableMap<String, String> listVocabulary = dbStats\n\t\t\t\t.getTreeMap(\"voca\");\n\t\tString strTimes = listVocabulary.get(word);\n\t\tint times = 0;\n\t\tif (strTimes != null) {\n\t\t\ttimes = Integer.parseInt(strTimes);\n\t\t\ttimes = times + n;\n\t\t} else {\n\t\t\ttimes = n;\n\t\t}\n\t\tlistVocabulary.put(word, Integer.toString(times));\n\t}",
"public void insert(String word) {\n TrieNode node = root;\n\n // for each char in the word, add to the TrieNode\n for (char c: word.toCharArray()) {\n // if there are no such child, then we add it\n if (node.children[c - 'a'] == null) {\n node.children[c - 'a'] = new TrieNode(c);\n }\n // move the node to next layer\n node = node.children[c - 'a'];\n\n }\n // mark the isWord\n node.isWord = true;\n }",
"public void insert(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }",
"public void addWord (String word) {\r\n word = word.toUpperCase ();\r\n if (word.length () > 1) {\r\n String s = validateWord (word);\r\n if (!s.equals (\"\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered contained invalid characters\\nInvalid characters are: \" + s, \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n checkEasterEgg (word);\r\n words.add (word);\r\n Components.wordList.getContents ().addElement (word);\r\n } else {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered does not meet the minimum requirement length of 2\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"public synchronized void register(int docid, String word, int frequency) {\n // load the hashtable for this term\n Object val = index.get(word);\n\n // define a new int[1] to store the frequency\n int[] fArray = new int[1];\n fArray[0] = frequency;\n\n if (val == null) {\n // if this term isn't in the index, create a new hashtable and store\n // it\n HashMap newList = new HashMap();\n newList.put(docid, fArray);\n index.put(word, newList);\n } else {\n // if the term exists, simply store appropriately\n ((HashMap) val).put(docid, fArray);\n }\n }",
"public void addWord(String word) {\n\t\taddWord(word, root);\n\t}",
"public void insert(String word) {\n Node curr = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n Node subNode = curr.subNodes[c - 'a'];\n if (subNode == null) {\n subNode = new Node(c);\n curr.subNodes[c - 'a'] = subNode;\n }\n if (i == word.length() - 1) {\n subNode.isWord = true;\n }\n curr = subNode;\n }\n }",
"public void insert(String word) {\n\t\t\n\t\tTrieNode current = root;\n\t\t\t\t\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\t\n\t\t\tCharacter ch = word.charAt(i);\n\t\t\t\n\t\t\tif (!current.getChild().containsKey(ch)) {\n\t\t\t\tTrieNode newNode = new TrieNode();\n\t\t\t\tcurrent.getChild().put(ch, newNode);\n\t\t\t}\n\t\t\t\n\t\t\tcurrent = current.getChild().get(ch);\t\n\t\t}\n\t\t\n\t\tcurrent.isLeaf = true;\t \n\t}",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n }",
"public void addElement(String word, String signature) {\n\t\tif(dictionaryMap.get(signature)!= null)\n\t\t\tdictionaryMap.get(signature).add(word);\n\t\telse {\n\t\t\tSet<String> newSignature = new TreeSet<>();\n\t\t\tnewSignature.add(word);\n\t\t\tdictionaryMap.put(signature, newSignature);\n\t\t}\n\t}",
"public boolean add(String word) {\r\n\t\treturn dict.add(word);\r\n\t}",
"public void insert(String word) {\n if (word == null) {\n return;\n }\n TrieNode parent = root;\n char[] charArr = word.toCharArray();\n for (int n = 0; n < charArr.length; n++) {\n Map<Character, TrieNode> currentMap = parent.children;\n if (!currentMap.containsKey(charArr[n])) {\n currentMap.put(charArr[n], new TrieNode(charArr[n]));\n }\n parent = currentMap.get(charArr[n]);\n }\n parent.children.put('\\0', null);\n }",
"public void addWord(String word) {\n TrieNode cur = root;\n for(char c : word.toCharArray()) {\n if(cur.next[c-'a'] == null) {\n cur.next[c-'a'] = new TrieNode(c);\n }\n cur = cur.next[c-'a'];\n }\n cur.isWord = true;\n }",
"public void setWord(String newWord)\n\t{\n\t\tword = newWord;\n\t}",
"public void addWord(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }",
"public void insert(String word) {\n Node currentNode = head;\n for (int i = 0; i < word.length(); i++) {\n char currentChar = word.charAt(i);\n if (currentNode.children.get(currentChar - 'a') == null) {\n currentNode.children.set(currentChar - 'a', new Node(false));\n }\n currentNode = currentNode.children.get(currentChar - 'a');\n }\n currentNode.setIsFinished(true);\n }",
"public void insert(String word) {\n \tHashMap<Character, TrieNode> children=root.children;\n \tfor(int i=0;i<word.length();i++)\n \t{\n \t\tchar c=word.charAt(i);\n \t\tTrieNode t;\n \t\tif(children.get(c)!=null)\n \t\t{\n \t\t\tt=children.get(c);\n \t\t}\n \t\telse\n \t\t{\n \t\t\tt=new TrieNode(c);\n \t\t\tchildren.put(c, t);\n \t\t}\n \t\tchildren=t.children;\n \t\tif(i==word.length()-1)\n \t\t\tt.leaf=true;\n \t}\n }",
"public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (now.children[c - 'a'] == null) {\n now.children[c - 'a'] = new TrieNode();\n }\n now = now.children[c - 'a'];\n }\n now.hasWord = true;\n }",
"public void addWord(int id, int start, int length, int[] type);",
"public void addWord(String word) {\n maxLength = Math.max(maxLength, word.length());\n\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (temp.children[c - 'a'] == null) {\n temp.children[c - 'a'] = new TrieNode(c);\n }\n temp = temp.children[c - 'a'];\n }\n temp.isWord = true;\n }",
"public void add (String word) {\n Trie pointeur ;\n\n if(word.length() != 0){\n String lettre = Character.toString(word.charAt(0));\n String ssChaine = word.substring(1);\n pointeur = this.fils.get(lettre);\n if(pointeur == null){\n pointeur = new Trie();\n this.fils.put(lettre,pointeur);\n\n }\n pointeur.add(ssChaine);\n if(ssChaine.length()==0){\n this.fin = true;\n }\n \n }\n \n }",
"public void addWord(String word)\n {\n TrieNode1 node = root;\n for (char c:word.toCharArray())\n {\n if (node.childerens[c-'a']==null)\n {\n node.childerens[c-'a'] = new TrieNode1();\n }\n node = node.childerens[c-'a'];\n }\n node.isEnd = true;\n\n }",
"public String insertWord(String container, String word) {\n return container.substring(0, 2) + word + container.substring(container.length() - 2);\n }",
"private void addWord(String word, int articleId, int times) {\n // if input is \"\" means here is the end of the woed then we can add the articleId to this node\n if(word.equals(\"\")) {\n addAricles(articleId, times);\n } else {\n Result res = findChild(word);\n // if the node is not exist, then we need to create an new one with next char of the word, and add word to next node \n if(res == null) {\n Node nextNode = new Node(word.substring(0, 1));\n this.addChildren(nextNode);\n nextNode.addWord(word.substring(1), articleId, times);\n } \n //if the node exist, add substring to next node\n else {\n Node nextNode = res.getN();\n String nextString = res.getS();\n nextNode.addWord(nextString, articleId, times);\n }\n }\n }",
"void addWord(Nod n, String word) {\n\t\tint i = 0;\n\t\twhile (i < 26) {\n\n\t\t\tif (n.frunze.get(i).cuvant.equals(\"%\")) {\n\t\t\t\tn.frunze.get(i).cuvant = word;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}",
"public void Insert(String st) {\n\t\ttable[hashFunction(st,m)].insert(st);\n\t}",
"public void addPos(String word, IPosition pos);",
"public void insert(String word) {\n if(word==null)\n return;\n int wordLen=word.length();\n if(wordLen==0)\n return;\n char []wordArr=word.toCharArray();\n Node tempNode=root;\n for(int i=0;i<wordLen && Character.isLetter(wordArr[i]);i++){ //只能插入小写字母\n if(tempNode.subNode(wordArr[i])==null){\n Node newNode=new Node(wordArr[i]);\n newNode.number=1;\n if(i==wordLen-1)\n newNode.isEnd=true;\n tempNode.childList.add(newNode);\n tempNode=newNode;\n }else{\n Node oldNode=tempNode.subNode(wordArr[i]);\n oldNode.number++;\n tempNode=oldNode;\n }\n }\n }",
"public void addWord(String word) {\n TrieNode node = root;\n char[] words = word.toCharArray();\n for (char c: words){\n if (node.children[c-'a'] == null){\n node.children[c-'a']=new TrieNode();\n }\n node = node.children[c-'a'];\n }\n node.item = word;\n }",
"private void insertWordEntry(String file, String word, String partition) {\n\t\tArrayList<String> fileList = new ArrayList<String>();\n\t\tfileList.add(file);\n\t\tindexedDir.get(partition).put(word, fileList);\n\t}",
"public void addWord(String word) {\n TrieNode cur = root;\n for (int i=0; i<word.length(); i++) {\n int pos = word.charAt(i) - 'a';\n if (cur.next[pos] == null) {\n cur.next[pos] = new TrieNode();\n }\n cur = cur.next[pos];\n }\n cur.isWord = true;\n }",
"public void insertString(String text) {\n HashSet<Node> visited = new HashSet<Node>();\n for (int i = 0; i <= text.length(); i++) {\n addSuffix(text.substring(i) + WORD_TERMINATION, i, visited);\n }\n // fullText = text;\n for (Node n: visited) {\n n.setCount(n.getCount() + 1.0);\n }\n this.string_cnt += 1;\n }",
"public void insert(String word) {\n\n\t\tTrieNode temp = root;\n\t\tfor (int i = 0; i < word.length(); i++) {\n\t\t\tint c = word.charAt(i) - 'a';\n\t\t\tif (temp.childrens[c] == null) {\n\t\t\t\ttemp.childrens[c] = new TrieNode();\n\t\t\t}\n\n\t\t\ttemp = temp.childrens[c];\n\t\t}\n\n\t\ttemp.isLeafNode = true;\n\t}"
] | [
"0.7688912",
"0.72144145",
"0.7213174",
"0.71788293",
"0.71378654",
"0.71186084",
"0.7049097",
"0.70484006",
"0.69618887",
"0.69166887",
"0.6888228",
"0.6870703",
"0.6862145",
"0.6854306",
"0.6833996",
"0.680608",
"0.6796755",
"0.6783966",
"0.6778201",
"0.67690116",
"0.6746408",
"0.67451334",
"0.67331433",
"0.6686276",
"0.66667825",
"0.66600215",
"0.66544074",
"0.6647986",
"0.66474086",
"0.66287905",
"0.66214037",
"0.66119426",
"0.6609258",
"0.660603",
"0.65967214",
"0.6588454",
"0.65580124",
"0.65520555",
"0.65495604",
"0.6549062",
"0.65462834",
"0.6545741",
"0.65392244",
"0.65279883",
"0.65271956",
"0.65249556",
"0.6524784",
"0.65222573",
"0.65213543",
"0.64943284",
"0.6484895",
"0.648125",
"0.6474945",
"0.6472162",
"0.64716005",
"0.64641136",
"0.6459879",
"0.64520234",
"0.6447711",
"0.64169174",
"0.64137524",
"0.64105403",
"0.6396189",
"0.6389984",
"0.6389832",
"0.63868934",
"0.63551843",
"0.6345867",
"0.63458496",
"0.6344827",
"0.6342971",
"0.6342794",
"0.6341248",
"0.6332109",
"0.63316005",
"0.6321641",
"0.6317557",
"0.6302512",
"0.6281977",
"0.6279842",
"0.6270834",
"0.6261124",
"0.62560445",
"0.62560034",
"0.6254026",
"0.6248111",
"0.62329423",
"0.6232372",
"0.6230303",
"0.62288195",
"0.6223558",
"0.6222917",
"0.6221955",
"0.62050766",
"0.6200097",
"0.6188051",
"0.61801225",
"0.6179853",
"0.61757004",
"0.6166937",
"0.61656094"
] | 0.0 | -1 |
Returns the size, number of items, of the hashTable | @Override
public int size() {
return this.numOfItems;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int size(){\n\t\treturn hashTableSize;\n\t}",
"@Override\n public int getG2HashTableNumberOfEntries() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.G2_HASH_TABLE_NUMBER_OF_ENTRIES_);\n return ((Integer)retnValue).intValue ();\n }",
"int tableSize();",
"public static void main_getSize(){\n\n System.out.println(table.size());\n\n }",
"@Override\n\tpublic int size() {\n\t\tint tamano = 0;\n\t\tint i = 0;\n\t\tIterator it = tabla.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tit.next();\n\t\t\ttamano += tabla.get(i).keySet().size();\n\t\t\ti++;\n\t\t}\n\t\treturn tamano;\n\t}",
"public int size() { return _byHashCode.size(); }",
"@org.junit.Test\n public void size() throws Exception {\n assertEquals(3, hashTable.size());\n hashTable.put(\"math\", \"club\");\n assertEquals(3, hashTable.size());\n hashTable.put(\"input\", \"string\");\n assertEquals(4, hashTable.size());\n }",
"public int getSize() \n { \n return numberOfEntries;\n }",
"@Override\r\n public int getSize()\r\n {\r\n return keyHash.size();\r\n }",
"public int size() {\r\n return numberOfKeys;\r\n }",
"public int size() \n\t{\n\t\treturn numKeys;\n\t}",
"@Override\n\tpublic int getSize() {\n\t\treturn numberOfEntries;\n\t}",
"public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}",
"public int numberOfEntries();",
"public Integer size() { return this.entries.length(); }",
"public int getSize() {\n\t\tint total = 0;\n\t\tfor (int i = 0; i < capacity; i++) {\n\t\t\ttotal += table.get(i).getSize();\n\t\t}\n\t\treturn total;\n\t}",
"public Integer sizeOfMap() {\n\t\tMap<String, String> simpleMap = createSimpleMap(\"Key\", \"Value\");\n numberOfEntries = 10;\n\t\treturn simpleMap.size();\n\t}",
"public int tableSize() {\n return this.table.length;\n }",
"public int size() {\n\t\treturn nvPairs.size() >> 1;\n\t}",
"public int size(){\n\t\tListMapEntry temp = first;\n\t\tint c=0;\n\t\twhile(temp!=null){\n\t\t\tc++;\n\t\t\ttemp = temp.getNext();\n\t\t}\n\t\treturn c;\n\t}",
"@Override\n public int size() {\n return numKeys;\n }",
"@Override\n public int size() {\n return numKeys;\n }",
"public int size() {\n return keys.length;\n }",
"public int getNumberOfEntries();",
"public int size() {\n if (hasKeys) {\n return keys.size();\n } else {\n return objects.size();\n }\n }",
"public int size() {\n\t\treturn numEntries;\n\t}",
"public int size() {\n \t\t\treturn hist.size();\n \t\t}",
"@Override\n\tpublic int size() {\n\t\tint nr = 0;\n\t\tfor (int i = 0; i < nrb; i++) {\n\t\t\t// pentru fiecare bucket numar in lista asociata acestuia numarul de\n\t\t\t// elemente pe care le detine si le insumez\n\t\t\tfor (int j = 0; j < b.get(i).getEntries().size(); j++) {\n\t\t\t\tnr++;\n\t\t\t}\n\t\t}\n\t\treturn nr;// numaru total de elemente\n\t}",
"public int get_size();",
"public int get_size();",
"public int getNumberOfEntries() ;",
"public int sizeOfTypekeyArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(TYPEKEY$16);\r\n }\r\n }",
"public int size()\r\n/* 106: */ {\r\n/* 107:194 */ assert (checkRep());\r\n/* 108:195 */ return this.map.keySet().size();\r\n/* 109: */ }",
"public int getSize() {\n return fEntries.length;\n }",
"@Override\r\n\tpublic int getTableSize() {\r\n\t\treturn size;\r\n\t}",
"int sizeOfKeyArray();",
"public int size ()\n {\n return this.entryMap.size ();\n }",
"@Override\r\n\tpublic int size() {\n\t\treturn keys.size();\r\n\t}",
"public int size() {\r\n\t\t\tint size = 0;\r\n\t\t\tListNode counter = header;\r\n\t\t\twhile (counter != null) {\r\n\t\t\t\tsize++;\r\n\t\t\t\tcounter = counter.next;\r\n\t\t\t}\r\n\t\t\treturn size;\r\n\t\t}",
"public static int totalSizeBits_entries_id() {\n return 176;\n }",
"public int size() throws MPJException {\n if (table != null) {\n return table.size();\n }\n return MPJ.UNDEFINED;\n }",
"public static int calculateRecordCount(Hashtable data) {\r\n int r = 0;\r\n Enumeration keys = data.keys();\r\n while (keys.hasMoreElements()) {\r\n Object oKey = keys.nextElement();\r\n Object v = data.get(oKey);\r\n if ((v != null) && (v instanceof Vector)) {\r\n r = ((Vector) v).size();\r\n break;\r\n }\r\n }\r\n return r;\r\n }",
"public int\tsize() {\n\t\treturn map.size();\n\t}",
"public synchronized int size() throws IOException {\n\t\t\treadIndex();\n\t\t\treturn keys.size();\n\t\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 final synchronized int size() {\n\t\treturn map.size();\n\t}",
"public int size()\r\n {\r\n return nItems;\r\n }",
"private int sizeForHashTable()\n {\n String compare=\"\";\n int numberOfdates = 0;\n for (int i=0; i <= hourly.size();i++)\n {\n if (i==0)\n {\n numberOfdates +=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }else if(compare != data.get(i).getFCTTIME().getPretty())\n {\n numberOfdates+=1;\n compare = data.get(i).getFCTTIME().getPretty();\n }\n }\n return numberOfdates;\n }",
"public int getTotalSize();",
"int numberofhc()\n{\n\treturn hc.size();}",
"@Override\n public int getSize() {\n return this.numItems;\n }",
"@Override\n public int getSize() {\n return map.size();\n }",
"@Override\r\n\tpublic int size() {\r\n\t\treturn keySet().size();\r\n\t}",
"public int size() {\n return map.size();\n }",
"public int size() {\n return map.size();\n }",
"public int size() {\n\t\treturn map.size();\n\t}",
"public long size();",
"public int size()\n\t{\n\t\tint size = 0;\n\t\tfor(List<Registry.Entry> li : this.reg.values())\n\t\t\tsize += li.size();\n\t\treturn size;\n\t}",
"public static int totalSize_entries_id() {\n return (176 / 8);\n }",
"public int sizeOfMap(){return size;}",
"public int count () throws IOException {\n\t\tList<Integer> list = new ArrayList<Integer>();\n\t\tinit();\n\t\twhile(hasNext()) {\n\t\t\tElement el = nextElement();\n\t\t\tint hash = el.GetHash();\n\t\t\tint pos = locate (list, hash);\n\t\t\tif ((pos == list.size()) || (list.get(pos) != hash)) {\n\t\t\t\tlist.add(pos, hash);\n\t\t\t}\n\t\t\t/*for (i=0; i<list.size() && list.get(i)<hash; i++) {}\n\t\t\t\tif ((i==list.size()) || (list.get(i) != el.GetHash())) {\n\t\t\t\t\tlist.add(i, hash);\n\t\t\t\t}*/\n\t\t}\n\t\treturn list.size();\n\t}",
"public int size(){\n int size = 0;\n for(LinkedList<E> item : this.data){\n size += item.size();\n }\n return size;\n }",
"public static int size() {\n\t\treturn anisLookup.size();\n\t}",
"public int size() {\n return nItems;\n }",
"public int size() {\r\n\t\tint size = 0;\r\n\t\tfor (Integer key : connectionLists.keySet()) {\r\n\t\t\tsize += connectionLists.get(key).size();\r\n\t\t}\r\n\t\treturn size;\r\n\t}",
"public int getSize() {\n\t\treturn size();\n\t}",
"int getKeySize();",
"public int size() {\n int size = 0;\n for (Collection<V> value : map.values()) {\n size += value.size();\n }\n return size;\n }",
"public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}",
"public int tableLength() {\n\t\treturn table.length;\n\t}",
"@Override\n public int getSize() {\n return numItems;\n }",
"int getTotalSize();",
"public int size() {\n \treturn numItems;\n }",
"public int size(){\r\n return cjtMap.size();\r\n }",
"public int getLength(){\n return keys.length;\n }",
"public int size() {\n // DO NOT MODIFY THIS METHOD!\n return size;\n }",
"public int getSize() {\r\n return list.getItemCount();\r\n }",
"@Override\n\tpublic int size() {\n\t\treturn map.size();\n\t}",
"private int getTableLength() {\n\t\tif (proposalList == null)\n\t\t\treturn 0;\n\t\treturn proposalList.length() + proposalList.getProviderList().size()\n\t\t\t\t+ proposalList.getTopProposalList().size();\n\t}",
"@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}",
"public int getSize()\n {\n return ll.getSize();\n }",
"public PrimitiveVS<Integer> size() {\n return keys.size();\n }",
"@Override\n\tpublic int size() {\n\t\treturn util.iterator.IteratorUtilities.size(iterator());\n\t}",
"public int getSize(){\n\treturn Cells.size();\n }",
"@Override\r\n public int getRowCount() {\n return fixHashtables.length;\r\n }",
"public int size() {\n return numItems;\n }",
"public int getHashLength() {\n\t\treturn hashLength;\n\t}",
"public int sizeOf();",
"public int GetSize() \n\t{\n\t\treturn numEntries; //dummy return so file would compile\n\t}",
"public int size() {\n \t\treturn size;\n \t}",
"@Override\r\n public int size() {\r\n return map.size();\r\n }",
"public int size()\r\n\t{\r\n\t\treturn data.size();\r\n\t}",
"public int size(){\n\t\treturn howMany; \n\t}",
"public int size(){\n return sizeCounter;\n }",
"public int size(){\n\t\treturn size; \n\t}",
"public int getNumEntries ()\n\t{\n\t\treturn entries.size ();\n\t}",
"public int size() {\n // DO NOT MODIFY!\n return size;\n }",
"int getTablesCount();",
"Integer size();",
"Integer size();"
] | [
"0.8458409",
"0.75869054",
"0.7510713",
"0.74012244",
"0.7393358",
"0.73833656",
"0.7330012",
"0.7315013",
"0.72943395",
"0.7270337",
"0.72067696",
"0.7196728",
"0.7176687",
"0.71701276",
"0.71154714",
"0.7110193",
"0.71029884",
"0.7079042",
"0.70040846",
"0.69942474",
"0.6987564",
"0.6978011",
"0.6950626",
"0.6912235",
"0.690706",
"0.68886286",
"0.68725437",
"0.685761",
"0.6848139",
"0.6848139",
"0.68364173",
"0.6830529",
"0.6830244",
"0.6827802",
"0.68228537",
"0.68203545",
"0.6811345",
"0.67846894",
"0.6783647",
"0.6765851",
"0.6746673",
"0.67420226",
"0.67256945",
"0.67256355",
"0.67176485",
"0.6714291",
"0.670364",
"0.6701866",
"0.66966885",
"0.6696023",
"0.66938573",
"0.6683009",
"0.66745144",
"0.66545033",
"0.6652007",
"0.665077",
"0.6649941",
"0.6641172",
"0.6636633",
"0.66324955",
"0.6624165",
"0.6613992",
"0.6607976",
"0.66014224",
"0.6594671",
"0.6593319",
"0.659294",
"0.658485",
"0.6575381",
"0.6574636",
"0.6574486",
"0.65719837",
"0.6569466",
"0.6567235",
"0.65416",
"0.65304375",
"0.65262336",
"0.6523945",
"0.6521675",
"0.65204626",
"0.6515062",
"0.65102834",
"0.6509547",
"0.6505621",
"0.6504121",
"0.65027773",
"0.65021735",
"0.65012497",
"0.650108",
"0.6497298",
"0.6486877",
"0.6486738",
"0.64853376",
"0.6482742",
"0.6475143",
"0.64743876",
"0.64713496",
"0.64670014",
"0.64627707",
"0.64627707"
] | 0.66637766 | 53 |
Displays the values of the table If an index is empty, it shows If previously existed dataitem is deleted, then it should show DEL | @Override
public void display() {
StringBuilder string = new StringBuilder();
for (int i = 0; i < size; i++) {
if (hashArray[i] == null)
string.append("** ");
else if (hashArray[i] == deleted)
string.append(hashArray[i].value + " ");
else
string.append("[" + hashArray[i].value + ", "
+ hashArray[i].frequency + "] ");
}
System.out.println(string.toString());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }",
"void showDataDeletedMsg();",
"private void btnDeleteActionPerformed(java.awt.event.ActionEvent evt) {\n String delete = TabelSiswa.getValueAt(baris, 1).toString();\n try{\n Statement stmt = koneksi.createStatement();\n String query = \"DELETE FROM pasien WHERE nis = '\" + delete + \"'\";\n int berhasil = stmt.executeUpdate(query);\n if(berhasil == 1){\n JOptionPane.showMessageDialog(null, \"Data berhasil dihapus\");\n dtm.getDataVector().removeAllElements();\n showData();\n showStok();\n }else{\n JOptionPane.showMessageDialog(null, \"Data gagal dihapus\");\n }\n }catch(SQLException ex){\n ex.printStackTrace();\n JOptionPane.showMessageDialog(null, \"Terjadi kesalahan\", \"ERROR\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"@Override\r\n\t\t\t\t\tprotected void updateItem(Object arg0, boolean arg1) {\n\t\t\t\t\t\tsuper.updateItem(arg0, arg1);\r\n\t\t\t\t\t\tif (arg1) {\r\n\t\t\t\t\t\t\tsetGraphic(null);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tbtn.setOnAction(new EventHandler<ActionEvent>() {\r\n\r\n\t\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\r\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getItems().get(getIndex());\r\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"DELETE FROM dbo.product WHERE id=\"+data.getId())>0) {\r\n\t\t\t\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\t\tsetGraphic(btn);\r\n\t\t\t\t\t\t\tsetText(null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void handle(ActionEvent arg0) {\n\r\n\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getItems().get(getIndex());\r\n\t\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tProducts data=(Products) tbl_view.getSelectionModel().getSelectedItem();\r\n\t\t\t\t\t\t\t\t\tSystem.out.println(data.toString());\r\n\t\t\t\t\t\t\t\t\tif(ConnectionManager.queryInsert(conn, \"DELETE FROM dbo.product WHERE id=\"+data.getId())>0) {\r\n\t\t\t\t\t\t\t\t\t\ttxt_cost.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_date.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_name.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_price.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_qty.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_reorder.clear();\r\n\t\t\t\t\t\t\t\t\t\ttxt_search.clear();\r\n\t\t\t\t\t\t\t\t\t\tfetchData(FETCH_DATA);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}",
"private void delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\tConnection con = Connector.DBcon();\n\t\t\tString query = \"select * from items where IT_ID=?\";\n\t\t\t\n\t\t\tPreparedStatement pst = con.prepareStatement(query);\n\t\t\tpst.setString(1, txticode.getText());\n\t\t\tResultSet rs = pst.executeQuery();\n\t\t\t\n\t\t\tint count = 0;\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\t\n\t\t\tif(count == 1)\n\t\t\t{\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete selected item data?\", \"ALERT\", JOptionPane.YES_NO_OPTION);\n\t\t\t\tif(choice==JOptionPane.YES_OPTION)\n\t\t\t\t{\n\t\t\t\t\tquery=\"delete from items where IT_ID=?\";\n\t\t\t\t\tpst = con.prepareStatement(query);\n\t\t\t\t\t\n\t\t\t\t\tpst.setString(1, txticode.getText());\n\t\t\t\t\t\n\t\t\t\t\tpst.execute();\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Deleted Successfully\", \"RESULT\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tloadData();\n\t\t\t\t\n\t\t\t\trs.close();\n\t\t\t\tpst.close();\n\t\t\t\tcon.close();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Record Not Found!\", \"Alert\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\n\t\t\trs.close();\n\t\t\tpst.close();\n\t\t\tcon.close();\n\t\t\t\n\t\t} \n\t\tcatch (Exception e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null, e);\n\t\t}\n\t}",
"public static void viewtable() {\r\n\t\tt.dibuixa(table);\r\n\t}",
"@Override\n\t\t\t\t\tpublic String getTitle() {\n\t\t\t\t\t\treturn item + \" deleted\";\n\t\t\t\t\t}",
"private void clearData() throws SQLException {\n//Lay chi so dong cuoi cung\n int n = tableModel.getRowCount() - 1;\n for (int i = n; i >= 0; i--) {\n tableModel.removeRow(i);//Remove tung dong\n }\n }",
"private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}",
"public void showData()\n\t\t{\n\t\t\ttry {\n\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\tString sql=\"select *from ComplaintsData\";\n\t\t\t\tps=con.prepareStatement(sql);\n\t\t\t\trs=ps.executeQuery();\n\t\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"private void tampilkan() {\n int row = table.getRowCount();\n for(int a= 0; a<row;a++){\n model.removeRow(0);\n }\n \n \n }",
"public void disTable () {\n\t\t\t\tJScrollPane scrollPane = new JScrollPane(table);\n\t\t\t\tvalues = new Vector();\n\t\t\t\tvalues.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\"); values.add(\"20\");values.add(\"20\");values.add(new Boolean(false));\n\t\t\t\tmyModel.addRow(values ); // more practicle, vector can take only objects.\n\t\t myModel.addRow(data);\n\n\n\t\t\t\tgetContentPane().add(scrollPane, BorderLayout.CENTER);\n\n\t\t\t\t addWindowListener(new WindowAdapter() {\n\t\t\t\t\t\t\tpublic void windowClosing(WindowEvent e) {\n\t\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t });\n\t}",
"public void actionPerformed(ActionEvent e) {\n JButton button = (JButton) e.getSource();\n if(button.getText().equals(removeButton.getText()))\n {\n if(textItemName.getText().length() == 0)\n {\n Item item = dep.getListProducts().getItemId(Integer.parseInt(textItemId.getText()));\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,Integer.parseInt(textItemId.getText()),NotificationType.REMOVE);\n dep.NotifyRemove(notification);\n noRemove.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n }\n if(textItemId.getText().length() == 0)\n {\n Item item = dep.getListProducts().getItemName(textItemName.getText());\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,item.getId(),NotificationType.REMOVE);\n dep.NotifyRemove(notification);\n noRemove.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n }\n if(textItemId.getText().length() != 0 && textItemId.getText().length() != 0)\n {\n Item item = dep.getListProducts().getItemId(Integer.parseInt(textItemId.getText()));\n if(item == null)\n {\n noRemove.setVisible(true);\n noCorespondence.setVisible(false);\n }\n else\n {\n if(item.getName().equals(textItemName.getText()))\n {\n dep.getListProducts().remove(item);\n Notification notification = new Notification(depId,Integer.parseInt(textItemId.getText()),NotificationType.MODIFY);\n dep.NotifyRemove(notification);\n noCorespondence.setVisible(false);\n tableModel.fireTableDataChanged();\n dispose();\n }\n else\n {\n noCorespondence.setVisible(true);\n }\n }\n }\n\n }\n }",
"@FXML\n private void btnSlett() {\n int valgtIndex = tblData.getSelectionModel().getSelectedIndex();\n if (valgtIndex >=0) {\n System.out.println(tblData.getSelectionModel().getSelectedIndex());\n dRegister.removeInded(valgtIndex);\n } else {\n dialogs.showNoSelectDialog(\"Vennligst velg en komponent i tabellen\");\n }\n }",
"public static void displayNoResults()\n {\n tableData.add(new Company(null, \"No results found\"));\n tableView.setItems(tableData); \n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n String nama = String.valueOf(cbbNama.getSelectedItem());\n String pilihan2 = String.valueOf(cbbPilihan2.getSelectedItem());\n //dapetin nama nama table\n LinkedList<String> arrTable = DataAksesAdmin.listTable();\n //linked list buat nampung yg mau dihapus\n LinkedList<String> forDelete = new LinkedList<>();\n //pindahin ke array kalo ada namanya\n for(int i = 0; i < arrTable.size(); i++){\n for(int j = 1; j < 15; j++){\n if(arrTable.get(i).equals(nama+j)){\n forDelete.add(arrTable.get(i));\n }\n }\n }\n DataAksesAdmin.delUser(nama, pilihan2, forDelete);\n JOptionPane.showMessageDialog(null, \"Data Berhasil Dihapus!\");\n }",
"public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }",
"private void showAllDataStok() {\n tableStok.getSelectionModel().removeListSelectionListener(this);\n listStok = daoStok.getAllStok();\n dtmStok.getDataVector().removeAllElements();\n for (Stokdigudang s : listStok) {\n dtmStok.addRow(new Object[]{\n s.getIDBarang(),\n s.getNamaBarang(),\n s.getStok(),\n s.getBrand(),\n s.getHarga(),\n s.getIDKategori().getNamaKategori(),\n s.getIDSupplier().getNamaPerusahaan(),\n s.getTanggalDidapat()\n });\n }\n tableStok.getSelectionModel().addListSelectionListener(this);\n }",
"public void toDeletIndex()\n {\n try\n { \n //DefaultTableModel model=(DefaultTableModel)jt.getModel(); \n //jt.getModel();\n int num=Integer.parseInt(JOptionPane.showInputDialog(rootPane,\"Enter the row number\")); \n jtModel.removeRow(num-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted selected row number \" +num);\n }\n catch(NumberFormatException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"Enter integer not alphabet\");\n } \n catch(ArrayIndexOutOfBoundsException ex)\n {\n JOptionPane.showMessageDialog(rootPane,\"This row dosent exist\");\n }\n }",
"private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {\n if(!search_table.getSelectionModel().isSelectionEmpty()){\n // TODO add your handling code here:\n int op = JOptionPane.showConfirmDialog(null, \"ARE YOU SURE YOU WANT TO DELETE?\", \"DELETE\", JOptionPane.YES_NO_OPTION);\n if(op==0){\n try{\n int i = search_table.getSelectedRow();\n TableModel model = search_table.getModel();\n \n String sql2 = \"DELETE FROM Lecturer WHERE id = '\"+model.getValueAt(i, 0).toString()+\"'\";\n st.executeUpdate(sql2);\n JOptionPane.showMessageDialog(null, \"DELETED SUCCESSFULLY\");\n \n DefaultTableModel model1= (DefaultTableModel) search_table.getModel();\n model1.setRowCount(0);\n viedetail_txt.setText(null);\n }\n catch(HeadlessException | SQLException ex){\n JOptionPane.showMessageDialog(null, ex);\n }\n }\n }\n else\n JOptionPane.showMessageDialog(null, \"NOTHING SPECIFIED TO DELETE\");\n \n \n }",
"private void showData(String query) {\n try {\n ResultSet rs = DB.search(query);\n tbl.setRowCount(0);\n while (rs.next()) {\n Vector v = new Vector();\n v.add(rs.getString(1)); //inv id\n v.add(rs.getString(6)); //cus name\n v.add(rs.getString(2)); //date\n v.add(rs.getString(3)); //time\n v.add(rs.getString(10)); //price\n v.add(rs.getString(11)); //discount\n v.add(rs.getString(12)); //total\n v.add(rs.getString(13)); //pay method\n tbl.addRow(v);\n }\n //Calculating the total value of invoices\n double total = 0d;\n for (int row = 0; row < tbl.getRowCount(); row++) {\n total = total + Double.parseDouble(tbl.getValueAt(row, 4).toString());\n }\n lbAllValue.setText(String.valueOf(total));\n lbNoofnvs.setText(String.valueOf(tbl.getRowCount()));\n setCOLORSTB(jTable1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public String btn_delete_action()\n {\n int n = this.getDataTableSemental().getRowCount();\n ArrayList<SementalDTO> selected = new ArrayList();\n for (int i = 0; i < n; i++) { //Obtener elementos seleccionados\n this.getDataTableSemental().setRowIndex(i);\n SementalDTO aux = (SementalDTO) this.\n getDataTableSemental().getRowData();\n if (aux.isSelected()) {\n selected.add(aux);\n }\n }\n if(selected == null || selected.size() == 0)\n {\n //En caso de que no se seleccione ningun elemento\n MessageBean.setErrorMessageFromBundle(\"not_selected\", this.getMyLocale());\n return null;\n }\n else if(selected.size() == 1)\n { //En caso de que solo se seleccione un elemento\n \n //si tiene hijos o asociacions despliega el mensaje de alerta\n if(getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n haveSemenGathering(\n selected.get(0).getSementalId()))\n {\n this.getAlertMessage().setRendered(true);\n this.getMainPanel().setRendered(false);\n getgermplasm$SementalSessionBean().setDeleteSemental(\n selected.get(0).getSementalId());\n }\n else\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(selected.get(0).getSementalId());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n }\n \n return null;\n }\n else{ //En caso de que sea seleccion multiple\n MessageBean.setErrorMessageFromBundle(\"not_yet\", this.getMyLocale());\n return null;\n }\n }",
"public final void detalleTabla()\n {\n \n try\n {\n ResultSet obj=nueva.executeQuery(\"SELECT cli_nit,cli_razon_social FROM clientes.cliente ORDER BY cli_razon_social ASC\");\n \n while (obj.next()) \n {\n \n Object [] datos = new Object[2];\n \n \n for (int i=0;i<2;i++)\n {\n datos[i] =obj.getObject(i+1);\n }\n\n modelo.addRow(datos);\n \n }\n tabla_cliente.setModel(modelo);\n nueva.desconectar();\n \n \n \n }catch(Exception e)\n {\n JOptionPane.showMessageDialog(null, e, \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void showDataInvoiceNo()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"SELECT `Sr_No`, `Products`, `Serial_No`, `Module_No`, `Rate_Rs`, `CGST(%)`, `CGST(Rs)`, `SGST(%)`, `SGST(Rs)`, `GST(%)`, `GST(Rs)`, `Actual_Price`, `Discount(%)`, `Discount(Rs)`, `Quantity`, `Discount_Price`, `Total` FROM `mundheelectronics1`.`productsdata` WHERE Invoice_No=?\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\tps.setString(1,txtInvoiceNo.getText());\n\t\t\trs=ps.executeQuery();\n\t\t\ttable.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void listarEquipamentos() {\n \n \n List<Equipamento> formandos =new EquipamentoJpaController().findEquipamentoEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeEquipamento.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Equipamento f : formandos) {\n tbm.addRow(new String[1]);\n \n listadeEquipamento.setValueAt(f.getIdequipamento(), i, 0);\n listadeEquipamento.setValueAt(f.getEquipamento(), i, 1);\n \n i++;\n }\n \n \n \n }",
"void showdelete() {\n\t\tif (printstatus != delete)\n\t\t\tprintln(\">>>> DELETE AT <br/>\" + printoldline);\n\t\tprintstatus = delete;\n\t\toutput+=oldinfo.symbol[printoldline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintoldline++;\n\t}",
"public void getData( ){\n model.getDataVector( ).removeAllElements( );\n model.fireTableDataChanged( );\n\n try{\n //membuat statemen pemanggilan data pada table tblGaji dari database\n Statement stat = (Statement)koneksi_db.config( ).createStatement( );\n String sql = \"Select * from daftar_log\";\n ResultSet res = stat.executeQuery(sql);\n\n //penelusuran baris pada tabel tblGaji dari database\n while(res.next ()){\n Object[ ] obj = new Object[6];\n obj[0] = res.getString(\"id_log\"); \n obj[1] = res.getString(\"nama_kejadian\");\n model.addRow(obj);\n }\n }\n catch(SQLException err){\n JOptionPane.showMessageDialog(null, err.getMessage() );\n }\n }",
"@Override\r\n\tpublic void print()\r\n\t{\t//TODO méthode à compléter (TP1-ex11)\r\n\t\tfor (IndexEntry indexEntry : data) {\r\n\t\t\tif(indexEntry ==null){\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.println(indexEntry.toString());\r\n\t\t}\r\n\t}",
"public void updateTable() {\n tabelModel.setRowCount(0);\n Link current = result.first;\n for (int i = 0; current != null; i++) {\n Object[] row = {current.getMasjid(), current.getAlamat()};\n tabelModel.addRow(row);\n current = current.next;\n }\n }",
"@Override\n protected void onDataChanged() {\n binding.empty.setVisibility(mAdapter.getItemCount() == 0 ? View.VISIBLE : View.GONE);\n }",
"private void SearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_SearchActionPerformed\n RowItem.setText(\"\");\n DefaultTableModel model = (DefaultTableModel) Table.getModel();\n while (model.getRowCount() > 0) {\n model.removeRow(0);\n }\n String query = jTextField1.getText().trim();\n if (query.isEmpty()) {\n alert.setText(\"Enter a search query first\");\n filterlist = displayMgr.mainMgr.searchMgr.getProductList();\n } else {\n filterlist = displayMgr.mainMgr.searchMgr.search(query);\n if (filterlist.size() == 0) {\n alert.setText(\"Query not found in database\");\n filterlist = displayMgr.mainMgr.searchMgr.getProductList();\n }\n else{\n alert.setText(\"\");\n }\n }\n \n \n for (int i = 0; i < filterlist.size(); i++) {\n rowData[0] = filterlist.get(i).getName();\n rowData[1] = filterlist.get(i).getPrice();\n rowData[2] = filterlist.get(i).getProductId();\n rowData[3] = filterlist.get(i).getDiscount();\n model.addRow(rowData);\n }\n }",
"public void limpiarcarrito() {\r\n setTotal(0);//C.P.M limpiamos el total\r\n vista.jTtotal.setText(\"0.00\");//C.P.M limpiamos la caja de texto con el formato adecuado\r\n int x = vista.Tlista.getRowCount() - 1;//C.P.M inicializamos una variable con el numero de columnas\r\n {\r\n try {\r\n DefaultTableModel temp = (DefaultTableModel) vista.Tlista.getModel();//C.P.M obtenemos el modelo actual de la tabla\r\n while (x >= 0) {//C.P.M la recorremos\r\n temp.removeRow(x);//C.P.M vamos removiendo las filas de la tabla\r\n x--;//C.P.M y segimos disminuyendo para eliminar la siguiente \r\n }\r\n } catch (ArrayIndexOutOfBoundsException e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al limpiar la venta\");\r\n }\r\n }\r\n }",
"public void showData(){\n listName.setText(this.listName);\n listDescription.setText(this.description);\n Double Total = Lists.getInstance().getLists(this.listName).getTotal();\n listTotal.setText(pending.toString());\n\n this.data = FXCollections.observableArrayList(Lists.getInstance().getLists(this.listName).getItems());\n articleColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"name\")\n );\n quantityColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"quantity\")\n );\n priceColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"price\")\n );\n totalColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"total\")\n );\n stateColumn.setCellValueFactory(\n new PropertyValueFactory<>(\"state\")\n );\n this.itemsTable.setItems(data);\n\n }",
"public void show() {\n if(heading.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in heading, nothing to show\");\r\n return;\r\n }\r\n if(rows.isEmpty()) {\r\n System.out.println(\"Error:Table:show:no data in rows, nothing to show\");\r\n return;\r\n }\r\n for(String h : heading) {\r\n System.out.print(h + \" | \");\r\n }\r\n System.out.println(\"\");\r\n Set<String> keys = rows.keySet();\r\n for(String k : keys) {\r\n rows.get(k).show();\r\n System.out.println(\"\");\r\n }\r\n System.out.println(\"\");\r\n }",
"private void popupMenuDeleteData(int rowIndex, int columnIndex) {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tDeleteDataDialog deleteDataDialog = new DeleteDataDialog(parent.getShell());\n\t\tif (deleteDataDialog.open() != Window.OK)\n\t\t\treturn;\n\t\tint delSize = deleteDataDialog.getResult();\n\n\t\tif (delSize == 0) {\n\t\t\t//\n\t\t\t// Cancel button pressed - do nothing\n\t\t\t//\n\t\t\treturn;\n\t\t}\n\n\t\t//\n\t\t// Delete data from the table\n\t\tdelete(rowIndex, columnIndex - 1, delSize);\n\n\t\t//\n\t\t// Update the status panel\n\t\t//\n\t\tupdateStatusPanel();\n\t}",
"public void updateTable() {\n\t\ttable.getSelectionModel().removeListSelectionListener(lsl);\n\t\tdtm = new DefaultTableModel();\n\t\td = new Diet();\n\t\tdtm.addColumn(\"Id\");\n\t\tdtm.addColumn(\"Meal Id\");\n\t\tdtm.addColumn(\"Meal Type\");\n\t\tdtm.addColumn(\"Food Name\");\n\t\tdtm.addColumn(\"Food Type\");\n\t\tdtm.addColumn(\"Food Category\");\n\t\tdtm.addColumn(\"Ready Time\");\n\t\tdtm.addColumn(\"Calories (g)\");\t\t\n\t\tdtm.addColumn(\"Protein (g)\");\n\t\tdtm.addColumn(\"Fat (g)\");\n\t\tdtm.addColumn(\"Carbohydrates\");\n\t\tdtm.addColumn(\"VitaminA\");\n\t\tdtm.addColumn(\"VitaminC\");\n\t\tdtm.addColumn(\"Calcium\");\n\t\tdtm.addColumn(\"Iron\");\n\t\tdtm.addColumn(\"Author\");\n\t\tArrayList<Diet> dietList = dI.getDietList();\n\t\tif(isOrder && orderby!=\"\")\n\t\t{\t\t\t\n\t\t\tSystem.out.println(\"entering ----------------\"+orderby);\n\t\t\tdietList=dI.getDietOrderedList(type,orderby);\n\t\t\tfor (Diet d : dietList) {\t\n\t\t\t\tSystem.out.println(d.getId()+\" ------ \"+d.getCalories());\n\t\t\t}\n\t\t}\n\t\tif(isFiltered)\n\t\t{\n\t\t\tif(mealtypeSel!=\"\")\n\t\t\tdietList=dI.getFilteredMealTypeList(mealtypeSel);\n\t\t\tif(foodtypeSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredFoodTypeList(foodtypeSel);\n\t\t\tif(authorSel!=\"\")\n\t\t\t\tdietList=dI.getFilteredauthorList(authorSel);\n\t\t\tif(foodCategorySel!=\"\")\n\t\t\t\tdietList=dI.getFilterFoodCategoryList(foodCategorySel);\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (Diet d : dietList) {\t\n\t\t\tdtm.addRow(d.getVector());\n\t\t}\n\t\ttable.setModel(dtm);\n\n\t\ttable.getSelectionModel().addListSelectionListener(lsl);\n\n\t}",
"public verCustos() {\n initComponents();\n ArrayList<finances.custoItems> displayCustos = Estoque.allFinances.get(Estoque.allFinances.size()-1).custos;\n Object [][] temp = new Object[displayCustos.size()][3];\n despesasTable.setModel(new javax.swing.table.DefaultTableModel(\n temp,\n new String [] {\n \"Despesa\", \"Data\", \"Valor\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n \n for(int row = 0;row<displayCustos.size();row++){\n despesasTable.setValueAt(displayCustos.get(row).nome, row, 0);\n despesasTable.setValueAt(displayCustos.get(row).data, row, 1);\n despesasTable.setValueAt(displayCustos.get(row).valor, row, 2);\n }\n }",
"@FXML\r\n private void bRem() throws SQLException {\n int index = tableView.getSelectionModel().getSelectedIndex();\r\n if(index>=0)\r\n {\r\n calc calc = data.get(index);\r\n String tmp = calc.getComment();\r\n try{\r\n UpdateDb(tmp.substring(0,tmp.lastIndexOf(\"\\n\")), calc.getDate());\r\n }catch (StringIndexOutOfBoundsException e)\r\n {\r\n UpdateDb(\"\", calc.getDate());\r\n }\r\n refresh();\r\n }else\r\n {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"ERROR\");\r\n alert.setContentText(\"Nothing Selected!!!\");\r\n alert.showAndWait();\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\titem1 = tf[0].getText();\n\t\t\t\titem2 = tf[4].getText();\n\t\t\t\tif (!item1.equals(\"\")) {\n\t\t\t\t\tsql = transaction.T3(inx1,item1);\n\t\t\t\t\t\n\t\t\t\t\tDMT_refresh(sql,0);\n\t\t\t\t}\n\t\t\t\telse if(!item2.equals(\"\")){\n\t\t\t\t\tsql = transaction.T4(inx3,item2);\n\t\t\t\t\t\n\t\t\t\t\tDMT_refresh(sql,1);\n\t\t\t\t}\n\t\t\t}",
"public void Show_Products_in_jTable()\n {\n ArrayList<Patient> list = getPatientList();\n DefaultTableModel model = (DefaultTableModel) jTablePatient.getModel();\n //Clear jTable;\n model.setRowCount(0);\n Object[] row = new Object[5];\n for(int i=0;i<list.size();i++)\n {\n row[0] = list.get(i).getID();\n row[1] = list.get(i).getName();\n row[2] = list.get(i).getAge();\n row[3] = list.get(i).getContactNumber();\n row[4] = list.get(i).getDoctor();\n \n model.addRow(row);\n }\n }",
"void displayNoItemsSelectedErrorMessage();",
"void clearDeletedItemsTable();",
"@FXML\r\n private void bRemCell() throws SQLException {\n int index = tableView.getSelectionModel().getSelectedIndex();\r\n if(index>=0)\r\n {\r\n calc calc = data.get(index);\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Delete cell\");\r\n alert.setHeaderText(\"Start of Day: \" + String.valueOf(calc.getStartDay()) + \"\\n\" +\r\n \"End of Day: \" + String.valueOf(calc.getOverDay()) + \"\\n\" +\r\n \"Start of Receipt: \" + String.valueOf(calc.getStartOfReceipt()) + \"\\n\" +\r\n \"End of Receipt: \" + String.valueOf(calc.getEndOfReceipt()) + \"\\n\" +\r\n \"Sum of Receipt: \" + String.valueOf(calc.getSumReceipt()) + \"\\n\" +\r\n \"User: \" + String.valueOf(calc.getUser()) + \"\\n\" +\r\n \"Date: \" + String.valueOf(calc.getDate()) + \"\\n\" +\r\n \"Comment: \" + String.valueOf(calc.getComment()));\r\n alert.setContentText(\"Are you sure you want to delete cell with data?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if(result.get() == ButtonType.OK)\r\n {\r\n delete(String.valueOf(calc.getDate()));\r\n refresh();\r\n }\r\n else\r\n {\r\n refresh();\r\n }\r\n }else\r\n {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"ERROR\");\r\n alert.setContentText(\"Nothing Selected!!!\");\r\n alert.showAndWait();\r\n }\r\n }",
"public void removeAllDataEmpleado() {\n DefaultTableModel dm = (DefaultTableModel) table.getModel();\n dm.getDataVector().removeAllElements();\n dm.fireTableDataChanged(); // notifies the JTable that the model has changed\n }",
"public void setNoIndex() {\n noIndex= true;\n }",
"public void listar_saldoData(String data_entrega,String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_Saldo.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getSaldoVendaCorte(data_entrega, tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal()});\n }\n \n \n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n codigo.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue().getCodigo()));\r\n tbCpf.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue().getCliente().getCpf()));\r\n nome.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue().getCliente().getNome()+\" \"+ data.getValue().getCliente().getSobrenome()));\r\n localizacao.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue().getCliente().getRua()+\", \"+data.getValue().getCliente().getCidade()+\" - \"+data.getValue().getCliente().getEstado()));\r\n data.setCellValueFactory(data -> new SimpleObjectProperty<>(data.getValue().getData()));\r\n dao = new vendaDAO();\r\n ArrayList<Venda> result = dao.allVendas();\r\n ObservableList dados = FXCollections.observableArrayList(result);\r\n table.setItems(dados);\r\n \r\n table.setOnMouseClicked((MouseEvent)->{\r\n showContent();\r\n });\r\n \r\n psCpf.setOnKeyPressed((KeyEvent event)->{\r\n psCpf.setText(mascara(psCpf.getText(), event));\r\n psCpf.positionCaret(psCpf.getLength());\r\n });\r\n \r\n pesquisar.setOnAction((ActionEvent)->{\r\n if(pesquisar.getText().equals(\"Pesquisar\")){\r\n dao = new vendaDAO();\r\n ArrayList<Venda> r = dao.getVendas(psCpf.getText());\r\n ObservableList d = FXCollections.observableArrayList(r);\r\n table.getItems().remove(0, table.getItems().size());\r\n table.setItems(d);\r\n pesquisar.setText(\"X\");\r\n }else if(pesquisar.getText().equals(\"X\")){\r\n dao = new vendaDAO();\r\n ArrayList<Venda> r = dao.allVendas();\r\n ObservableList d = FXCollections.observableArrayList(r);\r\n table.getItems().remove(0, table.getItems().size());\r\n table.setItems(d);\r\n pesquisar.setText(\"Pesquisar\");\r\n }\r\n });\r\n \r\n }",
"private void deleteBtnMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_deleteBtnMouseClicked\n\n String id = searchidTxt.getText();\n try {\n\n String Query = \"DELETE from stock where Product_ID =?\";\n\n pstm = con.prepareStatement(Query);\n pstm.setInt(1, Integer.parseInt(id));\n pstm.executeUpdate();\n\n } catch (Exception ex) {\n JOptionPane.showMessageDialog(null, \"ID Not Found \");\n }\n //Refresh Table\n refTable();\n\n //by Default hide Update button\n deleteBtn.setVisible(false);\n\n //Clear all Fields\n clearFields();\n }",
"private void limparTabela() { \n while (tmLivro.getRowCount() > 0) { \n tmLivro.removeRow(0);\n }\n }",
"public void showEmptyListMessage() {\n Toast.makeText(getBaseContext(), \"Lista de opiniones vacia!\", Toast.LENGTH_LONG).show();\n }",
"private void updateTabela() {\n\n if (txBuscar.getText().isEmpty()) {\n ListaEmprestimosBEANs = new ControlerEmprestimos().listaEmprestimoss();\n } else {\n try {\n Integer buscar = Integer.parseInt(txBuscar.getText());\n ListaEmprestimosBEANs = new ArrayList<>();\n ListaEmprestimosBEANs.add(new ControlerEmprestimos().findEmprestimos(buscar));\n } catch (Exception e) {\n\n }\n }\n DefaultTableModel model = new DefaultTableModel(null, new String[]{\"ID\", \"Data de Saida\", \"Data Estimada do Retorno\", \"Data do Retorno\"});\n try {\n jTable1.setModel(model);\n String[] dados = new String[9];\n for (EmprestimosBEAN a : ListaEmprestimosBEANs) {\n dados[0] = String.valueOf(a.getId_emprestimo());\n dados[1] = a.getDtSaida().toString();\n dados[2] = a.getDtVolta().toString();\n dados[3] = a.getDtRetorno() == null ? \"\" : a.getDtRetorno().toString();\n model.addRow(dados);\n }\n } catch (Exception ex) {\n\n }\n\n }",
"private void fillTable(){\n tblModel.setRowCount(0);// xoa cac hang trong bang\n \n for(Student st: list){\n tblModel.addRow(new String[]{st.getStudentId(), st.getName(), st.getMajor(),\"\"\n + st.getMark(), st.getCapacity(), \"\" + st.isBonnus()});\n // them (\"\" + )de chuyen doi kieu float va boolean sang string\n \n }\n tblModel.fireTableDataChanged();\n }",
"private void deleteButtonActionPerformed(java.awt.event.ActionEvent evt) {// GEN\n // -\n // FIRST\n // :\n // event_deleteButtonActionPerformed\n int rowIndex = headerTable.getSelectedRow();\n if (rowIndex > -1) {\n removeRow(rowIndex);\n }\n }",
"public void popularTabela() {\n\n try {\n\n RelatorioRN relatorioRN = new RelatorioRN();\n\n ArrayList<PedidoVO> pedidos = relatorioRN.buscarPedidos();\n\n javax.swing.table.DefaultTableModel dtm = (javax.swing.table.DefaultTableModel) tRelatorio.getModel();\n dtm.fireTableDataChanged();\n dtm.setRowCount(0);\n\n for (PedidoVO pedidoVO : pedidos) {\n\n String[] linha = {\"\" + pedidoVO.getIdpedido(), \"\" + pedidoVO.getData(), \"\" + pedidoVO.getCliente(), \"\" + pedidoVO.getValor()};\n dtm.addRow(linha);\n }\n\n } catch (SQLException sqle) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + sqle.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n \n } catch (Exception e) {\n\n JOptionPane.showMessageDialog(null, \"Erro: \" + e.getMessage(), \"Bordas\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public void excluirDados() {\n\n int linha;\n\n if (verificarAbaAtiva() == 0) {\n linha = HorarioDeTrabalho.getSelectedRow();\n modHT = (DefaultTableModel) HorarioDeTrabalho.getModel();\n tratDados.excluirDadosTabela(modHT, linha);\n txtEntrada_Horario.requestFocus();\n } else {\n linha = MarcacoesFeitas.getSelectedRow();\n modMF = (DefaultTableModel) MarcacoesFeitas.getModel();\n tratDados.excluirDadosTabela(modMF, linha);\n txtEntrada_Marcacoes.requestFocus();\n }\n \n //Limpa as tabelas de Atraso e Extras\n modAt.setRowCount(0);\n modEx.setRowCount(0);\n }",
"@SuppressWarnings(\"unchecked\")\n private void showDuLieu(){\n try {\n tableMain.removeAll();\n String[] arr= {\"Mã Bạn Đọc \",\"Mã Tài Khoản\",\"Tên Bạn Đọc\" ,\"Địa Chỉ\",\"Số Điện Thoại\",\"Ngày Sinh\"};\n \n DefaultTableModel model = new DefaultTableModel(arr, 0);\n Connection connection = DBConnection.getConnection();\n String query = \"SELECT * FROM dbo.BanDoc20173329\";\n PreparedStatement ps = connection.prepareStatement(query);\n ResultSet rs = ps.executeQuery();\n while(rs.next()){\n Vector vector = new Vector();\n vector.add(rs.getString(\"MABANDOc20173329\"));\n vector.add(rs.getString(\"mataikhoan20173329\"));\n vector.add(rs.getString(\"tenbandoc20173329\"));\n vector.add(rs.getString(\"diachi20173329\"));\n vector.add(rs.getString(\"sodienthoai20173329\"));\n vector.add(rs.getString(\"ngaysinh20173329\"));\n model.addRow(vector);\n }\n DBConnection.closeConnection(connection);\n tableMain.setModel(model);\n tableMain.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tableMain.getSelectedRow()>=0) {\n tfMaBanDoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),0)+\"\");\n tfmataikhoan.setText(tableMain.getValueAt(tableMain.getSelectedRow(),1)+\"\");\n tftenbandoc.setText(tableMain.getValueAt(tableMain.getSelectedRow(),2)+\"\");\n tfdiachi.setText(tableMain.getValueAt(tableMain.getSelectedRow(),3)+\"\");\n tfsodienthoai.setText(tableMain.getValueAt(tableMain.getSelectedRow(),4)+\"\");\n tfngaysinh.setText(tableMain.getValueAt(tableMain.getSelectedRow(),5)+\"\");\n }\n }\n });\n \n } catch (SQLException ex) {\n Logger.getLogger(QuanLyBangSach.class.getName()).log(Level.SEVERE, null, ex);\n }}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tMyButtonEditor.this.fireEditingCanceled(); \n\t\t\t\t//查看详情\n\t\t\t\t\n\t\t\t\tif(mdtjf!=null){\n\t\t\t\t\tmdtjf.dispose();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\tMyTableModel model = (MyTableModel) jtb.getModel();\n\t\t\t\t\t\n\t\t\t\t\tVector<List<String>> data = model.getTableData();\n\t\t\t\t\t\n\t\t\t\t\tVector<List<String>> newData = new Vector<List<String>>();\n\t\t\t\t\t\n\t\t\t\t\tList<String> list = data.get(jtb.getSelectedRow());\n\t\t\t\t\t\n\t\t\t\t\tString name = list.get(0).split(\"×\")[0];\n\t\t\t\t\t\n\t\t\t\t\tList<String> newList = new ArrayList<String>();\n\t\t\t\t\t\n\t\t\t\t\t//添加菜名\n\t\t\t\t\tnewList.add(name);\n\t\t\t\t\t//添加份数为1份,即查看每份所需材料,Order中已对数据进行处理,故无需管后面几项\n\t\t\t\t\t//Order中处理只根据菜名和份数,即可算出所需的所有东西\n\t\t\t\t\t//这里直接添加菜名+份数1份,利用order可查看1份菜品所需的材料\n\t\t\t\t\tnewList.add(\"1\");\n\t\t\t\t\t\n\t\t\t\t\tnewData.add(newList);\n\t\t\t\t\t\n\t\t\t\t\tMyTableModel newModel = new MyTableModel(jf);\n\t\t\t\t\tnewModel.setTableData(newData);\n\t\t\t\t\t\n\t\t\t\t\tOrder order = new Order(jf, newModel, ALL_DISHES);\n\t\t\t\t\t\n\t\t\t\t\tmdtjf = new MyDetailTableJF(order);\n\t\t\t\t\tmdtjf.setVisible(true);\n\t\t\t\t\t\n\t\t\t}",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n tblEnterprise = new javax.swing.JTable();\n backJButton = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n jLabel1 = new javax.swing.JLabel();\n\n setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new java.awt.Color(51, 51, 255)));\n\n tblEnterprise.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null},\n {null, null, null, null, null}\n },\n new String [] {\n \"Location\", \"Type\", \"Enterprise Name\", \"Admin\", \"Address\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, true, true\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n jScrollPane1.setViewportView(tblEnterprise);\n\n backJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/back-arrow-icon.png\"))); // NOI18N\n backJButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backJButtonActionPerformed(evt);\n }\n });\n\n btnDelete.setText(\"Delete Details\");\n btnDelete.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDeleteActionPerformed(evt);\n }\n });\n\n jLabel1.setFont(new java.awt.Font(\"Lucida Calligraphy\", 1, 24)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(51, 51, 255));\n jLabel1.setText(\"View Enterprises\");\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 .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(btnDelete)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(50, 50, 50)\n .addComponent(backJButton)\n .addGap(157, 157, 157)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 297, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(67, 67, 67)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 715, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(66, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(27, 27, 27)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(backJButton)\n .addComponent(jLabel1))\n .addGap(27, 27, 27)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 174, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(53, 53, 53)\n .addComponent(btnDelete)\n .addContainerGap(164, Short.MAX_VALUE))\n );\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\titem5 = tf[7].getText();\n\t\t\t\tif(!item5.equals(\"\")) {\n//\t\t\t\t\tsql = transaction.T5(item5);\n\t\t\t\t\n\t\t\t\t\tDMT_refresh(sql,0);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\titem1 = tf[0].getText();\n\t\t\t\t\titem2 = tf[1].getText();\n\t\t\t\t\titem3 = tf[2].getText();\n//\t\t\t\t\tsql = transaction.T9(inx0,item1,inx1,item2,inx2,item3);\n\t\t\t\t\t\n\t\t\t\t\tDMT_refresh(sql,0);\n\t\t\t\t}\n\t\t\t}",
"private void clearTableData() {\n DefaultTableModel model = (DefaultTableModel) remindersTable.getModel();\n model.setRowCount(0);\n }",
"private void jbtn_deleteActionPerformed(ActionEvent evt) {\n\t\tDefaultTableModel RecordTable=(DefaultTableModel)jTable1.getModel();\n\t\tint Selectedrow=jTable1.getSelectedRow();\n\t\t\n\t\ttry\n\t\t{\n\t\t\tid=RecordTable.getValueAt(Selectedrow,0).toString();\n\t\t\tdeleteItem=JOptionPane.showConfirmDialog(this,\"Confirm if you want to delete the record\",\"Warning\",JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(deleteItem==JOptionPane.YES_OPTION)\n\t\t\t{\n\t\t\t\tconn cc=new conn();\n\t\t\t\tpst=cc.c.prepareStatement(\"delete from medicine where medicine_name=?\");\n\t\t\t pst.setString(1,id);\n\t\t\t\tpst.executeUpdate();\n\t\t\t\tJOptionPane.showMessageDialog(this,\"Record Updated\");\n\t\t\t\tupDateDB();\n\t\t\t\ttxtblank();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\t\n\t}",
"private void apresentarListaNaTabela() {\n DefaultTableModel modelo = (DefaultTableModel) tblAlunos.getModel();\n modelo.setNumRows(0);\n for (Aluno item : bus.getLista()) {\n modelo.addRow(new Object[]{\n item.getIdAluno(),\n item.getNome(),\n item.getEmail(),\n item.getTelefone()\n });\n }\n }",
"private void setTable() {\n try {\n DefaultTableModel dtm = (DefaultTableModel) table.getModel();\n dtm.setRowCount(0);\n ArrayList<Item> itemList = ItemController.getAllItem();\n if (itemList != null) {\n for (Item item : itemList) {\n String qoh = BatchController.getQOH(item.getCode());\n if (qoh != null) {\n if (item.getRol() >= Integer.valueOf(qoh)) {\n Object row[] = {item.getCode(), item.getDesciption(), item.getRol(), qoh};\n dtm.addRow(row);\n }\n }\n\n }\n }\n if (dtm.getRowCount() == 0) {\n JOptionPane.showMessageDialog(this, \"Stock level is above ROL\");\n }\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n } catch (SQLException ex) {\n Logger.getLogger(ROL.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void limparTabela() {\n while (tmLivro.getRowCount() > 0) {\n tmLivro.removeRow(0);\n }\n }",
"private static void popuniTabelu() {\r\n\t\tDefaultTableModel dfm = (DefaultTableModel) teretanaGui.getTable().getModel();\r\n\r\n\t\tdfm.setRowCount(0);\r\n\r\n\t\tfor (int i = 0; i < listaClanova.size(); i++) {\r\n\t\t\tClan c = listaClanova.getClan(i);\r\n\t\t\tdfm.addRow(new Object[] { c.getBrojClanskeKarte(), c.getIme(), c.getPrezime(), c.getPol() });\r\n\t\t}\r\n\t\tcentrirajTabelu();\r\n\t}",
"public void verTablero(){\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.println(\" 1 2 3 4 5 6 \\n\");\n\t\tfor(int i = 0; i < tablero.length; i++){\n\t\t\t\n\t\t\tfor(int j = 0; j < tablero[1].length; j++){\n\t\t\t\t\n\t\t\t\tif(tablero[i][j] == 0){\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.print(\" - \");\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.print(\" \" + tablero[i][j] + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}",
"public void clearTable() {\n topLeft = new Item(0, \"blank\");\n topCenter = new Item(0, \"blank\");\n topRight = new Item(0, \"blank\");\n left = new Item(0, \"blank\");\n center = new Item(0, \"blank\");\n right = new Item(0, \"blank\");\n bottomLeft = new Item(0, \"blank\");\n bottomCenter = new Item(0, \"blank\");\n bottomRight = new Item(0, \"blank\");\n result = new Item(0, \"blank\");\n index = 0;\n }",
"public void removeAllDataCliente() {\n DefaultTableModel dm = (DefaultTableModel) table.getModel();\n dm.getDataVector().removeAllElements();\n dm.fireTableDataChanged(); // notifies the JTable that the model has changed\n }",
"public static void vaciartabla(){\n DefaultTableModel modelo=(DefaultTableModel) jtproveedores.getModel(); \n for (int i = 0; i < jtproveedores.getRowCount(); i++) {\n modelo.removeRow(i);\n i-=1;\n } \n }",
"public void showListData() {\n List<Operator> operators = operatorService.queryAll();\n String[][] datas = new String[operators.size()][8];\n for (int i = 0; i < datas.length; i++) {\n datas[i][0] = operators.get(i).getId().toString();\n datas[i][1] = operators.get(i).getName();\n datas[i][2] = operators.get(i).getSex();\n datas[i][3] = operators.get(i).getAge().toString();\n datas[i][4] = operators.get(i).getIdentityCard();\n datas[i][5] = operators.get(i).getWorkDate().toString();\n datas[i][6] = operators.get(i).getTel();\n datas[i][7] = operators.get(i).getAdmin().toString();\n }\n operatorManagetable.setModel(new DefaultTableModel(\n datas, new String[]{\"编号\", \"用户名\", \"性别\", \"年龄\", \"证件号\", \"工作时间\", \"电话号码\", \"是否为管理员\"}\n ));\n scrollPane1.setViewportView(operatorManagetable);\n }",
"public void vaciarTabla() {\n\n DefaultTableModel modelo = (DefaultTableModel) table1Calificaciones.getModel();\n int total = table1Calificaciones.getRowCount();\n for (int i = 0; i < total; i++) {\n modelo.removeRow(0);\n }\n\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n customer = guiControl.getController().getAccountControl().vecAcc.searchCustomer(Integer.parseInt(textField1.getText()));\n String valued = \"\";\n if (customer.getValued() == 1) {\n valued += \"Valued\";\n } else {\n valued += \"Regular\";\n }\n //Creates the table model so that a table can be dispalyed\n defaultTableModel = new DefaultTableModel();\n table1.setModel(defaultTableModel);\n //Sets the column names\n defaultTableModel.addColumn(\"Account Number\");\n defaultTableModel.addColumn(\"Name\");\n defaultTableModel.addColumn(\"Phone\");\n defaultTableModel.addColumn(\"Customer Type\");\n //Checks to see if a customer name exists or not. If it doeesnt exist then it shows N/A as the\n if (customer.getName().equals(\"\")) {\n defaultTableModel.addRow(new Object[]{\"N/A\", \"N/A\", \"N/A\", \"N/A\"});\n } else {\n //Otherwise gets the values from customer class, and adds them as the rows\n defaultTableModel.addRow(new Object[]{\n customer.getAccountNo(), customer.getName(), customer.getPhone(), valued\n });\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n if(e.getSource() == ingreAddB)\n {\n new AddDialog(this);\n\n\n\n\n\n\n System.out.println(\"Add\");\n }\n else if(e.getSource() == ingrePurchaseB)\n {\n int updateIndex[] = ingredientTable.getSelectedRows();\n if(updateIndex.length != 1)\n {\n JOptionPane.showMessageDialog(this, \"Please only select one item from the table.\");\n }\n\n else {\n String itemName = (String)ingredientTable.getValueAt(updateIndex[0],0);\n IngredientItem itemObj = IM.getIngredientItem(itemName);\n new PurchaseDialog(this, itemObj);\n\n System.out.println(\"purchase\");\n }\n\n }\n else if(e.getSource() == ingreRemoveB)\n {\n int removeIndex[] = ingredientTable.getSelectedRows();\n\n\n int n = removeIndex.length;\n ArrayList<String> removeNames = new ArrayList<>();\n String curr;\n for(int r = 0; r < n; r++)\n {\n System.out.println(removeIndex[r]);\n System.out.println(DTM.getValueAt(r, 0));\n curr = (String)ingredientTable.getValueAt(removeIndex[r], 0);\n removeNames.add(curr);\n }\n\n if(removeIndex.length > 0) {\n new RemoveDialog(this, removeNames);\n }\n else{\n JOptionPane.showMessageDialog(this, \"Please select at least one item in the table below.\");\n }\n\n\n }\n else if(e.getSource() == ingreUseB){\n int updateIndex[] = ingredientTable.getSelectedRows();\n if(updateIndex.length != 1)\n {\n JOptionPane.showMessageDialog(this, \"Please only select one item from the table.\");\n }\n\n else {\n String itemName = (String) ingredientTable.getValueAt(updateIndex[0], 0);\n IngredientItem itemObj = IM.getIngredientItem(itemName);\n new UseDialog(this, itemObj);\n\n }\n }\n if(e.getSource() != ingreSearchTF && !ingreSearchTF.hasBeenClickedAndFilled()){\n ingreSearchTF.reset();\n }\n\n }",
"public void llenadoDeTablas() {\n DefaultTableModel modelo = new DefaultTableModel();\n modelo.addColumn(\"ID Articulo\");\n modelo.addColumn(\"Fecha Ingreso\");\n modelo.addColumn(\"Nombre Articulo\");\n modelo.addColumn(\"Talla XS\");\n modelo.addColumn(\"Talla S\");\n modelo.addColumn(\"Talla M\");\n modelo.addColumn(\"Talla L\");\n modelo.addColumn(\"Talla XL\");\n modelo.addColumn(\"Color Articulo\");\n modelo.addColumn(\"Nombre Proveedor\");\n modelo.addColumn(\"Existencias\");\n\n RegistroArticuloDAO registroarcticuloDAO = new RegistroArticuloDAO();\n\n List<RegistroArticulo> registroarticulos = registroarcticuloDAO.select();\n TablaArticulo.setModel(modelo);\n String[] dato = new String[11];\n for (int i = 0; i < registroarticulos.size(); i++) {\n dato[0] = Integer.toString(registroarticulos.get(i).getPK_id_articulo());\n dato[1] = registroarticulos.get(i).getFecha_ingreso();\n dato[2] = registroarticulos.get(i).getNombre_articulo();\n dato[3] = registroarticulos.get(i).getTalla_articuloXS();\n dato[4] = registroarticulos.get(i).getTalla_articuloS();\n dato[5] = registroarticulos.get(i).getTalla_articuloM();\n dato[6] = registroarticulos.get(i).getTalla_articuloL();\n dato[7] = registroarticulos.get(i).getTalla_articuloXL();\n dato[8] = registroarticulos.get(i).getColor_articulo();\n dato[9] = registroarticulos.get(i).getNombre_proveedor();\n dato[10] = registroarticulos.get(i).getExistencia_articulo();\n\n //System.out.println(\"vendedor:\" + vendedores);\n modelo.addRow(dato);\n }\n }",
"public void gettableconteudo(){\n \n int selecionada = jtablearquivos.getSelectedRow();\n if (selecionada == -1) {\n JOptionPane.showMessageDialog(null,\" Arquivo não selecionado corretamente !\");\n } \n String id = jtablearquivos.getValueAt(selecionada, 0).toString();\n id1 = id;\n String titulo = jtablearquivos.getValueAt(selecionada, 1).toString();\n titulo1 = titulo;\n \n \n \n }",
"public void delete() throws Exception {\n\t\tLOGGER.info(\n\t\t\t\t\"Start of DataListTableBean:delete()\");\n\t\ttry {\n\t\t\tcomponentService.delete(data);\n\t\t\tdataList = componentService.findAllComponent();\n\t\t\t\n\t\t\tFacesMessage facesMessage = new FacesMessage(\n\t\t\t\t\tFacesMessage.SEVERITY_INFO, \"Data is Deleted\",\n\t\t\t\t\t\"Data is Deleted\");\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, facesMessage);\n\t\t\t\n\t\t\tLOGGER.info(\n\t\t\t\t\t\"End of DataListTableBean:delete()\");\t\n\t\t} catch (Exception e) {\n\t\t\tmanageError(e, \"Error while Deleting data. \");\n\t\t}\n\t}",
"private void mostrar() {\n //DefaultTableModel m = new DefaultTableModel();\n m = new DefaultTableModel(){\n @Override\n public boolean isCellEditable(int row, int column) {\n if (column==6) {\n return true;\n }else{\n return false;\n }\n }\n \n };\n tr = new TableRowSorter(m);\n m.setColumnCount(0);\n m.addColumn(\"Id\");\n m.addColumn(\"Nombre\");\n m.addColumn(\"Apellido\");\n m.addColumn(\"Direccion\");\n m.addColumn(\"Correo\");\n m.addColumn(\"Clave\");\n for (ClienteVO cvo : cdao.consultarTabla()) {\n m.addRow(new Object[]{cvo.getId_cliente(),cvo.getNombre_cliente(),cvo.getApellido_cliente(),cvo.getDireccion_cliente(),cvo.getCorreo_cliente(),cvo.getClave_cliente()});\n }\n vista.tblClientes.setModel(m);\n vista.tblClientes.setRowSorter(tr);\n }",
"private void showDeletedSnackbar() {\n Snackbar.make(parent, \"Selected \" + getTypeDescription() + \" deleted.\", Snackbar.LENGTH_LONG)\n .setAction(\"Undo\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (previouslyDeletedItems.size() > 0) {\n // Re-add the items and update the list.\n listDao.insertRows(previouslyDeletedItems);\n reloadData();\n }\n }\n })\n .show();\n }",
"public static void hapus() {\n int dump;\n System.out.print(\"Index Ke = \");\n dump = input.nextInt();\n try {\n todolist.remove(dump);\n kembali(\"Data Berhasil Hapus\");\n\n }catch (IndexOutOfBoundsException e){\n kembali(\"Index Yang Anda Input Salah\");\n }\n }",
"public String delete1() throws Exception {\r\n\t\tgetNavigationPanel(1);\r\n\t\tboolean result;\r\n\t\tExpensesCategoryModel model = new ExpensesCategoryModel();\r\n\t\tmodel.initiate(context, session);\r\n\t\t//callPage2();\r\n\t\tString[] code = request.getParameterValues(\"hdeleteCode\");\r\n\t\tresult = model.delChkdRec(expenses, code);\r\n\r\n\t\tif (result) {\r\n\r\n\t\t\taddActionMessage(getMessage(\"delete\"));\r\n\t\t\tmodel.getData(expenses, request);\r\n\t\t\texpenses.setOnLoadFlag(false);\r\n\t\t\texpenses.setPageFlag(\"true\");\r\n\t\t\treset();\r\n\t\t}\r\n\r\n\t\telse\r\n\t\t\taddActionMessage(getMessage(\"multiple.del.error\"));\r\n\t\tmodel.getData(expenses, request);\r\n\r\n\t\texpenses.setPanelFlag(\"1\");\r\n\t\texpenses.setRetrnFlag(\"view\");\r\n\r\n\t\treturn \"view\";\r\n\t}",
"public void actionPerformed(ActionEvent evt)\r\n {\n int index = tabPane.getSelectedIndex();\r\n HGTable table = (HGTable) tableVector.elementAt(index);\r\n StockDataTableModel dataModel = (StockDataTableModel) modelVector.elementAt(index);\r\n // NOTE: We do not know at this time if we were called via the\r\n // popup menu, or the Normal Top menu - And we do not know\r\n // if an action is desired on the displayed table.\r\n // However, We will grab the point and determine the row.\r\n // If the Row is less than zero attempt to get the row\r\n // from the table as possible being selected.\r\n int row = table.rowAtPoint(new java.awt.Point(popupListener.getX(), popupListener.getY()));\r\n row = (row < 0) ? ((table.getSelectedRow() >= 0) ? table.getSelectedRow() : 0) : row;\r\n\r\n /////////////////////////////////////////////////\r\n // Grab our command\r\n /////////////////////////////////////////////////\r\n String cmd = evt.getActionCommand();\r\n debug(\"Menu - Action Performed Called with command [\" + cmd + \"]\");\r\n\r\n /////////////////////////////////////////////////\r\n // Examine the options a user may have requested.\r\n // and act upon them accordingly.\r\n /////////////////////////////////////////////////\r\n if (tableProps.equals(cmd))\r\n { // Allowing for Table Control to be presented\r\n WatchListTableModule.this.showTableControl();\r\n }\r\n else if (fractionCmd.equals(cmd))\r\n { // Show Fractions\r\n com.hgutil.data.Fraction.setShowAsFraction(true);\r\n dataModel.fireTableDataChanged();\r\n }\r\n else if (decimalCmd.equals(cmd))\r\n { // Show Decimals\r\n com.hgutil.data.Fraction.setShowAsFraction(false);\r\n dataModel.fireTableDataChanged();\r\n }\r\n else if (insertBeforeCmd.equals(cmd))\r\n { // Insert a Row BEFORE selected\r\n debug(\"Insert Row Before row [\" + row + \"] The Row being inserted is \" + row);\r\n dataModel.insert(row);\r\n table.tableChanged(new TableModelEvent(dataModel, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));\r\n table.setRowSelectionInterval(row + 1, row + 1);\r\n table.repaint();\r\n StockData sd = (StockData) dataModel.getData().elementAt(row);\r\n WatchListTableModule.this.loadHistoricData(sd);\r\n }\r\n else if (insertAfterCmd.equals(cmd))\r\n { // Insert a Row AFTER selected\r\n debug(\"Insert Row After row [\" + row + \"] The Row being inserted is \" + (row + 1));\r\n dataModel.insert(row + 1);\r\n table.tableChanged(\r\n new TableModelEvent(dataModel, row + 1, row + 1, TableModelEvent.ALL_COLUMNS, TableModelEvent.INSERT));\r\n table.setRowSelectionInterval(row, row);\r\n table.repaint();\r\n StockData sd = (StockData) dataModel.getData().elementAt(row + 1);\r\n WatchListTableModule.this.loadHistoricData(sd);\r\n }\r\n else if (deleteRowCmd.equals(cmd))\r\n { // Delete the selected Row\r\n debug(\"Delete row [\" + row + \"] The Row being deleted is \" + row);\r\n if (dataModel.delete(row))\r\n {\r\n table.tableChanged(new TableModelEvent(dataModel, row, row, TableModelEvent.ALL_COLUMNS, TableModelEvent.DELETE));\r\n table.setRowSelectionInterval(row + 1, row + 1);\r\n table.repaint();\r\n }\r\n }\r\n else if (addNewWatchListCmd.equals(cmd))\r\n {\r\n debug(\"Add New WatchList Command...\");\r\n WatchListTableModule.this.addNewWatchList();\r\n }\r\n else if (deleteWatchListCmd.equals(cmd))\r\n {\r\n debug(\"Delete current WatchList Command, index = [\" + index + \"]\");\r\n WatchListTableModule.this.deleteWatchList(index);\r\n }\r\n else if (renameListCmd.equals(cmd))\r\n { // Rename the WatchList\r\n debug(\"Rename current WatchList Command, index = [\" + index + \"]\");\r\n WatchListTableModule.this.setNewTitle(index);\r\n }\r\n else if (printListCmd.equals(cmd))\r\n { // Print the WatchList\r\n debug(\"Printout current WatchList Command, index = [\" + index + \"]\");\r\n WatchListTableModule.this.printWatchList(index);\r\n }\r\n else if (viewOptionChainCmd.equals(cmd))\r\n {\r\n debug(\"View Option Chain Command, index = [\" + index + \"]\");\r\n StockData sd = (StockData) dataModel.getData().elementAt(row);\r\n WatchListTableModule.this.setDataObject(sd);\r\n WatchListTableModule.this.invokeStockMarketModule(getString(\"WatchListTableModule.view_option_chain.module_name\"));\r\n }\r\n else if (viewHistoricChartCmd.equals(cmd))\r\n {\r\n debug(\"View Option Chain Command, index = [\" + index + \"]\");\r\n StockData sd = (StockData) dataModel.getData().elementAt(row);\r\n WatchListTableModule.this.invokeHistoricChart(sd);\r\n }\r\n\r\n popupListener.resetPoints();\r\n }",
"@Override\n public String executeGui(TaskList items, Ui ui) {\n String deletedStr = \" \" + items.get(index).toString();\n items.remove(index);\n String str = Ui.showDeleteGui(items, deletedStr);\n return str;\n }",
"public VistaBorrar() throws SQLException {\n initComponents();\n Conexion.getInstance();\n \n llenarTabla();\n \n //jTable1.setModel(defaultTableModel);\n //controladorListar = new ControladorListar();\n //ArrayList<Pelicula> listPelicula=controladorListar.getListadoPeliculaEliminar();\n //Object[] fila=new Object[2];\n //for(int x=0; x<listPelicula.size(); x++){\n // fila[0]=listPelicula.get(x).getCodigo();\n // fila[1]=listPelicula.get(x).getNombre();\n // defaultTableModel.addRow(fila);\n \n }",
"@Override\n public int getRowCount() {\n return data.length-1; \n }",
"public String btn_confirm_delete_action()\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(\n getgermplasm$SementalSessionBean().getDeleteSemental());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n \n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n \n return null;\n }",
"public void fetRowList() {\n try {\n data.clear();\n if (rsAllEntries != null) {\n ObservableList row = null;\n //Iterate Row\n while (rsAllEntries.next()) {\n row = FXCollections.observableArrayList();\n //Iterate Column\n for (int i = 1; i <= rsAllEntries.getMetaData().getColumnCount(); i++) {\n row.add(rsAllEntries.getString(i));\n }\n data.add(row);\n }\n //connects table with list\n table.setItems(data);\n // cell instances are generated for Order Status column and then colored\n customiseStatusCells();\n\n } else {\n warning.setText(\"No rows to display\");\n }\n } catch (SQLException ex) {\n System.out.println(\"Failure getting row data from SQL \");\n }\n }",
"public void limpiarReporte(){\n\n\t\tmodelo.setRowCount(0);\n\n\t}",
"private void btnDelete1ActionPerformed(java.awt.event.ActionEvent evt) throws IOException {// GEN-FIRST:event_btnDelete1ActionPerformed\n\t\t// TODO add your handling code here:\n\t\tint i = tblBollard.getSelectedRow();\n\t\tif (i >= 0) {\n\t\t\tint option = JOptionPane.showConfirmDialog(rootPane, \"Are you sure you want to Delete?\",\n\t\t\t\t\t\"Delete confirmation\", JOptionPane.YES_NO_OPTION);\n\t\t\tif (option == 0) {\n\t\t\t\tTableModel model = tblBollard.getModel();\n\n\t\t\t\tString id = model.getValueAt(i, 0).toString();\n\t\t\t\tif (tblBollard.getSelectedRows().length == 1) {\n\t\t\t\t\t\n\t\t\t\t\tdelete(id,client);\n\t\t\t\t\t\n\t\t\t\t\tDefaultTableModel model1 = (DefaultTableModel) tblBollard.getModel();\n\t\t\t\t\tmodel1.setRowCount(0);\n\t\t\t\t\tfetch(client);\n\t\t\t\t\t//client.stopConnection();\n\t\t\t\t\tclear();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\talert(\"Please select a row to delete\");\n\t\t}\n\t}",
"private void hienThiDichVu() {\n DichVuService dichVuService = new DichVuService();\n dichVuModels = dichVuService.layToanBoDichVu();\n \n modelDichVu.setRowCount(0);\n if (dichVuModels != null){\n for (DichVuModel dichVuModel : dichVuModels) {\n Vector vtRow = new Vector();\n vtRow.add(dichVuModel.getMaDV());\n vtRow.add(dichVuModel.getTenDV());\n modelDichVu.addRow(vtRow);\n }\n }else{\n return;\n }\n }",
"public void listarutilizador() {\n \n \n List<Utilizador> cs =new UtilizadorJpaController().findUtilizadorEntities();\n \n DefaultTableModel tbm=(DefaultTableModel) listadeutilizador.getModel();\n \n for (int i = tbm.getRowCount()-1; i >= 0; i--) {\n tbm.removeRow(i);\n }\n int i=0;\n for (Utilizador c : cs) {\n tbm.addRow(new String[1]);\n listadeutilizador.setValueAt(c.getIdutilizador(), i, 0);\n listadeutilizador.setValueAt(c.getNome(), i, 1);\n listadeutilizador.setValueAt(c.getUtilizador(), i, 2);\n listadeutilizador.setValueAt(c.getIdprevilegio().getPrevilegio(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// Distrito di = new DistritoJpaController().getDistritoByLoc(f.getIdlocalidade());\n// Localidade lo = new LocalidadeJpaController().findLocalidade(f.getIdlocalidade());\n// listaderelatorio.setValueAt(di.getDistrito(), i, 0);//lo.getIdposto().getIddistrito().getDistrito(), i, 0);\n// listaderelatorio.setValueAt(lo.getLocalidade(), i, 1);\n \n//// listadeformando.setValueAt(f.getSexo(), i, 2);\n// listaderelatorio.setValueAt(f.getQhomem(), i, 2);\n// listaderelatorio.setValueAt(f.getQmulher(), i, 3);\n// listaderelatorio.setValueAt(f.getTotal(), i, 4);\n// \n// \n i++;\n }\n \n \n \n }",
"public void doEmptyTableList() {\n tableList.deleteList();\n }",
"public void mouseClicked(MouseEvent arg0){\n int r = table.getSelectedRow();\r\n if(r>=0){ \r\n// deletebtnButton.setEnabled(true);\r\n deletebtn.setEnabled(true); \r\n\r\n //Fetching records from Table on Fields\r\n idField.setText(\"\"+table.getModel().getValueAt(r,0));\r\n \t}\r\n }",
"public void actionPerformed(ActionEvent e) {\n\t\t\t\t Database.RemoveItem(Integer.toString(Database.IDs[table.getSelectedRow()]));\t\n\t\t\t\t Login.Refresh();\n\t\t\t }",
"private void loadAllToTable() {\n try {\n ArrayList<ItemDTO> allItems=ip.getAllItems();\n DefaultTableModel dtm=(DefaultTableModel) tblItems.getModel();\n dtm.setRowCount(0);\n \n if(allItems!=null){\n for(ItemDTO item:allItems){\n \n Object[] rowdata={\n item.getiId(),\n item.getDescription(),\n item.getQtyOnHand(),\n item.getUnitPrice()\n \n };\n dtm.addRow(rowdata);\n \n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AddItem.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n \n }",
"public void listar_mais_vendeu(String tipo_pedido){\n \n \n OrdemCorteDAO dao = new OrdemCorteDAO();\n DefaultTableModel model = (DefaultTableModel) jTable_MaisVendidas.getModel(); \n \n model.setNumRows(0);\n \n for (OrdemCorteDTO mp : dao.getMaisVendeu(tipo_pedido)) {\n \n model.addRow(new Object[]{mp.getCodigo(), mp.getTotal_vendido()});\n }\n \n \n }",
"public void doDelete() throws Exception {\r\n\t\t_ds.deleteRow();\r\n\t\tdoDataStoreUpdate();\r\n\t\tif (_mode == MODE_LIST_ON_PAGE) {\r\n\t\t\tif (_listForm != null && _listForm.getDataStore() != _ds) {\r\n\t\t\t\t//different datastores on list and detail\r\n\t\t\t\tDataStoreBuffer listDs = _listForm.getDataStore();\r\n\t\t\t\tif (_listSelectedRow != null) {\r\n\t\t\t\t\tfor (int i = 0; i < listDs.getRowCount(); i++) {\r\n\t\t\t\t\t\tif (listDs.getDataStoreRow(i, DataStoreBuffer.BUFFER_STANDARD).getDSDataRow() == _listSelectedRow.getDSDataRow()) {\r\n\t\t\t\t\t\t\tlistDs.removeRow(i);\r\n\t\t\t\t\t\t\tbreak;\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 (listDs.getRowCount() == 0)\r\n\t\t\t\t\tsetVisible(false);\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (listDs.getRow() == -1)\r\n\t\t\t\t\t\tlistDs.gotoRow(listDs.getRowCount() - 1);\r\n\t\t\t\t\t_listForm.setRowToEdit(listDs.getRow());\r\n\t\t\t\t\tdoEdit();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t//list and detail share the same datastore\r\n\t\t\t\tif (_ds.getRowCount() == 0)\r\n\t\t\t\t\tsetVisible(false);\r\n\t\t\t\telse\r\n\t\t\t\t\tscrollToMe();\r\n\t\t\t}\r\n\t\t\tsyncListFormPage();\r\n\t\t} else {\r\n\t\t\treturnToListPage(true);\r\n\t\t}\r\n\t}",
"@Override\n protected void onDataChanged() {\n if (getItemCount() == 0) {\n mAsignarPermisosRecycler.setVisibility(View.GONE);\n // mEmptyView.setVisibility(View.VISIBLE);\n } else {\n mAsignarPermisosRecycler.setVisibility(View.VISIBLE);\n //mEmptyView.setVisibility(View.GONE);\n }\n }",
"public void delete()\n\t{\n\t\t_Status = DBRowStatus.Deleted;\n\t}",
"public void DeleteData(View view) {\n View parent=(View)view.getParent();\n TextView deletedata=(TextView)parent.findViewById(R.id.tname);\n String dataString=String.valueOf(deletedata.getText());\n Integer deletedRows= help.deleteData(dataString);\n if(deletedRows > 0)\n Snackbar.make(view, \"Task Completed\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n else\n Snackbar.make(view, \"Task Not Completed\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n loadTaskList();\n }",
"protected void dataTableleibie(int i) {\n\t\r\n}"
] | [
"0.6395166",
"0.629821",
"0.62369657",
"0.6192119",
"0.59820026",
"0.5963842",
"0.5960918",
"0.58999467",
"0.5896831",
"0.5889451",
"0.58803856",
"0.58759356",
"0.5814692",
"0.5758989",
"0.573828",
"0.5733981",
"0.5725912",
"0.5705807",
"0.56834036",
"0.5678027",
"0.567419",
"0.563929",
"0.56392825",
"0.56386113",
"0.56207687",
"0.5605895",
"0.5592892",
"0.5577141",
"0.5567292",
"0.55510205",
"0.5545358",
"0.5545108",
"0.55258805",
"0.5520045",
"0.55148554",
"0.5514764",
"0.5509313",
"0.54997987",
"0.54898703",
"0.54868716",
"0.5463814",
"0.54398113",
"0.54338306",
"0.54286444",
"0.5424076",
"0.5413819",
"0.5413398",
"0.54085875",
"0.5406449",
"0.5401935",
"0.5397087",
"0.5375897",
"0.53743815",
"0.5373433",
"0.53614336",
"0.536024",
"0.53582376",
"0.5357022",
"0.5351691",
"0.53495634",
"0.53485876",
"0.5346518",
"0.53452194",
"0.53355926",
"0.53347045",
"0.53224564",
"0.53184795",
"0.53173673",
"0.53160363",
"0.5312957",
"0.53094006",
"0.5304291",
"0.5304018",
"0.530157",
"0.5300783",
"0.53007436",
"0.5298231",
"0.5298162",
"0.529556",
"0.5294106",
"0.5286004",
"0.5284519",
"0.5284368",
"0.5284323",
"0.5283403",
"0.5279227",
"0.5273826",
"0.5273653",
"0.527304",
"0.52694863",
"0.526563",
"0.5264992",
"0.52647334",
"0.52646154",
"0.52642995",
"0.526418",
"0.52637094",
"0.5261656",
"0.5259609",
"0.5258593",
"0.52552974"
] | 0.0 | -1 |
Returns true if value is contained in the table | @Override
public boolean contains(String key) {
int hashVal = hashFunc(key);
while (hashArray[hashVal] != null) {
if (hashArray[hashVal].value.equals(key))
return true;
else {
hashVal++;
hashVal = hashVal % size;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean containsValue(Object value) {\n for (LinkedList<Entry<K,V>> list : table) {\n for (Entry<K,V> entry : list) {\n if (entry.getValue().equals(value)) {\n return true;\n }\n }\n }\n return false;\n }",
"public boolean containsValue(V value) {\n\tfor(int i=0;i<this.capacity;i++) {\n\t for(MyEntry k:table[i]) {\n\t\tif(k.value.equals(value)) {\n\t\t return true;\n\t\t}\n\t }\n\t}\n\treturn false;\n }",
"public boolean containsValue(Object value) {\r\n\t\tTableEntry<K, V> currentElement = null;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (table[i] == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = table[i];\r\n\r\n\t\t\tdo {\r\n\t\t\t\tif (currentElement.value.equals(value)) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tcurrentElement = currentElement.next;\r\n\t\t\t} while (currentElement != null);\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}",
"public boolean valueExists(String tableName, String key, Object value) throws SQLException, NullPointerException {\n ResultSet rs = mysql.query(\"SELECT * FROM `\"+ tableName +\"` WHERE `\" + key + \"` LIKE '\" + value.toString() + \"'\");\n\n // Gets the next line from the table\n if(rs.next()){\n // return true if the String is available\n return rs.getString(key) != null;\n }\n\n // Value and Key are not identified\n return false;\n }",
"public boolean contains(int columnIndex, Object value) {\n return findRow(columnIndex, value) != null;\n }",
"boolean contains();",
"boolean containsValue(Object value);",
"public boolean contains(Object value) {\n\t\treturn false;\n\t}",
"public boolean contains(E value);",
"public boolean contains(T val);",
"public boolean contains(T value) {\n for (T tmp : arr) {\n if (tmp.equals(value)) {\n return true;\n }\n }\n return false;\n }",
"public boolean containsValue(Object value) {\n for (int i = 0; i < size; i++) {\n Entry entry = order[i];\n\n if (eq(value, entry.getValue())) {\n return true;\n }\n }\n\n return false;\n }",
"boolean hasContains();",
"@Override\n public boolean containsValue(Object value) {\n // Walk the values.\n for (Map.Entry<String, T> e : entries.values()) {\n if (value.equals(e.getValue())) {\n // Its there!\n return true;\n }\n }\n return false;\n }",
"@Override\n\tpublic boolean contains(Object value) {\n\t\tif (indexOf(value) != -1) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean containsValue(Object value) {\n return map.containsValue(value);\n }",
"public boolean containsValue(Object value) {\n\t\treturn false;\r\n\t}",
"public boolean contains(T value) {\n\t\tif (head.value.equals(value)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn contains(head, value);\n\t\t}\n\t}",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn map.containsValue(value);\n\t}",
"public boolean contains(U value) {\n\t\t\treturn indexOf(value) != -1;\n\t\t}",
"@Override\r\n\tpublic boolean containsValue(Object value) {\r\n\t\tif (value == null) throw new NullPointerException();\r\n\t\tfor (K key : keySet()) {\r\n\t\t\tif (get(key).equals(value)) return true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean contains(int key) {\n int hash = key % 7919;\n if (table[hash] == null)\n {\n return false;\n }\n else\n {\n ArrayList<Integer> al = table[hash].al;\n int size = al.size();\n for (int i = 0; i < size; ++i)\n {\n if (al.get(i) == key)\n {\n return true;\n }\n }\n return false;\n }\n }",
"public abstract boolean containsValue(V value);",
"@Override\n public boolean containsValue(Object value) {\n \t\n \tfor(int i=0;i<buckets.length;i++) {\n\t \tLinkedList<Entry> tempBucket = buckets[i];\n\t \t\n\t \tfor(int j=0;j<tempBucket.size();j++) {\n\t \t\tEntry tempEntry = tempBucket.get(j);\n\t \t\t\n\t \t\tif(tempEntry.getValue() == value) {\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}\n \t}\n \t\n return false;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic boolean contains(T x )\r\n\t{\r\n\t\tif (x == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tfor (int i =0; i< this.tableSize; i++)\r\n\t\t{ \r\n\t\t\tLinkedArrays<T> L = (LinkedArrays<T>) table[i]; \r\n\t\t\tboolean b = L.contains(x);\r\n\t\t\tif(b)\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public final boolean contains(StringToStringTable s)\n {\n\n for (int i = 0; i < m_firstFree; i++)\n {\n if (m_map[i].equals(s))\n return true;\n }\n\n return false;\n }",
"public boolean contains(Object value)\r\n {\r\n return contains(root, value);\r\n }",
"boolean containsValue(Object value) throws NullPointerException;",
"public boolean verifyExists(String value, String column);",
"public boolean containsValue(V value)\r\n\t{\r\n\t\tList<V> values = values();\r\n\t\t\r\n\t\tfor(V element : values)\r\n\t\t{\r\n\t\t\tif(element.equals(value))\r\n\t\t\t{\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}",
"@Override\n public boolean containsKey(Object key) {\n int index = key.hashCode() % table.length;\n if (index < 0) {\n index += table.length;\n }\n if (table[index] == null) {\n return false;\n }\n for (Entry<K,V> entry : table[index]) {\n if (entry.getKey().equals(key)) {\n return true;\n }\n }\n return false;\n }",
"public boolean contains(Comparable value)\r\n {\r\n\t\tListNode currentNode;\r\n\t\tcurrentNode = firstNode;\r\n\t\twhile (currentNode != null) {\r\n\t\t\tif (currentNode.data.equals(value)) {\r\n\t\t\t\treturn true;\r\n\t\t\t} else {\r\n\t\t\t\tcurrentNode = currentNode.next;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean contains(T value) { return root == null ? false : root.contains(value); }",
"public boolean contains(K key){\r\n int loc = find(key);\r\n if((hashTable[loc]!= null) && hashTable[loc].equals(key))\r\n return true;\r\n else\r\n return false;\r\n }",
"public boolean contains (Object item){\n\t\t// compute the hash table index\n\t\t\t\tint index = (item.hashCode() & Integer.MAX_VALUE) % table.length;\n\n\t\t\t\t// find the item and return false if item is in the ArrayList\n\t\t\t\tif (table[index].contains((T)item))\n\t\t\t\t\treturn true;\n\t\t\t\telse\n\t\t\t\t\treturn false;\n\t}",
"public boolean contains(E e) {\n int i = hash(e);\n HashNode<E> current = table[i];\n while (current != null) {\n if (current.data.equals(e)) {\n return true;\n }\n current = current.next;\n }\n return false;\n }",
"@Override public boolean containsValue(Object value) {\n if (value == null) {\n for (LinkedEntry<K, V> header = this.header, e = header.nxt;\n e != header; e = e.nxt) {\n if (e.value == null) {\n return true;\n }\n }\n return false;\n }\n\n // value is non-null\n for (LinkedEntry<K, V> header = this.header, e = header.nxt;\n e != header; e = e.nxt) {\n if (value.equals(e.value)) {\n return true;\n }\n }\n return false;\n }",
"boolean contains(KeyType key, ValueType value);",
"@Override\n\tpublic boolean contains(Object value) {\n\t\tif(indexOf(value)!=-1)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"public boolean containsValue(V value) {\r\n for (Node datum : data) {\r\n if (datum != null) {\r\n Node targetNode = datum;\r\n while (targetNode != null) {\r\n if (targetNode.value == value || targetNode.value.equals(value)) {\r\n return true;\r\n }\r\n targetNode = targetNode.next;\r\n }\r\n\r\n }\r\n }\r\n return false;\r\n }",
"public boolean contains(T value) {\n if (value == null)\n return false;\n\n Node<T> current = root;\n\n // find\n while (current != null) {\n int diff = current.data.compareTo(value);\n if (diff == 0)//when found\n return true;\n else if (diff < 0)\n current = current.right;//check right sub tree\n else\n current = current.left;//check left subtree\n }\n\n return false;//not found\n }",
"@Override\n\t\t\tpublic boolean containsValue(Object value) {\n\t\t\t\treturn false;\n\t\t\t}",
"public boolean containsValue(V value) {\r\n\t\tfor (LinkedList<KVPair> i : hashMapArray) {\r\n\t\t\tif (i!= null) {\r\n\t\t\t\tfor (int k = 0; k<i.size(); k++) {\r\n\t\t\t\t\tif (i.get(k).getValue() == value) {\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"@org.junit.Test\n public void contains() throws Exception {\n assertEquals(true, hashTable.contains(\"Blue\"));\n assertEquals(false, hashTable.contains(\"blue\"));\n }",
"public boolean contains(int key) {\n Entry tab[] = table;\n int index = (key & 0x7FFFFFFF) % tab.length;\n for (Entry e = tab[index]; e != null; e = e.next) {\n if (e.key == key) {\n return true;\n }\n }\n return false;\n }",
"public int contains(T anEntry);",
"public boolean contains(T value) {\n Node<T> cur = root;\n while (cur != null) {\n int cmp = cur.value.compareTo(value);\n\n if (cmp == 0)\n return true;\n else if (cmp < 0)\n cur = cur.right;\n else\n cur = cur.left;\n }\n return false;\n }",
"@Override\n\tpublic boolean containsValue(Object value) {\n\t\treturn false;\n\t}",
"public boolean contains (String key) {\r\n int arrIndex = hash(key);\r\n\r\n if (hashTableArray[arrIndex] == null) {\r\n hashTableArray[arrIndex] = new LinkedList<>();\r\n }\r\n\r\n for (int i = 0; i < hashTableArray[arrIndex].size(); i++) {\r\n if (hashTableArray[arrIndex].get(i).key.equals(key)){\r\n return true; // returns true when a key already exists\r\n }\r\n }\r\n return false; // returns false when a key does not yet exist\r\n }",
"public boolean lookup(String name){\n return table.containsKey(name);\n }",
"boolean hasSearchValue();",
"public boolean contains(A val) {\n return false; \n }",
"boolean contains(int value);",
"boolean contains(int value);",
"private boolean contains(List<NodeId> array, NodeId searchValue) {\n return array != null && array.contains(searchValue);\n }",
"@Override\n public boolean contains(Object object) {\n T value = (T) object;\n boolean result = false;\n for (int index = 0; index < this.values.length; index++) {\n T data = (T) this.values[index];\n if (data != null) {\n if (value.equals(data)) {\n result = true;\n }\n }\n }\n\n return result;\n }",
"public static boolean containsHashtableValue(Hashtable data) {\r\n Object[] array = data.keySet().toArray();\r\n for (int i = 0; i < array.length; i++) {\r\n if (data.get(array[i]) instanceof Hashtable) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"boolean contains(String value);",
"private boolean contains(int[] valueSet, int value) {\n\t\tfor (int i = 0; i < valueSet.length; i++) {\r\n\t\t\tif (valueSet[i] == value) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean contains(final Object value) {\n\t\tboolean found = false;\n\t\tfor (int i = 0; i < this.size; i++) {\n\t\t\tif (elements[i].equals(value)) {\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn found;\n\t}",
"boolean contains(KeyType key);",
"public boolean contains(int key) {\n\t\tint hashkey = hash(key);\n\t\treturn table[hashkey] != null && table[hashkey][pos(key)];\n\t}",
"public boolean containsValue(Object v) {\n/* 119 */ return false;\n/* */ }",
"public boolean contains(Key key);",
"public boolean contains(T anEntry) {\n\t\tfor(int i=0; i<numberOfElements; i++) {\n\t\t\tif(list[i].equals(anEntry)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(T entry) {\n return false;\n }",
"public boolean lookup(SymbolTableEntry entry) {\n return table.containsKey(entry.getName());\n }",
"public boolean contains(K key, V value) {\r\n \tCollection<V> values = get(key);\r\n \tif (values == null) { return false; }\r\n \treturn values.contains(value);\r\n }",
"boolean hasRow();",
"public static synchronized boolean exist(final Database db, final String keyValue) {\n\t\t\n\t\ttry {\n\t\t\tList<List<Object>> rows = db.executeQuery(\"select * from \" + db.getDbSchema()+ \".\" + \n\t\t\t\t\tDataTablePostalCode.Id + \" where postalId = '\" + keyValue + \"'\");\n\t\t\t\n\t\t\tif(rows.size() > 0){\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tLogger.log(DataTablePostalCode.class, e);\n\t\t} /* catch */\n\t\t\n\t\treturn false;\n\t}",
"private boolean isInRow(int row, int value) {\n for(int i = 0; i < size; i++){\n if (board[row][i] == value) return true;\n }\n return false;\n }",
"public boolean containsValue(Object value) {\r\n for (Map.Entry<K, V> pair : entrySet()) {\r\n // Optimize in case the Entry is one of our own.\r\n if (pair.getValue().equals(value) && ((CacheData<K, V>) pair).validateKey() != null) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }",
"boolean contains(int val);",
"public boolean doesContain(T t) {\n if (Arrays.asList(a).contains(t)) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean contains(String key);",
"public boolean containsKey(Object key) {\r\n\t\tif (key == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tint slotIndex = Math.abs(key.hashCode()) % table.length;\r\n\r\n\t\tif (table[slotIndex] == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tTableEntry<K, V> currentElement = table[slotIndex];\r\n\r\n\t\tdo {\r\n\t\t\tif (currentElement.key.equals(key)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = currentElement.next;\r\n\t\t} while (currentElement != null);\r\n\r\n\t\treturn false;\r\n\t}",
"public static boolean isValueContainedInColumnCSV(String value, String column, String filePath) {\n\t\tMap<String, List<String>> csvMap = buildCsvMap(filePath);\n\n\t\tif (csvMap.containsKey(column)) {\n\t\t\tfor (String columnValue : csvMap.get(column)) {\n\t\t\t\tif (columnValue.contains(value)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean contains(Object elem);",
"@Override\n\tpublic boolean contains(Type t) {\n\t\treturn true;\n\t}",
"private boolean _contains(Node node, T value) {\n if (node == null)\n return false;\n /** if the value is found */\n if (value.compareTo(node.element) == 0) {\n return true;\n }\n /** Otherwise, continue the search recursively */\n return value.compareTo(node.element) < 0 ? _contains(node.left, value) : _contains(node.right, value);\n\n }",
"public boolean contains (String key,String value)\n {\n PDFObject entry = get (key);\n if (!(entry instanceof PDFArray))\n return false;\n PDFArray array = (PDFArray) entry;\n for (int i = 0;i < array.size ();i++)\n {\n PDFObject element = array.get (i);\n if (element instanceof PDFName &&\n ((PDFName) element).getName ().equals (value))\n return true;\n }\n return false;\n }",
"@Override\r\n\t\tpublic boolean contains(E value) {\n\t\t\treturn value == null;\r\n\t\t}",
"boolean contains(String key);",
"boolean contains(String key);",
"public boolean isValueExists(String key, String value) {\n\t\tSystem.out.println(\"Checking for value : \" + value + \" existance\");\n\t\tboolean valueExist = false;\n\t\tMap<String, List<String>> dictMap = getDictionary();\n\t\tif (dictMap != null && dictMap.isEmpty() != true) {\n\t\t\tif (dictMap.containsKey(key)) {\n\t\t\t\tList<String> membersList = dictMap.get(key);\n\t\t\t\tif (membersList.contains(value))\n\t\t\t\t\tvalueExist = true;\n\t\t\t}\n\t\t}\n\t\treturn valueExist;\n\t}",
"boolean contains(T o);",
"public boolean contains(T element);",
"public boolean contains(T obj) {\r\n\t\tlogger.trace(\"Enter contains\");\r\n\t\tlogger.trace(\"Exit contains\");\r\n\t\treturn data.contains(obj);\r\n\t}",
"boolean Exists(int value) {\n\t\tNode curr = head;\n\t\twhile (curr != null) {\n\t\t\tif (curr.data == value)\n\t\t\t\treturn true;\n\t\t\tcurr = curr.next;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean contains(K value)\n {\n\tArrayList<SkipListNode<K>> pred = findPredecessors(value); //Predecessors\n\tSkipListNode<K> predNode = pred.get(0); //Predecessor at level 0\n\n\t//If the node is not the last in the list and its data is equal to value, contains is true. \n\t//If the node is the last in the list or the value after predNode does not equal value, contains must be false\n\treturn (predNode.next(0) != null) && (predNode.next(0).data().compareTo(value) == 0);\n }",
"private boolean contains(TreeNode node, Object value)\r\n {\r\n if (node == null)\r\n return false;\r\n else\r\n {\r\n int diff = ((Comparable<Object>)value).compareTo(node.getValue());\r\n if (diff == 0)\r\n return true;\r\n else if (diff < 0)\r\n return contains(node.getLeft(), value);\r\n else // if (diff > 0)\r\n return contains(node.getRight(), value);\r\n }\r\n }",
"public boolean elementOf(int value){\n for(int element = 0; element < set.length; element++){\n if(set[element] == value)\n return true; \n }\n return false;\n }",
"public boolean contains(T anEntry) {\n return binarySearch(0, length - 1, anEntry);\n }",
"public static boolean testTableGet() {\r\n try {\r\n for (int i = 0; i < 6; i++) {\r\n if (!pokemonEq(table.get(testList[i].getName()), testList[i]))\r\n return false;\r\n }\r\n } catch (NoSuchElementException e) {\r\n return false;\r\n }\r\n return true;\r\n }",
"public boolean contains(T data)\r\n {\r\n if(containsData.contains(data) == true) //Checking my hashset of data to see if our data has been inserted!\r\n return true;\r\n \r\n return false;//If we didnt find the node within our list, return false. \r\n }",
"boolean containsKey(CoreLabel key);",
"public boolean containsKey(K key) {\n int index = getIndex(getHash(key));\n Entry<K, V> entry = (Entry<K, V>) table[index];\n\n if (entry == null) {\n return false;\n }\n\n while (entry.hasNext()) {\n if (entry.getKey().equals(key))\n return true;\n entry = entry.getNext();\n }\n\n return entry.getKey().equals(key);\n }",
"public boolean containsKey(Key key) ;",
"public boolean containsKey(K key) {\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\tfor(MyEntry i:table[bucket]) {\n\t if(i.key.equals(key)) {\n\t\treturn true;\n\t }\n\t}\n\treturn false;\n }",
"public boolean containsValue(Object value)\r\n/* 391: */ {\r\n/* 392:560 */ return this.headers.containsValue(value);\r\n/* 393: */ }"
] | [
"0.7848039",
"0.77740353",
"0.7701036",
"0.7279734",
"0.71404374",
"0.70771724",
"0.69757134",
"0.6898187",
"0.6815053",
"0.67623276",
"0.6734054",
"0.67322856",
"0.6730478",
"0.67093617",
"0.6709278",
"0.66956353",
"0.6668521",
"0.6662629",
"0.6656008",
"0.66476804",
"0.66443384",
"0.66354734",
"0.6635244",
"0.66263855",
"0.6594122",
"0.65935963",
"0.65880084",
"0.65478736",
"0.65466225",
"0.65208745",
"0.65116954",
"0.6511113",
"0.65063626",
"0.64982814",
"0.6494832",
"0.6490534",
"0.64848256",
"0.6461076",
"0.6454475",
"0.64227164",
"0.6410524",
"0.6407786",
"0.6401563",
"0.63801867",
"0.63726646",
"0.6371697",
"0.63686717",
"0.6359908",
"0.635967",
"0.63506484",
"0.63435555",
"0.63363695",
"0.63200456",
"0.63200456",
"0.63051444",
"0.63006896",
"0.63004524",
"0.6290037",
"0.6270436",
"0.62704235",
"0.62678236",
"0.62651604",
"0.6244624",
"0.6216192",
"0.621058",
"0.61857885",
"0.61805874",
"0.617539",
"0.6174528",
"0.61567783",
"0.6138267",
"0.61319274",
"0.61314493",
"0.61267185",
"0.6121754",
"0.6121492",
"0.6121332",
"0.61178",
"0.61083573",
"0.6087918",
"0.60558957",
"0.6052679",
"0.6041689",
"0.6041689",
"0.6039931",
"0.6037419",
"0.6032734",
"0.60280085",
"0.6027277",
"0.60190785",
"0.6018615",
"0.6016587",
"0.60119903",
"0.60042644",
"0.5998447",
"0.5996211",
"0.5995496",
"0.59868497",
"0.5986078",
"0.5985595"
] | 0.602037 | 89 |
Returns the number of collisions in relation to insert and rehash. When rehashing process happens, the number of collisions should be properly updated. The definition of collision is "two different keys map to the same hash value." Be careful with the situation where you could over count. Try to think as if you are using separate chaining! "How would you count the number of collisions?" | @Override
public int numOfCollisions() {
return this.collision;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double collisionLength(){\n //count to keep track of how many words there are the chain\n int count = 0;\n for (int i = 0;i< tableSize;i++){\n if (hashTable[i] != null){\n LLNodeHash ptr = hashTable[i];\n //increments if there is an element\n if (ptr != null){\n count++;\n }\n //while loop to traverse the linked list\n while (ptr.getNext() != null){\n //increments for every word\n count++;\n ptr = ptr.getNext();\n }\n }\n }\n return ((double) count / (double) usedIndex);\n }",
"public int numCollisions() {\r\n int collisions = 0;\r\n for (int i = 0; i < tableSize; i++) {\r\n if (table[i].length() > 1) {\r\n collisions += table[i].length() - 1;\r\n }\r\n }\r\n return collisions;\r\n }",
"public int hashCode() {\n\t\tint h = 0, i = 0, j = count;\n\t\twhile (j-- != 0) {\n\t\t\twhile (state[i] != OCCUPIED)\n\t\t\t\ti++;\n\t\t\th += longHash2IntHash(key[i]);\n\t\t\ti++;\n\t\t}\n\t\treturn h;\n\t}",
"public void countCollisions() {\n int col2 = 0;\n int col3 = 0;\n int col4 = 0;\n int col5OrMore = 0;\n \n for (int x = 0; x < buckets.length; x++) {\n SList chain = (SList) buckets[x];\n if (chain.length() == 2) {\n col2++;\n }\n if (chain.length() == 3) {\n col3++;\n }\n if (chain.length() == 4) {\n col4++;\n }\n if (chain.length() >= 5) {\n col5OrMore++;\n }\n }\n System.out.println(\"=========HASHTABLE================\");\n System.out.println(\"# of entries: \" + size);\n System.out.println(\"Number of single collisions: \"+col2);\n System.out.println(\"Number of double collisions: \"+col3);\n System.out.println(\"Number of triple collisions: \"+col4);\n System.out.println(\"Number of 5 or more collisions: \"+col5OrMore);\n }",
"@Override\n public int hashCode() {\n int hash = size;\n for (byte key : keys) {\n // 0 can be a valid key or unused slot, but won't impact the hashcode in either case.\n // This way we can use a cheap loop without conditionals, or hard-to-unroll operations,\n // or the devastatingly bad memory locality of visiting value objects.\n // Also, it's important to use a hash function that does not depend on the ordering\n // of terms, only their values; since the map is an unordered collection and\n // entries can end up in different positions in different maps that have the same\n // elements, but with different history of puts/removes, due to conflicts.\n hash ^= hashCode(key);\n }\n return hash;\n }",
"public int hashCode() {\n\t\tint hash = 0;\n\t\tif (isGameOver()) {\n\t\t\treturn (1 + (winner() == Game.FIRST_PLAYER ? 1 : 2));\n\t\t}\n\t\thash = 4;\n\t\tfor (int i = 1; i < NUMBER_OF_MOVES; i++) {\n\t\t\thash *= 3;\n\t\t\tif (contains(moves1, i)) {\n\t\t\t\thash++;\n\t\t\t} else if (contains(moves2, i)) {\n\t\t\t\thash += 2;\n\t\t\t}\n\t\t}\n\t\treturn hash;\n\t}",
"@Override\n\t\tpublic int hashCode() {\n\t\t\treturn countMap.hashCode();\n\t\t}",
"public int reportCollisions() {\r\n\t int collisions = 0;\r\n\t List collisionList = new ArrayList();\r\n\t for(int i = 0; i < bucket.length; i++) {\r\n\t\t if(bucket[i] == null) continue;\r\n\t\t if(bucket[i].size() > 1) {\r\n\t\t\t collisions = collisions + bucket[i].size();\r\n\t\t\t Iterator it = bucket[i].iterator();\r\n\t\t\t while(it.hasNext()) {\r\n\t\t\t\t collisionList.add(it.next());\r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t //make map of hashcodes and indices of collisions\r\n\t Map m = new HashMap();\r\n\t Iterator it = collisionList.iterator();\r\n\t while(it.hasNext()) {\r\n\t\t MPair mpair = (MPair)it.next();\r\n\t\t m.put((mpair.getKey()).hashCode(), (mpair.getKey()).hashCode() % SZ);\r\n\t }\r\n\t System.out.println(\"\\nCollisions hashcodes and indices : \\n\" + m);\r\n\t System.out.println(\"\\nNumber of collisions : \\n\" + collisionList);\r\n\t // Number of collisions = number of probes\r\n\t System.out.println(\"\\nNumber of probes : \" + collisions);\r\n\t return collisions;\r\n }",
"public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }",
"public int getTotalCollisions(){\r\n return totalCollisions;\r\n }",
"@Override\r\n\tpublic int hashCode() {\r\n\t\tint hashCode = 0;\r\n\t\tfor (K key : keySet()) {\r\n\t\t\thashCode += (key.hashCode() ^ get(key).hashCode());\r\n\t\t}\r\n\t\treturn hashCode;\r\n\t}",
"public int hashCode() {\n int h = 0;\n for (int j = realSize(), i = 0, t = 0; j-- != 0; ) {\n while (((key[i]) == ((char) 0)))\n i++;\n t = (key[i]);\n t ^= (value[i]);\n h += t;\n i++;\n }\n // Zero / null keys have hash zero.\n if (containsNullKey) h += (value[n]);\n return h;\n }",
"public int hashCode() {\n return (7 + this.key.hashCode() + this.value.hashCode() / 5) \n + this.left.hashCode()\n + this.right.hashCode();\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"Count of hash collisions for the Deployment. The Deployment controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ReplicaSet.\")\n\n public Integer getCollisionCount() {\n return collisionCount;\n }",
"public int hashCode()\n {\n int i = 0;\n if ( hasHashKey() )\n i ^= getHashKey().hashCode();\n return i;\n }",
"public int hashCode(){\n \tint n = 0;\n \tfor(Iterator it = iterator(); it.hasNext();){\n \t\tObject object = it.next();\n \t\tif(object != null){\n \t\t\tn += object.hashCode();\n \t\t}\n \t}\n \treturn n;\n }",
"protected abstract int hashOfObject(Object key);",
"@Override\n\tpublic int hashCode()\n\t{\n\t\t// This is really simple, but it works... and prevents a deep hash\n\t\treturn nodeList.size() + edgeList.size() * 23;\n\t}",
"private int hash(K key) {\n return (key.hashCode() & 0x7fffffff) % keys.length;\n }",
"public int numOfHashFunctions() {\n return config().getK();\n }",
"public int hashCode() {\n return numberOfPlayers; // hashCode must not contain a field that changes regularly\n }",
"@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }",
"@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"int hashCode();",
"int hashCode();",
"@org.junit.Test\n public void size() throws Exception {\n assertEquals(3, hashTable.size());\n hashTable.put(\"math\", \"club\");\n assertEquals(3, hashTable.size());\n hashTable.put(\"input\", \"string\");\n assertEquals(4, hashTable.size());\n }",
"public int getCrossRefEntriesCount() {\n return crossRefEntriesCount;\n }",
"@Override\n public int hashCode() {\n return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());\n }",
"public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (role != null ? role.hashCode() : 0);\n return hash;\n }",
"@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\t\thash = hash * Constants.HASH_PRIME + entityInterface.hashCode();\r\n\t\treturn hash;\r\n\t}",
"int getClusteringKeyCount();",
"public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getProject());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getUser());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getStatus());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getLastActivityDate());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasPiSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasDpSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasAdminSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getHasRequestorSeen());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getEmailStatus());\n return (int)(hash % Integer.MAX_VALUE);\n }",
"public int size() { return _byHashCode.size(); }",
"public int hashcode();",
"private int hash (k key) {\n\t\treturn Math.abs(key.hashCode())\t% buckets.length;\n\t}",
"public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }",
"public int hashCode() {\n\t\treturn new HashCodeBuilder().append(obox).append(wordOffsets).append(occlusions).toHashCode();\n\t}",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 43 * hash + this.id;\n hash = 43 * hash + this.size;\n hash = 43 * hash + Objects.hashCode(this.orientation);\n hash = 43 * hash + Objects.hashCode(this.currentPosition);\n return hash;\n }",
"public int actualHashForEqual() {\n\treturn getCategory().hashForEqual() + 1;\n/*\nudanax-top.st:15776:SequenceSpace methodsFor: 'testing'!\n{UInt32} actualHashForEqual\n\t\"is equal to any basic space on the same category of positions\"\n\t^self getCategory hashForEqual + 1!\n*/\n}",
"public int hashCode() {\n // For speed, this hash code relies only on the hash codes of its select\n // and criteria clauses, not on the from, order by, or option clauses\n int myHash = 0;\n myHash = HashCodeUtil.hashCode(myHash, this.operation);\n myHash = HashCodeUtil.hashCode(myHash, getProjectedQuery());\n return myHash;\n }",
"public int hashCode()\n { \n \tint result = 17;\n \t\n \tresult = 37 * result + id;\n \tresult = 37 * result + room.hashCode();\n \tresult = 37 * result + ( isLocked ? 1 : 0 );\n \tresult = 37 * result + keyID; \t\n \t\n \treturn result;\n }",
"public int hashCode() {\n\t\treturn hash(objects); //return the hash code of the objects\n\t}",
"int getNumberOfDetectedDuplicates();",
"@Override\n public int hashCode() {\n final int prime = 31;\n int result = 1;\n result = prime\n * result\n + ((electionStatus == null) ? 0 : electionStatus.ordinal() + 10);\n result = prime * result + followerCount;\n result = prime * result + (int) (latestTxId ^ (latestTxId >>> 32));\n result = prime * result + onDiskTx;\n return result;\n }",
"@Override\n\tpublic int hash(K key)\n\t{\n\t\treturn (key.hashCode() & 0x7fffffff) % M;\n\t}",
"public int hashCode()\n {\n int i = 0;\n if ( hasBatchId() )\n i ^= getBatchId().hashCode();\n if ( hasNestId() )\n i ^= getNestId().hashCode();\n return i;\n }",
"private int hash(Key key) {\n\t\treturn (key.hashCode() & 0x7fffffff) % M;\n\t}",
"int hash(final K key);",
"@Override\n public int hashCode()\n {\n if ( h == 0 )\n {\n rehash();\n }\n\n return h;\n }",
"@Override\r\n\tpublic int hashCode()\r\n\t{\r\n\t\tint hash = 1;\r\n\r\n\t\tif (containingExpression != null)\r\n\t\t{\r\n\t\t\thash = hash & Constants.HASH_PRIME + containingExpression.hashCode();\r\n\t\t}\r\n\r\n\t\tif (conditions != null)\r\n\t\t{\r\n\t\t\thash = hash * Constants.HASH_PRIME + new HashSet<ICondition>(conditions).hashCode();\r\n\t\t}\r\n\r\n\t\treturn hash;\r\n\t}",
"public int hashCode() {\n int hash = 104473;\n if (token_ != null) {\n // Obtain unencrypted form as common base for comparison\n byte[] tkn = getToken();\n for (int i=0; i<tkn.length; i++)\n hash ^= (int)tkn[i];\n }\n hash ^= (type_ ^ 14401);\n hash ^= (timeoutInterval_ ^ 21327);\n hash ^= (isPrivate() ? 15501 : 12003);\n if (getPrincipal() != null)\n hash ^= getPrincipal().hashCode();\n if (getSystem() != null)\n hash ^= getSystem().getSystemName().hashCode();\n return hash;\n }",
"public int hashCode()\r\n/* */ {\r\n/* 89 */ int hash = 3;\r\n/* 90 */ hash = 19 * hash + Objects.hashCode(this.id);\r\n/* 91 */ return hash;\r\n/* */ }",
"public int getKeyCount() {\n return associationCountMap.size();\n }",
"@Override\r\n public int getSize()\r\n {\r\n return keyHash.size();\r\n }",
"private int hash(T t) {\n int code = t.hashCode();\n return code % Table.size();\n }",
"public int hashCode() {\n long hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getProjectName());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getDataProvider());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getPrimaryInvestigator());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCodeFK(getCreatedBy());\n hash = hash * UtilConstants.HASH_PRIME + objectHashCode(getCreatedTime());\n return (int)(hash % Integer.MAX_VALUE);\n }",
"public int getNumberOfEquivalenceClasses() {\n return hashTableElementCount;\n }",
"public abstract int hashCode();",
"protected int hashOfObject(Object key) {\n\t\t\treturn set.hashOfObject(key);\n\t\t}",
"@Override\r\n public int hashCode()\r\n {\r\n if(this.isEmpty()) return 0;\r\n\r\n /**\r\n * En este caso es recomendable usar la funcion Arrays.hashCode porque\r\n * garantiza un hash unico para cada array.\r\n * Si se usa la suma, los objetos \"ab\" y \"ba\" tendrian el mismo hash.\r\n */\r\n return Arrays.hashCode(this.table);\r\n }",
"private int hashOf(String key) {\n return key.length();\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}",
"public int hashCode()\n {\n return hash;\n }",
"@javax.annotation.Nullable\n @ApiModelProperty(value = \"collisionCount is the count of hash collisions for the StatefulSet. The StatefulSet controller uses this field as a collision avoidance mechanism when it needs to create the name for the newest ControllerRevision.\")\n\n public Integer getCollisionCount() {\n return collisionCount;\n }",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 71 * hash + this.id;\n hash = 71 * hash + Objects.hashCode(this.name);\n hash = 71 * hash + Objects.hashCode(this.cash);\n hash = 71 * hash + Objects.hashCode(this.skills);\n hash = 71 * hash + Objects.hashCode(this.potions);\n return hash;\n }",
"protected int myhash(T x)\r\n\t{\r\n\t\tint hashVal = x.hashCode( );\r\n\t\thashVal %= tableSize;\r\n\t\tif( hashVal < 0 )\r\n\t\t\thashVal += tableSize;\r\n\t\treturn hashVal;\r\n\t}",
"@Override\n public int hashCode() {\n int result = fullwidth.hashCode();\n result = 31 * result + halfwidth.hashCode();\n return result;\n }",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }",
"void assertTotalCntEquals(T key, int expected);",
"@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn key.hashCode() * 31 + value.hashCode();\n\t\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\tint result=1,prime=31;\r\n\t\tresult = result * prime + tableName.hashCode();\r\n\t\tresult = result * prime + databaseName.hashCode();\r\n\t\tresult = result * prime + limit;\r\n\t\tresult = result * prime + offset;\r\n\t\tresult = result * prime + queryCondition.hashCode();\r\n\t\treturn result;\r\n\t}",
"public int hashCode() {\n int hash = UtilConstants.HASH_INITIAL;\n hash = hash * UtilConstants.HASH_PRIME + (userId != null ? userId.hashCode() : 0);\n hash = hash * UtilConstants.HASH_PRIME + (projectId != null ? projectId.hashCode() : 0);\n return hash;\n }",
"private int hash(E e) {\n return Math.abs(e.hashCode()) % table.length;\n }",
"@Override\n public final int hashCode() {\n int acc = 0;\n for (E e : this) {\n if (e != null) {\n acc += e.hashCode();\n }\n }\n return acc;\n }",
"@Override\r\n public int hashCode() {\n int key=(Integer)(this.capsule.get(0)); // Get the key\r\n Integer bkey=Integer.parseInt(Integer.toBinaryString(key)); // Convert into binary \r\n int n=setcount(bkey); //counts the number of 1's in the binary\r\n key=key*n + Objects.hashCode(this.capsule.get(0)); //multiplies that with the hashcode of the pId\r\n return key;\r\n }",
"public int hashCode() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[28]++;\r\n long start = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[29]++;\r\n long end = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[30]++;\r\n int result = 97;\r\n result = 31 * result + ((int) (start ^ (start >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[31]++;\r\n result = 31 * result + ((int) (end ^ (end >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[32]++;\r\n result = 31 * result + getChronology().hashCode();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[33]++;\r\n return result;\r\n }",
"@Override\n public int hashCode() {\n Integer s_int = new Integer(\"223\");\n int result = Objects.hashCode(valueOf(sideLengthA));\n result = (31 * result) + Objects.hashCode(valueOf(sideLengthB));\n result = (31 * result) +Objects.hashCode(valueOf(sideLengthC));\n return result;\n }",
"public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }",
"@Override\n public int hashCode(\n ) {\n \tint h = hash;\n \tif (h == 0 && size > 0) {\n \t\th = 31 * parent.hashCode() + base.hashCode();\n \t\tif(! isPlaceHolder()) {\n \t\t\thash = h;\n \t\t}\n \t}\t\n return h;\n }",
"public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }",
"private static void testRendezvousHashing() {\n Map<String, AtomicInteger> HRWNodesMap = Maps.newHashMap();\r\n List<String> HRWNodes = Lists.newArrayList();\r\n for(int i = 0 ; i < nodesCount; i ++) {\r\n HRWNodes.add(\"HRWNode\"+i);\r\n HRWNodesMap.put(\"HRWNode\"+i, new AtomicInteger());\r\n }\r\n RendezvousHashing<String, String> hrw = new RendezvousHashing(charsFunnel, charsFunnel, HRWNodes);\r\n \r\n // insert keys\r\n long startTime = System.currentTimeMillis();\r\n for(int i = 0 ; i < keyCount; i++) {\r\n HRWNodesMap.get(hrw.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n long endTime = System.currentTimeMillis();\r\n long timeElapsed = endTime - startTime;\r\n // System.out.println(\"Execution Time in milliseconds : \" + timeElapsed);\r\n \r\n\r\n // print out distriubution + clear\r\n for(Entry<String, AtomicInteger> entry : HRWNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n entry.getValue().set(0);\r\n }\r\n\r\n // remove node 3\r\n System.out.println(\"\\n=== After Removing Node 3 ===\");\r\n hrw.removeNode(\"HRWNode3\");\r\n HRWNodesMap.remove(\"HRWNode3\");\r\n\r\n // re-add\r\n for(int i = 0 ; i < keyCount; i++) {\r\n HRWNodesMap.get(hrw.getHash(\"\"+i)).incrementAndGet();\r\n }\r\n\r\n // print out distriubution again\r\n for(Entry<String, AtomicInteger> entry : HRWNodesMap.entrySet()) {\r\n System.out.println(entry.getKey() + \": \" + entry.getValue().get());\r\n }\r\n }",
"@Override\n public int hashCode() {\n return Objects.hash(myInt, myLong, myString, myBool, myOtherInt);\n }",
"private int hash(K key) {\n return (key.hashCode() & 0x7fffffff) % capacity;\n }",
"@Override\n public int hashCode() {\n return new HashCodeBuilder(17, 37)\n .append(level)\n .append(bosses)\n .append(time)\n .toHashCode();\n }",
"private void rehash() {\n\t\tint oldSize = this.size;\n\t\tint newSize = size * 2;\n\t\twhile (!isPrime(newSize))\n\t\t\tnewSize++;\n\t\tthis.size = newSize;\n\t\tDataItem[] newHashArray = new DataItem[newSize];\n\t\tString temp;\n\t\tthis.collision = 0;\n\t\tBoolean repeatValue;\n\t\tfor (int i = 0; i < oldSize; i++) {\n\t\t\tif (hashArray[i] != null && hashArray[i] != deleted)\n\t\t\t\ttemp = hashArray[i].value;\n\t\t\telse\n\t\t\t\tcontinue;\n\t\t\trepeatValue = false;\n\t\t\tint hashVal = hashFunc(temp);\n\t\t\tboolean collisionFlag = false;\n\t\t\twhile (newHashArray[hashVal] != null\n\t\t\t\t\t&& !newHashArray[hashVal].value.equals(deleted.value)) {\n\n\t\t\t\tif (!collisionFlag) {\n\n\t\t\t\t\tthis.collision++;\n\t\t\t\t\tcollisionFlag = true;\n\n\t\t\t\t}\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\n\t\t\t}\n\t\t\tif (repeatValue)\n\t\t\t\tcontinue;\n\t\t\telse {\n\t\t\t\tnewHashArray[hashVal] = hashArray[i];\n\t\t\t}\n\t\t}\n\n\t\tthis.hashArray = newHashArray;\n\t}",
"@Override\r\n\tpublic int size() {\r\n\t\treturn keySet().size();\r\n\t}",
"public int hashCode() {\n return Objects.hashCode(this);\n }",
"@Override\n public final int hashCode ()\n {\n int hash = 5;\n hash = 37 * hash + this.serialPollStatusByte;\n hash = 37 * hash + Objects.hashCode (this.errorInt);\n return hash;\n }",
"@Override public int hashCode() {\n\t\t// for details on the use of result and prime below, see Effective Java, 2E, page 47-48\n\t\tint result = 7; // arbitrary number\n\t\tint prime = 31; // this ensures order matters\n\t\t\n\t\t// factor in each field used in the equals method\n\t\tresult = prime * result + numerator;\n\t\tresult = prime * result + denominator;\n\t\t\n\t\treturn result;\n\t}",
"@Override\n public int hashCode() {\n // Declare hash and assign value\n int hash = 7;\n // Generate hash integer\n hash = 31 * hash + (int) this.getCrossingTime();\n hash = 31 * hash + (this.getName() == null ? 0 : this.getName().hashCode());\n return hash;\n }",
"@Override\n public int hashCode() {\n int result = table1.hashCode();\n result = 31 * result + table2.hashCode();\n return result;\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn getKey() != null ? getKey().hashCode() : 0;\n\t}",
"public int hash(Key key) {\n\t\treturn (key.hashCode() & 0x7FFFFFFF) % this.capacity;\n\t}",
"public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}",
"public int nextHashForEqual() {\n\t/* This actually needs to roll over the UInt32 limit. */\n\tmyCount = myCount + 1;\n\treturn myCount;\n/*\nudanax-top.st:16757:FakePacker methodsFor: 'shepherds'!\n{UInt32} nextHashForEqual\n\t\"Shepherds use a sequence number for their hash. Return the next one\n\t and increment. This should actually spread the hashes.\"\n\t\"This actually needs to roll over the UInt32 limit.\"\n\tmyCount _ myCount + 1.\n\t^ myCount!\n*/\n}",
"@Override\n public int hashCode() {\n return hash(this.getCoordinate(), this.getSide());\n }"
] | [
"0.65878165",
"0.6561125",
"0.6440728",
"0.6383598",
"0.6343925",
"0.6280659",
"0.6275627",
"0.62302357",
"0.6189843",
"0.6146221",
"0.61083806",
"0.6093392",
"0.60242504",
"0.60086286",
"0.599118",
"0.597796",
"0.59694445",
"0.59420735",
"0.5933409",
"0.5919773",
"0.59159386",
"0.5910955",
"0.5874979",
"0.58518344",
"0.58518344",
"0.58518344",
"0.58518344",
"0.58386964",
"0.58386964",
"0.58352184",
"0.5830079",
"0.5809189",
"0.57987523",
"0.5797405",
"0.5797156",
"0.5792731",
"0.579253",
"0.5790354",
"0.57901543",
"0.5788928",
"0.5788848",
"0.5749682",
"0.57462543",
"0.57439256",
"0.57218534",
"0.5715358",
"0.57111704",
"0.5704458",
"0.5700075",
"0.56988704",
"0.5697558",
"0.5696385",
"0.56957597",
"0.5688969",
"0.56886435",
"0.56743395",
"0.5672723",
"0.5672687",
"0.567084",
"0.56685436",
"0.56643015",
"0.56638986",
"0.5661879",
"0.5658933",
"0.5655555",
"0.5635201",
"0.5625421",
"0.56214213",
"0.5612765",
"0.56125903",
"0.56090814",
"0.5606591",
"0.55954367",
"0.5590623",
"0.55888647",
"0.55859846",
"0.5575725",
"0.55658066",
"0.5554818",
"0.55507445",
"0.55465215",
"0.5542503",
"0.5540376",
"0.55390495",
"0.55277956",
"0.55259556",
"0.5525265",
"0.55190945",
"0.5516734",
"0.5512656",
"0.5507345",
"0.5507214",
"0.550607",
"0.55056614",
"0.5502033",
"0.5496019",
"0.54925805",
"0.54921746",
"0.54914725",
"0.5485498"
] | 0.6541205 | 2 |
Returns the hash value of a String | @Override
public int hashValue(String value) {
return hashFunc(value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static int stringHash(String str) {\r\n return str.hashCode();\r\n }",
"public static final String hash(final String string) {\n\t\treturn Hex.fromByteArray(digest(string));\n\t}",
"public static long stringHashCode(String string){\r\n\t\t// return number value if number, otherwise use string hash code\r\n\t\tboolean isNumber = true;\r\n\t\tfor(int i = 0; i < string.length(); i++){\r\n\t\t\tif(i == 0 && string.charAt(i) == '-') continue;\r\n\t\t\tif(Character.isDigit(string.charAt(i)) == false){\r\n\t\t\t\tisNumber = false;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(isNumber){\r\n\t\t\ttry{\r\n\t\t\t\treturn Long.parseLong(string);\r\n\t\t\t} catch(NumberFormatException ex){\r\n\t\t\t\t// not a number, do nothing\r\n\t\t\t}\r\n\t\t}\r\n\t\tlong h = 0;\r\n\t\tfor (int i = 0; i < string.length(); i++) {\r\n\t\t\th = 31*h + string.charAt(i);\r\n\t\t}\r\n\t\treturn h;\r\n\t}",
"public static String hash(String in) {\r\n\t\treturn DigestUtils.md5Hex(in.getBytes());\r\n\t}",
"String getHash();",
"String getHash();",
"String hash(String input) throws IllegalArgumentException, EncryptionException;",
"public static String GetHash(String input)\n {\n String hash = DigestUtils.sha1Hex(input);\n System.out.println(hash);\n return hash;\n }",
"@Override\n\tpublic int hash(String str) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tint temp = (int) str.charAt(i);\n\t\t\tresult += (temp * (Math.pow(37, i)));\n\t\t}\n\t\treturn result;\n\t}",
"public int hashCode(String s){\r\n int length = s.length();\r\n int h = 0;\r\n for(int i = 0; i < length; i++){\r\n h = h + ((int)s.indexOf(i))*(37^(length - 1));\r\n }\r\n return h;\r\n }",
"public static String hash(String s) {\n try {\n return hash(s, \"SHA-1\");\n } catch (NoSuchAlgorithmException ex) {\n return Exceptions.chuck(ex);\n }\n }",
"public long ELFHash(String str) {\n\t\tlong hash = 0;\n\t\tlong x = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = (hash << 4) + str.charAt(i);\n\n\t\t\tif ((x = hash & 0xF0000000L) != 0) {\n\t\t\t\thash ^= (x >> 24);\n\t\t\t}\n\t\t\thash &= ~x;\n\t\t}\n\n\t\treturn hash;\n\t}",
"private int hash(String string) {\n\t\tint hash = 0;\n\t\tint temp = 0;\n\n\t\tfor (byte b : string.toLowerCase().getBytes(StandardCharsets.US_ASCII)) {\n\t\t\thash = (hash << 4) + b;\n\t\t\ttemp = hash & 0xF0000000;\n\n\t\t\tif (temp != 0) {\n\t\t\t\thash = hash ^ (temp >>> 24);\n\t\t\t\thash = hash ^ temp;\n\t\t\t}\n\t\t}\n\n\t\treturn hash;\n\t}",
"public long BPHash(String str) {\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = hash << 7 ^ str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}",
"public static String hash(String st) {\r\n MessageDigest messageDigest = null;\r\n byte[] digest = new byte[0];\r\n\r\n try {\r\n messageDigest = MessageDigest.getInstance(\"SHA-256\");\r\n messageDigest.reset();\r\n messageDigest.update(st.getBytes());\r\n digest = messageDigest.digest();\r\n } catch (NoSuchAlgorithmException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n BigInteger bigInt = new BigInteger(1, digest);\r\n StringBuilder hex = new StringBuilder(bigInt.toString(16));\r\n\r\n while (hex.length() < 32) {\r\n hex.insert(0, \"0\");\r\n }\r\n\r\n return hex.toString();\r\n }",
"public long JSHash(String str) {\n\t\tlong hash = 1315423911;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash ^= ((hash << 5) + str.charAt(i) + (hash >> 2));\n\t\t}\n\n\t\treturn hash;\n\t}",
"public static int randomHashOfString(String s)\r\n\t{\r\n\t\tBigInteger hash=FNV64INIT;\r\n\t\tfor(int j=0;j<s.length();j++)\r\n\t\t{\r\n\t\t\thash=hash.xor(BigInteger.valueOf(s.charAt(j)));\r\n\t\t\thash=hash.multiply(FNV64PRIME).mod(TWO.pow(64));\r\n\t\t}\r\n\t\treturn hash.intValue();\r\n\t}",
"public static long hash(String stringToHash) {\n byte[] data;\n try {\n data = stringToHash.getBytes(\"UTF-8\");\n long h = HSTART;\n final long hmult = HMULT;\n final long[] ht = byteTable;\n for (int len = data.length, i = 0; i < len; i++) {\n h = (h * hmult) ^ ht[data[i] & 0xff];\n }\n return h;\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n throw new AssertionError(\"Hash failures on encoding\");\n }\n }",
"private int getHash(String word){\n\t\tif (word == null){\n\t\t\treturn INVALID;\n\t\t}\n\n\t\tint hash = 52;\n\t\tif ((word.charAt(0) >= 'a') && (word.charAt(0) <= 'z')){\n\t\t\thash = word.charAt(0) - 'a';\n\t\t}\n\t\telse if ((word.charAt(0) >= 'A') && (word.charAt(0) <= 'Z')){\n\t\t\thash = word.charAt(0) - 'A' + 26;\n\t\t}\n\t\treturn hash;\n\t}",
"public static String hash(String token){\n return Integer.toString( token.hashCode() );\n }",
"int hash(String makeHash, int mod);",
"public long SDBMHash(String str) {\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = str.charAt(i) + (hash << 6) + (hash << 16) - hash;\n\t\t}\n\n\t\treturn hash;\n\t}",
"public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }",
"public int hashCode(String str) {\n\t\tchar[] s = str.toCharArray();\n\t\tint total = 1;\n\t\tfor (char value : s) {\n\t\t\ttotal = 34 * total + value;\n\t\t}\n\t\ttotal = Math.abs(total);\n\t\tif(HashTester.useJavaAPIForHashCodeFunction)\n\t\t\ttotal = Math.abs(str.hashCode());\n\t\twhile (total > HashTester.hashTableSize) {\n\t\t\ttotal %= HashTester.hashTableSize;\n\t\t}\n\t\treturn total;\n\t}",
"public long APHash(String str) {\n\t\tlong hash = 0xAAAAAAAA;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tif ((i & 1) == 0) {\n\t\t\t\thash ^= ((hash << 7) ^ str.charAt(i) * (hash >> 3));\n\t\t\t} else {\n\t\t\t\thash ^= (~((hash << 11) + str.charAt(i) ^ (hash >> 5)));\n\t\t\t}\n\t\t}\n\n\t\treturn hash;\n\t}",
"public static String getHashString(String inputString) {\n MessageDigest md;\n byte[] hash;\n try {\n md = MessageDigest.getInstance(\"MD5\");\n } catch (java.security.NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n try {\n hash = md.digest(inputString.getBytes(\"UTF-8\"));\n } catch (java.io.UnsupportedEncodingException e) {\n throw new RuntimeException(e);\n }\n StringBuilder sb = new StringBuilder();\n for(byte b : hash){\n sb.append(String.format(\"%02x\", b & 0xff));\n }\n return sb.toString();\n }",
"public long DEKHash(String str) {\n\t\tlong hash = str.length();\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = ((hash << 5) ^ (hash >> 27)) ^ str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}",
"public int hash(String item);",
"public int hashCode() {\n\t\treturn hashString.hashCode();\n\t}",
"public static String urlHash(String s) {\n try {\n return urlHash(s, \"SHA-1\");\n } catch (NoSuchAlgorithmException ex) {\n return Exceptions.chuck(ex);\n }\n }",
"private String getHash(String text) {\n\t\ttry {\n\t\t\tString salt = new StringBuffer(this.email).reverse().toString();\n\t\t\ttext += salt;\n\t\t\tMessageDigest m = MessageDigest.getInstance(\"MD5\");\n\t\t\tm.reset();\n\t\t\tm.update(text.getBytes());\n\t\t\tbyte[] digest = m.digest();\n\t\t\tBigInteger bigInt = new BigInteger(1, digest);\n\t\t\tString hashedText = bigInt.toString(16);\n\t\t\twhile (hashedText.length() < 32) {\n\t\t\t\thashedText = \"0\" + hashedText;\n\t\t\t}\n\t\t\treturn hashedText;\n\t\t} catch (Exception e) {\n\t\t\te.getStackTrace();\n\t\t\treturn text;\n\t\t}\n\t}",
"public String getHash(String str) throws Exception{\n\t\t\n\t\tMessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(str.getBytes());\n \n byte byteData[] = md.digest();\n \n //convert the byte to hex format method 1\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < byteData.length; i++) {\n sb.append(Integer.toString((byteData[i] & 0xff) + 0x100, 16).substring(1));\n }\n \n String hex = sb.toString();\n System.out.println(hex);\n return hex; \n}",
"public String getHashValue() {\n\t\tif(hash == null || hash.equals(\"\")){\n\t\t\tthis.calculateHashValue();\n\t\t}\n\t\treturn hash;\n\t}",
"private int hashFunc(String input) {\n\t\tBigInteger value = BigInteger.valueOf(0);\n\t\tBigInteger k2 = new BigInteger(\"27\");\n\t\tchar c = input.charAt(0);\n\t\tlong i1 = (int) c - 96;\n\t\tBigInteger k1 = new BigInteger(\"0\");\n\t\tk1 = k1.add(BigInteger.valueOf(i1));\n\t\tvalue = k1;\n\n\t\tfor (int i = 1; i < input.length(); i++) {\n\n\t\t\tchar c2 = input.charAt(i);\n\n\t\t\tvalue = value.multiply(k2);\n\n\t\t\tlong i2 = (int) c2 - 96;\n\t\t\tBigInteger k3 = new BigInteger(\"0\");\n\t\t\tk3 = k3.add(BigInteger.valueOf(i2));\n\n\t\t\tvalue = value.add(k3);\n\n\t\t}\n\t\tBigInteger size = new BigInteger(\"0\");\n\t\tsize = size.add(BigInteger.valueOf(this.size));\n\t\tvalue = value.mod(size);\n\n\t\treturn value.intValue();\n\t}",
"public String doHash(String str) {\n String key = \"\";\n int offset = str.charAt(0) - 'a';\n for (int i=0; i<str.length(); i++) {\n char res = str.charAt(i) - offset;\n if (res < 'a') res += 26;\n key += res;\n }\n return key;\n }",
"@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}",
"private String reallyComputeHash(String s) {\n // Computes the crypto hash of string s, in a web-safe format.\n try {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n digest.update(s.getBytes());\n digest.update(\"My secret key\".getBytes());\n byte[] md = digest.digest();\n // Now we need to make it web safe.\n String safeDigest = Base64.encodeToString(md, Base64.URL_SAFE);\n return safeDigest;\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return \"\";\n }",
"@Override\n public int getHash(String name) {\n int x = 0;\n int sum = 0;\n while (x < name.length()) {\n sum += name.charAt(x);\n x++;\n }\n int result = sum % size;\n return result;\n }",
"public static String calcHash(String input) {\n try {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(input.toLowerCase().getBytes(\"UTF8\"));\n byte[] digest = md.digest();\n StringBuilder sb = new StringBuilder();\n for (byte b : digest) {\n sb.append(hexDigit(b>>4));\n sb.append(hexDigit(b));\n }\n return sb.toString();\n } catch (Exception ex) {\n throw new RuntimeException(ex.getMessage(), ex);\n }\n }",
"int getHash();",
"public String getHash(String password) {\n return DigestUtils.sha256Hex(password);\n }",
"public BigInteger hash(String element)\n\t{ \n\t\treturn (BigInteger.valueOf(element.hashCode())).mod(modulus);\n\t}",
"public long PJWHash(String str) {\n\t\tlong BitsInUnsignedInt = (long) (4 * 8);\n\t\tlong ThreeQuarters = (long) ((BitsInUnsignedInt * 3) / 4);\n\t\tlong OneEighth = (long) (BitsInUnsignedInt / 8);\n\t\tlong HighBits = (long) (0xFFFFFFFF) << (BitsInUnsignedInt - OneEighth);\n\t\tlong hash = 0;\n\t\tlong test = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = (hash << OneEighth) + str.charAt(i);\n\n\t\t\tif ((test = hash & HighBits) != 0) {\n\t\t\t\thash = ((hash ^ (test >> ThreeQuarters)) & (~HighBits));\n\t\t\t}\n\t\t}\n\n\t\treturn hash;\n\t}",
"public static long hashName(String name) {\n\t\t\tlong res = 123;\n\t\t\tfor (int i = 0; i < name.length(); ++i) {\n\t\t\t\tres = (res << 8) | (res >>> 56);\n\t\t\t\tres += name.charAt(i);\n\t\t\t\tif ((res & 1) == 0) {\n\t\t\t\t\tres ^= 0x00000000feabfeabL; // Some kind of feedback\n\t\t\t\t}\n\t\t\t}\n\t\t\tres |= 0x8000000000000000L; // Make sure the hash is negative (to distinguish it from database id's)\n\t\t\treturn res;\n\t\t}",
"public static byte[] hash(final String str)\n {\n return sha256.digest(Objects.requireNonNull(str).getBytes(StandardCharsets.UTF_8));\n }",
"public long DJBHash(String str) {\n\t\tlong hash = 5381;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = ((hash << 5) + hash) + str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}",
"public MD5Hash(String s) {\n\t\tif(s.length() != 32) throw new IllegalArgumentException(\"Hash must have 32 characters\");\n\t\thashString = s;\n\t}",
"String getHashAlgorithm();",
"public long FNVHash(String str) {\n\t\tlong fnv_prime = 0x811C9DC5;\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash *= fnv_prime;\n\t\t\thash ^= str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}",
"private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }",
"public String getHashValue() {\n return hashValue;\n }",
"@Override\n\tpublic int hash(String item) {\n\t\tlong hashCode = 0l;\n\t\tchar[] c = item.toCharArray();\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\thashCode += c[i] * Math.pow(31, c.length - (i + 1));\n\t\t}\n\t\tint i = (int) hashCode % 2147483647;\n\n\t\n\t\treturn Math.abs(i);\n\t\t\n\t}",
"com.google.protobuf.ByteString getHash();",
"com.google.protobuf.ByteString getHash();",
"public String getSHA(String input) {\n byte[] messageDigest = md.digest(input.getBytes());\n String padding = \"00000000000000000000000000000000\";\n String returnValue;\n\n // Convert byte array into signum representation\n BigInteger no = new BigInteger(1, messageDigest);\n\n // Convert message digest into hex value\n String hashtext = no.toString(16);\n\n // pad with zeros of not long enough\n if (hashtext.length() < 32) {\n returnValue = padding.substring(0, 32-hashtext.length()) + hashtext;\n } else {\n returnValue = hashtext;\n }\n\n return returnValue;\n }",
"String hashPassword(String password);",
"public String hashfunction(String password)\r\n\t{\r\n\t\t\r\n\t\tMessageDigest md=null;\r\n\t\ttry {\r\n\t\t\tmd = MessageDigest.getInstance(\"SHA-1\");\r\n\t\t} catch (NoSuchAlgorithmException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tmd.update(password.getBytes());\r\n\t\tbyte[] hash=md.digest();\r\n\t\tchar[] hexArray = \"0123456789ABCDEF\".toCharArray();\r\n\t\tchar[] hexChars = new char[hash.length * 2];\r\n\t for ( int j = 0; j < hash.length; j++ ) \r\n\t {\r\n\t int v = hash[j] & 0xFF;\r\n\t hexChars[j * 2] = hexArray[v >>> 4];\r\n\t hexChars[j * 2 + 1] = hexArray[v & 0x0F];\r\n\t }\r\n\t String hash_password=new String(hexChars);\r\n\t hash_password=hash_password.toLowerCase();\r\n\t return hash_password;\r\n\t}",
"public String hashStringToSha256(String string) {\n\n byte[] hash = sha256encriptor().digest(string.getBytes(StandardCharsets.UTF_8));\n\n BigInteger number = new BigInteger(1, hash);\n\n // Convert message digest into hex value\n StringBuilder hexString = new StringBuilder(number.toString(16));\n\n // Pad with leading zeros\n while (hexString.length() < 32)\n {\n hexString.insert(0, '0');\n }\n\n return hexString.toString();\n }",
"public int hash(String key){\r\n\t\tint i;\r\n\t\tint v = 0;\r\n\t\tfor(i = 0; i < key.length(); i++)\r\n\t\t\tv += key.charAt(i);\r\n\t\treturn v % M;\r\n\t}",
"public int hashFunction(String s){\r\n int hashcode = hashCode(s);\r\n int index = hashcode % capacity;\r\n return index;\r\n }",
"String getSaltedHash();",
"public static BigInteger hashOf(String entity) {\n\t\tMessageDigest md = null;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// we use MD5 with 128 bits digest\n\t\tbyte[] entityByte = entity.getBytes();\n\n\t\t// compute the hash of the input 'entity'\n\t\tbyte[] digest = md.digest(entityByte);\n\t\t\n\t\t// convert the hash into hex format\n\t\tString hex = toHex(digest);\n\n\t\t// convert the hex into BigInteger\n\t\thashint = new BigInteger(hex, 16);\n\t\t\n\t\t// return the BigInteger\n\t\t\n\t\treturn hashint;\n\t}",
"public long BKDRHash(String str) {\n\t\tlong seed = 131; // 31 131 1313 13131 131313 etc..\n\t\tlong hash = 0;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash = (hash * seed) + str.charAt(i);\n\t\t}\n\n\t\treturn hash;\n\t}",
"public String getHash()\n {\n return hash;\n }",
"public static String getHash(String password) {\n String hashedPassword = null;\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n byte[] digest = md.digest(password.getBytes());\n hashedPassword = org.apache.commons.codec.binary.Base64.encodeBase64String(digest);\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n return hashedPassword;\n }",
"private int hashOf(String key) {\n return key.length();\n }",
"java.lang.String getHashData();",
"public static String hash(String password) {\n\t MessageDigest sha256;\n\t\ttry {\n\t\t\tsha256 = MessageDigest.getInstance(\"SHA-256\");\n\t\t byte[] passBytes = password.getBytes();\n\t\t byte[] passHash = sha256.digest(passBytes);\n\t\t return new String(passHash, \"UTF-8\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t\treturn null;\n\t}",
"static String hashSource(String source) {\n if (!source.endsWith(\"/\")) {\n source += \"/\";\n }\n Matcher m = Pattern.compile(\".+[/]([^/]+)[/]?\").matcher(source);\n BigInteger hash;\n try {\n hash = new BigInteger(1, MessageDigest.getInstance(\"SHA-1\").digest(source.getBytes(\"UTF-8\")));\n } catch (Exception x) {\n throw new AssertionError(x);\n }\n return String.format(\"%040X%s\", hash, m.matches() ? \"-\" + m.group(1) : \"\");\n }",
"int toHashKey(String s)\n\t{\n\t\tint A = 1952786893;\n\t\tint B = 367257;\n\t\tint v = B;\n\t\tfor (int j = 0; j < s.length(); j++)\n\t\t{\n\t\t\tchar c = s.charAt(j);\n\t\t\tv = A * (v + (int) c + j) + B;\n\t\t}\n\n\t\tif (v < 0) v = -v;\n\t\treturn v;\n\t}",
"public static String hashString(String textToHash) {\n String saltedText = SALT + textToHash;\n return generateHash(saltedText);\n }",
"public String getHash() {\n return hash;\n }",
"public String getHash() {\n return hash;\n }",
"public String getHash() {\n return hash;\n }",
"public String getHash() {\n return hash;\n }",
"public static String hash(String password){\r\n\t\t try {\r\n\t MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\r\n\t md.update(password.getBytes(\"UTF-8\")); \r\n\t byte[] digest = md.digest();\r\n\t \r\n\t BigInteger bigInt = new BigInteger(1, digest);\r\n\t StringBuffer sb = new StringBuffer();\r\n\t for (int i = 0; i < digest.length; i++) {\r\n\t String hex = Integer.toHexString(0xff & digest[i]);\r\n\t if (hex.length() == 1) sb.append('0');\r\n\t sb.append(hex);\r\n\t }\r\n\t System.out.println(sb.toString());\r\n\t return sb.toString();\r\n\t \r\n\t } catch (Exception ex) {\r\n\t System.out.println(ex.getMessage());\r\n\t \r\n\t }\r\n\t\t return null;\r\n\t}",
"public String getHash() {\n\t\treturn hash;\n\t}",
"static String hash(String motDePasse) {\n\t\tString encoded = null;\n\t\ttry {\n\t MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n\t byte[] hashInBytes = md.digest(motDePasse.getBytes(StandardCharsets.UTF_8));\n\n\t\t\t// bytes to hex\n\t StringBuilder sb = new StringBuilder();\n\t for (byte b : hashInBytes) {\n\t sb.append(String.format(\"%02x\", b));\n\t }\n\t encoded = sb.toString();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn encoded;\n\n\t\t\n\t}",
"public static double computeHash(String pattern)\n\t{\n\t\tfinal int BASE = 101;\n\t\tint power = pattern.length() - 1;\n\t\tdouble newHash = 0;\n\n\t\tfor(int i = 0; i < pattern.length(); i++)\n\t\t{\n\t\t\tnewHash += pattern.charAt(i) * Math.pow(BASE, power);\n\t\t}\n\n\t\treturn newHash;\n\t}",
"public Sha256Hash(String hexString) {\n checkArgument(hexString.length() == 64);\n this.bytes = Hex.decode(hexString);\n }",
"public String getHashString()\n\t{\n\t\treturn md5.getHashString();\n\t}",
"static String hashURL(String url){\n\t\treturn url.replace('/', 's').replace(':','c');\n\t}",
"@SuppressWarnings(\"WeakerAccess\")\n abstract public int hash(char c);",
"public static String hashPassword(String password) {\n String passwordHash = null;\n try {\n // Calculate hash on the given password.\n MessageDigest sha256 = MessageDigest.getInstance(\"SHA-256\");\n byte[] hash = sha256.digest(password.getBytes());\n\n // Transform the bytes (8 bit signed) into a hexadecimal format.\n StringBuilder hashString = new StringBuilder();\n for (int i = 0; i < hash.length; i++) {\n /*\n Format parameters: %[flags][width][conversion]\n Flag '0' - The result will be zero padded.\n Width '2' - The width is 2 as 1 byte is represented by two hex characters.\n Conversion 'x' - Result is formatted as hexadecimal integer, uppercase.\n */\n hashString.append(String.format(\"%02x\", hash[i]));\n }\n passwordHash = hashString.toString();\n Log.d(TAG, \"Password hashed to \" + passwordHash);\n } catch (NoSuchAlgorithmException e) {\n Log.d(TAG, \"Couldn't hash password. The expected digest algorithm is not available.\");\n }\n return passwordHash;\n }",
"private static String HashIt(String token) {\n\t\tStringBuffer hexString = new StringBuffer();\n\t\ttry {\n\t\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\n\t\t\tbyte[] hash = digest.digest(token.getBytes(StandardCharsets.UTF_8));\n\t\t\t\n\t\t\t// Convert to hex\n\t\t for (int i = 0; i < hash.length; i++) {\n\t\t\t String hex = Integer.toHexString(0xff & hash[i]);\n\t\t\t if(hex.length() == 1) {\n\t\t\t \thexString.append('0');\n\t\t\t }\n\t\t\t hexString.append(hex);\n\t\t }\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tSystem.err.println(e.getStackTrace());\n\t\t\thexString.setLength(0);\n\t\t}\n\t return hexString.toString();\t\t\n\t}",
"@Override\r\n\tpublic String hashFunction(String saltedPass) throws NoSuchAlgorithmException\r\n\t{\r\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\r\n\t\tbyte[] byteHash = digest.digest(saltedPass.getBytes(StandardCharsets.UTF_8));\r\n\t\thash = DatatypeConverter.printBase64Binary(byteHash);\r\n\t\treturn hash;\r\n\t}",
"public static String getHashFromUrl(String url) {\n int pos = url.indexOf('#');\n if (pos > 0) {\n return url.substring(pos + 1);\n } else {\n return \"\";\n }\n }",
"private static String hashSHA256(String input) throws TokenManagementException {\n\t\t\n\t\tMessageDigest md;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"SHA-256\");\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\tthrow new TokenManagementException(ErrorMessage.sha256AlgorithmNotFound);\n\t\t}\n\t\t\n\t\t\n\t\tmd.update(input.getBytes(StandardCharsets.UTF_8));\n\t\tbyte[] digest = md.digest();\n\n\t\t// Beware the hex length. If MD5 -> 32:\"%032x\", but for instance, in SHA-256 it should be \"%064x\" \n\t\tString result = String.format(\"%64x\", new BigInteger(1, digest));\n\t\t\n\t\treturn result;\n\t\t\n\t}",
"public String doHash2(String str) {\n if(str.length() == 1) return \"-1\";\n\n String key = \"\";\n for (int i = 0; i < str.length() - 1; i++) {\n int val = str.charAt(i + 1) - str.charAt(i);\n if (val < 0) val = 26 + val;\n key += val + \"_\";\n }\n return key;\n }",
"public String hashing(String password) {\n\n\t\tString hashedPassword = null;\n\n\t\tMessageDigest md;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\n\t\t\tmd.update(password.getBytes());\n\t\t\tbyte[] digest = md.digest();\n\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\tfor (byte b : digest) {\n\t\t\t\tsb.append(String.format(\"%02x\", b & 0xff));\n\t\t\t}\n\t\t\thashedPassword = sb.toString();\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn hashedPassword;\n\t}",
"public String getHash(final String password) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n final MessageDigest digest = MessageDigest.getInstance(\"MD5\");\n byte[] md5hash;\n digest.update(password.getBytes(\"utf-8\"), 0, password.length());\n md5hash = digest.digest();\n return convertToHex(md5hash);\n }",
"public byte[] getHash(String keyString, String hashAlg) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n\t\tMessageDigest md = MessageDigest.getInstance(hashAlg);\n\n\t\tmd.update(keyString.getBytes(\"UTF-8\")); \n\t\tbyte[] keyHash = md.digest();\n\t\treturn keyHash;\n\t}",
"public static String createHash(String str) {\n return encrypt(str);\n }",
"public abstract int getHash();",
"public static int hash(String key) {\n int result = 1;\n\n for (int i=0; i<key.length(); ++i) {\n char c = key.charAt(i);\n int c_int = (int) c; //Gjør om ved å bruke ascii-tabellen ('A' = 65, ...\n\n result = (result*31) + c_int;\n }\n\n if (result < 0) {\n result = result * -1;\n }\n\n return result;\n }",
"public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"public String getHash() {\n\t\treturn _hash;\n\t}",
"public static String hashPassword(String input) {\n\t\tStringBuilder hash = new StringBuilder();\n\n\t\ttry {\n\t\t\tMessageDigest sha = MessageDigest.getInstance(\"SHA-1\");\n\t\t\tbyte[] hashedBytes = sha.digest(input.getBytes());\n\t\t\tchar[] digits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n\t\t\t\t\t'a', 'b', 'c', 'd', 'e', 'f' };\n\t\t\tfor (int idx = 0; idx < hashedBytes.length;idx++) {\n\t\t\t\tbyte b = hashedBytes[idx];\n\t\t\t\thash.append(digits[(b & 0xf0) >> 4]);\n\t\t\t\thash.append(digits[b & 0x0f]);\n\t\t\t}\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// handle error here.\n\t\t}\n\n\t\treturn hash.toString();\n\n\t\t\n\t}",
"public static String hash(String data) {\n\t MessageDigest md;\n\t\ttry {\n\t\t\tmd = MessageDigest.getInstance(\"MD5\");\n\t\t md.update(data.getBytes());\n\t\t byte[] digest = md.digest();\n\t\t char[] HEX_ARRAY = \"0123456789ABCDEF\".toCharArray();\n\t char[] hexChars = new char[digest.length * 2];\n\t for (int j = 0; j < digest.length; j++) {\n\t int v = digest[j] & 0xFF;\n\t hexChars[j * 2] = HEX_ARRAY[v >>> 4];\n\t hexChars[j * 2 + 1] = HEX_ARRAY[v & 0x0F];\n\t }\n\t return new String(hexChars);\n\t\t} catch (NoSuchAlgorithmException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n return null;\n\t}",
"public int hashCode() {\n/* 389 */ return this.m_str.hashCode();\n/* */ }"
] | [
"0.76360583",
"0.76004016",
"0.74794495",
"0.74531597",
"0.74361724",
"0.74361724",
"0.74139684",
"0.74117726",
"0.73611206",
"0.73438865",
"0.72990483",
"0.72954667",
"0.7292722",
"0.72729105",
"0.72580236",
"0.7248244",
"0.7177267",
"0.7147718",
"0.7114761",
"0.7073197",
"0.7026207",
"0.70117664",
"0.70083296",
"0.7005916",
"0.700255",
"0.6991429",
"0.696572",
"0.6960009",
"0.6925718",
"0.6922653",
"0.6846318",
"0.6761391",
"0.67324513",
"0.6709572",
"0.6708607",
"0.6682614",
"0.66815054",
"0.667631",
"0.6668777",
"0.6661975",
"0.6658741",
"0.663063",
"0.66268635",
"0.66045517",
"0.6601016",
"0.65969247",
"0.6590622",
"0.6587474",
"0.656624",
"0.6528086",
"0.6513241",
"0.6508506",
"0.6480039",
"0.6480039",
"0.64589125",
"0.6446849",
"0.64442927",
"0.64272577",
"0.6411797",
"0.63940716",
"0.63907826",
"0.63860273",
"0.637441",
"0.63538975",
"0.63488585",
"0.6335831",
"0.6332184",
"0.63217",
"0.6318847",
"0.6315161",
"0.6312661",
"0.6304962",
"0.6304962",
"0.6304962",
"0.62938595",
"0.62833875",
"0.62748766",
"0.62419987",
"0.6232601",
"0.6231429",
"0.6222341",
"0.62128145",
"0.6196922",
"0.6180639",
"0.6168327",
"0.61528",
"0.61430424",
"0.6140815",
"0.61347705",
"0.6124125",
"0.6121557",
"0.6115283",
"0.61134255",
"0.6107777",
"0.6106657",
"0.6101799",
"0.609457",
"0.60795647",
"0.60706216",
"0.6067786"
] | 0.6968384 | 26 |
Returns the frequency of a key String | @Override
public int showFrequency(String key) {
int hashVal = hashFunc(key);
while (hashArray[hashVal] != null) {
if (hashArray[hashVal].value.equals(key))
return hashArray[hashVal].frequency;
else {
hashVal++;
hashVal = hashVal % size;
}
}
return 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Integer getFrequency(String key) {\n\t\t\n\t\ttry{\n\t\t\tif(key != null && key.trim().length() > 0)\n\t\t\t\tfrequencyMap.put(key.toString().toLowerCase(), WordplayUtil.getCount(key.toString().toLowerCase(), frequencyMap) + 1);\n\t\t\t\n\t\t\treturn WordplayUtil.getCount(key.toString().toLowerCase(), frequencyMap);\n\t\t}catch(Exception e){\n\t\t\t\n\t\t}\n\t\treturn 1;\n\t}",
"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 }",
"Integer countForKey(String key);",
"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}",
"java.lang.String getFrequency();",
"public static int keyCount(String getString, char getKeyChar)\n {\n //Checks for key character in original string\n int i = 0, keyCount = 0;\n while ( i < getString.length())\n {\n if (getString.charAt(i) == getKeyChar)\n {\n keyCount++;\n i++;\n }\n else if (getString.charAt(i) != getKeyChar)\n {\n i++;\n }\n }\n System.out.print(\"\\r# \" + getKeyChar + \"s: \");\n return keyCount;\n }",
"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 }",
"int[] buildFrequencyTable(String s)\n{\n int[] table = new int [Character.getNumericValue('z') - Character.getNumericValue('a') + 1];\n for (char c : s.toCharArray())\n {\n int x = getCharNumber(c);\n if (x != -1) table[x]++;\n }\n return table;\n}",
"private static double freqOfKey(int index) {\n return 440 * Math.pow(2, (double) (index - 12) / 24);\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 }",
"private int hashOf(String key) {\n return key.length();\n }",
"public static void getOccuringChar(String inPutString) {\n HashMap<Character, Integer> charCountMap = new HashMap<Character, Integer>();\n /* converting given string to char Array*/\n char[] strArray = inPutString.toCharArray();\n /*Checking each char in strArray*/\n for (char c : strArray) {\n if (charCountMap.containsKey(c)) {\n //If char 'c' is present in charCountMap, incrementing it's count by 1\n charCountMap.put(c, charCountMap.get(c) + 1);\n } else {\n /*If char 'c' is not present in charCountMap,putting 'c' into charCountMap with 1 as it's value\n */\n charCountMap.put(c, 1);\n }\n }\n /*Printing input String*/\n System.out.println(\"The frequency of Character is \" + charCountMap);\n }",
"long getUsesCount(K key);",
"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 int hash(String key){\r\n\t\tint i;\r\n\t\tint v = 0;\r\n\t\tfor(i = 0; i < key.length(); i++)\r\n\t\t\tv += key.charAt(i);\r\n\t\treturn v % M;\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}",
"@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 }",
"public int fs(String s) {\n char min = 'z', current;\n int frequency = 0;\n for (int i = 0; i < s.length(); i++){\n current = s.charAt(i);\n if (current < min) {\n min = current;\n frequency = 1;\n } else if (current == min) frequency++;\n }\n return frequency;\n }",
"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 String res= freqAlphabets( \"10#11#12\");\n System.out.println(res);\n }",
"int getFreq();",
"public static char getMaxFreq(String str){\n HashMap<Character,Integer> map=new HashMap<>();\n for(int i=0;i<str.length();i++){\n char cc=str.charAt(i);\n if(map.containsKey(cc)){\n int oldValue=map.get(cc);\n int newValue=oldValue+1;\n map.put(cc,newValue);\n }else{\n map.put(cc,1);\n }\n }\n char maxChar='\\0';\n int max=0;\n Set<Map.Entry<Character,Integer>> entries=map.entrySet();\n for(Map.Entry<Character,Integer> entry:entries){\n if(entry.getValue()>max){\n max=entry.getValue();\n maxChar=entry.getKey();\n }\n }\n return maxChar;\n }",
"private static Map<Character, Integer> createKey(String subString) {\n Map map = new HashMap<Character, Integer>();\n for (int i = 0; i < subString.length(); i++) {\n Character c = subString.charAt(i);\n\n if (map.containsKey(c)) {\n int count = (int) map.get(c);\n map.put(c, ++count);\n } else {\n map.put(c, 1);\n }\n }\n return map;\n }",
"int count(String s) {\r\n\t\tif (m_words.containsKey(s)) {\r\n\t\t\treturn m_words.get(s);\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"private static void charCount(String str) {\n\t\t\n\t\tHashMap<Character, Integer> mp = new HashMap<Character, Integer>();\n\t\t\n\t\tchar[] cr=str.toCharArray();\n\t\t\n\t\tSystem.out.println(cr);\n\t\t\n\t\tfor(char c: cr) {\n\t\t\t\n\t\t\tif(mp.containsKey(c)) {\n\t\t\t\tmp.put(c, mp.get(c)+1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tmp.put(c, 1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tfor(Map.Entry<Character, Integer> ent: mp.entrySet()) {\n\t\t\tSystem.out.println(ent.getKey() + \" \" + ent.getValue());\n\t\t}\n\t\t\n\t}",
"private Integer getNoOfOccurences(String key) {\n\t\ttry {\n\t\t\tif (key != null && key.trim().length() > 0){\n\t\t\t\tInteger noOfOccurences = DataLoader.data.get(key.toString().trim().toLowerCase());\n\t\t\t\tif(noOfOccurences != null)\n\t\t\t\t\treturn noOfOccurences;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn 0;\n\t}",
"public int hash1 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal += key.charAt(i);\n \n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0 ;\n }\n\n }",
"private static String frequencySort(String s) {\n if (s == null || s.isEmpty()) { return s; }\n\n int[] freq = new int[256];\n for (char c : s.toCharArray()) {\n freq[c]++;\n }\n\n PriorityQueue<Pair<Character, Integer>> pq = new PriorityQueue<>((a, b) -> b.getValue() - a.getValue());\n for (int i = 0; i < freq.length; i++) {\n if (freq[i] == 0) { continue; }\n Pair<Character, Integer> pair = new Pair<>((char) (i), freq[i]);\n pq.offer(pair);\n }\n\n StringBuilder sb = new StringBuilder();\n while (!pq.isEmpty()) {\n Pair<Character, Integer> pair = pq.poll();\n for (int i = 0; i < pair.getValue(); i++) {\n sb.append(pair.getKey());\n }\n }\n return sb.toString();\n }",
"@Override\n\tpublic int countKey(String key) {\n\t\treturn settingDao.countKey(key);\n\t}",
"@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\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 Map<String, Integer> wordCount(String string) {\n\t\t// TODO Write an implementation for this method declaration\n\t\tString foundword = \"\";\n\t\tstring = string.replaceAll(\"\\n\",\"\");\n\t\tMap<String, Integer> WordCountMap = new HashMap<>();\n\t\tList<String> stringList = new ArrayList<String>();\n\t\tfor(int i = 0; i < string.length(); i++) {\n\t\t\t//System.out.println(string.charAt(i));\n\t\t\t\n\t\t\tif(string.charAt(i) == ' ') {\n\t\t\t\tstringList.add(foundword);\n\t\t\t\tfoundword = \"\";\n\t\t\t}\n\t\t\telse if(string.charAt(i) == ',') {\n\t\t\t\tstringList.add(foundword);\n\t\t\t\tfoundword = \"\";\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\tfoundword = foundword + string.charAt(i);\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tstringList.add(foundword);\n\t\t\n\t\tfor(String name: stringList) {\n\t\t\tif(WordCountMap.containsKey(name)) {\n\t\t\t\t//The frequencyMap already contains the count for this name;\n\t\t\t\t//So we want to increase that count by 1\n\t\t\t\tint currentCount = WordCountMap.get(name);\n\t\t\t\tWordCountMap.put(name, currentCount+1);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tWordCountMap.put(name, 1); //Track the name with a count of 1 if we haven't seen it before\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\treturn WordCountMap;\n\t}",
"float getFrequency();",
"int getStrValuesCount();",
"public static void main(String[] args) {\n\t\tString str=\"aabcccccaaaa\";\n\t\tString str2=\"\";\n\t\tint freq=1;\n\t\tfor(int i=0;i<str.length()-1;i++){\n\t\t\tif(str.charAt(i)==str.charAt(i+1)){\n\t\t\t\tfreq++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstr2=str2+str.charAt(i)+freq;\n\t\t\t\tfreq=1;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(str2+str.charAt(str.length()-1)+freq);\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tString s1=\"Hi Hello\";\n\t\tfrequent(s1);\n//\t\tchar ch[] = s1.toCharArray();\n//\t\tchar ch1;\n//\t\tchar ch2[]=new char[10];\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\tSystem.out.println(ch[i]);\n//\t\t}\n//\t\t\n//\t\tfor(int i=0;i<ch.length;i++) {\n//\t\t\t\n//\t\t\tint count=1;\n//\t\t\tfor(int j=i+1;j<ch.length;j++) {\n//\t\t\t\t\n//\t\t\t\tif(ch[i]==ch[j]) {\n//\t\t\t\t\t\n//\t\t\t\t\tcount++;\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}System.out.println(\"Count of \"+ch[i]+\"=\"+count);\n//\t\t}\n\t\t\n\t\t\n\t\n\n\t}",
"static int sherlockAndAnagrams(String s) {\n int anagramCount = 0;\n Map<String, Integer> map = new HashMap<>();\n for (int i = 0; i < s.length(); i++) {\n for (int k = i + 1; k <= s.length(); k++) {\n String sub = s.substring(i, k);\n System.out.println(sub);\n sub = new String(sort(sub.toCharArray()));\n int value = map.getOrDefault(sub, 0);\n if(value > 0) {\n anagramCount = anagramCount + value;\n }\n map.put(sub, value+1);\n\n }\n }\n return anagramCount;\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 static ArrayList<Integer> findAnagrams(String s, String p) {\r\n\t \t \r\n\t \t //write your code here\r\n\t\t if(s.length()<p.length()) {\r\n\t\t\t ArrayList<Integer> arr = new ArrayList<>();\r\n\t\t\t return arr;\r\n\t\t }\r\n\t\t ArrayList<Integer> result = new ArrayList<>();\r\n\t\t HashMap<Character,Integer> P = new HashMap<>();\r\n\t\t HashMap<Character,Integer> H = new HashMap<>();\r\n\t\t \r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = p.charAt(i);\r\n\t\t\t if(!P.containsKey(ch)) {\r\n\t\t\t\t P.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t P.put(ch,P.get(ch)+1);\r\n\t\t\t }\r\n\t\t }\r\n\t\t int start =0;\r\n\t\t int end=0;\r\n\t\t int mcount=0;\r\n\t\t for(int i=0;i<p.length();i++) {\r\n\t\t\t char ch = s.charAt(i);\r\n\t\t\t if(!H.containsKey(ch)) {\r\n\t\t\t\t H.put(ch,1);\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t H.put(ch,H.get(ch)+1);\r\n\t\t\t }\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t if(P.get(ch)>=H.get(ch)) {\r\n\t\t\t\t\t mcount++;\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t end=i;\r\n\t\t }\r\n\t\t if(mcount==p.length()) {\r\n\t\t\t result.add(start);\r\n\t\t }\r\n\t\t while(end<s.length()-1) {\r\n\t\t\t char ch=s.charAt(start);\r\n\t\t\t int hfreq = H.get(ch)-1;\r\n\t\t\t H.put(ch,hfreq);\r\n\t\t\t if(H.get(ch)==0) {\r\n\t\t\t\t H.remove(ch);\r\n\t\t\t }\r\n\t\t\t int pfreq=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreq=P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreq<pfreq) {\r\n\t\t\t\t mcount--;\r\n\t\t\t }\r\n\t\t\t ch=s.charAt(end+1);\r\n\t\t\t int hfreqend=0;\r\n\t\t\t if(H.containsKey(ch)) {\r\n\t\t\t\t hfreqend = H.get(ch);\r\n\t\t\t }\r\n\t\t\t hfreqend++;\r\n\t\t\t H.put(ch, hfreqend);\r\n\t\t\t int pfreqend=0;\r\n\t\t\t if(P.containsKey(ch)) {\r\n\t\t\t\t pfreqend = P.get(ch);\r\n\t\t\t }\r\n\t\t\t if(hfreqend<=pfreqend) {\r\n\t\t\t\t mcount++;\r\n\t\t\t }\r\n\t\t\t start++;\r\n\t\t\t end++;\r\n\t\t\t if(mcount==p.length()) {\r\n\t\t\t\t result.add(start);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t }\r\n\t\t return result;\r\n\t\t \r\n\t \t \r\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}",
"int getKeySize();",
"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 }",
"static int calculateKey(String findStr) {\n\t\tint key = 0;\n\t\tint n = findStr.length();\n\t\tint j = 0;\n\t\tfor (int i = n; i > 0; i--) {\n\t\t\tkey += ((int)Math.pow(3, i - 1) * Integer.parseInt(\"\" + findStr.charAt(j)));\n\t\t\tj++;\n\t\t}\n\t\treturn key;\n\t}",
"@Override\n\tpublic int hash(String str) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tint temp = (int) str.charAt(i);\n\t\t\tresult += (temp * (Math.pow(37, i)));\n\t\t}\n\t\treturn result;\n\t}",
"public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"long getMessageFrequency();",
"public static int hash(String key) {\n int result = 1;\n\n for (int i=0; i<key.length(); ++i) {\n char c = key.charAt(i);\n int c_int = (int) c; //Gjør om ved å bruke ascii-tabellen ('A' = 65, ...\n\n result = (result*31) + c_int;\n }\n\n if (result < 0) {\n result = result * -1;\n }\n\n return result;\n }",
"public int count(String word);",
"public int count(String st) {\n\t\tboolean ans = Search(st);\n\t\tif (ans) {\n\t\t\tint stIndex = table[hashFunction(st,m)].indexOf(st);\n\t\t\tint count = table[hashFunction(st,m)].get(stIndex).GetCount();\n\t\t\treturn count;\n\n\t\t} else\n\t\t\treturn 0;\n\t}",
"public char getKeycount(int val)\n\t{\n\t\treturn key[val];\n\t}",
"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 }",
"int sizeOfKeyArray();",
"private int hash1(K key) {\n int h = 0;\n int seed = 31;//素数\n String s = key.toString();\n for (int i = 0; i != s.length(); ++i) {\n h = seed * h + s.charAt(i);\n }\n return h % length;\n }",
"public void getOccuringChar() \n\t\t {\n\t\t \tint count[] = new int[MAX_CHAR]; \n\t\t \t \n\t\t int len = str.length(); \n\t\t \n\t\t // Initialize count array index \n\t\t for (int i = 0; i < len; i++) \n\t\t count[str.charAt(i)]++; \n\t\t \n\t\t // Create an array of given String size \n\t\t char ch[] = new char[str.length()]; \n\t\t for (int i = 0; i < len; i++) { \n\t\t ch[i] = str.charAt(i); \n\t\t int find = 0; \n\t\t for (int j = 0; j <= i; j++) { \n\t\t \n\t\t // If any matches found \n\t\t if (str.charAt(i) == ch[j]) \n\t\t find++; \n\t\t } \n\t\t \n\t\t if (find == 1) \n\t\t System.out.println(\"Number of Occurrence of \" + \n\t\t str.charAt(i) + \" is:\" + count[str.charAt(i)]); \n\t\t } \n\t\t }",
"private double calIDF(String key) throws IOException {\n\t\tList<String> in = FileHelper.readFile(Constants.inputpath);\r\n\t\tint doccount=0;\r\n\t\tfor(String line:in){\r\n\t\t\tString[] l = line.split(\" \");\r\n\t\t\tfor(String word:l){\r\n\t\t\t\tif (word.equals(key)){\r\n\t\t\t\t\tdoccount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble idf=Math.log((double)in.size()/doccount);\r\n\t\treturn idf;\r\n\t}",
"public static int counts(String symbols, Map<Character, Integer> counts) {\n\t\tint total = 0;\n\t\tSet<Character> set = new HashSet<Character>();\n\t\tfor (int i=0; i<symbols.length(); i++) {\n\t\t\tchar ch = symbols.charAt(i);\n\t\t\tif (set.contains(ch)) continue;\n\t\t\ttotal += counts.get(ch);\n\t\t\tset.add(ch);\n\t\t}\n\t\treturn total;\n\t}",
"int getNumKeys();",
"static int sherlockAndAnagrams(String s) {\n int total = 0;\n for (int width = 1; width <= s.length() - 1; width++) {\n\n for(int k = 0 ;k <= s.length() - width; k++){\n\n String sub = s.substring(k, k + width);\n\n int[] subFreq = frequenciesOf(sub);\n for (int j = k + 1; j <= s.length() - width; j++) {\n String target = s.substring(j, j + width);\n if (areAnagrams(subFreq,frequenciesOf(target))) total = total + 1;\n }\n }\n }\n return total;\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 }",
"@Test\n\tpublic static void main() {\n\t\tSystem.out.println(Stringcount2(\"reddygaru\"));\n\t}",
"public int doCount(String s){\r\n\t\tint count = 0;\r\n\t\tint i;\r\n\t\tfor(i = 0; i < s.length(); i++){\r\n\t\t\tif ( s.charAt(i) == Letter )\r\n\t\t\t\tcount++;\r\n\t\t}\r\n\t\t\r\n\t\treturn count;\r\n\t\t\r\n\t}",
"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}",
"public int count( K key ) {\n Integer i = map.get( key );\n return i == null ? 0 : i;\n }",
"static void getCharCountArray(String str) {\n for (int i = 0; i < str.length(); i++)\n count[str.charAt(i)]++;\n }",
"HashMap<Character, Integer> countCharacter(char[] array) {\n\t\tHashMap<Character, Integer> hm = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (hm.containsKey(array[i]))\n\t\t\t\thm.put(array[i], hm.get(array[i]) + 1);\n\n\t\t\telse\n\t\t\t\thm.put(array[i], 1);\n\t\t}\n\t\treturn hm;\n\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 }",
"static int sherlockAndAnagrams(String s) {\n HashTable hashTable = new HashTable(s.length() * s.length() * 4);\n substrings(s).map(Solution::ordered).forEach(hashTable::insert);\n return substrings(s).map(Solution::ordered).mapToInt(s1 -> {\n hashTable.remove(s1);\n return hashTable.count(s1);\n }).sum();\n }",
"public Map<String, Integer> wordCount(String[] strings) {\n Map <String, Integer> map = new HashMap();\n int counter = 1;\n for (String s: strings){\n if (map.containsKey(s)){\n counter = map.get(s);\n map.put(s, counter + 1);\n }else{\n counter = 1;\n map.put(s, counter);\n }\n }\n return map;\n}",
"public static HashMap<String, Integer> countOccurences(ArrayList<String> arr) {\n arr = toSortedString(arr);\n HashMap<String, Integer> hash = new HashMap();\n for(String str :arr){\n if(hash.containsKey(str)){\n hash.replace(str, hash.get(str)+1);\n }\n else{\n hash.put(str,1);\n }\n }\n return hash;\n }",
"static int getKey(String raw) {\n\t\tint key = 0;\n\t\tfor (int i = 0; i < raw.length(); i++) {\n\t\t\tkey = key * HASH_VALUE + raw.charAt(i);\n\t\t}\n\t\tif (key < 0) {\n\t\t\tkey = -key;\n\t\t}\n\t\treturn key % HASH_SIZE;\n\t}",
"int getClusteringKeyCount();",
"public int getFrequency(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.frequency;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\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 int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"public static String countWordsOccurences(String input) {\r\n\t\t\r\n\t\tif(input==null || input.length()==0)\r\n\t\t\treturn \"[]\";\r\n\t\t\r\n\t\tString inputTokens[] = input.split(\" |,|@\");\r\n\t\tHashMap<String,Integer> map = new HashMap<String,Integer>();\r\n\t\tfor(String token: inputTokens){\r\n\t\t\tif(token.length()>0) {\r\n\t\t\t\tif(map.containsKey(token)) {\r\n\t\t\t\t\tmap.put(token, map.get(token)+1);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tmap.put(token,1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tString output = map.entrySet().stream()\r\n\t\t .map(e -> \"{\\\"\" + e.getKey() + \"\\\":\" + e.getValue()+\"}\")\r\n\t\t .collect(Collectors.joining(\",\"));\r\n\t\t\r\n\t\treturn \"[\"+output+\"]\";\r\n\t}",
"public double calTF(String key) throws IOException {\n\t\tList<String> in = FileHelper.readFile(Constants.inputpath);\r\n\t\tStringBuffer sb=new StringBuffer();\r\n\t\tfor (String s:in){\r\n\t\t\tsb.append(s.trim()+\" \");\r\n\t\t}\r\n\t\tString[] input = sb.toString().trim().split(\" \");\r\n\t\tint num=0;\r\n\t\tfor(String cutword:input){\r\n\t\t\tif (cutword.equals(key)){\r\n\t\t\t\tnum++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tdouble tf=(double)num/input.length;\r\n\t\treturn tf;\r\n\t}",
"public int hashFunction(String s){\r\n int hashcode = hashCode(s);\r\n int index = hashcode % capacity;\r\n return index;\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}",
"public static void main(String[] args) {\n HashMap<Character, Integer> finalChar = new HashMap<>();\n int charCount = 1;\n\n String str = \"If the product of two terms is zero then common sense says at least one of the two terms has to be zero to start with. \" +\n \"So if you move all the terms over to one side, \" +\n \"you can put the quadratics into a form that can be factored allowing that side of the equation to equal zero. \" +\n \"Once you’ve done that, it’s pretty straightforward from there.\";\n\n // convert String to char[] array\n char[] charInString = str.toCharArray();\n\n // iterate over charInString[] array using enhanced for loop\n for (char charName : charInString) {\n\n if (finalChar.containsKey(charName)) {\n finalChar.put(charName, finalChar.get(charName) + 1);\n } else {\n finalChar.put(charName, 1);\n }\n\n }\n System.out.println(finalChar);\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 }",
"public static void main(String args[]){\n String str = \"aabcadceklmeb\";\n\n HashMap<Character, Integer> map = new HashMap<>();\n\n\n for(int i = 0; i < str.length();i++){\n if(!map.containsKey(str.charAt(i))){\n map.put(str.charAt(i), 1);\n }else{\n int value = map.get(str.charAt(i));\n value++;\n map.put(str.charAt(i), value);\n }\n }\n\n for( char c : map.keySet()){\n if(map.get(c) == 2){\n System.out.println(c);\n }\n }\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 static void main(String[] args) {\n\t\tString character = \"fsdkjfklsdjfksdlkjdsfoweiopriewfklsdkfldksaflkdsafldkfsieoirwpoiroewofkdsfksldkf\";\n\t\tMap<Character,Integer> map = new HashMap<Character, Integer>();\n\t\tmap = countChars(character);\n\t\tSortMap(map);\n\t}",
"@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}",
"private int hashFunc(String input) {\n\t\tBigInteger value = BigInteger.valueOf(0);\n\t\tBigInteger k2 = new BigInteger(\"27\");\n\t\tchar c = input.charAt(0);\n\t\tlong i1 = (int) c - 96;\n\t\tBigInteger k1 = new BigInteger(\"0\");\n\t\tk1 = k1.add(BigInteger.valueOf(i1));\n\t\tvalue = k1;\n\n\t\tfor (int i = 1; i < input.length(); i++) {\n\n\t\t\tchar c2 = input.charAt(i);\n\n\t\t\tvalue = value.multiply(k2);\n\n\t\t\tlong i2 = (int) c2 - 96;\n\t\t\tBigInteger k3 = new BigInteger(\"0\");\n\t\t\tk3 = k3.add(BigInteger.valueOf(i2));\n\n\t\t\tvalue = value.add(k3);\n\n\t\t}\n\t\tBigInteger size = new BigInteger(\"0\");\n\t\tsize = size.add(BigInteger.valueOf(this.size));\n\t\tvalue = value.mod(size);\n\n\t\treturn value.intValue();\n\t}",
"public static HashMap<String, Integer> countPubType(HashMap<String, Integer> m,\r\n\t\t\tString str) {\r\n\t\tif (!m.containsKey(str)) {\r\n\t\t\tm.put(str, 1);\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\tm.put(str, m.get(str) + 1);\r\n\t\t}\r\n\r\n\t\treturn m;\r\n\t}",
"@Override\n public int getTermFrequency(String term) {\n return 0;\n }",
"public static final int numberOf(char[] arr, char key)\n {\n if(arr == null)\n throw new NullPointerException(\"Cannot work with a null array.\");\n else {\n int n = 0;\n \n for(char c: arr)\n if(c == key)\n ++n;\n \n return n;\n }\n }",
"public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}",
"public static int count(String s, String token)\r\n {\r\n if (isEmpty(s) || isEmpty(token))\r\n return 0;\r\n \r\n int count = 0;\r\n int k = 0;\r\n while ((k = s.indexOf(token, k)) >= 0)\r\n {\r\n count ++;\r\n k += token.length();\r\n }\r\n return count;\r\n }",
"public void IncCount(String s) \n\t{\n if(numEntries+1 >= tableSize)\n rehashTable();\n \n HashEntry entry = contains(s);\n \n if(entry == null)\n {\n insert(s);\n numEntries++;\n }\n else\n entry.value++;\n\t}",
"public Map<String, Integer> wordCount(String string) {\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\tString[] p = string.split(\"[\\\\W\\\\s]\");\n\t\tfor (String s : p) {\n\t\t\tif (!s.equals(\"\")) {\n\t\t\t\tif (map == null || !map.containsKey(s))\n\t\t\t\t\tmap.put(s, 1);\n\t\t\t\telse\n\t\t\t\t\tmap.replace(s, map.get(s) + 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"private String m20347f(String str) {\n C3927c cVar = new C3927c(\".cnt\", str);\n return cVar.mo27425a(m20344d(cVar.f17426b));\n }",
"public static void main(String[] args) {\n\n\t\tString str = \"Better Butter\";\n\t\t// char[] chararray=s.toCharArray();\n\n\t\tHashMap<Character, Integer> map = new HashMap<>();\n\n\t\t// if(hm.containsKey(s.charAt(index)))\n\n\t\tfor (int i = str.length() - 1; i >= 0; i--) {\n\n\t\t\tif (map.containsKey(str.charAt(i))) {\n\n\t\t\t\tif (str.charAt(i) == '\\0') {\n\t\t\t\t\t++i;\n\t\t\t\t}\n\t\t\t\tint count = map.get(str.charAt(i));\n\t\t\t\tmap.put(str.charAt(i), ++count);\n\t\t\t\tSystem.out.println(map);\n\t\t\t} else {\n\t\t\t\tmap.put(str.charAt(i), 1);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(map);\n\t}",
"static long repeatedString(String s, long n) {\n long l=s.length();\n long k=n/l;\n long r=n%l;\n long count=0;\n long count1=0;\n char ch[]=s.toCharArray();\n for(int t=0;t<ch.length;t++){\n if(ch[t]=='a')\n count1++;\n }\n for(int t=0;t<r;t++){\n if(ch[t]=='a')\n count++;\n }\n return k*count1+count;\n\n }",
"public Map<String, Integer> wordCount(String string) {\n\t\t//Split the input string by into individual words. Takes out the spaces, commas, apostrophes\n\t\tString[] splitWords = string.split(\"[\\\\s',]\");\n\t\t//Initiate the hashmap to store unique words as keys and incrementing values with repeated keys\n\t\tMap<String, Integer> wordCount = new HashMap<>();\n\t\tfor(int i = 0; i < splitWords.length; i++ ) {\n\t\t\t//increment word count if the word is already in the hashmap. Make a new entry if word is unique to the map.\n\t\t\tif (wordCount.containsKey(splitWords[i])) {\n\t\t\t\twordCount.put(splitWords[i], wordCount.get(splitWords[i])+1);\n\t\t\t}else {\n\t\t\t\twordCount.put(splitWords[i], 1);\n\t\t\t}\t\t\n\t\t}\n\t\t//Remove the empty spaces from the map (to satisfy a test case)\n\t\twordCount.remove(\"\");\n\t\treturn wordCount;\n\t}",
"public static int getMaxSubstr(String str, int k) {\n int[] freqArr = new int[256];\n int uniqCount = 0;\n\n int cStart = 0;\n int cEnd = 0;\n\n int resStart = -1;\n int resLen = -1;\n\n for(int i = 0; i < str.length(); i++) {\n int ch = str.charAt(i);\n\n if(freqArr[ch] == 0) {\n uniqCount++;\n }\n\n freqArr[ch]++;\n cEnd++;\n\n while(uniqCount > k) {\n cStart++;\n int c = str.charAt(cStart);\n\n if(freqArr[c] == 1) {\n uniqCount--;\n }\n\n freqArr[c]--;\n }\n\n\n if(uniqCount == k && (cEnd - cStart > resLen) ) {\n resLen = cEnd - cStart;\n resStart = cStart;\n }\n\n }\n\n //print \"resLen\" characters starting from \"resStart\"\n for(int i = resStart; i < resStart + resLen; i++) {\n System.out.print(str.charAt(i));\n }\n\n\n //returning the length\n return resLen;\n }",
"public String generateKey(String str, String key)\n{\n int x = str.length();\n \n for (int i = 0; ; i++)\n {\n if (x == i)\n i = 0;\n if (key.length() == str.length())\n break;\n key+=(key.charAt(i));\n }\n return key;\n}",
"public static void main(String[] args) {\n\n\t\tint[] a = {1,2,3,8,8,9,6,4};\n\t String s = \"hello2java\"; \n\t\tHashMap<Integer,Integer> countMap1 = new HashMap<Integer,Integer>();\n\t\tHashMap<Character,Integer> countMap2 = new HashMap<Character,Integer>();\n \n\t\tchar[] ch = s.toCharArray();\n\t\t\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tif(countMap1.containsKey(a[i])){\n\t\t\t\t\tcountMap1.put(a[i], countMap1.get(a[i])+1);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tcountMap1.put(a[i],1);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t//}\n\t\tSystem.out.println(countMap1);\n\t\t\n\t\tfor(int i=0;i<ch.length;i++){\n\t\t\tif(countMap2.containsKey(ch[i])){\n\t\t\t\tcountMap2.put(ch[i], countMap2.get(ch[i])+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcountMap2.put(ch[i],1);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(countMap2);\n\t\t\n\t\tSet<Character> ket = countMap2.keySet();\n for(Character c:ket){\n \tif(countMap2.get(c)>1){\n \t\tSystem.out.println(c+\"-->\"+countMap2.get(c));\n \t}\n }\n\t}",
"public 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}"
] | [
"0.74213576",
"0.703",
"0.6896769",
"0.6744005",
"0.6651121",
"0.6645274",
"0.6437453",
"0.64259523",
"0.6352298",
"0.634539",
"0.6329301",
"0.6310867",
"0.6205188",
"0.6139937",
"0.6114965",
"0.609556",
"0.60829365",
"0.605461",
"0.6022397",
"0.5965699",
"0.59615844",
"0.58738625",
"0.58359176",
"0.5830974",
"0.5828956",
"0.58072877",
"0.57816184",
"0.5778245",
"0.5772177",
"0.57552564",
"0.5716099",
"0.56980586",
"0.5695383",
"0.56933194",
"0.5671267",
"0.5669799",
"0.5668555",
"0.5650148",
"0.5630685",
"0.561707",
"0.56165284",
"0.5607144",
"0.5595697",
"0.5593441",
"0.5585919",
"0.55788004",
"0.5560149",
"0.5540755",
"0.5518004",
"0.55152154",
"0.55150384",
"0.55122906",
"0.5509481",
"0.550297",
"0.54931724",
"0.546008",
"0.5458983",
"0.5457323",
"0.5452255",
"0.5447363",
"0.54453546",
"0.54446894",
"0.5442576",
"0.5434611",
"0.54306155",
"0.54304796",
"0.542767",
"0.5425978",
"0.54210997",
"0.54160136",
"0.54151815",
"0.54135513",
"0.5410964",
"0.54066795",
"0.53935415",
"0.5391844",
"0.5383043",
"0.538141",
"0.53784853",
"0.53640896",
"0.5362414",
"0.53619266",
"0.5350872",
"0.5341643",
"0.53388214",
"0.53225535",
"0.5315761",
"0.53112245",
"0.53073883",
"0.52945185",
"0.5293106",
"0.52896464",
"0.52885234",
"0.5285816",
"0.52850103",
"0.5277452",
"0.5276554",
"0.527456",
"0.5273789",
"0.5272654"
] | 0.73028636 | 1 |
Removes and returns removed value | @Override
public String remove(String key) {
int hashVal = hashFunc(key);
while (hashArray[hashVal] != null) {
if (hashArray[hashVal].value.equals(key)) {
hashArray[hashVal] = deleted;
this.numOfItems--;
return key;
}
hashVal++;
hashVal = hashVal % size;
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public T remove(T value){\n\t return value;\n\t}",
"@Override\n public T remove() {\n //make sure there is something in the set\n if (first == null)\n return null;\n //make a reference to the data in the first node, then\n //update the reference to the second node\n T val = first.value;\n first = first.next;\n //return the data\n numItems--;\n return val;\n }",
"public Object remove();",
"Object remove();",
"public E remove() {\r\n\t\tif (curr.next() == null)\r\n\t\t\treturn null; // Nothing to remove\r\n\t\tE it = curr.next().element(); // Remember value\r\n\t\tif (tail == curr.next())\r\n\t\t\ttail = curr; // Removed last\r\n\t\tcurr.setNext(curr.next().next()); // Remove from list\r\n\t\tcnt--; // Decrement count\r\n\t\treturn it; // Return value\r\n\t}",
"@Override\n public V remove(K key, V value) {\n V val = get(key);\n if (val != null && value != null && val.equals(value)) {\n root = removeHelper(root, key);\n size -= 1;\n }\n return val;\n// throw new UnsupportedOperationException(\"Unsupported operation, sorry!\");\n }",
"private E remove(){\n E tmp = array[0];\n swap(0,--lastPosition);\n array[lastPosition] = null;\n trickleDown(0);\n array = Arrays.copyOfRange(array,0,array.length);\n return tmp;\n }",
"@Override\n public V remove(K key, V value) {\n if (get(root, key) == value) {\n return delete(root, key).val;\n }\n return null;\n }",
"T remove() {\n this.prev.next = this.next;\n this.next.prev = this.prev;\n return this.getData();\n }",
"public Location remove() {\n\t\t//empty set\n\t\tif (head == null){\n\t\t\treturn null;\n\t\t}\n\n\t\t//removes and returns the SquarePosition object from the top of the set\n\t\tLocation removedLocation = head.getElement();\n\t\thead = head.next;\n\t\tsize --;\n\t\treturn removedLocation;\n\t}",
"@Override\n\tpublic void removeValue(String arg0) {\n\t}",
"@Override\n public int remove() {\n isEmptyList();\n int result = first.value;\n first = first.next;\n first.previous = null;\n size--;\n return result;\n }",
"@Override\n public V remove(K key) {\n V val = get(key);\n if (val != null) {\n root = removeHelper(root, key);\n size -= 1;\n }\n return val;\n// throw new UnsupportedOperationException(\"Unsupported operation, sorry!\");\n }",
"@Override\n public T remove() {\n if(numItems == 0)\n return null;\n return this.arr[--numItems];\n }",
"public String remove() \n {\n //TODO\n return \"\";\n }",
"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 E remove();",
"public E remove();",
"public int remove(int value)\n {\n amount=amount-value;\n return amount;\n }",
"public E remove() {\n\t\t// your code here\n\t\treturn null;\n\t}",
"public void remove()\n {\n if( current > 0 )\n {\n set(-- current);\n }\n }",
"@Override\n\tpublic E remove() {\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic E remove() {\n\t\treturn null;\r\n\t}",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"public void remove();",
"void removeValue(String key);",
"public Team remove(){\r\n if(array[1] == null){\r\n return null;\r\n }\r\n Team r = array[1].value;\r\n nextAvail--;\r\n if(nextAvail == 1){\r\n array[nextAvail] = null;\r\n }\r\n else {\r\n array[1].value = array[nextAvail].value;\r\n array[nextAvail] = null;\r\n fixHeap();\r\n }\r\n return r;\r\n }",
"public String pop() {\n String removed = NOTHING;\n // Is there anything in the stack to remove?\n if (usage > 0) {\n // Obtain the topmost value from the stack\n removed = this.foundation[this.foundation.length - this.usage];\n // Clean up the array location\n this.foundation[this.foundation.length - this.usage] = null;\n // Decrease usage counter\n usage--;\n }\n return removed;\n }",
"@Override\n\tpublic T remove(T removeItem) {\n\t\t// TODO\n\t\tT item;\n\t\tint index=indexOf(removeItem);\n\t\tif (index == -1) {\n\t\t\treturn null;\n\t\t} else {\n\t\t\titem = data[index];\n\t\t\tfor(int j=index;j<size-1;j++)\n\t\t\t\tdata[j] = data[j+1];\n\t\t\tsize--;\n\t\t\treturn item;\n\t\t}\n\t\t// Find the removeItem in the array\n\t\t// return null if not found\n\t\t// First, Store the item found in a variable\n\t\t// shift the sequence element to the blank(adjust the array)\n\t\t// decrease size by 1\n\t\t// return the stored item\n\n\t}",
"@Override\n public E remove(int index) {\n this.rangeCheck(index);\n this.modCount++;\n E oldValue = (E) this.values[index];\n int numMoved = this.index - index - 1;\n if (numMoved > 0) {\n System.arraycopy(this.values, index + 1, this.values, index, numMoved);\n }\n this.values[--this.index] = null;\n return oldValue;\n }",
"public int remove() \r\n { \r\n int v = h[1];\r\n hPos[v] = 0; // v is no longer in heap\r\n h[N+1] = 0; // put null node into empty spot\r\n \r\n h[1] = h[N--];\r\n siftDown(1);\r\n \r\n return v;\r\n }",
"@Override\n public V remove(K key) {\n return delete(root, key).val;\n }",
"public void remove () {}",
"private Node removeElement(Object value) {\n if (value.equals(this.value)) {\n return this.removeElement();\n }\n\n if (((Comparable)value).compareTo(this.value) < 0) {\n if (this.leftChild != null) {\n this.leftChild = this.leftChild.removeElement(value);\n return this.balance();\n }\n } else {\n if (this.rightChild != null) {\n this.rightChild = this.rightChild.removeElement(value);\n return this.balance();\n }\n }\n return this;\n }",
"public synchronized Object remove( Object key ) {\n\t\tObject intvalue = mapKeyPos.remove(key);\n\t\tif ( intvalue != null ) {\n\t\t\tint pos = ((Integer)intvalue).intValue();\n\t\t\tObject temp = values[pos];\n\t\t\tkeys[pos] = null;\n\t\t\tvalues[pos] = null;\n\t\t\tstatus[pos] = LRU_OLD;\n\t\t\t//System.out.println(\"CountLimiteLRU: remove(\"+key+\") = \"+temp);\n\t\t\treturn temp;\n\t\t}\n\t\treturn null;\n\t}",
"public int remove(K key, V value) {\n return remove(key, value, 1);\n }",
"public V remove(K key)\r\n\t{\r\n\t\t//TODO: add your code here\r\n\t\tV oldVal;\r\n\t\tint slot = findSlot(key, false); // check if it already exists\r\n\t\t// sets the slot in the map to DUMMY value if it exists\r\n\t\tif (slot >= 0)\r\n\t\t{\r\n\t\t\toldVal = table[slot].getValue();\r\n\t\t\ttable[slot] = DUMMY;\r\n\t\t\tcount--;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\toldVal = null;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn oldVal;\r\n\t}",
"public E removeCurrent()\n {\n if (size == 0)\n {\n throw new NoSuchElementException(\n \"The list is empty, there is nothing to remove.\");\n }\n\n Node<E> previous = current.previous();\n Node<E> next = current.next();\n Node<E> oldCurrent = current;\n current.split();\n previous.split();\n previous.join(next);\n current = next;\n\n size--;\n return oldCurrent.data();\n }",
"public E remove (int index)\n { E item;\n if (index < 0 || index >= size) {\n throw new\n IndexOutOfBoundsException(Integer.toString(index));\n }\n if (index == 0)\n item = removeFirst( );\n else {\n Node<E> node = getNode(index - 1);\n item = removeAfter(node);\n }\n return item; // return the deleted value\n }",
"public L removeFromBack(){\n\t\tif (isEmpty())//throw exception if List is empty\n\t\tthrow new IllegalStateException(\"List \" + name + \" is empty.\");\n\n\t\tL removedItem = (L)lastNode.data; //retrieve data being removed\n\n\t\t//update references firstNode and lastNode\n\t\tif( firstNode == lastNode )\n\t\tfirstNode = lastNode = null;\n\t\telse{ //locate new last node\n\t\t\tListNode current = firstNode;\n\n\t\t\t//loop while current node does not refer to lastNode\n\t\t\twhile ( current.nextNode != lastNode )\n\t\t\tcurrent = current.nextNode;\n\n\t\t\tlastNode = current; //current is new lastNode\n\t\t\tcurrent.nextNode = null;\n\t\t}//end else\n\n\t\treturn removedItem; //return removed node data\n\t}",
"public V remove(K key){\n\t\tV v=null;\n\t\tNode n=searchkey(root, key);\n\t\tif(n!=null)\n\t\t{v=n.value;}\n\t\troot =deletehelp(root, key);\n\t\t\n\t\treturn v;\n\t\t\n\t\t\n\t}",
"public final void remove(@NotNull T value) {\n\t\tObject priorValue;\n\t\tboolean replaced;\n\t\tdo {\n\t\t\tpriorValue = this.value.get();\n\t\t\tObject newValue = remove(priorValue, value);\n\t\t\treplaced = this.value.compareAndSet(priorValue, newValue);\n\t\t} while (!replaced);\n\t}",
"public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will find the last index (highest priority) and remove it\r\n return queue[--currentSize];\r\n }",
"T removeFromTail() {\n return this.prev.remove();\n }",
"@Override\n public V remove(K key, V value) {\n Node saveRemove = new Node(null,null);\n root = removeHelper(key,value,root,saveRemove);\n return saveRemove.value;\n }",
"int remove(){\n int x = head.val;\n head = head.next;\n if(--n == 0) tail = null;\n return x;\n }",
"@Override\n public int remove(int index) {\n checkIndex(index);\n Entry tmp = getEntry(index);\n int result = tmp.value;\n tmp.previous.next = tmp.next;\n tmp.next.previous = tmp.previous;\n size--;\n return result;\n }",
"public T remove() {\r\n \r\n if (this.isEmpty()) {\r\n return null;\r\n }\r\n \r\n Random r = new Random();\r\n // Randomly selects element to remove and stores in rValue.\r\n int rValue = r.nextInt(size);\r\n // Store removed element in remove\r\n T remove = elements[rValue];\r\n elements[rValue] = null;\r\n \r\n // Move last element to replace \"remove\" if \"remove\" is not last element\r\n if (rValue != (size - 1)) {\r\n elements[rValue] = elements[size - 1];\r\n elements[size - 1] = null;\r\n }\r\n size--;\r\n // If array is less than 25% full, resize to 1/2 of current size.\r\n if (size > 0 && size < elements.length / 4) {\r\n resize(elements.length / 2);\r\n }\r\n return remove;\r\n }",
"public Object remove(String key)\n\t{\n\t\tverifyParseState();\n\t\treturn values.remove(key);\n\t}",
"@Override\r\n\tpublic E removeLast() {\n\t\treturn pollLast();\r\n\t}",
"public int remove() {\n return priorityQueue[--counter];\n }",
"Object removeFirst();",
"@Override\n\tpublic V remove(K key) {\n\t\tint h = Math.abs(key.hashCode()) % nrb;// calculam hash-ul asociat cheii\n\n\t\tfor (int i = 0; i < b.get(h).getEntries().size(); i++) {\n\t\t\t// parcurgerea listei de elemente pentru a gasi cheia ceruta si\n\t\t\t// stergerea acesteiu din lista\n\t\t\tif (b.get(h).getEntries().get(i).getKey().equals(key)) {\n\t\t\t\tV x = b.get(h).getEntries().get(i).getValue();\n\t\t\t\tb.get(h).e.remove(i);\n\t\t\t\treturn x;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}",
"public E removeFirst();",
"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 T pop() \n\t//POST: First element of list removed and FCTVAL == first element in list\n\t{\n\t\tT tmp = start.value;\n\t\tremove(start.value);\n\t\treturn tmp;\n\t}",
"public E removeFirst() {\n return pop();\n }",
"public V remove(String key) {\n if (!containsKey(key)) return null;\n int index = hashOf(key);\n Object value = values[index];\n values[index] = null;\n if (value != null) size--;\n return (V) value;\n }",
"public U remove(U x){\r\n\t \tif (x==null)\r\n\t \t\tthrow new IllegalArgumentException(\"x cannot be null\");\r\n\t \t//find index\r\n\t \tint i = Arrays.binarySearch(array,0, getArraySize(), x);\r\n\t \t//x not found in array\r\n\t \tif (i<0)\r\n\t \t\treturn null;\r\n\t \t//store current element\r\n\t \t@SuppressWarnings(\"unchecked\")\r\n\t\t\tU data = (U) array[i];\r\n\t \t//enter loop\r\n\t \twhile(i<numElems-1){\r\n\t \t\t//move element left\r\n\t \t\tarray[i]= array[i+1];\r\n\t \t\ti++;\r\n\t \t}\r\n\r\n\t \t//Not sure if needed: set last element to null after shift\r\n\t \tarray[numElems-1] = null;\r\n\t \tnumElems--;\r\n\t \treturn data;\r\n\t \t\r\n\t }",
"public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }",
"public T remove (T element);",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"void remove();",
"private static <T> Object remove(Object baseValue, T value) {\n\t\tif (baseValue == value || baseValue == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!(baseValue instanceof Object[])) {\n\t\t\t// baseValue is a single element not equal to value\n\t\t\treturn baseValue;\n\t\t}\n\n\t\tObject[] oldArray = (Object[])baseValue;\n\t\tfor (int i = 0; i < oldArray.length; i++) {\n\t\t\tif (oldArray[i] == value) {\n\t\t\t\tif (oldArray.length == 2) {\n\t\t\t\t\treturn oldArray[i == 0 ? 1 : 0];\n\t\t\t\t}\n\n\t\t\t\t// Shift remaining elements and return\n\t\t\t\tfor (int j = i + 1; j < oldArray.length; j++) {\n\t\t\t\t\toldArray[j - 1] = oldArray[j];\n\t\t\t\t}\n\n\t\t\t\treturn Arrays.copyOf(oldArray, oldArray.length - 1);\n\t\t\t}\n\t\t}\n\n\t\treturn baseValue;\n\t}",
"protected T removeFromHead()\n\t{\n\t\tif(head == null)\n\t\t\treturn null;\n\t\t\n\t\tT ret = head.getVal();\n\t\thead = head.getNext();\n\t\t\n\t\tif(head == null)\n\t\t\ttail = head;\n\t\telse\n\t\t\thead.setPrev(null);\n\t\t\n\t\treturn ret;\n\t}",
"@Override\n public Item removeFirst() {\n nextFirst = moveForward(nextFirst, 1);\n Item output = items[nextFirst];\n items[nextFirst] = null;\n size -= 1;\n return output;\n }",
"public Double remove() throws NoSuchElementException {\n\t\tif (arr.length > 0) {\n\t\t\tDouble temp = arr[0];\n\t\t\tarr = Arrays.copyOfRange(arr, 1, arr.length);\n\t\t\treturn temp;\n\t\t}\n\t\tthrow new NoSuchElementException();\n\t}",
"int remove(int idx);",
"public U remove(int index) throws IndexOutOfBoundsException {\n\t\t\tif (index >= mLength || index < 0) {\n\t\t\t\tthrow new IndexOutOfBoundsException(\"Supplied index is invalid.\");\n\t\t\t}\n\n\t\t\tNode<U> node = getNodeAtIndex(index);\n\t\t\tU value = node.getValue();\n\t\t\tunlinkNode(node);\n\n\t\t\treturn value;\n\t\t}",
"@Override\n public E remove(int index) {\n\t E first = _store[index];\n\t _store[index] = null;\n\t for( int i = index; i< _size-1;i++) {\n\t\t _store[i]=_store[i+1];\n\t }\n\t_store[_size-1]=null;\n\t _size -=1;\n\t \n\t\t \n\treturn first;\n }",
"protected Tree remove(){\n if(noItems<=0){\n System.out.println(\"Q Empty. Cant remove\");\n return null;\n }else{\n return array[--noItems];\n }\n }",
"public E pop() {\n E value = head.prev.data;\n head.prev.delete();\n if (size > 0) size--;\n return value;\n }",
"public DataItem removeItem()\n\t{\n\t\tDataItem temp = itemArray[numItems-1];\n\t\titemArray[numItems-1] = null;\n\t\tnumItems--;\n\t\treturn temp;\n\t}",
"@Override\n public T remove(int position) {\n if (!validate(position)) {\n throw new NoSuchElementException(\"Element with given position not exist at the list!\");\n }\n T removed = (T) this.values[position];\n this.values[position] = null;\n this.cursor--;\n return removed;\n }",
"public T removeFirst();",
"public Value remove(Key key) {\r\n\t\t//System.out.println(\"Removing key \" + key + \".\");\r\n\t\t//System.out.println(\"get(\" + key + \") = \" + get(key));\r\n\t\t//System.out.println(root);\r\n\t\t\r\n\t\tif (isEmpty() || get(key) == null) return null;\r\n\t\telements--;\r\n\t\tValue ret;\r\n\t\t\r\n\t\t//if no elements left, reset tree\r\n\t\tif (elements == 0) {\r\n\t\t\tret = root.getData(0).getValue();\r\n\t\t\troot = null;\r\n\t\t\tsize = 0;\r\n\t\t\treturn ret;\r\n\t\t}\r\n\t\t\r\n\t\tNode focus = findKeyNode(key);\r\n\t\t\r\n\t\t\t\r\n\t\tif (!focus.isLeaf()) {\r\n\t\t\t\r\n\t\t\tNode replacement = getReplacementKeyNode(key, focus);\r\n\t\t\t//take greatest value from replacement and add to focus\r\n\t\t\tfocus.addData(replacement.removeData(replacement.getData().size() - 1));\r\n\t\t\t//take removal value from focus\r\n\t\t\tret = focus.removeData(focus.getDataNumber(key)).getValue();\r\n\t\t\t\r\n\t\t\tfocus = replacement;\r\n\t\t} else {\r\n\t\t\tret = focus.removeData(focus.getDataNumber(key)).getValue();\r\n\t\t}\r\n\t\t\r\n\t\tif (focus.getData().size() > 1)\r\n\t\t\treturn ret;\r\n\r\n\t\t//cycle up, find overflow in tree\r\n\t\twhile (focus != null) {\r\n\t\t\tif (focus.hasUnderflow()) {\r\n\t\t\t\thandleUnderflow(focus);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfocus = focus.getParent();\r\n\t\t}\r\n\r\n\t\t//System.out.println(root + \"\\t\\tSize: \" + size + \"\\tElements: \" + elements);\r\n\t\t\r\n\t\treturn ret;\r\n\t}",
"public E removeMin() {\n // TODO: YOUR CODE HERE\n E min = getElement(1);\n swap(1, size());\n setElement(size(), null);\n bubbleDown(1);\n size -= 1;\n return min;\n }",
"public DataItem removeItem()\r\n\t{\r\n\t\tDataItem temp=itemArray[numItems-1];\r\n\t\titemArray[numItems-1]=null;\r\n\t\tnumItems--;\r\n\t\treturn temp;\r\n\t}",
"public E remove () throws NoSuchElementException;",
"public E removeFirst(){\r\n return null;\r\n }",
"@Override\n public E remove() {\n if (isEmpty()) {\n throw new NoSuchElementException();\n }\n size--;\n array[0] = swap(array[size], array[size] = array[0]);\n siftDown(0);\n return (E) array[size];\n }",
"private boolean remove() {\r\n\t\t\treturn removed = true;\r\n\t\t}",
"@Override\r\n\tpublic E removeFirst() {\n\t\treturn null;\r\n\t}",
"public V remove(K key) {\n\tint bucket=Math.abs(key.hashCode()%capacity);\n\t//for(int i=0;i<table[bucket].size()-1;i++){\n\tfor(MyEntry i:table[bucket]) { \n\t if(i.key==key) {\n\t\t//location.remove(key\n\t\tV previousvalue=i.value;\n\t\ttable[bucket].remove(i);\n\t\tsize--;\n\t\t/*if(table[bucket].size()==0) {\n\t\t utilizedbuckets.remove(bucket);\n\t\t}*/\n\t\treturn previousvalue;\n\t }\t\n\t}\n\treturn null;\n }",
"public Object removeItem (String key);",
"@Override\n\tpublic Object pop() {\n\t\tif(this.vector.isEmpty()) throw new PilaVuota();\n\t\treturn this.vector.remove(this.vector.size()-1);\t\t\n\t}",
"@Override\n public V remove(K key) {\n // just using a temp node to save the the .value of the removed node.\n Node saveRemove = new Node(null, null);\n root = removeHelper(key, root, saveRemove);\n return saveRemove.value;\n }",
"T pop() {\n return contents.removeFromHead();\n }",
"public long remove(){\n\t\t\r\n\t\t\tlong temp = queueArray[front]; //retrieves and stores the front element\r\n\t\t\tfront++;\r\n\t\t\tif(front == maxSize){ //To set front = 0 and use it again\r\n\t\t\t\tfront = 0;\r\n\t\t\t}\r\n\t\t\tnItems--;\r\n\t\t\treturn temp;\r\n\t\t}",
"public Object pop() {\n Object valueToReturn = this.peek();\n this.collection.remove(this.collection.size()-1);\n return valueToReturn;\n }",
"@Override\n public Node remove() {\n Node temp;\n int x = 0;\n while (isEmpty(x)) {\n x++;\n }\n temp = hashTable[x];\n hashTable[x] = temp.getNext(); \n\n return temp;\n }",
"private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}"
] | [
"0.77692723",
"0.7353849",
"0.71502644",
"0.7046955",
"0.7035093",
"0.69936997",
"0.6978813",
"0.6918981",
"0.6876625",
"0.68688947",
"0.6837228",
"0.6817185",
"0.6792499",
"0.67194396",
"0.6718056",
"0.66975605",
"0.6697173",
"0.6697173",
"0.6695336",
"0.6690667",
"0.6687678",
"0.66707695",
"0.66599447",
"0.66525656",
"0.66525656",
"0.66525656",
"0.66525656",
"0.66525656",
"0.6647229",
"0.6632808",
"0.6627297",
"0.66109866",
"0.6610054",
"0.6595874",
"0.6586259",
"0.6585504",
"0.6567938",
"0.6560524",
"0.6560136",
"0.6544738",
"0.65216094",
"0.6518509",
"0.65157986",
"0.6515137",
"0.65147424",
"0.65090597",
"0.6505904",
"0.6498919",
"0.64984727",
"0.6496328",
"0.6490861",
"0.64901346",
"0.6489868",
"0.6481252",
"0.64702475",
"0.64657253",
"0.6465171",
"0.6460846",
"0.6446154",
"0.6442576",
"0.6442526",
"0.6438778",
"0.6436108",
"0.6433199",
"0.6431189",
"0.6431189",
"0.6431189",
"0.6431189",
"0.6431189",
"0.64294547",
"0.64275223",
"0.6420648",
"0.6414645",
"0.64145625",
"0.6403809",
"0.6402701",
"0.6400959",
"0.63952523",
"0.6394992",
"0.63929206",
"0.63893086",
"0.63877434",
"0.6382296",
"0.638214",
"0.6380309",
"0.637786",
"0.63772535",
"0.63715917",
"0.6368929",
"0.6365832",
"0.63601124",
"0.6352217",
"0.6348451",
"0.63475794",
"0.6344019",
"0.6343846",
"0.63435096",
"0.63424987",
"0.63342416",
"0.63342416"
] | 0.6617716 | 31 |
/ Instead of using String's hashCode, you are to implement your own here, taking the table length into your account. In other words, you are to combine the following two steps into one step here. 1. converting Object into integer value 2. compress into the table using modular hashing Helper method to hash a string for English lowercase alphabet and blank, we have 27 total. For example, "cats" : 327^3 + 127^2 + 2027^1 + 1927^0 = 60,337 But, to make the hash process faster, Horner's method should be applied as follows; var4n^4 + var3n^3 + var2n^2 + var1n^1 + var0n^0 can be rewritten as (((var4n + var3)n + var2)n + var1)n + var0 Note: You must use 27 for this homework. However, if you have time, I would encourage you to try with other constant values other than 27. And compare the results but it is not required. | private int hashFunc(String input) {
BigInteger value = BigInteger.valueOf(0);
BigInteger k2 = new BigInteger("27");
char c = input.charAt(0);
long i1 = (int) c - 96;
BigInteger k1 = new BigInteger("0");
k1 = k1.add(BigInteger.valueOf(i1));
value = k1;
for (int i = 1; i < input.length(); i++) {
char c2 = input.charAt(i);
value = value.multiply(k2);
long i2 = (int) c2 - 96;
BigInteger k3 = new BigInteger("0");
k3 = k3.add(BigInteger.valueOf(i2));
value = value.add(k3);
}
BigInteger size = new BigInteger("0");
size = size.add(BigInteger.valueOf(this.size));
value = value.mod(size);
return value.intValue();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int hashCode(String s){\r\n int length = s.length();\r\n int h = 0;\r\n for(int i = 0; i < length; i++){\r\n h = h + ((int)s.indexOf(i))*(37^(length - 1));\r\n }\r\n return h;\r\n }",
"public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}",
"private int hasher() {\n int i = 0;\n int hash = 0;\n while (i != length) {\n hash += hashableKey.charAt(i++);\n hash += hash << 10;\n hash ^= hash >> 6;\n }\n hash += hash << 3;\n hash ^= hash >> 11;\n hash += hash << 15;\n return getHash(hash);\n }",
"private int hash(Handle[] myTable,\n String toHash) {\n\n int intLength = toHash.length() / 4;\n long sum = 0;\n for (int j = 0; j < intLength; j++) {\n char[] c = toHash.substring(j * 4, (j * 4) + 4)\n .toCharArray();\n long mult = 1;\n for (int k = 0; k < c.length; k++) {\n sum += c[k] * mult;\n mult *= 256;\n } // end inner for\n } // end outer for\n char[] c = toHash.substring(intLength * 4).toCharArray();\n long mult = 1;\n for (int k = 0; k < c.length; k++) {\n sum += c[k] * mult;\n mult *= 256;\n }\n return (int) (Math.abs(sum) % myTable.length);\n }",
"@Override\n public int hashCode() {\n int result = 42;\n int prime = 37;\n for (char ch : key.toCharArray()) {\n result = prime * result + (int) ch;\n }\n result = prime * result + summary.length();\n result = prime * result + value;\n return result;\n }",
"public int hash(String w){\n return (Math.abs(w.hashCode()) % hashTable.length);\n }",
"public int hashCode(String str) {\n\t\tchar[] s = str.toCharArray();\n\t\tint total = 1;\n\t\tfor (char value : s) {\n\t\t\ttotal = 34 * total + value;\n\t\t}\n\t\ttotal = Math.abs(total);\n\t\tif(HashTester.useJavaAPIForHashCodeFunction)\n\t\t\ttotal = Math.abs(str.hashCode());\n\t\twhile (total > HashTester.hashTableSize) {\n\t\t\ttotal %= HashTester.hashTableSize;\n\t\t}\n\t\treturn total;\n\t}",
"public int hash3 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ ){\n hashVal = (37 * hashVal) + key.charAt(i);}\n hashVal %= tableSize;\n if(hashVal<0)\n hashVal += tableSize; \n if(hashVal != 0)\n return hashVal;\n else\n return 0;\n }\n else\n {\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"@Override\n public int hashCode() {\n int B = 31, M = 1000000007, code = 0;\n for(int pos = 0; pos < this.objectA.length(); pos++) {\n code = ((this.objectA.charAt(pos) - 'a') + B * code) % M;\n }\n return (code * this.objectB) % M;\n }",
"private int hash(String str, int h){\n int v=0;\n\n /* FILL IN HERE */\n v = Math.floorMod(MurmurHash.hash32(str, seeds[h]) >>> h, 1 << logNbOfBuckets);\n\n return v;\n }",
"public int hashcode();",
"public int hashCode(){\n \n long code;\n\n // Values in linear combination with two\n // prime numbers.\n\n code = ((21599*(long)value)+(20507*(long)n.value));\n code = code%(long)prime;\n return (int)code;\n }",
"public int hash1 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal += key.charAt(i);\n \n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0 ;\n }\n\n }",
"@Override\n public int hashCode() {\n Integer s_int = new Integer(\"223\");\n int result = Objects.hashCode(valueOf(sideLengthA));\n result = (31 * result) + Objects.hashCode(valueOf(sideLengthB));\n result = (31 * result) +Objects.hashCode(valueOf(sideLengthC));\n return result;\n }",
"@Override\n\tpublic int hash(String str) {\n\t\tint result = 0;\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tint temp = (int) str.charAt(i);\n\t\t\tresult += (temp * (Math.pow(37, i)));\n\t\t}\n\t\treturn result;\n\t}",
"public int hash2 ( String key )\n {\n int hashVal = 0;\n if(key != null){\n for( int i = 0; i < key.length(); i++ )\n hashVal = (37 * hashVal) + key.charAt(i);\n //if(hashVal != 0)\n return hashVal % tableSize;\n //else\n // return 0;\n }\n else{\n //System.out.println(\"Key is null\");\n return 0;\n }\n }",
"private int hash1(T key) {\n return (key.toString().charAt(0) + key.toString().length())%newTable.length;\r\n }",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 71 * hash + this.id;\n hash = 71 * hash + Objects.hashCode(this.name);\n hash = 71 * hash + Objects.hashCode(this.cash);\n hash = 71 * hash + Objects.hashCode(this.skills);\n hash = 71 * hash + Objects.hashCode(this.potions);\n return hash;\n }",
"int hash(String makeHash, int mod);",
"final int hash(E object)\n {\n // Spread bits to regularize both segment and index locations,\n // using variant of single-word Wang/Jenkins hash.\n int h = object.hashCode();\n h += (h << 15) ^ 0xffffcd7d;\n h ^= (h >>> 10);\n h += (h << 3);\n h ^= (h >>> 6);\n h += (h << 2) + (h << 14);\n h = h ^ (h >>> 16);\n return h;\n }",
"public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tHashtable hashtableObj = new Hashtable();\r\n\t\thashtableObj.put(new CustomKey(5), \"A\");\r\n\t\thashtableObj.put(new CustomKey(2), \"B\");\r\n\t\thashtableObj.put(new CustomKey(6), \"C\");\r\n\t\thashtableObj.put(new CustomKey(15), \"D\");\r\n\t\thashtableObj.put(new CustomKey(23), \"E\");\r\n\t\thashtableObj.put(new CustomKey(16), \"F\");\r\n//\t\thashtableObj.put(\"Bas\", null); //java.lang.NullPointerException\r\n\t\tSystem.out.println(hashtableObj); // hashcode ret value is i =>{6=C, 16=F, 5=A, 15=D, 2=B, 23=E} based on size of Hashtable is 11 and (i %11)\r\n\t\t\t\t\t\t\t\t\t\t// if the return value of hashCode is (i %9) then outputs is => {16=F, 15=D, 6=C, 23=E, 5=A, 2=B}\r\n\t}",
"static int hash(int h) {\n\t\t // This function ensures that hashCodes that differ only by constant \n\t\t // multiples at each bit position have a bounded number of collisions \n\t\t // (approximately 8 at default load factor).\n\t\th ^= (h >>> 20) ^ (h >>> 12);\n\t\treturn h ^ (h >>> 7) ^ (h >>> 4);\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\tint karprabin = 0;\n\t\tfinal int B = 31;\n\t\tfor (int k = 0; k < this.actualsizeinwords; ++k) {\n\t\t\tkarprabin += B * karprabin + (this.buffer[k] & ((1l << 32) - 1));\n\t\t\tkarprabin += B * karprabin + (this.buffer[k] >>> 32);\n\t\t}\n\t\treturn this.sizeinbits ^ karprabin;\n\t}",
"public static int hash(String key) {\n int result = 1;\n\n for (int i=0; i<key.length(); ++i) {\n char c = key.charAt(i);\n int c_int = (int) c; //Gjør om ved å bruke ascii-tabellen ('A' = 65, ...\n\n result = (result*31) + c_int;\n }\n\n if (result < 0) {\n result = result * -1;\n }\n\n return result;\n }",
"@Override\n\tpublic long getHashCode(String key) {\n\t\tlong hash = 0;\n\t\tlong b = 378551;\n\t\tlong a = 63689;\n\t\tint tmp = 0;\n\t\tfor (int i = 0; i < key.length(); i++) {\n\t\t\ttmp = key.charAt(i);\n\t\t\thash = hash * a + tmp;\n\t\t\ta *= b;\n\t\t}\n\t\treturn hash;\n\t}",
"@Test\n\tpublic void testGiveCode1() {\n\t\n\t\t\tfloat maxLF = (float) 0.5;\n\t\t\tHTableWords h = new HTableWords(maxLF);\n\t\t\tString word = \"abc\";\n\t\t\tint hashCode = h.giveCode(word);\n\t\t\tassertTrue(hashCode == 3);\n\t}",
"private int hash(T t) {\n int code = t.hashCode();\n return code % Table.size();\n }",
"@Test\n\tpublic void testToHashCode() throws HashUtilException {\n\t\tshort sh = 121;\n\t\tbyte b = 14;\n\t\tObject obj1 = new String[] { \"Ra\", \"sh\" };\n\t\tObject obj2 = new int[] { 23, 46, 74 };\n\t\tObject obj3 = new boolean[] { true, false };\n\t\tObject obj4 = new double[] { 12.3, 45.7 };\n\t\tObject obj5 = new byte[] { 51, 60 };\n\t\tObject obj6 = new short[] { 121, 127 };\n\t\tObject obj7 = new long[] { 23, 46, 74 };\n\t\tObject obj8 = new float[] { 20f, 23.567f };\n\t\tObject obj9 = new char[] { 'r', 'e' };\n\n\t\tassertEquals(\n\t\t\t\t((((((((((23l * 45) + 34) * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 'm') * 45 + 1) * 45)\n\t\t\t\t\t\t+ Double.doubleToLongBits(12.3),\n\t\t\t\tnew HashUtility(23, 45).append(34).append(\"Ram\").append(false).append(12.3).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((23l * 45) + 123456789000l) * 45) + Float.floatToIntBits(2.453f)) * 45) + sh) * 45) + b) * 45)\n\t\t\t\t\t\t+ (long) 'r',\n\t\t\t\tnew HashUtility(23, 45).append(123456789000l).append(2.453f).append(sh).append(b).append('r')\n\t\t\t\t\t\t.toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t((((((((((((((((((((23l * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 's') * 45) + (long) 'h')\n\t\t\t\t\t\t* 45 + 23) * 45) + 46) * 45) + 74) * 45) + 0) * 45) + 1) * 45) + Double.doubleToLongBits(12.3))\n\t\t\t\t\t\t* 45) + Double.doubleToLongBits(45.7),\n\t\t\t\tnew HashUtility(23, 45).append(new String[] { \"Ra\", \"sh\" }).append(new int[] { 23, 46, 74 })\n\t\t\t\t\t\t.append(new boolean[] { true, false }).append(new double[] { 12.3, 45.7 }).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + (long) 'R') * 45) + (long) 'a') * 45) + (long) 's') * 45) + (long) 'h')\n\t\t\t\t\t\t* 45) + 23) * 45) + 46) * 45) + 74) * 45) + 0) * 45) + 1) * 45) + Double.doubleToLongBits(12.3))\n\t\t\t\t\t\t* 45) + Double.doubleToLongBits(45.7),\n\t\t\t\tnew HashUtility(23, 45).append(obj1).append(obj2).append(obj3).append(obj4).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + 51) * 45) + 60) * 45) + 121) * 45) + 127) * 45) + 23) * 45) + 46) * 45)\n\t\t\t\t\t\t+ 74) * 45) + Float.floatToIntBits(20f)) * 45) + Float.floatToIntBits(23.567f)) * 45)\n\t\t\t\t\t\t+ (long) 'r') * 45) + (long) 'e',\n\t\t\t\tnew HashUtility(23, 45).append(new byte[] { 51, 60 }).append(new short[] { 121, 127 })\n\t\t\t\t\t\t.append(new long[] { 23, 46, 74 }).append(new float[] { 20f, 23.567f })\n\t\t\t\t\t\t.append(new char[] { 'r', 'e' }).toHashCode());\n\n\t\tassertEquals(\n\t\t\t\t(((((((((((((((((((((23l * 45) + 51) * 45) + 60) * 45) + 121) * 45) + 127) * 45) + 23) * 45) + 46) * 45)\n\t\t\t\t\t\t+ 74) * 45) + Float.floatToIntBits(20f)) * 45) + (long) Float.floatToIntBits(23.567f)) * 45)\n\t\t\t\t\t\t+ (long) 'r') * 45) + (long) 'e',\n\t\t\t\tnew HashUtility(23, 45).append(obj5).append(obj6).append(obj7).append(obj8).append(obj9).toHashCode());\n\t}",
"@Test\n\tpublic void testGiveCode2() {\n\t\n\t\t\tfloat maxLF = (float) 0.5;\n\t\t\tHTableWords h = new HTableWords(maxLF);\n\t\t\tString word = \"z\";\n\t\t\tint hashCode = h.giveCode(word);\n\t\t\tassertTrue(hashCode == 3);\n\t}",
"int hashCode();",
"int hashCode();",
"private int hash2(T key) { //first two char length\r\n\r\n if(key.toString().length() ==1){ //in the case that the key is only one char long\r\n return key.toString().charAt(0)%newTable.length;\r\n }\r\n return (26 * key.toString().charAt(0)+key.toString().charAt(1))% newTable.length;\r\n\r\n }",
"@Override\r\n public int hashCode()\r\n {\r\n if(this.isEmpty()) return 0;\r\n\r\n /**\r\n * En este caso es recomendable usar la funcion Arrays.hashCode porque\r\n * garantiza un hash unico para cada array.\r\n * Si se usa la suma, los objetos \"ab\" y \"ba\" tendrian el mismo hash.\r\n */\r\n return Arrays.hashCode(this.table);\r\n }",
"@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}",
"public int hash(T input);",
"int\thashCode();",
"public int hashCode() {\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[28]++;\r\n long start = getStartMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[29]++;\r\n long end = getEndMillis();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[30]++;\r\n int result = 97;\r\n result = 31 * result + ((int) (start ^ (start >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[31]++;\r\n result = 31 * result + ((int) (end ^ (end >>> 32)));\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[32]++;\r\n result = 31 * result + getChronology().hashCode();\nCodeCoverCoverageCounter$1ib8k6g9t1mz1yofrpsdr7xlpbrhwxq3l.statements[33]++;\r\n return result;\r\n }",
"private int hash(E e) {\n return Math.abs(e.hashCode()) % table.length;\n }",
"private int hash(String string) {\n\t\tint hash = 0;\n\t\tint temp = 0;\n\n\t\tfor (byte b : string.toLowerCase().getBytes(StandardCharsets.US_ASCII)) {\n\t\t\thash = (hash << 4) + b;\n\t\t\ttemp = hash & 0xF0000000;\n\n\t\t\tif (temp != 0) {\n\t\t\t\thash = hash ^ (temp >>> 24);\n\t\t\t\thash = hash ^ temp;\n\t\t\t}\n\t\t}\n\n\t\treturn hash;\n\t}",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"@Override\n\tpublic int hash(String item) {\n\t\tlong hashCode = 0l;\n\t\tchar[] c = item.toCharArray();\n\t\tfor (int i = 0; i < c.length; i++) {\n\t\t\thashCode += c[i] * Math.pow(31, c.length - (i + 1));\n\t\t}\n\t\tint i = (int) hashCode % 2147483647;\n\n\t\n\t\treturn Math.abs(i);\n\t\t\n\t}",
"public void createHashTable() {\n\n String[] tempArray = new String[words.size()];\n\n for (int i = 0; i < words.size(); i++) {\n char[] word = words.get(i).toCharArray(); // char[] snarf\n Arrays.sort(word); // char[] afnrs\n tempArray[i] = toString(word); // String afnrs\n }\n\n for (int i = 0; i < words.size(); i++) {\n String word = tempArray[i];\n hashTable.put(word.substring(0, 4), i); // plocka bort bokstav nr 5\n String subString4 = (word.substring(0, 3) + word.substring(4, 5)); // plocka bort bokstav nr 4\n hashTable.put(subString4, i);\n String subString3 = (word.substring(0, 2) + word.substring(3, 5)); // plocka bort bokstav nr 3\n hashTable.put(subString3, i);\n String subString2 = (word.substring(0, 1) + word.substring(2, 5)); // plocka bort bokstav nr 2\n hashTable.put(subString2, i);\n hashTable.put(word.substring(1, 5), i); // plocka bort bokstav nr 1\n }\n }",
"int toHashKey(String s)\n\t{\n\t\tint A = 1952786893;\n\t\tint B = 367257;\n\t\tint v = B;\n\t\tfor (int j = 0; j < s.length(); j++)\n\t\t{\n\t\t\tchar c = s.charAt(j);\n\t\t\tv = A * (v + (int) c + j) + B;\n\t\t}\n\n\t\tif (v < 0) v = -v;\n\t\treturn v;\n\t}",
"@Override\n public int hashCode() {\n int hash = 3;\n hash = 97 * hash + this.x;\n hash = 97 * hash + this.y;\n return hash;\n }",
"@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 999;\n\t\tint result = 1;\n\t\tresult = prime * result + Table;\n\t\tresult = prime * result + id;\n\t\treturn result;\n\t}",
"@Override\r\n public int hashCode() {\n int key=(Integer)(this.capsule.get(0)); // Get the key\r\n Integer bkey=Integer.parseInt(Integer.toBinaryString(key)); // Convert into binary \r\n int n=setcount(bkey); //counts the number of 1's in the binary\r\n key=key*n + Objects.hashCode(this.capsule.get(0)); //multiplies that with the hashcode of the pId\r\n return key;\r\n }",
"private int hash3(T key) { //last char + length of word\r\n char lastchar = key.toString().charAt( key.toString().length()-1 );\r\n return (lastchar + key.toString().length())%newTable.length;\r\n }",
"public int hashCode() {\n return 37 * 17;\n }",
"@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}",
"public static void main(String[] args)\n\t{\n\t\tSystem.out.println(\"Hash Table Testing\");\n\t\t\n\t\tMyHashTable table = new MyHashTable();\n\t\t\n\t\ttable.IncCount(\"hello\");\n\t\ttable.IncCount(\"hello\");\n\t\t\n\t\ttable.IncCount(\"world\");\n\t\ttable.IncCount(\"world\");\n\t\ttable.IncCount(\"world\");\n\t\ttable.IncCount(\"world\");\n\t\t\n\t\ttable.IncCount(\"Happy Thanksgiving!\");\n\t\ttable.IncCount(\"Happy Thanksgiving!\");\n\t\ttable.IncCount(\"Happy Thanksgiving!\");\n\t\t\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\ttable.IncCount(\"Food\");\n\t\t\n\t\ttable.IncCount(\"cool\");\n\t\t\n\t\ttable.IncCount(\"Assignment due\");\n\t\ttable.IncCount(\"Assignment due\");\n\t\t\n\t\ttable.IncCount(\"Wednesday\");\n\t\t\n\t\ttable.IncCount(\"night\");\n\t\ttable.IncCount(\"night\");\n\t\t\n\t\ttable.IncCount(\"at\");\n\t\t\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\ttable.IncCount(\"TWELVE!!!\");\n\t\t\n\t\tStringCount[] counts = table.GetCounts();\n\t\tString output = \"\";\n\t\t\n\t\tfor(int i = 0; i < counts.length; i++)\n\t\t{\n\t\t\tif(counts[i] != null)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"[\" + counts[i].str +\",\" + counts[i].cnt + \"], \");\n\t\t\t\toutput += \"[\" + counts[i].str +\",\" + counts[i].cnt + \"], \";\n\t\t\t}\n\t\t\telse\n\t\t\t\tSystem.out.print(\"NULL!!!!! \" + i);\n\t\t}\n\t\t\n\t\tSystem.out.println();\n\t\t\n\t\tif(output.compareTo(\"[Assignment due,2], [Food,7], [Happy Thanksgiving!,3], [TWELVE!!!,5], [Wednesday,1], [at,1], [cool,1], [hello,2], [night,2], [world,4], \") == 0)\n\t\t\tSystem.out.println(\"Success! Output is correct.\");\n\t\telse\n\t\t\tSystem.out.println(\"Failure! The output wasn't correct. Output was: \\\"\" + output +\"\\\"\");\n\t}",
"public int hashCode()\n { \n \tint result = 17;\n \t\n \tresult = 37 * result + score; \t\n \t\n \treturn result;\n }",
"@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1; \n\t\t\n\t\t/*\n\t\t * result = 31*1 + 0(if rank is null) else rank.hashcode which calls the String implementation of the hashcode method.\n\t\t * So for example we will say: 31*1+20=51\n\t\t */\n\t\tresult = prime * result + ((rank == null) ? 0 : rank.hashCode());\n\t\tresult = prime * result + ((suit == null) ? 0 : suit.hashCode());\n\t\treturn result;\n\t}",
"public static int hashCodeForStrings(String... strings) {\n\t\tint hash = 0;\n\t\tfor(String str : strings) {\n\t\t\tfor(int i=0;i<str.length();++i) {\n\t\t\t\thash = 31 * hash + str.charAt(i);\n\t\t\t}\n\t\t}\n\t\treturn hash;\n\t}",
"static int sherlockAndAnagrams(String s) {\n HashTable hashTable = new HashTable(s.length() * s.length() * 4);\n substrings(s).map(Solution::ordered).forEach(hashTable::insert);\n return substrings(s).map(Solution::ordered).mapToInt(s1 -> {\n hashTable.remove(s1);\n return hashTable.count(s1);\n }).sum();\n }",
"public int hashCode() {\n final int HASH_MULTIPLIER = 29;\n int h = HASH_MULTIPLIER * FName.hashCode() + LName.hashCode();\n h = HASH_MULTIPLIER * h + ((Integer)ID).hashCode();\n return h;\n }",
"protected int myhash(T x)\r\n\t{\r\n\t\tint hashVal = x.hashCode( );\r\n\t\thashVal %= tableSize;\r\n\t\tif( hashVal < 0 )\r\n\t\t\thashVal += tableSize;\r\n\t\treturn hashVal;\r\n\t}",
"protected abstract int hashOfObject(Object key);",
"private static int initHash() {\n return 0x811c9DC5; // unsigned 2166136261\n }",
"public int hashCode() {\n int h = 0;\n for (int j = realSize(), i = 0, t = 0; j-- != 0; ) {\n while (((key[i]) == ((char) 0)))\n i++;\n t = (key[i]);\n t ^= (value[i]);\n h += t;\n i++;\n }\n // Zero / null keys have hash zero.\n if (containsNullKey) h += (value[n]);\n return h;\n }",
"public abstract int hashCode();",
"private static int computeHash(int par0)\n {\n par0 ^= par0 >>> 20 ^ par0 >>> 12;\n return par0 ^ par0 >>> 7 ^ par0 >>> 4;\n }",
"public int hashFunction(String key){\r\n return Math.abs(key.hashCode())%electionTable.length;\r\n }",
"private int hashType() {\n // Twelve possibilities\n int answer;\n if (isBomb()) {\n answer = 1;\n } else if (isShield()) {\n answer = 2;\n } else {\n answer = 3;\n }\n if (isFire() && !isKing()) {\n answer += 3 * 1;\n }\n if (!isFire() && isKing()) {\n answer += 3 * 2;\n }\n if (isFire() && isKing()) {\n answer += 3 * 3;\n }\n return answer - 1;\n }",
"@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }",
"public int hash( int tableSize )\n {\n if( value < 0 )\n return -value % tableSize;\n else\n return value % tableSize;\n }",
"public int hashCode(){\n\t\treturn toString().hashCode();\n\t}",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.firstName);\n hash = 29 * hash + Objects.hashCode(this.lastName);\n hash = 29 * hash + this.studentNumber;\n return hash;\n }",
"public void makeHash(){\n\t\tString tmp = \"\";\n\t\t\n\t\tfor(int i=0;i<_rows;i++){\n\t\t\tfor(int j=0;j<_cols;j++){\n\t\t\t\ttmp+=String.valueOf(_puzzle[i][j])+\"#\";\n\t\t\t}\n\t\t}\n\t\t_hashCode = tmp;\n\t}",
"public int hashFunction(String s){\r\n int hashcode = hashCode(s);\r\n int index = hashcode % capacity;\r\n return index;\r\n }",
"public int hashCode() {\n /*\n r7 = this;\n com.unboundid.ldap.matchingrules.CaseIgnoreStringMatchingRule r0 = com.unboundid.ldap.matchingrules.CaseIgnoreStringMatchingRule.getInstance()\n byte r1 = r7.filterType\n r2 = -121(0xffffffffffffff87, float:NaN)\n if (r1 == r2) goto L_0x009a\n r2 = 0\n switch(r1) {\n case -96: goto L_0x008b;\n case -95: goto L_0x008b;\n case -94: goto L_0x0084;\n case -93: goto L_0x006e;\n case -92: goto L_0x0034;\n case -91: goto L_0x006e;\n case -90: goto L_0x006e;\n default: goto L_0x000e;\n }\n L_0x000e:\n switch(r1) {\n case -88: goto L_0x006e;\n case -87: goto L_0x0013;\n default: goto L_0x0011;\n }\n L_0x0011:\n goto L_0x00a5\n L_0x0013:\n java.lang.String r2 = r7.attrName\n if (r2 == 0) goto L_0x0020\n java.lang.String r2 = com.unboundid.util.StaticUtils.toLowerCase(r2)\n int r2 = r2.hashCode()\n int r1 = r1 + r2\n L_0x0020:\n java.lang.String r2 = r7.matchingRuleID\n if (r2 == 0) goto L_0x002d\n java.lang.String r2 = com.unboundid.util.StaticUtils.toLowerCase(r2)\n int r2 = r2.hashCode()\n int r1 = r1 + r2\n L_0x002d:\n boolean r2 = r7.dnAttributes\n if (r2 == 0) goto L_0x0079\n int r1 = r1 + 1\n goto L_0x0079\n L_0x0034:\n java.lang.String r3 = r7.attrName\n java.lang.String r3 = com.unboundid.util.StaticUtils.toLowerCase(r3)\n int r3 = r3.hashCode()\n int r1 = r1 + r3\n com.unboundid.asn1.ASN1OctetString r3 = r7.subInitial\n if (r3 == 0) goto L_0x004e\n r4 = -128(0xffffffffffffff80, float:NaN)\n com.unboundid.asn1.ASN1OctetString r3 = r0.normalizeSubstring(r3, r4)\n int r3 = r3.hashCode()\n int r1 = r1 + r3\n L_0x004e:\n com.unboundid.asn1.ASN1OctetString[] r3 = r7.subAny\n int r4 = r3.length\n L_0x0051:\n if (r2 >= r4) goto L_0x0063\n r5 = r3[r2]\n r6 = -127(0xffffffffffffff81, float:NaN)\n com.unboundid.asn1.ASN1OctetString r5 = r0.normalizeSubstring(r5, r6)\n int r5 = r5.hashCode()\n int r1 = r1 + r5\n int r2 = r2 + 1\n goto L_0x0051\n L_0x0063:\n com.unboundid.asn1.ASN1OctetString r2 = r7.subFinal\n if (r2 == 0) goto L_0x00a5\n r3 = -126(0xffffffffffffff82, float:NaN)\n com.unboundid.asn1.ASN1OctetString r0 = r0.normalizeSubstring(r2, r3)\n goto L_0x007f\n L_0x006e:\n java.lang.String r2 = r7.attrName\n java.lang.String r2 = com.unboundid.util.StaticUtils.toLowerCase(r2)\n int r2 = r2.hashCode()\n int r1 = r1 + r2\n L_0x0079:\n com.unboundid.asn1.ASN1OctetString r2 = r7.assertionValue\n com.unboundid.asn1.ASN1OctetString r0 = r0.normalize(r2)\n L_0x007f:\n int r0 = r0.hashCode()\n goto L_0x00a4\n L_0x0084:\n com.unboundid.ldap.sdk.Filter r0 = r7.notComp\n int r0 = r0.hashCode()\n goto L_0x00a4\n L_0x008b:\n com.unboundid.ldap.sdk.Filter[] r0 = r7.filterComps\n int r3 = r0.length\n L_0x008e:\n if (r2 >= r3) goto L_0x00a5\n r4 = r0[r2]\n int r4 = r4.hashCode()\n int r1 = r1 + r4\n int r2 = r2 + 1\n goto L_0x008e\n L_0x009a:\n java.lang.String r0 = r7.attrName\n java.lang.String r0 = com.unboundid.util.StaticUtils.toLowerCase(r0)\n int r0 = r0.hashCode()\n L_0x00a4:\n int r1 = r1 + r0\n L_0x00a5:\n return r1\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.unboundid.ldap.sdk.Filter.hashCode():int\");\n }",
"@Override\n public int hashCode() {\n /*A nice property of 31 is that the\n multiplication can be replaced by a shift and a subtraction for better performance:\n 31 * i == (i << 5) - i.*/\n int result = (int) areaCode;\n result = 31 * result + (int) prefix;//\n result = 31 * result + (int) lineNumber;\n return result;\n }",
"private int hashOf(String key) {\n return key.length();\n }",
"protected int computeHashCode() {\n return flags * 17\n + (var != null ? var.hashCode() : 0)\n + (num != null ? num.hashCode() : 0)\n + (str != null ? str.hashCode() : 0)\n + (object_labels != null ? object_labels.hashCode() : 0)\n + (getters != null ? getters.hashCode() : 0)\n + (setters != null ? setters.hashCode() : 0)\n + (excluded_strings != null ? excluded_strings.hashCode() : 0)\n + (included_strings != null ? included_strings.hashCode() : 0)\n + (functionPartitions != null ? functionPartitions.hashCode() : 0)\n + (functionTypeSignatures != null ? functionTypeSignatures.hashCode() : 0);\n }",
"@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = 1;\n\t\tresult = prime * result\n\t\t\t\t+ ((composer == null) ? 0 : composer.hashCode());\n\t\tresult = prime * result + meterDenominator;\n\t\tresult = prime * result + meterNumerator;\n\t\tresult = prime * result + ((phrases == null) ? 0 : phrases.hashCode());\n\t\tresult = prime * result + tempoDenominator;\n\t\tresult = prime * result + tempoNumerator;\n\t\tresult = prime * result + tempoSpeed;\n\t\tresult = prime * result + ((title == null) ? 0 : title.hashCode());\n\t\treturn result;\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\tint result=1,prime=31;\r\n\t\tresult = result * prime + tableName.hashCode();\r\n\t\tresult = result * prime + databaseName.hashCode();\r\n\t\tresult = result * prime + limit;\r\n\t\tresult = result * prime + offset;\r\n\t\tresult = result * prime + queryCondition.hashCode();\r\n\t\treturn result;\r\n\t}",
"public int hashCode() {\n\t\tint hash = 0;\n\t\tif (isGameOver()) {\n\t\t\treturn (1 + (winner() == Game.FIRST_PLAYER ? 1 : 2));\n\t\t}\n\t\thash = 4;\n\t\tfor (int i = 1; i < NUMBER_OF_MOVES; i++) {\n\t\t\thash *= 3;\n\t\t\tif (contains(moves1, i)) {\n\t\t\t\thash++;\n\t\t\t} else if (contains(moves2, i)) {\n\t\t\t\thash += 2;\n\t\t\t}\n\t\t}\n\t\treturn hash;\n\t}",
"public int hashCode() {\n\t\tlong code = 0;\n\t\tint elements = _rowCount * _columnCount;\n\n\t\tfor (int i = 0; i < elements; i++) {\n\t\t\tcode += _value[i];\n\t\t}\n\n\t\treturn (int) code;\n\t}",
"public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tHashtable<Temp, String> h = new Hashtable<>();\r\n\t\th.put(new Temp(1), \"A\");\r\n\t\th.put(new Temp(25), \"B\");\r\n\t\th.put(new Temp(30), \"C\");\r\n\t\th.put(new Temp(10), \"D\");\r\n\t\tSystem.out.println(h);\r\n\t\t//{30=C, 10=D, 25=B, 1=A}---when hashcode returns i\r\n\t\t//{25=B, 30=C, 1=A, 10=D}---when hashcode returns i%9\r\n\t\t\r\n\t\t//constructor with initial capacity\r\n\t\t//here if hashcode exceeds 4 then, modules of 5 is done. \r\n\t\tHashtable<Temp1, String> h1 = new Hashtable<>(5);\r\n\t\th1.put(new Temp1(1), \"A\");\r\n\t\th1.put(new Temp1(25), \"B\");\r\n\t\th1.put(new Temp1(30), \"C\");\r\n\t\th1.put(new Temp1(10), \"D\");\r\n\t\tSystem.out.println(h1);\r\n\t\t//{25=B, 10=D, 1=A, 30=C}\r\n\t\t\r\n\t\t//constructor using initial capacity and fill ratio.\r\n\t\tHashtable<Temp1, String> h2 = new Hashtable<>(5,0.4f);\r\n\t\th2.put(new Temp1(1), \"A\");\r\n\t\th2.put(new Temp1(25), \"B\");\r\n\t\th2.put(new Temp1(30), \"C\");\r\n\t\th2.put(new Temp1(10), \"D\");\r\n\t\tSystem.out.println(h2);\r\n\t\t//{30=C, 1=A, 10=D, 25=B}\r\n\t\t//{25=B, 10=D, 1=A, 30=C}\r\n\t\t\r\n\t\t//constructor using Map\r\n\t\tHashtable<Temp1, String> h3 = new Hashtable<>(h2);\r\n\t\tSystem.out.println(h3);\r\n\t}",
"public static void hashMapEx() {\n\t\tString str = \"habiletechE\";\n\t\tstr = str.toLowerCase();\n\t\tchar[] ch = str.toCharArray();\n\t\tint size = ch.length;\n\n\t\tHashMap<Character, Integer> hmap = new HashMap<Character, Integer>();\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tif (!hmap.containsKey(ch[i]))\n\t\t\t\thmap.put(ch[i], 1);\n\t\t\telse {\n\t\t\t\tint val = hmap.get(ch[i]) + 1;\n\t\t\t\thmap.put(ch[i], val);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Duplicate Charaacters :\");\n\t\tfor (Map.Entry<Character, Integer> hm : hmap.entrySet()) {\n\t\t\tif (hm.getValue() > 1)\n\t\t\t\tSystem.out.println(hm.getKey() + \" \" + hm.getValue());\n\t\t}\n\t}",
"public int hashCode()\n {\n return (int)(swigCPtr^(swigCPtr>>>32));\n }",
"public static int hashCode(String str, int b) {\n\tint result = 0;\n\tfor(int i = 0; i < str.length(); i++) {\n\t\tresult += (str.charAt(i)) * (int)Math.pow(b, str.length() - (1+i));\n\t\t}\n\treturn result;\n\t}",
"private int hash(T x)\n {\n // calcolo della chiave ridotta - eventualmente negativa\n int h = x.hashCode() % v.length;\n\n // calcolo del valore assoluto\n if (h < 0)\n h = -h;\n \n return h; \n }",
"public int hashCode() {\n\t\treturn hashString.hashCode();\n\t}",
"public int hashCode()\n {\n int code = 0;\n int i;\n int shift = 0;\n \n \t\tint byteLength = getLengthInBytes();\n for( i = 0; i < byteLength; i++)\n {\n code ^= (value[i] & 0xff)<<shift;\n shift += 8;\n if( 32 <= shift)\n shift = 0;\n }\n return code;\n }",
"int _hash(int maximum);",
"public int hash(String key){\r\n\t\tint i;\r\n\t\tint v = 0;\r\n\t\tfor(i = 0; i < key.length(); i++)\r\n\t\t\tv += key.charAt(i);\r\n\t\treturn v % M;\r\n\t}",
"public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }",
"public int hash(String item);",
"private int hashFunction(int hashCode) {\n int location = hashCode % capacity;\n return location;\n }",
"public int hashCode()\n {\n int hash = 7;\n hash = 83 * hash + (counter != null ? counter.hashCode() : 0);\n return hash;\n }",
"public int hashFunction(int key){\r\n return (int) Math.floor((constFactor*key - Math.floor(constFactor*key)) * Math.pow(2,electionTable.length));\r\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn m * 100 + c * 10 + b;\n\t}",
"public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }",
"@Override\r\n\tpublic int hashCode() {\n\t\tint result = QAOperation.SEED;\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operator.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + operand.hashCode();\r\n\t\tresult = QAOperation.PRIME_NUMBER * result + constraint.hashCode();\r\n\t\treturn result;\r\n\t}",
"public long JSHash(String str) {\n\t\tlong hash = 1315423911;\n\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\thash ^= ((hash << 5) + str.charAt(i) + (hash >> 2));\n\t\t}\n\n\t\treturn hash;\n\t}",
"@Test\r\n public void testHash() {\r\n Settings expResult = Settings.EXPERT;\r\n int kod = 16 * 30 * 99;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.INTERMEDIATE;\r\n kod = 16 * 16 * 40;\r\n assertEquals(expResult.hashCode(), kod);\r\n \r\n expResult = Settings.BEGINNER;\r\n kod = 9 * 9 * 10;\r\n assertEquals(expResult.hashCode(), kod);\r\n }"
] | [
"0.73335344",
"0.7329048",
"0.71630824",
"0.7145805",
"0.70812964",
"0.69945747",
"0.6977955",
"0.69482696",
"0.6945036",
"0.6892466",
"0.68552214",
"0.68276584",
"0.679012",
"0.67862296",
"0.67858016",
"0.67837435",
"0.6754502",
"0.67117417",
"0.66700006",
"0.6659458",
"0.6657882",
"0.66565573",
"0.6634509",
"0.6631061",
"0.6625498",
"0.6614387",
"0.6595252",
"0.6592819",
"0.65912277",
"0.65562713",
"0.65562713",
"0.6554519",
"0.6553787",
"0.6552924",
"0.65481836",
"0.6523732",
"0.65116286",
"0.6485923",
"0.64808357",
"0.6477373",
"0.6477373",
"0.6477373",
"0.6477373",
"0.6475195",
"0.6461866",
"0.6459501",
"0.6451064",
"0.64445674",
"0.64405906",
"0.6438774",
"0.6434603",
"0.64333504",
"0.6433003",
"0.6426998",
"0.64265865",
"0.6420753",
"0.6417434",
"0.6390802",
"0.6390664",
"0.63896096",
"0.63859564",
"0.6379149",
"0.6354624",
"0.63536185",
"0.6352434",
"0.6347917",
"0.6333693",
"0.63244486",
"0.6323754",
"0.6319495",
"0.6304962",
"0.62996566",
"0.629122",
"0.628361",
"0.6265917",
"0.62609345",
"0.6255668",
"0.62537986",
"0.6251984",
"0.6250711",
"0.6249456",
"0.62472844",
"0.6245065",
"0.6243705",
"0.62432724",
"0.6237011",
"0.62298554",
"0.62290996",
"0.62254256",
"0.6218667",
"0.6216766",
"0.62166333",
"0.6209248",
"0.62077105",
"0.6190168",
"0.6178075",
"0.6176693",
"0.61689425",
"0.6165409",
"0.61578757"
] | 0.71327114 | 4 |
doubles array length and rehash items whenever the load factor is reached | private void rehash() {
int oldSize = this.size;
int newSize = size * 2;
while (!isPrime(newSize))
newSize++;
this.size = newSize;
DataItem[] newHashArray = new DataItem[newSize];
String temp;
this.collision = 0;
Boolean repeatValue;
for (int i = 0; i < oldSize; i++) {
if (hashArray[i] != null && hashArray[i] != deleted)
temp = hashArray[i].value;
else
continue;
repeatValue = false;
int hashVal = hashFunc(temp);
boolean collisionFlag = false;
while (newHashArray[hashVal] != null
&& !newHashArray[hashVal].value.equals(deleted.value)) {
if (!collisionFlag) {
this.collision++;
collisionFlag = true;
}
hashVal++;
hashVal = hashVal % size;
}
if (repeatValue)
continue;
else {
newHashArray[hashVal] = hashArray[i];
}
}
this.hashArray = newHashArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void rehash( )\n {\n HashEntry<AnyType> [ ] oldArray = array;\n\n // Create a new double-sized, empty table\n allocateArray( 2 * oldArray.length );\n occupied = 0;\n theSize = 0;\n\n // Copy table over\n for( HashEntry<AnyType> entry : oldArray )\n if( entry != null) {\n \tput(entry.key, entry.value);\n }\n }",
"private void rehash() {\n\t HashEntry[] oldArray = array;\n\n\t // Create a new double-sized, empty table\n\t allocateArray(2 * oldArray.length);\n\t occupied = 0;\n\t theSize = 0;\n\n\t // Copy table over\n\t for (HashEntry entry : oldArray) {\n\t if (entry != null && entry.isActive)\n\t add(entry.element);\n\t }\n\t }",
"@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\r\n\t\tprivate void rehash() {\r\n\t\t\t// double size of array\r\n\t\t\tTableElement<K, V>[] NewDictionary = (TableElement<K, V>[]) new TableElement[dictionary.length * 2];\r\n\r\n\t\t\tcurrentCapacity = dictionary.length * 2;\r\n\r\n\t\t\t// re-mod the keys to get new hash\r\n\t\t\tfor (int i = 0; i < dictionary.length; i++) {\r\n\t\t\t\tif (dictionary[i] != null) {\r\n\t\t\t\t\tint newHash = (Math.abs(dictionary[i].getKey().hashCode()) % currentCapacity);\r\n\r\n\t\t\t\t\t// put re-hashed keys into new array\r\n\t\t\t\t\twhile (NewDictionary[newHash] != null) {\r\n\t\t\t\t\t\tint probe = getProbed(newHash);\r\n\t\t\t\t\t\tnewHash = (newHash + probe) % currentCapacity;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tTableElement element = dictionary[i];\r\n\t\t\t\t\tNewDictionary[newHash] = element;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// set old dictionary to new dictionary\r\n\t\t\tthis.dictionary = NewDictionary;\r\n\t\t}",
"protected static void rehash() \r\n\t{\r\n\t\tEntry\told, e;\r\n\t\tint\t\ti, index;\r\n\r\n\t\tEntry\toldMap[] = m_table;\r\n\t\tint\t\toldCapacity = oldMap.length;\r\n\r\n\t\tint newCapacity = oldCapacity * 2 + 1;\r\n\t\tEntry newMap[] = new Entry[newCapacity];\r\n\r\n\t\tm_threshold = (int)(newCapacity * m_loadFactor);\r\n\t\tm_table = newMap;\r\n\r\n\t\tfor (i = oldCapacity ; i-- > 0 ;) {\r\n\t\t\tfor (old = oldMap[i] ; old != null ; ) {\r\n\t\t\t\te = old;\r\n\t\t\t\told = old.m_next;\r\n\r\n\t\t\t\tindex = (e.m_name.hashCode() & 0x7FFFFFFF) % newCapacity;\r\n\t\t\t\te.m_next = newMap[index];\r\n\t\t\t\tnewMap[index] = e;\r\n\t\t\t}\r\n\t\t}\r\n }",
"protected void rehash() {\n int oldCapacity = table.length;\n Entry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n Entry newMap[] = new Entry[newCapacity];\n\n threshold = (int) (newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity; i-- > 0; ) {\n for (Entry old = oldMap[i]; old != null; ) {\n Entry e = old;\n old = old.next;\n\n int index = (e.key & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"private void doubleSize() {\n\t\tint[] arr2 = new int[2 * arr.length];\n\t\tfor (int i = 0; i < arr.length; ++i) {\n\t\t\tarr2[i] = arr[i];\n\t\t}\n\t\tarr = arr2;\n\t}",
"private void rehashing(boolean increase){\r\n int newLength;\r\n // if loadFactor is too big. //\r\n if (increase){\r\n newLength = capacity()*CAPACITY_CHANGE;\r\n }\r\n // if loadFactor is too small. //\r\n else{newLength = capacity()/CAPACITY_CHANGE;}\r\n // builds the new hashSet with the new capacity. //\r\n ClosedHashCell[] newHashSet = new ClosedHashCell[newLength];\r\n buildHashSet(newLength, newHashSet);\r\n for (ClosedHashCell cell : hashSet){\r\n if (cell.getValue() != null) {\r\n int j = 0;\r\n int clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n while (!newHashSet[clamping].addMe(cell.getValue())) {\r\n j++;\r\n clamping = (cell.getValue().hashCode() + (j+j*j) / 2) & (newLength - 1);\r\n }\r\n }\r\n }\r\n hashSet = newHashSet;\r\n }",
"protected void rehash() {\n int oldCapacity = table.length;\n ServerDescEntry oldMap[] = table;\n\n int newCapacity = oldCapacity * 2 + 1;\n ServerDescEntry newMap[] = new ServerDescEntry[newCapacity];\n\n threshold = (int)(newCapacity * loadFactor);\n table = newMap;\n\n for (int i = oldCapacity ; i-- > 0 ;) {\n for (ServerDescEntry old = oldMap[i] ; old != null ; ) {\n ServerDescEntry e = old;\n old = old.next;\n\n int index = (e.desc.sid & 0x7FFFFFFF) % newCapacity;\n e.next = newMap[index];\n newMap[index] = e;\n }\n }\n }",
"private void rehash() {\n if (rehashing) {\n int newCapacity = 2 * capacity + 1;\n if (newCapacity > MAXIMUM_CAPACITY) {\n return;\n }\n\n objectCounter += 2;\n MapElement[] newMap = new MapElement[newCapacity]; \n \n MapElement me = null;\n MapElement t = null;\n MapElement next = null;\n int newIndex = 0;\n \n for (int index = 0; index < capacity; index++) {\n me = map[index];\n while (me != null) {\n next = me.getNext();\n newIndex = me.getKey() % newCapacity;\n if (newIndex < 0) {\n newIndex = -newIndex;\n }\n if (newMap[newIndex] == null) {\n // No element yet for this new index\n newMap[newIndex] = me;\n me.setNext(null);\n } else {\n // Hook the element into the beginning of the chain\n t = newMap[newIndex];\n newMap[newIndex] = me;\n me.setNext(t);\n }\n me = next;\n }\n }\n \n map = newMap;\n capacity = newCapacity;\n // Max. number of elements before a rehash occurs\n maxLoad = (int) (loadFactor * capacity + 0.5f);\n\n newMap = null;\n }\n }",
"void updateLoad(){\n\t\tdouble aloadFactor = elements/Table.length;\r\n\t\tif(aloadFactor==1){\r\n\t\t\tRehash();\r\n\t\t}\r\n\t\tloadFactor = ((double)elements)/Table.length;\r\n\t}",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate void rehash()\r\n\t{\r\n\t\tint M = table.length;\r\n\t\tMapEntry<K, V>[] origTable = table; // save original\r\n\t\t\r\n\t\t//new table\r\n\t\ttable = new MapEntry[2*M + 1];\r\n\t\tcount = 0;\r\n\t\tmaxCount = table.length - table.length/3;\r\n\t\t\r\n\t\tfor (MapEntry<K, V> oe : origTable)\r\n\t\t{\r\n\t\t\tMapEntry<K, V> e = oe;\r\n\t\t\tif (e != null && e != DUMMY) // No need to rehash dummy\r\n\t\t\t{\r\n\t\t\t\tint slot = findSlot(e.getKey(), true);\r\n\t\t\t\ttable[slot] = e;\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void rehash() {\r\n\t\tSystem.out.println( \"rehashing : buckets \" + numBuckets + \" size \" + size );\r\n\t\tArrayList<MapNode<K, V>> temp = buckets;\r\n\t\tbuckets = new ArrayList();\r\n\t\tfor( int i = 0; i < 2*numBuckets; i++ ) {\r\n\t\t\tbuckets.add( null );\r\n\t\t}\r\n\t\tsize = 0; //size 0 means abi ek b element nhi h\r\n\t\tnumBuckets *= 2; //ab number of buckets double ho gya h\r\n\t\t//now we will trvrs old arraylist and linkedlist and\r\n\t\t//copy is elemenet one by one\r\n\t\tfor( int i = 0; i < temp.size(); i++ ) {\r\n\t\t\tMapNode< K, V > head = temp.get(i);\r\n\t\t\twhile( head != null ) {\r\n\t\t\t\t\r\n\t\t\t\tK key = head.key;\r\n\t\t\t\tV value = head.value;\r\n\t\t\t\tinsert( key, value );\r\n\t\t\t\thead = head.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"synchronized protected void enlargeArrays() {\n \t\tenlargeArrays(5);\n \t}",
"public void _increaseTableSize(){\n\t\tNode[] largerBuckets = new Node[_numBuckets * 2 + 1];\r\n\t\tNode[] oldBuckets = _buckets;\r\n\t\t_buckets = largerBuckets;\r\n\t\t_numBuckets = _numBuckets * 2 + 1;\r\n\t\t_count = 0;\r\n\t\t_loadFactor = 0.0;\r\n\t\tint i = 0;\r\n\t\tfor(Node eachNode : oldBuckets){\r\n\t\t\t_buckets[i] = eachNode;\r\n\t\t\ti++;\r\n\t\t}\r\n\t}",
"private void rehash() {\r\n Entry[] oldHashTable = this.hashTable;\r\n this.capacity = this.capacity * 2;\r\n this.hashTable = new Entry[this.capacity];\r\n this.size = 0;\r\n for (Entry eachEntry : oldHashTable) {\r\n if (eachEntry != null) {\r\n if (!eachEntry.isDeleted) {\r\n this.add((K)eachEntry.key,(V)eachEntry.value);\r\n }\r\n }\r\n }\r\n return;\r\n }",
"public void reSize() {\n int newSize = arr.length * 2;\n arr = Arrays.copyOf(arr, newSize);\n }",
"private void reallocateIfOverfilled() {\r\n\t\tif ((size * 1.0 / table.length) > MAX_FULLNESS_PERCENTAGE) {\r\n\t\t\treallocateArray();\r\n\t\t}\r\n\t}",
"private void rehash() {\n Entry<K, V>[] old = table;\n allocate((int) (old.length * INC));\n\n for (int i = 0; i < old.length; ++i) {\n if (old[i] != null) {\n for (Node<Pair<K, V>> j = old[i].list.getHead().getNext();\n j != old[i].list.getTail();\n j = j.getNext()) {\n put(j.getData().key, j.getData().value);\n }\n\n }\n }\n }",
"protected void rehash() {\n // TODO: fill this in.\n //double number of maps, k, each time it is called\n\t\t//use MyBetterMap.makeMaps and MyLinearMap.getEntries\n\t\t//collect entries in the table, resize the table, then put the entries back in\n\t\tList<MyLinearMap<K, V>> newmaps = MyBetterMap.makeMaps(maps.size()*2);\n\t\tfor(MyLinearMap<K, V> curr: this.maps) {\n\t\t\tfor(Entry ent: MyLinearMap.getEntries()) {\n\t\t\t\tnewmaps.put(ent.key, ent.value);\n\t\t\t}\n\t\t}\n\t\tthis.maps = newmaps;\n\t\treturn;\n\t}",
"private void resize() {\r\n capacity = capacity*2;\r\n IDictionary<K, V>[] temp = chains;\r\n chains = makeArrayOfChains(capacity);\r\n for (int i = 0; i < capacity/2; i++) {\r\n if (temp[i]!=null) {\r\n IDictionary<K, V> each = temp[i];\r\n for (KVPair<K, V> element: each) {\r\n putKV(element);\r\n load--;\r\n }\r\n }\r\n }\r\n \r\n }",
"private void increaseSize() {\n data = Arrays.copyOf(data, size * 3 / 2);\n }",
"private void rehash() {\n LinkedList<Entry<K,V>>[] oldTable = table;\n table = new LinkedList[oldTable.length * 2 + 1];\n numKeys = 0;\n for (LinkedList<Entry<K, V>> list : oldTable) {\n if (list != null) {\n for (Entry<K,V> entry : list) {\n put(entry.getKey(), entry.getValue());\n numKeys++;\n }\n }\n }\n }",
"private void rehash(double growthFactor) {\n \tsize=0;\n \tint newBuckets = (int) Math.round(Math.max(buckets.length*growthFactor, MIN_BUCKETS));\n \t\n \tLinkedList<Entry> tempEntries = new LinkedList<Entry>();\n \t\n \tfor(int i=0;i<buckets.length;i++) {\n \t\tLinkedList<Entry> tempBucket = buckets[i];\n \t\t\n \t\twhile(!tempBucket.isEmpty()) {\n \t\t\tEntry tempEntry = tempBucket.get(0);\n \t\t\t\n \t\t\ttempEntries.add(tempEntry);\n \t\t\ttempBucket.remove(0);\n \t\t\t\n \t\t}\n \t\t\n \t}\n \t\n \tinitBuckets(newBuckets);\n \t\n \tfor(int i=0;i<tempEntries.size();i++) {\n \t\tput(tempEntries.get(i).getKey(), tempEntries.get(i).getValue());\n \t}\n }",
"private void reallocateDoubleCapacity() {\n\t\tObject oldElements[] = elements;\n\t\tcapacity *= reallocateFactor;\n\t\tsize = 0;\n\t\telements = new Object[capacity];\n\n\t\tfor (Object object : oldElements) {\n\t\t\tthis.add(object);\n\t\t}\n\t}",
"void Rehash(){\n\t\tRehash++;\r\n\t\t//updates if the hash table changed size\r\n\t\tStockNode[] temp=new StockNode[(2*Table.length)+1];\r\n\t\t//creates a temporary table with the new size \r\n\t\tfor(int i=Table.length-1;i>=0;i--){\r\n\t\t\t//goes through each array linked list \r\n\t\t\tStockNode t=Table[i];\r\n\t\t\twhile(t!=null){\r\n\t\t\t\t//the change of node to its new proper place is done here \r\n\t\t\t\tint key = toInt(t.stockName);\r\n\t\t\t\tint index = key%temp.length;\r\n\t\t\t\tif(temp[index]!=null){\r\n\t\t\t\t\tStockNode next=temp[index].next;\r\n\t\t\t\t\twhile(next!=null){\r\n\t\t\t\t\t\ttemp[index]=next;\r\n\t\t\t\t\t\tnext=temp[index].next;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ttemp[index].next=t;\r\n\t\t\t\t} else{\r\n\t\t\t\t\ttemp[index]=t;\r\n\t\t\t\t}\r\n\t\t\t\tStockNode next=t.next;\r\n\t\t\t\tt.next=null;\r\n\t\t\t\tt=next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tTable=temp;\r\n\t}",
"public void rehash(){\n //creates a new temporary hashtable since arrays are immutable\n LLNodeHash[] temp = hashTable;\n //doubles the size of the current hashtable\n hashTable = new LLNodeHash[hashTable.length * 2];\n for (int i = 0; i < temp.length; i++){\n //if the index of the array has an element\n if (temp[i] != null){\n LLNodeHash ptr = temp[i];\n //traverse the linked list and adds each word back to the new hashtable incase they have a new position\n while (ptr.getNext() != null){\n LLNodeHash word = new LLNodeHash(ptr.getKey(), ptr.getFreq(), null);\n add(word);\n ptr = ptr.getNext();\n }\n //adds the last element to the new hashtable\n LLNodeHash word = new LLNodeHash(ptr.getKey(), ptr.getFreq(), null);\n add(word);\n }\n }\n }",
"private void resize() {\n if ((double) size / buckets.length > LOADFACTOR) {\n HashTableChained newTable = new HashTableChained(2 * buckets.length);\n for (int i = 0; i < buckets.length; i++) {\n SListNode current = (SListNode) buckets[i].front();\n try {\n while (current.isValidNode()) {\n Entry entry = (Entry) current.item();\n newTable.insert(entry.key(), entry.value());\n current = (SListNode) current.next();\n }\n } catch(InvalidNodeException e1) {\n System.err.println(\"Tried to use invalid node.\");\n }\n }\n buckets = newTable.buckets;\n largePrime = newTable.largePrime;\n }\n }",
"@SuppressWarnings(\"unchecked\")\n private void upSize()\n {\n T[] newArray = (T[]) new Object [theArray.length * 2];\n for (int i =0; i < theArray.length; i++){\n newArray[i] = theArray[i];\n }\n theArray = newArray;\n }",
"private void reHash(int a){\r\n int arrayNewSize = this.capacity();\r\n if(a == 1){\r\n arrayNewSize = arrayNewSize * 2;\r\n }\r\n else if(a == -1){\r\n arrayNewSize = arrayNewSize / 2;\r\n }\r\n String[] newHashTable = new String[arrayNewSize];\r\n String [] oldCopy = this.hashTable.clone();\r\n this.capacity = arrayNewSize;\r\n this.hashTable = newHashTable;\r\n for(String i: oldCopy){\r\n this.reHashAdd(i);\r\n }\r\n this.hashing = false;\r\n }",
"static void initializeArray2() {\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tRandom r = new Random();\n\t\t\tint val = r.nextInt(m);\n\t\t\t// Hash implementation\n\t\t\tint mod = val % m;\n\t\t\tarray[mod] = val;\n\t\t\tresult[1]++;\n\t\t}\n\t}",
"protected void rehash( )\r\n\t{\r\n\t\tint newSize = nextPrime(this.tableSize*2);\r\n\t\tMyHashTable<T> newHashTable = new MyHashTable<T>(newSize);\r\n\t\tIterator<T> thisTableIter = this.iterator();\r\n\t\twhile(thisTableIter.hasNext())\r\n\t\t{\r\n\t\t\tT e = thisTableIter.next();\r\n\t\t\tnewHashTable.insert(e);\r\n\t\t}\r\n\t\tthis.clear();\r\n\t\tthis.size = newHashTable.size;\r\n\t\tthis.tableSize = newHashTable.tableSize;\r\n\t\tthis.table = newHashTable.table;\r\n\t}",
"private void arrayIncreaaseSize(MyArrayList myArrayList, Results results) {\r\n int old_size = myArrayList.length();\r\n int value;\r\n Random rand = new Random();\r\n \r\n for(int i=0; i<50; i++) {\r\n value = rand.nextInt(10000);\r\n if(value < 0) {\r\n value = value * -1;\r\n }\r\n myArrayList.insertSorted(value);\r\n }\r\n if(myArrayList.length() == old_size + 25) {\r\n results.storeNewResult(\"ArrayIncrease test case: PASSED\");\r\n }\r\n else {\r\n results.storeNewResult(\"ArrayIncrease test case: FAILED\");\r\n }\r\n }",
"private void rehash(int newCapacity) {\n byte[] oldKeys = keys;\n V[] oldVals = values;\n\n keys = new byte[newCapacity];\n @SuppressWarnings({ \"unchecked\", \"SuspiciousArrayCast\" })\n V[] temp = (V[]) new Object[newCapacity];\n values = temp;\n\n maxSize = calcMaxSize(newCapacity);\n mask = newCapacity - 1;\n\n // Insert to the new arrays.\n for (int i = 0; i < oldVals.length; ++i) {\n V oldVal = oldVals[i];\n if (oldVal != null) {\n // Inlined put(), but much simpler: we don't need to worry about\n // duplicated keys, growing/rehashing, or failing to insert.\n byte oldKey = oldKeys[i];\n int index = hashIndex(oldKey);\n\n for (;;) {\n if (values[index] == null) {\n keys[index] = oldKey;\n values[index] = oldVal;\n break;\n }\n\n // Conflict, keep probing. Can wrap around, but never reaches startIndex again.\n index = probeNext(index);\n }\n }\n }\n }",
"private void doubleArray()\n\t{\n\t\tT[] oldList = list;\n\t\tint oldSize = oldList.length;\n\t\t\n\t\tlist = (T[]) new Object[2 * oldSize];\n\t\t\n\t\t// copy entries from old array to new, bigger array\n\t\tfor (int index = 0; index < oldSize; index++)\n\t\t\tlist[index] = oldList[index];\n\t}",
"public void rehash() {\r\n // Save a reference to origTable\r\n LinkedList<Entry<K,V>>[] origTable = mainTable;\r\n // Double capacity of this mainTable\r\n mainTable = new LinkedList[2 * origTable.length + 1];\r\n\r\n // Reinsert all items in origTable into expanded mainTable.\r\n numberOfKeys = 0;\r\n for (int i = 0; i < origTable.length; i++) {\r\n if (origTable[i] != null) {\r\n for (Entry<K,V> nextEntry : origTable[i]) {\r\n // Insert entry in expanded mainTable\r\n insert(nextEntry.key, nextEntry.value);\r\n }\r\n }\r\n }\r\n }",
"private void rehash(int newHasTableSize) {\n\t\t// allocate the new hash table and record a reference\n\t\t// to the current one in oldTable\n\t\tint newTableSize = nextPrime(newHasTableSize);\n\t\tAVLTree<T>[] newTable = new AVLTree[newTableSize];\n\t\tfor (int i = 0; i < newTableSize; i++)\n\t\t\tnewTable[i] = new AVLTree<T>();\n\n\t\tAVLTree<T>[] oldTable = table;\n\n\t\tint index;\n\n\t\t// cycle through the current hash table\n\t\tfor (int i = 0; i < table.length; i++) {\n\t\t\t// see if there is a linked list present\n\t\t\tif (table[i] != null) {\n\t\t\t\tIterator<T> iter = table[i].iterator();\n\t\t\t\tT currItem;\n\t\t\t\twhile (iter.hasNext()) {\n\t\t\t\t\tcurrItem = iter.next();\n\n\t\t\t\t\tindex = (currItem.hashCode() & Integer.MAX_VALUE)\n\t\t\t\t\t\t\t% newTableSize;\n\t\t\t\t\t// funcion hash para conocer la posicion del elemento.\n\n\t\t\t\t\tnewTable[index].add(currItem);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// the table is now newTable\n\t\ttable = newTable;\n\t\t// update the table threshold\n\t\ttableThreshold = (int) (table.length * maxLoadFactor);\n\t\t// let garbage collection get rid of oldTable\n\t\toldTable = null;\n\t}",
"private void rehash(int newCap) {\n System.out.println(\"ARGHHHH\");\n // make a new table of the new size, then iterate over the old\n // table and reinsert each entry.\n var oldTable = table;\n clear(newCap);\n for (var e : oldTable) {\n // skip nulls and tombstones.\n if (e != null) {\n this.bubbaPut(e.key, e.value);\n }\n }\n }",
"@Test(timeout=1000)\n\tpublic void testResize(){\n\t\tStudent[] array = new Student[7];\n\t\tarray[5] = s2; // This is the correct hash position of this student\n\t\tarray[6] = s4;\n\t\tarray[0] = s5;\n\t\tarray[3] = s1;\n\t\tarray[4] = s3;\n\t\thashmap.setArray(array);\n\t\thashmap.resize();\n\t\tint newsize = hashmap.getArray().length;\n\t\tassertEquals(\"resize() failed; length of new hash table is not the double of the old one\", 14, newsize);\n\t\tassertEquals(\"resize() failed; Student 2 is not at the correct index\", 12, getIndexOfStudent(hashmap, s2));\n\t\tassertEquals(\"resize() failed; Student 4 is not at the correct index\", 6, getIndexOfStudent(hashmap, s4));\n\t\tassertEquals(\"resize() failed; Student 5 is not at the correct index\", 5, getIndexOfStudent(hashmap, s5));\n\t\tassertEquals(\"resize() failed; Student 1 is not at the correct index\", 10, getIndexOfStudent(hashmap, s1));\n\t\tassertEquals(\"resize() failed; Student 3 is not at the correct index\", 11, getIndexOfStudent(hashmap, s3));\n\t}",
"public void rehash(String[] arrayOfKeys, String[] hashTable){\n int doubleInitialHashTableSize = hashTable.length * 2;\n HashFunction theFunc = new HashFunction(doubleInitialHashTableSize);\n int threshold = (int)(doubleInitialHashTableSize * LOAD_FACTOR);\n System.out.println(\"\\nThreshold was reached, new hashTable with size \" + doubleInitialHashTableSize);\n hashFunction(arrayOfKeys, theFunc.theArray, threshold);\n }",
"public void reallocateBuckets() { }",
"private void grow()\n\t{\n\t\tint temp[] = new int[count * 2];\n\t\tfor(int index = 0; index < count; index = index + 1)\n\t\t\ttemp[index] = array1[index];\n\t\tarray1 = temp;\n\t}",
"public void checkLoadFactor(){\n usedIndex = 0;\n tableSize = hashTable.length;\n //for loop to check how many indices of the hashtable are being used\n for (int i = 0; i < tableSize; i++){\n if (hashTable[i] != null){\n usedIndex++; \n }\n }\n loadFactor = ((double) usedIndex / (double) hashTable.length);\n //rehashes if the load factor is more than 0.75\n if (loadFactor > 0.75){\n rehash();\n }\n }",
"private void grow()\r\n\t{\r\n\t\tint [] temp = new int[count * 2]; // new array to hold the data\r\n\r\n\t\t// copy old data in new array\r\n\t\tfor (int i = 0; i < count; i++)\r\n\t\t\ttemp[i] = array[i];\r\n\r\n\t\tarray = temp; // update the new array\r\n\t}",
"public void doubleTable() \n\t{\n\t\tpowerOfListSize++;\n\t\tint newlength = (int)(Math.pow(2,powerOfListSize)); //Creates empty table twice the size of the current table\n\t\tint oldlength = length; //preserves old lengths value\n\t\tRecord[] TempTable = Table; //preserve table value\n\t\tTable = new Record[newlength]; //makes original table twice the size\n\t\tfor (int j = 0; j < newlength; j++){\n\t\t\tTable[j] = new Record(\" \"); //fill table with empty slots\n\t\t}\n\t\tlength = newlength; //sets length to the new length\n\t\tfor (int j = 0; j < oldlength; j++){\n\t\t\tif (TempTable[j].hash >0){\n\t\t\t\tTable = reinsert(Table, TempTable[j],newlength); //refills new table with all value from old table so they get hashed properly\n\t\t\t}\n\t\t}\n\t}",
"private void addSizeArray() {\n int doubleSize = this.container.length * 2;\n Object[] newArray = new Object[doubleSize];\n System.arraycopy(this.container, 0, newArray, 0, this.container.length);\n this.container = new Object[doubleSize];\n System.arraycopy(newArray, 0, this.container, 0, doubleSize);\n }",
"private void grow() {\n T[] arr_temp = (T[]) new Object[arr.length*2];\n for (int i=0; i<arr.length; i++){\n arr_temp[i] = arr[i];\n }\n arr = arr_temp;\n }",
"public void doubleSize()\r\n\t{\r\n \t\tint newSize = Stack.length * 2;\r\n\t Stack = Arrays.copyOf(Stack, newSize);\r\n\t}",
"private void allocateArray( int arraySize )\n {\n array = new HashEntry[ nextPrime( arraySize ) ];\n }",
"private void ensureCapacity() {\r\n\t\t\tdouble loadFactor = getLoadFactor();\r\n\r\n\t\t\tif (loadFactor >= CAPACITY_THRESHOLD)\r\n\t\t\t\trehash();\r\n\t\t}",
"public static void main(String[] args) { int n = 100000000;\n// Integer[] array = ArrayGenerator.randomGenerator(n, n);\n// Integer[] arr = Arrays.copyOf(array, array.length);\n// PerformanceSort.test(\"QuickSort\", array);\n// PerformanceSort.test(\"MergeSort\", arr);\n// Integer[] array1 = ArrayGenerator.orderGenerator(n);\n// Integer[] arr1 = Arrays.copyOf(array1, array1.length);\n// PerformanceSort.test(\"QuickSort\", array1);\n// PerformanceSort.test(\"MergeSort\", arr1);\n//\n int n = 5000000;\n Integer[] array = ArrayGenerator.randomGenerator(n, 3);\n Integer[] arr = Arrays.copyOf(array, array.length);\n\n PerformanceSort.test(\"QuickSort3\", array);\n PerformanceSort.test(\"QuickSort2\", arr);\n// Integer[] array = new Integer[]{1, 8, 7, 6, 4};\n// PerformanceSort.test(\"QuickSort2\", array);\n\n }",
"private void enlargeHashTable()\n {\n TableEntry<K,V>[] oldTable = hashTable;\n int oldSize = hashTable.length;\n int newSize = getNextPrime(oldSize + oldSize);\n\n // The case is safe because the new array contains null entries\n @SuppressWarnings(\"unchecked\")\n TableEntry<K, V>[] temp = (TableEntry<K, V>[]) new TableEntry[newSize];\n hashTable = temp;\n numberOfEntries = 0; // Reset size of dictionary, since it will be\n // incremented by add during rehash\n\n // Rehash dictionary entries from old array to the new and bigger\n // array; skip both null locations and removed entries\n for (int index = 0; index < oldSize; index++)\n {\n if ( (oldTable[index] != null) && oldTable[index].isIn() )\n add(oldTable[index].getKey(), oldTable[index].getValue());\n } // end for\n }",
"private void checkForReHash(int a){\r\n if(!this.hashing) {\r\n float ratio = (float )this.size() / (float)this.capacity();\r\n if (ratio > this.upperLoadFactor && a == 1) {\r\n this.hashing = true;\r\n this.reHash(1);\r\n } else if (ratio < this.lowerLoadFactor && a == -1) {\r\n this.hashing = true;\r\n this.reHash(-1);\r\n }\r\n }\r\n }",
"private MyHashMap<K,V> resize() {\n\t//resize hashmap\n\t\n\tint biggercapacity=(2*capacity)+1;\n\n\tMyHashMap<K,V> biggermap= new MyHashMap(biggercapacity,loadFactor);\n\t\n\t//rehash items\n\t\n\t\n\tfor(int i=0;i<this.capacity;i++) {\n\t for(MyEntry k:table[i]) {\n\t\tbiggermap.put(k.key, k.value);\n\t }\n\t}\n\tthis.capacity=biggercapacity;\n\tthis.table=biggermap.table;\n\treturn biggermap;\n }",
"private void allocateArray(int arraySize) {\n\t array = new HashEntry[nextPrime(arraySize)];\n\t }",
"private void grow() {\n int growSize = size + (size<<1);\n array = Arrays.copyOf(array, growSize);\n }",
"private synchronized void resize() {\n tableSize = 2 * tableSize;\n tableSize = nextPrime(tableSize);\n FlightDetails[] old = HT;\n\n HT = new FlightDetails[tableSize];\n count.set(0);\n\n for (FlightDetails oldFlightDetails : old) {\n if (oldFlightDetails != null) {\n FlightDetails flightDetails = oldFlightDetails;\n put(flightDetails);\n\n while (flightDetails.getNext() != null) {\n flightDetails = flightDetails.getNext();\n put(flightDetails);\n }\n }\n }\n }",
"public static void runHash(int size, int hash) {\r\n String hashNames[] = { \"\", \"Additive Hashing\",\r\n \"Multiplicative Hashing\", \"Rotate Additive Hashing\",\r\n \"Rotate Multiplicative Hashing\" };\r\n\r\n double percentToFill = .25;\r\n // for each num of elements to fill\r\n for (int j = 0; j < 6; j++) {\r\n double longestChainAve = 0;\r\n double aveChainAve = 0;\r\n double loadFactorAve = 0;\r\n double densityFactorAve = 0;\r\n for (int l = 0; l < 50; l++) {\r\n KeyValueGenerator kv = new KeyValueGenerator();\r\n HashFunction hs = new HashFunction(hash);\r\n StringIntReHashTable ah = new StringIntReHashTable(size, hs);\r\n String st;\r\n int n;\r\n // for each single element to add\r\n for (int i = 0; i < percentToFill * size; i++) {\r\n st = kv.getNextKey();\r\n n = kv.getNextValue();\r\n // System.err.println(st + \" \" + n);\r\n // System.err.println(i);\r\n ah.add(st, n);\r\n }\r\n\r\n longestChainAve += ah.getLongestChain();\r\n aveChainAve += ah.getAverageChain();\r\n loadFactorAve += ah.getLoadFactor();\r\n densityFactorAve += ah.getDensityFactor();\r\n\r\n }\r\n\r\n System.out.println(\"For \" + hashNames[hash]\r\n + \" with rehashing and size \" + size + \" filled up with \"\r\n + percentToFill * size + \" elements\");\r\n System.out\r\n .println(\"Average longest chain :\" + longestChainAve / 50);\r\n System.out.println(\"Average average chain :\" + aveChainAve / 50);\r\n System.out.println(\"Average load factor :\" + loadFactorAve / 50);\r\n System.out.println(\"Average denisity factor :\" + densityFactorAve\r\n / 50 + \"\\n\");\r\n percentToFill += .25;\r\n }\r\n\r\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate void increaseCapacity()\r\n\t{\r\n\t\t// Store a reference to the old table\r\n\t\tHashEntry<K, V>[] oldTable = table;\r\n\r\n\t\t// Attempt to resize the table\r\n\t\ttry\r\n\t\t{\r\n\t\t\t// Make a new table full of empty entries\r\n\t\t\ttable = new HashEntry[SIZES[++sizeIdx]];\r\n\t\t}\r\n\t\t// We have too many entries in the hash table: no more sizes left\r\n\t\tcatch (ArrayIndexOutOfBoundsException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Too many entries in hash table. Exiting.\");\r\n\t\t\tSystem.exit(4);\r\n\t\t}\r\n\r\n\t\tfor (int i = 0; i < oldTable.length; ++i)\r\n\t\t{\r\n\t\t\t// If we are at an entry with a key and value\r\n\t\t\tif (oldTable[i] != null && !oldTable[i].isTombstone)\r\n\t\t\t{\r\n\t\t\t\t// Add every value at that key to the bigger table\r\n\t\t\t\tfor (V value : oldTable[i].value)\r\n\t\t\t\t{\r\n\t\t\t\t\tinsert(oldTable[i].key, value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void rehash(){\n\t\tHashTable that = new HashTable(2 * this.table.length);\n\t\tfor (int i = 0; i < this.table.length; i++){\n\t\t\tif (this.table[i] != null){\n\t\t\t\tthat.addRecord(this.table[i].getValue());\n\t\t\t}\n\t\t}\n\t\tthis.table = that.table;\n\t\treturn;\n\t}",
"private void rehash(LinkedListString[] newLinked, int oldCapacity) {\n for (int i=0; i < oldCapacity; i++) {\n LinkedListString myList = linkedListStrings[i];\n if (myList == null)\n continue;\n\n ListIterator<String> myIterator = myList.listIterator();\n\n while (myIterator.hasNext()){\n String value = myIterator.next();\n int index = clamp(value);\n if (newLinked[index] == null)\n newLinked[index] = new LinkedListString();\n newLinked[index].add(value);\n }\n }\n }",
"private void growTable() {\n // Instantiate new array double the size\n LinkedList<Entry<K, V>>[] tmp = (LinkedList<Entry<K, V>>[]) new LinkedList<?>[this.array.length * 2];\n for (int i = 0; i < this.array.length; i++) {\n // Visit every chain of our current array\n if (this.array[i] != null) {\n // If there's a linked list there, instantiate a new linked list\n // with all the same key, values into the new, expanded array\n tmp[i] = new LinkedList<Entry<K, V>>(this.array[i]);\n }\n }\n // Set the current array to be the updated expanded array\n this.array = tmp;\n }",
"private double loadFactor()\n {\n double bucketsLength = buckets.length;\n return currentSize / bucketsLength;\n }",
"@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tObject[] newList = new Object[size * 2];\n\t\tfor (int i = 0; i < size(); i++) {\n\t\t\tnewList[i] = get(i);\n\t\t}\n\t\tlist = (E[]) newList;\n\t\tsize *= 2;\n\t}",
"private void resizeArray()\n {\n int[] temp = new int[integerList.length * 2];//Create new array with twice the size.\n for(int i = 0; i < integerList.length; i++)//Populate new array with data from old array\n {\n temp[i] = integerList[i];\n }\n integerList = temp;//Set the integerList to point to the new array.\n }",
"private void expand() {\n int capacity = newCapacity();\n IntIntMap h = new IntIntMap(capacity);\n for (int i = 0; i < entries.length; i += 2) {\n if (entries[i] != EMPTY) {\n h.put(entries[i], entries[i + 1]);\n }\n }\n this.entries = h.entries;\n this.threshold = h.threshold;\n this.modulo = h.modulo;\n this.modulo2 = h.modulo2;\n }",
"private void grow(int par1)\n {\n IntHashMapEntry[] ainthashmapentry = this.slots;\n int j = ainthashmapentry.length;\n\n if (j == 1073741824)\n {\n this.threshold = Integer.MAX_VALUE;\n }\n else\n {\n IntHashMapEntry[] ainthashmapentry1 = new IntHashMapEntry[par1];\n this.copyTo(ainthashmapentry1);\n this.slots = ainthashmapentry1;\n this.threshold = (int)((float)par1 * this.growFactor);\n }\n }",
"private void resize()\n {\n int [] result = new int[3];\n\n n *= 2; // resizing\n\n // Find first hash function;\n result = findHashValues(n);\n\n // if a hash function cannot be found with the current n, increase n by 1 until one can be found;\n while(result[2] == 0)\n {\n n += 1;\n result = findHashValues(n);\n }\n\n a1 = result[0];\n b1 = result[1];\n\n // Find second hash function\n if(a1 + 1 < n)\n result = findHashValues(a1 + 1, 0, n); // Ensure a different hash function is found\n else\n result = findHashValues(a1, b1 + 1, n);\n // Assume that another hash function can be found with the same n\n\n a2 = result[0];\n b2 = result[1];\n\n int [] temp1 = array1.clone();\n int [] temp2 = array2.clone();\n\n array1 = new int[n];\n array2 = new int[n];\n\n for(int elem : temp1)\n insert(elem);\n for(int elem : temp2)\n insert(elem);\n\n }",
"public void rehash() {\n\t\tArrayList<Node<MapPair<K, V>>> temp=buckets;\n\t\tbuckets=new ArrayList<>();\n\t\tfor(int i=0;i<2*temp.size();i++)\n\t\t{\n\t\t\tbuckets.add(null);\n\t\t}\n\t\tfor(Node<MapPair<K, V>> node:temp)\n\t\t{\n\t\t\tif(node!=null)\n\t\t\t{\n\t\t\t\twhile(node!=null)\n\t\t\t\t{\n\t\t\t\t\tput(node.data.key,node.data.value);\n\t\t\t\t\tnode=node.next;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public synchronized void reallocateBuckets() {\n final ItemNode<K,V>[] newBuckets = makeBuckets(2 * buckets.length);\n for (int hash=0; hash<buckets.length; hash++) {\n ItemNode<K,V> node = buckets[hash];\n while (node != null) {\n final int newHash = getHash(node.k) % newBuckets.length;\n ItemNode<K,V> next = node.next;\n node.next = newBuckets[newHash];\n newBuckets[newHash] = node;\n node = next;\n }\n }\n buckets = newBuckets;\n }",
"private void grow() {\n capacity *= 2;\n Object[] temp = new Object[capacity];\n for (int i = 0; i < values.length; i++) temp[i] = values[i];\n values = temp;\n }",
"public void reallocateBuckets() {\n lockAllAndThen(() -> {\n final ItemNode<K,V>[] newBuckets = makeBuckets(2 * buckets.length);\n for (int hash=0; hash<buckets.length; hash++) {\n ItemNode<K,V> node = buckets[hash];\n while (node != null) {\n final int newHash = getHash(node.k) % newBuckets.length;\n ItemNode<K,V> next = node.next;\n node.next = newBuckets[newHash];\n newBuckets[newHash] = node;\n node = next;\n }\n }\n buckets = newBuckets;\n });\n }",
"static long[] riddle(long[] arr) {\n // complete this function\n return arr;\n }",
"@SuppressWarnings(\"unchecked\")\n\tprotected void grow(){\n\t\t// makes new arraylist\n\t\tT[] temp = (T[]) new Object[data.length *2];\n\t\tfor(int i = 0; i < data.length; i++ ){\n\t\t\ttemp[i] = data[i];\n\t\t}\n\t\tdata = temp;\n\t}",
"private void reallocate() {\n\t\tthis.capacity *= 2;\n\t\tObject[] newElements = new Object[this.capacity];\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tnewElements[i] = this.elements[i];\n\t\t}\n\n\t\tthis.elements = newElements;\n\t}",
"private void increaseSize() {\r\n\t\tE[] biggerE = (E[]) new Object[this.capacity * 2];\r\n\t\tdouble[] biggerC = new double[this.capacity * 2];\r\n\t\tfor (int i = 0; i < this.size; i++) {\r\n\t\t\tbiggerE[i] = this.objectHeap[i];\r\n\t\t\tbiggerC[i] = this.costHeap[i];\r\n\t\t}\r\n\t\tthis.costHeap = biggerC;\r\n\t\tthis.objectHeap = biggerE;\r\n\t\tthis.capacity = this.capacity * 2;\r\n\t}",
"private void resizeUp() \n\t {\n\t\t int newSize = myArray.length * 2;\n\t\t myArray = Arrays.copyOf(myArray, newSize);\n\t }",
"private void init() {\n _capacity = 1 << 9;\n int holderSize = _capacity << 1;\n _keyValueHolder = new int[holderSize];\n _mask = holderSize - 1;\n _maxNumEntries = (int) (_capacity * LOAD_FACTOR);\n }",
"@SuppressWarnings(\"resource\")\n public static void doubleCapacity(String[] array){\n int wordCount = 0;\n int arrayGrowth = 500;\n array = new String[10];\n String strLine = null;\n while (strLine != null) {\n // Store the content into an array\n Scanner s = new Scanner(strLine);\n while (s.hasNext()) {\n if (array.length == wordCount) {\n // expand list\n array = Arrays.copyOf(array, array.length + arrayGrowth);\n }\n array[wordCount] = s.next();\n wordCount++;\n } \n }\n }",
"public void doubleArray() {\r\n\t\t\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tT[] temp=(T[]) new Object[item_count*2];\r\n\t\t\r\n\t\t// Copies elements from the initial array to a larger array\r\n\t\tfor(int i=0;i<item_count;i++) \r\n\t\t\ttemp[i]=arr[i];\r\n\t\tarr=temp;\r\n\t}",
"private void ensureCap(){\n T[] temp = (T[])new Object[arr.length * 2];\n for(int i = 0; i < numItems; i++){\n temp[i] = this.arr[i];\n }\n this.arr = temp;\n }",
"private void ensureCapacity()\n\t{\n\t\tif (elements.length == size)\n\t\t\telements = Arrays.copyOf(elements, 2 * size + 1);\n\t}",
"private void reallocate() {\n capacity = 2 * capacity;\n ElementType[] newData = (ElementType[]) new Object[DEFAULT_INIT_LENGTH];\n System.arraycopy(elements, 0, newData, 0, size);\n elements = newData;\n }",
"private void shrink() {\n int shrinkSize = array.length>>1;\n array = Arrays.copyOf(array, shrinkSize);\n }",
"public void reallocate()\r\n\t{\r\n\t\tE[] newArray = (E[]) new Object[capacity * 2];\r\n\t\tint i = 0;\r\n\t\tfor(i = 0; i < this.size(); i++)\r\n\t\t{\r\n\t\t\tnewArray[i] = innerArray[(front + i) % capacity];\r\n\t\t\tSystem.out.println((front + i) % capacity);\r\n\t\t}\r\n\t\tfront = 0;\r\n\t\trear = this.size() - 1;\r\n\t\tcapacity = capacity * 2;\r\n\t\tinnerArray = newArray;\r\n\t}",
"private int getDoubleSize() {\n int oddNewSize = (sizeArray * 2) + 1;\n return primes.getNextPrime(oddNewSize);\n }",
"public void linearize() {\r\n Object[] temp = new Object[size];\r\n int k = start;\r\n for (int i = 0; i < size; i++) {\r\n temp[i] = cir[k];\r\n k = (k + 1) % cir.length;\r\n }\r\n cir = temp;\r\n }",
"private void resize(int cap) {\n Item[] temp = (Item[]) new Object[cap];\n for(int i = 0; i < size; i++)\n temp[i] = rqArrays[i];\n rqArrays = temp;\n }",
"private void ensureCapacity() {\n if ( top + 1 < storage.length ) {\n return;\n }\n storage = Arrays.copyOf( storage, storage.length * 2 );\n }",
"@SuppressWarnings(\"unchecked\")\r\n private void expand() {\r\n // if the capacity is 0, expand the table by adding 1 to capacity\r\n if (capacity == 0) {\r\n capacity = 1;\r\n hashTable = new LinkedList[capacity]; // New hash table with capacity of 1\r\n return;\r\n }\r\n\r\n int originalCapacity = capacity; // Capacity before expanding\r\n capacity *= 2;\r\n LinkedList<HashNode>[] newList = new LinkedList[capacity]; // New hash table with double capacity\r\n\r\n // iterate every element in the old hash table and rehash them back into the new hash table\r\n for (int i = 0; i < originalCapacity; i++) {\r\n // if the linked list in each node is not null, rehash all elements in it\r\n if (hashTable[i] != null) {\r\n for (HashNode node : hashTable[i]) {\r\n KeyType tempKey = node.key; // The node in the linked list\r\n int newIndex = hashFunction(tempKey); // index after rehashing the key\r\n // If the new index's linked list is null, create one and add the node.\r\n // Otherwise, directly add the node\r\n if (newList[newIndex] == null) {\r\n newList[newIndex] = new LinkedList<>();\r\n }\r\n newList[newIndex].add(new HashNode(node.key, node.value));\r\n }\r\n }\r\n }\r\n // assign the reference to the new hash table\r\n hashTable = newList;\r\n }",
"private void growSize() {\n size++;\n\n if (size > maxSize) {\n if (keys.length == Integer.MAX_VALUE) {\n throw new IllegalStateException(\"Max capacity reached at size=\" + size);\n }\n\n // Double the capacity.\n rehash(keys.length << 1);\n }\n }",
"private void resize(int newSize){\n Item[] temp = (Item[]) new Object[newSize]; //newsize\n for(int i=0; i<itemCount; i++){\n temp[i] = array[i]; // fill temp with array's stuff\n }\n array = temp; // reset array to temp\n }",
"private void reallocateArray() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tTableEntry<K, V>[] newTable = new TableEntry[table.length * 2];\r\n\t\tTableEntry<K, V> currentElement = null, nextElement = null;\r\n\r\n\t\tfor (int i = 0; i < size; i++) {\r\n\t\t\tif (table[i] == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tcurrentElement = table[i];\r\n\t\t\tnextElement = currentElement.next;\r\n\r\n\t\t\twhile (currentElement != null) {\r\n\t\t\t\tcurrentElement.next = null;\r\n\t\t\t\taddTableEntry(currentElement, newTable);\r\n\r\n\t\t\t\tcurrentElement = nextElement;\r\n\t\t\t\tnextElement = currentElement == null ? null : currentElement.next;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttable = newTable;\r\n\t}",
"private void doubleArraySizeBy(final int numberOfNewSize) {\n if (numberOfNewSize > 0) {\n int newSize = this.data.length * numberOfNewSize;\n this.data = Arrays.copyOf(this.data, newSize);\n }\n }",
"private void reallocate(){\n capacity = 2 * capacity;\n theData = Arrays.copyOf(theData, capacity);\n }",
"private double getLoadFactor() {\r\n\t\t\treturn numberOfElements / (double) currentCapacity;\r\n\t\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void growArray() {\n\t\tint tempSize = size * 2;\n\t\tE[] tempList = (E[]) new Object[tempSize];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\ttempList[i] = list[i];\n\t\t}\n\t\tlist = tempList;\n\t}",
"private void grow() { \n\n\t\tAccount[] temp = accounts;\n\t\taccounts = new Account[accounts.length+5];\n\t\t\n\t\tfor (int i = 0; i < temp.length; i++) {\n\t\t\taccounts[i] = temp[i];\n\t\t}\n\t\t\n\t}",
"public ArrayList<Person> hashLinearDeduplication(){\n\tArrayList<Person> unduplicated = new ArrayList<>();\n\tProbeHashMap<String, Person> map = new ProbeHashMap(SIZE);\n\t//The probe count is adapted to the implementation of the maps\n\t// and use of public instance variable probes() \n\tdouble average=0.0;\n\tint max = 0;\n\tint insertCount =0;\n\tfor(int i=0; i< this.lst.size(); i++){\n\t map.put(lst.get(i).getRef(),lst.get(i));\n\t //count insertions:\n\t insertCount++;\n\t //increment sum of probes:\n\t average += map.probes;\n\t //compute max # of probes:\n\t if ( map.probes >= max) max = map.probes;\n\t}\n\tSystem.out.println (\"Average number of probes: \"+ average/insertCount );\n\tSystem.out.println(\"Max number of probes: \"+ max);\n\tSystem.out.println(\"Load-factor: \"+ (double)map.size()/SIZE );\n\t//initialize iterator to collect singular suspects from the map:\n Iterator<Person> coll = map.values().iterator();\n\twhile(coll.hasNext()){\n\t Person suspect = coll.next();\n\t unduplicated.add(suspect);\n\t}\n\treturn unduplicated;\n }",
"public ArrayList<Person> hashDoubleDeduplication(){\n\tArrayList<Person> unduplicated1 = new ArrayList<>();\n\tDoubleHashMap<String, Person> map = new DoubleHashMap(SIZE);\n\t//The probe count is adapted to the implementation of the maps\n\t // and use of public instance variable probes() \n\tdouble average=0.0;\n\tint max = 0;\n\tint insertCount =0;\n\tfor(int i=0; i< this.lst.size(); i++){\n\t map.put(lst.get(i).getRef(),lst.get(i));\n\t //count insertions:\n\t insertCount++;\n\t //increment sum of probes:\n\t average += map.probes;\n\t //compute max # of probes:\n\t if ( map.probes >= max) max = map.probes;\n\t}\n\t//The following lines of codes were commented after usage in the first part of the assignment:\n\t//System.out.println (\"Average number of probes: \"+ average/insertCount );\n\t//System.out.println(\"Max number of probes: \"+ max);\n\t//System.out.println(\"Load-factor: \"+ (double)map.size()/SIZE );\n\t//initialize iterator to collect singular suspects from the map:\n\tIterator<Person> coll = map.values().iterator();\n\twhile(coll.hasNext()){\n\t Person suspect = coll.next();\n\t unduplicated1.add(suspect);\n\t}\n\treturn unduplicated1;\n }",
"private void resize(int newCapacity){\n ArrayList<ArrayList<Entry>> newBuckets = new ArrayList<>();\n for (int i = 0; i < newCapacity; i++) {\n newBuckets.add(new ArrayList<>());\n }\n\n for(K key:this){\n int newIndex=reduce(key,newCapacity);\n newBuckets.get(newIndex).add(new Entry(key,get(key)));\n\n }\n\n buckets=newBuckets;\n numBuckets=newCapacity;\n\n }"
] | [
"0.7486491",
"0.74441755",
"0.72908145",
"0.71931267",
"0.71269023",
"0.7040784",
"0.701818",
"0.69817734",
"0.6957143",
"0.6917363",
"0.6879119",
"0.66765857",
"0.6637685",
"0.66324204",
"0.6629219",
"0.6484063",
"0.64828366",
"0.64341253",
"0.6427248",
"0.63999903",
"0.6379808",
"0.6378206",
"0.6328911",
"0.6321213",
"0.6316287",
"0.6316176",
"0.6307137",
"0.62604475",
"0.62559557",
"0.62026775",
"0.6185858",
"0.61785823",
"0.6175012",
"0.6159102",
"0.6152079",
"0.6142969",
"0.6128187",
"0.608101",
"0.6066229",
"0.6056114",
"0.6048732",
"0.6045286",
"0.60350287",
"0.60250646",
"0.60154897",
"0.6012605",
"0.6002114",
"0.6001137",
"0.5990921",
"0.5990279",
"0.59742194",
"0.59595084",
"0.5955185",
"0.59479904",
"0.5941829",
"0.5931409",
"0.5931074",
"0.5911947",
"0.58862364",
"0.5879076",
"0.5866805",
"0.5865448",
"0.5850586",
"0.5845543",
"0.57979774",
"0.579343",
"0.5788817",
"0.5780405",
"0.57798904",
"0.5770758",
"0.576266",
"0.5752689",
"0.5735707",
"0.5719041",
"0.57157445",
"0.5697976",
"0.56967914",
"0.5674277",
"0.56715226",
"0.5671237",
"0.56657505",
"0.56598186",
"0.5659718",
"0.5656937",
"0.565426",
"0.56533575",
"0.56347054",
"0.56294227",
"0.5629303",
"0.5622287",
"0.56080794",
"0.56016576",
"0.5594477",
"0.55922717",
"0.5589664",
"0.5578422",
"0.5577099",
"0.5577021",
"0.55762035",
"0.5575992"
] | 0.7416668 | 2 |
To judge if the input argument is a prime | private boolean isPrime(int n) {
if (n == 1 || n == 2)
return true;
for (int i = 2; i < n; i++) {
if (n % i == 0)
return false;
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isPrime()\r\n\t{\r\n\t\tif (currentNumber == 2 || currentNumber == 0)\r\n\t {\r\n\t \tprocessLastDigit();\r\n\t\t\treturn true;\r\n\t }\r\n\t\telse if (currentNumber % 2 == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n \r\n\t for (int factor = 3; factor <= Math.sqrt(currentNumber); factor += 2)\r\n\t {\r\n\t if(currentNumber % factor == 0)\r\n\t {\r\n\t \treturn false;\r\n\t }\r\n\t }\r\n \tprocessLastDigit();\r\n\t return true;\r\n\t}",
"public static boolean isPrime(int n) \n{ \n//base case \nif (n <= 1) \nreturn false; \n//loop executes from 2 to n-1 \nfor (int i = 2; i < n; i++) \nif (n % i == 0) \n//returns false if the condition returns true \nreturn false; \n//returns true if the condition returns false \nreturn true; \n}",
"private static boolean isPrime(int x) {\n if (x<=1)\n return false;\n else\n return !isDivisible(x, 2);\n }",
"private boolean isPrime(int x) {\n for (int i = 2; i <= x / i; i++) {\n if (x % i == 0) {\n return false;\n }\n }\n return true;\n }",
"private boolean isprime(long i) {\n\t\t\n\t\tif(i<=2) \n\t\treturn true;\n\t\tfor(long n = 2;n< i;n++) {\n\t\t\tif(i%n ==0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"static boolean isPrime(int a){ //isPrime function evaluates if the int is prime takes int and returns boolean\n //logic:\n //a number is prime if no other number is divisible by it other than 1 and itself.\n //algorithim: modulos every number until n to see if is divisible and modulos == 0 \n //faster way: check everynumber up until half of the the number. ( int division will cut off the decimal ) since if it is double, it will also be divisible by 2\n //not, start the loop after 1 because 1 is neither prime nor composite\n if ( a == 1){\n System.out.println(\"Error: 1 is neither prime nor composite\");\n return false;\n }//end if\n for(int i = 2; i <= (a/2); i++){\n if(a % i == 0)//if the number is divisible by any number other than itself then it is not prime.\n return false;\n }//end for\n return true; //if the number succesfully passes through the loop then it is a prime number and return true\n \n }",
"public static boolean isPrime(int x){ \n\t\t\n\t\tfor(int i = 2; i <= Math.sqrt(x); i++){\n\t\t\tif(x%i == 0){\n\t\t\t return false; \n\t\t\t}\n\t\t}\t\n\t\treturn true; \t\n\t}",
"public boolean isPrime()\n\t{\n\t\treturn ! exactDivision;\n\t}",
"public static void main(String[]args){\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"n=\");\n int n = scanner.nextInt();\n boolean k = false;\n for(int i = 2; i <= Math.sqrt(n); ++i){\n if(n % i == 0){\n k = true;\n break;\n }\n }\n if(k){\n System.out.println(n + \" is not prime number\");\n }else{\n System.out.println(n + \" is prime number\");\n }\n }",
"public boolean isAPrimeNumber(int x){\n for(int i = 1; i <= x;i++){\n\n //if the mod = 0 then it is a divisor\n if(x % i == 0) {\n\n //increment count\n count++;\n\n }\n //if count is greater than 2 we return true because prime numbers\n //Can only be divisble by 1 and itself\n if(count > 2){\n\n return false;\n }\n\n\n\n }\n\n //If the entire loop finishes then we return true\n return true;\n }",
"static boolean isPrime(long num) {\n\t\tif(num==1)\n\t\t\treturn false;\n\t\tif(num==2 || num==3)\n\t\t\treturn true;\n\t\t\n\t\tif(num%2==0 || num%3==0)\n\t\t\treturn false;\n\t\t\n\t\tfor(int value=5; value*value<=num; value+=6)\n\t\t\tif(num%value==0 || num%(value+2)==0)\n\t\t\t\treturn false;\n\t\t\n\t\treturn true;\n\t}",
"public static boolean isPrime(int num){\n if(num<=1){\n return false;\n }\n for(int i=2;i<=(long)Math.sqrt(num) ; i++){\n if(num%i==0){\n return false;\n }\n }\n return true;\n }",
"private boolean isItPrime(int checkPrime) {\n\t\tint i;\n\t\t// We dont devide the number by itself or one\n\t\tfor (i = 2; i < checkPrime; i++) {\n\n\t\t\tif (checkPrime % i == 0) {\n\t\t\t\t// If there is no rest after modulus, the number is divisible\n\t\t\t\tSystem.out.println(\"\\nSorry, not a prime number\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"\\nLooks like you found a prime buddy!\");\n\t\treturn true;\n\t}",
"public static int is_prime(int num) {\n\t\t\n\t\t /* Initializes recursion */\n\t\treturn check_if_prime(num, firstprime);\n\t}",
"private boolean isPrime(long num) {\n if (num < 2) // prime numbers are positive and above 1\n return false;\n long max = (long) sqrt(num); // get the rounded square root of the number to check for primality\n for (int j = 2; j <= max; j++) {\n if (num % j == 0) {\n return false; // not a prime number as is divisible\n }\n }\n return true; // optimus prime :-)\n }",
"public void primeNumber(int a)\n { boolean result = false;\n int i;\n if(a!=1)\n {\n for( i=2;i<a;i++)\n {\n if(a%i==0)\n {\n break;\n }\n\n }\n if(a==i)\n {\n System.out.println(i);\n result=true;\n }\n }\n }",
"public static void main(String[] args) {\n\t\tint i = 2;\r\n\t\tint num = 5;\r\n\t\tint temp;\r\n\t\ttemp = num % i;\r\n\t\tif (temp == 0) {\r\n\t\t\tSystem.out.println(num + \" is not a Prime Number\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(num + \" is a Prime Number\");\r\n\t\t}\r\n\r\n\t}",
"public static boolean is_prime(long n){\n if(n == 1) return false;\n if(n == 2) return true;\n if(n % 2 == 0) return false;\n else{\n long sqrt = (long)Math.sqrt(n);\n boolean result = true;\n for(long i = 2; i <= sqrt; i++)\n if(n % i == 0)\n return false;\n }\n return true;\n }",
"private static boolean isPrime(long n) {\n\t\tboolean isPrime = true;\n\t\tif (n < 2) {\n\t\t\tisPrime = false;\n\t\t} else if (n == 2) {\n\t\t\tisPrime = true;\n\t\t} else if (n % 2l == 1) {\n\t\t\tisPrime = false;\n\t\t\tprimeLog.log(n + \" is divisible by 2\");\n\t\t}\n\t\t// Check n against all odd numbers greater than 2\n\t\tfor (int i = 3; isPrime && i * i <= n; i += 2) {\n\t\t\t// If n is divisible by i then n is not prime\n\t\t\tif (n % i == 0) {\n\t\t\t\tprimeLog.log(n + \" is divisible by \" + i);\n\t\t\t\tisPrime = false;\n\t\t\t}\n\t\t}\n\t\tglobalLog.appendToCurrent(\": \" + isPrime);\n\t\tglobalLog.stepOut();\n\t\tprimeLog.appendToCurrent(\": \" + isPrime);\n\t\treturn isPrime;\n\t}",
"static boolean isPrime(int number)\n {\n // Loop through and check if it is dividable with divisors\n for(int divisor = 2; divisor <= number / 2; divisor++)\n {\n if(number % divisor == 0)\n return false; // if it can be divided return false\n }\n\n return true; // if it cannot be divided return true\n }",
"public boolean isPrime(){\r\n\t\tfor (int i = 2; i<value; i++){\r\n\t\t\tif(value/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static PerformOperation isPrime() {\n return (num) -> {\n if (num < 2) { return false; }\n if (num == 2) { return true; }\n if (num % 2 == 0) { return false; }\n if (num < 9) { return true; }\n\n int max = (int) Math.sqrt(num);\n for (int i = 3; i <= max; i+=2) {\n if (num % i == 0) { return false; };\n }\n return true;\n };\n }",
"public static boolean isPrime(int num) {\n\n if (num <= 1) {\n return false;\n }\n\n if (num == 2) {\n return true;\n }\n\n for (int i = 3; i < num; i++) {\n\n if (num % i == 0) {\n return false;\n }\n\n }\n\n return true;\n\n }",
"private boolean isPrime(int n) {\r\n for (int divisor = 2; divisor < n; divisor++) {\r\n if (n % divisor == 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public static void primeCheck(int num){\n \n boolean divisible = false;\n for(int i = 2;i<num;i++){\n if(num%i==0&&num!=i){\n divisible = true;\n }\n }\n if(divisible==true){\n System.out.println(\"The number is not a prime.\");\n }\n else{\n System.out.println(\"The number is a prime.\");\n }\n }",
"private static boolean isPrime(long n)\r\n {\r\n //Variable that will be returned, by default true\r\n boolean prime = true;\r\n //Start at 3 and increment by 2\r\n for(int i = 3;i<n/2;i=i+2)\r\n {\r\n //If the remainder of the division of n by i is 0, return prime as false \r\n if(n%i==0)\r\n {\r\n prime = false;\r\n return prime;\r\n }\r\n }\r\n //return the default value if the program gets to here\r\n return prime;\r\n }",
"public static void main(String[] args) {\nSystem.out.println(\"introduce un numero\");\r\nScanner entrada = new Scanner(System.in);\r\nint num = entrada.nextInt();\r\n\r\nboolean esPrimo = true; \r\nfor (int i=2;i<num;i++){\r\n\tif (num%i==0){\r\n\t\tesPrimo = false;\r\n\t}\r\n}\r\n\r\nif (esPrimo){\r\n\tSystem.out.println(\"El número es primo\");\r\n}else{\r\n\tSystem.out.println(\"El número no es primo\");\r\n}\r\n\t}",
"private static boolean isPrime(int number) {\n\n\t\tif (number <= NUMBER_ONE) {\n\t\t\treturn false; \n\t\t}\n\n\t\tfor (int i = NUMBER_TWO; i < number; i++) {\n\t\t\tif (number % i == NUMBER_ZERO) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true; \n\t}",
"private static boolean isPrime(int number){\n for(int divisor = 2; divisor <= number / 2; divisor++){\n if(number % divisor == 0){ // If true. number is not prime\n return false;\n }\n }\n return true; // Number is prime\n }",
"private static boolean isPrime(int num) {\n\t\tfor(int divisor=2;divisor<=num/2;divisor++){\n\t\t\tif(num%divisor==0) return false;\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean isPrime(int value){\n if (value == 0 || value == 1){\n return false;\n }\n // Check all numbers up to the square root of the number\n for (int i = 2; i*i < value+1; i++) {\n if (value % i == 0) {\n return false;\n }\n }\n return true;\n }",
"public static boolean isPrime(int i) {\n\t\t\n\t\treturn false;\n\t}",
"static boolean isPrime(String number)\n {\n int num = Integer.valueOf(number);\n\n for(int i = 2; i * i <= num; i++)\n {\n if ((num % i) == 0)\n return false;\n }\n return num > 1 ? true : false;\n }",
"private boolean determinePrime(int num) {\n int temp;\n boolean isPrime = true;\n \n if(num <= 1)\n {\n isPrime = false;\n }\n else\n {\n for(int i = 2;i<=num/2; i++)\n {\n //divide the number by i, get the remainder \n temp = num % i;\n \n //if remainder is 0, the number is not prime\n if(temp == 0)\n {\n isPrime = false;\n break;\n }\n }\n }\n \n return isPrime;\n }",
"public boolean isPrime()\n\t{\n\t\treturn isPrime(value);\n\t}",
"public Boolean isPrime(int n) {\n if (n == 2) {\n return false;\n }\n if (n == 3) {\n return true;\n }\n if (n%2 == 0) {\n return false;\n }\n if (n%3 == 0) {\n return false;\n }\n\n int a = 5;\n int b = 2;\n\n while (a*a <= n) {\n if (n%a == 0) {\n return false;\n }\n a += b;\n b = 6 - b;\n }\n return true;\n }",
"private static boolean isPrimeInFunctionalApproach1(int num) {\n \n return num > 1 &&\n IntStream.range(2, num)\n .noneMatch(divisor -> num % divisor == 0);\n }",
"static boolean isPrime(int n)\n {\n if (n <= 1)\n return false;\n\n // Check if number is 2\n else if (n == 2)\n return true;\n\n // Check if n is a multiple of 2\n else if (n % 2 == 0)\n return false;\n\n // If not, then just check the odds\n for (int i = 3; i <= Math.sqrt(n); i += 2)\n {\n if (n % i == 0)\n return false;\n }\n return true;\n }",
"public static int check_if_prime(int num, int i) {\n\t\tif (num < firstprime)\n\t\t\treturn 0; \t\t\n\t\t\n\t\t// stop condition: didn't find divisors other than self and one\n\t\telse if (i > num - 1)\n\t\t\treturn 1; \t\t\n\t\t\n\t\t// stop condition: return since found a divisor\n\t\telse if (num % i == 0)\n\t\t\treturn 0; \t\t\n\t\t\n\t\t/* Continues recursion */\n\t\treturn check_if_prime(num, i + 1); \n\t}",
"public static boolean isPrime(MyInteger n1){\n return n1.isPrime();\n }",
"public static boolean isPrime(int x) {\n boolean isPrime = false;\n if (x > 1) {\n isPrime = true;\n for (int i = 2; i <= x / 2; ++i) {\n if (x % i == 0) {\n isPrime = false;\n break;\n }\n }\n }\n return isPrime;\n }",
"private static boolean isPrime( int n )\n {\n if( n == 2 || n == 3 )\n return true;\n\n if( n == 1 || n % 2 == 0 )\n return false;\n\n for( int i = 3; i * i <= n; i += 2 )\n if( n % i == 0 )\n return false;\n\n return true;\n }",
"public boolean primeCheck(Long n){\n\t\t//checks whether an int is prime or not.\n\t\t\n\t\t //check if n is a multiple of 2\n\t\t if (n%2==0) return false;\n\t\t //if not, then just check the odds\n\t\t for(int i=3;i*i<=n;i+=2) {\n\t\t if(n%i==0)\n\t\t return false;\n\t\t }\n\t\t \n\t\t return true;\n\t\t\n\t}",
"private static boolean isPrime(int n) {\n if (n%2==0) return false;\r\n //if not, then just check the odds\r\n for(int i=3;i*i<=n;i+=2) {\r\n if(n%i==0)\r\n return false;\r\n }\r\n return true;\r\n }",
"public static void main(String[] args) {\n\n\t\tint num = 29;\n\t\tboolean flag = false;\n\t\tfor(int i =2;i<=num/2;i++)\n\t\t{\n\t\t\tif(num%1==0)\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!flag)\n\t\t{\n\t\t\tSystem.out.println(\"it is prime number\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"it is not prime number\");\n\t\t}\n\t}",
"private boolean isPrime(long n) {\n return BigInteger.valueOf(n).isProbablePrime(10);\n }",
"private boolean isPrime(int number) {\n if (number < 2) return false;\n if (number == 2) return true;\n if (number % 2 == 0) return false;\n for (int i = 3; i * i <= number; i += 2)\n if (number % i == 0) return false;\n return true;\n }",
"public static boolean isPrime(int value) {\n /* counter keep track of number of modulo operation\n in prime number,the modulus returns 0 two times only\n 1.when it is devided by 1\n 2.when it is devided by it self \n */\n int counter = 0;\n // zero , one is not prime\n if (value == 0 || value == 1) {\n counter = 0;\n } else {\n // starting from 2,doing modulus operation\n for(int i = 2;i<=value;i++){\n if (value%i==0) {\n counter++;\n }\n }\n }\n // checking the counter,we done modulus starting from 2,so we don't have to consider 1st case\n // counter is one means the value is only devisible by it self(2nd case)\n if (counter==1) {\n return true;\n }\n // if the number is devisible by numbers other than one and the number it self,then it is not prime\n else{\n return false;\n } \n }",
"public static void main(String[] args) {\n\t\tint a=0;int flag=0;\r\n\t\tScanner s=new Scanner(System.in);\r\n\t\tSystem.out.println(\"enter the number\");\r\n\t\ta=s.nextInt(); \r\n\t\tfor(int i=2;i<a;i++){\r\n\t\t\tif(a%i==0){\r\n\t\t\t\tflag=2;\r\n\t\t}\r\n\t\tif(flag==2){\r\n\t\t\tSystem.out.println(\"it is not a prime number\");\r\n\t\t}else\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"it is a prime number\");\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private static boolean isPrime(int i) {\n\t\tif(i == 1) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfor (int j = 2; j <= i / 2; j++) {\n\t\t\tif (i % j == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"static boolean isPrime(long n)\n {\n // Corner cases\n if (n <= 1)\n return false;\n if (n <= 3)\n return true;\n \n // This is checked so that we can skip\n // middle five numbers in below loop\n if (n % 2 == 0 || n % 3 == 0)\n return false;\n \n for (int i = 5; i * i <= n; i = i + 6)\n if (n % i == 0 || n % (i + 2) == 0)\n return false;\n \n return true;\n }",
"public static boolean isPrime(int num) {\n for (int i = 2; i < num; i++) {\r\n if (num % i == 0) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public static boolean isPrime(final long n){\n if (n<=0){\r\n throw new IllegalArgumentException(\"Error in n: can't procces negative numbers.\");\r\n }\r\n if (n == 1){\r\n return false;\r\n }\r\n\r\n // Testing for all numbers\r\n for (long i = 2; i < n; i++) {\r\n if (n%i == 0){\r\n return false;\r\n }\r\n }\r\n //TODO: probando el TODO\r\n return true;\r\n\r\n }",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n for(int i=0; i <n;i++)\n {\n int num = sc.nextInt();\n if(isPrime(num)){\n System.out.println(\"Prime\");\n }\n else{\n System.out.println(\"Not prime\");\n }\n }\n }",
"static boolean isPrime(long n) {\n long sqrt = (long)Math.sqrt((double)n);\n int idx = Collections.binarySearch(SMALL_PRIMES, sqrt);\n return !IntStream.range(0, idx > 0 ? idx + 1 : (-idx - 1))\n .mapToLong(SMALL_PRIMES::get)\n .anyMatch(p -> n % p == 0L);\n }",
"private static boolean isPrime(int n) {\r\n if (n == 2)\r\n return true;\r\n if (n <= 1 || n % 2 == 0)\r\n return false;\r\n for (int i = 3; i <= Math.sqrt(n); i+=2) {\r\n if (n % i == 0)\r\n return false;\r\n }\r\n return true;\r\n }",
"public static void main(String args[]){\n if(args.length != 0 ){\n int n = Integer.parseInt(args[0]);\n if(n == 1 ||n ==0){\n System.out.println(n + \"is neither prime nor composite\");\n }else{\n int flag = 1;\n for(int i = 2;i < n/2;i++){\n if(n % i == 0){\n flag = 0;\n break;\n }\n }\n if(flag == 0) System.out.println(n + \"not prime\");\n else System.out.println(n + \" yes it is prime\");\n }}\n else{\n System.out.println(\"please enter the number\");\n }\n }",
"private boolean isPrime(long candidate) {\n\n\t\t\tlong sqrt = (long) Math.sqrt(candidate);\n\n\t\t\tfor (long i = 3; i <= sqrt; i += 2) {\n\t\t\t\tif (candidate % i == 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"private static boolean checkPrime(int size){\n boolean prime = true;\n //if can divide by two then it is not prime\n if (size%2==0) prime = false;\n //if not, then just check the odds as all even numbers are divisible by 2\n for(int i = 3; i*i <= size; i += 2) {\n if(size % i == 0)\n prime = false;\n }\n return prime;\n }",
"public static boolean isPrime(MyInteger number1){\r\n\t\tfor (int i = 2; i<number1.getInt(); i++){\r\n\t\t\tif(number1.getInt()/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"private static boolean isPrime(int n) {\n\t if(n == 2 || n == 3)\n\t return true;\n\n\t if(n == 1 || n % 2 == 0)\n\t return false;\n\n\t for (int i = 3; i * i <= n; i += 2) {\n\t if (n % i == 0)\n\t return false;\n\t }\n\t return true;\n\t }",
"public static boolean prime(long n) {\n\t\t\t//is n a multiple of 2?\n\t\t\tif (n == 1) return false;\n\t\t if (n % 2 == 0) return false;\n\t\t //if it isnt, check odd numbers\n\t\t for (int i = 3; i * i <= n; i += 2) {\n\t\t if(n % i == 0)\n\t\t return false;\n\t\t }\n\t\t return true; //n is prime\n\t\t}",
"private boolean isPrime(int candidate) {\r\n\t\t\tboolean isPrime = true;\r\n\r\n\t\t\t// numbers <= 1 or even are not prime\r\n\t\t\tif ((candidate <= 1))\r\n\t\t\t\tisPrime = false;\r\n\t\t\t// 2 or 3 are prime\r\n\t\t\telse if ((candidate == 2) || (candidate == 3))\r\n\t\t\t\tisPrime = true;\r\n\t\t\t// even numbers are not prime\r\n\t\t\telse if ((candidate % 2) == 0)\r\n\t\t\t\tisPrime = false;\r\n\t\t\t// an odd integer >= 5 is prime if not evenly divisible\r\n\t\t\t// by every odd integer up to its square root\r\n\t\t\t// Source: Carrano.\r\n\t\t\telse {\r\n\t\t\t\tfor (int i = 3; i <= Math.sqrt(candidate) + 1; i += 2)\r\n\t\t\t\t\tif (candidate % i == 0) {\r\n\t\t\t\t\t\tisPrime = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn isPrime;\r\n\t\t}",
"private boolean esPrimo(int n)\r\n {\r\n for (int i = 3; i < (int) Math.sqrt(n); i+=2) {\r\n if (n%i == 0) return false;\r\n }\r\n return true;\r\n }",
"public static boolean isPrime(int n) {\n \n if (n % 2 == 0) {\n return n == 2; //If n is divisible by 2, then it is prime only if n is 2\n }\n if (n % 3 == 0) {\n return n == 3; //If n is divisible by 3, then it is prime only if n is 3\n }\n int step = 4;\n int counter = (int)Math.sqrt(n) + 1; //The maximum number that needs to be checked is the square root of the candidate + 1\n for(int i = 5; i < counter; step = 6-step, i += step) {\n if (n % i == 0) {\n return false;\n }\n }\n \n return true;\n\n }",
"private static boolean isPrime(int n) {\n\t\t\n\t\tif (n <= 1) return false;\n\t\tfor (int i = 2; i * i <= n; i++) {\n\t\t\tif (n % i == 0) return false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"private boolean esPrimo(int pNumero)\r\n\t{\r\n\t\tboolean esPrimo = true;\r\n\t\tfor(int i=2; i<=pNumero/2 && esPrimo;i++)\r\n\t\t{\r\n\t\t\tif(pNumero%i == 0)\r\n\t\t\t{\r\n\t\t\t\tesPrimo = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn esPrimo;\r\n\t}",
"public boolean checkPrime(int n) {\n\t\tif (n <= 1) {\n\t\t\tSystem.out.println(\"Integer is not prime: \"+ n);\n\t\t\treturn false;\n\t\t}\n\t\tif (n == 2) {\n\t\t\tSystem.out.println(\"Integer is prime: \"+ n);\n\t\t\treturn true;\n\t\t}\n\t\tif (n % 2 == 0) {\n\t\t\tSystem.out.println(\"Integer is not prime: \"+ n);\n\t\t\treturn false;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n\t\t\tif (n % i == 0) {\n\t\t\t\tSystem.out.println(\"Integer is not prime: \"+ n);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"Integer is prime: \"+ n);\n\t\treturn true;\n\t}",
"private static boolean isPrimeNumber(double number) {\n\t\tif(number <= 0)\n\t\t\treturn false;\n\t\tif(number == 1)\n\t\t\treturn true;\n\t\t\t\n\t\tfor (double i = 2; i < number; i++) {\t\t\t\n\t\t\tif((number%i == 0))\n\t\t\t\treturn false;\t\t\t\t\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"static boolean checkIsPrime(int n) {\n for (int i = 2; i <= Math.sqrt(n); i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"public static boolean isPrime(BigInteger n) {\n\t\tglobalLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\tprimeLog.stepIn(\"isPrime(\" + n.toString() + \")\");\n\t\t// Use some other function if n is sufficiently small (n<=10^10)\n\t\tif (n.compareTo(BigInteger.valueOf(10000000000l)) <= 0) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is small enough to be checked normally.\");\n\t\t\treturn isPrime(n.longValue());\n\t\t} else if (!n.testBit(0)) {\n\t\t\tprimeLog.log(\"The number \" + n.toString() + \" is even so it is composite.\");\n\t\t\treturn false;\n\t\t}\n\t\tprimeLog.log(\n\t\t\t\t\"The number \" + n.toString() + \"is too large and will be checked with Rabin Miller primality test.\");\n\n\t\t// Find values to the equation n=2^s*m where s is as large as possible\n\t\tint s = 0;\n\t\t// Find out how many times we can divide (n-1) by 2\n\t\tBigInteger nMinusOne = n.subtract(BigInteger.ONE);\n\t\twhile (!nMinusOne.testBit(s)) {\n\t\t\ts++;\n\t\t}\n\t\t// Find k by calculating n>>s\n\t\tBigInteger m = nMinusOne.shiftRight(s);\n\t\tprimeLog.log(n.toString() + \" - 1 = 2^\" + s + \" * \" + m.toString());\n\n\t\tint prime = 0;\n\t\tint composite = 0;\n\n\t\t// Check to see if n is prime using base a\n\t\tlong maxValue = n.bitLength() > 63 ? Long.MAX_VALUE : n.longValue();\n\t\tfor (int i = 0; i < PRIMALITY_CHECK_ITERATIONS; i++) {\n\t\t\tprimeLog.stepIn(\"Trial \" + i);\n\t\t\tBigInteger a = BigInteger.valueOf(randomLong(2, maxValue - 2));\n\t\t\tprimeLog.log(\"Checking if n is prime using a=\" + a.toString() + \".\");\n\t\t\t// First iteration is a^m % n\n\t\t\tBigInteger res = a.modPow(m, n);\n\t\t\tprimeLog.log(\"a^m % n = \" + res.toString());\n\t\t\t// On first iteration if |a^m mod n| = 1 then say it is prime\n\t\t\tif (res.equals(BigInteger.ONE) || res.equals(nMinusOne)) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\tprimeLog.stepOut();\n\t\t\t\tprime++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tboolean flag = false;\n\t\t\tfor (int j = 1; !flag && j < s; j++) {\n\t\t\t\tres = res.modPow(BigInteger.valueOf(2), n);\n\t\t\t\tprimeLog.log(\"a^(2^\" + j + \" * m) % n = \" + res.toString());\n\t\t\t\tif (res.equals(BigInteger.ONE)) {\n\t\t\t\t\t// If a^[(2^j)*m] % n = 1 then we say is is composite\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\t\tcomposite++;\n\t\t\t\t\tflag = true;\n\t\t\t\t} else if (res.equals(nMinusOne)) {\n\t\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is prime.\");\n\t\t\t\t\t// If a^[(2^j)*m] % n = -1 then we say is is prime\n\t\t\t\t\tprime++;\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!flag) {\n\t\t\t\tprimeLog.log(\"We can declare that \" + n.toString() + \" is composite.\");\n\t\t\t\tcomposite++;\n\t\t\t}\n\t\t\tprimeLog.stepOut();\n\t\t}\n\t\tprimeLog.log(\"Out of \" + (prime + composite) + \" trials, \" + prime + \" trials claimed n was prime.\");\n\t\tprimeLog.log(\"n is prime: \" + (prime > composite));\n\t\tglobalLog.appendToCurrent(\": \" + (prime > composite));\n\t\tglobalLog.stepOut();\n\t\tprimeLog.appendToCurrent(\": \" + (prime > composite));\n\t\treturn prime > composite;\n\t}",
"private static boolean isPrime( int n )\n\t{\n\t\tif( n == 2 || n == 3 )\n\t\t\treturn true;\n\n\t\tif( n == 1 || n % 2 == 0 )\n\t\t\treturn false;\n\n\t\tfor( int i = 3; i * i <= n; i += 2 )\n\t\t\tif( n % i == 0 )\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public static boolean isPrime(int number){\r\n\t\t//Start loop from too to exclude division by 1\r\n\t\tint i = 2;\r\n\t\twhile(i < number){\r\n\t\t\tif(number % i == 0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static boolean isPrime(int num) {\r\n\t\tassert num >= 2 : \"failed precondition. num must be >= 2. num: \" + num;\r\n\t\tfinal double LIMIT = Math.sqrt(num);\r\n\t\t//is Prime is set true if num is 2 or if num is odd number\r\n\t\tboolean isPrime = (num == 2) ? true : num % 2 != 0;\r\n\t\tint div = 3;\r\n\t\t//if isPrime is false ( which will happen for all even numbers ) this loop is not entered\r\n\t\t//all odd numbers greater than 2 will enter this loop and we will be in loop until \r\n\t\t//isPrime set to false because we found a factor or till we reach the LIMI i.e. sqrt and that point\r\n\t\t//we exit loop with truy and return that, if we exit before that we return with false\r\n\t\twhile(div <= LIMIT && isPrime) {\r\n\t\t\tisPrime = num % div != 0;\r\n\t\t\tdiv += 2;\r\n\t\t}\r\n\t\treturn isPrime;\r\n\t}",
"public static boolean isPrimeNumber(int num) {\r\n\t\t\t\r\n\t\tif(num<=1) {\r\n\t\treturn false;\r\n\t\t}\r\n\t\tfor(int i=2;i<num;i++) {\r\n\t\t\t\r\n\t\t\tif(num%i==0) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t\t\r\n\t\t}",
"private static boolean isPrime(final int n)\n\t{\n\t\tif ((n == 2) || (n == 3))\n\t\t\treturn true;\n\n\t\tif ((n == 1) || ((n & 1) == 0))\n\t\t\treturn false;\n\n\t\tfor (int a = 3; a * a <= n; a += 2)\n\t\t\tif ((n % a) == 0)\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public static boolean isPrime(int n)\n {\n for(int i = 1; i < n/2; i++)\n {\n if(n%i == 0)\n return false;\n }\n return true;\n }",
"public static boolean Prime(int numb) {\n\n\t\t// petlja koja prolazi sve brojeve do datog broja i koja provejrava da\n\t\t// li je broj prost\n\t\tfor (int n = 2; n < numb; n++) {\n\t\t\t// uslov ukoliko je broj djeljiv sa nekim drugim brojem osim sa 1 i\n\t\t\t// sam sa sobom vracamo false\n\t\t\tif (numb % n == 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\t\t// ukoliko uslov nije tacan vracamo true tj da je broj prost\n\t\treturn true;\n\t}",
"private static boolean isPrime(final int number)\n {\n return number > 1 &&\n IntStream\n .range(2, number - 1)\n .noneMatch(new IntPredicate()\n {\n @Override\n public boolean test(final int value)\n {\n return number % value == 0;\n }\n });\n }",
"public static boolean isPrime(int n) {\n for(int i=2;i<n;i++) {\n if(n%i==0)\n return false;\n }\n return true;\n }",
"public static boolean isPrime(int n) {\n\t\tif (n <= 1) {\n\t\treturn false;\n\t\t}\n\t\tint numberOfDivisor = 0;\n\t\tfor (int i = 1; i <= n; i++) {\n\t\tif (n % i == 0) {\n\t\tnumberOfDivisor++;\n\t\t}\n\t\t}\n\t\t// Divisor is only 1 and itself.\n\t\treturn numberOfDivisor == 2;\n\t\t}",
"public static boolean isPrime(int number){\r\n\t\tfor (int i = 2; i<number; i++){\r\n\t\t\tif(number/i==0){\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"public static boolean isPrime(int num)\n {\n //test for numbers less than 2 because they aren't prime\n if(num < 2)\n {\n return false;\n }\n //test to see if the number has factors\n for(int i = 2; i < num; i ++)\n {\n if(num % i == 0) \n return false;\n }\n \n return true;\n }",
"private static boolean isPrime(int n) {\n\t\t//check if n is less than 2\n\t\tif (n<2) return false;\n\t\t//check if n is equal 2\n\t\tif (n==2) return true;\n\t\t//check if n is a multiple of 2\n\t\tif (n%2==0) return false;\n\t\t//if not, then just check the odds\n\t\tfor(int i=3;i*i<=n;i+=2) {\n\t\t\tif(n%i==0)\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public void isPrime(int num)\r\n\t{\r\n\t\tboolean check;\r\n\t\tcheck=checkNumber(num);\r\n\t\tif(check)\r\n\t\t System.out.printf(\"%s\",toString());\r\n\t\telse\r\n\t\t\tSystem.out.printf(\"%d is not prime\",number);\r\n\t\t\t \r\n\t\t\t\r\n\t\t\t\r\n\t}",
"public int primetest(int primenumber){ // method tests if number is prime\n\t\tfor (int j=2; j < prime.size()+2; j++){\n\t\t\tif ((primenumber % prime.get(j-2)) == 0){\n \t \t\t\treturn 0;\n \t \t\t}\n \t\t}\n \t\tprime.add(prime.size(), primenumber);\n \t\treturn 1;\n\n\t}",
"protected static boolean isPrime(int n )\r\n\t{\r\n\t\tif( n == 2 || n == 3 )\r\n\t\t\treturn true;\r\n\t\tif( n == 1 || n % 2 == 0 )\r\n\t\t\treturn false;\r\n\t\tfor( int i = 3; i * i <= n; i += 2 )\r\n\t\t\tif( n % i == 0 )\r\n\t\t\t\treturn false;\r\n\t\treturn true;\r\n\t}",
"private static boolean isPrime(int n) {\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\n\t\tif (n == 1 || n % 2 == 0)\n\t\t\treturn false;\n\n\t\tfor (int i = 3; i * i <= n; i += 2)\n\t\t\tif (n % i == 0)\n\t\t\t\treturn false;\n\n\t\treturn true;\n\t}",
"public static void checkPrime(int n ) {\n int i, m = 0, flag = 0;\n m = n / 2;\n\n\n if (n == 0 || n == 1) {\n System.out.println(n + \" is not a prime number\");\n } else {\n for (i = 2; i < 100; i++) {\n if (n % i == 0) {\n System.out.println(n + \" is not prime number\");\n flag = 1;\n break;\n }\n }\n\n if (flag == 0) {\n System.out.println(n + \"is a prime number\");\n }\n }\n }",
"public static void main(String[] args) {\n\t\t\r\n\t\t Scanner sc = new Scanner(System.in);\r\n\t\t int n = sc.nextInt();\r\n\t\t int i=2;\r\n\t\t int fl=0;\r\n\t\t while(i<n&&fl==0)\r\n\t\t {\r\n\t\t if(n%i==0)\r\n\t\t {\r\n\t\t System.out.println(\"Not Prime\");\r\n\t\t fl=1;\r\n\t\t \r\n\t\t }\r\n\t\t i++;\r\n\t\t }\r\n\t\t if(fl==0){\r\n\t\t System.out.println(\"Prime\"); \r\n\t\t }\r\n\t\t }",
"public static String isPrime(int a) {\n\n /*\n * For loop that iterates starting with the number 2 and determines if the\n * modulus of int a and \"i\" is zero or not. Also checks if a number is odd or\n * even with a modulo check\n */\n for (int i = 2; i < a; i++) {\n\n // Empty string to hold Odd or Even determination message\n String message = \"\";\n\n if (a % i == 0 && a % 2 == 0) {\n message = \" But it's Even!\";\n return \"Not a prime Number...\" + message;\n } else if (a % i == 0 && a % 2 != 0) {\n message = \" and it's Odd!\";\n return \"Not a prime number...\" + message;\n }\n }\n return \"That's a prime Number!\";\n }",
"static void checkPrime(){\n\t\tint n1=78;\r\n\t}",
"private static boolean isPrimeLambda(int number) {\t\t\n\t\treturn number > 1 && IntStream.range(2, number).noneMatch(index -> number % index == 0);\n\t}",
"@Test\n public void testPrimeNumberChecker() {\n System.out.println(\"Parameterized Number is : \" + inputNumber);\n assertEquals(expectedResult,\n primo.validate(inputNumber));\n }",
"public static boolean prime(int[] mainArray) {\r\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\t//input\r\n\t\tSystem.out.println(\"Enter one positive integer: \");\r\n\t\tint input1 = sc.nextInt();\r\n\r\n\t\t//variables\r\n\t\tint div = 2;\r\n\t\tint result1;\r\n\t\tboolean prime;\r\n\r\n\t\t//calculates if the number is a prime number\r\n\t\tdo {\r\n\r\n\t\t\tresult1 = input1 % div;\r\n\t\t\tdiv ++; //counter for the divider\r\n\r\n\t\t\tif (result1 == 0 && div != input1 + 1)\r\n\t\t\t\tbreak;\r\n\r\n\t\t\telse\r\n\t\t\t\tresult1 = 1;\r\n\r\n\t\t} while (div < input1);\r\n\r\n\t\tif (result1 == 0) \r\n\t\t\tprime = false;\r\n\r\n\t\telse\r\n\t\t\tprime = true;\r\n\r\n\t\treturn prime;\r\n\t}",
"public void setIsPrime()\n\t{\n\t\tint divisor = 2;\n\t\tdo\n\t\t{\n\t\t\tif (number % divisor == noRemainder)\n\t\t\t{\n\t\t\t\texactDivision = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\texactDivision = false;\n\t\t\t}\n\t\t\tdivisor++;\n\t\t} while (divisor < number && exactDivision == false);\n\t}",
"public static boolean isPrime(int n) \n\t{\n\t\tif (n < 2) return false;\n\t\tif (n==2) return true;\n\t if (n%2==0) return false;\n\t \n\t for(int i=3; i*i<=n; i+=2) \n\t {\n\t if(n%i==0)\n\t return false;\n\t }\n\t \n\t return true;\n\t}",
"boolean ePrimo(int n) {\n \n if (n < 2) {\n return false;\n }\n \n \n // Guarda o numero de divisores de n. Inicialmente eh 1. Todos os numeros\n // sao divisiveis por 1\n \n int numeroDeDivisores = 1;\n \n // O primeiro candidato a divisor nao trivial eh 2.\n \n int candidatoADivisor = 2;\n \n // Testa a divisao por todos os numeros menores ou iguais a n/2 ou ate \n // encontrar o primeiro divisor.\n \n while((candidatoADivisor <= Math.sqrt(n)) && (numeroDeDivisores == 1)) {\n if (n % candidatoADivisor == 0) {\n // o resto da divisao eh zero. Logo, candidatoADivisor eh um divisor de n. \n // Por isso, que o numero de divisores eh incrementado em 1.\n numeroDeDivisores = numeroDeDivisores + 1;\n }\n candidatoADivisor = candidatoADivisor + 1;\n }\n \n if (numeroDeDivisores == 1) {\n return true;\n }\n else {\n return false;\n }\n }",
"public static boolean isPrime(int n) {\n\n if(n == 1) { // if int n is the number 1 it cannot be prime by definition\n return false; // hence return false\n }\n\n for (int l = 2; l <= n/2; l++) { // set i = to 2 because we know 1 goes into every prime,\n if (n % l == 0) { // then increment i because you only want to test if numbers go into n up to half the value of n.\n return false; // i.e., after checking if 50 goes into 100, you don't need to keep checking beyond 50\n } // if a number is even it's not prime except 2\n } // keep incrementing i and see if larger and larger numbers divide evenly into n\n // if they do, return false, because it's not prime\n return true; // otherwise, return 2\n // anytime loop is exited, we know it's prime\n }",
"public boolean isPrime(int n) {\r\n //check if n is a multiple of 2\r\n if (n % 2 == 0) return false;\r\n //if not, then just check the odds\r\n for (int i = 3; i * i <= n; i += 2) {\r\n if (n % i == 0)\r\n return false;\r\n }\r\n return true;\r\n }"
] | [
"0.7565909",
"0.7488154",
"0.7477011",
"0.74352485",
"0.7373716",
"0.7308728",
"0.7296629",
"0.71905655",
"0.71792185",
"0.71726376",
"0.7159884",
"0.7152485",
"0.7121019",
"0.7095414",
"0.70857906",
"0.7076528",
"0.70572746",
"0.70475596",
"0.70386267",
"0.70323217",
"0.7024854",
"0.70204234",
"0.70076925",
"0.70045996",
"0.70034254",
"0.7002722",
"0.70021355",
"0.699797",
"0.6997708",
"0.69974136",
"0.6996249",
"0.6995944",
"0.6995918",
"0.6994486",
"0.6983032",
"0.697475",
"0.6967179",
"0.6966168",
"0.69629514",
"0.6961447",
"0.696072",
"0.69558084",
"0.6952837",
"0.69408655",
"0.6939511",
"0.69363546",
"0.6934103",
"0.69281083",
"0.692773",
"0.6913981",
"0.6911765",
"0.69110405",
"0.69102675",
"0.6906623",
"0.69027454",
"0.6897565",
"0.68968725",
"0.6893111",
"0.68874186",
"0.6885373",
"0.6884557",
"0.6870606",
"0.6867848",
"0.68447214",
"0.684327",
"0.68345195",
"0.6828452",
"0.6825194",
"0.6823839",
"0.68209934",
"0.68205565",
"0.68142205",
"0.6803111",
"0.67935604",
"0.6784227",
"0.6777363",
"0.67765594",
"0.67727554",
"0.6765106",
"0.6764109",
"0.6762899",
"0.6762802",
"0.6753315",
"0.67469895",
"0.67456734",
"0.67447543",
"0.67263424",
"0.672315",
"0.67199874",
"0.67154044",
"0.6714174",
"0.6712666",
"0.6712055",
"0.67096955",
"0.6702591",
"0.66965246",
"0.66959405",
"0.66893524",
"0.6688764",
"0.6685331"
] | 0.676152 | 82 |
Create a new index. | public static Index create(String name, Path path) {
try {
Files.createDirectory(path.resolve(INDEX));
return new Index(name, path);
} catch (IOException e) {
throw new IOFailureException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IndexCreated createIndex(String name, Index index) throws ElasticException;",
"public void createIndex(Index index) {\n Span span = this.tracer.buildSpan(\"Client.CreateIndex\").start();\n try {\n String path = String.format(\"/index/%s\", index.getName());\n String body = index.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating index\");\n } finally {\n span.finish();\n }\n }",
"String createIndex() {\n\t\tboolean res = indexExists();\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode;\n\t\tif (!res) {\n\t\t\tresCode = doHttpOperation(esIndexUrl, HTTP_PUT, null);\n\t\t}\n\t\treturn lastResponse;\n\t}",
"public void createIndex(Configuration configuration){\n }",
"InstAssignIndex createInstAssignIndex();",
"public void createIndex() {\n String indexName = INDEX_BASE + \"-\" +\n LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMddHHmmss\"));\n\n Settings settings = Settings.builder()\n .put(\"number_of_shards\", 1)\n .put(\"number_of_replicas\", 0)\n .build();\n CreateIndexRequest request = new CreateIndexRequest(indexName, settings);\n\n String mapping = \"{\\n\" +\n \" \\\"article\\\": {\\n\" +\n \" \\\"properties\\\": {\\n\" +\n \" \\\"title\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"author\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"issue\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"link\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"description\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"postDate\\\": {\\n\" +\n \" \\\"type\\\": \\\"date\\\",\\n\" +\n \" \\\"format\\\": \\\"yyyy-MM-dd\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\";\n\n request.mapping(\"article\", mapping, XContentType.JSON);\n request.alias(new Alias(INDEX_BASE));\n\n try {\n CreateIndexResponse createIndexResponse = this.client.admin().indices().create(request).get();\n if (!createIndexResponse.isAcknowledged()) {\n throw new ElasticExecutionException(\"Create java_magazine index was not acknowledged\");\n }\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error while creating an index\", e);\n throw new ElasticExecutionException(\"Error when trying to create an index\");\n }\n }",
"boolean createIndex(String indexName);",
"public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}",
"private void createIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // check required params / attributes\n \n // REQUIRED: The name of the collection for which to create the index\n String collection = helper.getMandatoryString(msg.body(), MSG_PROPERTY_COLLECTION, msg);\n if (collection == null) return;\n\n // REQUIRED: A JSON representation of the index (see ArangoDB docs for details)\n JsonObject document = helper.getMandatoryObject(msg.body(), MSG_PROPERTY_DOCUMENT, msg);\n if (document == null) return;\n\n if (!ensureAttribute(document, DOC_ATTRIBUTE_TYPE, msg)) return;\n if (!document.getString(DOC_ATTRIBUTE_TYPE).equals(TYPE_CAP)) {\n if (!ensureAttribute(document, DOC_ATTRIBUTE_FIELDS, msg)) return;\n }\n\n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName);\n apiPath.append(API_PATH);\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n\n httpPost(persistor, apiPath.toString(), headers, document, timeout, msg);\n }",
"private void createIndex(final String index, int numShards, int numReplicas) throws IOException {\n LOGGER.warn(\"CREATE ES INDEX {} with {} shards and {} replicas\", index, numShards, numReplicas);\n final Settings indexSettings = Settings.builder().put(\"number_of_shards\", numShards)\n .put(\"number_of_replicas\", numReplicas).build();\n CreateIndexRequest indexRequest = new CreateIndexRequest(index, indexSettings);\n getClient().admin().indices().create(indexRequest).actionGet();\n\n final String mapping = IOUtils.toString(\n this.getClass().getResourceAsStream(\"/elasticsearch/mapping/map_person_5x_snake.json\"));\n getClient().admin().indices().preparePutMapping(index)\n .setType(getConfig().getElasticsearchDocType()).setSource(mapping, XContentType.JSON).get();\n }",
"@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n Index entity = TestUtils.getTestIndex();\n IndexResponse result = instance.create(entity);\n assertNotNull(result);\n assertEquals(entity.getDatabaseName(), result.getIndex().getDatabaseName());\n assertEquals(entity.getName(), result.getIndex().getName());\n assertEquals(entity.getTableName(), result.getIndex().getTableName());\n assertEquals(entity.getFields(), result.getIndex().getFields());\n }",
"public void createIndex(final String name) {\n createIndex(new BasicDBObject(name, 1));\n }",
"public boolean createIndex() {\n RestClient client = esrResource.getClient();\n\n try {\n Response r = client.performRequest(\"HEAD\", \"/\" + index);\n\n if (r.getStatusLine().getStatusCode() != 200) {\n client.performRequest(\"PUT\", \"/\" + index);\n\n return true;\n }\n } catch (IOException ioe) {\n getMonitor().error(\"Unable to create index\", ioe);\n }\n\n return false;\n }",
"public void start() throws Exception {\n\n createIndex();\n }",
"public com.guidewire.datamodel.IndexDocument.Index addNewIndex()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().add_element_user(INDEX$12);\r\n return target;\r\n }\r\n }",
"public void createIndex(final DBObject keys) {\n createIndex(keys, new BasicDBObject());\n }",
"public SimpleIndexFactory() {\n\t}",
"public void createIndex() throws IOException {\n\t\tindexWriter.commit();\n\t\ttaxoWriter.commit();\n\n\t\t// categories\n\t\tfor (Article.Facets f : Article.Facets.values()) {\n\t\t\ttaxoWriter.addCategory(new CategoryPath(f.toString()));\n\t\t}\n\t\ttaxoWriter.commit();\n\n\t\tfinal Iterable<Article> articles = articleRepository.findAll();\n\t\tint c = 0;\n\t\tfor (Article article : articles) {\n\t\t\taddArticle(indexWriter, taxoWriter, article);\n\t\t\tc++;\n\t\t}\n\t\t// commit\n\t\ttaxoWriter.commit();\n\t\tindexWriter.commit();\n\n\t\ttaxoWriter.close();\n\t\tindexWriter.close();\n\n\t\ttaxoDirectory.close();\n\t\tindexDirectory.close();\n\t\tLOGGER.debug(\"{} articles indexed\", c);\n\t}",
"public void createIndex() throws IOException {\n\t\tLOGGER.info(\"creating photo index...\");\n\t\tCreateIndexRequest request = new CreateIndexRequest(\"files\");\n\t\tInputStream in = getClass().getClassLoader().getResourceAsStream(\"photo.json\");\n\t\tString mapping = new String(in.readAllBytes());\n\t\tin.close();\n\t\trequest.mapping(\"photo\", mapping, XContentType.JSON);\n\t\tCreateIndexResponse response = client.indices().create(request);\n\t\tLOGGER.info(\"photo index created: \" + response.toString());\n\t}",
"@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }",
"indexSet createindexSet();",
"IndexNameReference createIndexNameReference();",
"public void addIndex() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"index\",\n null,\n childrenNames());\n }",
"public CreateIndexRequest prepareCreate(String index) {\n \treturn new CreateIndexRequest(hClient, index);\n }",
"LuceneMemoryIndex createLuceneMemoryIndex();",
"public void createIndex(final DBObject keys, final String name) {\n createIndex(keys, name, false);\n }",
"public synchronized void createIndexIfNeeded(final String index) throws NeutronCheckedException {\n try {\n if (!doesIndexExist(index)) {\n LOGGER.warn(\"ES INDEX {} DOES NOT EXIST!!\", index);\n createIndex(index, NUMBER_OF_SHARDS, NUMBER_OF_REPLICAS);\n\n // Give Elasticsearch a moment to catch its breath.\n Thread.sleep(2000); // NOSONAR\n }\n } catch (InterruptedException | IOException e) {\n throw JobLogs.checked(LOGGER, e, \"CREATE INDEX FAILED! {}\", e.getMessage());\n }\n }",
"boolean isNewIndex();",
"public createIndex_result(createIndex_result other) {\n }",
"public createIndex_args(createIndex_args other) {\n }",
"public void createIndexOnProcessName() throws ServiceFailureException;",
"private void createProductIndex() {\n\t\tLinkedList<String> ids = new LinkedList<>(productIds.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<>(productIds.values());\n\t\tint k = 8;\n\t\tKFront kf = new KFront();\n\t\tkf.createKFront(k, ids);\n\t\tfor (int i = 0; i < vals.size(); i++) {\n\t\t\tkf.getTable().get(i).addAll(vals.get(i));\n\t\t}\n\n\t\tProductIndex pIndex = new ProductIndex(k);\n\t\tpIndex.insertData(kf.getTable(), kf.getConcatString());\n\t\tsaveToDir(PRODUCT_INDEX_FILE, pIndex);\n\t}",
"public String createDSIndex(String dsID, String dschemaID, String attriName);",
"public void enableIndexAutoCreation() {\n client.setIndexAutoCreationEnabled(true);\n }",
"public generateIndex() {\n\n\t\tthis.analyzer = \"StandardAnalyzer\";\n\t}",
"private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }",
"public H_index() {\n\t\tsuper();\n\t}",
"private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }",
"public void createIndex(final DBObject keys, final DBObject options) {\n try {\n executor.execute(createIndexOperation(keys, options), getReadConcern());\n } catch (MongoWriteConcernException e) {\n throw createWriteConcernException(e);\n }\n }",
"public void ensureIndex(Index index) {\n try {\n createIndex(index);\n } catch (HttpConflict ex) {\n // pass\n }\n }",
"public static boolean createIndex(String appid) {\n\t\treturn createIndex(appid, Para.getConfig().elasticsearchRootIndexShards(), Para.getConfig().elasticsearchRootIndexReplicas());\n\t}",
"public void beforeIndexCreated(Index index) {\n\n }",
"public com.guidewire.datamodel.IndexDocument.Index insertNewIndex(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().insert_element_user(INDEX$12, i);\r\n return target;\r\n }\r\n }",
"private void createTokenIndex(){\n\t\tLinkedList<String> tokens = new LinkedList<>(tokenDict.keySet());\n\t\tArrayList<ArrayList<Integer>> vals = new ArrayList<>(tokenDict.values());\n\t\tint k = 8;\n\n\t\tKFront kf = new KFront(true);\n\t\tkf.createKFront(k, tokens);\n\n\t\tTokensIndex tIdx = new TokensIndex(k, this.dir);\n\t\ttIdx.insertData(kf.getTable(), vals, kf.getConcatString());\n\n\t\tsaveToDir(TOKEN_INDEX_FILE, tIdx);\n\t}",
"public void createIndexesIfNotExists(String indexName) throws IOException {\n\t\ttry {\n\t\t\tclient.admin().indices().prepareCreate(indexName).execute().actionGet();\n\t\t} catch (Exception e) {\n\t\t}\n\t\tcreateMappings();\n\t\tclient.admin().indices().refresh(new RefreshRequest(indexName)).actionGet();\n\t}",
"public void addIndex(String collectionName, DBObject index){\n DBCollection collection =this.getDBCollection(collectionName);\n collection.createIndex(index);\n }",
"public boolean createIndex(String index, Settings.Builder builder) throws IOException {\n CreateIndexRequest request = new CreateIndexRequest(index);\n if (null != builder) {\n request.settings(builder);\n }\n return createIndex(request);\n }",
"public void create(String indexerName,\n String workingDir,\n String namingPrefix,\n int recordPerFile,\n int recordByteSize)\n throws DataOrderingException;",
"public Index initIndex(String indexName) {\n return new Index(this, indexName);\n }",
"public void start() throws Exception {\n if (!getClient().admin().indices().exists(Requests.indicesExistsRequest(INDEX_NAME)).actionGet().isExists()) {\n getClient().admin().indices().prepareCreate(INDEX_NAME).execute().actionGet().isAcknowledged();\n }\n\n //Create mapping for the key. Leave it not_analyzed so it doesn't tokenize the \"-\" delimiters\n PutMappingResponse response = getClient().admin().indices()\n .preparePutMapping(INDEX_NAME)\n .setType(TYPE_NAME)\n .setSource(buildMapping())\n .execute().actionGet();\n if (!response.isAcknowledged()) {\n throw new Exception(\"Could not define mapping.\");\n }\n }",
"public CreateIndex(File selectedFolder) {\n\n\t\tFile selectedFilePeople = new File(selectedFolder + Settings.nameOfPeopleFile);\n\t\tFile selectedFileEvents = new File(selectedFolder + Settings.nameOfEventsFile);\n\t\t\n\t\ttry {\n\t\t\tpeopleAndEventsCreate(selectedFolder, selectedFilePeople, Settings.nameOfLuceneIndexPeople);\n\t\t\tpeopleAndEventsCreate(selectedFolder, selectedFileEvents, Settings.nameOfLuceneIndexEvents);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private synchronized void criarIndice() throws Exception {\r\n\t\tIndexWriter indexWriter = getWriterPadrao(true);\r\n\t\ttry {\r\n\t\t\tindexWriter.getAnalyzer().close();\r\n\t\t\tindexWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void testAddingNewIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null,\n true, null));\n PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs);\n setPrimaryKey(tableSchema1);\n PSJdbcForeignKey fk = createForeignKey(tableSchema1);\n\n List<String> indexCols = new ArrayList<String>();\n indexCols.add(\"col3\");\n PSJdbcIndex index1 = new PSJdbcIndex(\"IX_col1\", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE);\n tableSchema1.setIndex(index1);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema1.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next();\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema1.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema1.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the number of foreign key columns and eqal to that of\n // index columns.\n assertTrue(fk.getForeignKeyColumnNames().size() == newIndex.getIndexColumnNames().size());\n\n // Makes sure if the new index that got created has the same set of\n // columns as foreign key.\n assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames()));\n\n // Makes sure if the index name of newly created index has a unique name.\n assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName()));\n\n }",
"public IndexBuilder(InvertedIndex index) {\n\t\tthis.index = index;\n\t}",
"public IndexAlreadyExistsException(Index index) {\n\t\tsuper(index, \"Already exists\");\n\t}",
"public static <T> void createIndex(Geography<T> geog, Class<T> clazz)\n\t{\n\t\tIndex<T> i = new Index<T>(geog, clazz);\n\t\tSpatialIndexManager.indices.put(geog, i);\n\t}",
"void create(QueryCursor cursor, String indexName, String... templateProperties) throws SQLException;",
"public static HashIndexBuilder hashIndex(String name) {\n return new HashIndexBuilderImpl(name);\n }",
"public void addIndex(Index index) throws AppException {\n\t\taddIndex(index, false);\n\t}",
"void addIndexForRepository(long repositoryId);",
"@Override\n public void buildIndexes(Properties props)\n {\n Statement statement;\n try\n {\n statement = connection.createStatement();\n \n //Create Indexes\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITEEID ON CONFFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX CONFFRIENDSHIP_INVITERID ON CONFFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITEEID ON PENDFRIENDSHIP (INVITEEID)\");\n statement.executeUpdate(\"CREATE INDEX PENDFRIENDSHIP_INVITERID ON PENDFRIENDSHIP (INVITERID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_RID ON MANIPULATION (RID)\");\n statement.executeUpdate(\"CREATE INDEX MANIPULATION_CREATORID ON MANIPULATION (CREATORID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCES_WALLUSERID ON RESOURCES (WALLUSERID)\");\n statement.executeUpdate(\"CREATE INDEX RESOURCE_CREATORID ON RESOURCES (CREATORID)\");\n \n System.out.println(\"Indexes Built\");\n }\n catch (Exception ex)\n {\n Logger.getLogger(WindowsAzureClientInit.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Error in building indexes!\");\n }\n }",
"private IndexMetadata createUpdatedIndexMetadata(IndexMetadata indexMetadata) {\n return IndexMetadata.builder(indexMetadata)\n .putMapping(\n createUpdatedIndexMetadata(\n indexMetadata.mapping(),\n indexMetadata.getIndex().getName()\n ))\n .build();\n }",
"private void createInvertedIndex() {\n\t\tArrayList<Index> invertedIndex=new ArrayList<>();\n\t\ttry{\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\part-r-00001\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\"\\t\");\n\t\t\t\tparts[1]=parts[1].replace(\"{\", \"\").replace(\"}\", \"\");\n\t\t\t\tString counts[]=parts[1].split(\",\");\n\t\t\t\tHashMap<String,Integer> fileList=new HashMap<String,Integer>();\n\t\t\t\tfor (String count : counts) {\n\t\t\t\t\tString file[]=count.split(\"=\");\n\t\t\t\t\tfileList.put(file[0].trim().replace(\".txt\", \"\"), Integer.parseInt(file[1].trim()));\n\t\t\t\t}\n\t\t\t\tIndex index=new Index();\n\t\t\t\tindex.setWord(parts[0]);\n\t\t\t\tindex.setFileList(fileList);\n\t\t\t\tinvertedIndex.add(index);\n\t\t\t}\n\t\t\tin.close();\n\t\t}catch(IOException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertIndex(invertedIndex);\n\t}",
"ByteArrayIndex createByteArrayIndex();",
"public static IndexExpression makeIndex(Expression instance, PropertyInfo indexer, Iterable<Expression> arguments) { throw Extensions.todo(); }",
"private synchronized IndexService createIndexService(\n IndexService.IndexCreationContext indexCreationContext,\n IndexMetadata indexMetadata,\n IndicesQueryCache indicesQueryCache,\n IndicesFieldDataCache indicesFieldDataCache,\n List<IndexEventListener> builtInListeners,\n IndexingOperationListener... indexingOperationListeners\n ) throws IOException {\n final IndexSettings idxSettings = new IndexSettings(indexMetadata, settings, indexScopedSettings);\n if (EngineConfig.INDEX_OPTIMIZE_AUTO_GENERATED_IDS.exists(idxSettings.getSettings())) {\n throw new IllegalArgumentException(\n \"Setting [\" + EngineConfig.INDEX_OPTIMIZE_AUTO_GENERATED_IDS.getKey() + \"] was removed in version 7.0.0\"\n );\n }\n // we ignore private settings since they are not registered settings\n indexScopedSettings.validate(indexMetadata.getSettings(), true, true, true);\n logger.debug(\n \"creating Index [{}], shards [{}]/[{}] - reason [{}]\",\n indexMetadata.getIndex(),\n idxSettings.getNumberOfShards(),\n idxSettings.getNumberOfReplicas(),\n indexCreationContext\n );\n\n final IndexModule indexModule = new IndexModule(\n idxSettings,\n analysisRegistry,\n getEngineFactory(idxSettings),\n getEngineConfigFactory(idxSettings),\n directoryFactories,\n () -> allowExpensiveQueries,\n indexNameExpressionResolver,\n recoveryStateFactories\n );\n for (IndexingOperationListener operationListener : indexingOperationListeners) {\n indexModule.addIndexOperationListener(operationListener);\n }\n pluginsService.onIndexModule(indexModule);\n for (IndexEventListener listener : builtInListeners) {\n indexModule.addIndexEventListener(listener);\n }\n return indexModule.newIndexService(\n indexCreationContext,\n nodeEnv,\n xContentRegistry,\n this,\n circuitBreakerService,\n bigArrays,\n threadPool,\n scriptService,\n clusterService,\n client,\n indicesQueryCache,\n mapperRegistry,\n indicesFieldDataCache,\n namedWriteableRegistry,\n this::isIdFieldDataEnabled,\n valuesSourceRegistry,\n remoteDirectoryFactory,\n translogFactorySupplier,\n this::getClusterDefaultRefreshInterval,\n this::getClusterRemoteTranslogBufferInterval\n );\n }",
"@Test\n public void testCreateIndexMapping() throws Exception {\n String json = EsJsonUtils.generateItemMapping();\n System.out.println(json);\n elasticSearchDao.createIndexMapping(TENANT_ID+Constants.INDEX_SPLIT+ Constants.ITEM,json);\n }",
"private static void createIndex() {\n XML_Shell workFile = new XML_Shell();\n String messageFromServer = ClientService.getLastMessageFromServer();\n\n try {\n XML_Manager.stringToDom(messageFromServer, workFile);\n } catch (SAXException | ParserConfigurationException | IOException | TransformerException e) {\n e.printStackTrace();\n }\n\n }",
"private void createReviewIndex() {\n\t\t// Revise the review dictionary to the correct structure & change productIDs to product index\n\t\tLinkedList<List<Integer>> dictValues = new LinkedList<>();\n\t\tfor (int review : reviewIds.keySet()) {\n\t\t\tArrayList<String> vals = reviewIds.get(review);\n\t\t\tArrayList<Integer> new_vals = new ArrayList<>(List.of(0, 0, 0, 0, 0));\n\t\t\tnew_vals.set(ReviewIndex.PRODUCTID_INDEX, productIds.headMap(vals.get(0)).size());\n\t\t\tString[] helpf = vals.get(2).split(\"/\");\n\t\t\tnew_vals.set(ReviewIndex.HELPFNUM_INDEX, Integer.parseInt(helpf[0]));\n\t\t\tnew_vals.set(ReviewIndex.HELPFDNOM_INDEX, Integer.parseInt(helpf[1]));\n\t\t\tnew_vals.set(ReviewIndex.REVIEWLENGTH_INDEX, Integer.parseInt(vals.get(3)));\n\t\t\tnew_vals.set(ReviewIndex.SCORE_INDEX, (int) Float.parseFloat(vals.get(1)));\n\t\t\tdictValues.add(new_vals);\n\t\t}\n\t\tReviewIndex rIndex = new ReviewIndex();\n\t\trIndex.insertData(dictValues);\n\n\t\tsaveToDir(REVIEW_INDEX_FILE, rIndex);\n\t}",
"public void createIndex(final DBObject keys, @Nullable final String name, final boolean unique) {\n DBObject options = new BasicDBObject();\n if (name != null && name.length() > 0) {\n options.put(\"name\", name);\n }\n if (unique) {\n options.put(\"unique\", Boolean.TRUE);\n }\n createIndex(keys, options);\n }",
"private void indexItem(IndexDocument indexDoc) {\n if(bDebug) System.out.println(\"\\n*** document to index - \" + indexDoc);\n Indexer indexer=null;\n try {\n indexer=new Indexer(PetstoreConstants.PETSTORE_INDEX_DIRECTORY, false);\n PetstoreUtil.getLogger().log(Level.FINE, \"Adding document to index: \" + indexDoc.toString());\n indexer.addDocument(indexDoc);\n } catch (Exception e) {\n PetstoreUtil.getLogger().log(Level.WARNING, \"index.exception\", e);\n e.printStackTrace();\n } finally {\n try {\n // must close file or will not be able to reindex\n if(indexer != null) {\n indexer.close();\n }\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }",
"public void createIndex(String dataDirPath, String txType) throws IOException {\n\t\ttry {\n\t\t\tString inLoc = \"/mnt/3TB/in.csv\";\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(inLoc), \"UTF-8\"));\n\n\t\t\tString line;\n\t\t\tboolean first = true;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tString[] items = line.split(\",\");\n\t\t\t\tif (items.length > 3) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tDocument doc = makeTx(items[0], items[1], Long.parseLong(items[2]), txType);\n\t\t\t\twriter.addDocument(doc);\n\t\t\t}\n\t\t\tbr.close();\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@RequestMapping(value = \"search/async/index\", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)\n public @ResponseBody String createIndexAsync(@RequestBody String body) {\n Map<String,Object> request = gson.fromJson(body, Map.class);\n Map<String,Object> responseMap = new HashMap<>(0);\n try {\n log.debug(\"starting index creation process in async mode\");\n ftsSearchService.createTsvectorIndexAsync(request);\n responseMap.put(Field.RESULT, \"scheduled\");\n responseMap.put(Field.MESSAGE, \"check later for index create status\");\n responseMap.put(Field.ERROR,false);\n } catch (Exception e) {\n log.error(\"failed index creation {}\",e);\n log.error(\"index create error: {}\",e.getMessage());\n responseMap.put(Field.ERROR,true);\n responseMap.put(Field.ERROR_MSG,e.getMessage());\n }\n return gson.toJson(responseMap);\n }",
"CreateIndexConstantAction(\n boolean forCreateTable,\n boolean\t\t\tunique,\n boolean\t\t\tuniqueWithDuplicateNulls,\n String\t\t\tindexType,\n String\t\t\tschemaName,\n String\t\t\tindexName,\n String\t\t\ttableName,\n UUID\t\t\ttableId,\n String[]\t\tcolumnNames,\n boolean[]\t\tisAscending,\n boolean\t\t\tisConstraint,\n UUID\t\t\tconglomerateUUID,\n Properties\t\tproperties)\n {\n super(tableId, indexName, tableName, schemaName);\n\n this.forCreateTable = forCreateTable;\n this.unique = unique;\n this.uniqueWithDuplicateNulls = uniqueWithDuplicateNulls;\n this.indexType = indexType;\n this.columnNames = columnNames;\n this.isAscending = isAscending;\n this.isConstraint = isConstraint;\n this.conglomerateUUID = conglomerateUUID;\n this.properties = properties;\n this.conglomId = -1L;\n this.droppedConglomNum = -1L;\n }",
"public void openIndex(String indexPath) throws IOException {\n\n }",
"public Indexer() {\n }",
"@Override\n public void createIndex(String field, int type) {\n try {\n switch (type) {\n case 1:\n collection.createIndex(Indexes.ascending(field));\n break;\n case -1:\n collection.createIndex(Indexes.descending(field));\n break;\n default:\n collection.createIndex(Indexes.ascending(field));\n break;\n }\n } catch (MongoException e) {\n System.err.println(e.getCode() + \" \" + e.getMessage());\n }\n }",
"public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}",
"private Document createMapping() {\n return getIndexOperations().createMapping();\n }",
"public boolean createIndex(String indexName, Map<String, Object> mapping, Settings.Builder builder) throws IOException {\n CreateIndexRequest request = new CreateIndexRequest(indexName);\n if (null != builder) {\n request.settings(builder);\n }\n request.mapping(mapping);\n return createIndex(request);\n }",
"@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }",
"public void indexCreate()\n {\n try{\n Directory dir = FSDirectory.open(Paths.get(\"indice/\"));\n Analyzer analyzer = new StandardAnalyzer();\n IndexWriterConfig iwc = new IndexWriterConfig(analyzer);\n iwc.setOpenMode(OpenMode.CREATE);\n IndexWriter writer = new IndexWriter(dir,iwc);\n MongoConnection mongo = MongoConnection.getMongo();\n mongo.OpenMongoClient();\n DBCursor cursor = mongo.getTweets();\n Document doc = null;\n\n while (cursor.hasNext()) {\n DBObject cur = cursor.next();\n if (cur.get(\"retweet\").toString().equals(\"false\")) {\n doc = new Document();\n doc.add(new StringField(\"id\", cur.get(\"_id\").toString(), Field.Store.YES));\n doc.add(new TextField(\"text\", cur.get(\"text\").toString(), Field.Store.YES));\n doc.add(new StringField(\"analysis\", cur.get(\"analysis\").toString(), Field.Store.YES));\n //doc.add(new StringField(\"finalCountry\",cur.get(\"finalCountry\").toString(),Field.Store.YES));\n doc.add(new StringField(\"userScreenName\", cur.get(\"userScreenName\").toString(), Field.Store.YES));\n doc.add(new StringField(\"userFollowersCount\", cur.get(\"userFollowersCount\").toString(), Field.Store.YES));\n doc.add(new StringField(\"favoriteCount\", cur.get(\"favoriteCount\").toString(), Field.Store.YES));\n\n if (writer.getConfig().getOpenMode() == OpenMode.CREATE) {\n System.out.println(\"Indexando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.addDocument(doc);\n System.out.println(doc);\n } else {\n System.out.println(\"Actualizando el tweet: \" + doc.get(\"text\") + \"\\n\");\n writer.updateDocument(new Term(\"text\" + cur.get(\"text\")), doc);\n System.out.println(doc);\n }\n }\n }\n cursor.close();\n writer.close();\n }\n catch(IOException ioe){\n System.out.println(\" Error en \"+ ioe.getClass() + \"\\n mensaje: \" + ioe.getMessage());\n }\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}",
"@Test\n public void testNoCheckpointAfterIndexCreation() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 10, true);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 0);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> idxRebFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(idxRebFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n idxRebFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(10, selectPersonByName(n.cache(cacheName)).size());\n }",
"void createIndexDir(String indexDirPath) throws IOException {\n File indexDir = new File(indexDirPath);\n if (!indexDir.exists())\n indexDir.mkdir();\n else {\n removeIndexDir(indexDirPath);\n indexDir.mkdir(); \n }\n }",
"@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }",
"@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }",
"public IndexWriter getIndexWriter(boolean create) throws IOException {\n // Followed online tutorial\n if(indexWriter == null) {\n try {\n // Make sure and store to /var/lib/lucene/ per the spec\n Directory indexDir = FSDirectory.open(new File(\"/var/lib/lucene/index1\"));\n IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_4_10_2, new StandardAnalyzer());\n indexWriter = new IndexWriter(indexDir, config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return indexWriter;\n }",
"@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }",
"@SuppressWarnings(\"unused\")\n public void buildIndex() throws IOException {\n indexWriter = getIndexWriter(indexDir);\n ArrayList <JSONObject> jsonArrayList = parseJSONFiles(JSONdir);\n indexTweets(jsonArrayList, indexWriter);\n indexWriter.close();\n }",
"public void createIndex(String dirPath) throws IOException {\n\n\t\tFile[] files = new File(dirPath).listFiles();\n\n\t\tfor (File f : files) {\n\t\t\tindexDocument(f);\n\t\t}\n\n\t\tclose();\n\t\tprintStatistics();\n\t}",
"private Reindex() {}",
"private Reindex() {}",
"public void afterIndexCreated(IndexService indexService) {\n\n }",
"private void createIndex(Geography<T> geog, Class<T> clazz)\n\t{\n\t\tGeometry geom;\n\t\tEnvelope bounds;\n\t\tfor (T t : geog.getAllObjects( ))\n\t\t{\n\t\t\tgeom = (Geometry) geog.getGeometry(t);\n\t\t\tbounds = geom.getEnvelopeInternal( );\n\t\t\tthis.si.insert(bounds, geom);\n\t\t\tthis.featureLookup.put(geom, t);\n\t\t}\n\t}",
"public AgreementIndex indexOnCreate(AgreementRequest agreementRequest) {\r\n\t\t\r\n\t\tAgreement agreement = agreementRequest.getAgreement();\r\n\t\tRequestInfo requestInfo = agreementRequest.getRequestInfo();\r\n\t\tAgreementDetailsEs agreementDetailsEs = new AgreementDetailsEs();\r\n\t\tAgreementIndex agreementIndex = new AgreementIndex();\r\n\t\tDemand agreementDemand = null;\r\n\t\t\r\n\t\tAsset asset = assetRepository.getAsset(agreement.getAsset().getId(),agreement.getTenantId());\r\n\t\tAllottee allottee = allotteeRepository.getAllottee(agreement.getAllottee().getId(),agreement.getTenantId(),requestInfo);\r\n\t\tCity city = tenantRepository.fetchTenantByCode(agreement.getTenantId());\r\n\t\tif(agreement.getDemands() != null){\r\n\t\tagreementDemand = demandRepository.getDemandBySearch(agreement.getDemands().get(0), agreement.getTenantId());\r\n\t\tagreementIndex.setDemandDetails(getDemandDetails(agreementDemand.getDemandDetails()));\r\n\t\t}\r\n\t\tagreementDetailsEs.setAsset(asset);\r\n\t\tagreementDetailsEs.setAgreement(agreement);\r\n\t\tagreementDetailsEs.setAllottee(allottee);\r\n\t\tagreementDetailsEs.setCity(city);\r\n\t\tagreementDetailsEs.setBoundaryDetails(asset.getLocationDetails(), boundaryRepository.getBoundariesById(agreement,asset));\r\n\t\tif(agreementDemand != null){\r\n\t\tlogger.info(\"setting rent details\");\r\n\t\tagreementDetailsEs.setRent(agreementDemand.getDemandDetails(),getCurrentInstallment(agreementRequest),propertiesManager.getDemandReasonRent());\r\n\t\tlogger.info(\"rent details are added to indexer\");\r\n\t\t}\r\n\t\tagreementIndex.setAgreementDetails(agreementDetailsEs);\r\n\t\t\r\n\t\treturn agreementIndex;\r\n\t}",
"public void addIndex(){\n\t\tdbCol=mdb.getCollection(\"genericCollection\");\n\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\tdbCol.ensureIndex(new BasicDBObject(\"RandomGeo\", \"2d\"));\n\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\tSystem.out.println(\"Mongo Index Timer \"+Long.toString(stop));\n\t}",
"@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}",
"public void run() {\n\t\t\t\t\tboolean b = false;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tb = IreportRmiClient.rmiInterfactRemote.generateIndex();\r\n\t\t\t\t\t\tif (!b) {\r\n\t\t\t\t\t\t\t// 0个索引文件\r\n\t\t\t\t\t\t\tAddedOperator.log(\"索引到0个文件..可能你的路径配置错误,请查看服务端输出信息\",\r\n\t\t\t\t\t\t\t\t\tIreportConstant.WARN_);\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tAddedOperator.log(\"新建索引成功\", IreportConstant.RIGHT_);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (RemoteException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tAddedOperator.log(\"新建索引错误:\" + e.getMessage(),\r\n\t\t\t\t\t\t\t\tIreportConstant.ERROR_);\r\n\t\t\t\t\t\tDialogFactory.showErrorMessageDialog(jb,\r\n\t\t\t\t\t\t\t\te.getMessage(), \"新建索引错误\");\r\n\t\t\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}",
"public static ResourceIndex createResourceIndex( ResourceKey key, Struct gff, FileIndex sourceDir,\n FileIndex targetDir )\n {\n\n String name = getNameFromStruct( key, gff );\n\n return( new ResourceIndex( name, key, new FileIndex( sourceDir, getSourceFile(key) ),\n new FileIndex( targetDir, getDestinationFile(key) ) ) );\n }"
] | [
"0.82238764",
"0.8012089",
"0.76708674",
"0.7598021",
"0.7363838",
"0.71683645",
"0.71494126",
"0.71345735",
"0.70810026",
"0.70685464",
"0.703629",
"0.7026257",
"0.70053536",
"0.6987003",
"0.696246",
"0.69228977",
"0.6847379",
"0.67802125",
"0.67750895",
"0.675042",
"0.6734788",
"0.6715648",
"0.65871096",
"0.65810615",
"0.65668607",
"0.65574634",
"0.6541633",
"0.6533217",
"0.6529724",
"0.6519296",
"0.6516472",
"0.6484646",
"0.64717156",
"0.64676255",
"0.646459",
"0.6463244",
"0.64517987",
"0.6409466",
"0.63992864",
"0.63834864",
"0.6291305",
"0.62899196",
"0.6269249",
"0.62654096",
"0.62491953",
"0.62453455",
"0.62443554",
"0.6226474",
"0.619994",
"0.6181933",
"0.61651325",
"0.6160289",
"0.6148988",
"0.613581",
"0.6119782",
"0.6110787",
"0.610905",
"0.61026865",
"0.606663",
"0.6058712",
"0.60439783",
"0.60283136",
"0.6009677",
"0.59970325",
"0.59808576",
"0.59787565",
"0.59688646",
"0.5954936",
"0.5940977",
"0.59330493",
"0.59297675",
"0.5929437",
"0.5923446",
"0.5920263",
"0.5919948",
"0.5916586",
"0.5906277",
"0.5876402",
"0.5875312",
"0.58550644",
"0.58367336",
"0.58307993",
"0.5799724",
"0.5725125",
"0.5718195",
"0.5704981",
"0.57026106",
"0.5691165",
"0.56864214",
"0.56791055",
"0.56789035",
"0.5673033",
"0.5673033",
"0.56666106",
"0.56635904",
"0.56581706",
"0.56567883",
"0.5639738",
"0.5615399",
"0.56147027"
] | 0.6806283 | 17 |
Open an existing index. | public static Index open(String name, Path path) {
if (!Files.isDirectory(path.resolve(INDEX))) {
throw new InvalidRepositoryPathException();
}
try {
return new Index(name, path);
} catch (IOException ex) {
throw new IOFailureException(ex);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void openIndex(String indexPath) throws IOException {\n\n }",
"public BlackLabIndex open(File indexDir) throws ErrorOpeningIndex {\n IndexType indexType = determineIndexType(indexDir, false, null);\n return indexType == IndexType.INTEGRATED ?\n new BlackLabIndexIntegrated(indexDir.getName(), this, null, indexDir, false, false, null):\n new BlackLabIndexExternal(this, indexDir, false, false, (File) null);\n }",
"public void start() throws Exception {\n\n createIndex();\n }",
"String createIndex() {\n\t\tboolean res = indexExists();\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode;\n\t\tif (!res) {\n\t\t\tresCode = doHttpOperation(esIndexUrl, HTTP_PUT, null);\n\t\t}\n\t\treturn lastResponse;\n\t}",
"private void indexItem(IndexDocument indexDoc) {\n if(bDebug) System.out.println(\"\\n*** document to index - \" + indexDoc);\n Indexer indexer=null;\n try {\n indexer=new Indexer(PetstoreConstants.PETSTORE_INDEX_DIRECTORY, false);\n PetstoreUtil.getLogger().log(Level.FINE, \"Adding document to index: \" + indexDoc.toString());\n indexer.addDocument(indexDoc);\n } catch (Exception e) {\n PetstoreUtil.getLogger().log(Level.WARNING, \"index.exception\", e);\n e.printStackTrace();\n } finally {\n try {\n // must close file or will not be able to reindex\n if(indexer != null) {\n indexer.close();\n }\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }",
"InstAssignIndex createInstAssignIndex();",
"private synchronized void criarIndice() throws Exception {\r\n\t\tIndexWriter indexWriter = getWriterPadrao(true);\r\n\t\ttry {\r\n\t\t\tindexWriter.getAnalyzer().close();\r\n\t\t\tindexWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void openStore()\n throws Exception {\n\n dbStore = Utils.openStore(master, Utils.DB_NAME);\n primaryIndex = \n dbStore.getPrimaryIndex(Integer.class, RepTestData.class);\n }",
"public void createIndex(Index index) {\n Span span = this.tracer.buildSpan(\"Client.CreateIndex\").start();\n try {\n String path = String.format(\"/index/%s\", index.getName());\n String body = index.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating index\");\n } finally {\n span.finish();\n }\n }",
"public boolean createIndex() {\n RestClient client = esrResource.getClient();\n\n try {\n Response r = client.performRequest(\"HEAD\", \"/\" + index);\n\n if (r.getStatusLine().getStatusCode() != 200) {\n client.performRequest(\"PUT\", \"/\" + index);\n\n return true;\n }\n } catch (IOException ioe) {\n getMonitor().error(\"Unable to create index\", ioe);\n }\n\n return false;\n }",
"public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}",
"public int setIndex(int index) {\n\t\tthis.openIndex = index;\r\n\t\treturn index;\r\n\t}",
"public static IndexReader open(String path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }",
"IndexCreated createIndex(String name, Index index) throws ElasticException;",
"public void index(final Document doc) {\t\n\t\ttry {\n\t\t\t_reopenToken = _trackingIndexWriter.addDocument(doc);\n\t\t\tlog.debug(\"document indexed in lucene\");\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error while in Lucene index operation: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t \t\t ioEx);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t_indexWriter.commit();\n\t\t\t} catch (IOException ioEx) {\n\t\t\t\tlog.error(\"Error while commiting changes to Lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t\t\t\t ioEx);\n\t\t\t}\n\t\t}\n\t}",
"public final void open() {\n\t\tif (null==client) {\n\t\t\tclient = es.elasticsearchClient();\n\t\t\tlog.trace(\"opened. \" + this.es.print());\n\t\t}\n\t}",
"public com.guidewire.datamodel.IndexDocument.Index addNewIndex()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().add_element_user(INDEX$12);\r\n return target;\r\n }\r\n }",
"private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }",
"public static IndexReader open(File path) throws IOException {\n return open(FSDirectory.getDirectory(path, false));\n }",
"public void createIndex(Configuration configuration){\n }",
"private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }",
"@Override\n public void open(Configuration parameters) throws Exception {\n index = parameters.getInteger(ALS.INDEX, 1);\n }",
"public void close() throws IndexException {\n }",
"IndexNameReference createIndexNameReference();",
"boolean isNewIndex();",
"public SimpleIndexFactory() {\n\t}",
"LuceneMemoryIndex createLuceneMemoryIndex();",
"public void ensureIndex(Index index) {\n try {\n createIndex(index);\n } catch (HttpConflict ex) {\n // pass\n }\n }",
"StorableIndexInfo getIndexInfo();",
"public void addIndex() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"index\",\n null,\n childrenNames());\n }",
"public static Index create(String name, Path path) {\n try {\n Files.createDirectory(path.resolve(INDEX));\n return new Index(name, path);\n\n } catch (IOException e) {\n throw new IOFailureException(e);\n }\n }",
"boolean createIndex(String indexName);",
"IndexedDocument indexDocument(String name, String type, String id, CharSequence document)\n throws ElasticException;",
"public void createIndex(final String name) {\n createIndex(new BasicDBObject(name, 1));\n }",
"public IndexBuilder(InvertedIndex index) {\n\t\tthis.index = index;\n\t}",
"private void close() throws CorruptIndexException, IOException {\n\n\t\tidxWriter.forceMerge(1);\n\t\tidxWriter.commit();\n\t\tidxWriter.close();\n\t}",
"com.google.firestore.admin.v1beta1.Index getIndex();",
"public Index getIndex() {\r\n // TODO: Implement this!\r\n return new WebIndex();\r\n }",
"public synchronized void createIndexIfNeeded(final String index) throws NeutronCheckedException {\n try {\n if (!doesIndexExist(index)) {\n LOGGER.warn(\"ES INDEX {} DOES NOT EXIST!!\", index);\n createIndex(index, NUMBER_OF_SHARDS, NUMBER_OF_REPLICAS);\n\n // Give Elasticsearch a moment to catch its breath.\n Thread.sleep(2000); // NOSONAR\n }\n } catch (InterruptedException | IOException e) {\n throw JobLogs.checked(LOGGER, e, \"CREATE INDEX FAILED! {}\", e.getMessage());\n }\n }",
"@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n Index entity = TestUtils.getTestIndex();\n IndexResponse result = instance.create(entity);\n assertNotNull(result);\n assertEquals(entity.getDatabaseName(), result.getIndex().getDatabaseName());\n assertEquals(entity.getName(), result.getIndex().getName());\n assertEquals(entity.getTableName(), result.getIndex().getTableName());\n assertEquals(entity.getFields(), result.getIndex().getFields());\n }",
"@ManagedOperation(description = \"Starts rebuilding the index\", displayName = \"Rebuild index\")\n void start();",
"private FileIndex loadIndex(File indexFile) {\n FileIndex idx = null;\n RepositoryDataInputStream din = null;\n try {\n din = new RepositoryDataInputStream(RepositoryImplUtil.getBufferedDataInputStream(indexFile),\n LayerConvertersProvider.getInstance(layeringSupport, layerDescriptor));\n //new RepositoryDataInputImpl(RepositoryImplUtil.getBufferedDataInputStream(indexFile));\n idx = FileIndexFactory.getDefaultFactory().readIndex(din);\n } catch (IOException ex) {\n RepositoryExceptions.throwException(\"IndexedStorageFile for file \" + indexFile, ex);//NOI18N\n } finally {\n if (din != null) {\n try {\n din.close();\n } catch (IOException ex) {\n }\n }\n }\n return idx;\n }",
"private Reindex() {}",
"private Reindex() {}",
"public static synchronized void indexDocument(CodeIndexDocument codeIndexDocument) throws IOException {\n Queue<CodeIndexDocument> queue = new ConcurrentLinkedQueue<CodeIndexDocument>();\n queue.add(codeIndexDocument);\n indexDocuments(queue);\n queue = null;\n }",
"public void createIndex() throws IOException {\n\t\tLOGGER.info(\"creating photo index...\");\n\t\tCreateIndexRequest request = new CreateIndexRequest(\"files\");\n\t\tInputStream in = getClass().getClassLoader().getResourceAsStream(\"photo.json\");\n\t\tString mapping = new String(in.readAllBytes());\n\t\tin.close();\n\t\trequest.mapping(\"photo\", mapping, XContentType.JSON);\n\t\tCreateIndexResponse response = client.indices().create(request);\n\t\tLOGGER.info(\"photo index created: \" + response.toString());\n\t}",
"@Override\n\tpublic void build(Index index) {\n\t\tthis.indexdir = index.getPath();\n\t\tLuceneIndex luceneIndex = (LuceneIndex) index;\n\t\tthis.indexSearcher = new IndexSearcher(luceneIndex.getReader());\n\n\t}",
"public void createIndex() throws IOException {\n\t\tindexWriter.commit();\n\t\ttaxoWriter.commit();\n\n\t\t// categories\n\t\tfor (Article.Facets f : Article.Facets.values()) {\n\t\t\ttaxoWriter.addCategory(new CategoryPath(f.toString()));\n\t\t}\n\t\ttaxoWriter.commit();\n\n\t\tfinal Iterable<Article> articles = articleRepository.findAll();\n\t\tint c = 0;\n\t\tfor (Article article : articles) {\n\t\t\taddArticle(indexWriter, taxoWriter, article);\n\t\t\tc++;\n\t\t}\n\t\t// commit\n\t\ttaxoWriter.commit();\n\t\tindexWriter.commit();\n\n\t\ttaxoWriter.close();\n\t\tindexWriter.close();\n\n\t\ttaxoDirectory.close();\n\t\tindexDirectory.close();\n\t\tLOGGER.debug(\"{} articles indexed\", c);\n\t}",
"public com.guidewire.datamodel.IndexDocument.Index insertNewIndex(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().insert_element_user(INDEX$12, i);\r\n return target;\r\n }\r\n }",
"public void createIndexOnProcessName() throws ServiceFailureException;",
"private void createIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // check required params / attributes\n \n // REQUIRED: The name of the collection for which to create the index\n String collection = helper.getMandatoryString(msg.body(), MSG_PROPERTY_COLLECTION, msg);\n if (collection == null) return;\n\n // REQUIRED: A JSON representation of the index (see ArangoDB docs for details)\n JsonObject document = helper.getMandatoryObject(msg.body(), MSG_PROPERTY_DOCUMENT, msg);\n if (document == null) return;\n\n if (!ensureAttribute(document, DOC_ATTRIBUTE_TYPE, msg)) return;\n if (!document.getString(DOC_ATTRIBUTE_TYPE).equals(TYPE_CAP)) {\n if (!ensureAttribute(document, DOC_ATTRIBUTE_FIELDS, msg)) return;\n }\n\n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName);\n apiPath.append(API_PATH);\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n\n httpPost(persistor, apiPath.toString(), headers, document, timeout, msg);\n }",
"public void addDocument(IDocument document) {\n if (indexedFile == null) {\n indexedFile= index.addDocument(document);\n } else {\n throw new IllegalStateException(); } }",
"public IndexReader getIndexReader() {\n\t\ttry {\n\t\t\tcheckDirectory();\n\t\t\tcheckIndexLocking();\n\n\t\t\tboolean exist = IndexReader.indexExists(getDirectory());\n\t\t\tif( exist ) {\n\t\t\t\treturn IndexReader.open(getDirectory());\n\t\t\t} else {\n\t\t\t\tthrow new LuceneIndexAccessException(\"The index doesn't exist for the specified directory\");\n\t\t\t}\n\t\t} catch(IOException ex) {\n\t\t\tthrow new LuceneIndexAccessException(\"Error during opening the reader\",ex);\n\t\t}\n\t}",
"public Index initIndex(String indexName) {\n return new Index(this, indexName);\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}",
"public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}",
"private void createIndex(final String index, int numShards, int numReplicas) throws IOException {\n LOGGER.warn(\"CREATE ES INDEX {} with {} shards and {} replicas\", index, numShards, numReplicas);\n final Settings indexSettings = Settings.builder().put(\"number_of_shards\", numShards)\n .put(\"number_of_replicas\", numReplicas).build();\n CreateIndexRequest indexRequest = new CreateIndexRequest(index, indexSettings);\n getClient().admin().indices().create(indexRequest).actionGet();\n\n final String mapping = IOUtils.toString(\n this.getClass().getResourceAsStream(\"/elasticsearch/mapping/map_person_5x_snake.json\"));\n getClient().admin().indices().preparePutMapping(index)\n .setType(getConfig().getElasticsearchDocType()).setSource(mapping, XContentType.JSON).get();\n }",
"public void start() throws Exception {\n if (!getClient().admin().indices().exists(Requests.indicesExistsRequest(INDEX_NAME)).actionGet().isExists()) {\n getClient().admin().indices().prepareCreate(INDEX_NAME).execute().actionGet().isAcknowledged();\n }\n\n //Create mapping for the key. Leave it not_analyzed so it doesn't tokenize the \"-\" delimiters\n PutMappingResponse response = getClient().admin().indices()\n .preparePutMapping(INDEX_NAME)\n .setType(TYPE_NAME)\n .setSource(buildMapping())\n .execute().actionGet();\n if (!response.isAcknowledged()) {\n throw new Exception(\"Could not define mapping.\");\n }\n }",
"public void close() throws IndexerException {\n\t\t//TODO\n\t\t\n\t}",
"public abstract void updateIndex();",
"public static boolean createIndex(String appid) {\n\t\treturn createIndex(appid, Para.getConfig().elasticsearchRootIndexShards(), Para.getConfig().elasticsearchRootIndexReplicas());\n\t}",
"private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }",
"public indexing() {\n initComponents();\n }",
"public boolean createIndex(String index, Settings.Builder builder) throws IOException {\n CreateIndexRequest request = new CreateIndexRequest(index);\n if (null != builder) {\n request.settings(builder);\n }\n return createIndex(request);\n }",
"public static IndexReader open(Directory directory) throws IOException {\n synchronized (directory) {\n SegmentInfos infos = new SegmentInfos();\n infos.read(directory);\n if (infos.size() == 1)\t\t\t // index is optimized\n\treturn new SegmentReader(infos.info(0), true);\n \n SegmentReader[] readers = new SegmentReader[infos.size()];\n for (int i = 0; i < infos.size(); i++)\n\treaders[i] = new SegmentReader(infos.info(i), i == infos.size() - 1);\n return new SegmentsReader(readers);\n }\n }",
"public void open();",
"public void open();",
"public void open()\n {\n }",
"public static int open(String pathname, int flags)\n throws Exception {\n // get the full path name\n String fullPath = getFullPath(pathname);\n\n IndexNode indexNode = new IndexNode();\n short indexNodeNumber = findIndexNode(fullPath, indexNode);\n if (indexNodeNumber < 0)\n return -1;\n\n // ??? return (Exxx) if the file is not readable \n // and was opened O_RDONLY or O_RDWR\n\n // ??? return (Exxx) if the file is not writable \n // and was opened O_WRONLY or O_RDWR\n\n // set up the file descriptor\n FileDescriptor fileDescriptor = new FileDescriptor(\n openFileSystems[ROOT_FILE_SYSTEM], indexNode, flags);\n fileDescriptor.setIndexNodeNumber(indexNodeNumber);\n\n return open(fileDescriptor);\n }",
"public static IndexExpression makeIndex(Expression instance, PropertyInfo indexer, Iterable<Expression> arguments) { throw Extensions.todo(); }",
"public boolean setIndex(String name){\n\n //array to hold all database names from file\n ArrayList<String> dbNames = new ArrayList<String>();\n\n //create index if it doesn't exist\n File file = new File(\"databases/index.txt\");\n Scanner sc;\n FileWriter fw; \n\n try {\n sc = new Scanner(file); \n //read current database names to array\n String currName; \n if (sc.hasNextLine()){\n while(sc.hasNextLine()){\n currName = sc.nextLine();\n dbNames.add(currName);\n } \n }\n sc.close();\n\n //if database name already in index, exit\n if ( dbNames.contains(name) ){return true;}\n\n } catch(FileNotFoundException ex){}\n \n //add new database name to list of dbs\n dbNames.add(name);\n\n //create / overwrite index file\n try {\n fw = new FileWriter(\"databases/index.txt\");\n } catch (IOException ex2){\n System.out.println(\"ERROR: index not found and could not be created\");\n return false;\n }\n\n //write array of database names to file\n for (String dbName : dbNames){\n try {\n fw.write(dbName);\n fw.write(\"\\n\");\n } catch (IOException ex3) {\n System.out.println(\"ERROR: could not write to index\");\n }\n }\n\n try {\n fw.close();\n } catch (IOException ex4){\n System.out.println(\"ERROR: filewriter could not be closed\");\n return false;\n }\n\n return true;\n }",
"public void run() {\n\t\t\t\t\tboolean b = false;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tb = IreportRmiClient.rmiInterfactRemote.generateIndex();\r\n\t\t\t\t\t\tif (!b) {\r\n\t\t\t\t\t\t\t// 0个索引文件\r\n\t\t\t\t\t\t\tAddedOperator.log(\"索引到0个文件..可能你的路径配置错误,请查看服务端输出信息\",\r\n\t\t\t\t\t\t\t\t\tIreportConstant.WARN_);\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tAddedOperator.log(\"新建索引成功\", IreportConstant.RIGHT_);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (RemoteException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tAddedOperator.log(\"新建索引错误:\" + e.getMessage(),\r\n\t\t\t\t\t\t\t\tIreportConstant.ERROR_);\r\n\t\t\t\t\t\tDialogFactory.showErrorMessageDialog(jb,\r\n\t\t\t\t\t\t\t\te.getMessage(), \"新建索引错误\");\r\n\t\t\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}",
"private void promptOpenIndexFile()\n {\n JPanel message = new JPanel(new GridLayout(3, 1));\n JLabel messageLabel = new JLabel(\"Enter the location of the index .db file\");\n JPanel defaultWrapper = new JPanel(new FlowLayout(FlowLayout.LEFT));\n JPanel inputWrapper = new JPanel();\n JButton fileOpenButton = new JButton(\"Find\");\n JLabel defaultLabel = new JLabel(\"Make this the default index? \");\n JCheckBox makeDefault = new JCheckBox(); \n JTextField fileField = new JTextField();\n fileField.setPreferredSize(new Dimension(200, 25));\n \n \n defaultWrapper.add(defaultLabel);\n defaultWrapper.add(makeDefault);\n inputWrapper.add(fileField);\n inputWrapper.add(fileOpenButton);\n message.add(defaultWrapper);\n message.add(messageLabel);\n message.add(inputWrapper);\n \n fileOpenButton.addActionListener((ActionEvent e) -> \n {\n JFileChooser jfc = new JFileChooser();\n int fileOpt = jfc.showOpenDialog(null);\n \n if(fileOpt == JFileChooser.APPROVE_OPTION)\n fileField.setText(jfc.getSelectedFile().getPath());\n });\n \n int option = JOptionPane.showConfirmDialog(null, message, \"Open index file\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);\n if(option != JOptionPane.CANCEL_OPTION)\n {\n String fileName = fileField.getText();\n spider.setIndexer(Indexer.createIndexer(fileName));\n searchEngine.setIndexer(spider.getIndexer());\n \n if(makeDefault.isSelected())\n {\n spider.getConfig().setDatabaseFile(fileName);\n spider.updateConfig();\n }\n }\n }",
"public BlackLabIndex wrapIndexReader(String indexName, IndexReader reader, boolean indexMode) throws ErrorOpeningIndex {\n return new BlackLabIndexIntegrated(indexName, this, reader, null, indexMode, false,\n null);\n }",
"public IndexON getIndex() {\n return _index;\n }",
"indexSet createindexSet();",
"public H_index() {\n\t\tsuper();\n\t}",
"public createIndex_result(createIndex_result other) {\n }",
"static File getIndexFile(File indexName) throws FileNotFoundException {\n\t\tfor (int i = 0; i < 2; i++)\n\t\t\ttry {\n\t\t\t\tFile raf = new File(indexName, \"rw\");\n\t\t\t\tif (!raf.isFile()) {\n\t\t\t\t\traf.getParentFile().mkdirs();\n\t\t\t\t} else return raf;\n\t\t\t} catch (Exception e) { System.err.println(\"\"); }\n\t\treturn null;\n\t}",
"public CommonStorage open() {\r\n ++accessNb;\r\n getDatabase(); // To trigger the possible database setup if it has not been yet done\r\n return this;\r\n }",
"public void open() {\r\n\t}",
"public IndexWriter getIndexWriter(boolean create) throws IOException {\n // Followed online tutorial\n if(indexWriter == null) {\n try {\n // Make sure and store to /var/lib/lucene/ per the spec\n Directory indexDir = FSDirectory.open(new File(\"/var/lib/lucene/index1\"));\n IndexWriterConfig config = new IndexWriterConfig(Version.LUCENE_4_10_2, new StandardAnalyzer());\n indexWriter = new IndexWriter(indexDir, config);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return indexWriter;\n }",
"@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }",
"void open();",
"void open();",
"void open();",
"public void createIndex(final DBObject keys) {\n createIndex(keys, new BasicDBObject());\n }",
"public void openEvent(int index) {\n // Packing the event data in the intent\n Intent intent = new Intent(this, DetailsActivity.class);\n\n // This index is just temporary used.\n intent.putExtra(\"INDEX\", Integer.toString(index));\n intent.putExtra(\"TITLE\", events.get(index).title);\n intent.putExtra(\"STARTDATE\", events.get(index).startDate);\n intent.putExtra(\"ENDDATE\", events.get(index).endDate);\n intent.putExtra(\"BODY\", events.get(index).body);\n startActivity(intent);\n\n }",
"public void createIndex() {\n String indexName = INDEX_BASE + \"-\" +\n LocalDateTime.now().format(DateTimeFormatter.ofPattern(\"yyyyMMddHHmmss\"));\n\n Settings settings = Settings.builder()\n .put(\"number_of_shards\", 1)\n .put(\"number_of_replicas\", 0)\n .build();\n CreateIndexRequest request = new CreateIndexRequest(indexName, settings);\n\n String mapping = \"{\\n\" +\n \" \\\"article\\\": {\\n\" +\n \" \\\"properties\\\": {\\n\" +\n \" \\\"title\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"author\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"issue\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"link\\\": {\\n\" +\n \" \\\"type\\\": \\\"keyword\\\"\\n\" +\n \" },\\n\" +\n \" \\\"description\\\": {\\n\" +\n \" \\\"type\\\": \\\"text\\\"\\n\" +\n \" },\\n\" +\n \" \\\"postDate\\\": {\\n\" +\n \" \\\"type\\\": \\\"date\\\",\\n\" +\n \" \\\"format\\\": \\\"yyyy-MM-dd\\\"\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\\n\" +\n \" }\";\n\n request.mapping(\"article\", mapping, XContentType.JSON);\n request.alias(new Alias(INDEX_BASE));\n\n try {\n CreateIndexResponse createIndexResponse = this.client.admin().indices().create(request).get();\n if (!createIndexResponse.isAcknowledged()) {\n throw new ElasticExecutionException(\"Create java_magazine index was not acknowledged\");\n }\n } catch (InterruptedException | ExecutionException e) {\n logger.error(\"Error while creating an index\", e);\n throw new ElasticExecutionException(\"Error when trying to create an index\");\n }\n }",
"public final void mINDEX() throws RecognitionException {\n try {\n int _type = INDEX;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:353:6: ( I N D E X )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:353:8: I N D E X\n {\n mI(); \n mN(); \n mD(); \n mE(); \n mX(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"public Index getIndex() {\n return index;\n }",
"public void open() {\n\t}",
"void index(IDocument document, IIndexerOutput output) throws java.io.IOException;",
"private static void createIndex() {\n XML_Shell workFile = new XML_Shell();\n String messageFromServer = ClientService.getLastMessageFromServer();\n\n try {\n XML_Manager.stringToDom(messageFromServer, workFile);\n } catch (SAXException | ParserConfigurationException | IOException | TransformerException e) {\n e.printStackTrace();\n }\n\n }",
"public void open() throws IOException;",
"public void openDocument(L documentLocation) throws IOException;",
"public void addIndex(Index index) throws AppException {\n\t\taddIndex(index, false);\n\t}",
"private BrowseIndex(String baseName) {\n this(baseName, \"item\");\n }",
"boolean indexExists(String name) throws ElasticException;",
"private void open()\n\t\t{\n\t\t\tconfig=Db4oEmbedded.newConfiguration();\n\t\t\tconfig.common().objectClass(Census.class).cascadeOnUpdate(true);\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tDB=Db4oEmbedded.openFile(config, PATH);\n\t\t\t\tSystem.out.println(\"[DB4O]Database was open\");\n\t\t\t\t\n\t\t\t}\n\t\t\tcatch(Exception e)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"[DB4O]ERROR:Database could not be open\");\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}"
] | [
"0.7906452",
"0.7350712",
"0.6301282",
"0.62375313",
"0.61825526",
"0.609073",
"0.6071517",
"0.6052747",
"0.6028769",
"0.59834015",
"0.59511495",
"0.5945217",
"0.5925528",
"0.5880764",
"0.58805424",
"0.58685803",
"0.5861093",
"0.58418584",
"0.5819303",
"0.5802937",
"0.5798076",
"0.57849467",
"0.57717323",
"0.57566106",
"0.5756303",
"0.57236165",
"0.57158405",
"0.5713924",
"0.5638267",
"0.5610261",
"0.5609332",
"0.56092644",
"0.55804455",
"0.54950863",
"0.5485124",
"0.54795",
"0.5459106",
"0.5452767",
"0.54434025",
"0.5422063",
"0.5417155",
"0.54160076",
"0.54058653",
"0.54058653",
"0.5387308",
"0.53837967",
"0.5380352",
"0.53526366",
"0.53490907",
"0.5326379",
"0.53247947",
"0.531033",
"0.5309298",
"0.5308577",
"0.53040004",
"0.52498585",
"0.52415645",
"0.5239294",
"0.5236897",
"0.52339864",
"0.5233112",
"0.5232265",
"0.5221066",
"0.52195877",
"0.52137274",
"0.5211224",
"0.5211224",
"0.52086574",
"0.5201738",
"0.52006793",
"0.5199865",
"0.5197431",
"0.5185627",
"0.51828593",
"0.5182719",
"0.5180568",
"0.5179036",
"0.51692885",
"0.5167368",
"0.51622516",
"0.51585966",
"0.51531595",
"0.5152865",
"0.5152072",
"0.5152072",
"0.5152072",
"0.5152042",
"0.51433676",
"0.51405257",
"0.5129117",
"0.5114141",
"0.5109278",
"0.5104149",
"0.50972474",
"0.50930786",
"0.5091279",
"0.5088827",
"0.5087875",
"0.5082322",
"0.50819147"
] | 0.66857326 | 2 |
Delete all index entry about content which hash is supplied. | public void delete(Hash hash) {
LOG.info("[{}] Deleting {}", name, hash);
try (IndexWriter writer = newIndexWriter()) {
writer.deleteDocuments(new Term(CONTENT, hash.asHexadecimalString()));
} catch (AlreadyClosedException e) {
throw new RepositoryClosedException(e);
} catch (IOException e) {
throw new IOFailureException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void delete(DNA key){\n if(this.debug)\n System.out.println(\"ExtHash::delete >> eliminando cadena: \" + key.toString() + \", hashCode: \" + key.hashCode());\n\n Node actual_node = this.getReference(key);\n if(this.debug)\n System.out.println(\"ExtHash::delete >> altura del nodo: \" + actual_node.getAltura());\n\n int reference_page = actual_node.getReference();\n ArrayList<Integer> content = this.fm.read(reference_page); this.in_counter++;\n\n int last_page = reference_page, last_chain = 0;\n ArrayList<Integer> last_content = content, search_content;\n\n // last_block: referencia al ultimo bloque.\n // search_block: referencia al bloque con el elemento buscado.\n int last_block = reference_page, search_block = -1, search_pos = -1;\n int total_elements = 0, altura = actual_node.getAltura();\n\n while(true) {\n if(this.debug)\n System.out.println(\"ExtHash::delete >> referencia a pagina: \" + last_page);\n\n if(this.debug) {\n System.out.println(\"ExtHash::delete >> contenido de la pagina:\");\n for(int i=0; i<last_content.size(); i++)\n System.out.println(\" \" + last_content.get(i));\n }\n\n total_elements += last_content.get(0);\n if(search_block == -1) {\n for (int i = 1; i <= last_content.get(0); i++) {\n if (last_content.get(i) == key.hashCode()) {\n if(this.debug)\n System.out.println(\"ExtHash::delete >> cadena \" + key.hashCode() + \" encontrada\");\n search_pos = i;\n search_block = last_page;\n total_elements--;\n total_in--;\n break;\n }\n }\n }\n\n if(last_content.get(0) != 0) {\n last_block = last_page;\n last_chain = last_content.get(last_content.get(0));\n }\n\n if(last_content.get(0) != B - 2) {\n break;\n }\n\n if(this.debug)\n System.out.println(\"ExtHash::delete >> acceciendo a siguiente pagina\");\n\n last_page = last_content.get(B-1);\n last_content = this.fm.read(last_page); this.in_counter++;\n }\n\n ArrayList<Integer> new_content = new ArrayList<>();\n if(search_block != -1) {\n // se encontro el elemento buscado.\n // search_block: referencia al bloque que contiene la buscado.\n // last_block: referencia al ultimo bloque de la lista enlazada.\n\n search_content = this.fm.read(search_block); this.in_counter++;\n last_content = this.fm.read(last_block); this.in_counter++;\n\n if(search_block == last_block) {\n // elemento buscado estaba en la ultima pagina de la lista enlazada.\n new_content.add(search_content.get(0) - 1);\n for(int i=1; i<=search_content.get(0); i++) {\n if(i != search_pos)\n new_content.add(search_content.get(i));\n\n }\n if(search_content.get(0) == B-2)\n total_active_block--;\n\n } else {\n // elemento buscado no esta en la ultima pagina de la lista enlazada.\n new_content.add(search_content.get(0));\n for(int i=1; i<=search_content.get(0); i++) {\n if(i != search_pos)\n new_content.add(search_content.get(i));\n else\n new_content.add(last_chain);\n\n }\n new_content.add(search_content.get(B - 1));\n\n ArrayList<Integer> new_last_content = new ArrayList<>();\n new_last_content.add(last_content.get(0) - 1);\n for(int i=1; i<last_content.get(0); i++) {\n new_last_content.add(last_content.get(i));\n\n }\n if(last_content.get(0) == B-2)\n total_active_block--;\n\n this.fm.write(new_last_content, last_block); this.out_counter++;\n\n }\n this.fm.write(new_content, search_block); this.out_counter++;\n }\n\n // la pagina contiene pocos elementos, y no es parte del primer nodo\n\n if(total_elements < (B - 2) / 2 && search_block != -1 && 0 < altura){\n if(this.debug)\n System.out.println(\"ExtHash::delete >> limite de pagina, iniciando compresion\");\n this.compress(actual_node);\n }\n\n }",
"int deleteByPrimaryKey(String hash);",
"void clearAllIndexes();",
"public void clear() {\n index.clear();\n }",
"@Override\n\tpublic void deleteDuplicate(byte[] hash, long start, int len)\n\t\t\tthrows IOException {\n\n\t}",
"@Override\n\tpublic void deleteHashFile(boardDTO board) throws Exception {\n\t\tsqlSession.delete(namespace+\".deleteFile\",board);\n\t\tsqlSession.delete(namespace+\".deleteHashtag\",board);\n\t\tsqlSession.delete(namespace+\".likedelete\",board);\n\t}",
"public synchronized void delete(long entry) throws IOException {\n long startOfEntry = IDX_START_OF_CONTENT + (entry * bytesPerSlot);\n \n // Remove the entry by writing a '\\n' to the first byte\n idx.seek(startOfEntry);\n idx.writeChar('\\n');\n idx.write(new byte[bytesPerSlot - 2]);\n \n // Update the file header\n entries--;\n idx.seek(IDX_HEADER_ENTRIES);\n idx.writeLong(entries);\n \n logger.debug(\"Removed uri at address '{}' from index\", entry);\n }",
"public void deleteIndex() throws IOException {\n synchronized (getLock()) {\n flush();\n if (ZimbraLog.index_add.isDebugEnabled()) {\n ZimbraLog.index_add.debug(\"Deleting index \" + luceneDirectory);\n }\n\n String[] files;\n try {\n files = luceneDirectory.listAll();\n } catch (NoSuchDirectoryException ignore) {\n return;\n } catch (IOException e) {\n ZimbraLog.index_add.warn(\"Failed to delete index: %s\",\n luceneDirectory, e);\n return;\n }\n\n for (String file : files) {\n luceneDirectory.deleteFile(file);\n }\n }\n }",
"@Override\r\n\tpublic int deleteHashtag(int hashtag_no) {\n\t\treturn 0;\r\n\t}",
"IndexDeleted deleteAllIndexes() throws ElasticException;",
"private void deleteCheck(int hash){\r\n for(int i = 1; i < M; i++){ //Doesn't consider the index of the removed pair\r\n if(hash + i < M){\r\n \tif(keys[hash + i] == null) continue;\r\n \tif(hash == hash(keys[hash + i])){\r\n \tmove(hash, hash + i);\r\n \tbreak;\r\n }\r\n }else{\r\n if(keys[hash + i - M] == null) continue;\r\n if(hash == hash(keys[hash + i - M])){\r\n \tmove(hash, hash + i - M);\r\n \tbreak;\r\n }\r\n }\r\n }\r\n }",
"public abstract void deselectAllIndexes();",
"public void clearHash() {\r\n\t\tinternedTexts.clear();\r\n\t\tinternedAttributes.clear();\r\n\t}",
"void initiateRemoveIndexes(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;",
"public void clear() throws IOException {\n\t\tindexWriter.deleteAll();\n\t\tforceCommit();\n\t}",
"private void removeContentAfterIndexLink()\r\n \t{\r\n \t\tdeleteNodes(XPath.AFTER_INDEX_LINK.query);\r\n \t}",
"public void clear(long index);",
"private void deleteIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // check required params\n String id = helper.getMandatoryString(msg.body(), MSG_PROPERTY_ID, msg);\n if (id == null) return;\n\n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName);\n apiPath.append(API_PATH);\n apiPath.append(\"/\").append(id);\n \n httpDelete(persistor, apiPath.toString(), headers, timeout, msg);\n }",
"public static void delete(FileSystem fs, String name) throws IOException {\n\t\tPath dir = new Path(name);\n\t\tPath data = new Path(dir, DATA_FILE_NAME);\n\t\tPath index = new Path(dir, INDEX_FILE_NAME);\n\n\t\tfs.delete(data, true);\n\t\tfs.delete(index, true);\n\t\tfs.delete(dir, true);\n\t}",
"@AfterClass\n\tpublic static void cleanIndex() {\n\t\tEntityTest et = new EntityTest(id, \"EntityTest\");\n\t\tRedisQuery.remove(et, id);\n\t}",
"public void deleteIndex() throws Exception {\n\n\t\tRetryingRunnable runnable = new RetryingRunnable() \n\t\t{\t\n\t\t\tpublic void run() throws Exception \n\t\t\t{\n\t\t\t\tIndexWriter w = createIndexWriter(true); // open for writing and close (make empty)\n\t\t\t\tw.deleteAll();\n\t\t\t\tw.commit();\n\t\t\t\tw.close(true);\n\t\t\t\t\n\t\t\t\tDirectory dir = getIndexDir();\n\t\t\t\tfor(String file: dir.listAll())\n\t\t\t\t{\n\t\t\t\t\tif( dir.fileExists(file) ) // still exits\n\t\t\t\t\t{\n\t\t\t\t\t\tdir.sync(file);\n\t\t\t\t\t\tdir.deleteFile(file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdir.close();\n\t\t\t}\n\t\t\t\n\t\t\tpublic boolean handleException(Throwable e) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\t\n\t\tchangeListener.onIndexReset(); // close searcher because index is deleted\n\t\t\n\t\trunRetryingRunnable(runnable); // delete index with retry\n\t}",
"@Override\n\tpublic int delDetailList(String bzhh) throws Exception {\n return exWarehouseDetailMapper.deleteByBzhh(bzhh);\n\t}",
"@Override\n\tpublic void clearIndex(String indexName) {\n\t\t\n\t}",
"void removeIndexForRepository(long repositoryId);",
"public void delete(String key){\r\n\t\tint hash = hash(key);\r\n for(int i = 0; i < M; i++){\r\n if(hash + i < M){\r\n if(keys[hash + i] != null && keys[hash + i].equals(key)){\r\n remove(hash + i);\r\n N--;\r\n break;\r\n }\r\n }else{\r\n if(keys[hash + i - M] != null && keys[hash + i - M].equals(key)){\r\n remove(hash + i - M);\r\n N--;\r\n break;\r\n }\r\n }\r\n\t\t}\r\n }",
"private void deleteBuckets(Vector<Vector<String>> index) {\n //deserialize bucket from each position\n for (int i = 0; i < index.size(); i++) {\n if (index.get(i) != null) {\n for (int j = 0; j < index.get(i).size(); j++) {\n Utilities.removeFromDisk(index.get(i).get(j));\n }\n\n }\n\n }\n //loop on entries and insert\n }",
"@Override\n public void removeFromCache(List<NulsDigestData> txHashList) {\n\n }",
"public boolean deleteIndexDefinitionFromStore(Cluster cluster, String streamId)\n throws StreamDefinitionStoreException {\n Keyspace keyspace = getKeyspace(StreamDefinitionUtils.getIndexKeySpaceName(), cluster);\n Mutator<String> mutator = HFactory.createMutator(keyspace, stringSerializer);\n mutator.delete(streamId, INDEX_DEF_CF, SECONDARY_INDEX_DEF, stringSerializer);\n mutator.delete(streamId, INDEX_DEF_CF, CUSTOM_INDEX_DEF, stringSerializer);\n\n return true;\n\n }",
"public void deleteContent(int parseInt) {\n\t\tcontentMapper.deleteByPrimaryKey(parseInt);\n\t}",
"void removeAllEntries();",
"protected void deleteEntryFromIndex(String key, RecordHeader header, int currentNumRecords) throws IOException {\n if (header.indexPosition != currentNumRecords -1) {\n String lastKey = readKeyFromIndex(currentNumRecords-1);\n RecordHeader last = keyToRecordHeader(lastKey);\n last.setIndexPosition(header.indexPosition);\n file.seek(indexPositionToKeyFp(last.indexPosition));\n file.writeUTF(lastKey);\n file.seek(indexPositionToRecordHeaderFp(last.indexPosition));\n last.write(file);\n }\n writeNumRecordsHeader(currentNumRecords-1);\n\n getMemIndex().remove(key);\n }",
"IndexDeleted deleteIndex(String names) throws ElasticException;",
"@Override\r\n\tpublic void delete(int r_idx) throws Exception {\n\r\n\t}",
"long delete(String collection, String hkey);",
"@Override\n\tpublic void clearIndex(Class<? extends ModelKey> clazz) {\n\t\t\n\t}",
"public wsihash remove(long wsihashId) throws NoSuchwsihashException;",
"private void deleteFromTrie( URI uri) {\n DocumentImpl doc = (DocumentImpl) getDocument(uri);\n if (doc != null) {\n // HashTable wordMap = doc.getWordMap();\n String[] strArray = doc.getDocumentAsTxt().split(\" \");\n for (String word: strArray) {\n // docTrie.put(word, null);\n docTrie.delete(word, doc);\n //deleteAllWithURI(word, uri);\n\n }\n }\n\n }",
"public void deleteAll(){\r\n\t\thead = null;\r\n\t}",
"public void deleteDado(int hashDado) throws SQLException,AziendaException,ParseException {\n\t\tAdminQuery aq = ProxyDB.getIstance();\n\t\taq.deleteDado(utente.getUsername(),hashDado);\n\t}",
"public void deleteExample(String classKey, int index, String type);",
"public static void deleteHomework(Homework h) {\n int subject_index = h.getSubjectindex();\n int homework_index = h.getIndex();\n homework.get(subject_index).remove(homework_index);\n for(int i = homework_index; i < Storage.homework.get(subject_index).size(); i++) {\n FileSaver.renameHomeworkFolder(Storage.homework.get(subject_index).get(i), FileSaver.HOMEWORK_MINUS_HOMEWORK_INDEX);\n Storage.homework.get(subject_index).get(i).setIndex(i);\n }\n }",
"public void deleteAll();",
"public void deleteAll();",
"public void deleteAll();",
"@Override\r\n\tpublic int delete(HashMap<String, Object> map) {\n\t\treturn 0;\r\n\t}",
"public Iterable<IndexUpdate> getIndexDeletes(TableState state, IndexMetaData context, byte[] regionStartKey, byte[] regionEndKey) throws IOException;",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"void deleteBucket(int bucketIdx) throws IOException;",
"public static void main_delete(String args[]){\n\t//public static void main(String args[]){\n\t\tQueryResponse solr_response = null;\n\n\t\tSolrConnection tmp_conn = new SolrConnection();\n\t\ttmp_conn.setSolrURL(\"http://localhost:8983/solr/Test1\");\n\t\t\n\t\tHashMap<String,String> params = new HashMap<String,String>();\n\t\tparams.put(\"rows\", \"16\");\n\t\t//tmp_conn.resetQueryParams();\n\t\ttmp_conn.setQueryParams(params);\n\t\t//tmp_conn.setQueryParams(\"q\",\"id:\"+QueryParser.escape(\"com.xinhuanet.js.www:http/2013-10/14/c_117706867_16.htm\"));\n\t\t\n\t\ttry {\n\t\t\tsolr_response = tmp_conn.getContent();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfor (SolrDocument doc:solr_response.getResults()){\n\t\t\t//String id = doc.getFieldValue(\"id\").toString();\n\t\t\n\t\tList<String> ids = new ArrayList<String>();\n\t\t//ids.add(\"3\");\n\t\t//ids.add(\"8\");\n\t\t//ids.add(\"7\");\n\t\tids.add(doc.getFieldValue(\"id\").toString());\n\t\ttmp_conn.deleteContentById(ids);\n\t\t}\n\t}",
"public void deleteAllRows() {\n StringBuilder deleteIds = null;\n StringBuilder convertIds = null;\n \n for (mCursor.moveToFirst(); !mCursor.isAfterLast(); mCursor.moveToNext()) {\n String url = mCursor.getString(Browser.HISTORY_PROJECTION_URL_INDEX);\n WebIconDatabase.getInstance().releaseIconForPageUrl(url);\n int id = mCursor.getInt(Browser.HISTORY_PROJECTION_ID_INDEX);\n int numVisits = mCursor.getInt(Browser.HISTORY_PROJECTION_VISITS_INDEX);\n if (0 == numVisits) {\n if (deleteIds == null) {\n deleteIds = new StringBuilder();\n deleteIds.append(\"( \");\n } else {\n deleteIds.append(\" OR ( \");\n }\n deleteIds.append(BookmarkColumns._ID);\n deleteIds.append(\" = \");\n deleteIds.append(id);\n deleteIds.append(\" )\");\n } else {\n // It is no longer a bookmark, but it is still a visited site.\n if (convertIds == null) {\n convertIds = new StringBuilder();\n convertIds.append(\"( \");\n } else {\n convertIds.append(\" OR ( \");\n }\n convertIds.append(BookmarkColumns._ID);\n convertIds.append(\" = \");\n convertIds.append(id);\n convertIds.append(\" )\");\n }\n }\n \n if (deleteIds != null) {\n mContentResolver.delete(Browser.BOOKMARKS_URI, deleteIds.toString(), \n null);\n }\n if (convertIds != null) {\n ContentValues values = new ContentValues();\n values.put(Browser.BookmarkColumns.BOOKMARK, 0);\n mContentResolver.update(Browser.BOOKMARKS_URI, values, \n convertIds.toString(), null);\n }\n refreshList();\n }",
"public void removeFromHashes() {\n getBrowser().getDrbdResHash().remove(getName());\n getBrowser().putDrbdResHash();\n for (final DrbdVolumeInfo dvi : drbdVolumes) {\n removeDrbdVolumeFromHashes(dvi);\n }\n }",
"void indexReset();",
"public void deleteContent(String spaceId, String contentId);",
"public void deleteEmptyHoards() {\n String where = KEY_GOLD_HOARDED_COLUMN + \"=\" + 0;\n String whereArgs[] = null;\n \n // Delete the rows that match the where clause.\n SQLiteDatabase db = hoardDBOpenHelper.getWritableDatabase();\n db.delete(HoardDBOpenHelper.DATABASE_TABLE, where, whereArgs);\n }",
"@Transactional\n\t@Override\n\tpublic void deleteAll() {\n\t\tanchorKeywordsDAO.deleteAll();\n\t}",
"void delete (int index);",
"public void clear()\n\t\t{\n\t\t\tindices.clear();\n\t\t}",
"public void deleteAll(UUID accId) {\n txMgr.doInTransaction(() -> {\n Set<UUID> notebooksIds = datasourcesIdx.delete(accId);\n\n datasourceTbl.deleteAll(notebooksIds);\n });\n }",
"private void deletes() {\n \tDBPeer.fetchTableRows();\n DBPeer.fetchTableIndexes();\n \n for (Delete delete: deletes) {\n \tdelete.init();\n }\n \n //DBPeer.updateTableIndexes(); //Set min max of indexes not implemented yet\n }",
"void purgeContent(List<Md2Entity> updates);",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n public Set<URI> deleteAll(String keyword) {\n List<Document> searchDocs = searchDocuments(keyword);\n HashSet<URI> uriSet = new HashSet<URI>(); \n CommandSet cSet = new CommandSet<>();\n for (Document d: searchDocs) {\n Function<URI, Boolean> func = docURI -> {\n boolean lambdaReturnValue = true;\n DocumentImpl doc = (DocumentImpl) d;\n if (doc == null) {\n lambdaReturnValue = false;\n }\n hashTable.put(docURI, doc);\n setWordCountOfDoc(doc);\n return lambdaReturnValue;\n };\n uriSet.add(d.getKey());\n GenericCommand cmd = new GenericCommand(d.getKey(), func);\n cSet.addCommand(cmd);\n }\n docTrie.deleteAll(keyword);\n cmdStack.push(cSet);\n \n\n return uriSet;\n }",
"public void clear(){\n\t\tcontenido = getName() + ':';\n\t\tindices.clear();\n\t\tindices.add(0);\n\t}",
"public void deleteAll();",
"private static void deleteTest() throws SailException{\n\n\t\tString dir2 = \"repo-temp\";\n\t\tSail sail2 = new NativeStore(new File(dir2));\n\t\tsail2 = new IndexingSail(sail2, IndexManager.getInstance());\n\t\t\n//\t\tsail.initialize();\n\t\tsail2.initialize();\n\t\t\n//\t\tValueFactory factory = sail2.getValueFactory();\n//\t\tCloseableIteration<? extends Statement, SailException> statements = sail2\n//\t\t\t\t.getConnection().getStatements(null, null, null, false);\n\n\t\tSailConnection connection = sail2.getConnection();\n\n\t\tint cachesize = 1000;\n\t\tint cached = 0;\n\t\tlong count = 0;\n\t\tconnection.removeStatements(null, null, null, null);\n//\t\tconnection.commit();\n\t}",
"boolean deleteIndex(String indexName);",
"public void removeAllEntries() {\n }",
"@Override\r\n\tpublic void deleteAll() {\n\r\n\t}",
"private void deleteRegion(Configuration conf, final HTableDescriptor htd,\n byte[] startKey, byte[] endKey, boolean unassign, boolean metaRow,\n boolean hdfs) throws IOException, InterruptedException {\n deleteRegion(conf, htd, startKey, endKey, unassign, metaRow, hdfs, false, HRegionInfo.DEFAULT_REPLICA_ID);\n }",
"void deleteContent(ContentIdentifier id) throws ObjectInUseException, NotAuthorizedException;",
"public void unIndex(final Term idTerm) {\n\t\ttry {\n\t\t\t_reopenToken = _trackingIndexWriter.deleteDocuments(idTerm);\n\t\t\tlog.debug(\"{}={} term matching records un-indexed from lucene\",idTerm.field(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t idTerm.text());\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error in un-index lucene operation: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t ioEx);\t\t\t\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\t_indexWriter.commit(); \n\t\t\t} catch (IOException ioEx) {\n\t\t\t\tlog.error(\"Error while commiting changes to Lucene index: {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t \t\t \t\t\t\t\t ioEx);\n\t\t\t}\n\t\t}\n\t}",
"public void deleteAllIndexes() {\n this.client.admin().indices().prepareDelete(INDEX_BASE + \"-*\").get();\n }",
"@Override\r\n\tpublic boolean delHT(int id) {\n\t\treturn adi.delHT(id);\r\n\t}",
"@Override\n\tpublic void deleteAll() throws Exception {\n\t\t\n\t}",
"int deleteContent(@Param(\"id\") long id);",
"public void deleteAll() {\n\n\t}",
"public void deleteContents(List<Content> contents) {\n if (contents != null && contents.size() != 0) {\n logger.info(\"Deleting content list from the database and local cache.\");\n for (Content c : contents) {\n // String contentRootDirectory =\n // FileUtils.getRootDir(c.getPath());\n // String remotePath = c.getPath();\n // String p = remotePath.split(\"unada\")[1];\n // c.setPath(CacheConstants.cachePath + p);\n FileUtils.deleteFile(DAOFactory.getContentDAO()\n .findById(c.getContentID()).getPath());\n\n UnadaLogger.overall.info(\n \"{}: Cache delete ({}, {})\",\n new Object[] {\n UnadaConstants.UNADA_OWNER_MD5,\n c.getContentID(),\n System.currentTimeMillis()\n - c.getCacheDate().getTime() });\n }\n DAOFactory.getContentDAO().deleteBatch(contents.listIterator());\n }\n }",
"void deleteAll();",
"void deleteAll();",
"void deleteAll();",
"public void deleteAll() {\n\t\t\n\t}",
"public abstract void deleteAll();",
"int deleteByExample(H5AppDownloadLogExample example);",
"public void clear (){\n\t\tfor (int i = 0; i < table.length; i++)\n\t\t\ttable[i] = null;\n\n\t\t// we have modified the hash table, and it has\n\t\t// no entries\n\t\tmodCount++;\n\t\thashTableSize = 0;\n\t}",
"private PageBuilder removeMostUnsed(Map<PartitionKey, PageBuilder> hash)\n {\n Iterator<Map.Entry<PartitionKey, PageBuilder>> ite = hash.entrySet().iterator();\n PageBuilder builder = ite.next().getValue();\n ite.remove();\n return builder;\n }",
"void deleteIndexStore(String reason, IndexMetadata metadata) throws IOException {\n if (nodeEnv.hasNodeFile()) {\n synchronized (this) {\n Index index = metadata.getIndex();\n if (hasIndex(index)) {\n String localUUid = indexService(index).indexUUID();\n throw new IllegalStateException(\n \"Can't delete index store for [\"\n + index.getName()\n + \"] - it's still part of the indices service [\"\n + localUUid\n + \"] [\"\n + metadata.getIndexUUID()\n + \"]\"\n );\n }\n }\n final IndexSettings indexSettings = buildIndexSettings(metadata);\n deleteIndexStore(reason, indexSettings.getIndex(), indexSettings);\n }\n }",
"public int tryRemoveURLs(String urlHash) {\r\n // this tries to delete an index from the cache that has this\r\n // urlHash assigned. This can only work if the entry is really fresh\r\n // and can be found in the RAM cache\r\n // this returns the number of deletion that had been possible\r\n return dhtInCache.tryRemoveURLs(urlHash) | dhtOutCache.tryRemoveURLs(urlHash);\r\n }"
] | [
"0.6642085",
"0.6384021",
"0.6206181",
"0.61955273",
"0.61683327",
"0.6039999",
"0.59916955",
"0.5891641",
"0.5863851",
"0.5831862",
"0.58251333",
"0.58248395",
"0.57847506",
"0.57477474",
"0.56468713",
"0.56368566",
"0.5626031",
"0.561454",
"0.55462027",
"0.5539186",
"0.55182195",
"0.5490579",
"0.5486621",
"0.5459973",
"0.5454651",
"0.5438266",
"0.5435313",
"0.5425765",
"0.5418523",
"0.5417019",
"0.5414107",
"0.5403672",
"0.53901803",
"0.5380223",
"0.5378529",
"0.53698456",
"0.5362069",
"0.5360982",
"0.5357642",
"0.53558457",
"0.5355074",
"0.5335731",
"0.5335731",
"0.5335731",
"0.5335252",
"0.5329932",
"0.5323339",
"0.5323339",
"0.5323339",
"0.5323339",
"0.53123295",
"0.5301087",
"0.5298446",
"0.5290899",
"0.5290361",
"0.5284349",
"0.52744097",
"0.5270589",
"0.5251968",
"0.524507",
"0.5239288",
"0.523779",
"0.5228657",
"0.52145183",
"0.52145183",
"0.52145183",
"0.52145183",
"0.52145183",
"0.52145183",
"0.52145183",
"0.52145183",
"0.5203607",
"0.5203607",
"0.5203607",
"0.5202463",
"0.5197041",
"0.5193548",
"0.5192651",
"0.5192398",
"0.51923454",
"0.5187832",
"0.51851285",
"0.51841104",
"0.5182171",
"0.5170271",
"0.51675457",
"0.51652414",
"0.51651305",
"0.51587206",
"0.51584697",
"0.51556313",
"0.51556313",
"0.51556313",
"0.5146082",
"0.5145658",
"0.5141877",
"0.51416713",
"0.51298714",
"0.512156",
"0.51101434"
] | 0.75364566 | 0 |
Find index entries matching supplied query. | public List<IndexEntry> find(String query, int first, int number) {
try {
if (first < 0) {
number += first;
first = 0;
}
if (directory.listAll().length == 0 || number <= 0) {
return emptyList();
}
try (DirectoryReader reader = DirectoryReader.open(directory)) {
IndexSearcher searcher = new IndexSearcher(reader);
QueryParser parser = new QueryParser(BODY, analyzer);
ScoreDoc[] hits = searcher.search(parser.parse(query), first + number).scoreDocs;
List<IndexEntry> entries = new ArrayList<>(number);
int last = min(first + number, hits.length);
for (int i = first; i < last; i++) {
Document document = searcher.doc(hits[i].doc);
Hash hash = new Hash(document.getValues(CONTENT)[0]);
Set<Hash> head = new HashSet<>();
for (String value : document.getValues(REVISION)) {
head.add(new Hash(value));
}
entries.add(new IndexEntry(hash, head));
}
return entries;
}
} catch (AlreadyClosedException e) {
throw new RepositoryClosedException(e);
} catch (ParseException e) {
throw new BadRequestException(e);
} catch (IOException e) {
throw new IOFailureException(e);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }",
"public List<SearchResultDocument> getSearchResults(String query) throws IOException, ParseException {\n return luceneIndexer.getSearchResults(query);\n }",
"private ScoreDoc[] searchExec (Query query) {\n\n ScoreDoc[] hits = null;\n\n try {\n IndexReader reader = DirectoryReader.open(indexDir);\n IndexSearcher searcher = new IndexSearcher(reader);\n TopDocs docs = searcher.search(query, hitsPerPage, new Sort(SortField.FIELD_SCORE)); //search(query, docs);\n hits = docs.scoreDocs;\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return hits;\n }",
"private DocFile[] search (String[] queries, String[] filters, BooleanClause.Occur filterOccur) throws ParseException {\n // create a master query builder\n BooleanQuery.Builder masterQueryBuilder = new BooleanQuery.Builder();\n // loop through all queries\n for (String query : queries) {\n if (query.equals(\"\")) continue;\n // create a boolean query for the each query\n BooleanQuery.Builder queryBuilder = new BooleanQuery.Builder();\n // loop through all filters\n for (String filter : filters) {\n if (filter.equals(\"\")) continue;\n QueryParser parser = new QueryParser(filter, analyzer);\n parser.setAllowLeadingWildcard(true);\n if (!filter.equals(Constants.INDEX_KEY_OWNER)) {\n Query parsedQ = parser.parse(query);\n queryBuilder.add(parsedQ, filterOccur);\n }\n else {\n queryBuilder.add(new PhraseQuery(filter, queries), filterOccur);\n }\n }\n masterQueryBuilder.add(queryBuilder.build(), BooleanClause.Occur.SHOULD);\n }\n\n // build the masterQuery\n BooleanQuery masterQuery = masterQueryBuilder.build();\n\n return searchResponse(searchExec(masterQuery), masterQuery);\n }",
"public AddressBook search(String query)\n {\n Integer count = 0;\n Integer size = addressEntryList.size();\n AddressBook ab = new AddressBook();\n int indexes[] = new int[size];\n //For loop, iterating through our entire list of Address Entries\n for (int i = 0; i < addressEntryList.size(); i++)\n {\n //If the lastname is the search query\n if(addressEntryList.get(i).getLastName().contains(query))\n {\n indexes[count] = i;\n count++;\n }\n }\n //If we found anything\n if (count > 0)\n {\n //Add entries found\n for (int i = 0; i < count; i++)\n {\n ab.addressEntryList.add(addressEntryList.get(indexes[i]));\n }\n }\n //No entries were found\n else {\n System.out.println(\"No entries were found.\");\n }\n\n return ab;\n\n }",
"public void search() {\n try {\n for(int i = 0; i < this.queries.size(); i++){\n search(i);\n // in case of error stop\n if(!this.searchOK(i)){\n System.out.println(\"\\t\" + new Date().toString() + \" \" + db + \" Search for rest queries cancelled, because failed for query \" + i + \" : \" + this.queries.get(i));\n break;\n }\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(EntrezSearcher.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public List<edu.columbia.cs.ref.model.TokenizedDocument> search(Query query, int n) {\n\n\t\tTopDocs result = null;\n\t\t\n\t\ttry {\n\t\t\tresult = IndexSearcher.search(query, n);\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\tList<TokenizedDocument> searchResults = new ArrayList<TokenizedDocument>();\n\t\t\n\t\tScoreDoc[] docs = result.scoreDocs;\n\t\t\n\t\tfor (int i = 0; i < docs.length; i++) {\n\t\t\t\n\t\t\tDocument document;\n\t\t\ttry {\n\t\t\t\tdocument = IndexSearcher.doc(docs[i].doc);\n\t\t\t\tsearchResults.add(getDocumentTable().get(createKey(document.get(PATH), document.get(FILE_NAME))));\n\t\t\t} catch (CorruptIndexException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn searchResults;\n\t\t\n\t}",
"public ArrayList<SearchResult> exactSearch(Collection<String> queries) {\n\t\tArrayList<SearchResult> results = new ArrayList<>();\n\t\tHashMap<String, SearchResult> track = new HashMap<>();\n\n\t\tfor (String query : queries) {\n\t\t\tif (invertedIndex.containsKey(query)) {\n\t\t\t\tsearchHelper(results, query, track);\n\t\t\t}\n\t\t}\n\t\tCollections.sort(results);\n\t\treturn results;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic JSONArray findMatches(String query){\n\t\t\n\t\t// Increment the search tasks counter\n\t\t++numOfSearchTasks;\n\t\t\n\t\t// Start the timer for this task\n\t\tTimer.start();\n\t\t\n\t\t// Number of needed matches\n\t\tresultsToBeFound = 10;\n\t\t\n\t\t// Clear the matches list\n\t\tsetForTypeahead.clear();\n\t\t\n\t\t// The returned JSON array\n\t\tJSONArray arrayObj = new JSONArray();\n\t\t\n\t\t// Search in all predicates\n\t\tfor(int i = 0; i < predicatesList.size(); ++i){\n\t\t\tif(predicatesList.get(i).toLowerCase().contains(query.toLowerCase())){\n\t\t\t\tarrayObj.add(predicatesList.get(i));\n\t\t\t}\n\t\t\tArrayList<String> semanticRelations = semanticRelationsMap.get(query.toLowerCase());\n\t\t\tif(semanticRelations != null) {\n\t\t\t\tfor(String s : semanticRelations) {\n\t\t\t\t\tif(predicatesList.get(i).toLowerCase().contains(s.toLowerCase())){\n\t\t\t\t\t\tarrayObj.add(predicatesList.get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Start the timer for this task\n\t\tTimer.start();\n\t\t\n\t\t// Search in index first\n\t\tCollection<Integer> list = in.search(query.toLowerCase());\n\t\tHashSet<Integer> output = null;\n\t\tif(list.size() > 0) {\n\t\t\toutput = (HashSet<Integer>) list;\n\t\t}\n\t\telse {\n\t\t\toutput = new HashSet<Integer>();\n\t\t}\n\n\t\t// If found a match, that's a hit\n\t\tif(output.size() > 0) {\n\t\t\t++numOfIndexHits;\n\t\t}\n\t\t\n\t\tfor(Integer index : output) {\n\t\t\tarrayObj.add(frequentLiteralsList.get(index));\n \t\t--resultsToBeFound;\n \t}\n\t\tdouble tempStopTime;\n\t\t// If all results were found in suffix tree\n\t\tif(resultsToBeFound < 0) {\n\t\t\tTimer.stop();\n\t\t\tsuffixTreeTime += Timer.getTimeInSeconds();\n\t\t\ttotalTime += Timer.getTimeInSeconds();\n\t\t\twriteStatsToFile();\n\t\t\treturn arrayObj;\n\t\t}\n\t\t\n\t\tTimer.stop();\n\t\tsuffixTreeTime += Timer.getTimeInSeconds();\n\t\ttempStopTime = Timer.getTimeInSeconds();\n\t\tTimer.start();\n\t\t// In length bins\n\t\t// Search in bins with a minimum length of the query\n\t\t// and a maximum of the query length + 10\n\t\tint minLength = query.length()-1;\n\t\tint maxLength = query.length() + 9;\n\t\t\n\t\tint minIndex = Integer.MAX_VALUE;\n\t\tint maxIndex = -1;\n\t\t\n\t\t// Determine which indices of the literals array\n\t\t// to search within\n\t\tfor(int i = 0; i < lengths.size(); ++i){\n\t\t\tif(lengths.get(i) > maxLength) {\n\t\t\t\tmaxIndex = indexes.get(i);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(minLength >= lengths.get(i)) {\n\t\t\t\tminIndex = indexes.get(i);\n\t\t\t}\n\t\t}\n\t\t\n\t\tpruningPercentage += 1 - (1.0 * (maxIndex - minIndex) / literalsList.size());\n\t\ttry{\n\t\tSystem.out.println(\"Searching for \" + query + \" between indeces: \" + minIndex + \n\t\t\t\t\" corresponding to length \" + (literalsList.get(minIndex).length()-5) +\n\t\t\t\t\" and \" + maxIndex + \" corresponding to length \" + \n\t\t\t\t(literalsList.get(maxIndex).length()-5));\n\t\t}\n\t\tcatch(IndexOutOfBoundsException e) {\n\t\t\tSystem.out.println(\"query = \" + query);\n\t\t\tSystem.out.println(\"minIndex = \" + minIndex);\n\t\t\tSystem.out.println(\"maxIndex = \" + maxIndex);\n\t\t}\n\t\t\n\t\t// Assign threads to search tasks\n\t\tint indexesPerThread = (maxIndex - minIndex) / (numOfCores);\n\t\t\n\t\t// Arraylist to keep track of threads\n\t\tArrayList<Thread> threads = new ArrayList<Thread>();\n\t\t\n\t\tfor(int i = minIndex; i < maxIndex; i += indexesPerThread) {\n\t\t\tthreads.add(new Thread(new SearchTask(i, i + indexesPerThread, query)));\n\t\t}\n\t\t\n\t\t// Start threads\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\tthreads.get(i).start();\n\t\t}\n\t\t\n\t\t// Join threads before continue\n\t\tfor(int i = 0; i < threads.size(); ++i) {\n\t\t\ttry {\n\t\t\t\tthreads.get(i).join();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Stop timer\n\t\tTimer.stop();\n\t\ttotalTime += tempStopTime + Timer.getTimeInSeconds();\n\t\t\n\t\t// Sort by length\n\t\tArrayList<String> tempList = new ArrayList<String>();\n\t\tfor(String string : setForTypeahead) {\n\t\t\tif(!arrayObj.contains(string))\n\t\t\t\ttempList.add(string);\n\t\t}\n\t\tjava.util.Collections.sort(tempList, new LengthComparator());\n\t\t\n\t\t// Fill the array\n\t\tfor(int i = 0; i < tempList.size() && resultsToBeFound > 0; ++i, --resultsToBeFound) {\n\t\t\tarrayObj.add(tempList.get(i));\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t// Update the stats file with number of tasks and hits\n\t\twriteStatsToFile();\n\t\t\n\t\treturn arrayObj;\n\t}",
"public void searchIndex(Directory index) throws Exception{\n\t\tString searchString = getSearchString();\n\t\t\n\t\tSystem.out.println(\"Searching for '\" + searchString + \"'\");\n\n\t\tIndexReader indexReader = DirectoryReader.open(index);\n\t\tIndexSearcher indexSearcher = new IndexSearcher(indexReader);\n\n\t\tAnalyzer analyzer = new StandardAnalyzer();\n\t\t\n\t\tString query_string = \"title:\" + searchString + \" OR content:\" + searchString + \"OR important:\" + searchString + \"OR h1:\" + searchString +\n\t\t\t\t\"OR h2:\" + searchString + \"OR h3:\" + searchString + \"OR h4:\" + searchString + \"OR h5:\" + searchString + \"OR h6:\" + searchString;\n\t\tQueryParser queryParser = new QueryParser(\"title\", analyzer);\n\t\t\n\t\tTopDocs docs = indexSearcher.search(queryParser.parse(query_string), 10);\n\t\t\n\t\t\n//\t\tString[] fields = {\"content\", \"title\", \"important\", \"h1\", \"h2\", \"h3\", \"h4\", \"h5\", \"h6\"};\n//\t\tBooleanClause.Occur[] flags = \n//\t\t{\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n//\t\t\tBooleanClause.Occur.SHOULD,\n// };\n//\t\t\n//\t\tTopDocs docs = indexSearcher.search(MultiFieldQueryParser.parse(searchString, fields, flags, analyzer), 10);\n\n\t\tScoreDoc[] hits = docs.scoreDocs;\n\n\t System.out.println(\"Found \" + hits.length + \" hits.\");\n\t for(int i=0;i<hits.length;++i) {\n\t \tint docId = hits[i].doc;\n\t Document d = indexSearcher.doc(docId);\n\t System.out.println((i + 1) + \". \" + d.get(\"title\") + \"\\t\" + d.get(\"url\") + \"\\t\" + hits[i].score);\n\t }\n\t}",
"public static SearchHit[] query(String query) {\n \tNode node = nodeBuilder().client(true).clusterName(\"clarke\").node();\r\n\t\tClient client = node.client();\r\n\r\n SearchResponse scrollResp = client.prepareSearch(index).addField(\"url\")\r\n .setSearchType(SearchType.QUERY_THEN_FETCH)\r\n .setScroll(new TimeValue(60000))\r\n .setQuery(QueryBuilders.matchQuery(\"text\", query)).setSize(200)\r\n .execute().actionGet();\r\n\r\n return scrollResp.getHits().getHits();\r\n\r\n }",
"private final List<Object> searchForResults(@Nullable String query)\n {\n ArrayList<Object> results = new ArrayList<>();\n try {\n results.addAll(crDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the cr dao for results.\", e);\n }\n\n try {\n results.addAll(customMonsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the custom monster dao for results.\", e);\n }\n\n try {\n results.addAll(monsterDao.getRecordsLike(query));\n } catch (Exception e) {\n Logger.error(\"Failed to search the standard monster dao for results.\", e);\n }\n\n return results;\n }",
"@Override\n public synchronized Long count(String query) {\n long count = 0L;\n String nQuery = normalizeQuery(query);\n Set<String> keys = suggestIndex.getKeys();\n Map index = suggestIndex.getIndex();\n LinkedHashSet<Long> result = new LinkedHashSet<Long>();\n\n logger.debug(\"IN SEARCH: query={}, keys={}\", query, keys);\n\n StringBuilder patternBuilder;\n List<Pattern> patterns = new ArrayList<Pattern>();\n for (String keyPart : nQuery.split(\" \")) {\n patternBuilder = new StringBuilder(\"^(?iu)\");\n patternBuilder.append(ALLOWED_CHARS_REGEXP);\n keyPart = Normalizer.normalize(keyPart, Normalizer.Form.NFD);\n patternBuilder.append(keyPart)\n .append(ALLOWED_CHARS_REGEXP)\n .append('$');\n patterns.add(Pattern.compile(patternBuilder.toString()));\n }\n\n for (String key : keys) {\n for (Pattern pattern : patterns) {\n\n if (pattern.matcher(key).matches()) {\n result.addAll((LinkedHashSet<Long>) index.get(key));\n count += ((LinkedHashSet<Long>) index.get(key)).size();\n }\n }\n }\n return Long.valueOf(result.size());\n }",
"List<SearchResult> search(SearchQuery searchQuery);",
"public SampleIndexQuery testQueryIndex(Query annotationQuery, Query query) throws Exception {\n System.out.println(\"Query DBAdaptor\");\n query.putAll(annotationQuery);\n queryResult = query(new Query(query), new QueryOptions());\n int onlyDBAdaptor = queryResult.getNumResults();\n\n // Query SampleIndex\n System.out.println(\"Query SampleIndex\");\n SampleIndexQuery indexQuery = SampleIndexQueryParser.parseSampleIndexQuery(new Query(query), variantStorageEngine.getMetadataManager());\n// int onlyIndex = (int) ((HadoopVariantStorageEngine) variantStorageEngine).getSampleIndexDBAdaptor()\n// .count(indexQuery, \"NA19600\");\n int onlyIndex = ((HadoopVariantStorageEngine) variantStorageEngine).getSampleIndexDBAdaptor()\n .iterator(indexQuery).toQueryResult().getNumResults();\n\n // Query SampleIndex+DBAdaptor\n System.out.println(\"Query SampleIndex+DBAdaptor\");\n VariantQueryResult<Variant> queryResult = variantStorageEngine.get(query, new QueryOptions());\n int indexAndDBAdaptor = queryResult.getNumResults();\n System.out.println(\"queryResult.source = \" + queryResult.getSource());\n\n System.out.println(\"----------------------------------------------------------\");\n System.out.println(\"query = \" + annotationQuery.toJson());\n System.out.println(\"annotationIndex = \" + IndexUtils.byteToString(indexQuery.getAnnotationIndexMask()));\n for (String sample : indexQuery.getSamplesMap().keySet()) {\n System.out.println(\"fileIndex(\"+sample+\") = \" + IndexUtils.maskToString(indexQuery.getFileIndexMask(sample), indexQuery.getFileIndex(sample)));\n }\n System.out.println(\"Query ONLY_INDEX = \" + onlyIndex);\n System.out.println(\"Query NO_INDEX = \" + onlyDBAdaptor);\n System.out.println(\"Query INDEX = \" + indexAndDBAdaptor);\n\n if (onlyDBAdaptor != indexAndDBAdaptor) {\n queryResult = variantStorageEngine.get(query, new QueryOptions());\n List<String> indexAndDB = queryResult.getResult().stream().map(Variant::toString).sorted().collect(Collectors.toList());\n queryResult = query(query, new QueryOptions());\n List<String> noIndex = queryResult.getResult().stream().map(Variant::toString).sorted().collect(Collectors.toList());\n\n for (String s : indexAndDB) {\n if (!noIndex.contains(s)) {\n System.out.println(\"From IndexAndDB, not in NoIndex = \" + s);\n }\n }\n\n for (String s : noIndex) {\n if (!indexAndDB.contains(s)) {\n System.out.println(\"From NoIndex, not in IndexAndDB = \" + s);\n }\n }\n }\n assertEquals(onlyDBAdaptor, indexAndDBAdaptor);\n assertThat(queryResult, numResults(lte(onlyIndex)));\n assertThat(queryResult, numResults(gt(0)));\n return indexQuery;\n }",
"public ArrayList<SearchResult> partialSearch(Collection<String> queries) {\n\t\tArrayList<SearchResult> results = new ArrayList<>();\n\t\tHashMap<String, SearchResult> track = new HashMap<>();\n\n\t\tfor (String query : queries) {\n\t\t\tfor (String word : this.invertedIndex.tailMap(query).keySet()) {\n\t\t\t\tif (word.startsWith(query)) {\n\t\t\t\t\tsearchHelper(results, word, track);\n\t\t\t\t} else {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tCollections.sort(results);\n\t\treturn results;\n\t}",
"public SearchResults search(String queryString) {\n\n Timer.Context ctx = m_searchTimer.time();\n\n SearchResults searchResults = new SearchResults();\n\n for (String term : s_tokenSplitter.splitToList(queryString)) {\n\n Term t = Term.parse(term);\n\n Statement searchQuery = select(Constants.Schema.C_TERMS_RESOURCE).from(Constants.Schema.T_TERMS)\n .where(eq(Constants.Schema.C_TERMS_CONTEXT, Context.DEFAULT_CONTEXT.getId()))\n .and( eq(Constants.Schema.C_TERMS_FIELD, t.getField()))\n .and( eq(Constants.Schema.C_TERMS_VALUE, t.getValue()));\n\n // TODO: Use async DB calls; Get attrs and metrics concurrently\n for (Row row : m_session.execute(searchQuery.toString())) { // FIXME: toString()?\n String id = row.getString(Constants.Schema.C_TERMS_RESOURCE);\n Optional<Map<String, String>> attrs = fetchResourceAttributes(Context.DEFAULT_CONTEXT, id);\n Collection<String> metrics = fetchMetricNames(Context.DEFAULT_CONTEXT, id);\n\n searchResults.addResult(new Resource(id, attrs), metrics);\n }\n }\n\n try {\n return searchResults;\n }\n finally {\n ctx.stop();\n }\n }",
"public HashMap<String, Double> search(String query) {\n // ===================================================\n // 1. Fetch all inverted lists corresponding to terms\n // in the query.\n // ===================================================\n String[] terms = query.split(\" \");\n HashMap<String, Integer> qf = new HashMap<String, Integer>();\n // Calculate term frequencies in the query\n for (String term : terms) {\n if (qf.containsKey(term))\n qf.put(term, qf.get(term) + 1);\n else\n qf.put(term, 1);\n }\n HashMap<String, Double> docScore = new HashMap<String, Double>();\n for (Entry<String, Integer> termEntry : qf.entrySet()) {\n String term = termEntry.getKey();\n int qfi = termEntry.getValue();\n\n // ===================================================\n // 2. Compute BM25 scores for documents in the lists.\n // Make a score list for documents in the inverted\n // lists. Assume that no relevance information is \n // available. For parameters, use k1=1.2, b=0.75, \n // k2=100.\n // ===================================================\n double k1 = 1.2;\n double b = 0.75;\n double k2 = 100;\n int ni = invIndex.get(term).size();\n\n\n for (Entry<String, IndexEntry> invListEntry : invIndex.get(term).entrySet()) {\n String docID = invListEntry.getKey();\n double bm25Score;\n if (docScore.containsKey(docID))\n bm25Score = docScore.get(docID);\n else\n bm25Score = 0;\n\n // length of the document\n int dl = docStat.get(docID);\n // frequency of the term in the document\n int fi = invListEntry.getValue().getTf();\n double K = k1 * ((1 - b) + b * ((double) dl / avdl));\n\n // ===================================================\n // 3. Accumulate scores for each term in a query\n // on the score list.\n // ===================================================\n bm25Score += Math.log((N - ni + 0.5) / (ni + 0.5))\n * (((k1 + 1) * fi * (k2 + 1) * qfi) / ((K + fi) * (k2 + qfi)));\n docScore.put(docID, bm25Score);\n }\n }\n\n return docScore;\n }",
"public String[] searchIndex(Directory ramdir, Query query) \n\t\t\tthrows Exception {\n\t\tSortedMap<Float,String> sentenceMap = \n\t\t\t\tnew TreeMap<Float,String>();\n\t\tIndexReader indexReader = DirectoryReader.open(ramdir);\n\t\tIndexSearcher indexSearcher = new IndexSearcher(indexReader);\n\t\tBM25Similarity similarity = new BM25Similarity(1.2f, 100f);\n\n\t\tindexSearcher.setSimilarity(similarity);\n\t\tTopDocs topDocs = indexSearcher.search(query, this.numSentences);\n\n\t\tfor (ScoreDoc scoreDoc : topDocs.scoreDocs) {\n\n\t\t\t// System.out.println(scoreDoc.score)\n\t\t\tint docId = scoreDoc.doc;\n\t\t\t//System.out.println(searcher.explain(query, docId));\n\t\t\tDocument doc = indexSearcher.doc(docId);\n\t\t\t// System.out.println(sentences.get(docId));\n\t\t\tSystem.out.println(doc.get(\"content\"));\n\n\t\t\t// System.out.println(doc.get(\"text\"));\n\n\t\t\t// if(scoreDoc.score>=0.1F){\n\n\t\t\tsentenceMap.put((float) scoreDoc.doc, \">> \"+StringUtils.chomp(doc.get(\"content\")));\n\t\t\t//sentenceMap.put(1/scoreDoc.score,sentences.get(docId));\n\t\t\t// System.out.println(scoreDoc);\n\t\t\t// System.out.println(StringUtils.chomp(doc.get(\"text\")));\n\t\t\t// }\n\t\t}\n\n\t\treturn sentenceMap.values().toArray(new String[0]);\n\n\t}",
"public final void query(Connection conn, String input) {\n\n try {\n pstmt = conn.prepareStatement(\"SELECT * FROM EMPLOYEES_INDEX\"\n + \" WHERE UPPER(employee_name) LIKE ?\");\n pstmt.setString(1, input.toUpperCase() + '%');\n rs = pstmt.executeQuery();\n while (rs.next()) {\n int id = rs.getInt(\"employee_id\");\n results.add(id);\n\n }\n } catch (SQLException e) {\n\n System.out.println(\"Could not query the table.\");\n\n }\n\n }",
"public SearchRequestBuilder getListSearch(ESQuery query, String index) {\n\n\t\t// Group Aggregation\n\t\tString dimField = query.getDimField();\n\t\tTermsBuilder termsBuilder = AggregationBuilders.terms(dimField).field(dimField);\n\n\t\t// Group Filter\n\t\t/*List<ESFilter> aggFilter = query.getAggFilter();\n\t\tif (null != aggFilter) {\n\t\t\ttermsBuilder.collectMode(mode);\n\t\t}*/\n\t\t\n\t\t// Group Sum Aggregation\n\t\tfor (ConfigColumn column : query.getIdxList()) {\n\t\t\tString field = column.getField();\n\t\t\ttermsBuilder.subAggregation(AggregationBuilders.sum(field).field(field));\n\t\t}\n\n\t\t// Group Order\n\t\tConfigColumn sortField = query.getSortField();\n\t\tif (sortField != null) {\n\t\t\tif (sortField.getDim() == 1) {\n\t\t\t\ttermsBuilder.order(Terms.Order.term(query.isAsc()));\n\t\t\t} else {\n\t\t\t\tString fieldName = sortField.getField();\n\t\t\t\ttermsBuilder.order(Terms.Order.aggregation(fieldName, query.isAsc()));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set Pagination\n\t\tPagination page = query.getPage();\n\t\tif (null != page) {\n\t\t\tint from = page.getFrom();\n\t\t\tint size = page.getPageSize();\n\t\t\ttermsBuilder.size(Math.max(max, from + size));\n\t\t} else {\n\t\t\ttermsBuilder.size(max);\n\t\t}\n\t\t\n\t\t// Construct Search Builder\n\t\tSearchRequestBuilder esSearch = getClient().prepareSearch(index).setTypes(type);\n\t\tesSearch.addAggregation(termsBuilder).setQuery(query.getQueryBuilder());\n\n\t\treturn esSearch;\n\t}",
"public void performSearch() throws IOException {\n configuration();\n\n File fileDir = new File(queryFilePath);\n if (fileDir.isDirectory()) {\n File[] files = fileDir.listFiles();\n Arrays.stream(files).forEach(file -> performSearchUsingFileContents(file));\n }\n }",
"public Collection search (String[] likeColumns, Object[] likeParams,\r\n\t\t\tString[] eqColumns, Object[] eqParams, int index, int offset) throws Exception{\r\n\r\n\t\tCriteria c = edcTerminalDao.getCriteria();\r\n\t\tDaoSupportUtil.setLikeParam(likeColumns,likeParams,c);\r\n\t\tDaoSupportUtil.setEqParam(eqColumns,eqParams,c);\r\n\t\tDaoSupportUtil.setLimit(index, offset, c);\r\n\t\tList list = c.list();\r\n\t\treturn list;\r\n\r\n\t}",
"public DocFile[] searchResponse(ScoreDoc[] results, Query query) {\n\n DocFile[] result = new DocFile[results.length];\n FastVectorHighlighter highlighter = new FastVectorHighlighter(true,true);\n FieldQuery highlightQuery = highlighter.getFieldQuery(query); \n\n try {\n IndexReader reader = DirectoryReader.open(indexDir);\n IndexSearcher searcher = new IndexSearcher(reader);\n\n for (int i = 0; i < results.length; i++) {\n int docId = results[i].doc;\n Document document = searcher.doc(docId);\n \n //Highlight the best Content context from each Doc\n String contextString = highlighter.getBestFragment(highlightQuery, \n searcher.getIndexReader(), results[i].doc,Constants.INDEX_KEY_CONTENT,140);\n \n DocFile toAdd = new DocFile(\n document.get(Constants.INDEX_KEY_FILENAME),\n document.get(Constants.INDEX_KEY_TITLE),\n document.get(Constants.INDEX_KEY_OWNER),\n document.get(Constants.INDEX_KEY_PATH),\n document.get(Constants.INDEX_KEY_STATUS).equalsIgnoreCase(\"true\"));\n \n if (contextString != null) {\n toAdd.setContextString(contextString);\n }\n \n toAdd.setId(document.get(Constants.INDEX_KEY_ID));\n toAdd.setPermissions(Integer.parseInt(document.get(Constants.INDEX_KEY_PERMISSION)));\n toAdd.setCourseCode(document.get(Constants.INDEX_KEY_COURSE));\n result[i] = toAdd;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return result;\n }",
"public List<NewIndexItem> findByQueryNumber(String queryString, int numOfResults) throws ParseException, IOException, WordNetException{\r\n\t\tList<NewIndexItem> results2 = new ArrayList<NewIndexItem>();\r\n\t\ttry{\r\n\t\t\t//create query from incoming query string\r\n\t\t\tQuery query = queryNumberQueryParser.parse(queryString);\r\n\t\t\t//execute the query and get results\r\n\t\t\tScoreDoc[] queryResults = searcher2.search(query, numOfResults).scoreDocs;\r\n\t\t\t//process the results\r\n\t\t\tfor (ScoreDoc scoreDoc : queryResults){\r\n\t\t\t\tDocument doc = searcher2.doc(scoreDoc.doc);\r\n\t\t\t\tresults2.add(new NewIndexItem(doc.get(NewIndexItem.QUERYNUMBER), doc.get(NewIndexItem.TERMID), doc.get(NewIndexItem.LABEL), doc.get(NewIndexItem.SEARCHLABEL), doc.get(NewIndexItem.QUERYTERM), doc.get(NewIndexItem.NUMOFRESULTS)));\r\n\t\t\t}\r\n\t\t\treturn results2;\r\n\t\t}\r\n\t\tcatch (ParseException ex) {\r\n\t\t\tSystem.out.println(\"Parse Exception2 for: \" + queryString);\r\n\t\t}\r\n\t\treturn results2;\r\n\t}",
"public void search(IndexShort < O > index, short range, short k)\n throws Exception {\n // assertEquals(index.aDB.count(), index.bDB.count());\n // assertEquals(index.aDB.count(), index.bDB.count());\n // index.stats();\n index.resetStats();\n // it is time to Search\n int querySize = 1000; // amount of elements to read from the query\n String re = null;\n logger.info(\"Matching begins...\");\n File query = new File(testProperties.getProperty(\"test.query.input\"));\n File dbFolder = new File(testProperties.getProperty(\"test.db.path\"));\n BufferedReader r = new BufferedReader(new FileReader(query));\n List < OBPriorityQueueShort < O >> result = new LinkedList < OBPriorityQueueShort < O >>();\n re = r.readLine();\n int i = 0;\n long realIndex = index.databaseSize();\n\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n OBPriorityQueueShort < O > x = new OBPriorityQueueShort < O >(\n k);\n if (i % 100 == 0) {\n logger.info(\"Matching \" + i);\n }\n\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n if(i == 279){\n System.out.println(\"hey\");\n }\n index.searchOB(s, range, x);\n result.add(x);\n i++;\n }\n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n \n logger.info(index.getStats().toString());\n \n int maxQuery = i;\n // logger.info(\"Matching ends... Stats follow:\");\n // index.stats();\n\n // now we compare the results we got with the sequential search\n Iterator < OBPriorityQueueShort < O >> it = result.iterator();\n r.close();\n r = new BufferedReader(new FileReader(query));\n re = r.readLine();\n i = 0;\n while (re != null) {\n String line = parseLine(re);\n if (line != null) {\n if (i % 300 == 0) {\n logger.info(\"Matching \" + i + \" of \" + maxQuery);\n }\n O s = factory.create(line);\n if (factory.shouldProcess(s)) {\n OBPriorityQueueShort < O > x2 = new OBPriorityQueueShort < O >(\n k);\n searchSequential(realIndex, s, x2, index, range);\n OBPriorityQueueShort < O > x1 = it.next();\n //assertEquals(\"Error in query line: \" + i + \" slice: \"\n // + line, x2, x1); \n \n assertEquals(\"Error in query line: \" + i + \" \" + index.debug(s) + \"\\n slice: \"\n + line + \" \" + debug(x2,index ) + \"\\n\" + debug(x1,index), x2, x1);\n\n i++;\n }\n \n }\n if (i == querySize) {\n logger.warn(\"Finishing test at i : \" + i);\n break;\n }\n re = r.readLine();\n }\n r.close();\n logger.info(\"Finished matching validation.\");\n assertFalse(it.hasNext());\n }",
"public void searchAndWriteQueryResultsToOutput() {\n\n List<String> queryList = fu.textFileToList(QUERY_FILE_PATH);\n\n for (int queryID = 0; queryID < queryList.size(); queryID++) {\n String query = queryList.get(queryID);\n // ===================================================\n // 4. Sort the documents by the BM25 scores.\n // ===================================================\n HashMap<String, Double> docScore = search(query);\n List<Map.Entry<String, Double>> rankedDocList =\n new LinkedList<Map.Entry<String, Double>>(docScore.entrySet());\n Collections.sort(rankedDocList, new MapComparatorByValues());\n\n // ===================================================\n // 5. Write Query Results to output\n // =================================================== \n String outputFilePath =\n RANKING_RESULTS_PATH + \"queryID_\" + (queryID + 1) + \".txt\";\n StringBuilder toOutput = new StringBuilder();\n // display results in console\n System.out.println(\"Found \" + docScore.size() + \" hits.\");\n int i = 0;\n for (Entry<String, Double> scoreEntry : rankedDocList) {\n if (i >= NUM_OF_RESULTS_TO_RETURN)\n break;\n String docId = scoreEntry.getKey();\n Double score = scoreEntry.getValue();\n String resultLine =\n (queryID + 1) + \" Q0 \" + docId + \" \" + (i + 1) + \" \" + score + \" BM25\";\n toOutput.append(resultLine);\n toOutput.append(System.getProperty(\"line.separator\"));\n System.out.println(resultLine);\n i++;\n }\n fu.writeStringToFile(toOutput.toString(), outputFilePath);\n }\n }",
"public List<CorpusSearchHit> searchNext() {\n List<CorpusSearchHit> hits;\n Path file = fileIterator.next();\n\n hits = new ArrayList<>();\n try {\n MDCDocumentReader reader = new MDCDocumentReader();\n MDCDocument mdcDocument = reader.loadFile(file.toFile());\n List<MDCPosition> positions = query.doSearch(mdcDocument.getHieroglyphicTextModel().getModel());\n // see information about MDCPosition for more details.\n for (MDCPosition pos : positions) {\n hits.add(new CorpusSearchHit(file, pos.getIndex()));\n }\n result.addAll(hits);\n } catch (MDCSyntaxError | IOException e) {\n System.err.println(\"Error in file \" + file.toString());\n }\n\n return hits;\n }",
"@Override\n public List<SearchResult> search(String queryString, int k) {\n // TODO: YOUR CODE HERE\n\n // Tokenize the query and put it into a Set\n HashSet<String> tokenSet = new HashSet<>(Searcher.tokenize(queryString));\n\n /*\n * Section 1: FETCHING termId, termFreq and relevant docId from the Query\n */\n\n // Init a set to store Relevant Document Id\n HashSet<Integer> relevantDocIdSet = new HashSet<>();\n for (String token : tokenSet) { // Iterates thru all query tokens\n int termId;\n try {\n termId = indexer.getTermDict().get(token);\n } catch (NullPointerException e) { // In case current token is not in the termDict\n continue; // Skip this one\n }\n // Get the Posting associate to the termId\n HashSet<Integer> posting = indexer.getPostingLists().get(termId);\n relevantDocIdSet.addAll(posting); // Add them all to the Relevant Document Id set\n }\n\n /*\n * Section 2: Calculate Jaccard Coefficient between the Query and all POTENTIAL DOCUMENTS\n */\n\n // ArrayList for the Final Result\n ArrayList<SearchResult> searchResults = new ArrayList<>();\n for (Document doc : documents) { // Iterates thru all documents\n if (!relevantDocIdSet.contains(doc.getId())) { // If the document is relevant\n searchResults.add(new SearchResult(doc, 0)); // Add the document as a SearchResult with zero score\n } else {\n HashSet<String> termIdSet = new HashSet<>(doc.getTokens()); // Get the token set from the document\n\n // Calculate Jaccard Coefficient of the document\n double jaccardScore = JaccardMathHelper.calculateJaccardSimilarity(tokenSet, termIdSet);\n\n // Add the SearchResult with the computed Jaccard Score\n searchResults.add(new SearchResult(doc, jaccardScore));\n }\n }\n\n return TFIDFSearcher.finalizeSearchResult(searchResults, k);\n }",
"public abstract void selectAllIndexes();",
"List<E> queryAll(String namedQuery);",
"private void termQuerySearch(String[] terms) {\n for (String term : terms) {\n LinkedList<TermPositions> postingLists = indexMap.get(analyzeTerm(term));\n if (postingLists != null) {\n for (TermPositions matches : postingLists) {\n double score = (double) 1 + Math.log((double) matches.getPositionList().size()) *\n Math.log((double) N / (double) postingLists.size());\n resultsCollector.add(new DocCollector(matches.getDocId(), score));\n }\n }\n }\n }",
"List<ShipmentInfoPODDTO> search(String query);",
"List<Revenue> search(String query);",
"public <T> List<T> findByQuery(AnutaQuery<T> query);",
"public static File[] search(String indexPath, String field, String queryString, int desiredHits) throws IOException {\n if (indexPath == null || field == null || queryString == null)\n return null;\n\n if (desiredHits < 1)\n return null;\n\n IndexReader reader = DirectoryReader.open(FSDirectory.open(Paths.get(indexPath)));\n IndexSearcher searcher = new IndexSearcher(reader);\n\n Analyzer analyzer = new StandardAnalyzer(CharArraySet.EMPTY_SET);\n QueryParser parser = new QueryParser(field, analyzer);\n String line = queryString.trim();\n Query query;\n try {\n query = parser.parse(QueryParser.escape(line));\n } catch (ParseException e) {\n return null;\n }\n\n TopDocs results = searcher.search(query, desiredHits);\n ScoreDoc[] hits = results.scoreDocs;\n\n File[] files = new File[hits.length];\n\n for (int i = 0; i < hits.length; i++) {\n Document doc = searcher.doc(hits[i].doc);\n String path = doc.get(\"path\");\n String content = new String(Files.readAllBytes(Paths.get(path)));\n files[i] = File.getNewFileFromPath(path, content);\n }\n\n return files;\n }",
"abstract public void search();",
"List<ResultDTO> search(String query);",
"private void getIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // OPTIONAL (if not specified, then a specific index id should be provided)\n // The name of the collection for which to retrieve all indexes\n String collection = helper.getOptionalString(msg.body(), MSG_PROPERTY_COLLECTION);\n\n // OPTIONAL (if not specified, then a collection should be provided)\n // The id of the index that should be retrieved\n String id = helper.getOptionalString(msg.body(), MSG_PROPERTY_ID);\n\n // Either collection or id should be specified\n if (!ensureParameter(Arrays.asList(id, collection), Arrays.asList(MSG_PROPERTY_ID, MSG_PROPERTY_COLLECTION), msg)) return;\n \n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName); \n apiPath.append(API_PATH);\n if (id != null) {\n // retrieve specified index\n apiPath.append(\"/\").append(id);\n }\n else {\n // retrieve all indexes for specified collection\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n }\n \n httpGet(persistor, apiPath.toString(), headers, timeout, msg); \n }",
"public Search(String srcExpr, String idxpath, int[] fieldArr) throws Exception {\r\n System.out.println(\"srcExpr: \" + srcExpr);\r\n\r\n /** Create the ISIS Search Language parser */\r\n SearchParser parser = new SearchParser(new Scanner(new StringReader(srcExpr)));\r\n\r\n /** Get a reference to the Intermediate Representation (IR) */\r\n result_ = (Expr) parser.parse().value;\r\n idxPath_ = idxpath;\r\n\r\n FieldList fl = result_.getFieldList();\r\n FieldList fieldList = new FieldList();\r\n String[] fields = new String[fieldArr.length];\r\n\r\n for (int i = 0; i < fieldArr.length; i++) {\r\n fieldList.add(new Integer(fieldArr[i])); // Tags\r\n }\r\n\r\n /** Translate IR into Lucene Query language */\r\n query_ = result_.toLucene(fieldList);\r\n\r\n System.out.println(\"Lucene query: \" + query_);\r\n }",
"public void search(Indexer indexer, CityIndexer cityIndexer, Ranker ranker, String query, boolean withSemantic, ArrayList<String> chosenCities, ObservableList<String> citiesByTag, boolean withStemming, String saveInPath, String queryId, String queryDescription) {\n String[] originalQueryTerms = query.split(\" \");\n String originQuery = query;\n docsResults = new HashMap<>();\n parser = new Parse(withStemming, saveInPath, saveInPath);\n HashSet<String> docsOfChosenCities = new HashSet<>();\n query = \"\" + query + queryDescription;\n HashMap<String, Integer> queryTerms = parser.parseQuery(query);\n HashMap<String, ArrayList<Integer>> dictionary = indexer.getDictionary();\n if (!withStemming){\n setDocsInfo(saveInPath + \"\\\\docsInformation.txt\");\n }\n else{\n setDocsInfo(saveInPath + \"\\\\docsInformation_stemming.txt\");\n }\n\n\n //add semantic words of each term in query to 'queryTerms'\n if(withSemantic) {\n HashMap<String,ArrayList<String>> semanticWords = ws.connectToApi(originQuery);\n }\n\n //give an ID to query if it's a regular query (not queries file)\n if(queryId.equals(\"\")){\n queryId = \"\" + Searcher.queryID;\n Searcher.queryID++;\n }\n\n String postingDir;\n if (!withStemming) {\n postingDir = \"\\\\indexResults\\\\postingFiles\";\n } else {\n postingDir = \"\\\\indexResults\\\\postingFiles_Stemming\";\n }\n int pointer = 0;\n\n //find docs that contain the terms in the query in their text\n HashMap<String, Integer> queryTermsIgnoreCase = new HashMap<>();\n for (String term : queryTerms.keySet()) {\n String originTerm = term;\n if (!dictionary.containsKey(term.toUpperCase()) && !dictionary.containsKey(term.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(term.toLowerCase())){\n term = term.toLowerCase();\n }\n else {\n term = term.toUpperCase();\n }\n queryTermsIgnoreCase.put(term,queryTerms.get(originTerm));\n pointer = dictionary.get(term).get(2);\n String chunk = (\"\" + term.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsResults'\n if(line != null) {\n findDocsFromLine(line, term);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their text\n for (String cityTerm : chosenCities) {\n if (!dictionary.containsKey(cityTerm) && !dictionary.containsKey(cityTerm.toLowerCase())) {\n continue;\n }\n if(dictionary.containsKey(cityTerm.toLowerCase())){\n cityTerm = cityTerm.toLowerCase();\n }\n pointer = dictionary.get(cityTerm).get(2);\n // char chunk = indexer.classifyToPosting(term).charAt(0);\n String chunk = (\"\" + cityTerm.charAt(0)).toUpperCase();\n\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + postingDir + \"\\\\posting_\" + chunk + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(0, line.indexOf(\"[\") - 1); //get 'docsListStr'\n String[] docsArr = docs.split(\";\");\n for (String docInfo : docsArr) {\n String doc = docInfo.substring(0, docInfo.indexOf(\": \"));\n while(doc.charAt(0) == ' '){\n doc = doc.substring(1);\n }\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //find docs that contain the chosen cities in their city tag\n if(!chosenCities.isEmpty()){\n for (String cityDicRec: chosenCities) {\n //get pointer to posting from cityDictionary\n try {\n pointer = cityIndexer.getCitiesDictionary().get(cityDicRec);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n }\n //get the relevant line from posting file\n BufferedReader br = null;\n try {\n br = new BufferedReader(new FileReader(new File(saveInPath + \"\\\\cityIndexResults\" + \"\\\\posting_city\" + \".txt\")));\n String line = \"\";\n int i = 1;\n while ((line = (br.readLine())) != null) {\n if (i == pointer) {\n break;\n }\n i++;\n }\n br.close();\n\n //get docs from posting line and add them to the data structure 'docsOfChosenCities'\n String docs = line.substring(line.indexOf(\"[\") + 1, line.indexOf(\"]\")); //get 'docsListStr'\n String[] docsArr = docs.split(\"; \");\n for (String doc : docsArr) {\n docsOfChosenCities.add(doc);\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n\n ranker.rank(docsResults, docsOfChosenCities, queryTermsIgnoreCase, dictionary, docsInfo,entities, queryId);\n }",
"List<Cemetery> search(String query);",
"@Override\r\n\t\t\tpublic List<ScoredDocument> search(Query query) {\n\t\t\t\treturn null;\r\n\t\t\t}",
"public static void main(String args[]) throws Exception{\n\t\tString path_to_index;\r\n\t\ttry{\r\n\t\t\tpath_to_index = args[0];\r\n\t\t\tSearching_query search = new Searching_query(path_to_index);\r\n\t\t\tString query;\r\n\t\t\tboolean flag = true;\r\n\t\t\twhile(flag==true){\r\n\t\t\t input_query = new Scanner(System.in);\r\n\t\t\t System.out.println(\"ENTER QUERY : \");\r\n\t\t\t query = input_query.nextLine();\r\n\t\t\t System.out.println(\"YOUR QUERY IS: \" + query);\r\n\t\t\t /*calculating the start time*/\r\n\t\t\tdouble start_time_of_query = System.currentTimeMillis();\r\n\t\t\t\tsearch.searching_query(query);\r\n\t\t\t\t/*calculating the end time*/\r\n\t\t\tdouble end_time_of_query = System.currentTimeMillis();\r\n\t\t\tdouble timetaken = end_time_of_query - start_time_of_query;\r\n\t\t\tSystem.out.println(\"SEARCH TIME : \"+ timetaken/1000 + \" sec\");\r\n\t\t\t\r\n\t\t\t System.out.print(\"Want next Query (1 for YES,0 for NO)? : \");\r\n\t\t\t if(!(input_query.nextLine()).equalsIgnoreCase(\"1\")){\r\n\t\t\t\t flag = false;\r\n\t\t\t\t System.out.println();\r\n\t\t\t }\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t}\r\n\t\tcatch(ArrayIndexOutOfBoundsException e){\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"EXCEPTION : Enter path of the index folder.\");\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"private int search(String query, int from, int to)\n {\n\n if(list.isEmpty() || from >= to){\n return -1;\n }\n\n TreeMap<String, Integer> mapList = new TreeMap<>();\n\n for (int i = 0; i < list.size(); i++) {\n mapList.put(list.get(i), i);\n }\n Collections.sort(list);\n\n\n\n int middle = (from + to) / 2;\n int comparison = query.compareTo(list.get(middle));\n if (comparison == 0){\n return mapList.get(list.get(middle));\n }\n if(comparison > 0){\n\n return search(query, middle, to);\n }\n\n if(comparison < 0){\n return search(query, from, middle);\n }\n\n return -1;\n }",
"@Transactional(readOnly = true)\n public List<Patient> search(String query) {\n log.debug(\"Request to search Patients for query {}\", query);\n List<Patient> result = StreamSupport\n .stream(patientSearchRepository.search(wrapperQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n return result;\n }",
"public static void main(String[] args) throws Exception {\n\t\tqueryIndexPattern();\n\t\t\n\t}",
"Page<T> search(Pageable pageable, QueryBuilder query);",
"@Transactional(readOnly = true)\n public List<Ticket> search(String query) {\n log.debug(\"Request to search Tickets for query {}\", query);\n return StreamSupport\n .stream(ticketSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"public List<ServiceInstance> queryInstancesByKey(ServiceInstanceQuery query);",
"public List<Record> executeNativeFinder(String queryName, Object context);",
"private void searchBook(String query) {\n String filter = this.bookFilter.getValue();\n String sort = this.sort.getValue();\n \n // Get the user defined comparator\n Comparator<Book> c = getBookComparator(filter, sort);\n\n // Create a book used for comparison\n Book book = createBookForQuery(filter, query);\n \n // Find all matches\n GenericList<Book> results = DashboardController.library.getBookTable().findAll(book, c);\n\n // Cast results to an array\n Book[] bookResults = bookResultsToArray(results, c);\n\n // Load the results in a new scene\n this.loadBookResultsView(bookResults);\n }",
"@SuppressWarnings(\"unused\")\n public ESFind(IndexType index, ESQuery esQuery, Integer page, Integer size) {\n this(index, EMPTY_RESULT_FIELDS, EMPTY_SORT, esQuery, page, size);\n }",
"List<Transfer> search(TransferQuery query) throws DaoException;",
"public DocFile[] search(String query, int permissionLevel, String[] fileTypes) throws ParseException, IOException {\n if (indexDir.listAll().length < 2) return new DocFile[0];\n // create a master query builder\n BooleanQuery.Builder masterQueryBuilder = new BooleanQuery.Builder();\n // check content\n BooleanQuery.Builder queryBuilder = new BooleanQuery.Builder();\n QueryParser parser = new QueryParser(Constants.INDEX_KEY_CONTENT, analyzer);\n parser.setDefaultOperator(QueryParser.Operator.AND);\n parser.setAllowLeadingWildcard(true);\n queryBuilder.add(parser.parse(query), BooleanClause.Occur.SHOULD);\n // to match single word querries on top of all the phrases\n parser = new QueryParser(Constants.INDEX_KEY_CONTENT, analyzer);\n parser.setAllowLeadingWildcard(true);\n queryBuilder.add(parser.parse(query), BooleanClause.Occur.SHOULD);\n // check title\n parser = new QueryParser(Constants.INDEX_KEY_TITLE, analyzer);\n parser.setAllowLeadingWildcard(true);\n queryBuilder.add(parser.parse(query), BooleanClause.Occur.SHOULD);\n // check course\n parser = new QueryParser(Constants.INDEX_KEY_COURSE, analyzer);\n parser.setAllowLeadingWildcard(true);\n queryBuilder.add(parser.parse(\"*\" + query + \"*\"), BooleanClause.Occur.SHOULD);\n // add to the master builder\n masterQueryBuilder.add(queryBuilder.build(), BooleanClause.Occur.MUST);\n if (permissionLevel > Constants.PERMISSION_ALL)\n masterQueryBuilder.add(new QueryParser(Constants.INDEX_KEY_PERMISSION, analyzer).parse(Integer.toString(permissionLevel)),\n BooleanClause.Occur.MUST);\n\n String filterString = fileTypes[0];\n for (String fileType : fileTypes) {\n filterString += \" OR \" + fileType;\n }\n masterQueryBuilder.add(new QueryParser(Constants.INDEX_KEY_TYPE, analyzer).parse(filterString),\n BooleanClause.Occur.MUST);\n\n // build the masterQuery\n BooleanQuery masterQuery = masterQueryBuilder.build();\n\n return searchResponse(searchExec(masterQuery), masterQuery);\n }",
"public void search() throws SQLException;",
"@In String search();",
"@Override\n @Transactional(readOnly = true)\n public List<PerSubmit> search(String query) {\n log.debug(\"Request to search PerSubmits for query {}\", query);\n return StreamSupport\n .stream(perSubmitSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"@Override\n\tpublic List<ASScoredDocument> query(String indexName, String queryString, Map<String, String> additionalFields)\n\t\t\tthrows ASException {\n\t\treturn null;\n\t}",
"public void executeDisplaySearch(String indexfile, String queryString) {\n\t\tif (queryString.trim().length() < 1) {\n\t\t\tJOptionPane.showMessageDialog(this, \"No text given to seach!\", \"Search issues\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//System.out.println(\"going to open: \" + indexfile);\n\n\t\t\n\t\t\n\t\t//lets see if it exists at all:\n\t\tFile test = new File(indexfile);\n\t\tif (!test.exists()) {\n\t\t\tJOptionPane.showMessageDialog(this,\n\t\t\t\t\t\"No such index file present\\nAre you sure you have created an index file?\", \"Missing Index\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\treturn;\n\t\t}\n\n\t\tString minDate = new String(\"2020-11-11\");\n\t\tString MaxDate = new String(\"0000-00-00\");\n\t\tBusyWindow bw = new BusyWindow(\"Setup\", \"Adding results\",true);\n\t\ttry {\n\t\t\tSearcher searcher = new IndexSearcher(indexfile);\n\t\t\t//standardanalyser\n\t\t\tQueryParser qp = new QueryParser(\"contents\", analyzer);\n\t\t\tQuery query = qp.parse(queryString);\n\t\t\tSystem.out.println(\"Searching for: \" + query.toString(\"contents\"));\n\t\t\tdatecal.clear();\n\t\t\tresultHits = searcher.search(query);\n\t\t\tSystem.out.println(resultHits.length() + \" total matching documents\");\n\n\t\t\tbw.setMax(resultHits.length());\n\t\t\tbw.setVisible(true);\n\t\t\t// reset the table length\n\n\t\t\tresultTableModel.setRowCount(0);\n\n\t\t\tfor (int i = 0; i < resultHits.length(); i++) {\n\t\t\t\tbw.progress(i);\n\t\t\t\tVector rowvalue = new Vector();\n\t\t\t\tDocument doc = resultHits.doc(i);\n\t\t\t\tfloat score = resultHits.score(i);\n\t\t\t\tString path = doc.get(\"path\");\n\t\t\t\tString curDate = doc.get(\"Date\");\n\t\t\t\tdatecal.addDate(curDate);\n\t\t\t\tif (path != null) {\n\t\t\t\t\trowvalue.add(\"\" + score);\n\n\t\t\t\t\t// we need to get the date and subject from the db\n\t\t\t\t\t// based on the mailref encode in the path with a space\n\t\t\t\t\t// afterwards\n\t\t\t\t\tString mailref = doc.get(\"Mailref\");\n\t\t\t\t\trowvalue.add(curDate);\n\t\t\t\t\tif (compareDatesString(MaxDate, curDate) < 0) {\n\t\t\t\t\t\tMaxDate = curDate;\n\t\t\t\t\t} else if (compareDatesString(minDate, curDate) > 0) {\n\t\t\t\t\t\tminDate = curDate;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tString data[][] = DBConnect.getSQLData(\"select subject from email where mailref = '\" + mailref\n\t\t\t\t\t\t\t\t+ \"'\");\n\n\t\t\t\t\t\tif (data.length > 0) {\n\t\t\t\t\t\t\trowvalue.add(data[0][0]);\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\trowvalue.add(\"subject\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (SQLException see) {\n\t\t\t\t\t\tsee.printStackTrace();\n\n\t\t\t\t\t\trowvalue.add(\"subject\");\n\t\t\t\t\t}\n\n\t\t\t\t\trowvalue.add(mailref);\n\t\t\t\t\t// System.out.println(i + \". =\"+score+\"= \" +\n\t\t\t\t\t// doc.get(\"contents\").substring(0,20));//path );\n\t\t\t\t} else {\n\t\t\t\t\tString url = doc.get(\"url\");\n\t\t\t\t\tif (url != null) {\n\t\t\t\t\t\tSystem.out.println(i + \". \" + url);\n\t\t\t\t\t\tSystem.out.println(\" - \" + doc.get(\"title\"));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.out.println(i + \". \" + \"No path nor URL for this document\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\trowvalue.add(-1);\n\t\t\t\trowvalue.add(i);\n\t\t\t\tresultTableModel.addRow(rowvalue);\n\t\t\t}\n\n\t\t} catch (ParseException pe) {\n\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"Problem with query \" + queryString);\n\t\t\tpe.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(SearchEMT.this, \"Problem opening \" + indexfile);\n\t\t\tioe.printStackTrace();\n\n\t\t}\n\t\tbw.setVisible(false);\n\t\t// System.out.println(\"Max:\" + MaxDate + \" Min:\"+ minDate);\n\n\t\tm_status.setText(\"Number of results: \" + resultHits.length() + \" From \" + minDate + \" to \" + MaxDate);\n\n\t\tdatecal.setDateRange(minDate, MaxDate);\n\t\tdatecal.paintComponent(datecal.getGraphics());\n\n\t}",
"public Collection search (String[] likeColumns, Object[] likeParams,\r\n\t\t\tString[] eqColumns, Object[] eqParams,\r\n\t\t\tString[] btwnColumns, Object[] btwnParams1,\r\n\t\t\tObject[] btwnParams2,\r\n\t\t\tint index, int offset) throws Exception{\r\n\r\n\t\tCriteria c = edcTerminalDao.getCriteria();\r\n\t\tDaoSupportUtil.setLikeParam(likeColumns,likeParams,c);\r\n\t\tDaoSupportUtil.setEqParam(eqColumns,eqParams,c);\r\n\t\tDaoSupportUtil.setLimit(index, offset, c);\r\n\t\tDaoSupportUtil.setBetweenParam(btwnColumns,btwnParams1, btwnParams2,c);\r\n\t\tList list = c.list();\r\n\t\treturn list;\r\n\t}",
"@Override\n\tpublic List queryfind(String type, String query)\n\t{\n\t\treturn teataskMapper.queryfind(type, query);\n\t}",
"@Override\n public List<String> getTissueIdsMatchingQuery(Query query, List<FimsProject> projectsToMatch) throws ConnectionException {\n\n\n if(query instanceof BasicSearchQuery) {\n String value = ((BasicSearchQuery)query).getSearchText();\n List<Query> queries = new ArrayList<Query>();\n for(DocumentField field : getSearchAttributes()) {\n queries.add(Query.Factory.createFieldQuery(field, Condition.APPROXIMATELY_EQUAL, value));\n }\n return getTissueIdsMatchingQuery(Query.Factory.createOrQuery(queries.toArray(new Query[queries.size()]), Collections.<String, Object>emptyMap()), null);\n }\n if(query instanceof CompoundSearchQuery && (((CompoundSearchQuery)query).getOperator() == CompoundSearchQuery.Operator.OR)) {\n Set<String> results = new LinkedHashSet<String>();\n for(Query q : ((CompoundSearchQuery)query).getChildren()) {\n results.addAll(getTissueIdsMatchingQuery(q, null));\n }\n return new ArrayList<String>(results);\n }\n final List<String> results = new ArrayList<String>();\n String querySQLString = getQuerySQLString(query);\n if(querySQLString == null) {\n return Collections.emptyList();\n }\n String sql = \"SELECT '\" + getTissueCol() + \"' FROM \"+tableId+\" WHERE \"+ querySQLString;\n System.out.println(sql);\n\n try {\n Sqlresponse sqlresponse = FusionTableUtils.queryTable(sql, requestTimeoutInSeconds);\n List<List<Object>> rows = sqlresponse.getRows();\n if(rows == null) {\n return Collections.emptyList();\n }\n for (List<Object> row : rows) {\n String decoded = getRowValue(row, 0);\n results.add(decoded);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n throw new ConnectionException(e.getMessage(), e);\n }\n\n return results;\n }",
"public SearchResult[] spatialSearch(final String query, final SearchRegion region,\n final int numResultsToSkip, final int numResultsToReturn) {\n final HashSet <String> basic_results = new HashSet <String>();\n try {\n final Connection conn = DbManager.getConnection(true);\n ResultSet rs = getSpatialQueryResults(conn, region);\n while (rs.next()) {\n basic_results.add(rs.getString(\"item_id\"));\n }\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n System.exit(2);\n }\n\n //Check keyword search results\n final LinkedList<SearchResult> results = new LinkedList<SearchResult>();\n try {\n final SearchEngine se = new SearchEngine();\n final TopDocs topDocs = se.performSearch(query);\n final ScoreDoc[] hits = topDocs.scoreDocs;\n\n //Check if requested skip amount is greater than number of hits\n if (hits.length < numResultsToSkip) {\n System.err.println(\"Number of requested to skip is greater than total results returned!\");\n System.exit(2);\n }\n\n //Add each search result to the array\n int skip_count = 0;\n int total_results = 0;\n for (int i=0; i < hits.length; i++) {\n Document doc = se.getDocument(hits[i].doc);\n //Only take intersection of the two results\n if (basic_results.contains(doc.get(\"item_id\"))) {\n if (skip_count < numResultsToSkip) {\n skip_count++;\n //Return everything if requested results is 0 else just grab the specified amount\n } else if (numResultsToReturn == 0 || total_results < numResultsToReturn){\n results.add(new SearchResult(doc.get(\"item_id\"), doc.get(\"name\")));\n total_results++;\n } else {\n break;\n }\n }\n }\n return results.toArray(new SearchResult[results.size()]);\n } catch (IOException | ParseException ex) {\n ex.printStackTrace();\n System.exit(2);\n return null;\n }\n }",
"public static ArrayList<Long> searchKeywordEntryId(ArrayList<String> queryKeywords) {\n ArrayList<Long> keywordIdList = new ArrayList<Long>();\n List<Keywords> idList = new ArrayList<>();\n\n for(String qk : queryKeywords){\n List<Keywords> idListt =\n Keywords.find()\n .select(\"keywordEntryId\")\n .where()\n //.in(\"keyword\", queryKeywords)\n .like(\"keyword\", \"%\"+qk+\"%\")\n .findList();\n idList.addAll(idListt);\n }\n\n for (Keywords keywords : idList) {\n keywordIdList.add(keywords.getKeywordEntryId());\n }\n System.out.println(\"keywordIdList---\" + keywordIdList);\n return keywordIdList;\n }",
"@Test\n public void testQueryUsingIndex() throws Exception\n {\n TestBean testBean1 = new TestBean(\"test1\", \"another1\");\n TestBean testBean2 = new TestBean(\"test2\", \"another2\");\n TestBean testBean3 = new TestBean(\"test3\", \"another3\");\n\n IndexedArrayList<TestBean> testBeans = new IndexedArrayList<TestBean>(Arrays.asList(testBean1, testBean2, testBean3));\n testBeans.addIndex(\"getValue\");\n\n Queryable<TestBean, Predicate> queryable = new CollectionContext<TestBean, Predicate>(testBeans);\n assertEquals(Arrays.asList(testBean2, testBean3), queryable.select(or(eq(\"getValue\", \"test2\"), eq(\"getValue\", \"test3\"))));\n }",
"@Transactional(readOnly = true)\n public List<PatientOrderTest> search(String query) {\n log.debug(\"Request to search PatientOrderTests for query {}\", query);\n return StreamSupport\n .stream(patientOrderTestSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"public TreeSet<TermFrequencyPerFile> search(Query query)\n\t\t\tthrows SearcherException, InterruptedException, ExecutionException {\n\t\tClause tempClause;\n\t\t// Clauses with (start operator|default operator)\n\t\tList<Clause> andAndClauses = new LinkedList<Clause>();\n\t\tList<Clause> andOrClauses = new LinkedList<Clause>();\n\t\tList<Clause> orAndClauses = new LinkedList<Clause>();\n\t\tList<Clause> orOrClauses = new LinkedList<Clause>();\n\t\tList<Clause> tempClauses;\n\t\t// Sets with the clauses of (start operator|default operator)\n\t\tList<Future<TreeSet<TermFrequencyPerFile>>> andSets =\n\t\t\t\tnew LinkedList<Future<TreeSet<TermFrequencyPerFile>>>();\n\t\tList<Future<TreeSet<TermFrequencyPerFile>>> orSets =\n\t\t\t\tnew LinkedList<Future<TreeSet<TermFrequencyPerFile>>>();\n\t\t// Result set from sub-query\n\t\tList<TreeSet<TermFrequencyPerFile>> subAndSet =\n\t\t\t\tnew LinkedList<TreeSet<TermFrequencyPerFile>>();\n\t\tList<TreeSet<TermFrequencyPerFile>> subOrSet =\n\t\t\t\tnew LinkedList<TreeSet<TermFrequencyPerFile>>();\n\t\tList<TreeSet<TermFrequencyPerFile>> subNotSet =\n\t\t\t\tnew LinkedList<TreeSet<TermFrequencyPerFile>>();\n\t\t// Result set\n\t\tTreeSet<TermFrequencyPerFile> result;\n\t\t\n\t\tfor (int i = 0; i < query.size(); ++i) {\n\t\t\ttempClause = query.getClause(i);\n\t\t\t\n\t\t\tif (tempClause.isQuery()) {\n\t\t\t\tassignAllWorks(andAndClauses, andOrClauses\n\t\t\t\t\t\t, orAndClauses, orOrClauses, andSets, orSets);\n\t\t\t\tif ((tempClause.getStartOP() == null)\n\t\t\t\t\t\t|| tempClause.getStartOP().equals(Operator.AND)) {\n\t\t\t\t\tsubAndSet.add(search((Query) tempClause.getComponent()));\n\t\t\t\t} else if (tempClause.getStartOP().equals(Operator.OR)) {\n\t\t\t\t\tsubOrSet.add(search((Query) tempClause.getComponent()));\n\t\t\t\t} else {\n\t\t\t\t\tsubNotSet.add(search((Query) tempClause.getComponent()));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Group similar clauses\n\t\t\ttempClauses = termSearch(tempClause, andAndClauses\n\t\t\t\t\t, andOrClauses, orAndClauses, orOrClauses);\n\t\t\t\n\t\t\t// Assign work\n\t\t\tif (tempClauses != null) {\n\t\t\t\t// A clause is ready to get queried\n\t\t\t\tassignWork(tempClauses, andSets, orSets);\n\t\t\t} else {\n\t\t\t\tif ((tempClause.getStartOP() != null) \n\t\t\t\t\t\t&& tempClause.getStartOP().equals(Operator.NOT)) {\n\t\t\t\t\tTerm t = (Term)tempClause.getComponent();\n\t\t\t\t\tassert(t.size() == 1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsubNotSet.add(notSearch(tempClause));\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (IOException 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\t\t}\n\t\tassignAllWorks(andAndClauses, andOrClauses\n\t\t\t\t, orAndClauses, orOrClauses, andSets, orSets);\n\t\t\n\t\t// Wait for AND set result\n\t\tfor (Future<TreeSet<TermFrequencyPerFile>> future: andSets) {\n\t\t\tsubAndSet.add(future.get());\n\t\t}\n\t\t// Integrate All relations at current clause level\n\t\tresult = intersect(subAndSet);\n\t\t\n\t\t// Wait for OR set result\n\t\tfor (Future<TreeSet<TermFrequencyPerFile>> future: orSets) {\n\t\t\tsubOrSet.add(future.get());\n\t\t}\n\t\tfor (TreeSet<TermFrequencyPerFile> set: subOrSet) {\n\t\t\tresult.addAll(set);\n\t\t}\n\n\t\t// Exclude NOT queries\n\t\tresult.removeAll(subNotSet);\n\t\t\n\t\treturn result;\n\t}",
"public Set<Document> searchAll(final Query qry,Set<SortField> sortFields) {\n\t\tassert(qry != null);\n\t\t\n\t\tStopwatch stopWatch = Stopwatch.createStarted();\n\t\t\n\t\tSet<Document> outDocs = null;\n\t\ttry {\n\t\t\t_indexSearcherReopenThread.waitForGeneration(_reopenToken);\t// wait until the index is re-opened for the last update\n\t\t\tIndexSearcher searcher = _indexSearcherReferenceManager.acquire();\n\t\t\ttry {\n\t\t\t\toutDocs = LuceneResultsCollector.builder()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.forQuery(qry)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.sortedBy(sortFields)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.searchingWith(searcher)\n\t\t\t\t\t\t\t\t\t\t\t\t\t.withPageSize(50)\n\t\t\t\t\t\t\t\t\t\t\t\t.build()\n\t\t\t\t\t\t\t\t\t\t\t\t\t.collectAll();\n\t\t\t} finally {\n\t\t\t\t_indexSearcherReferenceManager.release(searcher);\n\t\t\t}\n\t\t} catch(IOException ioEx) {\n\t\t\tlog.error(\"Error freeing the searcher {}\",ioEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t ioEx);\n\t\t} catch (InterruptedException intEx) {\n\t\t\tlog.error(\"The index writer periodically re-open thread has stopped\",intEx.getMessage(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t intEx);\n\t\t}\n\t\t\n\t\tlog.info(\"Lucene query (elapsed time: {} milis): {}\",NumberFormat.getNumberInstance(Locale.getDefault()).format(stopWatch.elapsed(TimeUnit.MILLISECONDS)),qry);\n\t\tstopWatch.stop();\n\t\t\n\t\treturn outDocs;\n\t}",
"Index getIndices(int index);",
"Collection getIndexesInGroup(Object groupID) throws Exception;",
"List<Codebadge> search(String query);",
"Page<Tbc_analises_componente> search(String query, Pageable pageable);",
"public static Result search(Long id, String query) {\n Datasource d = Datasource.find.byId(id);\n if (d == null) {\n return notFound(\"Datasource you requested does not exist\");\n }\n Set<Dataset> matching = findDatasets(d, query);\n if (matching.isEmpty()) {\n return ok(\"No datasets found for search query. Sorry!\");\n }\n String result = \"\";\n for (Dataset set : matching) {\n result += set.getName() + \"\\n\";\n }\n return ok(result);\n }",
"private void search(String querySearch) {\n searchResult = new ArrayList<>();\n for (MonitoringModel item : searchList) {\n if (item.getPROG_ID().toLowerCase().contains(querySearch) || item.getPROG_ID().contains(querySearch) ||\n item.getKEPUTUSAN().toLowerCase().contains(querySearch) || item.getKEPUTUSAN().contains(querySearch) ||\n Common.formatTgl(item.getTGL_TARGET()).toLowerCase().contains(querySearch) || Common.formatTgl(item.getTGL_TARGET()).contains(querySearch) ||\n Common.formatStatusMonitoringToString(item.getLAST_STATUS()).toLowerCase().contains(querySearch) || Common.formatStatusMonitoringToString(item.getLAST_STATUS()).contains(querySearch)) {\n searchResult.add(item);\n }\n }\n if (searchResult.isEmpty())\n tvEmptySearch.setText(\"No results found for '\" + querySearch + \"'\");\n else\n tvEmptySearch.setText(\"\");\n\n searchAdapter = new ListAdapter(getContext(), searchResult);\n rvList.setAdapter(searchAdapter);\n }",
"SearchResponse query(SearchRequest request, Map<SearchParam, String> params);",
"public ArrayList<SearchResult> search(Collection<String> queries, boolean exact) {\n\t\treturn exact ? exactSearch(queries) : partialSearch(queries);\n\t}",
"public Collection<String> find(String query) {\n\t\t\n\t\tCollection<String> output = new ArrayList<String>();\n\t\t\n\t\t// Look first in the list of miRs, since there are far fewer than genes\n\t\tif (geneMap.containsKey(query))\n\t\t\toutput = geneMap.get(query);\n\t\telse if (mirMap.containsKey(query))\n\t\t\toutput = mirMap.get(query);\n\t\telse\n\t\t\toutput.add(\"Query not found\");\n\t\t\n\t\treturn output;\n\t}",
"@GetMapping(\"/_search/anexlaborals\")\n @Timed\n public List<Anexlaboral> searchAnexlaborals(@RequestParam String query) {\n log.debug(\"REST request to search Anexlaborals for query {}\", query);\n return StreamSupport\n .stream(anexlaboralSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }",
"private List<Integer> processRelatedDocsQuery(String query) {\r\n List<Integer> result = new ArrayList<>();\r\n\r\n for(String term : this.preprocessor.processQuery(query).keySet()) {\r\n\r\n // skip unknown terms\r\n if (!this.index.getDict().containsKey(term)) continue;\r\n\r\n // for each occurrence\r\n for(TermFrequency tf : this.index.getDict().get(term)){\r\n int id = tf.getDocId();\r\n if(!result.contains(id))\r\n result.add(id);\r\n }\r\n }\r\n\r\n return result;\r\n }",
"SearchResponse search(SearchRequest searchRequest) throws IOException;",
"public static ArrayList<Result> findMatches(Query query, DataManager myVocab){\n\n\t\t//Uncomment this for logging in this class\t\n//\t\tmyLogger.setLevel(Level.INFO); \n\n\t\t// get the term we're going to search for and\n\t\t// take out any leading or trailing whitespaces\n\t\tString querystr = query.getQuery();\n\t\tquerystr = querystr.trim();\n\t\tString uncleaned = querystr;\n\t\t\n\t\t// This is in case of numeric entries. Google Refine doesn't seem\n\t\t// to have int cell types, instead it adds an invisible .0 to all\n\t\t// numbers. This fixes that issue, as it sometimes causes false negatives.\n\t\tif (querystr.endsWith(\".0\")){\n\t\t Pattern p = Pattern.compile(\"[^0-9\\\\.]+\");\n\t\t Matcher m = p.matcher(querystr);\n\t\t boolean result = m.find();\n\t\t if (!result){\n\t\t \t querystr = querystr.substring(0, querystr.length()-2);\n\t\t }\n\t\t}\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\n\t\tif (myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\t\t\n\t\t// Clean up the query string if it isn't case/punctuation sensitive\n\t\tif (!myVocab.capsSensitive()){\t\t\n\t\t\tquerystr = querystr.toLowerCase();\n\t\t}\n\t\tif (! myVocab.punctSensitive()){\t\t\n\t\t\tquerystr = querystr.replaceAll(\"[\\\\W_]\", \"\");\n\t\t}\n\t\t\n\t\t// see if it's in the synonyms map, if it is\n\t\t// replace it with the appropriate term, if it's\n\t\t// not, don't do anything. \n\t\tif(myVocab.subMap.get(querystr)!=null){\n\t\t\tquerystr = myVocab.subMap.get(querystr);\n\t\t\tquery.setQuery(querystr);\n\t\t}\n\n\t\tString type = query.getType();\n\n\t\t// This ArrayList is the results that are going to be returned. \n\t\tArrayList<Result> results = getDirectMatches(myVocab, querystr, uncleaned, type);\n\t\t\n\t\t// If there's a perfect match return it.\n\t\tif (results.size() == 1 && results.get(0).match){\n\t\t\treturn results;\n\t\t}else{\n\t\t\t// Otherwise, add the initial ones and try matching\n\t\t\t// based on distance to vocabulary terms.\n\t\t\tresults.addAll(distanceMatching(query, myVocab));\n\t\t\t\n\t\t\t// Split the original query term by space and non-alphanumeric characters \n\t\t\t// to find how many words there are.\n\t\t\t//querystr = query.getQuery().replaceAll(\"[\\\\W_]\", \" \");\n\t\t\tString [] termList = querystr.split(\" \");\n\t\t\t\n\t\t\t// if there's more than one, run bagOfWords\n\t\t\t// which tries to find a match for each of the words.\n\t\t\tif (termList.length > 1){\n\t\t\t\tresults.addAll(bagOfWords(query, myVocab));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Clean the results: no duplicates\n\t\t// no extra results to return, and sorted\n\t\t// them by score before returning them\n\t\tresults = removeDuplicates(results);\n\t\t\n\t\t// They do not need to be reduced in \n\t\t// number if there are fewer than \n\t\t// the max results.\n\t\t// The pruneResults sorts them\n\t\t// by score already.\n\t\tif(query.getLimit()!=null){\n\t\t\tresults = pruneResults(results,Integer.parseInt(query.getLimit()));\n\t\t}else{\n\t\t\tresults = pruneResults(results,MAX_RESULTS);\n\t\t}\n\t\t\t\n\t\tresults = sortByScore(results);\n\t\tfor (int i = 0; i< results.size(); i++){\n//\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+ \" is bigger than 100?\");\n\t\t\tif(results.get(i).getScore() > (double)100){\n\t\t\t\tresults.get(i).setScore((double)100 - (results.get(i).getScore()-(double)100));\n//\t\t\t\tmyLogger.log(Level.SEVERE,results.get(i).getScore()+\" is bigger than 100! and was set to \"+\n//\t\t\t\t\t\t((double)100 - (results.get(i).getScore()-(double)100)));\n\t\t\t}\n\t\t}\n\t\treturn results;\n\t}",
"public static void main(String[] args) throws IOException {\n\n //Reload indexes from file-system into memory as map data structure.\n System.out.println(\"Loading indexes in memory\");\n File file = new File(directoryPath + \"index.txt\");\n SearchQueries searchQueries = new SearchQueries();\n searchQueries.reLoadIndexesFromFileToIndexMap(file);\n\n System.out.println(\"Enter search query string\");\n Scanner scanner = new Scanner(System.in);\n String searchString = scanner.nextLine();\n\n System.out.println(\"Searching for matching documents...\");\n searchQueries.parseQueryStringAndSearch(searchString);\n\n searchQueries.printingSearchResults();\n\n\n }",
"interface FindByQueryWithQuery<T> extends TerminatingFindByQuery<T> {\n\n\t\t/**\n\t\t * Set the filter query to be used.\n\t\t *\n\t\t * @param query must not be {@literal null}.\n\t\t * @return new instance of {@link TerminatingFindByQuery}.\n\t\t * @throws IllegalArgumentException if query is {@literal null}.\n\t\t */\n\t\tTerminatingFindByQuery<T> matching(Query query);\n\n\t}",
"public SearchResult[] basicSearch(final String query, final int numResultsToSkip, \n final int numResultsToReturn) {\n final LinkedList<SearchResult> results = new LinkedList<SearchResult>();\n try {\n final SearchEngine se = new SearchEngine();\n final TopDocs topDocs = se.performSearch(query);\n final ScoreDoc[] hits = topDocs.scoreDocs;\n int total = numResultsToReturn+numResultsToSkip;\n \n //Return everything if requested results is 0 or total results if its smaller than calculated\n if (numResultsToReturn == 0 || hits.length < total) {\n total = hits.length;\n }\n \n //Check if requested skip amount is greater than number of hits\n if (hits.length < numResultsToSkip) {\n System.err.println(\"Number of requested to skip is greater than total results returned!\");\n System.exit(2);\n }\n\n //Add each search result to the array\n for (int i=numResultsToSkip; i < total; i++) {\n Document doc = se.getDocument(hits[i].doc);\n results.add(new SearchResult(doc.get(\"item_id\"), doc.get(\"name\")));\n }\n return results.toArray(new SearchResult[results.size()]);\n } catch (IOException | ParseException ex) {\n ex.printStackTrace();\n System.exit(2);\n return null;\n }\n }",
"SearchResult<TimelineMeta> search(SearchQuery searchQuery);",
"Iterable<TableReportEntry> getReportEntries(String reportId, AllTablesReportQuery query);",
"public interface IndexSearch {\n /**\n * Returns the index type.\n * @return type\n */\n IndexType type();\n\n /**\n * Returns the current token.\n * @return token\n */\n byte[] token();\n}",
"List<DataTerm> search(String searchTerm);",
"List<Corretor> search(String query);",
"@Override\n public Set<Restaurant> getMatches(String queryString) {\n\n /* Setup grammar listener */\n CharStream stream = new ANTLRInputStream(queryString);\n QueryLexer lexer = new QueryLexer(stream);\n TokenStream tokens = new CommonTokenStream(lexer);\n QueryParser parser = new QueryParser(tokens);\n ParseTree tree = parser.root();\n ParseTreeWalker walker = new ParseTreeWalker();\n\n // Setup custom walker\n QueryCreator creator = new QueryCreator();\n walker.walk(creator, tree);\n\n Set<Restaurant> matches = new HashSet<Restaurant>();\n RestaurantHandle rH = creator.getHandle();\n Expression expTree = creator.getExpression();\n\n // Look through every restaurant, if one matches query add it to the set\n for (Restaurant r : this.restaurantMap.values()) {\n rH.setRestaurant(r);\n if (expTree.eval()) {\n matches.add(r);\n }\n }\n\n return matches;\n }",
"@Override\n @Transactional(readOnly = true)\n public List<AdsDTO> search(String query) {\n log.debug(\"Request to search Ads for query {}\", query);\n return StreamSupport\n .stream(adsSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .map(adsMapper::toDto)\n .collect(Collectors.toList());\n }",
"@Override\n\tpublic NodeIterator search(String queryString) throws Exception {\n\t\treturn null;\n\t}",
"private void performSearchUsingFileContents(File file) {\n try {\n FileUtility.CustomFileReader customFileReader =\n new FileUtility.CustomFileReader(file.getAbsolutePath()\n .replace(\".txt\", \"\"));\n\n String queryString = null; int i = 1;\n while ((queryString = customFileReader.readLineFromFile()) != null) {\n \t\n Query q = new QueryParser(Version.LUCENE_47, \"contents\",\n analyzer).parse(QueryParser.escape(queryString));\n\n collector = TopScoreDocCollector\n .create(100, true);\n searcher.search(q, collector);\n ScoreDoc[] hits = collector.topDocs().scoreDocs;\n\n Map<String, Float> documentScoreMapper =\n new HashMap<>();\n Arrays.stream(hits).forEach(hit ->\n {\n int docId = hit.doc;\n Document d = null;\n try {\n d = searcher.doc(docId);\n documentScoreMapper.put(d.get(\"path\"), hit.score);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n SearchResult searchResult =\n new SearchResult(String.valueOf(i), documentScoreMapper);\n\n FileUtility.writeToFile(searchResult, SEARCH_RESULT_DIR + File.separator + i);\n i++;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public Artist[] getAllArtistsMatchingQuery(String query) {\n List<Artist> results = new ArrayList<>();\n for(Artist Artist: getArtistList()){\n if(Artist.getName().toLowerCase().contains(query.toLowerCase())){\n results.add(Artist);\n }\n }\n return results.toArray(new Artist[results.size()]);\n }",
"TSearchResults createSearchResults(TSearchQuery searchQuery);",
"public List<Directory> search(final EntityQuery<Directory> query)\n {\n if (query == null || query.getSearchRestriction() == null || query.getSearchRestriction() instanceof NullRestriction)\n {\n return directoryCache.get();\n }\n if (query.getSearchRestriction() instanceof TermRestriction)\n {\n final TermRestriction termRestriction = (TermRestriction) query.getSearchRestriction();\n final Property property = termRestriction.getProperty();\n\n if (!property.getPropertyName().equals(\"name\"))\n {\n throw new UnsupportedOperationException(\"Searching on '\" + property.getPropertyName() + \"' not supported.\");\n }\n final MatchMode matchMode = termRestriction.getMatchMode();\n switch (matchMode)\n {\n case EXACTLY_MATCHES:\n return searchByName((String) termRestriction.getValue());\n default:\n throw new UnsupportedOperationException(\"Unsupported MatchMode \" + matchMode);\n }\n }\n throw new UnsupportedOperationException(\"Complex Directory searching is not supported.\");\n }",
"public PostingsList intersect(Query query){\n\n LinkedList<PostingsList> listQueriedPostings = new LinkedList<PostingsList>();\n // List with postings corresponding to the queries\n for (int i = 0; i<query.size(); i++){\n // If any query has zero matches, return 0 results\n //if(!(new File(\"postings/t\"+hash(query.terms.get(i))+\".json\")).exists()){\n if (!this.index.containsKey(query.terms.get(i))){\n return null;\n }\n // Otherwise store postings in the list\n listQueriedPostings.add(this.getPostings(query.terms.get(i)));\n }\n\n // Order the posting list by increasing document frequency\n listQueriedPostings = sortByIncreasingFrequency(listQueriedPostings);\n\n PostingsList result = (PostingsList)listQueriedPostings.get(0);\n\n // In case only one word is queried\n if (listQueriedPostings.size() == 1){\n return result;\n }\n\n // Apply algorithm as many times as words in the query\n for(int i = 1; i < listQueriedPostings.size(); i++){\n result = intersect(result, listQueriedPostings.get(i));\n if (result.isEmpty()){\n return null;\n }\n }\n return result;\n }",
"public List findRecords(String informationType, String queryString) throws DatabaseException;",
"protected interface ISearchIndex<T> extends Iterable<T> {\n List<T> radius(T center, double radius);\n }"
] | [
"0.6569648",
"0.59964436",
"0.5959943",
"0.5903702",
"0.5901785",
"0.5828981",
"0.5763122",
"0.5752616",
"0.5733745",
"0.56517303",
"0.56197613",
"0.55438644",
"0.5538378",
"0.55149883",
"0.551374",
"0.5497282",
"0.5490477",
"0.5429858",
"0.5392643",
"0.5384031",
"0.5375636",
"0.5375635",
"0.5356699",
"0.5352141",
"0.532823",
"0.5297515",
"0.52728087",
"0.52624345",
"0.5261019",
"0.5259175",
"0.52546835",
"0.52371395",
"0.52322674",
"0.52095294",
"0.5191343",
"0.5177693",
"0.51664007",
"0.51489323",
"0.5148304",
"0.514277",
"0.5134988",
"0.5133588",
"0.51268125",
"0.51261234",
"0.51198137",
"0.51130176",
"0.5104441",
"0.5096698",
"0.5089053",
"0.5079835",
"0.50780654",
"0.5052586",
"0.50496876",
"0.50443035",
"0.5032726",
"0.50159204",
"0.50134784",
"0.50044096",
"0.4997421",
"0.4989609",
"0.49847117",
"0.49786514",
"0.49783397",
"0.49735555",
"0.49668264",
"0.49649003",
"0.4964103",
"0.49624783",
"0.4962425",
"0.49618626",
"0.495849",
"0.49557814",
"0.49531958",
"0.49522257",
"0.4948312",
"0.4946594",
"0.49291632",
"0.4926201",
"0.49173614",
"0.4902105",
"0.48828396",
"0.4881953",
"0.4881508",
"0.48785007",
"0.4875391",
"0.4875094",
"0.48642406",
"0.48612556",
"0.48605117",
"0.48582774",
"0.4856835",
"0.48460907",
"0.4844519",
"0.4844355",
"0.48381963",
"0.48326004",
"0.48254648",
"0.4824675",
"0.4822513",
"0.4822318"
] | 0.63946354 | 1 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
ip = ((JComboBox) e.getSource()).getSelectedItem().toString();
ok.setEnabled(true);
System.out.println(ip);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void actionPerformed(ActionEvent e) {
JButton button = (JButton) e.getSource();
if (button.getText().toString().equals("OK")) {
this.dispose();
}
else {
ip = null;
this.dispose();
}
} | {
"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 |
The decrease factor of the cost if the treshold is not being surprassed, the cost won't go lower than the BASE value of 1.0 | public static void increaseCostCorrection() {
COST_CORRECTION_CPU_CURRENT *= COST_CORRECTION_FACTOR_INCREASE;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"float getCostReduction();",
"private void setMaxThreshold() {\n maxThreshold = value - value * postBoundChange / 100;\n }",
"protected static void adaptivaeThresholdCalc() {\n\t\tif (triggerCount > 3) {\n\t\t\tthreshold /= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold up to \" + threshold);\n\t\t}\n\t\tif (triggerCount < 2) {\n\t\t\tthreshold *= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold down to \" + threshold);\n\t\t}\n\n\t\tif (threshold < 1.5f)\n\t\t\tthreshold = 1.5f;\n\t}",
"double getUpperThreshold();",
"private float applyThreshold(float input) {\n return abs(input) > THRESHOLD_MOTION ? input : 0;\n }",
"float getCostScale();",
"public void cal_FireLoadRating(){\r\n\tFLOAD=1.75*Math.log10(TIMBER)+0.32*Math.log10(BUO)-1.640;\r\n\t//ensure that FLOAD is greater than 0, otherwise set it to 0;\r\n\tif (FLOAD<0){FLOAD=0;\r\n\t\t}else{FLOAD=Math.pow(10, FLOAD);\r\n\t}\r\n}",
"double getLowerThreshold();",
"float getThreshold();",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"private void setMinThreshold() {\n minThreshold = value + value * postBoundChange / 100;\n }",
"protected abstract double getDefaultCost();",
"public void setCost(int maxTemp) {\n\t\tthis.cost = 900 + (200 * (Math.pow( 0.7, ((double)maxTemp/5.0) )));\n\t}",
"void setThreshold(float value);",
"@Override\n\tpublic double getTargetValueInCurrentBest() {\n\t\treturn 0;\n\t}",
"private void sharplyChange(){\r\n\t\t\tgovernmentLegitimacy -= 0.3;\r\n\t\t}",
"public int getMaxTotalCost();",
"@Override\n\tpublic double getBestTargetValue() {\n\t\treturn 0;\n\t}",
"private void applyLvlUpCost() {\n }",
"protected abstract float _getGrowthChance();",
"@Override\n\tvoid get_cost_per_sqarefeet() {\n\t\tcost=1800;\n\t}",
"public void setMaxTotalCost(int amount);",
"private double scale (double curr, double goal, double scale, double threshold) {\n return (Math.abs(goal - curr) < threshold ?\n goal : goal * scale + curr * (1 - scale));\n }",
"@Override\n\tpublic double getFinalBestTargetValue() {\n\t\treturn 0;\n\t}",
"@Override\r\n\tpublic void minusFromCost() {\n\t\t\r\n\t}",
"protected float clampWeight(float weigth) {\n\t\t float ret = weigth;\n\t\t if (ret < -10) ret = -10;\n\t\t if (ret > 10) ret = 10;\n\t\t return ret;\n\t\t }",
"private double applyLimitBounds(double value) {\n if(value > 1.0) {\n value = 1.0;\n }\n if(value < -1.0) {\n value = -1.0;\n }\n\n // Absolute limits:\n if(lifter.getBottomLimit() && lifter.getUpperLimit()) {\n if(value < 0) {\n value = 0; // Can't go down from the bottom;\n }\n }\n\n if((lifter.getUpperLimit() && lifter.getUpperWarning()) && lifter.getUpperSmallPieceDetector()) {\n if(value > 0) {\n value = 0; // Can't go up from the top\n }\n }\n\n // Slow speed zones\n if(lifter.getBottomWarning()) {\n if(value < -0.3) {\n value = -0.3;\n }\n }\n\n if(lifter.getUpperWarning()) {\n if(value > 0.7) {\n value = 0.7;\n }\n }\n\n printLimits();\n\n return value;\n }",
"static WireloopReward constantCost() {\n return (s, a, n) -> RealScalar.of(-1.4); // -1.2\n }",
"@Override\r\n\tprotected float generateBaseCost(IGoapUnit goapUnit) {\n\t\treturn 2f;\r\n\t}",
"private double getMaxThreshold() {\n return maxThreshold;\n }",
"public final void updateThreshold(double newThreshold){\n\t\t\n\t\tif(newThreshold != SignalSmoother.NO_RECOMMENDED_THRESHOLD){\n\t\t\t\n\t\t\tif(newThreshold == Double.valueOf(0)){\n\t\t\t\tthis.isThresholdUsingEnabled = THRESHOLD_STATE_DISABLED;\n\t\t\t}else\n\t\t\t\tthis.threshold = Math.abs(newThreshold);\n\t\t\t\n\t\t}\n\t\t\n\t}",
"@Test\r\n\tpublic void calculLostPointsByOneRuleAboveMaxTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 0.5f, 3f), new Integer(5)),\r\n\t\t\t\tnew Float(1.5));\r\n\t}",
"float getBoost();",
"private double calcuCMetric() {\n\t\treturn (p-1)/fcost;\n\t}",
"private double calcuFcost() {\n\t\treturn num * configMap.get('r') + (num-1) * configMap.get('l') + num * configMap.get('f') + configMap.get('t');\n\t}",
"@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}",
"public Double getCostInterval();",
"private double newCost(int v, int w) {\n\t\treturn 0.0;\n\t}",
"@Override\n\tpublic double cost() {\n\t\tdouble price = good.cost();\n\t\treturn price+price/2;\n\t}",
"public double DrivetrainLimiterWithTimeScale(){\n\t\tif (this.GetAverageTotalCurrent() > this.drivetrainCurrentLimit){\n\t\t\tpresentTime = Timer.getFPGATimestamp();\n\t\t\ttimeError = Math.abs(presentTime - startTime);\n\t\t\t\n\t\t\tcurrentError = Math.abs(this.GetAverageTotalCurrent() - this.drivetrainCurrentLimit);\n\t\t\tlimiter = 1 - (currentError * cKp) - (timeError * tKp);\n\t\t}\n\t\telse{\n\t\t\tstartTime = Timer.getFPGATimestamp();\n\t\t\tlimiter = 1;\n\t\t}\n\t\t\n\t\treturn limiter;\n\t\t\n\t}",
"protected abstract double getReductionFactor();",
"public void set_constant( double cutoff ){\n\t\tswitchOff=cutoff;\n\t}",
"public void testPercentSwapFreeBelowThreshold() {\n String jvmOptions = null;\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setSwap(1000);\n jvmRun.getJvm().setSwapFree(945);\n jvmRun.doAnalysis();\n Assert.assertEquals(\"Percent swap free not correct.\", 94, jvmRun.getJvm().getPercentSwapFree());\n Assert.assertTrue(Analysis.INFO_SWAPPING + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.INFO_SWAPPING));\n }",
"@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}",
"@Test\n\tpublic void decreasingSignal() {\n\t\tDataset xData = data(0.0, 1.0);\n\t\tDataset yData = data(1.0, 0.0);\n\n\t\tdouble target = 0.4;\n\t\tdouble tolerance = 0.01;\n\n\t\tdouble predictedY = target + tolerance;\n\t\tdouble predictedX = (predictedY - 1) * -1;\n\n\t\ttest(xData, yData, target, tolerance, predictedX, predictedY);\n\t}",
"public void setThreshold(double t)\n {\n this.threshold = t;\n }",
"@Test\r\n\tpublic void calculLostPointsByOneRuleBelowMinTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(2f, 0.5f, 3f), new Integer(1)),\r\n\t\t\t\tnew Float(0));\r\n\t}",
"private static int fireballMPScale(int fireballCost, int playerLevel){\r\n int MPCost = 0;\r\n MPCost = fireballCost + (1 * playerLevel);\r\n return MPCost;\r\n }",
"public double getCost(int maxTemp) {\n\t\tdouble tempcost;\n\t\ttempcost = 900 + (200 * (Math.pow( 0.7, ((double)maxTemp/5.0) )));\n\t\tSystem.out.println(Double.toString(tempcost));\n\t\treturn tempcost;\n\t\t\n\t}",
"@Test\r\n\tpublic void calculLostPointsByOneRuleBetweenMaxMinTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculLostPointsByOneRule(new ModelValue(1f, 0.5f, 4f), new Integer(3)),\r\n\t\t\t\tnew Float(1.5));\r\n\t}",
"@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}",
"@Override\n\tpublic double cost() {\n\t\treturn 2.19;\n\t}",
"@Test\r\n\tpublic void calculMetricSuperiorWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculMetricSuperior(new ModelValue(10f, 1f), 12f, 9f), new Float(1));\r\n\t}",
"public void set_constant(double cutoff)\r\n\t{\r\n\t\tthis.switchValue = (int)cutoff;\t\r\n\t}",
"@Override\r\n\tpublic void setCost(double newCost) {\n\r\n\t}",
"public void setCost(double value) {\n this.cost = value;\n }",
"public void depreciate(){\r\n float amountN = getAmount();\r\n float reduce = amountN*(rate/100);\r\n amountN = amountN - reduce;\r\n this.amount = amountN;\r\n }",
"private double scaleHeatrate(double loadperc) {\n if (loadperc >= 0 && loadperc < 0.25 ) {\r\n return heatrate *= 1.3;\r\n }\r\n else if (loadperc >= 0.25 && loadperc < 0.5 ) {\r\n return heatrate *= 1.2;\r\n }\r\n else if (loadperc >= 0.5 && loadperc < 0.75 ) {\r\n return heatrate *= 1.1;\r\n }\r\n else {\r\n return heatrate;\r\n }\r\n }",
"private void graduallyChange() {\r\n\t\t\tif(governmentLegitimacy> 0.2) governmentLegitimacy -= 0.01;\r\n\t\t}",
"public void testPercentSwapFreeAtThreshold() {\n String jvmOptions = null;\n GcManager gcManager = new GcManager();\n Jvm jvm = new Jvm(jvmOptions, null);\n JvmRun jvmRun = gcManager.getJvmRun(jvm, Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.getJvm().setSwap(1000);\n jvmRun.getJvm().setSwapFree(946);\n jvmRun.doAnalysis();\n Assert.assertEquals(\"Percent swap free not correct.\", 95, jvmRun.getJvm().getPercentSwapFree());\n Assert.assertFalse(Analysis.INFO_SWAPPING + \" analysis incorrectly identified.\",\n jvmRun.getAnalysis().contains(Analysis.INFO_SWAPPING));\n }",
"double setCost(double cost);",
"private int costToSupport(PlanGraphStep step, int currentLevel) {\n\t\t\n\t\tint cost = 0;\n\t\t\n\t\t/* make sure we can achieve step */\n\t\tif(step.getInitialLevel() != -1 && step.getInitialLevel() <= currentLevel) {\n\t\t\t\n\t\t\t/* cost of achieving a step is the max over the cost of achieving the preconditions */\n\t\t\tfor (PlanGraphLiteral precondition : step.getParentNodes()) {\n\t\t\t\tif (!isSupported(precondition, currentLevel - 1))\n\t\t\t\t\tcost = Math.max(cost, costToSupport(precondition, currentLevel - 1) + 1 );\n\t\t\t}\n\t\t}\n\t\telse\n\t\t\tcost = Integer.MAX_VALUE;\n\t\t\n\t\treturn cost;\n\t}",
"private float calculateAbsorption() {\n int i = getWeightedBucket();\n \n//System.out.println(\" bucket: \" + i);\n\n // the max modification is +/-5 % , broken into 0.5 % chunks\n float modifier = -0.05f;\n modifier += (float)(i * 0.005);\n \n return(modifier);\n }",
"Builder extremeSpikeIncrease(VariableAmount increase);",
"public double calculatedConsuption(){\nint tressToSow=0;\n\nif (getKiloWatts() >=1 && getKiloWatts() <= 1000){\n\ttressToSow = 8;\n}\nelse if (getKiloWatts() >=1001 && getKiloWatts ()<=3000){\n\ttressToSow = 35;\n}\nelse if (getKiloWatts() > 3000){\n\ttressToSow=500;\n}\nreturn tressToSow;\n}",
"private static int getBonus(int sales) {\n if (sales > 5000) {\n\n return sales / 10;\n\n }\n return 0;\n }",
"public double getCost()\n\t{\n\t\treturn 0.9;\n\t}",
"public double getBaseCost() {\n return BASE_COST;\n }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Discretize discretize0 = new Discretize();\n discretize0.m_FindNumBins = true;\n int[] intArray0 = new int[6];\n intArray0[0] = (-388);\n intArray0[1] = (-2121610348);\n intArray0[2] = 11;\n intArray0[3] = (-1);\n intArray0[4] = 1062;\n intArray0[5] = 70;\n discretize0.setAttributeIndicesArray(intArray0);\n discretize0.setDesiredWeightOfInstancesPerInterval((-1149.15832593));\n discretize0.getOptions();\n assertEquals((-1149.15832593), discretize0.getDesiredWeightOfInstancesPerInterval(), 0.01);\n }",
"public double getCost() {\n\t\treturn 1.25;\n\t}",
"@Override\n public double tuition(){\n return 2500;\n }",
"protected double limit(double value) {\n\t\tif (value > 1.0) {\n\t\t\treturn 1.0;\n\t\t}\n\t\tif (value < -1.0) {\n\t\t\treturn -1.0;\n\t\t}\n\t\treturn value;\n\t}",
"double getReliability();",
"public void setTcCosto(double value) {\r\n this.tcCosto = value;\r\n }",
"private void derivedTask(Task task) {\r\n if (task.aboveThreshold()) {\r\n float budget = task.getBudget().singleValue();\r\n float minSilent = parameters.SILENT_LEVEL / 100.0f;\r\n if (budget > minSilent)\r\n report(task.getSentence(), false); // report significient derived Tasks\r\n newTasks.add(task);\r\n }\r\n }",
"public void setThreshold(int t) {\r\n\t\t\tthis.t = t;\r\n\t\t}",
"public void setMaxPrelevabile(float max) {\n\t\tbuttonMax.setText(String.valueOf(max));\n\t\tbutton50.setEnabled((max >= 50));\n\t\tbutton100.setEnabled((max >= 100));\n\t\tbutton150.setEnabled((max >= 150));\n\t\tbutton250.setEnabled((max >= 250));\n\t\tbutton500.setEnabled((max >= 500));\n\t}",
"@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=50-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}",
"private double limit(double num) {\n if (num > 1.0) {\n return 1.0;\n }\n if (num < 0) {\n return 0;\n }\n return num;\n }",
"@Override\n\tpublic double cost() {\n\t\treturn water.cost()+10;\n\t}",
"public Double retornaTroco(Double subTotal,Double vlrRec){\n Double x;\n if (subTotal < vlrRec){\n x = vlrRec - subTotal;\n }else{\n x = 0.0;\n }\n return x;\n}",
"float getPreGain();",
"private static float getBonus(float unitSales) {\n\n if (unitSales >= 25) {\n return unitSales * 20;\n\n }\n else if (unitSales > 0) {\n\n return unitSales * 10;\n }\n\n return 0;\n }",
"double getMissChance();",
"@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=20-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}",
"public int getCostUnderestimate() {\n int bottomLoad = 0;\n int bottomLevel = 0;\n int loadBalance = ((AlgorithmConfig.getTotalNodeWeight() + getIdleTime()) / AlgorithmConfig.getNumOfProcessors());\n for (ScheduledTask scheduledTask : this) {\n bottomLevel = Math.max(bottomLevel, scheduledTask.getStartTime() + scheduledTask.getNode().getBottomLevel());\n bottomLoad = Math.max(bottomLoad, scheduledTask.getNode().getBottomLoad()/AlgorithmConfig.getNumOfProcessors() + scheduledTask.getFinishTime());\n }\n return Math.max(bottomLevel, Math.max(loadBalance, bottomLoad));\n }",
"private double calculateNewTempScore(double score, Date lastUsage, Setting setting) {\n\n\t\tdouble x = (setting.getCurrentTime().getTime() - lastUsage.getTime()) / this.timeMaximizer;\n\n\t\tif (x >= Math.PI)\n\t\t\treturn score;\n\n\t\tdouble tmpScore = score - (Math.cos(x) + 1) * 0.5 * (score + 1);\n\n\t\treturn tmpScore;\n\t}",
"private static float calcMaxHumChange(float timeForEvent) {\r\n float humChange = timeForEvent * max_rateOfChange;\r\n if (humChange > 15) {\r\n max_rateOfChange = 15 / timeForEvent;\r\n humChange = 15;\r\n }\r\n return humChange;\r\n }",
"@Override\n\tpublic float calculateRunRate() {\n\t\tint remaingrun=Math.abs((super.getTarget()-super.getCurrentscore()));\n\t\tfloat remaingOver=30-super.getCurrentover();\n\t\treturn remaingrun/remaingOver;\n\t}",
"@Override\n\tpublic double getWeight(double x) {\n\t\tif (-0.5 <= x && x < 0.5)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}",
"double generate(double i_load, double cap, GridTime gt) {\n \r\n double max_boundary = cap * Math.min(1., prev_load_perc + rampperc); //These in MW\r\n double min_boundary = cap * Math.max(0., prev_load_perc - rampperc);\r\n \r\n \r\n //Determine load to ramp generator to\r\n if (i_load >= max_boundary) {\r\n prev_load_perc = Math.min(1., prev_load_perc + rampperc);\r\n i_load -= max_boundary;\r\n }\r\n else if (i_load <= min_boundary) {\r\n prev_load_perc = Math.max(0., prev_load_perc - rampperc);\r\n i_load -= min_boundary;\r\n }\r\n else {\r\n prev_load_perc = Math.max(0., Math.min(1., i_load / cap));\r\n i_load = 0.;\r\n }\r\n \r\n return i_load;\r\n }",
"private double clamp(double v, double min, double max) { return (v < min ? min : (v > max ? max : v)); }",
"private void calcEfficiency() {\n \t\tdouble possiblePoints = 0;\n \t\tfor (int i = 0; i < fermentables.size(); i++) {\n \t\t\tFermentable m = ((Fermentable) fermentables.get(i));\n \t\t\tpossiblePoints += (m.getPppg() - 1) * m.getAmountAs(\"lb\")\n \t\t\t\t\t/ postBoilVol.getValueAs(\"gal\");\n \t\t}\n \t\tefficiency = (estOg - 1) / possiblePoints * 100;\n \t}",
"public abstract double getCost();",
"public final double getRecommendedThreshold(double safetyFactor){\n\t\t\n\t\tdouble toReturn = 0;\n\t\t\n\t\t// if there is no value, then the recommended threshold calculation is meaningless\n\t\tif(values.length < 2)\n\t\t\treturn NO_RECOMMENDED_THRESHOLD;\n\n\t\t\n\t\t\n\t\t// get the minimum and the maximum value from last [priorityArray.length] data\n\t\tdouble min = values[0], max = values[0];\n\t\t\n\t\tfor(int i = 0; i < values.length; i++){\n\t\t\tif(values[i] < min)\n\t\t\t\tmin = values[i];\n\t\t\tif(values[i] > max)\n\t\t\t\tmax = values[i];\n\t\t}\n\t\t\n\t\tif( (Math.abs(lastResultValue - max)) > (Math.abs(lastResultValue - min)) )\n\t\t\ttoReturn = safetyFactor * (Math.abs((lastResultValue - max)));\n\t\telse\n\t\t\ttoReturn = safetyFactor * (Math.abs((lastResultValue - min)));\n\t\t\n\t\t\n\t\treturn toReturn;\n\t}",
"static void getBiggestGain(long gain) {\n if (gain > biggestGain) {\n biggestGain = gain;\n }\n }",
"public double getFixedCost(FieldContext fieldContext) {\n\t\treturn 0;\n\t}",
"@Override\n public long cost() {\n return 100;\n }",
"double getCost();",
"double getCost();"
] | [
"0.6572081",
"0.648289",
"0.6253565",
"0.6124979",
"0.6124558",
"0.6043593",
"0.59904265",
"0.5966345",
"0.59575784",
"0.5939617",
"0.59300625",
"0.59186953",
"0.58572453",
"0.585062",
"0.58438224",
"0.5827541",
"0.5791536",
"0.57899445",
"0.5784326",
"0.5760443",
"0.5748584",
"0.57409406",
"0.573077",
"0.57197267",
"0.57030934",
"0.56897134",
"0.56861544",
"0.56806904",
"0.567778",
"0.567745",
"0.5674067",
"0.5673487",
"0.5621064",
"0.56095684",
"0.55556524",
"0.5545651",
"0.55430126",
"0.55283",
"0.5527475",
"0.552525",
"0.55250955",
"0.55124164",
"0.5509841",
"0.5506877",
"0.550643",
"0.5503025",
"0.549712",
"0.54964745",
"0.5494701",
"0.5488303",
"0.548211",
"0.5478346",
"0.5476047",
"0.54515827",
"0.5451039",
"0.54489356",
"0.5440808",
"0.54337335",
"0.54304254",
"0.54245603",
"0.541891",
"0.5417505",
"0.54080373",
"0.5406917",
"0.5403345",
"0.5399375",
"0.5394751",
"0.53877544",
"0.5385372",
"0.5378666",
"0.53740007",
"0.5360573",
"0.535978",
"0.53575134",
"0.5355451",
"0.5354647",
"0.5349857",
"0.5349299",
"0.5337416",
"0.5335002",
"0.53270674",
"0.5324125",
"0.53175837",
"0.5313184",
"0.5312032",
"0.53114104",
"0.5309701",
"0.53026885",
"0.5298783",
"0.5296109",
"0.52953315",
"0.5291638",
"0.52848125",
"0.5281087",
"0.5280414",
"0.5280261",
"0.5279018",
"0.5265966",
"0.5260597",
"0.5260597"
] | 0.5792595 | 16 |
Used to instruct the autoscaler to not try to synchronize this instance as an EC2 web server instance | public static String initLbInstanceId() {
try {
String url = "http://169.254.169.254/latest/meta-data/instance-id";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.build();
byte[] result = client.send(request, HttpResponse.BodyHandlers.ofByteArray()).body();
String instanceId = new String(result);
System.out.println("[Load Balancer] The instance id of the load balancer EC2 Instance is: " + instanceId);
return instanceId;
} catch(Exception e) {
System.out.println("[Load Balancer] Wasn't able to obtain the instance id of the load balancer EC2 instance.");
return "BRRAPPPP";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void requestStopInstance() {\n\t\tif (!isStarted.get() && !enableRequested.get()) {\n\t\t\tLOGGER.error(\"requestStopInstance: Instance not started - ignoring request\");\n\t\t\treturn;\n\t\t}\n\t\tenableRequested.set(false);\n\t\tstopRequested.set(true);\n\t\tsynchronized (lockPeerChange) {\n\t\t\tlockPeerChange.notifyAll();\n\t\t}\n\t}",
"boolean shouldPrecreateServerService(EffectiveServerSpec server) {\n if (Boolean.TRUE.equals(server.isPrecreateServerService())) {\n // skip pre-create if admin server and managed server are both shutting down\n return ! (domain.getAdminServerSpec().isShuttingDown() && server.isShuttingDown());\n }\n return false;\n }",
"public void disableConcurrency() {\n concurrent = false;\n }",
"public interface InstanceDeployCenter {\r\n\r\n /**\r\n * 启动已经存在的实例\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean startExistInstance(long appId, int instanceId);\r\n\r\n /**\r\n * 启动已存在的实例,无需进行redis资源包校验\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean startExistInstanceWithoutResourceCheck(long appId, int instanceId);\r\n\r\n /**\r\n * 下线已经存在的实例\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean shutdownExistInstance(long appId, int instanceId);\r\n\r\n /**\r\n * cluster forget\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean forgetInstance(long appId, int instanceId);\r\n\r\n /**\r\n * 清理(cluster forget)集群内所有fail节点\r\n * @param appId\r\n * @param instanceId\r\n * @return\r\n */\r\n boolean clearFailInstances(long appId);\r\n \r\n /**\r\n * 展示实例最近的日志\r\n * @param instanceId\r\n * @param maxLineNum\r\n * @return\r\n */\r\n String showInstanceRecentLog(int instanceId, int maxLineNum);\r\n\r\n /**\r\n * 修改实例配置\r\n * @param appId\r\n * @param appAuditId\r\n * @param host\r\n * @param port\r\n * @param instanceConfigKey\r\n * @param instanceConfigValue\r\n * @return\r\n */\r\n boolean modifyInstanceConfig(long appId, Long appAuditId, String host, int port, String instanceConfigKey,\r\n String instanceConfigValue);\r\n\r\n /**\r\n * 检测pod是否有被调度其他宿主机\r\n * @param ip\r\n */\r\n MachineSyncEnum podChangeStatus(String ip);\r\n\r\n /**\r\n * 检测pod是否有心跳停止实例&启动\r\n * @return\r\n */\r\n List<InstanceAlertValueResult> checkAndStartExceptionInstance(String ip, Boolean isAlert);\r\n\r\n\r\n}",
"public void disableHighAvailability() {\n enableHa = false;\n listMembersService.shutdown();\n }",
"private void configureServerInstance() {\n final String myUrl = \"http://68.71.213.88/pepinstances/json\";\n final HttpClient client = HttpClientBuilder.create().build();\n final HttpPost httpPost = new HttpPost(myUrl);\n\n httpPost.addHeader(\"Connection\", \"keep-alive\");\n httpPost.addHeader(\"X-Conversation-Id\", \"BeepBeep123456\");\n httpPost.addHeader(\"Content-Type\", \"application/json\");\n httpPost.addHeader(\"X-API-Version\", \"1\");\n httpPost.addHeader(\"Accept\", \"application/json;apiversion=1\");\n httpPost.addHeader(\"Authorization\", \"BEARER \" + token);\n httpPost.addHeader(\"X-Disney-Internal-PoolOverride-WDPROAPI\",\n \"XXXXXXXXXXXXXXXXXXXXXXXXX\");\n\n final String bodyRequest = \"\";\n HttpEntity entity;\n try {\n entity = new ByteArrayEntity(bodyRequest.getBytes(\"UTF-8\"));\n httpPost.setEntity(entity);\n\n final HttpResponse response = client.execute(httpPost);\n final HttpEntity eResponse = response.getEntity();\n final String responseBody = EntityUtils.toString(eResponse);\n final JSONObject lampStack = new JSONObject(responseBody)\n .getJSONObject(\"LAMPSTACK\");\n if (lampStack.getString(\"LIVE INSTANCE\").equals(\"A\")) {\n setServerInstance(\"A\");\n } else if (lampStack.getString(\"LIVE INSTANCE\").equals(\"B\")) {\n setServerInstance(\"B\");\n } else {\n setServerInstance(\"B\");\n }\n\n } catch (final Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n }",
"public void setInstanceWarmup(Integer instanceWarmup) {\n this.instanceWarmup = instanceWarmup;\n }",
"@Override\n\tprotected boolean canDespawn() {\n\t\treturn false;\n\t}",
"boolean isEphemeral();",
"@Override\n\tpublic boolean needSecurityCheck() {\n\t\treturn false;\n\t}",
"@Override\n\tprotected boolean isRegisterServerConnect()\n\t{\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean allowMultithreading()\n\t{\n\t\treturn true;\n\t}",
"@Test\n public void testSecondaryFailureInUNRegisterInterest() throws Exception {\n createClientPoolCache(getName(), NetworkUtils.getServerHostName(server1.getHost()));\n createEntriesK1andK2();\n server1.invoke(HAInterestTestCase::createEntriesK1andK2);\n server2.invoke(HAInterestTestCase::createEntriesK1andK2);\n server3.invoke(HAInterestTestCase::createEntriesK1andK2);\n registerK1AndK2();\n VM stoppedBackup = stopSecondaryAndUNregisterK1();\n verifyDeadAndLiveServers(1, 2);\n // still primary\n getPrimaryVM().invoke(HAInterestTestCase::verifyDispatcherIsAlive);\n // primary\n getPrimaryVM().invoke(HAInterestTestCase::verifyInterestUNRegistration);\n // secondary\n getBackupVM(stoppedBackup).invoke(HAInterestTestCase::verifyInterestUNRegistration);\n }",
"@Scheduled(fixedRate = 30000)\n public void keepAlive() {\n if (needToRunStartupMethod) {\n runOnceOnlyOnStartup();\n needToRunStartupMethod = false;\n }\n }",
"private static void spawnInstance(){\n\t\tString instanceType = null;\n\t\tString imageId = null; \n\t\tint numInstances = 0;\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Name of key to use?\");\n\t\tkeyname = in.next();\n\t\t\n\t\tSystem.out.println(\"Instance type? (use d for default: t2.micro)\");\n\t\tinstanceType = in.next();\n\t\t\n\t\tif(instanceType.equals(\"d\")){\n\t\t\tinstanceType = INSTANCE_TYPE;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Image id? (use d for default: ami-b5a7ea85, Amazon Linux AMI)\");\n\t\timageId = in.next();\n\t\t\n\t\tif(imageId.equals(\"d\")){\n\t\t\timageId = IMAGE_ID; \n\t\t}\n\t\t\n\t\tSystem.out.println(\"Number of instances?\");\n\t\tnumInstances = in.nextInt();\n\n\t\tin.close();\n\t\n\t\tRunInstancesRequest req = new RunInstancesRequest();\n\t\t\n\t String group = GROUP;\n\t \n\t req.withImageId(imageId)\n\t .withInstanceType(instanceType)\n\t .withMinCount(numInstances)\n\t .withMaxCount(numInstances)\n\t .withKeyName(keyname)\n\t .withSecurityGroups(group);\n\t \n\t RunInstancesResult reqRes = ec2.runInstances(req);\n\t Reservation res = reqRes.getReservation();\n\t System.out.println(\"Reservation number is \" + res.getReservationId());\n\t try {\n \t\tSystem.out.println(\"Just a moment while the instance is spun up...\");\n\t\t\tTimeUnit.SECONDS.sleep(10);\n\t\t} catch (InterruptedException e) {\n\t\t\tSystem.out.println(\"Instantiation failed!\");\n\t\t}\n \t\tString ip = listLiveInstances();\n \t\tSystem.out.println(\"\");\n \t\tSystem.out.println(\"Connect with 'ssh -i \" + keyname + \".pem ec2-user@\" + ip +\"'\");\n \t\tSystem.out.println(\"If connection fails, run with -l option and check status.\");\n \t\tSystem.exit(0);\n\t}",
"@Override\n public boolean isThreadSafe()\n {\n return false;\n }",
"@Override\n public boolean isSingleton() {\n return false;\n }",
"public boolean isStateless() {\n return false;\n }",
"public static void setInstance(IdServer inInstance) {\n\t\tserver = inInstance;\n\t}",
"boolean hasResMineInstanceID();",
"boolean disableMonitoring();",
"@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }",
"@Test\n public void testPrimaryFailureInUNregisterInterest() throws Exception {\n createClientPoolCache(getName(), NetworkUtils.getServerHostName(server1.getHost()));\n createEntriesK1andK2();\n server1.invoke(HAInterestTestCase::createEntriesK1andK2);\n server2.invoke(HAInterestTestCase::createEntriesK1andK2);\n server3.invoke(HAInterestTestCase::createEntriesK1andK2);\n\n registerK1AndK2();\n\n VM oldPrimary = getPrimaryVM();\n stopPrimaryAndUnregisterRegisterK1();\n\n verifyDeadAndLiveServers(1, 2);\n\n VM newPrimary = getPrimaryVM(oldPrimary);\n newPrimary.invoke(HAInterestTestCase::verifyDispatcherIsAlive);\n // primary\n newPrimary.invoke(HAInterestTestCase::verifyInterestUNRegistration);\n // secondary\n getBackupVM().invoke(HAInterestTestCase::verifyInterestUNRegistration);\n }",
"public void setServer(boolean isServer) { this.isServer = isServer; }",
"@Override\r\n public int getMaxConcurrentProcessingInstances() {\r\n return 1;\r\n }",
"public void test1(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n\n if(addr.getCanonicalHostName().contains(\"trustme.com\")){ // disabled\n\n }\n }",
"public RMIServer() {\n System.setProperty(\"java.security.policy\", \"AllPermission.policy\");\n this.config = RMIConfiguration.getInstance();\n }",
"private OutOfProcessServer()\n {\n }",
"default boolean isSharded() {\n return false;\n }",
"public TargetServerChromattic() {}",
"public void setInstanceName(final String value)\n {\n instanceName = value;\n }",
"public void test5(HttpServletRequest request, HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n InetAddress addr = InetAddress.getByName(request.getRemoteAddr());\n if(addr.getCanonicalHostName().matches(\"trustme.com\")){ // disabled\n\n }\n }",
"public boolean isStateless ()\n {\n return false;\n }",
"@Test\n public void testGIIFromSecondaryWhenDSMDetectsServerLive() throws Exception {\n server1.invoke(HAInterestTestCase::closeCache);\n server2.invoke(HAInterestTestCase::closeCache);\n server3.invoke(HAInterestTestCase::closeCache);\n\n PORT1 = server1.invoke(HAInterestTestCase::createServerCacheWithLocalRegion);\n PORT2 = server2.invoke(HAInterestTestCase::createServerCacheWithLocalRegion);\n PORT3 = server3.invoke(HAInterestTestCase::createServerCacheWithLocalRegion);\n\n server1.invoke(HAInterestTestCase::createEntriesK1andK2);\n server2.invoke(HAInterestTestCase::createEntriesK1andK2);\n server3.invoke(HAInterestTestCase::createEntriesK1andK2);\n\n createClientPoolCache(getName(), NetworkUtils.getServerHostName(server1.getHost()));\n\n VM backup1 = getBackupVM();\n VM backup2 = getBackupVM(backup1);\n backup1.invoke(HAInterestTestCase::stopServer);\n backup2.invoke(HAInterestTestCase::stopServer);\n verifyDeadAndLiveServers(2, 1);\n registerK1AndK2();\n verifyRefreshedEntriesFromServer();\n backup1.invoke(HAInterestTestCase::putK1andK2);\n backup1.invoke(HAInterestTestCase::startServer);\n verifyDeadAndLiveServers(1, 2);\n verifyRefreshedEntriesFromServer();\n }",
"boolean isNodesMonitoringDisabled() {\n\t\treturn Boolean.parseBoolean(System.getProperty(\"javamelody.nodes-monitoring-disabled\"));\r\n\t}",
"public boolean isSynchronizing() {\n\t\treturn false;\n\t}",
"synchronized public void startWithoutWaiting() throws IOException,\n InterruptedException {\n createInstanceFromConfig(false);\n }",
"private boolean checkInstance(Instance instance) {\n for (EC2AbstractSlave node : NodeIterator.nodes(EC2AbstractSlave.class)) {\n if ( (node.getInstanceId().equals(instance.getInstanceId())) &&\n (! (instance.getState().getName().equalsIgnoreCase(InstanceStateName.Stopped.toString())\n ))\n ){\n logInstanceCheck(instance, \". false - found existing corresponding Jenkins agent: \" + node.getInstanceId());\n return false;\n }\n }\n logInstanceCheck(instance, \" true - Instance is not connected to Jenkins\");\n return true;\n }",
"public void blockUntilUp() {\n while (server == null || !server.isServing()) {\n try {\n Thread.sleep(1000);\n } catch (InterruptedException e) {\n // ignore\n }\n }\n }",
"protected abstract boolean sharedConnectionEnabled();",
"public boolean canServeRequest() {\n return outputWSService.isRunnningAndDbInstancesAvailable(false);\n }",
"public boolean keepAliveEnabled(){\n return false; //TODO codavaj!!\n }",
"protected boolean disableEnableSvcs() throws Throwable {\n int i = ((int)(Math.random() * nodes));\n portString = \"\" + (i + NODE_PORT_OFFSET);\n \n return (verifySvcs(\"online\") &&\n changeSvcs(\"disable\") &&\n verifySvcs(\"disabled\") &&\n changeSvcs(\"enable\") &&\n verifySvcs(\"online\"));\n }",
"@RequiresLock(\"SeaLock\")\r\n protected void dependentInvalidAction() {\r\n // by default do nothing\r\n }",
"@Override\n public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException,\n ResourceUnavailableException {\n return true;\n }",
"default boolean isHeartbeatSupported() {\n return false;\n }",
"private boolean isAllowed(ProcessInstance instance) {\r\n return true; // xoxox\r\n }",
"public void stopServer() {\r\n\t\tserverRunning = false;\r\n\t}",
"public boolean isNetworkSingleton() {\n return isNetworkSingleton;\n }",
"@Override\n\tpublic boolean isSecured() {\n\t\treturn false;\n\t}",
"public boolean isAutoStart()\n {\n return false;\n }",
"@Override\r\n public boolean isSafe() {\n return false;\r\n }",
"@RequiresLock(\"SeaLock\")\r\n protected void invalidate_internal() {\n }",
"private List<EC2AbstractSlave> provisionOndemand(Image image, int number, EnumSet<ProvisionOptions> provisionOptions, boolean spotWithoutBidPrice, boolean fallbackSpotToOndemand)\n throws IOException {\n AmazonEC2 ec2 = getParent().connect();\n\n logProvisionInfo(\"Considering launching\");\n\n HashMap<RunInstancesRequest, List<Filter>> runInstancesRequestFilterMap = makeRunInstancesRequestAndFilters(image, number, ec2);\n Map.Entry<RunInstancesRequest, List<Filter>> entry = runInstancesRequestFilterMap.entrySet().iterator().next();\n RunInstancesRequest riRequest = entry.getKey();\n List<Filter> diFilters = entry.getValue();\n\n DescribeInstancesRequest diRequest = new DescribeInstancesRequest().withFilters(diFilters);\n\n logProvisionInfo(\"Looking for existing instances with describe-instance: \" + diRequest);\n\n DescribeInstancesResult diResult = ec2.describeInstances(diRequest);\n List<Instance> orphansOrStopped = findOrphansOrStopped(diResult, number);\n\n if (orphansOrStopped.isEmpty() && !provisionOptions.contains(ProvisionOptions.FORCE_CREATE) &&\n !provisionOptions.contains(ProvisionOptions.ALLOW_CREATE)) {\n logProvisionInfo(\"No existing instance found - but cannot create new instance\");\n return null;\n }\n\n wakeOrphansOrStoppedUp(ec2, orphansOrStopped);\n\n if (orphansOrStopped.size() == number) {\n return toSlaves(orphansOrStopped);\n }\n\n riRequest.setMaxCount(number - orphansOrStopped.size());\n\n List<Instance> newInstances;\n if (spotWithoutBidPrice) {\n InstanceMarketOptionsRequest instanceMarketOptionsRequest = new InstanceMarketOptionsRequest().withMarketType(MarketType.Spot);\n if (getSpotBlockReservationDuration() != 0) {\n SpotMarketOptions spotOptions = new SpotMarketOptions().withBlockDurationMinutes(getSpotBlockReservationDuration() * 60);\n instanceMarketOptionsRequest.setSpotOptions(spotOptions);\n }\n riRequest.setInstanceMarketOptions(instanceMarketOptionsRequest);\n try {\n newInstances = ec2.runInstances(riRequest).getReservation().getInstances();\n } catch (AmazonEC2Exception e) {\n if (fallbackSpotToOndemand && e.getErrorCode().equals(\"InsufficientInstanceCapacity\")) {\n logProvisionInfo(\"There is no spot capacity available matching your request, falling back to on-demand instance.\");\n riRequest.setInstanceMarketOptions(new InstanceMarketOptionsRequest());\n newInstances = ec2.runInstances(riRequest).getReservation().getInstances();\n } else {\n throw e;\n }\n }\n } else {\n newInstances = ec2.runInstances(riRequest).getReservation().getInstances();\n }\n // Have to create a new instance\n\n if (newInstances.isEmpty()) {\n logProvisionInfo(\"No new instances were created\");\n }\n\n newInstances.addAll(orphansOrStopped);\n\n return toSlaves(newInstances);\n }",
"public void setInstanceType(String InstanceType) {\n this.InstanceType = InstanceType;\n }",
"public boolean isConfigServerLike() {\n return this == config || this == controller;\n }",
"@Override\r\n\tpublic boolean isSynchronized() {\n\t\treturn false;\r\n\t}",
"public static boolean vu0IsRunning() { return false; }",
"@ApiModelProperty(value = \"Flag indicating whether to normalize the instance\")\n public Boolean isNormalizeInstance() {\n return normalizeInstance;\n }",
"protected void notAllowedToWork_stopMachine_EM() {\n stopMachine();\n }",
"@Test\n public void testDSMDetectsServerLiveJustBeforeInterestRegistration() throws Exception {\n createClientPoolCache(getName(), NetworkUtils.getServerHostName(server1.getHost()));\n createEntriesK1andK2();\n server1.invoke(HAInterestTestCase::createEntriesK1andK2);\n server2.invoke(HAInterestTestCase::createEntriesK1andK2);\n server3.invoke(HAInterestTestCase::createEntriesK1andK2);\n VM backup = getBackupVM();\n backup.invoke(HAInterestTestCase::stopServer);\n verifyDeadAndLiveServers(1, 2);\n setClientServerObserverForBeforeRegistration(backup);\n try {\n registerK1AndK2();\n waitForBeforeRegistrationCallback();\n } finally {\n unSetClientServerObserverForRegistrationCallback();\n }\n server1.invoke(HAInterestTestCase::verifyInterestRegistration);\n server2.invoke(HAInterestTestCase::verifyInterestRegistration);\n server3.invoke(HAInterestTestCase::verifyInterestRegistration);\n }",
"public void serverRestarting() {\n notifyServerRestart();\n }",
"public void setSingleAvailabilityZone(Boolean singleAvailabilityZone) {\n this.singleAvailabilityZone = singleAvailabilityZone;\n }",
"private boolean onlyInstance(){\n File dir1 = new File (\".\");\n String location=\"\";\n\n try{\n location = dir1.getCanonicalPath();\n } catch (IOException e) {\n }\n File temp = new File(location+\"\\\\holder.tmp\");\n\n if (!temp.exists())\n return true;\n else\n {\n int result = JOptionPane.showConfirmDialog(null,\n \"Instance of TEWIN already running (or at least I think it is)!\\n\" +\n \"Click YES to load anyway, or NO to exit\",\"I think I'm already running\",\n JOptionPane.YES_NO_OPTION);\n if(result == JOptionPane.YES_OPTION)\n {\n temp.delete();\n return true;\n }else\n return false;\n }\n \n }",
"@Override public ServerConfig autoStart(final boolean autoStart) {\n autoStartEnabled = autoStart;\n return this;\n }",
"@Override\n public void disabledPeriodic() {\n\tScheduler.getInstance().run();\n }",
"public void setAutoSynchronizationEnabled(boolean b);",
"protected final boolean sharedConnectionEnabled() {\n\t\treturn true;\n\t}",
"public boolean synchronize() {\n\t\treturn false;\n\t}",
"private boolean isPublishAsDownOnStartup(CloudDescriptor cloudDesc) {\n Replica replica =\n zkStateReader\n .getClusterState()\n .getCollection(cloudDesc.getCollectionName())\n .getSlice(cloudDesc.getShardId())\n .getReplica(cloudDesc.getCoreNodeName());\n return !replica.getNodeName().equals(getNodeName());\n }",
"public void createOnlyDistributedObjectsPolicy(){\n\t\t\n\t\tint size = 0;\n\t\t\n\t\tIterator<CacheObject> cst = candidateStableOnlyList.iterator();\n\t\tCollection<String> it1 = serverList.keySet();\n\t\tArrayList<String> server = new ArrayList<String>(it1);\n\t\tint counter = 0;\t\t\n\t\t\n\t\twhile(cst.hasNext()){\n\t\t\t\n\t\t\tCacheObject ct = cst.next();\n\t\t\tif(size <= (STABLE_SIZE * NO_SERVERS)){\n\t\t\t\t\n\t\t\t\tArrayList<String> lt = new ArrayList<String>();\n\t\t\t\tString serId = server.get( (counter++) % NO_SERVERS );\n\t\t\t\tlt.add(serId);\n\t\t\t\tRuleList rl = new RuleList(serId, RuleList.MOVE , RuleList.STABLE_TTL, lt);\n\t\t\t\tListKey lk = new ListKey();\n\t\t\t\tlk.addtoListKey(ct.cacheKey);\n\t\t\t\tASPolicyMap.get(serId).addNewPolicy(lk, rl);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\t\t\n\t\t}\n\t\t\n\t}",
"public boolean canDespawn()\n {\n return false;\n }",
"@Transient\n public boolean isCorrupted(){\n return serverNode == null;\n }",
"@Test\n public void testRouterAllServersDown() throws Exception {\n defaultServer1.cancelRegistration();\n defaultServer2.cancelRegistration();\n\n testSyncServiceUnavailable();\n Assert.assertEquals(0, defaultServer1.getNumRequests());\n Assert.assertEquals(0, defaultServer2.getNumRequests());\n\n defaultServer1.registerServer();\n defaultServer2.registerServer();\n }",
"private boolean isGetingOneServerFile(){\n\tRandom ran = new Random();\n\tif((ran.nextInt() % 2) == 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public void changeAvailability() {\n\t\tavailability = !availability;\n\t}",
"public boolean simulateProductionLatencies() {\n return false;\n }",
"public IllegalConnectionCheck() {\n listener = new LinkedHashSet<CheckListener>();\n active = true;\n }",
"protected PayerThread() {\n\t\t\tEvent.ASSERTION.issue(sets == null, \"builders is null\");\n\t\t\tEvent.ASSERTION.issue(workloadConfiguration == null, \"configuration is null\");\n\n\t\t\tsetDaemon(true);\n\t\t}",
"static synchronized boolean isCurrentThreadRMIServer()\n\t{\n\t\treturn threadIsRmi.get();\n\t}",
"public boolean isEveryTime() {\n return false;\n }",
"private void deactivateRunningServiceInstances(String userId,\n String serverName,\n String methodName,\n UIOperationalServicesInstance instance,\n boolean permanentDeactivation) throws InvalidParameterException,\n PropertyServerException\n {\n\n //TODO terminal user store and views?\n instanceHandler.removeServerServiceInstance(serverName);\n\n platformInstanceMap.shutdownServerInstance(userId, serverName, methodName);\n }",
"public static Boolean isStandAloneDeployment()\n\t{\n\t\tString deploymentType=Util.getProperty(Constants.PLUGIN_TYPE);\n\t\tif(Constants.PLUGIN_TYPE_STAND_ALONE.equals(deploymentType))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean gcRemoveWifiP2pGroupForce() {\n\t\treturn false;\n\t}",
"@Override\n public List<InstanceOverallStatusDto> syncInstances(List<Manifest.Key> given) {\n List<InstanceDto> list = list();\n List<Manifest.Key> instances = (given == null || given.isEmpty()) ? list.stream().map(d -> d.instance).toList() : given;\n Set<String> errors = new TreeSet<>();\n\n // on CENTRAL only, synchronize managed servers. only after that we know all instances.\n if (minion.getMode() == MinionMode.CENTRAL) {\n List<ManagedMasterDto> toSync = list.stream().filter(i -> instances.contains(i.instance)).map(i -> i.managedServer)\n .toList();\n\n log.info(\"Mass-synchronize {} server(s).\", toSync.size());\n\n ManagedServersResource rs = rc.initResource(new ManagedServersResourceImpl());\n try (Activity sync = reporter.start(\"Synchronize Servers\", toSync.size())) {\n AtomicLong syncNo = new AtomicLong(0);\n ExecutorService es = Executors.newFixedThreadPool(4, new RequestScopedNamedDaemonThreadFactory(reqScope,\n reg.get(group).getTransactions(), reporter, () -> \"Mass-Synchronizer \" + syncNo.incrementAndGet()));\n List<Future<?>> syncTasks = new ArrayList<>();\n for (ManagedMasterDto host : toSync) {\n syncTasks.add(es.submit(() -> {\n try (Activity singleSync = reporter.start(\"Synchronize \" + host.hostName)) {\n if (log.isDebugEnabled()) {\n log.debug(\"Synchronize {}\", host.hostName);\n }\n rs.synchronize(group, host.hostName);\n } catch (Exception e) {\n errors.add(host.hostName);\n log.warn(\"Could not synchronize managed server: {}: {}\", host.hostName, e.toString());\n if (log.isDebugEnabled()) {\n log.debug(\"Exception:\", e);\n }\n }\n sync.workAndCancelIfRequested(1);\n }));\n }\n\n FutureHelper.awaitAll(syncTasks);\n es.shutdown(); // make all threads exit :)\n }\n } else {\n // update the local stored state.\n ResourceProvider.getResource(minion.getSelf(), MasterRootResource.class, context).getNamedMaster(group)\n .updateOverallStatus();\n }\n\n // for each instance, read the meta-manifest, and provide the recorded data.\n var result = new ArrayList<InstanceOverallStatusDto>();\n for (var inst : list.stream().filter(i -> instances.contains(i.instance)).toList()) {\n if (inst.managedServer != null && inst.managedServer.hostName != null\n && errors.contains(inst.managedServer.hostName)) {\n continue; // no state as we could not sync.\n }\n result.add(new InstanceOverallStatusDto(inst.instanceConfiguration.id,\n new InstanceOverallState(inst.instance, hive).read()));\n }\n\n return result;\n }",
"@Override\n protected boolean isZoneLevelResource() {\n return false;\n }",
"public void securityOff()\n {\n m_bSecurity = false;\n }",
"public boolean hasEndpoint2() { return true; }",
"private static void runManagerInstance() {\n\t\tFilter tagFilter = new Filter(\"tag:Type\", Arrays.asList(\"Manager\"));\n Filter stateFilter = new Filter(\"instance-state-name\", Arrays.asList(\"stopped\", \"pending\", \"running\"));\n \n DescribeInstancesResult response = ec2.describeInstances((new DescribeInstancesRequest())\n \t\t.withFilters(tagFilter, stateFilter));\n\n List<Reservation> managerInstances = response.getReservations();\n Instance managerInstance;\n if (!managerInstances.isEmpty()) { // Manager already exists. \n managerInstance = getManagerInstance(managerInstances);\n managerInstanceId = managerInstance.getInstanceId();\n InstanceState managerState = getInstanceState(managerInstance);\n if (managerState != InstanceState.Running) {\n \tStartInstancesRequest startRequest = new StartInstancesRequest().withInstanceIds(managerInstanceId);\n ec2.startInstances(startRequest);\n }\n }\n else { // Manager doesn't exist.\n RunInstancesRequest runManagerRequest = new RunInstancesRequest(\"ami-b66ed3de\", 1, 1);\n runManagerRequest.setInstanceType(InstanceType.T2Micro.toString());\n runManagerRequest.setUserData(fileToBase64String(\"C:\\\\Users\\\\Haymi\\\\Documents\\\\BGU\\\\DSP\\\\bootstart.sh\"));\n managerInstance = ec2.runInstances(runManagerRequest).getReservation().getInstances().get(0);\n managerInstanceId = managerInstance.getInstanceId();\n CreateTagsRequest createTagsRequest = new CreateTagsRequest()\n \t\t.withResources(managerInstanceId)\n .withTags(new Tag(\"Type\", \"Manager\"));\n ec2.createTags(createTagsRequest);\n }\n waitForInstanceState(managerInstance, InstanceState.Running, 1905);\n\n System.out.println(\"Manager is running.\");\n\t\t\n\t}",
"public void setInstanceId(String InstanceId) {\n this.InstanceId = InstanceId;\n }",
"public void setInstanceId(String InstanceId) {\n this.InstanceId = InstanceId;\n }",
"public void setInstanceId(String InstanceId) {\n this.InstanceId = InstanceId;\n }",
"public void stopMeteorSpawn() {\n\t\tmeteorSpawn = false;\n\t}",
"@Override\n\tpublic boolean canPassengerSteer() {\n\t\treturn false;\n\t}",
"public boolean keepAliveEnabled();",
"public boolean canRespawnHere()\n {\n return false;\n }",
"public void setHosted() {\r\n\t\tthis.isHosted = true;\r\n\t}",
"protected boolean isClusterRequired() {\n return true;\n }",
"@Before\n public void stopRandomHost() {\n if (httpServers.length > 1 && randomBoolean()) {\n List<HttpServer> updatedHttpServers = new ArrayList<>(httpServers.length - 1);\n int nodeIndex = randomIntBetween(0, httpServers.length - 1);\n if (0 == nodeIndex) {\n stoppedFirstHost = true;\n }\n for (int i = 0; i < httpServers.length; i++) {\n HttpServer httpServer = httpServers[i];\n if (i == nodeIndex) {\n httpServer.stop(0);\n } else {\n updatedHttpServers.add(httpServer);\n }\n }\n httpServers = updatedHttpServers.toArray(new HttpServer[0]);\n }\n }",
"public SpecificIPAllowedWebActivityServlet() {\n super();\n }"
] | [
"0.5544189",
"0.5521636",
"0.542355",
"0.53777915",
"0.5319651",
"0.5283286",
"0.5221594",
"0.5172044",
"0.51257414",
"0.5119762",
"0.5111111",
"0.5095569",
"0.50902575",
"0.5088011",
"0.50874984",
"0.5076552",
"0.5068531",
"0.50536954",
"0.50531816",
"0.5039922",
"0.5027964",
"0.5024066",
"0.50235736",
"0.5021538",
"0.5021008",
"0.5017147",
"0.50149125",
"0.5013882",
"0.500742",
"0.50065607",
"0.49987885",
"0.4991065",
"0.49859542",
"0.4964134",
"0.4962208",
"0.49559066",
"0.4953977",
"0.49499974",
"0.49408808",
"0.49280146",
"0.4922461",
"0.49178746",
"0.49177092",
"0.4914143",
"0.49110088",
"0.49022427",
"0.48970914",
"0.48928547",
"0.48852882",
"0.48765823",
"0.4865549",
"0.48619473",
"0.485391",
"0.48533812",
"0.4847463",
"0.48254928",
"0.48168555",
"0.480938",
"0.48077965",
"0.48060519",
"0.4804884",
"0.48009416",
"0.48009193",
"0.47945416",
"0.4793581",
"0.47832114",
"0.4775258",
"0.4772648",
"0.4772438",
"0.4762555",
"0.47613797",
"0.4759524",
"0.47569916",
"0.4749817",
"0.4747654",
"0.47457352",
"0.47453898",
"0.47452426",
"0.47438845",
"0.47421947",
"0.47397614",
"0.4739761",
"0.47397274",
"0.47297874",
"0.47271547",
"0.47256598",
"0.47163656",
"0.47147715",
"0.47136962",
"0.47087818",
"0.47087818",
"0.47087818",
"0.47003302",
"0.46985492",
"0.46985078",
"0.46982276",
"0.4696899",
"0.46965453",
"0.46940684",
"0.46910807"
] | 0.49757573 | 33 |
List a = Collections.singletonList("a"); List statusList = new ArrayList(); statusList.add(1); statusList.add(2); statusList.add(4); statusList.add(5); statusList.stream().filter(integer > integer != 4); System.out.println(statusList); | public static void main(String[] args) {
List<Integer> a = range(3, 19).mapToObj(Integer::valueOf).collect(toList());
a.sort((x, y) -> (x - y));
// System.out.println(a);
List<List<String>> QUICK_THREE_OPTIONS = new ArrayList<>();
//空 0
QUICK_THREE_OPTIONS.add(new ArrayList<>());
//和值 1
final List<String> sumOptions = range(3, 19).mapToObj(String::valueOf).collect(toList());
QUICK_THREE_OPTIONS.add(sumOptions);
//三同号 2
final List<String> threeSameOptions = range(1, 7).mapToObj(i -> nTimes(i, 3)).collect(toList());
threeSameOptions.add("3A");
QUICK_THREE_OPTIONS.add(threeSameOptions);
//二同号 3
final List<String> twoSameOptions = range(1, 7).mapToObj(i -> nTimes(i, 2)).collect(toList());
twoSameOptions.addAll(range(1, 7).mapToObj(String::valueOf).collect(toList()));
twoSameOptions.addAll(range(1, 7).mapToObj(i -> nTimes(i, 2) + "*").collect(toList()));
QUICK_THREE_OPTIONS.add(twoSameOptions);
//三不同 4
final List<String> threeDifferent = range(1, 7).mapToObj(String::valueOf).collect(toList());
threeDifferent.add("3B");
QUICK_THREE_OPTIONS.add(threeDifferent);
//二不同 5
final List<String> twoDifferent = range(1, 7).mapToObj(String::valueOf).collect(toList());
QUICK_THREE_OPTIONS.add(twoDifferent);
// System.out.println(QUICK_THREE_OPTIONS);
List<List<String>> ELEVEN_C_FIVE_OPTIONS = new ArrayList<>();
//组合选项
ELEVEN_C_FIVE_OPTIONS.add(IntStream.range(1, 12).mapToObj(i -> String.format("%02d", i)).collect(toList()));
//前二直选
final List<String> frontTwoDirect = new ArrayList<>();
frontTwoDirect.addAll(IntStream.range(1, 12).mapToObj(i -> "a" + String.format("%02d", i)).collect(toList()));
frontTwoDirect.addAll(IntStream.range(1, 12).mapToObj(i -> "b" + String.format("%02d", i)).collect(toList()));
ELEVEN_C_FIVE_OPTIONS.add(frontTwoDirect);
//前三直选
final List<String> frontThreeDirect = new ArrayList<>();
frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> "a" + String.format("%02d", i)).collect(toList()));
frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> "b" + String.format("%02d", i)).collect(toList()));
frontThreeDirect.addAll(IntStream.range(1, 12).mapToObj(i -> "c" + String.format("%02d", i)).collect(toList()));
ELEVEN_C_FIVE_OPTIONS.add(frontThreeDirect);
final int TWENTY_C_FIVE_SAN_GUO_SHI_LI = 1;
final int TWENTY_C_FIVE_SAN_GUO_FIVE = 2;
final int TWENTY_C_FIVE_SAN_GUO_EIGHT = 3;
final int TWENTY_C_FIVE_SAN_GUO_FRONT_THREE_DIRECT = 4;
final List<List<String>> TWENTY_C_FIVE_SAN_GUO_OPTIONS = new ArrayList<>();
//势力选择
TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(IntStream.range(1, 4).mapToObj(i -> String.format("%02d", i)).collect(toList()));
//组合选项
final List<String> group = new ArrayList<>();
group.addAll(IntStream.range(1, 21).mapToObj(i -> "a" + String.format("%02d", i)).collect(toList()));
group.addAll(IntStream.range(1, 4).mapToObj(i -> "b" + String.format("%02d", i)).collect(toList()));
TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(group);
//前三直选
final List<String> frontThreeDirect1 = new ArrayList<>();
frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> "a" + String.format("%02d", i)).collect(toList()));
frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> "b" + String.format("%02d", i)).collect(toList()));
frontThreeDirect1.addAll(IntStream.range(1, 21).mapToObj(i -> "c" + String.format("%02d", i)).collect(toList()));
frontThreeDirect1.addAll(IntStream.range(1, 4).mapToObj(i -> "d" + String.format("%02d", i)).collect(toList()));
TWENTY_C_FIVE_SAN_GUO_OPTIONS.add(frontThreeDirect1);
// System.out.println(ELEVEN_C_FIVE_OPTIONS);
List<String> s = new ArrayList<>();
s.add("3");
s.add("5");
s.add("6");
s.add("7");
s.add("9");
// s.add("11");
// System.out.println(c);
List<List<String>> s1 = new ArrayList<>();
s1.add(s);
List<String> targetNumbers = s1.stream().map(l -> join(l, ",")).collect(toList());
// System.out.println(getPermutationXSrcLists(s, 2, true));
long tl = computeElevenCFiveGroup(targetNumbers.get(0));
// System.out.println(tl);
System.out.println(TWENTY_C_FIVE_SAN_GUO_OPTIONS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String []args) {\n\t\tList<String> numbers = Arrays.asList(\"1\", \"2\", \"3\", \"4\", \"5\", \"6\",\"7\",\"8\",\"9\");\r\n\t\t//Generate numbers from 1 to 9\r\n\t\tSystem.out.println(IntStream.range(1,10).mapToObj(String::valueOf).collect(Collectors.toList()));\r\n//\t\tSystem.out.println(\"Original list \" + numbers);\r\n\t\t\r\n\t\tList<Integer> even = numbers.stream()\r\n\t\t\t\t//gets the integer value from the string\r\n//\t\t\t\t.map(s ->Integer.valueOf(s))\r\n\t\t\t\t.map(Integer::valueOf) // Another way to do the top line(line 18)\r\n\t\t\t\t//checking if it is even\r\n\t\t\t\t.filter(number -> number % 2 ==1)// Odd numbers\r\n//\t\t\t\t.filter(number -> number % 2 ==0)// Even numbers\r\n\t\t\t\t//Collects results in to list call even.\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\t\r\n\t\tSystem.out.println(even);\r\n\r\n\t\tList<String> strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\", \"\", \"jkl\", \"\", \"\");\r\n\t\tSystem.out.println(strings);\r\n\t\t\r\n\t\tList<String> filtered = strings.stream()\r\n\t\t\t\t// checking each item and we check it is empty\r\n\t\t\t\t.filter(s-> !s.isEmpty())\r\n//\t\t\t\t.filter(s-> s.isEmpty())\r\n\t\t\t\t// add the remaining element to the list\r\n\t\t\t\t.collect(Collectors.toList());\r\n\t\tSystem.out.println(filtered);\r\n\t\t\r\n\t\t// Known as a method reference \r\n//\t\tforEach(System.out::println)\r\n\t\t \r\n\t}",
"public static void main(String[] args) {\n Iterable<Integer> integers = Lists.newArrayList();\n ArrayList<Integer> integers1 = Lists.newArrayList(Iterables.filter(integers, integer -> integer != 1));\n System.out.println(integers1.toString());\n int size = Iterables.size(integers);\n System.out.println(\"size:\"+size);\n Integer last = Iterables.getLast(integers);\n System.out.println(\"last:\"+last);\n }",
"public static void main(String[] args) {\n System.out.println(\"hola la concha de tu madre\");\n Persona persona1 = new Persona(\"allan\",28,19040012);\n Persona persona2 = new Persona(\"federico\", 14,40794525);\n Persona persona3 = new Persona(\"pablito\", 66,56654456);\n\n List<Persona> personas= new ArrayList<Persona>();\n personas.add(persona1);\n personas.add(persona2);\n personas.add(persona3);\n\n System.out.println(\"--------Para imprimir la list completa--------\");\n System.out.println(String.format(\"Personas: %s\",personas));\n\n System.out.println(\"----------MAYORES A 21-------------\");\n // mayores a 21\n System.out.println(String.format(\"Mayores a 21: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21)\n .collect(Collectors.toList())));\n\n System.out.println(\"-----------MENORES A 18-------------------\");\n // menores 18\n System.out.println(String.format(\"menores 18: %s\",personas.stream()\n .filter(persona->persona.getEdad() < 18)\n .collect(Collectors.toList())));\n\n System.out.println(\"---------MAYORES A 21 + DNI >20000000 -------------------\");\n System.out.println(String.format(\"MAYORES A 21 + DNI >20000000: %s\",personas.stream()\n .filter(persona->persona.getEdad() > 21 && persona.getDni()>20000000)\n //.filter( persona->persona.getDni() >20000000) // tambien funciona con este\n .collect(Collectors.toList())));\n\n }",
"private void exercise2() {\n List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerOddLengthList = list.stream()\n .filter((string) -> string.length() % 2 != 0)\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }",
"public static void main(String[] args) {\n\t\t\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(1);\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tlist.add(7);\n\t\t\n\t\tIterator<Integer> it = list.iterator();\n\t\t\n\t\twhile(it.hasNext()) {\n\t\t\tint element = it.next();\n\t\t\tSystem.out.println(\"element \"+element);\n\t\t\tif(element == 1) {\n\t\t\t\tit.remove();\n\t\t\t\tit.next();\n\t\t\t\tit.remove();\n\t\t\t\t//it.forEachRemaining(Filter::add);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//System.out.println(\"list \"+list);\n\t\t\n\t\t//forEach\n\t//\tlist.forEach(System.out::println);\n\t\t//list.forEach(Filter::filter);\n\t//\tlist.forEach(new Filter());\n\t}",
"public static void main(String[] args) {\n\t\tPredicate<Integer> even=x->x%2==0;\n\t\tList<Integer> li=Arrays.asList(1,2,3,4,5,6,7,8);\n\t\tList<Integer> Leven=li.stream().filter(even).collect(Collectors.toList());\n\t\tSystem.out.println(Leven);\n\t\tList<Integer> Lodd=li.stream().filter(even.negate()).collect(Collectors.toList());\n\t\tSystem.out.println(Lodd);\n\t}",
"public static void main(String[] args) {\n List<Integer> numbers = Arrays.asList(1, 9, -9, -32234, 8932489);\n\n //vytvorim si dalsi list integerov a priradim mu .stream Array List numbers\n List<Integer> squeredNumbers = numbers.stream()\n // .filter ako for loop, prejde arrayom numbers ak je cislo vacsie ako tri\n // podmienka pokracuje\n .filter(i -> i > 3)\n // .map zobere hodnotu i ( je to cislo z mapy) a vynasoby ju rovnakou hodnotou\n .map(i -> i * i)\n // .cllect(Collectors.toList();\n .collect(Collectors.toList());\n // vytlacime stream funkciu\n System.out.println(squeredNumbers);\n }",
"public static void main(String [] args) {\n Stream.of(1,17,2,6).filter(n -> n > 6).forEach(s -> System.out.println(s));\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\t\tSystem.out.println(\"-------1. Stream filter() example---------\");\r\n\t\t//We can use filter() method to test stream elements for a condition and generate filtered list.\r\n\t\t\r\n\t\tList<Integer> myList = new ArrayList<>();\r\n\t\tfor(int i=0; i<100; i++) myList.add(i);\r\n\t\tStream<Integer> sequentialStream = myList.stream();\r\n\r\n\t\tStream<Integer> highNums = sequentialStream.filter(p -> p > 90); //filter numbers greater than 90\r\n\t\tSystem.out.print(\"High Nums greater than 90=\");\r\n\t\thighNums.forEach(p -> System.out.print(p+\" \"));\r\n\t\t//prints \"High Nums greater than 90=91 92 93 94 95 96 97 98 99 \"\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"-------2. Stream map() example---------\");\r\n\t\t//We can use map() to apply functions to an stream\r\n\t\tStream<String> names = Stream.of(\"aBc\", \"d\", \"ef\");\r\n\t\tSystem.out.println(names.map(s -> {\r\n\t\t\t\treturn s.toUpperCase();\r\n\t\t\t}).collect(Collectors.toList()));\r\n\t\t//prints [ABC, D, EF]\r\n\t\t\r\n\t\tSystem.out.println(\"-------3. Stream sorted() example---------\");\r\n\t\t//We can use sorted() to sort the stream elements by passing Comparator argument.\r\n\t\tStream<String> names2 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> reverseSorted = names2.sorted(Comparator.reverseOrder()).collect(Collectors.toList());\r\n\t\tSystem.out.println(reverseSorted); // [ef, d, aBc, 123456]\r\n\r\n\t\tStream<String> names3 = Stream.of(\"aBc\", \"d\", \"ef\", \"123456\");\r\n\t\tList<String> naturalSorted = names3.sorted().collect(Collectors.toList());\r\n\t\tSystem.out.println(naturalSorted); //[123456, aBc, d, ef]\r\n\t\t\r\n\t\tSystem.out.println(\"-------4. Stream flatMap() example---------\");\r\n\t\t//We can use flatMap() to create a stream from the stream of list.\r\n\t\tStream<List<String>> namesOriginalList = Stream.of(\r\n\t\t\t\tArrays.asList(\"Pankaj\"), \r\n\t\t\t\tArrays.asList(\"David\", \"Lisa\"),\r\n\t\t\t\tArrays.asList(\"Amit\"));\r\n\t\t\t//flat the stream from List<String> to String stream\r\n\t\t\tStream<String> flatStream = namesOriginalList\r\n\t\t\t\t.flatMap(strList -> strList.stream());\r\n\r\n\t\t\tflatStream.forEach(System.out::println);\r\n\r\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<Integer> numbers = new ArrayList<Integer>();\n\t\tnumbers.add(5);\n\t\tnumbers.add(50);\n\t\tnumbers.add(10);\n\t\tnumbers.add(60);\n\t\tnumbers.add(15);\n\t\tnumbers.add(70);\n\t\t\n\t\tSystem.out.println(numbers);\n\t\t\n\t\tList<Integer> evenNumbers = numbers.stream().filter(I -> I%2==0).collect(Collectors.toList());\n\t\tSystem.out.println(evenNumbers);\n\t}",
"@Test\r\n void filterMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(1).getType());\r\n }",
"public static void main(String[] args) {\r\n\t\tList<Account> accounts = new ArrayList<Account>() {\r\n\t\t\t{\r\n\t\t\t\tadd(new Account(\"Bob\", 5000, 1001));\r\n\t\t\t\tadd(new Account(\"Jim\", 10000, 1002));\r\n\t\t\t\tadd(new Account(\"Bruce\", 5300, 1003));\r\n\t\t\t\tadd(new Account(\"Li\", 12000, 1004));\r\n\t\t\t\tadd(new Account(\"Sam\", 9000, 1005));\r\n\t\t\t\tadd(new Account(\"Rick\", 11000, 1006));\r\n\t\t\t}\r\n\t\t};\r\n\t\tBiFunction<List<Account>, Integer, List<Account>> MYLIB = (list, f) -> {\r\n\t\t\treturn list.stream().filter(e -> e.getBalance() > f).collect(Collectors.toList());\r\n\t\t};\r\n\t\tMYLIB.apply(accounts, 2000).forEach(x -> System.out.println(x.getOwnerName()));\r\n\t\tMYLIB.apply(accounts, 40000).forEach(x -> System.out.println(x.getOwnerName()));\r\n\t\taccounts.stream().filter(a -> a.getBalance() > 50000).collect(Collectors.toList());\r\n\t\tclass A {\r\n\t\t\tpublic A() {\r\n\r\n\t\t\t}\r\n\t\t\t boolean test() {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tpublic String toString(){\r\n\t\t\t\treturn test() + \"\";\r\n\t\t\t}\r\n\t\t};\r\n\r\n//\t\tA a = new A();\r\n//\t\taccounts.stream().filter(A::test).collect(Collectors.toList());\r\n\t\tStream.generate(A::new).limit(10).forEach(System.out::println);\r\n//\t\ts.forEach(System.out::println);\r\n\t\t//sorting code here\r\n\t\tSystem.out.println(\"----------------------------\");\r\n\t\tSystem.out.println(accounts);\r\n\t\tCollections.sort(accounts, Comparator.comparing(Account::getBalance).thenComparing(Account::getOwnerName).reversed());\r\n//\t\tCollections.sort(accounts, Comparator.comparing(Account::getBalance).thenComparing(Account::getOwnerName));\r\n\t\tSystem.out.println(accounts);\r\n\t\tMyF f = new MyF();\r\n\t\tList<Integer> n = Arrays.asList(1, 2, 3, 4,5, 6, 7);\r\n\t\tf.filter(n, (x) -> ((int) x) > 3).forEach(System.out::println);\r\n\t}",
"@Test\n void testFilterList(){\n ToDoList todoList = new ToDoList();\n ToDo todo1 = new ToDo(\"Todo1\");\n todo1.setInhalt(\"Dies ist ein Test\");\n\n todoList.add(new ToDo((\"Todo2\")));\n ToDo todo3 = new ToDo(\"Todo3\");\n todo3.setInhalt(\"3+3=6\");\n todo3.setStatus(Status.IN_ARBEIT);\n todoList.add(new ToDo((\"Todo4\")));\n todoList.add(todo3);\n ToDo todo4 = new ToDo(\"Trala\");\n todo4.setStatus(Status.IN_ARBEIT);\n todo4.setStatus(Status.BEENDET);\n todo4.setInhalt(\"ab\");\n ToDo todo5 = new ToDo(\"Trala\");\n todo5.setInhalt(\"aa\");\n todo5.setStatus(Status.IN_ARBEIT);\n todo5.setStatus(Status.BEENDET);\n todoList.add(todo5);\n todoList.add(todo4);\n todoList.add(todo1);\n\n ToDoList open = todoList.getStatusFilteredList(Status.OFFEN);\n assertEquals(3, open.size());\n\n ToDoList inwork = todoList.getStatusFilteredList(Status.IN_ARBEIT);\n assertEquals(1, inwork.size());\n\n ToDoList beendet = todoList.getStatusFilteredList(Status.BEENDET);\n assertEquals(2, beendet.size());\n }",
"public static void main(String[] args) {\n\n\t\t\n\t\tSet list = new HashSet();\n\t\tlist.add(\"1\");\n\t\tlist.add(\"2\");\n\t\tlist.add(\"3\");\n\t\tlist.add(\"1\");\n\t\tlist.forEach(System.out::print); // 123\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t\t\n//\t\tStream<String> stream = Arrays.stream(new String[] {\"a\",\"b\",\"c\"});\n//\t\tString output = stream.filter(s->{ \n//\t\t\tif(s.compareTo(\"abc\") > 0)\n//\t\t\t\treturn true;\n//\t\t})\n//\t\t.peek(System.out::print)\n//\t\t.collect(Collectorsjoining()); //Compilation Fail Here\n//\t\tSystem.out.println(output);\n\t\t\n\t\t\n\t\tVector obj = new Vector(4,2);\n\t\tobj.addElement(new Integer(3));\n\t\tobj.addElement(new Integer(2));\n\t\tobj.addElement(new Integer(5));\n\t\tSystem.out.println(obj.capacity());\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t\t\n//\t\tSet _set = new HashSet();\n\t\tSet _set = new TreeSet();\n\t\t_set.add(new Integer(2));\n\t\t_set.add(new Integer(1));\n\t\tSystem.out.println(_set); // [1,2] TreeSet will Guaranteed Sorting\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t\t\n\t\tSet<Integer> ss = new HashSet<Integer>();\n\t\tInteger i1 = 45;\n\t\tInteger i2 = 46;\n\t\tss.add(i1);\n\t\tss.add(i1);\n\t\tss.add(i2);\n\t\tSystem.out.print(ss.size() + \" \");\n\t\tss.remove(i1);\n\t\tSystem.out.print(ss.size() + \" \");\n\t\ti2=47;\n\t\tss.remove(i2);\n\t\tSystem.out.print(ss.size() + \" \");\n\t\t\n\t\tSystem.out.println(\"---------------------------\");\n\t}",
"public static void main(String[] args) {\n\n ArrayList<Integer> arrayList=new ArrayList<>();\n\n arrayList.add(1);\n arrayList.add(1);\n arrayList.add(2);\n arrayList.add(5);\n\n\n System.out.println(arrayList);\n System.out.println(arrayList.remove(1));\n System.out.println(arrayList);\n\n }",
"public static void main(String[] args) {\r\n\t\t\r\n\tList<Integer> myList = new ArrayList<>();\r\n\tmyList.add(0);\r\n\tmyList.add(1);\r\n\tmyList.add(5);\r\n\tmyList.add(115);\r\n\tmyList.add(100);\r\n\tmyList.add(26);\r\n\tmyList.add(5555);\r\n\tmyList.add(-12);\r\n\t\r\n\tSystem.out.println(myList);\r\n\t\r\n\tfor(int i = 0; i<myList.size(); i++) {\r\n\t\tif(myList.get(i) > 100 || myList.get(i) < 1) {\r\n\t\t\tmyList.remove(i);\r\n\t\t\ti--;\r\n\t\t}\r\n\t}\r\n\t\r\n\tSystem.out.println(myList);\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t}",
"@Test\n public void lab5() {\n StudentService ss = new StudentService();\n Utils.fillStudents(ss);\n\n List<Student> students = ss.getAllStudents();\n\n //List<Long> listOfAges = students.stream()\n Set<Long> listOfAges = students.stream()\n .filter(s -> s.getStatus() == Student.Status.HIBERNATING)\n .map(s -> s.getDob().until(LocalDate.now(), ChronoUnit.YEARS))\n .collect(toSet());\n\n\n }",
"public static void main(String[] args) {\n\n\t\tArrayList<Integer> numbers = new ArrayList<Integer> ();\n\t\t\n\t\tfor(int i=1; i<=10; i++) {\n\t\t\tnumbers.add(i);\n\t\t}\n\t\t\n\t\tSystem.out.println(\"numbers \" + numbers);\n\t\t\n\t\tnumbers.stream().filter(num-> num%2==0).forEach(s->System.out.println(s));\n\t\tSystem.out.println(\"=========after map==========\");\n\t\tnumbers.stream().map(num->num+5).forEach(s->System.out.println(s));\n\t}",
"private ArrayList<Message> filterByStatus(ArrayList<Message> messages, String status){\n ArrayList<Message> myMessages = new ArrayList<Message>();\n for(Message msg : messages ){\n if(msg.values.get(\"sucess\").equals(status)){\n myMessages.add(msg);\n }\n }\n return myMessages;\n }",
"public void testConsumer ()\n {\n\n List<String> list = new ArrayList<>();\n list.add(\"ccc\");\n list.add(\"bbb\");\n list.add(\"ddd\");\n list.add(\"DDDD\");\n list.add(\"ccc\");\n list.add(\"aaa\");\n list.add(\"eee\");\n\n// Collections.sort(list);\n// Collections.sort(list, (s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.sort((s, s2) -> s.compareTo(s2));\n// list.sort((s, s2) -> s.toLowerCase().compareTo(s2.toLowerCase()));\n\n// list.forEach(s -> System.out.println(s));\n// list.forEach(s -> System.out.println(s));\n\n\n// Predicate<String> predicate2 = s -> s.length()>3;\n// System.out.println(\"predicate2.test(\\\"DDDD\\\") = \" + predicate2.test(\"DDDD\"));\n\n// Stream<String> stringStream = list.stream();\n// stringStream.forEach(s -> System.out.println(s));\n// stringStream.forEach(s -> System.out.println(s));//会报错\n\n// list.stream().forEach(s -> System.out.println(s));\n// list.stream().forEach(s -> System.out.println(s));\n\n //并行流是无序的\n// list.parallelStream().forEach(s -> System.out.println(s));\n// list.parallelStream().forEach(s -> System.out.println(s));\n\n// list.stream().skip(3).forEach(s -> System.out.println(s));\n// list.stream().distinct().forEach(s -> System.out.println(s));\n// System.out.println(\"list.stream().count() = \" + list.stream().count());\n// list.stream().limit(2).forEach(s -> System.out.println(s));\n\n// list.stream().filter(s -> s.length()<4).forEach(s -> System.out.println(s));\n\n// BiFunction<Integer, String, Person> bf = Person::new;\n// BiFunction<Integer, String, Person> bf = (n, s) -> new Person(s);\n\n// Person aaa = bf.apply();\n\n// System.out.println(\"aaa = \" + bf.apply(0, \"aaa\"));\n \n }",
"java.util.List<java.lang.Integer> getStatusList();",
"public static void main(String[] args) {\n MyLinkedList<Integer> list = new MyLinkedList<>();\n IntStream.rangeClosed(1, 10).forEach(i -> list.add(i));\n\n\n // for (int i = 0; i < list.size(); i++) {\n // System.out.println(list.get(i));\n // }\n\n list.add(4, 100);\n\n list.add(0, 200);\n list.add(0, 300);\n list.add(0, 400);\n list.add(0, 500);\n\n for (int i = 0; i < list.size(); i++) {\n System.out.println(list.get(i));\n }\n\n list.remove(0);\n list.remove(0);\n list.remove(2);\n\n list.remove();\n list.remove();\n for (int i = 0; i < list.size(); i++) {\n System.out.print(list.get(i) + \" \");\n }\n System.out.println();\n }",
"private void exercise1() {\n final List<String> list = asList(\n \"The\", \"Quick\", \"BROWN\", \"Fox\", \"Jumped\", \"Over\", \"The\", \"LAZY\", \"DOG\");\n\n final List<String> lowerList = list.stream()\n .map(String::toLowerCase)\n .peek(System.out::println)\n .collect(toList());\n }",
"public List<Appointment> getAppointmentByStatus(AppointmentStatus a){\n List<Appointment> appList = new ArrayList();\n try{\n appointments.stream().filter((app) -> (app.getStatus()==a)).forEachOrdered((app) -> {\n appList.add(app);\n });\n return appList;\n }\n catch(Exception e){\n return appList;\n }\n }",
"@Test\n public void when1To49ThenB() {\n Student a = new Student(49);\n Student b = new Student(50);\n Student c = new Student(102);\n Student d = new Student(0);\n Student e = new Student(140);\n Predicate<Student> predicate = s -> s.getScore() > 0 && s.getScore() < 50;\n List<Student> expected = List.of(a, c, e);\n List<Student> students = List.of(a, b, c, d, e);\n List<Student> result = new School().collect(students, predicate);\n assertThat(result, equalTo(expected));\n }",
"public static void main(String[] args) {\n Consumer<Integer> consumer = x ->{\n System.out.println(\"Number is :\"+x);\n };\n consumer.accept(55);\n //Supplier\n Supplier<String> str = () -> \"Implementation of Supplier \";\n System.out.println(str.get());\n //Predicate\n int a=37;\n Predicate<Integer> isOddPredicate = x -> x%2 != 0;\n System.out.println(\"Is \"+a+\" Odd Number :\"+isOddPredicate.test(a));\n //Function\n int b=7;\n Function<Integer,Integer> squareFunction = x -> x*x;\n System.out.println(\"Square of \"+b+\" is \"+squareFunction.apply(b));\n\n //Example\n List<Integer> list = List.of(12,9,13,4,6,2,4);\n Consumer<Integer> con = System.out::println;\n System.out.println(\"Example(Square of odd no.) : \");\n list.stream()\n .filter(isOddPredicate)\n .map(squareFunction)\n .forEach(con);\n\n\n\n }",
"List<Status> mo9947a();",
"@Test\r\n void multiLevelFilter() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().filter(t -> t.getType() == Transaction.GROCERY).filter(t -> \"r3\".equals(t.getValue()));\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong value\", \"r3\", afterStreamList.get(0).getValue());\r\n }",
"public static void main(String[] args) {\n\t\tPredicate<Integer> fun1= x-> x>5;\r\n\t\tSystem.out.println(fun1.test(5));\r\n\t\t\r\n\t\tPredicate<String> fun2 = x-> x.isEmpty();\r\n\t\tSystem.out.println(fun2.test(\"\"));\r\n\t\t\r\n\t\tList<Integer> numbers = Arrays.asList(1,2,3,4,6,5,7,8,0);\r\n\t\tSystem.out.println(numbers.stream().filter(fun1).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with and\r\n\t\tSystem.out.println(numbers.stream().filter(x-> x>5 && x<8).collect(Collectors.toList()));\r\n\t\t\r\n\t\t//predicate with negate\r\n\t\tList<String> names = Arrays.asList(\"Nayeem\", \"John\", \"SDET\");\r\n\t\tPredicate<String> fun3 = x -> x.contains(\"e\");\r\n\t\tSystem.out.println(names.stream().filter(fun3.negate()).collect(Collectors.toList()));\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tList<Integer> numberList = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10);\r\n\t\t\t\t\r\n\t\t//Stampa il doppio di ogni numero\r\n\t\tSystem.out.println(\"Stampa il doppio di ogni numero\");\r\n\t\tnumberList.forEach((i)-> System.out.print(numberList.get(i-1)*2+ \" \"));\r\n\t\t\r\n\t\t//Recupera lo stream a partire dalla lista\r\n\t\tStream<Integer> streamInt = numberList.stream();\r\n\t\tSystem.out.println(\"\");\r\n\t\t//Stampa il quadrato di ogni numero\r\n\t\tSystem.out.println(\"Stampa il quadrato di ogni numero\");\r\n\t\tstreamInt.forEach((p)->System.out.print(p*p +\" \"));\r\n\t\t\r\n\t\t//Stampa i numeri Dispari\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Stampa i numeri Dispari\");\t\t\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach(System.out::print); \t\t\r\n\t\tSystem.out.println(\"\");\r\n\t\tnumberList.stream().filter(n -> n % 2 != 0).forEach((n)->System.out.print(n));\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tList<String> stringList = Arrays.asList(\"a1\", \"c6\", \"a2\", \"b1\", \"c2\", \"c1\", \"c5\", \"c3\");\r\n\t\tstringList.stream().filter(s -> s.startsWith(\"c\")).map(String::toUpperCase).sorted().forEach(System.out::println);\r\n\t\t\t\t\r\n\t\t//Stampa le donne della mia famiglia\r\n\t\tMyFamily myFamily = new MyFamily();\r\n\t\tSystem.out.println(\"Stampa le donne della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Stampa gli uomini della mia famiglia\r\n\t\tSystem.out.println(\"Stampa gli uomini della mia famiglia\");\r\n\t\tmyFamily.getMyFamily().stream().filter((p)->!p.isFemale()).forEach((p)->System.out.println(p));\r\n\t\t\r\n\t\t//Calcola la somma dell'eta dei maschi della mia famiglia\r\n\t\tInteger anniMaschi = myFamily.getMyFamily().stream().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\r\n\t\t\r\n\t\t//These reduction operations can run safely in parallel with almost no modification:\r\n\t\tInteger anniMaschi2 = myFamily.getMyFamily().stream().parallel().filter((p)->!p.isFemale()).map((p)->p.getEta()).reduce(0, Integer::sum);\t\t\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi);\r\n\t\tSystem.out.println(\"Anni Totali dei maschi...\" + anniMaschi2);\r\n\r\n\t\t\r\n\t}",
"public static void main(String[] args)\n {\n Employee[] employees = {\n new Employee(\"Jason\", \"Red\", 5000, \"IT\"),\n new Employee(\"Ashley\", \"Green\", 7600, \"IT\"),\n new Employee(\"Matthew\", \"Indigo\", 3587.5, \"Sales\"),\n new Employee(\"James\", \"Indigo\", 4700.77, \"Marketing\"),\n new Employee(\"Luke\", \"Indigo\", 6200, \"IT\"),\n new Employee(\"Jason\", \"Blue\", 3200, \"Sales\"),\n new Employee(\"Wendy\", \"Brown\", 4236.4, \"Marketing\")};\n\n // get List view of the Employees\n List<Employee> list = Arrays.asList(employees);\n\n // display all Employees\n System.out.println(\"Complete Employee list:\");\n list.stream().forEach(System.out::println); // A method reference.\n \n List<Employee> list2 = Arrays.asList(employees);\n Collections.sort(list2, new myEmployeeComparator());\n\n //display all Employees\n System.out.println(\"\\nComplete Employee list Ordered:\");\n list2.stream().forEach(System.out::println); // A method reference.\n \n //Predicate (boolean-valued function) that returns true for salaries \n //in the range $4000-$6000\n Predicate<Employee> fourToSixThousand = \n e -> (e.getSalary() >= 4000 && e.getSalary() <= 6000);\n\n //Display Employees with salaries in the range $4000-$6000\n // sorted into ascending order by salary\n System.out.printf(\n \"%nEmployees earning $4000-$6000 per month sorted by salary:%n\");\n\n list.stream()\n .filter(fourToSixThousand)\n .sorted(Comparator.comparing(Employee::getSalary))\n .forEach(System.out::println);\n\n //Display first Employee with salary in the range $4000-$6000\n System.out.printf(\"%nFirst employee who earns $4000-$6000:%n%s%n\",\n list.stream()\n .filter(fourToSixThousand)\n .findFirst()\n .get());\n\n // Functions for getting first and last names from an Employee\n Function<Employee, String> byFirstName = Employee::getFirstName;\n Function<Employee, String> byLastName = Employee::getLastName;\n\n //Comparator for comparing Employees by first name then last name\n Comparator<Employee> lastThenFirst = \n Comparator.comparing(byLastName).thenComparing(byFirstName);\n\n // sort employees by last name, then first name \n System.out.printf(\n \"%nEmployees in ascending order by last name then first:%n\");\n list.stream()\n .sorted(lastThenFirst)\n .forEach(System.out::println);\n\n //sort employees in descending order by last name, then first name\n System.out.printf(\n \"%nEmployees in descending order by last name then first:%n\");\n list.stream()\n .sorted(lastThenFirst.reversed())\n .forEach(System.out::println);\n\n //display unique employee last names sorted\n System.out.printf(\"%nUnique employee last names:%n\");\n list.stream()\n .map(Employee::getLastName)\n .distinct()\n .sorted()\n .forEach(System.out::println);\n\n //display only first and last names\n System.out.printf(\n \"%nEmployee names in order by last name then first nameX:%n\"); \n list.stream()\n .sorted(lastThenFirst)\n .map(Employee::getName)\n .forEach(System.out::println);\n\n //group Employees by department\n System.out.printf(\"%nEmployees by department:%n\"); \n Map<String, List<Employee>> groupedByDepartment =\n list.stream()\n .collect(Collectors.groupingBy(Employee::getDepartment));\n\n groupedByDepartment.forEach(\n (department, employeesInDepartment) -> \n {\n System.out.println(department);\n employeesInDepartment.forEach(\n employee -> System.out.printf(\" %s%n\", employee));\n }\n );\n System.out.printf(\"%nAverage salary by department:%n\"); \n \n groupedByDepartment.forEach(\n \t (department, employeesInDepartment) -> \n \t {\n \t System.out.println(department);\n \t System.out.printf(\" %.2f%n\",employeesInDepartment.stream().mapToDouble(Employee::getSalary).average().getAsDouble());\n \t \n \t }\n \t );\n \n System.out.printf(\"%nMax salary by department:%n\"); \n \n groupedByDepartment.forEach(\n \t (department, employeesInDepartment) -> \n \t {\n \t System.out.println(department);\n \t System.out.printf(\" %.2f%n\",employeesInDepartment.stream().mapToDouble(Employee::getSalary).max().getAsDouble());\n \t \n \t }\n \t );\n\n //count number of Employees in each department\n System.out.printf(\"%nCount of Employees by department:%n\"); \n\n Map<String, Long> employeeCountByDepartment =\n list.stream()\n .collect(Collectors.groupingBy(Employee::getDepartment, \n TreeMap::new, Collectors.counting()));\n\n employeeCountByDepartment.forEach(\n (department, count) -> System.out.printf(\n \"%s has %d employee(s)%n\", department, count));\n\n/* Output looks something like :\n\n HR 4\n IT 8\n Sales 12\n*/\n\n\n // sum of Employee salaries with DoubleStream sum method\n System.out.printf(\n \"%nSum of Employees' salaries (via sum method): %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .sum());\n\n //calculate sum of Employee salaries with Stream reduce method\n System.out.printf(\n \"Sum of Employees' salaries (via reduce method): %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .reduce(0, (value1, value2) -> value1 + value2)); \n\n //average of Employee salaries with DoubleStream average method\n System.out.printf(\"Average of Employees' salaries: %.2f%n\",\n list.stream()\n .mapToDouble(Employee::getSalary)\n .average()\n .getAsDouble()); \n \n System.out.printf(\"Number of Lastnames beginning with B %d\",\n \t list.stream()\n \t .map(Employee::getLastName)\n \t .filter(e->e.charAt(0)=='b' || e.charAt(0)=='B')\n \t .count()); \n \n \n System.out.printf(\"\\nList of Employees with lastname beginning with B %s\",\n \t list.stream()\n \t .map(Employee::getLastName)\n \t .filter(e->(e.charAt(0)=='b' || e.charAt(0)=='B'))\n \t .collect(Collectors.toList()\n \t \t\t )); \n \n List<Employee> lastbyB =\n \t list.stream()\n \t .filter(s -> s.getLastName().startsWith(\"B\")||s.getLastName().startsWith(\"b\"))\n \t .collect(Collectors.toList()) ;\n \n System.out.printf(\n \t \"\\nFirst and Lastname upper case \\n\\n\");\n \n \n list.stream()\n\t .filter(s -> s.getLastName().startsWith(\"B\"))\n .map(emp ->{ \n \t return \n \t\t\t new Employee(emp.getFirstName().toUpperCase(), \n \t\t emp.getLastName().toUpperCase(),emp.getSalary(),\n \t\t emp.getDepartment());\n \t })\n .forEach(System.out::println);\n \n System.out.printf(\n \t \"\\nLastname upper case \\n\\n\");\n \n \n\nlist.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t})\n.forEach(System.out::println);\n\nStream<Employee> mstr=list.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t//return new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\t});\nStream<Employee> mstr1=list.stream()\n.map(x-> {\n\tif(x.getLastName().startsWith(\"B\")) {\n\treturn new Employee(x.getFirstName(), x.getLastName().toUpperCase(),x.getSalary(),x.getDepartment());\n\t}else {\n\t\treturn new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\n\t}\n\t//return new Employee(x.getFirstName(), x.getLastName(),x.getSalary(),x.getDepartment());\n\t});\n\n\n\n\n\nSystem.out.println(\n \"\\nJoining in Employees \\n\\n\"+\nmstr\n.map( Employee::toString)\n.collect(Collectors.joining()));\n\nSystem.out.println(\n \"\\nJoining in Employees with separator\\n\\n\"+\nmstr1\n.map( Employee::toString)\n.collect(Collectors.joining(\"---\\n---\")));\n\n\n\n\nSystem.out.printf(\n \"\\nEmploying with Last Name starting with I, sorted and without duplicate upper case \\n\\n\");\n\nlist.stream()\n.filter(s -> s.getLastName().startsWith(\"I\")||s.getLastName().startsWith(\"i\"))\n.map(e->e.getLastName())\n.sorted()\n.distinct()\n.forEach(System.out::println);\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.map(e->e.getSalary()/list.size())\n.reduce(0.0, (x,y)->x+y)\n.doubleValue());\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.mapToDouble(Employee::getSalary)\n.average().getAsDouble());\n\nSystem.out.printf(\n \"\\nAverage of Salary %.1f\\n\",\nlist.stream()\n.collect(Collectors.averagingDouble(Employee::getSalary)));\n\nSystem.out.printf(\n \"\\nTotal of Salary %.1f\\n\",\nlist.stream()\n.map(e->e.getSalary())\n.reduce(0.0, (x,y)->x+y)\n.doubleValue());\n\nSystem.out.printf(\n \"\\nFirstname of All Employees\\n\\n\");\n\nlist.stream()\n.map(e->e.getFirstName())\n.forEach(System.out::println);\n\nSystem.out.printf(\n \"\\nInfinite even numbers print the 20 first\\n\\n\");\nIntStream \n\n.iterate(0, i -> i + 2)\n.limit(20)\n.forEach(System.out::println); \n\n \t \n \n }",
"private void collectUsingStream() {\n List<Person> persons =\n Arrays.asList(\n new Person(\"Max\", 18),\n new Person(\"Vicky\", 23),\n new Person(\"Ron\", 23),\n new Person(\"Harry\", 12));\n\n List<Person> filtered = persons\n .stream()\n .filter(p -> p.name.startsWith(\"H\"))\n .collect(Collectors.toList());\n\n System.out.println(\"collectUsingStream Filtered: \" + filtered);\n }",
"@Test\r\n void limitMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream().limit(2);\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", 2, afterStreamList.size());\r\n }",
"public static void main(String[] args) {\n ArrayList<Integer> list=new ArrayList<>();\n list.add(1);\n list.add(2);\n list.add(3);\n list.add(4);\n list.add(5);\n Util res=new Util(list).filter(new Gt(),2).filter(new Gt(),3).filter(new Gt(),4);\n res.dis();\n }",
"@Test\n public void streamApiTest(){\n Collection<Integer> myCollection=initializeIntCollection(3,5);\n\n long sumOfOddValues3times=myCollection.stream().\n filter(o -> o % 2 ==1). // for all odd numbers\n mapToInt(o -> o*3). // multiply their value on 3\n sum(); // and return their sum (reduce operation)\n Assert.assertEquals((3+5+7)*3, sumOfOddValues3times);\n\n Optional<Integer> sumOfModulesOn3= myCollection.stream().\n filter( o -> o % 3 ==0).\n reduce((sum, o) -> sum = sum + o);\n Assert.assertEquals(new Integer(3+6), sumOfModulesOn3.get());\n\n\n\n Collection<Integer> evenCollection=new ArrayList<>();\n myCollection.\n stream().\n filter(o -> o % 2 == 0).\n forEach((i) -> evenCollection.add(i));\n }",
"ObservableList<Deliverable> getFilteredDeliverableList();",
"public static void main(String[] args) {\n\t\tList<List<String>> activityList = Student.getListOfStudents().stream().map(Student::getActivities)\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(activityList);\n\n\t\t// Flat Map Demo\n\t\tList<String> activityList1 = Student.getListOfStudents().stream().map(Student::getActivities)\n\t\t\t\t.flatMap(List::stream).collect(Collectors.toList());\n\t\tSystem.out.println(activityList1);\n\n\t\t// Distinct element form stream\n\t\tList<String> distictActivityList = Student.getListOfStudents().stream().map(Student::getActivities)\n\t\t\t\t.flatMap(List::stream).distinct().collect(Collectors.toList());\n\t\tSystem.out.println(distictActivityList);\n\n\t\t// Count number of elements after manipulation\n\t\tlong activityCount = Student.getListOfStudents().stream().map(Student::getActivities).flatMap(List::stream)\n\t\t\t\t.distinct().count();\n\t\tSystem.out.println(\"Activity Count : \" + activityCount);\n\n\t\t// Comparator Traditional\n\t\tList<String> studentNameList = Student.getListOfStudents().stream().map(Student::getStudentName)\n\t\t\t\t.sorted((i1, i2) -> i1.compareTo(i2)).collect(Collectors.toList());\n\t\tSystem.out.println(studentNameList);\n\n\t\t// Comparator Using Stream\n\t\tList<String> studentNamecomparator = Student.getListOfStudents().stream()\n\t\t\t\t.sorted(Comparator.comparing(Student::getStudentName)).map(Student::getStudentName)\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(studentNamecomparator);\n\n\t\t// Comparator Using Stream\n\t\tList<String> studentNamecomparatorReverseOrder = Student.getListOfStudents().stream()\n\t\t\t\t.sorted(Comparator.comparing(Student::getStudentName).reversed()).map(Student::getStudentName)\n\t\t\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(studentNamecomparatorReverseOrder);\n\n\t}",
"@Test\n public void when50To69ThenB() {\n Student a = new Student(40);\n Student b = new Student(70);\n Student c = new Student(101);\n Student d = new Student(58);\n Student e = new Student(69);\n Predicate<Student> predicate = s -> s.getScore() >= 50 && s.getScore() < 70;\n List<Student> expected = List.of(d, e);\n List<Student> students = List.of(a, b, c, d, e);\n List<Student> result = new School().collect(students, predicate);\n assertThat(result, equalTo(expected));\n }",
"@Test\n public void testList(){\n ArrayList<Integer> integers = Lists.newArrayList(1, 2, 3, 4);\n ArrayList<Integer> integers2 = Lists.newArrayList(1, 2, 3, 4, 5);\n// integers2.removeAll(integers);\n// System.out.println(integers2);\n integers2.retainAll(integers);\n System.out.println(integers2);\n }",
"private void streamWithSimpleForEach() {\n List<String> myList = Arrays.asList(\"a1\", \"a2\", \"b1\", \"c2\", \"c1\");\n\n myList.stream()\n .filter(s -> s.startsWith(\"c\")).map(String::toUpperCase)\n .sorted()\n .forEach(System.out::println);\n }",
"List<E> list(Predicate<E> predicate);",
"public static void main(String[] args) {\n\t\tList<Employee> empList=new ArrayList<Employee>();\r\n\t\tempList.add(new Employee(1, \"Ranjit Kumar Patel\", \"[email protected]\", 25000));\r\n\t\tempList.add(new Employee(2, \"Benjamin Sobel\", \"[email protected]\", 30000));\r\n\t\tempList.add(new Employee(3, \"Joe George\", \"[email protected]\", 29000));\r\n\t\tempList.add(new Employee(4, \"Rajan Kumar Patel\", \"[email protected]\",15000));\r\n\t\tempList.add(new Employee(5, \"Ashwin Kumar Naik\", \"[email protected]\", 27000));\r\n\t\t\r\n\t\t/*for(Employee emp:empList) {\r\n\t\t\tif(emp.salary.equals(\"29000\")) {\r\n\t\t\t\tSystem.out.println(emp.salary);\r\n\t\t\t}\r\n\t\t}\r\n*/\t\r\n\r\n\t\tList<String> empSalary = (List<String>) empList.stream().filter(n -> n.name.startsWith(\"R\")).map(n -> n.name)\r\n\t\t\t\t.collect(Collectors.toList());\r\n\r\n\t\tSystem.out.println(empSalary);\r\n\r\n\t\tList<Integer> empIds = empList.stream().filter(f -> f.id % 2 == 0).map(f -> f.id).collect(Collectors.toList());\r\n\t\tSystem.out.println(empIds);\r\n\t\t\r\n\t\tList<Integer> empSals=empList.stream().filter(n->n.salary<30000).map(n->n.salary).collect(Collectors.toList()); \r\n\t\tSystem.out.println(empSals);\r\n\t}",
"public static void main(String[] args) {\n\t\tList<Employee> empList = new ArrayList<>();\r\n\t\tempList.add(new Employee(\"Rashim\", \"SDFSDFJLK\", 52));\r\n\t\tempList.add(new Employee(\"Amit\", \"JLKSDFJKLL79989\", 67));\r\n\t\tempList.add(new Employee(\"Ranjit\", \"ASDFJLKSJLF78676\", 45));\r\n\t\tempList.add(new Employee(\"Shymala\", \"SDFJLSJU8907\", 34));\r\n\t\t\r\n\t\t\r\n//\t\tfirst select only employees whose salary is greater than 50\r\n//\t\tand sort the employees based on their names (ignore case)\r\n//\t\tand print each employee of the stream.\r\n\t\tempList.stream().filter(emp -> emp.getSalary() > 50).sorted((e1, e2) -> e1.getName().compareToIgnoreCase(e2.getName())).forEach(emp -> System.out.println(emp));\r\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tList<Integer> list = Arrays.asList(1,5,8,9,8,5);\n\t\tConsumer<Integer> consumer = (index)-> System.out.println(list.get(index)*2);\n\t\tfilter(list, consumer);\n\t}",
"public void callLazystream()\n {\n\n Stream<String> stream = list.stream().filter(element -> {\n wasCalled();\n System.out.println(\"counter in intermediate operations:\" + counter);\n return element.contains(\"2\");\n });\n\n System.out.println(\"counter in intermediate operations:\" + counter);\n }",
"public static void findFirstMultipleOfSixViaStreams(List<Integer> numbers){\n\n int abc = 9;\n numbers.stream().filter(x -> {\n System.out.println(\"x = \" + x);\n return x % 6 == 0;\n }).map(x -> x + abc).findFirst();\n// Optional<Integer> firstSixMultiple = numbers.stream()\n// .filter(x -> {\n// System.out.println(\"x = \" + x);\n// return x % 6 == 0;\n// })\n// .findFirst();\n\n// int ans = firstSixMultiple.orElse(-1);\n\n// System.out.println(ans);\n }",
"@Test\r\n\tvoid mapMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\tStream<Integer> streamInteger = transactionBeanStream.peek(System.out::println).map(TransactionBean::getId);\r\n\t\tList<Integer> afterStreamList = streamInteger.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong value\", 1, afterStreamList.get(0).intValue());\r\n\t\tassertSame(\"wrong value\", 2, afterStreamList.get(1).intValue());\r\n\t\tassertSame(\"wrong value\", 3, afterStreamList.get(2).intValue());\r\n\t}",
"public static void main(String... args) {\n\n Person p1 = new Person(\"Mike\", 25);\n Person p2 = new Person(\"John\", 33);\n Person p3 = new Person(\"Slavek\", 48);\n Person p4 = new Person(\"Pawel\", 15);\n Person p5 = new Person(\"MJerry\", 66);\n Person p6 = new Person(\"White\", 35);\n\n List<Person>list = new ArrayList<>(Arrays.asList(p1,p2,p3,p4,p5,p6));\n\n list.forEach(System.out::println);\n list.removeIf(ps->ps.getAge()<25);\n System.out.println(\"after removal\");\n list.forEach(System.out::println);\n System.out.println(\"Trasformation\");\n list.replaceAll(p->new Person(p.getName().toUpperCase(),p.getAge()-5));\n System.out.println(\"After replacement\");\n list.forEach(System.out::println);\n list.sort((s1,s2)->s1.getAge()-s2.getAge());\n System.out.println(\"after sorting\");\n list.forEach(System.out::println);\n list.sort((s1,s2)->s1.getAge()-s2.getAge());\n list.sort(Comparator.comparing(Person::getAge));\n list.sort(Comparator.comparing(Person::getName).reversed());\n\n List<String >sd = Arrays.asList(\"okkok\");\n sd.stream().map(value-> {\n char ss = value.toUpperCase().charAt(0);\n return ss;\n }\n );\n sd.forEach(System.out::println);\n\n\n\n\n }",
"public static void main (String args [ ] ) {\r\n\t\r\n\tList<String> colors = Arrays.asList(\"red\", \"green\", \"yellow\");\r\n\t \r\n\tPredicate<String> test = n -> {\r\n\t \r\n\tSystem.out.println(\"Searching…\");\r\n\t \r\n\treturn n.contains(\"red\");\r\n\t \r\n\t};\r\n\t \r\n\tcolors.stream()\r\n\t \r\n\t.filter(c -> c.length() > 3).peek(System.out::println\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t)\r\n\t \r\n\t.allMatch(test);\r\n \r\n}",
"public static void main(String[] args) {\n System.out.println(oddFilter(Arrays.asList(1, 2, 3, 4, 5)));\n // should print [1, 3, 5]\n }",
"private static void testStreamFormList() {\n\n Integer[] ids = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20};\n\n/*\n Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .collect(Collectors.toList())\n .forEach(System.out::println);\n*/\n/*\n Random r = new Random();\n Integer integer = Stream.of(ids)\n .filter(i -> i % 2 == 0)\n .filter(i -> i % 3 == 0)\n .filter(i -> i % 5 == 0)\n .findFirst()\n// .orElse(0);\n .orElseGet(()->r.nextInt());\n System.out.println(integer);\n*/\n Stream.of(ids)\n .filter(i -> i % 2 == 0)\n .filter(i -> i % 3 == 0)\n .skip(2)\n .limit(1)\n .forEach(System.out::println);\n\n/*\n Optional<Employee2> first = Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .findFirst();\n System.out.println(first);\n*/\n/*\n OptionalDouble average = Stream.of(ids)\n .map(StreamsOverviewMain::findById)\n .filter(Objects::nonNull)\n .mapToInt(Employee2::getSalary)\n .average();\n System.out.println(average);\n*/\n\n List<List<Employee2>> departments = new ArrayList<>();\n departments.add(employeeList);\n departments.add(secondList);\n\n/*\n departments.stream().flatMap(l -> l.stream()\n .map(e -> e.getFirstName())).forEach(System.out::println);\n*/\n\n/*\n Stream.of(ids).map(e -> String.format(\"%,3d\", e)).forEach(System.out::print);\n System.out.println();\n Stream.of(ids)\n// .peek(e -> e = e * 2)\n .map(e -> String.format(\"%,3d\", e * 2))\n .forEach(System.out::print);\n System.out.println();\n*/\n/*\n Consumer<Integer> c = e -> e = e * 2;\n Stream.of(ids).forEach(c);\n System.out.println(c);\n*/\n }",
"public static void runExercise3() {\n students.stream().filter(student -> student.getAge() > 22).limit(5).forEach(y -> System.out.println(y.getName() + \" \" + y.getAge()));\n }",
"public static void minSevenEvenEl(List<Integer> list){\n int min = list.stream().filter(t->(t>7 && t%2==0)).reduce(Integer.MAX_VALUE, Math::min);\n System.out.println(min);\n }",
"public static void main(String[] args) {\n BiFunction<String, Integer, Usuario> factory = Usuario::new;\n Usuario user1 = factory.apply(\"Henrique Schumaker\", 50);\n Usuario user2 = factory.apply(\"Humberto Schumaker\", 120);\n Usuario user3 = factory.apply(\"Hugo Schumaker\", 190);\n Usuario user4 = factory.apply(\"Hudson Schumaker\", 10);\n Usuario user5 = factory.apply(\"Gabriel Schumaker\", 90);\n Usuario user6 = factory.apply(\"Nikolas Schumaker\", 290);\n Usuario user7 = factory.apply(\"Elisabeth Schumaker\", 195);\n Usuario user8 = factory.apply(\"Eliza Schumaker\", 1000);\n Usuario user9 = factory.apply(\"Marcos Schumaker\", 100);\n Usuario user10 = factory.apply(\"Wilson Schumaker\", 1300);\n \n List<Usuario> usuarios = Arrays.asList(user1, user2, user3, user4, user5,\n user6, user7, user8, user9, user10);\n \n //filtra usuarios com + de 100 pontos\n usuarios.stream().filter(u -> u.getPontos() >100);\n \n //imprime todos\n usuarios.forEach(System.out::println);\n \n /*\n Por que na saída apareceu todos, sendo que eles não tem mais de 100 pontos? \n Ele não aplicou o ltro na lista de usuários! Isso porque o método filter, assim como os \n demais métodos da interface Stream, não alteram os elementos do stream original! É muito \n importante saber que o Stream não tem efeito colateral sobre a coleção que o originou.\n */\n }",
"public static void main(String[] args){\n\t\tSystem.out.println(\"/***Java 8 stream Implementation sorting and filtering ***/\");\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to List*/\");\n\t\tList<Person> streamEx = new ArrayList<Person>();\n\t\tstreamEx.add(new Person(\"Ramu\",12));\n\t\tstreamEx.add(new Person(\"Agil\",52));\n\t\tstreamEx.add(new Person(\"Murali\",17));\n\t\tstreamEx.add(new Person(\"Hari\",17));\n\t\tstreamEx.add(new Person(\"Kalai\",45));\n\t\tstreamEx.add(new Person(\"George\",78));\n\t\tList<String> sortedNames = streamEx\n\t\t.stream().filter(s -> s.getAge() > 18)\n\t\t//.sorted(PERSON_SORT_BY_NAME) // Soreted using Comparator instance already created\n\t\t.sorted((p1,p2)->p1.getAge().compareTo(p2.getAge())) // Defining the Comparator here itself\n\t\t.map(Person::getName)\n\t\t.collect(Collectors.toList());\n\t\tSystem.out.println(sortedNames);\n\t\t\n\t\t// Retriving the first person of the criteria being met\n\t\tOptional<Person> firstPerson = streamEx\n\t\t\t\t\t\t\t\t\t\t.stream()\n\t\t\t\t\t\t\t\t\t\t//.sorted(PERSON_SORT_BY_AGE.reversed()) // Reverse sorting\n\t\t\t\t\t\t\t\t\t\t.sorted(PERSON_SORT_BY_AGE)\n\t\t\t\t\t\t\t\t\t\t.findFirst();\n\t\tSystem.out.println(\"Person with Minimum Age :: \"+firstPerson.get());\n\t\t\n\t\t//Mutiple Sorting conditions\n\t\tSystem.out.println(\"/*\\n*Mutiple Sorting conditions \\n*1.Age\\n*2.Name\\n*/\");\n\t\tstreamEx\n\t\t.stream()\n\t\t.sorted(PERSON_SORT_BY_AGE.thenComparing(PERSON_SORT_BY_NAME))\n\t\t.forEach(e -> System.out.println(e));\n\t\t\n\t\tSystem.out.println(\"/*Stream Implementation sorting and filtering to Map*/\");\n\t\tMap<String,Integer> sortedMap = streamEx\n\t\t.stream()\n\t\t.collect(Collectors.toMap(Person::getName,Person::getAge));\n\t\tSystem.out.println(sortedMap);\n\t\t\n\t\t//Limiting Records\n\t\tSystem.out.println(\"/** Limiting Records **/\");\n\t\tstreamEx\n\t\t.stream()\n\t\t.sorted(PERSON_SORT_BY_NAME)\n\t\t.filter(s -> s.getAge() < 18)\n\t\t.limit(2)\n\t\t.forEach(e -> System.out.println(e));\n\t\t\n\t\tprintMethodName();\n\t\n\t}",
"public static void main(String[] args) {\n\r\n\t\tList<Evento> arrayList = new ArrayList<Evento>();\r\n\r\n\t\tarrayList.add(new Evento(1, \"Event 1\", \"Musical\", 3));\r\n\t\tarrayList.add(new Evento(2, \"Event 2\", \"Sport\", 5));\r\n\t\tarrayList.add(new Evento(3, \"Event 3\", \"Sport\", 10));\r\n\t\tarrayList.add(new Evento(4, \"Event 4\", \"Cultutal\", 34));\r\n\t\tarrayList.add(new Evento(5, \"Event 5\", \"Sport\", 56));\r\n\r\n\t\t// Ejercicio 1\r\n\t\tSystem.out.println(\"Listado de todos los miembros: \");\r\n\t\tarrayList.stream().forEach(e -> System.out.println(e.getNombre()));\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 2\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Listado de todos los miembros que son de tipo \\\"sport\\\": \");\r\n\t\tarrayList.stream().filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.forEach(e -> System.out.println(e.getNombre()));\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 3\r\n\t\tSystem.out.println(\"Suma de los asientos libres de \\\"sport\\\": \");\r\n\t\tSystem.out.println(arrayList.stream()\r\n\t\t\t\t.filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.mapToInt(e -> e.getSeatsAvailable()).sum());\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 4\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Listado de todos los IDs que son de tipo \\\"sport\\\": \");\r\n\t\tarrayList.stream().filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.map(e -> e.getId()).forEach(System.out::println);\r\n\t\tSystem.out.println();\r\n\r\n\t\t// Ejercicio 5\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"Listado de todos los IDs que son de tipo \\\"sport\\\" invertidos: \");\r\n\t\tarrayList.stream().filter(list -> list.getType().equals(\"Sport\"))\r\n\t\t\t\t.sorted(new ComparatorEventoNombreDecreciente())\r\n\t\t\t\t.map(e -> e.getId()).forEach(System.out::println);\r\n\r\n\t}",
"public static <T> List<T> filter(List<T> list, Predicate<T> p) {\n\t\tList<T> result = new ArrayList<>();\n\t\tfor (T t : list) {\n\t\t\tif (p.test(t)) {\n\t\t\t\tresult.add(t);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"@Test\n public void when70To100ThenA() {\n Student a = new Student(40);\n Student b = new Student(70);\n Student c = new Student(101);\n Student d = new Student(100);\n Student e = new Student(86);\n Predicate<Student> predicate = s -> s.getScore() >= 70 && s.getScore() <= 100;\n List<Student> expected = List.of(b, d, e);\n List<Student> students = List.of(a, b, c, d, e);\n List<Student> result = new School().collect(students, predicate);\n assertThat(result, equalTo(expected));\n }",
"public static void main(String[] args){\n List<String> list = Arrays.asList(\"a\",\"2\",\"3\",\"4\",\"5\");\n //List l1 = Lists.newArrayList();\n //list.stream().map(a->\"map\"+a).forEach(System.out::println);\n Stream lines = list.stream();\n lines.flatMap(line->Arrays.stream(line.toString().split(\"\"))).distinct().count();\n\n\n }",
"public static void main(String[] args) {\n\n\n List<Stock> listOfStock = Arrays.asList(new Stock(\"ICICI\", 10), new Stock(\"ICICI\", 30), new Stock(\"SBI\", 60), new Stock(\"SBI\", 30));\n\n ///Map<String, Integer> collect = listOfStock.stream().collect(Collectors.toMap(Stock::getName , stock -> stock.getValue(), Stock::getValue ));\n //System.out.println(collect);\n\n\n List<Integer> integerList = Arrays.asList(1, 2, 35, 32, 34);\n\n Integer integer = integerList.stream().filter(i -> i <\n integerList.stream().mapToInt(j -> j).max().getAsInt()).max(Comparator.naturalOrder()).get();\n System.out.println(integer);\n\n\n // Output : {ICICI=40, SBI=90}\n }",
"public static void main(String args[]) \n {\n Consumer<List<Integer> > modify = list -> \n { \n for (int i = 0; i < list.size(); i++) \n list.set(i, 5 * list.get(i));\n };\n \n Consumer<List<Integer> > square = list ->\n { \n for (int i = 0; i < list.size(); i++)\n \tlist\n .set(i,(int) Math.pow(list.get(i), 2));\n };\n \n // Consumer to display a list of integers \n Consumer<List<Integer> > \n dispList = list ->\n list.stream().\n forEach(a -> System.out.print(a + \" \"));\n \n List<Integer> list = new ArrayList<Integer>(); \n list.add(2); \n list.add(1); \n list.add(3); \n \n // using addThen() \n modify\n .andThen(square)\n .andThen(dispList)\n .accept(list);\n }",
"@Test\n public void squareNumbers_passListOfNumbers_returnListSquareOfNumbers() {\n List<Integer> output = Java8Streams.squareNumbers(new ArrayList<>(Arrays.asList(1, 2, 3, 4, 5)));\n assertThat(output).isEqualTo(new ArrayList<>(Arrays.asList(1, 4, 9, 16, 25)));\n }",
"private void printExpectedList() {\n expectedList.stream().forEach((Integer i) -> {\n System.out.print(i + \" \");\n });\n System.out.println(\"\");\n }",
"public static void printListGreaterThan(List<Integer> intList, int max) {\n intList.stream()\n .filter(greaterThanN(max))\n .forEach(System.out::println);\n\n return;\n }",
"static void disList(List<Integer> list) {\n\t\tConsumer<List<Integer>> disList = (l) -> l.forEach(a -> System.out.println(a));\n\t\tdisList.accept(list);\n\t}",
"List<Object> lessThanOrEqualsTo(Object value);",
"public static List<Student> filterExample(){\n\t\tList<Student> genderFilter = StudentDataBase.getAllStudents().stream()\n\t\t\t\t.filter(stu->stu.getGender().equals(\"female\")).collect(Collectors.toList());\n\t\treturn genderFilter;\n\t}",
"public static void main(String[] args) {\n\t\tArrayList<Piloto> lst = new ArrayList <Piloto>();\r\n\t\tEvaluador evaluador = new Evaluador(lst);\r\n\t\t\r\n\t\tlst.add(new Piloto(\"Jorge\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Nicolas\", \"Perez\", true, 10 ));\r\n\t\tlst.add(new Piloto(\"Santiago\", \"Freire\", false, 0 ));\r\n\t\tlst.add(new Piloto(\"Ana\", \"Gutierrez\", false, 1 ));\r\n\t\tlst.add(new Piloto(\"Victoria\", \"Gutierrez\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Julia\", \"Freire\", true, 0 ));\r\n\t\tlst.add(new Piloto(\"Carlos\", \"Gutierrez\", true, 1 ));\r\n\t\t\r\n /*\r\n\t\t//le gusta volar y no tiene choques \r\n\t\tfor (Piloto p : evaluador.leGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n */\r\n \r\n\t\t//le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.leGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(true, true)) {\r\n System.out.println(p);\r\n }\r\n \r\n for (Piloto p : evaluador.obtenerTodosPeroParametrizar(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))) {\r\n System.out.println(p);\r\n }\r\n \r\n lst.stream()\r\n .filter(p -> (p.leGustaVolar && p.cantidadDeChoques > 0))\r\n .filter(p -> p.cantidadDeChoques == 10)\r\n .forEach(x -> System.out.println(x));\r\n \r\n\t\t\r\n /*\r\n\t\t//no le gusta volar y no tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarNoTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t\r\n\t\t//no le gusta volar y tiene choques\r\n\t\tfor (Piloto p : evaluador.noLeGustaVolarTieneChoques()) {\r\n System.out.println(p);\r\n }\r\n\t\t*/\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\t\tList<String> lines = Arrays.asList(\"spring\", \"node\", \"mkyong\");\r\n\r\n List<String> result = lines.stream() // convert list to stream\r\n .filter(line -> !\"mkyong\".equals(line)) // we dont like mkyong\r\n .collect(Collectors.toList()); // collect the output and convert streams to a List\r\n\r\n result.forEach(System.out::println); //output : spring, node\r\n \r\n \r\n \r\n \r\n //Streams filter(), findAny() and orElse()\r\n List<Person> persons = Arrays.asList(\r\n new Person(\"mkyong\", 30),\r\n new Person(\"jack\", 20),\r\n new Person(\"lawrence\", 40)\r\n );\r\n\r\n Person result1 = persons.stream() // Convert to steam\r\n .filter(x -> \"jack\".equals(x.getName())) // we want \"jack\" only\r\n .findAny() // If 'findAny' then return found\r\n .orElse(null); // If not found, return null\r\n\r\n System.out.println(result1);\r\n \r\n \r\n \r\n \r\n //A List of Strings to Uppercase\r\n List<String> alpha = Arrays.asList(\"a\", \"b\", \"c\", \"d\");\r\n // Java 8\r\n List<String> collect = alpha.stream().map(String::toUpperCase).collect(Collectors.toList());\r\n System.out.println(collect); //[A, B, C, D]\r\n\r\n\t}",
"@Test\n public void streamsExample() {\n List<Integer> list = asList(1, 2, 3, 4, 5);\n \n list.stream().forEach(out::println);\n \n out.println();\n \n list.stream().parallel().forEachOrdered(out::println);\n \n \n }",
"public static void main(String[] args) {\n // Create a list of Strings.\n ArrayList<String> myList = new ArrayList<>();\n myList.add(\"Alpha\");\n myList.add(\"Beta\");\n myList.add(\"Gamma\");\n myList.add(\"Delta\");\n myList.add(\"Phi\");\n myList.add(\"Omega\");\n // Obtain a Stream to the array list.\n\n Stream<String> myStream = myList.stream();\n // Obtain an iterator to the stream.\n Iterator<String> itr = myStream.iterator();\n // Iterate the elements in the stream.\n while (itr.hasNext())\n System.out.println(itr.next());\n\n }",
"private static List<StudentRecord> vratiListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t.filter(o -> o.getOcjena() == 5)\n\t\t\t\t.collect(Collectors.toList());\n\t}",
"public void filterMapExample() {\n List<String> result = createPeople()\n .stream()\n .filter(predicate)\n .map(Person::getName)\n .map(String::toUpperCase)\n .collect(Collectors.toUnmodifiableList());\n print.accept(result);\n }",
"public static <T> List<T> filterList(List<T> list, Predicate<T> p) {\n\t\tList<T> result = new ArrayList<T>();\n\t\t\n\t\tfor (T t : list) {\n\t\t\tif (p.test(t)) {\n\t\t\t\tresult.add(t);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private static void predicate(List<Product> productsList) {\n\t\tStream<Product> peek = productsList.stream().peek(System.out::println);\n\t\t\n\t\t//consume\n\t\tboolean allMatch = peek.allMatch(x -> x.price > 24000);\n\t\tSystem.out.println(\"All items price is more than 24000?: \" + allMatch);\n\t\t\n\t\t//consume\n\t\tboolean anyMatch = productsList.stream().anyMatch(x -> x.price < 25000);\n\t\tSystem.out.println(\"Any item is less than 25000?: \" + anyMatch);\n\n\t\t//process\n\t\tStream<Product> filteredStream = productsList.stream().filter(p -> p.price > 28000);\n\t\tfilteredStream.forEach(z -> {\n\t\t\tSystem.out.println(\"Item: \" + z.name + \" Price: \" + z.price);\n\t\t});\n\t\t\n\t\t\n\t\t//productsList.stream().\n\t\t\n\t}",
"private static List<StudentRecord> vratiListuOdlikasa(List<StudentRecord> records) {\n\t\treturn records.stream()\n\t\t\t\t\t\t.filter(s -> s.getGrade() == 5)\n\t\t\t\t\t\t.collect(Collectors.toList());\n\t}",
"public static void main(String[] args) {\n\t\tList list = new ArrayList();\n\t\tfor (int i = 1; i <= 100; i++) {\n\t\t\tlist.add(i);\n\t\t}\n\t\tlist.remove(10);\n\t\tIterator it=list.iterator();\n\t\twhile(it.hasNext()) {\n\t\t\tSystem.out.println(it.next());\n\t\t}\n\t}",
"abstract List<String> filterByStartingWithA();",
"public static void main(String[] args) \r\n{\n\tList<Integer> numbers = Arrays.asList(3, 2, 2, 3, 7, 3, 5);\r\n\r\n\t//get list of unique squares\r\n\tList<Integer> squaresList = numbers.stream().map( i -> i*i).distinct().collect(Collectors.toList());\r\n\tSystem.out.println(squaresList);\r\n//\tList<String>strings = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\",\"\", \"jkl\");\r\n//\r\n//\t//get count of empty string\r\n////\tlong count = strings.stream().filter(string -> string.isEmpty()).count();\r\n////\tSystem.out.println(count);\r\n//\tList<String>strings1 = Arrays.asList(\"abc\", \"\", \"bc\", \"efg\", \"abcd\",\"\", \"jkl\");\r\n//\tList<String> filtered = strings1.stream().filter(string -> !string.isEmpty()).collect(Collectors.toList());\r\n//\r\n//\tSystem.out.println(\"Filtered List: \" + filtered);\r\n//\tString mergedString = strings1.stream().filter(string -> !string.isEmpty()).collect(Collectors.joining());\r\n//\tSystem.out.println(\"Merged String: \" + mergedString);\r\n//}\r\n}",
"@Test\n public void test5(){\n List<Employee> list= fileEmployee(employees, new MyPredicate<Employee>() {\n @Override\n public boolean test(Employee employee) {\n return employee.getSalary()<=5000;\n }\n });\n for (Employee e : list){\n System.out.println(e);\n }\n }",
"@Test\r\n void convertStreamBean2ListMethod() {\r\n\t\tStream<TransactionBean> transactionBeanStream = transactions.stream();\r\n\t\tList<TransactionBean> afterStreamList = transactionBeanStream.peek(System.out::println).collect(Collectors.toCollection(ArrayList::new));\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(0).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.Test, afterStreamList.get(1).getType());\r\n\t\tassertSame(\"wrong type\", Transaction.GROCERY, afterStreamList.get(2).getType());\r\n }",
"public static void main(String[] args) {\n String[] animals = {\"Cat\", \"Dog\", \"Dog\", \"Bird\", \"Fish\", \"Cat\"};\n\n ArrayList<String> animalsList = new ArrayList<>(Arrays.asList(animals));\n System.out.println(animalsList);\n\n /*\n Remove Cat elements and print your ArrayList again\n\n EXPECTED RESULT:\n [Dog, Bird, Fish]\n */\n\n System.out.println(\"\\n---Removing-Cat-1st way creating a new list---\\n\");\n ArrayList<String> animalsWithoutCats = new ArrayList<>(); // empty at this line\n\n for(String element: animalsList){\n if(!element.equalsIgnoreCase(\"cat\")) animalsWithoutCats.add(element);\n }\n\n System.out.println(\"List after removing cats = \" + animalsWithoutCats);\n\n\n System.out.println(\"\\n---Removing-Dog-2nd way using iterator---\\n\");\n\n Iterator<String> myIterator = animalsList.iterator();\n\n while(myIterator.hasNext()){\n if(myIterator.next().equalsIgnoreCase(\"dog\")) myIterator.remove();\n }\n\n System.out.println(\"List after removing dogs = \" + animalsList);\n }",
"public static void minEl1(List<Integer> list){\n int min = list.stream().reduce(Integer.MAX_VALUE, (x,y)->x<y ? x : y);\n System.out.println(min);\n }",
"public static void main(String args[]) \r\n {\n List<Integer> number = Arrays.asList(2,3,4,5); \r\n \r\n // demonstration of map method \r\n List<Integer> square = number.stream().map(x -> x*x). \r\n collect(Collectors.toList()); \r\n System.out.println(\"Square od number using map()\"+square); \r\n \r\n // create a list of String \r\n List<String> names = \r\n Arrays.asList(\"Reflection\",\"Collection\",\"Stream\"); \r\n \r\n // demonstration of filter method \r\n List<String> result = names.stream().filter(s->s.startsWith(\"S\")). \r\n collect(Collectors.toList()); \r\n System.out.println(result); \r\n \r\n // demonstration of sorted method \r\n List<String> show = \r\n names.stream().sorted().collect(Collectors.toList()); \r\n System.out.println(show); \r\n \r\n // create a list of integers \r\n List<Integer> numbers = Arrays.asList(2,3,4,5,2); \r\n \r\n // collect method returns a set \r\n Set<Integer> squareSet = \r\n numbers.stream().map(x->x*x).collect(Collectors.toSet()); \r\n System.out.println(squareSet); \r\n \r\n // demonstration of forEach method \r\n number.stream().map(x->x*x).forEach(y->System.out.println(y)); \r\n \r\n // demonstration of reduce method \r\n int even = \r\n number.stream().filter(x->x%2==0).reduce(0,(ans,i)-> ans+i); \r\n \r\n System.out.println(even); \r\n \r\n // Create a String with no repeated keys \r\n Stream<String[]> \r\n str = Stream \r\n .of(new String[][] { { \"GFG\", \"GeeksForGeeks\" }, \r\n { \"g\", \"geeks\" }, \r\n { \"G\", \"Geeks\" } }); \r\n\r\n // Convert the String to Map \r\n // using toMap() method \r\n Map<String, String> \r\n map = str.collect( \r\n Collectors.toMap(p -> p[0], p -> p[1])); \r\n\r\n // Print the returned Map \r\n System.out.println(\"Map:\" + map); \r\n }",
"public static void main(String[] args) {\n\t\tStream<Integer> intStream = Stream.of(1, 2, 3, 4);\n\t\t// intStream.forEach(System.out::println);\n\n\t\t/*\n\t\t * Approach 2 of declaring a stream objects with range of elements from 1-10\n\t\t * where last range element is not considered while printing or for any //\n\t\t * operation like sum, average, etc.\n\t\t * \n\t\t * We have IntStream, DoubleStream, etc to handle primitive values inside\n\t\t * streams...\n\t\t */\n\n\t\tIntStream.range(1, 10).forEach(e -> System.out.println(\"IntStream values from 1-10 range: \" + e)); // This will\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// print\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// numbers\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// from 1-9\n\n\t\t// Sometimes,we really want to create Streams dynamically instead of sequential\n\t\t// int values as above. We can use iterate method to to that.\n\t\tIntStream.iterate(1, e -> e * 2).limit(10).forEach(System.out::println);// Priting square numbers\n\n\t\tIntStream.iterate(2, e -> e + 2).limit(10).peek(System.out::println);// Printing even numbers\n\n\t\t/*\n\t\t * Convert these primitive streams to List For that we need to do a boxing\n\t\t * operation on top of stream\n\t\t */\n\n\t\tSystem.out.println(\"Converting IntStream to List...\");\n\t\tIntStream.range(1, 10).limit(5).boxed().collect(Collectors.toList()).forEach(System.out::println);\n\n\t\t/*\n\t\t * Lets explore some concepts on Strings...How stream works on strings and its\n\t\t * related operations\n\t\t */\n\n\t\t// Stream courseStream = Stream.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\tList<String> courses = List.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\tList<String> courses2 = List.of(\"Spring\", \"API\", \"AWS\", \"Java\", \"JavaFP\");\n\t\t// If we want to join these values\n\n\t\tSystem.out.println(courses.stream().collect(Collectors.joining()));\n\n\t\t/*\n\t\t * Lets say, if i want tp split each string in stream seprated by comma..\n\t\t */\n\t\tSystem.out.println(\"String opeartaion within Streams....\");\n\t\t// The below one prints all stream Objects that executed on top of split\n\t\t// function. So, we need to flatMap it to extract the actual result\n\t\tSystem.out.println(courses.stream().map(course -> course.toString().split(\",\")).collect(Collectors.toList()));\n\t\tSystem.out.println(\n\t\t\t\tcourses.stream().map(course -> course.split(\"\")).flatMap(Arrays::stream).collect(Collectors.toList()));\n\n\t\tSystem.out.println(\"Tuples strings : \"\n\t\t\t\t+ courses.stream().flatMap(course -> courses2.stream().map(course2 -> List.of(course, course2)))\n\t\t\t\t\t\t.collect(Collectors.toList()));\n\n\t\t/**\n\t\t * Higher Order Functions... Higher Order function is a function that returns a\n\t\t * function... In simpler terms, a method that returns a Predicate which\n\t\t * contains logic. So, here we are using method logic as a normal data and\n\t\t * returning it from an another method..\n\t\t */\n\n\t\tList<Courses> courseList = List.of(new Courses(1, \"Java\", 5000, 5), new Courses(2, \"AWS\", 4000, 4));\n\t\t// If we want to get courses whcih has number of students greater than 4000,\n\t\t// then we need to write a predicate for that first\n\t\tint numberOfStudentsThreshhold = 4000;\n\t\tPredicate<Courses> numberOfStudentsPredicate = numberOfStudentsPredecateMethod(numberOfStudentsThreshhold);\n\n\t\tSystem.out.println(\"Courses that has score>4000 : \"\n\t\t\t\t+ courseList.stream().filter(numberOfStudentsPredicate).collect(Collectors.toList()));\n\n\t}",
"@Test\n public void takeUntil() {\n Observable.just(1, 2, 3, 4)\n .takeUntil(integer -> integer > 2)\n .subscribe(mList::add);\n assertEquals(mList, Arrays.asList(1, 2, 3));\n\n mList.clear();\n Observable.just(1, 2, 3, 4)\n .takeUntil(integer -> integer < 10)\n .subscribe(mList::add);\n assertEquals(mList, Collections.singletonList(1));\n }",
"public List<Element> filter(Predicate<Element> p)\n\t{\n\t\treturn recursive_filter(new ArrayList<Element>(), p, group);\n\t}",
"List<Object> greaterThanOrEqualsTo(Object value);",
"@Test\n\tpublic void generateApples() throws Exception {\n\t\tappleList.stream().filter(apple -> apple.getColor().equals(\"green\")).\n\t\t\t\tfilter(apple -> apple.getWeight() > 5).\n\t\t\t\tlimit(7).\n\t\t\t\tforEach(System.out::print);\n\t}",
"public static <T> List<T> filter(Predicate<? super T> p, Collection<T> c) {\r\n List<T> res = new ArrayList<>();\r\n\r\n for (T item : c) {\r\n if (p.apply(item)) {\r\n res.add(item);\r\n }\r\n }\r\n\r\n return res;\r\n }",
"public static void main(String[] args) {\n\n List<Student> students = new ArrayList<>();\n\n students.add(new Student(1, \"Nazar\", 24));\n students.add(new Student(2, \"Mykola\", 17));\n students.add(new Student(5, \"Valentyn\", 18));\n students.add(new Student(4, \"Oleg\", 28));\n students.add(new Student(3, \"Maria\", 20));\n students.add(new Student(1, \"Andriy\", 44));\n students.add(new Student(6, \"Roman\", 85));\n\n // get iterator\n\n Iterator<Student> iterator = students.iterator();\n\n while (iterator.hasNext()) {\n Student next = iterator.next();\n System.out.println(next);\n }\n System.out.println();\n\n // complex condition -> remove\n Iterator<Student> iterator2 = students.iterator();\n\n while (iterator2.hasNext()) {\n Student next = iterator2.next();\n if (next.getAge() > 30) {\n iterator2.remove();\n }\n }\n System.out.println();\n\n// Iterator<Student> iterator3 = students.iterator();\n//\n// while(iterator3.hasNext()){\n// Student next = iterator3.next();\n// System.out.println(next);\n// }\n\n\n // foreach - show remove without iterator\n for (Student student : students) {\n if (student.getAge() > 30) {\n System.out.println(student);\n students.remove(student);\n }\n }\n\n System.out.println();\n for (Student student : students) {\n System.out.println(student);\n }\n\n\n // fori - show how we can miss some objects\n\n for (int i = 0; i < students.size(); i++) {\n if (students.get(i).getAge() > 25) {\n students.remove(i);\n }\n }\n\n for (Student student : students) {\n System.out.println(student);\n }\n\n }",
"@Test\n public void intermediateAndTerminalOperations() throws Exception {\n System.out.println(\n MockData.getCars()\n // Here we go to \"abstraction\" of strams\n .stream()\n // This is an intermediate op because we stay in the abstraction\n .filter(car -> {\n System.out.println(\"filter car \" + car);\n return car.getPrice() < 10000;\n })\n // This is intermediate too, we still working with streams \"abstraction\"\n .map(car -> {\n System.out.println(\"mapping car \" + car);\n return car.getPrice();\n })\n // same as before, still intermediate, still in streams abstraction\n .map(price -> {\n System.out.println(\"mapping price \" + price);\n return price + (price * .14);\n })\n // ok, this is a terminal operation and give you back the \"concrete type\" result of the operations\n .collect(Collectors.toList())\n );\n\n // Q: If you comment this line, no result is printed, you got only stram reference, why?\n // A: STREAMS are LAZY initialized\n\n // Q: What's the order of execution in the above code?\n // A: See the console print to understand order of execution:\n // The mappings are executed as soon as the first car passes the filter\n // so to get some results, stream don't need to filter ALL the list before\n\n }",
"private Reviews filterByFunc(FilterFunction filterFunc)\n\t{\n\t\tArrayList<Review> filteredList = new ArrayList<Review>();\n\t\tfor(Review review : list)\n\t\t\tif(filterFunc.filter(review))\n\t\t\t\tfilteredList.add(review);\n\t\treturn new Reviews(filteredList);\n\t}",
"ObservableList<Task> getUnfilteredTaskList();",
"public static ArrayList<AUnit> filterAUnitsBy(List<AUnit> units, Predicate<AUnit> filter) {\n ArrayList<AUnit> result = new ArrayList<>(units);\n result.removeIf(filter.negate());\n return result;\n }",
"public void testListFilters() {\r\n boolean[] types = {true,true,false}; // Types 1 and 2.\r\n List<InfoNode> filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 2);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n\r\n types[2] = true; // Types 1, 2 and 3.\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.size() == 3);\r\n assertTrue(filteredList.contains(node1));\r\n assertTrue(filteredList.contains(node2));\r\n assertTrue(filteredList.contains(node3));\r\n\r\n types[0] = false; types[1] = false; types[2] = false;\r\n filteredList = MapUtils.filterValues(exampleList, types);\r\n assertTrue(filteredList.isEmpty());\r\n assertFalse(filteredList.contains(node1));\r\n assertFalse(filteredList.contains(node2));\r\n assertFalse(filteredList.contains(node3));\r\n }",
"public static void main(String[] args) {\n\t\tList<Employee> emplist = EmployeeRepository.list;\r\n\t\t\r\n\t\t\r\n\t\tList<Employee> elist = emplist.stream().filter(emp -> emp.getDepartment()!=null).collect(Collectors.toList());\r\n\t\t\r\n\t}",
"public static void runExercise7() {\n students.stream().filter(student -> student.getAge()>20).map(student -> student.getLastName() + \" \" + student.getFirstName()).sorted().forEach(System.out::println);\n }",
"private void verifyNumbersPrimeWitStream(){\n\t\tList<Integer> primeList = IntStream.range(2, Integer.MAX_VALUE)\n\t\t\t\t.filter(n -> isPrime(n))\n\t\t\t\t.limit(primes.length)\n\t\t\t\t.boxed()\n\t\t\t\t.collect(Collectors.toList());\n\t\tprimes = primeList.stream().mapToInt(i->i).toArray();\n\t}",
"public LinkedList <AbsAttraction> filter(ISelect s){\r\n return new LinkedList <AbsAttraction>(); \r\n }",
"public static void main(String[] args)\n \t{\n Stream<String> stream = Stream.of(\"Anusha\", \"Vaishnavi\",\n \t\"Shakti\", \"Geet\",\"Ravi\");\n\n\tList<String> stringlist = Arrays.asList(\"Aahan\", \"Shashi\",\n\t\t\"preeti\", \"Ganesh\", \"Kundan\", \"Suresh\");\n\n\t// creating stream of strings\n Stream<String> s = Stream.of(\"Ram\",\"Sunil\",\n\t \"Gajanan\",\"Diksha\",\"Govind\",\"Avinash\", \"Ahana\");\n\t \t\n \n // Using Stream filter(Predicate predicate)\n // to get a stream consisting of the\n // elements ending with s\n stream.filter(str -> str.startsWith(\"S\"))\n .forEach(System.out::println);\n \n\tstream.filter(str -> str.length() > 3)\n .forEach(System.out::println);\n \n\t//stringlist.stream().sorted().forEach(System.out::println); \n\tList<String> sortedList = stringlist.stream().sorted().collect(Collectors.toList()); \n\t sortedList.forEach(System.out::println);\n\t \n\t// counting number of strings in stream\n long count_string = s.collect(Collectors.counting());\n \t System.out.println(count_string);\n }"
] | [
"0.66353834",
"0.64699864",
"0.6418068",
"0.6383631",
"0.629091",
"0.62564176",
"0.62350416",
"0.61828434",
"0.6158557",
"0.6001871",
"0.5928358",
"0.58988875",
"0.583552",
"0.5761569",
"0.5733371",
"0.57117015",
"0.56964755",
"0.5654736",
"0.56342965",
"0.56159645",
"0.55982393",
"0.559039",
"0.5579591",
"0.5572561",
"0.5549626",
"0.55480313",
"0.5529074",
"0.55153865",
"0.5491985",
"0.54773766",
"0.54577136",
"0.5453801",
"0.545226",
"0.5443899",
"0.54102093",
"0.54054976",
"0.5405455",
"0.53899163",
"0.53682417",
"0.5355814",
"0.5340676",
"0.5337245",
"0.53346187",
"0.53229654",
"0.53195614",
"0.5304929",
"0.52804244",
"0.5266162",
"0.52639663",
"0.52578324",
"0.52567375",
"0.52552104",
"0.52542377",
"0.52346426",
"0.5227762",
"0.52128494",
"0.5187764",
"0.51793885",
"0.5176442",
"0.51654583",
"0.5159462",
"0.5144462",
"0.5134988",
"0.5128667",
"0.5123099",
"0.5114365",
"0.5108218",
"0.5097396",
"0.5095205",
"0.5087584",
"0.50874615",
"0.5073508",
"0.5072058",
"0.5061512",
"0.505614",
"0.50553644",
"0.5052087",
"0.503757",
"0.5035521",
"0.502188",
"0.50210786",
"0.5018728",
"0.5012357",
"0.5011234",
"0.5005324",
"0.49971712",
"0.49925637",
"0.49921665",
"0.49816787",
"0.49714276",
"0.49576053",
"0.4956423",
"0.4954238",
"0.4947442",
"0.49472094",
"0.4939838",
"0.493906",
"0.4934218",
"0.49287364",
"0.49231413",
"0.49102703"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
int totalePrijs;
System.out.println("Hoeveel wilt u kopen?");
int aantal = keyboard.nextInt();
System.out.println("Hoeveel kost het per stuk?");
int prijsPerEenheid = keyboard.nextInt();
totalePrijs = aantal * prijsPerEenheid;
if (totalePrijs >= 1000) {
System.out.println("U krijgt 22 euro koting.");
totalePrijs -= 22;
} else if (totalePrijs >= 500) {
System.out.println("U krijgt 10 euro koting.");
totalePrijs -= 10;
}
System.out.println("U moet " + totalePrijs + " euro betalen.");
keyboard.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
/ renamed from: aSy | final void a() {
if (this.jGU.getActionBar() != null) {
Bundle bundle = new Bundle();
bundle.putBoolean("close_window_confirm_dialog_switch", true);
bundle.putString("close_window_confirm_dialog_title_cn", this.fcq.getString(R.l.webview_jssdk_video_uploading_tips));
bundle.putString("close_window_confirm_dialog_title_eng", this.fcq.getString(R.l.webview_jssdk_video_uploading_tips));
bundle.putString("close_window_confirm_dialog_ok_cn", this.fcq.getString(R.l.webview_jssdk_upload_video_cancel));
bundle.putString("close_window_confirm_dialog_ok_eng", this.fcq.getString(R.l.webview_jssdk_upload_video_cancel));
bundle.putString("close_window_confirm_dialog_cancel_cn", this.fcq.getString(R.l.webview_jssdk_upload_video_continue));
bundle.putString("close_window_confirm_dialog_cancel_eng", this.fcq.getString(R.l.webview_jssdk_upload_video_continue));
this.jGU.getActionBar().setCloseWindowConfirmInfo(bundle);
}
aSz();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo1639a(ayl ayl);",
"public String mangle(String sName);",
"public void nameAnalysis(SymTable symTab) { }",
"abstract public SemSym nameAnalysis(SymTable symTab);",
"public SymTable\ngetSymTable();",
"java.lang.String getS2();",
"public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }",
"public void mo1327d(ac acVar) {\n }",
"public static void main(String[] args) {\nsyso \n\t}",
"public SintaxAnalysis(java_cup.runtime.Scanner s, java_cup.runtime.SymbolFactory sf) {super(s,sf);}",
"public String aliases(String s){\n\t\treturn null;\n\t}",
"public String convertStatement (String oraStatement);",
"public String convertStatement (String oraStatement);",
"interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }",
"void mo41083a();",
"private void strin() {\n\n\t}",
"public void nameAnalysis(SymTable symTab) {\n myAssign.nameAnalysis(symTab);\n }",
"public void sinyal();",
"public void mo38117a() {\n }",
"java.lang.String getS1();",
"void mo80452a();",
"public void nameAnalysis(SymTable symTab) {\n myId.nameAnalysis(symTab);\n myExpList.nameAnalysis(symTab);\n }",
"public void nameAnalysis(SymTable symTab) {\n myExp.nameAnalysis(symTab);\n }",
"public void nameAnalysis(SymTable symTab) {\n myExp.nameAnalysis(symTab);\n }",
"public void nameAnalysis(SymTable symTab) {\n myExp.nameAnalysis(symTab);\n }",
"public void nameAnalysis(SymTable symTab) {\n myExp.nameAnalysis(symTab);\n }",
"public void nameAnalysis(SymTable symTab) {\n myExp.nameAnalysis(symTab);\n }",
"private final void m56203a(String str) {\n this.f46448a.a(aw.a().a(str).a());\n }",
"public void mo1554b(ac acVar) {\n }",
"public SymName(String n) {\n\tn = n.trim();\n\tfullName = n;\n\tcomp = Util.findComponents(n);\n\tnum_comp = comp.length;\n\ttype = new int[num_comp];\n }",
"public void nameAnalysis(SymTable symTab) {\n myExp1.nameAnalysis(symTab);\n myExp2.nameAnalysis(symTab);\n }",
"public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}",
"private void yy() {\n\n\t}",
"private void convertString(AssignStatContext c, List<String> ssa) {\n\t\tString content = c.StringLiteral().getText();\n\t\tcontent = content.substring(1, content.length() - 1);\n\t\tString id = c.ID().getText();\n\t\tString newId = this.generateNewName(id);\n\t\tStringRepresentation rep = new StringRepresentation(newId, content);\n\t\tssa.addAll(rep.getConstraints());\n\t\t\n\t}",
"dkj mo4367a(dkk dkk);",
"void mo1791a(String str);",
"void mo57275a();",
"String getSFunc();",
"public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}",
"void mo88521a();",
"public SymTable nameAnalysis(SymTable workingSymTable)\n throws IllegalArgumentException, EmptySymTableException, DuplicateSymException {\n workingSymTable = myDeclList.nameAnalysis(workingSymTable);\n //now check the stmts for errors etc\n myStmtList.nameAnalysis(workingSymTable);\n return workingSymTable;\n }",
"public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }",
"void mo28307a(zzgd zzgd);",
"public SemSym nameAnalysis(SymTable symTab) {\n return nameAnalysis(symTab, symTab);\n }",
"public abstract void mo70710a(String str, C24343db c24343db);",
"@Override\r\n\tprotected String inverseTranslateUnquotedConst(String symbol)\r\n\t{\n\t\tif(symbol.equals(\"datime\"))\r\n\t\t{\r\n\t\t\treturn \"<http://xsb.sourceforge.net/manual1/manual1.pdf#datime>\";\r\n\t\t}\r\n\t\t\r\n\t\treturn symbol;\r\n\t}",
"void mo1886a(String str, String str2);",
"public void mo44053a() {\n }",
"public abstract void ataca(String inamic);",
"public void nameAnalysis(SymTable symTab) {\n myCall.nameAnalysis(symTab);\n }",
"java.lang.String getS();",
"public void mo12930a() {\n }",
"private ArrayList<ModelSymptom> getAllSymptoms(){\n ArrayList<ModelSymptom> arrayListToReturn = new ArrayList<>();\n arrayListToReturn.addAll(databaseHelper.getAllSymptoms());\n return arrayListToReturn;\n }",
"void mo1943l();",
"public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }",
"void mo8712a(C9714a c9714a);",
"public void nameAnalysis(SymTable symTab) {\n SemSym sym = symTab.lookupGlobal(myStrVal);\n if (sym == null) {\n ErrMsg.fatal(myLineNum, myCharNum, \"Undeclared identifier\");\n } else {\n link(sym);\n }\n }",
"public void addSyrup(Syrup newSyrup){\n syrups_Array.add(newSyrup);\n }",
"public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }",
"public Aliases( ) {\n\t}",
"public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}",
"private void convert(AssignStatContext c, List<String> ssa) {\n\t\tString expr = getExpr(c.expr());\n\t\tString id = this.variableTrack.get(c.ID().getText());\n\t\tString newId = generateNewName(id);\n\t\tString constraint = \"(assert(= \" + newId + \" \" + expr + \"))\";\n\t\tssa.add(constraint);\n\t\t\n\t}",
"String siToCcsdsName(String siName);",
"public static void main(String[] args) {\n System.out.println(AIS_SART.toString());\n System.out.println(AT_ANCHOR.toString());\n }",
"public void nameAnalysis(SymTable symTab) {\n myLhs.nameAnalysis(symTab);\n myExp.nameAnalysis(symTab);\n }",
"private static String convertToLatin(String word)\n {\n return word.substring(1) + word.substring(0,1) + \"ay\";\n }",
"private static void cajas() {\n\t\t\n\t}",
"void mo38026a();",
"public void leerAlimentos();",
"public interface C3963a {\n /* renamed from: Ly */\n int mo23521Ly();\n }",
"public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }",
"abstract String mo1748c();",
"void mo3768a(String str);",
"abstract String mo1747a(String str);",
"C2451d mo3408a(C2457e c2457e);",
"void mo87a(String str);",
"void mo4873a(C4718l c4718l);",
"void mo20141a();",
"void mo27575a();",
"public void mo2740a() {\n }",
"void mo72113b();",
"public void testOneTableSynAS() {\n\n String\tsql\t= \"SELECT t.AD_Table_ID, t.TableName FROM AD_Table AS t WHERE t.IsActive='Y'\";\n AccessSqlParser\tfixture\t= new AccessSqlParser(sql);\n\n assertEquals(\"AccessSqlParser[AD_Table=t|0]\", fixture.toString());\n }",
"void mo28306a();",
"interface C11601a {\n /* renamed from: tY */\n void mo23327tY(int i);\n }",
"public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }",
"void mo1932a(String str);",
"void mo17021c();",
"void mo1637a();",
"private void kk12() {\n\n\t}",
"public void mo9233aH() {\n }",
"public void vaaraSyote() {\n System.out.println(\"En ymmärtänyt\");\n kierros();\n }",
"public interface C1803l extends C1813t {\n /* renamed from: b */\n C1803l mo7382b(C2778au auVar);\n\n /* renamed from: f */\n List<C1700ar> mo7233f();\n\n /* renamed from: g */\n C2841w mo7234g();\n\n /* renamed from: q */\n C1800i mo7384q();\n}",
"public void mo9848a() {\n }",
"void mo28194a();",
"@Override\n public String getDescription() {\n return \"Alias assignment\";\n }",
"void mo57278c();",
"private void ss(){\n }",
"void mo12143a();",
"public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }",
"AlphabetNameReference createAlphabetNameReference();",
"public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }"
] | [
"0.60094106",
"0.6002409",
"0.59559953",
"0.5943237",
"0.566128",
"0.5647113",
"0.55899745",
"0.5557934",
"0.5512828",
"0.55033755",
"0.54872984",
"0.54740596",
"0.54740596",
"0.54497975",
"0.5445669",
"0.5425387",
"0.54093146",
"0.5403988",
"0.5387015",
"0.5385978",
"0.53704524",
"0.5364533",
"0.5346213",
"0.5346213",
"0.5346213",
"0.5346213",
"0.5346213",
"0.5332845",
"0.53303766",
"0.5319752",
"0.5281767",
"0.52710897",
"0.5256282",
"0.52555996",
"0.5245121",
"0.5229447",
"0.522678",
"0.52261245",
"0.52259463",
"0.5223407",
"0.521893",
"0.52182645",
"0.5206504",
"0.52058834",
"0.52053046",
"0.5195832",
"0.5195586",
"0.5192621",
"0.5188262",
"0.51857245",
"0.51841545",
"0.5182141",
"0.51787615",
"0.5177344",
"0.5174541",
"0.5171661",
"0.5164225",
"0.5163319",
"0.51627415",
"0.51612496",
"0.5161119",
"0.5158875",
"0.5158782",
"0.51534617",
"0.5153461",
"0.5150852",
"0.51501435",
"0.51485705",
"0.51473427",
"0.51410013",
"0.5138621",
"0.5137894",
"0.5130052",
"0.5128925",
"0.51256436",
"0.5116006",
"0.51144785",
"0.51130074",
"0.5107663",
"0.5099457",
"0.5097913",
"0.5097343",
"0.5093182",
"0.5088912",
"0.50882953",
"0.5083417",
"0.50814533",
"0.5076261",
"0.5075551",
"0.50735396",
"0.50673884",
"0.50658137",
"0.5063829",
"0.5063429",
"0.5052509",
"0.50521666",
"0.5050697",
"0.5050627",
"0.50472564",
"0.5046466",
"0.504414"
] | 0.0 | -1 |
do something on back. | public void onBackPressed() {
Toast.makeText(getActivity().getApplicationContext(), "Back pressed", Toast.LENGTH_SHORT).show();
return;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void back() {\n callFunction(\"back\");\n }",
"public synchronized void back ()\n\t// one move up\n\t{\n\t\tState = 1;\n\t\tgetinformation();\n\t\tgoback();\n\t\tshowinformation();\n\t\tcopy();\n\t}",
"public void back() {\n\t\tstate.back();\n\t}",
"@Override\n public void goBack() {\n\n }",
"@Override\n public final void switchBack() {\n }",
"public void back() {\n //noinspection ResultOfMethodCallIgnored\n previous();\n }",
"public void back () {\r\n if (backHistory.size() > 1) {\r\n forwardHistory.addFirst(current);\r\n current = backHistory.getLast();\r\n backHistory.removeLast();\r\n }\r\n }",
"public void back() {\n Views.goBack();\n }",
"void actionBack();",
"@Override\n public void backward() {\n }",
"protected void handleBack(ActionEvent event) {\n\t}",
"Request back();",
"protected void goBack() {\r\n\t\tfinish();\r\n\t}",
"private void backObject() {\n\t\tif(this.curr_obj != null) {\n this.curr_obj.uMoveToBack();\n }\n\t}",
"@Override\r\n\tpublic void back() {\nPizzaHut.main(null);\r\n\t}",
"void processBackEvent(AchieveSettings settings);",
"@Override\n protected boolean canGoBack() {\n return false;\n }",
"private void handleActionBack() {\n RecipeAPI.DecreaseRecipeNo();\n updateAllWidgets();\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tupdata();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void comeBackToWork() {\n\t\t\n\t}",
"@Override\n public void onBackPressed() {\n new goBack().execute(0);\n }",
"@Override\r\n\tpublic void backButton() {\n\t\t\r\n\t}",
"public void back(){\n\t\tswitch(state){\n\t\tcase LOGINID:\n\t\t\tbreak; //do nothing, already at top menu\n\t\tcase LOGINPIN:\n\t\t\tloginMenu();\n\t\t\tbreak;\n\t\tcase TRANSACTION:\n\t\t\tbreak; //do nothing, user must enter the choice to log out\n\t\tcase DEPOSIT:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase DEPOSITNOTIFICATION:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAW:\n\t\t\ttransactionMenu();\n\t\t\tbreak;\n\t\tcase BALANCE:\n\t\t\tbreak; //do nothing, user must press ok\n\t\tcase WITHDRAWALNOTIFICATION:\n\t\t\tbreak; //do onthing, user must press ok\n\t\t}\n\t\t\n\t\tcurrentInput = \"\";\n\t}",
"private void goBack() {\n\n \tsave();\n \t\n \tToast.makeText(ContactActivity.this, getString(R.string.done_contact_toast), Toast.LENGTH_SHORT).show();\n\n dbHelper.commit();\n setResult(RESULT_OK, null);\n finish();\n }",
"public void back()\n {\n if(!moveRooms.empty()){\n currentRoom = moveRooms.pop();\n look();\n } \n }",
"private void onBack(McPlayerInterface player, GuiSessionInterface session, ClickGuiInterface gui)\r\n {\r\n session.setNewPage(this.prevPage);\r\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}",
"public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }",
"private void backPage()\n {\n page--;\n open();\n }",
"void moveBack()\n\t{\n\t\tif (length != 0) \n\t\t{\n\t\t\tcursor = back; \n\t\t\tindex = length - 1; //cursor will be at the back\n\t\t\t\n\t\t}\n\t}",
"private void comeBack() {\n if (previousPresence != null) {\n CollaborationConnection connection = CollaborationConnection\n .getConnection();\n sendPresence(connection, previousPresence);\n timerSetAway = false;\n }\n }",
"@Override\r\n\tpublic void afterNavigateBack(WebDriver arg0) {\n\t\tSystem.out.println(\"Message afterNavigateBack\");\r\n\t}",
"@Override\r\n public void onBackPatrolRecord(PatrolRecordBean patrolRecordBean) {\n }",
"@Secured(\"@\")\n public void doBackPage() {\n infoOrderDetail = false;\n haveDepositPrice = false;\n orderStockTag.resetOrderStock();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tgame.getController().undoLastMove();\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}",
"public T back();",
"@Override\r\n public PhoenixDriver back()\r\n {\n return null;\r\n }",
"Observable<Void> goBack();",
"private void backButton() {\n navigate.goPrev(this.getClass(), stage);\n }",
"@Override\n\tpublic void afterNavigateBack(WebDriver arg0) {\n\n\t}",
"@Override\n\tpublic void backButton() {\n\n\t}",
"@Override\n\tpublic boolean isBackable() {\n\t\treturn false;\n\t}",
"private void returnBack()\n {\n getActivity().onBackPressed();\n }",
"@Override\n public void onBackPressed( ) {\n update_storage( );\n super.onBackPressed( );\n }",
"public void onBackPressed() {\n moveTaskToBack(true);\n }",
"private void goBack() {\n View.clearViews();\n View.cambiar(\"operador.cliente\", new RegistrarClientes(operador));\n }",
"public void goBack(View view) {\n end();\n }",
"@Override\r\n public void onBackPressed() {\n moveTaskToBack(true);\r\n }",
"@Override\n \tpublic void onBackPressed() {\n \t}",
"public void goBack() {\n goBackBtn();\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}",
"public /* synthetic */ void m107502a(View view) {\n popBack();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tbackButtonHandler();\r\n\t\treturn;\r\n\t}",
"@Override\n\tpublic void keyBack() {\n\t\t\n\t}",
"public void undo() {\r\n pop( true );\r\n announce( null );\r\n }",
"@Override\n\tpublic void onBackPressed()\n\t{\n\t}",
"void onGoBackButtonClick();",
"@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}",
"public void back()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"BackButton\")).click();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(false);\n\t}",
"@Override\n protected void handleImput() {\n buttonBack.getButton().addListener(new ChangeListener() {\n @Override\n public void changed(ChangeEvent event, Actor actor) {\n if(!buttonLocker) {\n gsm.pop();\n gsm.push(new MenuState(gsm));\n buttonLocker = true;\n }\n }\n });\n if (Gdx.input.isKeyJustPressed(Input.Keys.BACK)){\n gsm.pop();\n gsm.push(new MenuState(gsm));\n }\n }",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n public void onBackPressed() {\n chamarTelaInicial(status_recreate);\n }",
"@Override\n\tpublic void onBackPressed() {\n\n\t}",
"public void past(int back);",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"@Override\n public void onBackPressed() {\n moveTaskToBack(true);\n }",
"private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tmoveTaskToBack(true);\r\n\t\tsuper.onBackPressed();\r\n\t}",
"public void backStep() {\r\n\t\tif (engaged && !backSteps.empty()) {\r\n\t\t\tProgramStatement statement = ((BackStep) backSteps.peek()).ps;\r\n\t\t\tengaged = false; // GOTTA DO THIS SO METHOD CALL IN SWITCH WILL NOT\r\n\t\t\t\t\t\t\t\t// RESULT IN NEW ACTION ON STACK!\r\n\t\t\tdo {\r\n\t\t\t\tBackStep step = (BackStep) backSteps.pop();\r\n\t\t\t\t/*\r\n\t\t\t\t * System.out.println(\"backstep POP: action \"+step.action+\" pc \"\r\n\t\t\t\t * +mars.util.Binary.intToHexString(step.pc)+\r\n\t\t\t\t * \" source \"+((step.ps==null)? \"none\":step.ps.getSource())+\r\n\t\t\t\t * \" parm1 \"+step.param1+\" parm2 \"+step.param2);\r\n\t\t\t\t */\r\n\t\t\t\tif (step.pc != NOT_PC_VALUE) {\r\n\t\t\t\t\tRegisterFile.setProgramCounter(step.pc);\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tswitch (step.action) {\r\n\t\t\t\t\tcase MEMORY_RESTORE_RAW_WORD:\r\n\t\t\t\t\t\tGlobals.memory.setRawWord(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MEMORY_RESTORE_WORD:\r\n\t\t\t\t\t\tGlobals.memory.setWord(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MEMORY_RESTORE_HALF:\r\n\t\t\t\t\t\tGlobals.memory.setHalf(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase MEMORY_RESTORE_BYTE:\r\n\t\t\t\t\t\tGlobals.memory.setByte(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase REGISTER_RESTORE:\r\n\t\t\t\t\t\tRegisterFile.updateRegister(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase PC_RESTORE:\r\n\t\t\t\t\t\tRegisterFile.setProgramCounter(step.param1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC0_REGISTER_RESTORE:\r\n\t\t\t\t\t\tCoprocessor0.updateRegister(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC1_REGISTER_RESTORE:\r\n\t\t\t\t\t\tCoprocessor1.updateRegister(step.param1, step.param2);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC1_CONDITION_CLEAR:\r\n\t\t\t\t\t\tCoprocessor1.clearConditionFlag(step.param1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase COPROC1_CONDITION_SET:\r\n\t\t\t\t\t\tCoprocessor1.setConditionFlag(step.param1);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase DO_NOTHING:\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t// if the original action did not cause an exception this\r\n\t\t\t\t\t// will not either.\r\n\t\t\t\t\tSystem.out.println(\"Internal MARS error: address exception while back-stepping.\");\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t} while (!backSteps.empty() && statement == ((BackStep) backSteps.peek()).ps);\r\n\t\t\tengaged = true; // RESET IT (was disabled at top of loop -- see\r\n\t\t\t\t\t\t\t// comment)\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}",
"public static void back()\n {\n throw new UnsupportedOperationException();\n }",
"public void onBackPresed() {\n\t\t\tandroid.os.Process.killProcess(android.os.Process.myPid());\n\t\t\t\n\n\t}",
"public void GoBack(ActionEvent actionEvent) throws IOException\n {\n Main.backToMain();\n }",
"public void backButtonClicked()\r\n {\n manager = sond.getManager();\r\n AnimatorThread animThread = model.getThread();\r\n\r\n if (button.getPlay() && animThread != null && animThread.isAlive())\r\n {\r\n if (!animThread.getWait())\r\n {\r\n animThread.interrupt();\r\n }\r\n else\r\n {\r\n animThread.wake();\r\n }\r\n }\r\n else if (manager.canUndo())\r\n {\r\n manager.undo();\r\n }\r\n }",
"public void actionPerformedBack(ActionListener back) {\n btnBack.addActionListener(back);\n }",
"public void onBackPressed() {\n backbutton();\n }",
"public void lockBack()\n {\n m_bBackLock = true;\n }",
"public static void navigateBack() {\n\t\tLOG.info(\"Navigate to back page from current page.\");\n\t\tConstants.driver.navigate().back();\n\n\t}",
"public void onBack(View view){\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"Back\");\n saveTemplate(filename);\n Intent intent = new Intent(this, FileManager.class);\n startActivity(intent);\n }",
"@Override\r\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n this.moveTaskToBack(true);\n }",
"private void doBack() {\n\t\tif (!haveTaskRunning) {\r\n\t\t\tfinish();\r\n\t\t} else if (mStep == READ_BAGLOACK) { // 读袋锁阶段,初始化信息,启用码\r\n\t\t\tmVReadBagLock.setDoing(false);\r\n\t\t\tmBagInItTask.stop();\r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\thaveTaskRunning = false;\r\n\t\t} else if (mStep == READ_UHF) { // 读TID\r\n\t\t\tmVReadUhfLock.setDoing(false);\r\n\t\t\tmReadInitEPCTask.stop();\r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\tmStep = READ_BAGLOACK;\r\n\t\t\thaveTaskRunning = false;\r\n\t\t} else if (mStep == NET_CHECK ) { \r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\tmVNetCheck.setDoing(false);\r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\thaveTaskRunning = false;\r\n\t\t\t//更新袋锁,索引,条码,封签信息,标志位\r\n\t\t} else if (mStep == UPDATE_BAGLOCK) { // \r\n\t\t\tmVUpdateBagLock.setDoing(false);\r\n\t\t\tmWriteRfidTask.stop();\r\n\t\t\thaveTaskRunning = false;\r\n\t\t// 将条码等数据发送到服务器验证,是否已经封签过\r\n\t\t} \r\n\t}"
] | [
"0.81376904",
"0.7967265",
"0.788446",
"0.77117735",
"0.76822543",
"0.76543164",
"0.7544517",
"0.7465819",
"0.74631053",
"0.74084765",
"0.73610175",
"0.7322638",
"0.7194461",
"0.7170107",
"0.7130054",
"0.710408",
"0.7073428",
"0.7048278",
"0.7035141",
"0.7031213",
"0.6990377",
"0.6974958",
"0.69715714",
"0.69667727",
"0.6964272",
"0.69610405",
"0.6937129",
"0.6924524",
"0.69105184",
"0.68953407",
"0.68865037",
"0.68841684",
"0.6881584",
"0.6853294",
"0.6847342",
"0.68439287",
"0.6843019",
"0.6841113",
"0.68241876",
"0.68237466",
"0.68108934",
"0.6782779",
"0.67767036",
"0.676899",
"0.6766283",
"0.6763294",
"0.6762505",
"0.6757604",
"0.67550147",
"0.6750102",
"0.6749737",
"0.6746819",
"0.67344767",
"0.6731188",
"0.6728514",
"0.6728474",
"0.67283434",
"0.6724938",
"0.6723504",
"0.67231643",
"0.6722224",
"0.6714043",
"0.6709306",
"0.6709306",
"0.6709306",
"0.6709306",
"0.6701643",
"0.66920215",
"0.668577",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.6680338",
"0.66741544",
"0.6666357",
"0.66519344",
"0.66518855",
"0.66518855",
"0.66422623",
"0.66371137",
"0.663158",
"0.66236687",
"0.66151226",
"0.6613001",
"0.6603355",
"0.6596942",
"0.65901196",
"0.65836334",
"0.6583423",
"0.657813"
] | 0.0 | -1 |
Inflate the menu; this adds items to the action bar if it is present. | @Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.main, 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 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\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\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.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 MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, 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 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 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}",
"public void onCreateOptionsMenu(Menu menu, MenuInflater 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}",
"@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }",
"@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 }",
"@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\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 public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }",
"@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 void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\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\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 void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }",
"@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }"
] | [
"0.7246451",
"0.7201833",
"0.7195169",
"0.7176824",
"0.71071094",
"0.7039687",
"0.70379424",
"0.7011622",
"0.70095545",
"0.69799995",
"0.6945173",
"0.69389343",
"0.6933555",
"0.69172555",
"0.69172555",
"0.68906796",
"0.688355",
"0.687496",
"0.6874772",
"0.68613136",
"0.68613136",
"0.68613136",
"0.68613136",
"0.6852252",
"0.6846455",
"0.6818823",
"0.6816676",
"0.68122935",
"0.68119055",
"0.68119055",
"0.6805087",
"0.68003947",
"0.6797015",
"0.67904633",
"0.6789411",
"0.67871827",
"0.6782913",
"0.67593676",
"0.6756442",
"0.6747255",
"0.6742987",
"0.6742987",
"0.6740183",
"0.67392707",
"0.67249876",
"0.67237884",
"0.67217875",
"0.67217875",
"0.6719964",
"0.6711429",
"0.6706682",
"0.67035955",
"0.6699167",
"0.66980296",
"0.6696009",
"0.6694031",
"0.66855574",
"0.66825926",
"0.66825926",
"0.6682556",
"0.66795844",
"0.6678825",
"0.6676161",
"0.66680866",
"0.66665506",
"0.66625977",
"0.6657122",
"0.6657122",
"0.6657122",
"0.6656225",
"0.6653723",
"0.6653723",
"0.6653723",
"0.66520125",
"0.6651581",
"0.6649255",
"0.6648212",
"0.6646545",
"0.6646233",
"0.66460145",
"0.6645477",
"0.6644324",
"0.66441935",
"0.6642723",
"0.66420346",
"0.66412085",
"0.6638387",
"0.6633755",
"0.66334134",
"0.66321",
"0.663127",
"0.663127",
"0.663127",
"0.6628276",
"0.6627496",
"0.6626989",
"0.6625628",
"0.6623483",
"0.6620039",
"0.66181844",
"0.66181844"
] | 0.0 | -1 |
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml. | @Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}",
"@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }"
] | [
"0.79046476",
"0.7805623",
"0.7766615",
"0.77274555",
"0.7632045",
"0.76220745",
"0.75848633",
"0.7531134",
"0.74884325",
"0.74575055",
"0.74575055",
"0.74388313",
"0.74218154",
"0.7403308",
"0.7391667",
"0.7386889",
"0.73792624",
"0.73705244",
"0.7362704",
"0.7355958",
"0.73457336",
"0.73412824",
"0.73301464",
"0.73288566",
"0.73257905",
"0.7318758",
"0.7316527",
"0.7313703",
"0.7304158",
"0.7304158",
"0.7302085",
"0.72983634",
"0.7293686",
"0.72866",
"0.7283303",
"0.728145",
"0.72787505",
"0.7260023",
"0.7260023",
"0.7260023",
"0.7259934",
"0.72594047",
"0.7249977",
"0.72246146",
"0.7219595",
"0.72166914",
"0.7204287",
"0.72013676",
"0.72004634",
"0.71934885",
"0.7185269",
"0.7177778",
"0.71687645",
"0.7167653",
"0.71539253",
"0.7153525",
"0.7136213",
"0.7134901",
"0.7134901",
"0.7129261",
"0.7129006",
"0.71241",
"0.712339",
"0.71232814",
"0.71220535",
"0.7117341",
"0.7117331",
"0.7117331",
"0.7117331",
"0.7117331",
"0.71168953",
"0.71166164",
"0.71150327",
"0.71121156",
"0.71098715",
"0.7108862",
"0.7105525",
"0.7099833",
"0.7098193",
"0.7095489",
"0.709369",
"0.709369",
"0.70865035",
"0.7083285",
"0.70810497",
"0.70802194",
"0.70737916",
"0.7068235",
"0.70619094",
"0.70604193",
"0.7060166",
"0.7051441",
"0.70377",
"0.70377",
"0.7035963",
"0.703536",
"0.703536",
"0.70326227",
"0.703064",
"0.70297664",
"0.7018773"
] | 0.0 | -1 |
Instantiates a new visualization style datatype change event. | public VisualizationStyleDatatypeChangeEvent(String dtiKey, Class<? extends VisualizationSupport> mgsClass,
VisualizationStyle oldStyle, VisualizationStyle newStyle, boolean newIsDefault, Object source)
{
myDTIKey = dtiKey;
myMGSClass = mgsClass;
myOldStyle = oldStyle;
myNewStyle = newStyle;
myNewIsDefaultStyle = newIsDefault;
mySource = source;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"VisualizationAttribute createVisualizationAttribute();",
"@Override\n public String getType() {\n return \"Color change\";\n }",
"public abstract TC createStyle();",
"public VisualizationStyle getNewStyle()\r\n {\r\n return myNewStyle;\r\n }",
"public VisualizationStyleParameterChangeEvent(String dtiKey, VisualizationStyle style,\r\n Set<VisualizationStyleParameter> changedSet, Object source)\r\n {\r\n Utilities.checkNull(style, \"style\");\r\n Utilities.checkNull(changedSet, \"changedSet\");\r\n\r\n myDTIKey = dtiKey;\r\n myStyle = style;\r\n mySource = source;\r\n myChangedParameterSet = Collections.unmodifiableSet(New.set(changedSet));\r\n\r\n for (VisualizationStyleParameter p : myChangedParameterSet)\r\n {\r\n if (p.getHint() != null)\r\n {\r\n if (!p.getHint().isRenderPropertyChangeOnly())\r\n {\r\n myRequiresGeometryRebuild = true;\r\n }\r\n if (p.getHint().isRequiresMetaData())\r\n {\r\n myRequiresMetaData = true;\r\n }\r\n }\r\n }\r\n }",
"public native final EditorBaseEvent changedType(String val) /*-{\n\t\tthis.changedType = val;\n\t\treturn this;\n\t}-*/;",
"@Override\r\n\tprotected ObservableCellModifier createViewerCellModifier() {\r\n\t\treturn new EventTypesCellModifier();\r\n\t}",
"public DataGridColumnStyle(java.lang.Object instance) throws Throwable {\n super(instance);\n if (instance instanceof JCObject) {\n classInstance = (JCObject) instance;\n } else\n throw new Exception(\"Cannot manage object, it is not a JCObject\");\n }",
"public void visualChange();",
"public DataLoadedEvent(DataEventType type) {\n\t\tthis.eventType = type;\t\t\n\t}",
"void init(Object theSource, int type, int posn, Object oldObject,\r\n\t\t\tObject newObject, int theNewSize, Object theOtherSource) {\n\t\tif (validType(type)) {\r\n\t\t\teventType = type;\r\n\t\t\toldValue = oldObject;\r\n\t\t\tnewValue = newObject;\r\n\t\t\tposition = posn;\r\n\t\t\tnewSize = theNewSize;\r\n\t\t\tsource = theSource;\r\n\t\t\totherSource = theOtherSource;\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"E*** Unknown Event Type \" + eventType);\r\n\t\t\teventType = UndefEvent;\r\n\r\n\t\t}\r\n\t}",
"void setVisualizationType(MapVisualizationType visType);",
"public void setEventtype(java.lang.String newValue) {\n\tthis.eventtype = newValue;\n}",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n TagsSource tagsSource = new TagsSource(new Source());\n DialogsFactory.produceEsdVariableTableDataSourceDialog(tagsSource, false, \"Create ESD Variable Table data source manually\");\n }",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n TagsSource tagsSource = new TagsSource(new Source());\n DialogsFactory.produceFgsVariableTableDataSourceDialog(tagsSource, false, \"Create FGS Variable Table data source manually\");\n }",
"public void makeEvent(String type) {\n\t\teventName = type;\n\t}",
"public void handleStyle(HtmlObjects.Style t)\n {\n }",
"DataPointType createDataPointType();",
"LegendType createLegendType();",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n TagsSource tagsSource = new TagsSource(new Source());\n DialogsFactory.produceDcsVariableTableDataSourceDialog(tagsSource, false, \"Create document data source manually\");\n }",
"public void setDataType(Class newclass) {\n datatype=newclass;\n }",
"@Test\n public void test41() throws Throwable {\n CategoryPlot categoryPlot0 = new CategoryPlot();\n categoryPlot0.rendererChanged((RendererChangeEvent) null);\n categoryPlot0.setWeight(3412);\n }",
"public TypeEventFilter(String type)\n {\n super();\n setEventType(type);\n }",
"public abstract void setEventType(Context context, NAEventType type);",
"@Override\n\tprotected void handleDrop() {\n\t\tif (getTargetEditPart() instanceof CrosstabEditPart) {\n\t\t\tMCrosstab crosstabModel = (MCrosstab) ((EditPart)getTargetEditPart()).getModel();\n\t\t\tTemplateStyle style = (TemplateStyle) IOUtils.readFromByteArray((byte[])getCurrentEvent().data);\n\t\t\tif (style != null && style instanceof CrosstabStyle){\n\t\t\t\tCrosstabStyle selectedStyle = (CrosstabStyle) style;\n\t\t\t\tif (crosstabModel != null) {\n\t\t\t\t\tShell shell = PlatformUI.getWorkbench().getDisplay().getActiveShell();\n\t\t\t\t\tMessageDialog question = new MessageDialog(shell, Messages.EditCrosstabStyleAction_questionTitle, null, Messages.EditCrosstabStyleAction_questionText, MessageDialog.QUESTION, \n\t\t\t\t\t\t\tnew String[]{Messages.EditCrosstabStyleAction_questionUpdate, \n\t\t\t\t\t\t\t\t\t\t Messages.EditCrosstabStyleAction_questionNewStyles, \n\t\t\t\t\t\t\t\t\t\t Messages.EditCrosstabStyleAction_questionCancel}, 0);\n\t\t\t\t\tint response = question.open();\n\t\t\t\t\t// response == 0 update the old styles, response == 1 create new styles, response == 2 cancel the operation\n\t\t\t\t\tif (response == 0 || response == 1) {\n\t\t\t\t\t\tUpdateCrosstabStyleCommand updateCommand = new UpdateCrosstabStyleCommand(crosstabModel, selectedStyle,response == 0);\n\t\t\t\t\t\tCommandStack cs = getCommandStack();\n\t\t\t\t\t\tif (cs!=null) cs.execute(updateCommand);\n\t\t\t\t\t\telse updateCommand.execute();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void structureChanged(GraphEvent e);",
"public void init() {\r\n setEventType(4);\r\n }",
"SeriesType createSeriesType();",
"TriggerType createTriggerType();",
"@Test\r\n public void testNotifyDataTypeInfoColorChangeEvent() throws QueryException, IOException\r\n {\r\n EasyMockSupport support = new EasyMockSupport();\r\n\r\n EventManager eventManager = createEventManager(support);\r\n TimeManager timeManager = createTimeManager(support);\r\n AnimationManager animationManager = createAnimationManager(support);\r\n List<PlatformMetadata> testData = New.list(createMetadata());\r\n OrderParticipantKey expectedUAVKey = support.createMock(OrderParticipantKey.class);\r\n OrderParticipantKey expectedVideoKey = support.createMock(OrderParticipantKey.class);\r\n OrderManagerRegistry orderRegistry = createOrderRegistry(support, expectedUAVKey, expectedVideoKey, 1);\r\n Toolbox toolbox = createToolbox(support, eventManager, timeManager, animationManager, testData, orderRegistry, 2);\r\n\r\n DataTypeInfo videoLayer = createVideoLayer(support, expectedVideoKey);\r\n OSHImageQuerier querier = createQuerier(support, videoLayer, 2);\r\n List<DataTypeInfo> linkedLayer = New.list(videoLayer);\r\n\r\n DataTypeInfo uavLayer = createUAVDataType(support, expectedUAVKey, 2);\r\n\r\n GenericSubscriber<Geometry> receiver = createReceiver(support);\r\n\r\n support.replayAll();\r\n\r\n AerialImageryTransformer transformer = new AerialImageryTransformer(toolbox, querier, uavLayer, linkedLayer);\r\n transformer.addSubscriber(receiver);\r\n transformer.open();\r\n\r\n DataTypeInfoColorChangeEvent event = new DataTypeInfoColorChangeEvent(uavLayer, Color.blue, true, this);\r\n transformer.notify(event);\r\n\r\n event = new DataTypeInfoColorChangeEvent(videoLayer, Color.black, true, this);\r\n transformer.notify(event);\r\n\r\n support.verifyAll();\r\n }",
"public void propertyChange(final PropertyChangeEvent event) {\n RGB newColor = colorSelector.getColorValue();\n setBackgroundViewColor(newColor);\n _plot.getModelSpaceCanvas().setGridLineProperties(LineStyle.NONE, newColor, 0);\n }",
"private void setEventType(String eventType)\n\t{\n\t\tsomethingChanged = true;\n\t\tthis.eventType = eventType;\n\t}",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n DialogsFactory.produceCreateDcsVariableTableFromHoneywellDcsExportDialog(new HoneywellDcsExport(new Source()));\n }",
"public void create(Rule event);",
"private Chart(int dimensionality)\r\n {\r\n DataTable.getInstance().getModel().addTableModelListener(this);\r\n this.setLayout(null);\r\n this.setMinimumSize(new Dimension(400,300));\r\n this.setPreferredSize(new Dimension(500000,500000));\r\n this.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createMatteBorder(5,5,5,5,SystemColor.control),BorderFactory.createLineBorder(SystemColor.control.darker())));\r\n background = new Background(this);\r\n backpane = new Backpane(this);\r\n axes = new Axes2D(this);\r\n data = new DataPoints2D(this);\r\n this.addMouseListener(new ChartPropertiesTrigger());\r\n }",
"public void setEventType(ValueExpression eventType) {\n this.eventType = eventType;\n }",
"TransitionType createTransitionType();",
"void onStyleModify() {\n\t\tif (mergedStyleSheet != null) {\n\t\t\tmergedStyleSheet = null;\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t} else if (sheets != null) {\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t}\n\t}",
"public void update(String newColor, String newStyle) throws NoSuchFieldException, IllegalAccessException, InvocationTargetException {\n Field colorF = colorClass.getDeclaredField(newColor);\n colorF.setAccessible(true);\n\n Field styleF = styleClass.getDeclaredField(newStyle);\n styleF.setAccessible(true);\n\n this.color = colorF.get(null);\n this.style = styleF.get(null);\n\n if (bossBar == null) {\n return;\n }\n\n setColor.invoke(bossBar, color);\n setStyle.invoke(bossBar, style);\n }",
"protected void setUpCharting(windowType iWinType) throws ModelException {\n int i, j;\n\n //Create each dataset with two series - an underlying white layer, and\n //another layer upon which to display the event (we only display\n //them one at a time)\n m_oDataset = new XYZSimpleDataset(2, m_iNumXCells, m_iNumYCells);\n \n //Set the first layer of the dataset to all true - this is the white\n //underlayer, and default top layer to all false\n for (i = 0; i < m_iNumXCells; i++) {\n for (j = 0; j < m_iNumYCells; j++) {\n m_oDataset.mp_bData[0][i][j] = true;\n m_oDataset.mp_bData[1][i][j] = false;\n }\n }\n //Set up the renderer to display selected cells in the underlayer in white\n m_oRenderer.setColor(255, 255, 255, 0);\n \n //Set the color based on the window type\n if (windowType.harvest == iWinType) m_oRenderer.setColor(HARVEST_COLOR, 1);\n else if (windowType.ep_mort == iWinType) m_oRenderer.setColor(MORTALITY_EPISODE_COLOR, 1);\n else if (windowType.plant == iWinType) m_oRenderer.setColor(PLANT_COLOR, 1);\n \n m_oRenderer.setXCellLength(m_fLengthXCells);\n m_oRenderer.setYCellLength(m_fLengthYCells);\n \n ChartPanel jChart = DataGrapher.makeOverlaidMap(null,\n m_oTreeDataset, \"East->\", \"\", m_iPlotLengthX,\n m_iPlotLengthY, null, m_oTreeRenderer,\n new java.awt.Dimension(Math.min(600, m_iPlotLengthX * 3),\n Math.min(600, m_iPlotLengthY * 3)));\n m_jChartPanel.add(jChart);\n m_oPlot = (XYPlot) jChart.getChart().getPlot();\n }",
"void add(VisualPropertyType calcType, Object value);",
"public FigureChangeEvent(Figure source) {\n super(source);\n rect = emptyRect;\n }",
"DatatypesType createDatatypesType();",
"public void stereotypesChanged()\n {\n \tCollection<Stereotype> stereotypes = controller.getStereotypes();\n \tCollection<Attribute> attributes = new ArrayList<Attribute>();\n \tattributes.addAll(createAttributes(stereotypes));\n \tdescriptionComposite.fillAttributeCombo(attributes);\n }",
"STYLE createSTYLE();",
"public void formatChanged()\n {\n // for now, just create formatter from scratch, but later we can just detect changes and act accordingly\n setFormatterFromTextPane(formatContainer.getSelectedFormatter());\n setHasChanged(true);\n }",
"void setDataType(int type );",
"Object accept(StyleVisitor visitor, Object extraData);",
"public void setEventType(String eventType){\n this.eventType = eventType;\n }",
"@Override\n\tpublic ViewHolder onCreateViewHolder(ViewGroup parent,\n\t\t\tint viewType) {\n\t\t// create a new view\n\t\tView v = LayoutInflater.from(parent.getContext()).inflate(R.layout.eventlayout, parent, false);\n\t\t// set the view's size, margins, paddings and layout parameters\n\t\tViewHolder vh = new ViewHolder(v);\n\t\treturn vh;\n\t}",
"ISModifyDataType createISModifyDataType();",
"protected Item createItem(Variable var, float w, float h, int event) {\n return new Plot(var, w, h, false/*defaultAnimation(event)*/);\n }",
"public void handleEvent(Event event)\n \t{\n selMarkerType = (MarkerType) event.widget.getData();\n markerType.setAttrValue( selMarkerType );\n Image icon = mu.getItem( selMarkerType.ordinal()).getImage();\n ti.setImage(icon);\n \tti.setToolTipText(selMarkerType.getDesignator());\n \t}",
"StockLossMarkerType createStockLossMarkerType();",
"protected void onColorUpdated(int type){\n if(type == ColorScheme.AUTO_COMP_PANEL_BG || type == ColorScheme.AUTO_COMP_PANEL_CORNER) {\n if(mACPanel != null)\n mACPanel.applyColor();\n return;\n }\n invalidate();\n }",
"private static void addEventTypes(Configuration cepConfig) {\n\t cepConfig.addEventType(\"Batch\", Batch.class.getName());\n\t cepConfig.addEventType(\"Span\", Span.class.getName());\n\t cepConfig.addEventType(\"Process\", Process.class.getName());\n\t cepConfig.addEventType(\"Log\", Log.class.getName());\n\t cepConfig.addEventType(\"Tag\", Tag.class.getName());\n\t cepConfig.addEventType(\"SpanRef\", SpanRef.class.getName());\n\t \n\t // SOCKET events\n\t // Metrics -> JSON influxDB\n\t // Events -> Custom definition\n\t // We register metrics and events as objects the engine will have to handle\n\t cepConfig.addEventType(\"Metric\", Metric.class.getName());\n\t cepConfig.addEventType(\"Event\", Event.class.getName());\n\t\t\n\t}",
"public interface CHANGED_TYPE {\r\n public static final int FEE = 1;\r\n public static final int GRACE_PERIOD = 2;\r\n }",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n DialogsFactory.produceCreateDcsVariableTableFromHoneywellScadaDatabaseDialog(new HoneywellScadaDatabase(new Source()));\n }",
"public void stateChanged(ChangeEvent changeEvent) {\n Color newForegroundColor = colorChooser.getColor();\n label.setForeground(newForegroundColor);\n }",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n Source source = (Source)event.getSource();\n Cloner cloner = new Cloner();\n final Source clonedSource = cloner.deepClone(source);\n \n // Create wrapper for source clone:\n final TagsSource sourceLogic = new TagsSource(clonedSource);\n \n // Create and render progress information dialog:\n sourceLogic.off(SourceEvent.THREAD_PROGRESS);\n final ProgressInformationDialog progressInformationDialog =\n new ProgressInformationDialog(sourceLogic, SourceEvent.THREAD_PROGRESS);\n progressInformationDialog.render(\"Progress information\", Main.mainForm);\n \n sourceLogic.off(SourceEvent.THREAD_ERROR);\n sourceLogic.on(SourceEvent.THREAD_ERROR, new ThreadErrorEventHandler());\n \n // Subscribe on model's source initialization event:\n sourceLogic.off(SourceEvent.SOURCE_INITIALIZED);\n sourceLogic.on(SourceEvent.SOURCE_INITIALIZED, new CustomEventListener()\n {\n @Override\n public void customEventOccurred(CustomEvent evt)\n {\n progressInformationDialog.close();\n \n if (clonedSource.getTypeId() == SourcesTypes.INTOOLS_EXPORT_DOCUMENT.ID)\n DialogsFactory.produceIntoolsExportDataSourceDialog(sourceLogic, true, \"Edit selected Intools export data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.ALARM_AND_TRIP_SCHEDULE.ID)\n DialogsFactory.produceDocumentDataSourceDialog(sourceLogic, true, \"Edit selected document data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.DCS_VARIABLE_TABLE.ID)\n DialogsFactory.produceDcsVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected DCS Variable Table data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.ESD_VARIABLE_TABLE.ID)\n DialogsFactory.produceEsdVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected ESD Variable Table data source\");\n \n if (clonedSource.getTypeId() == SourcesTypes.FGS_VARIABLE_TABLE.ID)\n DialogsFactory.produceFgsVariableTableDataSourceDialog(sourceLogic, true, \"Edit selected FGS Variable Table data source\");\n }// customEventOccurred\n });// on\n \n // Execute initialization thread:\n sourceLogic.initialize();\n }",
"protected void createVisualStates() {\r\n\t\tProbNode probNode = visualNode.getProbNode();\r\n\t\tVariable variable = probNode.getVariable();\r\n\t\tState[] states = variable.getStates();\r\n\t\tfor (int i=0; i<states.length; i++) {\r\n\t\t\tVisualState visualState = new VisualState(visualNode, i, states[i].getName());\r\n\t\t\tthis.visualStates.put(i, visualState);\r\n\t\t}\r\n\t}",
"private void createRowForNewStyleButton(Composite section)\n {\n buttonNewStyle = toolkit.createButton(section, \"New Style...\", SWT.PUSH); //$NON-NLS-1$\n buttonGridData(buttonNewStyle, SWT.TOP);\n buttonNewStyle.addSelectionListener(new SelectionListener()\n {\n public void widgetDefaultSelected(SelectionEvent e)\n {\n }\n\n public void widgetSelected(SelectionEvent e)\n {\n NewStylePopup dialog = new NewStylePopup(getShell(), documentFile, browser);\n if (dialog.open() == Dialog.OK)\n {\n if (dialog.getStyleInput() != null && dialog.getStyleInput().length() > 0)\n {\n // if the first field is not set\n if (valueToRecognizeReq == null)\n {\n valueToRecognizeReq = new Style(dialog.getStyleInput(), dialog.getRegexInput());\n reqIdComponent.setValueText(valueToRecognizeReq.getText());\n }\n else\n {\n tree.add(new Style(dialog.getStyleInput(), dialog.getRegexInput()));\n listFormat.refresh();\n }\n controller.removeDocumentType();\n updateWizard();\n }\n }\n }\n });\n }",
"@Override\r\n\tpublic Element newEvent(String source, String type, int t) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif(!mEventStarted) {\r\n\t\t\tmRoot = mDocument.createElement(\"slice\");\r\n\t\t\tmRoot.setAttribute(\"date\", Integer.toString(t));\r\n\t\t\tmDocument.appendChild(mRoot);\r\n\t\t} else if (t != mLastCycle) {\r\n\t\t\tthis.finishEvent();\r\n\t\t\tmRoot = mDocument.createElement(\"slice\");\r\n\t\t\tmRoot.setAttribute(\"date\", Integer.toString(t));\r\n\t\t\tmDocument.appendChild(mRoot);\r\n\t\t}\r\n\t\tmLastCycle = t;\r\n\t\tmEventStarted = true;\r\n\t\t\r\n\t\tmID++;\r\n\t\tmCurrentEvent = mDocument.createElement(\"event\");\r\n\t\tmCurrentEvent.setAttribute(\"id\", Integer.toString(mID));\r\n\t\tmCurrentEvent.setAttribute(\"source\", source);\r\n\t\tmCurrentEvent.setAttribute(\"date\", Integer.toString(t));\r\n\t\tElement typeElement = mDocument.createElement(\"type\");\r\n//\t\ttypeElement.setTextContent(type);\r\n\t\ttypeElement.appendChild(mDocument.createTextNode(type));\r\n\t\tmCurrentEvent.appendChild(typeElement);\r\n\t\tmRoot.appendChild(mCurrentEvent);\r\n\r\n\t\treturn mCurrentEvent;\r\n\t}",
"private void createEvents() {\n\t}",
"public void setStyle(String st){\n style = st;\n }",
"void setStyle(String style);",
"private UIEvent generateModifyEvent(){\n List<DataAttribut> dataAttributeList = new ArrayList<>();\n for(int i = 0; i< attributModel.size(); i++){\n String attribut = attributModel.elementAt(i);\n dataAttributeList.add(new DataAttribut(attribut));\n }\n //Erstellen des geänderten Produktdatums und des Events\n DataProduktDatum proposal = new DataProduktDatum(name.getText(), new DataId(id.getText()), dataAttributeList, verweise.getText());\n UIModifyProduktDatumEvent modifyEvent = new UIModifyProduktDatumEvent(dataId, proposal);\n return modifyEvent;\n }",
"boolean usesVisualizationStyles();",
"public interface AttrToVisVarChangeListener {\n\n\tpublic void valuesChanged(AttrToVisVarChangeEvent e);\n\t\n}",
"public ChangeSceneEvent(String param) {\n super(SCENE_CHANGE_EVENT_TYPE);\n this.param = param;\n }",
"public void setDataType(DataType dataType) {\n this.dataType = dataType;\n }",
"public AuditEvent(String principal, String type, Map<String, Object> data) {\n\t\tthis(Instant.now(), principal, type, data);\n\t}",
"DataType createDataType();",
"private void parseEventType() { //TODO: add a list of all the school holidays to checkfor the 'holiday' event type.\n String tempTitle = title.toLowerCase();\n if(tempTitle.contains(\"no school\") || tempTitle.contains(\"teacher's institute\") || tempTitle.contains(\"teacher's work day\") || tempTitle.contains(\"snow day\")) { //example: no school\n this.type = EventType.noSchool;\n } else if(tempTitle.contains(\"late start\")) {//example: late start wednesday\n this.type = EventType.lateStart;\n } else if(tempTitle.contains(\"last day\")) {//example last day before spring break;\n this.type = EventType.lastDayBeforeBreak;\n } else if(tempTitle.contains(\"end of\")) { //example: end of first semester\n this.type = EventType.endOf;\n } else if(tempTitle.contains(\"meeting\")) {\n this.type = EventType.meeting;\n } else {\n this.type = EventType.regular;\n }\n }",
"public void setEventType(String eventType)\n {\n this.eventType = eventType;\n }",
"private void setupSoldTicketsByEventTypeChart() {\n chartCreator.createPieChart(soldTicketsByEventTypeChart, soldTicketsByEventTypeData);\n }",
"private void setGeometry() {\n GeometryDescriptor geomDesc = featureSource.getSchema().getGeometryDescriptor();\n geometryAttributeName = geomDesc.getLocalName();\n\n Class<?> clazz = geomDesc.getType().getBinding();\n\n if (Polygon.class.isAssignableFrom(clazz) || MultiPolygon.class.isAssignableFrom(clazz)) {\n geometryType = GeomType.POLYGON;\n\n } else if (LineString.class.isAssignableFrom(clazz)\n || MultiLineString.class.isAssignableFrom(clazz)) {\n\n geometryType = GeomType.LINE;\n\n } else {\n geometryType = GeomType.POINT;\n }\n}",
"public VisualStyle createVizMapper() {\r\n\r\n\t VisualMappingManager manager =\r\n\t Cytoscape.getVisualMappingManager();\r\n\t CalculatorCatalog catalog = manager.getCalculatorCatalog();\r\n\r\n\t VisualStyle existingStyle = catalog.getVisualStyle\r\n\t (BIOMOLECULE_VISUAL_STYLE);\r\n\t \r\n\t System.out.println(\r\n\t \t\t\"Got visual style for \" + BIOMOLECULE_VISUAL_STYLE + \" = \" + \r\n\t \t\texistingStyle);\r\n\r\n\t if (existingStyle != null) {\r\n// System.out.println(\"Got existing visual style: \" + existingStyle);\r\n return null;\r\n\t } else {\r\n\t VisualStyle bpVisualStyle = new VisualStyle(BIOMOLECULE_VISUAL_STYLE);\r\n\t // AJK: 03/29/06 define fields of visual style \r\n\t System.out.println(\"defining visual style: \" + bpVisualStyle);\r\n\t defineVisualStyle (bpVisualStyle, manager, catalog);\r\n\t manager.setVisualStyle(bpVisualStyle);\r\n\r\n\t // The visual style must be added to the Global Catalog\r\n\t // in order for it to be written out to vizmap.props upon user exit\r\n\t System.out.println(\"Adding visual style \" + bpVisualStyle \r\n\t \t\t+ \" to catalog \" + catalog);\r\n\t catalog.addVisualStyle(bpVisualStyle);\r\n\t \r\n\t // for debugging\r\n//\t \t\tVisualStyle vizStyle = catalog.getVisualStyle(BIOMOLECULE_VISUAL_STYLE);\r\n//\t \t\tSystem.out.println (\"Got visual Style from catalog: \" + catalog \r\n//\t \t\t\t\t+ \" = \" + vizStyle);\r\n\t \t\t\r\n\t // try setting the visual style to BioMolecule\r\n\t Cytoscape.getDesktop().setVisualStyle(bpVisualStyle);\r\n\t return bpVisualStyle;\r\n\t }\r\n\t }",
"public /* synthetic */ void lambda$new$0() {\n this.applyColorScheduled = false;\n applyColor(this.lastPickedColor, this.lastPickedColorNum);\n this.lastPickedColorNum = -1;\n }",
"public void setStyleClass(String styleClass) {\r\n this.styleClass = styleClass;\r\n }",
"public MyInputEventHandler(final Class<?> _nodeType) {\r\n\t\tnodeType = _nodeType;\r\n\t}",
"public SerialPortEvent(SerialPort srcport, int eventtype, boolean oldvalue, boolean newvalue)\n\t{\n\t\tsuper(constructRealObject(srcport, eventtype, oldvalue, newvalue));\n\t}",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n TagsSource tagsSource = new TagsSource(new Source());\n DialogsFactory.produceDocumentDataSourceDialog(tagsSource, false, \"Create document data source manually\");\n }",
"public void dataChanged(DataChangeEvent e) {\n\t\t\t}",
"public AuditEvent(String principal, String type, String... data) {\n\t\tthis(Instant.now(), principal, type, convert(data));\n\t}",
"private void onSetColor() {\r\n\t Frame frame = JOptionPane.getFrameForComponent(getContentComponent());\r\n\t Color newColor = JColorChooser.showDialog(frame, \"Choose color\", DEF_CLUSTER_COLOR);\r\n\t if (newColor != null) {\r\n\t setClusterColor(newColor);\r\n\t }\r\n\t}",
"public void evel_thresholdcross_type_set(String type)\r\n\t{\r\n\t EVEL_ENTER();\r\n\r\n\t /***************************************************************************/\r\n\t /* Check preconditions and call evel_header_type_set. */\r\n\t /***************************************************************************/\r\n\t assert(type!=null);\r\n\t assert(event_domain == EvelHeader.DOMAINS.EVEL_DOMAIN_THRESHOLD_CROSSING);\r\n\t evel_header_type_set(type);\r\n\r\n\t EVEL_EXIT();\r\n\t}",
"public LeadershipEvent(Type type, Leadership leadership) {\n super(type, leadership);\n }",
"public void propertyChange(PropertyChangeEvent evt) {\n\t\t/*\n\t\t * String prop = evt.getPropertyName();\n\t\t * if(prop.equals(ConceptSelector.CONCEPT_SELECTED) && evt.getNewValue()\n\t\t * != null){ ReportDocument doc =\n\t\t * caseAuthor.getReportPanel().getReportDocument();\n\t\t * doc.clearBackground(); ConceptEntry entry = (ConceptEntry)\n\t\t * evt.getNewValue(); for(ConceptLabel lbl: entry.getLabels()){\n\t\t * lbl.setBackgroundColor(Color.yellow); lbl.update(doc); } }\n\t\t */\n\t}",
"public void addColorStyle(ColorStyle style){\n\t\tstyles.add(style);\n\t\tpropertyChange.firePropertyChange(PROPERTY_STYLEADD, -1, 1);\n\t}",
"@Override\n\tpublic void setDataType(Class<?> dataType) {\n\t\t\n\t}",
"public native final EditorBaseEvent fontColor(String val) /*-{\n\t\tthis.fontColor = val;\n\t\treturn this;\n\t}-*/;",
"@Override\n public void customEventOccurred(CustomEvent event)\n {\n DialogsFactory.produceCreateDataSourceFromExcelDialog(new ExcelBook(new Source()));\n }",
"void diagramAdded(ProjectEvent event);",
"AxisType createAxisType();",
"public void awaleChanged(Awale awale, short eventType, short row,\r\n\t short column);",
"DatatypeType createDatatypeType();",
"void setDatty(Datty newDatty);",
"public Event(int type) {\n this.type=type;\n this.arg=null;\n }",
"public ScGridColumn<AcActionAutoCorrectedLog> newScannedTypeColumn()\n {\n return newScannedTypeColumn(\"Scanned Type\");\n }"
] | [
"0.5399355",
"0.53940237",
"0.51531756",
"0.51486385",
"0.50781626",
"0.50185513",
"0.49961916",
"0.4988988",
"0.49605373",
"0.4941747",
"0.48811182",
"0.48421803",
"0.48131946",
"0.47960234",
"0.4793008",
"0.47505045",
"0.47257826",
"0.47139195",
"0.471344",
"0.47101974",
"0.468285",
"0.4671943",
"0.46613127",
"0.46340898",
"0.4628455",
"0.46273348",
"0.46180555",
"0.45615783",
"0.45607054",
"0.45577535",
"0.45414016",
"0.45063528",
"0.44925547",
"0.44812962",
"0.4474006",
"0.4456718",
"0.44349012",
"0.44337034",
"0.44330245",
"0.44197583",
"0.44146433",
"0.4409717",
"0.44079575",
"0.44006783",
"0.43929255",
"0.43912894",
"0.43908048",
"0.43764165",
"0.4356858",
"0.43547776",
"0.435384",
"0.43526292",
"0.4352262",
"0.43522266",
"0.43507975",
"0.43459526",
"0.43452767",
"0.4338672",
"0.43354893",
"0.43352962",
"0.4331655",
"0.43133327",
"0.43048468",
"0.42982695",
"0.42933127",
"0.4281234",
"0.42806178",
"0.42698273",
"0.42689705",
"0.42598653",
"0.42575923",
"0.4253592",
"0.42513683",
"0.4243736",
"0.4236218",
"0.42332572",
"0.4230839",
"0.42255515",
"0.42167008",
"0.42158538",
"0.4214697",
"0.42007488",
"0.41990295",
"0.4193013",
"0.41926038",
"0.4187025",
"0.41791034",
"0.41783068",
"0.41732916",
"0.41695172",
"0.41678923",
"0.41663295",
"0.41642228",
"0.41565642",
"0.41554064",
"0.41495565",
"0.41481924",
"0.4147643",
"0.41475737",
"0.4144676"
] | 0.68439716 | 0 |
Gets the dTI key. | public String getDTIKey()
{
return myDTIKey;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String getKey(){\n\t\treturn key;\n\t}",
"public String getTdKey() {\r\n return tdKey;\r\n }",
"public static String getKey() {\t\t\n\t\treturn key;\n\t}",
"public String getKey() {\r\n return getAttribute(\"id\");\r\n }",
"public String getKey() {\n\t\treturn id + \"\";\n\t}",
"public String getKey(){\n\t\treturn key;\n\t}",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey()\n\t{\n\t\treturn key;\n\t}",
"public final String getKey() {\n return key;\n }",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"String getKey();",
"public String getKey()\n\t\t{\n\t\t\treturn key;\n\t\t}",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey() {\r\n return key;\r\n }",
"public String getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\r\n\t\treturn key;\r\n\t}",
"public String getKey() {\n\t\treturn key;\n\t}",
"public String getKey() {\n\t\treturn key;\n\t}",
"public String getKey() {\n\t\treturn key;\n\t}",
"public long getKeyID()\n {\n return keyID;\n }",
"public String getKey();",
"public String getKey();",
"public String getKey();",
"public String getKey();",
"public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}",
"public String getKey() {\n\treturn key;\n }",
"public String getKey() {\n return key;\n }",
"public String getKey()\n\t{\n\t\treturn this.key;\n\t}",
"public double getKey() {\n\t\treturn key;\n\t}",
"public String getKey() { \n\t\treturn getKeyElement().getValue();\n\t}",
"Object getKey();",
"public Object getKey() {\r\n return key;\r\n }",
"public Object getKey()\n {\n return key;\n }",
"public String getKey()\r\n {\r\n return getValue().toString();\r\n }",
"public String key() {\n return key;\n }",
"public String key() {\n return key;\n }",
"default String getKey() {\n return key(getClassName(), getName());\n }",
"public Key getKey()\r\n { \r\n return key; \r\n }",
"public IdDt getKeyElement() { \n\t\tif (myKey == null) {\n\t\t\tmyKey = new IdDt();\n\t\t}\n\t\treturn myKey;\n\t}",
"public Key getKey() {\n\t\treturn key;\n\t}",
"public String getKey() {\n\t\treturn this.key;\n\t}",
"public String getKey() {\n\t\treturn this.key;\n\t}",
"public String getKey() {\n\t\treturn this.key;\n\t}",
"public String getItskey() {\n return itskey;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n return this.key;\n }",
"public String getKey() {\n\n return this.key;\n }",
"@Override\n\tpublic String getKey() {\n\t\treturn key;\n\t}",
"public Object getKey() {\n return key;\n }",
"public IdKey getKey() {\n return idKey;\n }",
"@Nullable public String getKey() {\n return key;\n }",
"public Key getKey() {\n return Key.of(getTone(), getQuality());\n }",
"private String getKey()\r\n\t\t{\r\n\t\t\tif (key != null)\r\n\t\t\t{\r\n\t\t\t\treturn key.toString();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn \"The key has not been found\";\r\n\t\t\t}\r\n\t\t}",
"public String getKey() {\n\t\tString t = doc.get(\"key\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}",
"java.lang.String getClientKey();",
"public int getKey() {\r\n return key;\r\n }",
"String key();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getKey();",
"java.lang.String getCdkey();",
"public String keyIdentifier() {\n return this.keyIdentifier;\n }",
"public String keyIdentifier() {\n return this.keyIdentifier;\n }",
"@Override\n\tpublic String getKey() {\n\t\treturn getCid();\n\t}",
"public String getKey(DLabel key) {\n return key.getKey();\n }",
"public int getKey() {\n return key;\n }"
] | [
"0.7295781",
"0.7282687",
"0.7269462",
"0.71298474",
"0.711567",
"0.709184",
"0.70750225",
"0.70750225",
"0.70750225",
"0.7067739",
"0.70514905",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7048292",
"0.7045022",
"0.70424324",
"0.70424324",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70339",
"0.70305455",
"0.7027957",
"0.7027957",
"0.7027957",
"0.70268327",
"0.70268327",
"0.70268327",
"0.7020371",
"0.70033175",
"0.70033175",
"0.70033175",
"0.70033175",
"0.69977546",
"0.6982293",
"0.697805",
"0.6911604",
"0.6893766",
"0.6892749",
"0.6887369",
"0.6871633",
"0.6865304",
"0.6862053",
"0.68557465",
"0.68557465",
"0.6851554",
"0.68508935",
"0.68501055",
"0.68428874",
"0.6836603",
"0.6836603",
"0.6836603",
"0.6830575",
"0.68303305",
"0.68303305",
"0.68303305",
"0.68303305",
"0.68303305",
"0.68303305",
"0.68092",
"0.6805799",
"0.68040794",
"0.6797709",
"0.67903316",
"0.678575",
"0.6780005",
"0.6779911",
"0.6773188",
"0.67661273",
"0.67636514",
"0.67625797",
"0.6755261",
"0.6755261",
"0.6755261",
"0.6755261",
"0.6755261",
"0.6755261",
"0.6750146",
"0.6724354",
"0.6724354",
"0.6696477",
"0.6691056",
"0.6682106"
] | 0.84866697 | 1 |
Gets the mgs class. | public Class<? extends VisualizationSupport> getMGSClass()
{
return myMGSClass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getGodClass()\r\n {\r\n return mGodClass;\r\n }",
"public java.lang.String getMDCLASS() {\n return MDCLASS;\n }",
"Class getGmMacroClass();",
"public Class<? extends Geometry> getTargetClass() {\n\n\t\tint index = comboGeometryList.getSelectionIndex();\n\t\tString geomName;\n\t\tClass<? extends Geometry> geomClass;\n\n\t\tif (index != -1) {\n\t\t\tgeomName = comboGeometryList.getItem(index);\n\t\t\tgeomClass = (Class<? extends Geometry>) comboGeometryList.getData(geomName);\n\t\t\treturn geomClass;\n\t\t}\n\n\t\treturn null;\n\t}",
"public Class getJavaClass() {\n return _class;\n }",
"public abstract Class<? extends AbstractMinigame<?, ?>> getMinigameClass();",
"public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/manageable/modelAdapter/ReporterMBean\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }",
"public MHCClass getMHCClass() {\n return mhcClass;\n }",
"@objid (\"b50713a4-4ea7-430f-95b3-a861a4c13ea4\")\n public static SmClass getSmClass() {\n return smClass;\n }",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"Object getClass_();",
"Object getClass_();",
"@objid (\"e543d413-d698-4651-a831-da82b73a7604\")\n public static SmClass getSmClass() {\n return smClass;\n }",
"public java.lang.String getJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }",
"@objid (\"687ec4aa-919f-469d-8e57-b7e39c2aaea4\")\n public static SmClass getSmClass() {\n return smClass;\n }",
"public String getCGClassID() {\n return cgClassID;\n }",
"@objid (\"a4645b3c-c71e-4bc2-8757-51fceafe0adc\")\n public static SmClass getSmClass() {\n return smClass;\n }",
"public int getWMC_class() {\n\t\treturn this.WMC_class;\n\t}",
"public String getName_Class() {\n\t\treturn name;\n\t}",
"public String getClassname() {\n return classname;\n }",
"@ZAttr(id=1112)\n public String getGalLdapGroupHandlerClass() {\n return getAttr(Provisioning.A_zimbraGalLdapGroupHandlerClass, null);\n }",
"public Class typeClass() {\n if (myClass == null) myClass = AST.globalSymbolTable.classForName(name);\n return myClass;\n }",
"public static String getClassName() {\n return CLASS_NAME;\n }",
"public String getClassType() {\n return classType;\n }",
"String getClassName();",
"String getClassName();",
"String getClassName();",
"public String getClassName();",
"public String getFClass() {\n\t\t\treturn this.fClass ;\n\t\t}",
"public Class<?> getClazz() {\n return clazz;\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.class;\n }",
"public Class getRecyclerClass() \n\t{\n\treturn fClass;\n\t}",
"public String getClassname() {\n\t\treturn classname;\n\t}",
"public Class getInstanceClass()\n {\n return _cl;\n }",
"public Class getTypeClass() {\r\n\t\treturn (typeClass);\r\n\t}",
"public String getCls() {\n\t\tif (null != this.cls) {\n\t\t\treturn this.cls;\n\t\t}\n\t\tValueExpression _ve = getValueExpression(\"cls\");\n\t\tif (_ve != null) {\n\t\t\treturn (String) _ve.getValue(getFacesContext().getELContext());\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}",
"public String getClassname()\r\n {\r\n return m_classname;\r\n }",
"public Class<?> getGeneratorClass() {\n return generatorClass;\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.EntrySet.class;\n }",
"public String getRuntimeClass();",
"public String getRandomClass() {\n return _randomClass;\n }",
"public Class getExtClass(){\n\t\treturn clas;\n\t}",
"public Class<?> getJavaClass() {\n return clazz;\n }",
"public String getClazz();",
"java.lang.String getClassName();",
"public ClassifyDynamics GetClassDynm() {\n\t\treturn this.class_dynm;\n\t}",
"public ClassManager getClassManager()\n {\n return this.classManager;\n }",
"String getClassName() {\n return mClassName;\n }",
"public String getClassName(){\n\t\treturn classname;\n\t}",
"public String getClassName()\n {\n return className;\n }",
"public Klass getKlass() {\r\n return klass;\r\n }",
"public String getClassName()\n {\n return _className;\n }",
"public final String getClassAttribute() {\n return getAttributeValue(\"class\");\n }",
"public org.apache.xmlbeans.XmlNMTOKEN xgetJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNMTOKEN target = null;\r\n target = (org.apache.xmlbeans.XmlNMTOKEN)get_store().find_attribute_user(JAVACLASS$24);\r\n return target;\r\n }\r\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() { return className; }",
"String getClazz();",
"public String getClassName()\n {\n return this.className;\n }",
"public String getClassName() {\r\n return className;\r\n }",
"public String getType() {\n\t\treturn \"class\";\n\t}",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.KeySet.class;\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.Values.class;\n }",
"public String getClassName() {\n return super.getClassName();\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.EntrySet.Entry.class;\n }",
"public String metadataClass() {\n return this.metadataClass;\n }",
"public Class<?> clazz()\n {\n return clazz;\n }",
"public String getClassName () { return _className; }",
"public String getClassName(){\n\t\treturn targetClass.name;\n\t}",
"public String getClassName() {\n return this.className;\n }",
"public String getClassName() {\n return this.className;\n }",
"public Class getObjectClass() {\n return objectFactory.getClassForPath(Collections.emptyList());\n }",
"public String getObjectClass() {\n return objectClass;\n }",
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"public String getClazzName();",
"public MoC getContentClass() {\r\n \t\tMoC clasz = null;\r\n \r\n \t\tif (isActor()) {\r\n \t\t\tclasz = actor.getMoC();\r\n \t\t} else {\r\n \t\t\tclasz = network.getMoC();\r\n \t\t}\r\n \r\n \t\treturn clasz;\r\n \t}",
"default String getClassName() {\n return declaringType().getClassName();\n }",
"public short getClazz() {\n return clazz;\n }",
"String getInstanceOfClass();",
"public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }",
"public final Class<?> mo14295e() {\n return this.f9912b.getClass();\n }",
"public String getModuleTypeClass();",
"public final Class<T> getRawClass() {\n if (class_ == null) {\n class_ = getClass(type_);\n }\n return class_;\n }",
"protected String getClassName() {\n return getDescriptedClass().getName();\n }",
"public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security$RefAction\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }",
"public static Class get_CLASS()\n {\n return WrapperMap.EntrySet.Iterator.class;\n }",
"public static com.matisse.reflect.MtClass getClass(com.matisse.MtDatabase db) {\n return (com.matisse.reflect.MtClass)db.getCachedObject(CID);\n }",
"public GestureClass getGestureClass(){\r\n return gestureClass;\r\n }",
"String getClassName() {\n return this.className;\n }",
"String getMetadataClassName();",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public static Class getStorageClass()\r\n {\r\n return String.class;\r\n }",
"public java.lang.String getServiceClass() {\n return serviceClass;\n }"
] | [
"0.70668346",
"0.68255824",
"0.67910945",
"0.66122025",
"0.6570823",
"0.65655375",
"0.65630525",
"0.65580404",
"0.6537107",
"0.65347046",
"0.65347046",
"0.6516674",
"0.6516674",
"0.65133184",
"0.6509493",
"0.6494341",
"0.64922744",
"0.64556134",
"0.64546144",
"0.6447395",
"0.64196587",
"0.64125425",
"0.6411961",
"0.64053565",
"0.6403562",
"0.63913023",
"0.63913023",
"0.63913023",
"0.6389196",
"0.6364256",
"0.63565856",
"0.63525254",
"0.63296825",
"0.62975615",
"0.62939364",
"0.6284569",
"0.6275928",
"0.6266604",
"0.6262573",
"0.62516797",
"0.6242311",
"0.62251157",
"0.6222583",
"0.6215077",
"0.6199596",
"0.61978465",
"0.61857945",
"0.61843836",
"0.6178143",
"0.61778945",
"0.61749035",
"0.61717045",
"0.61712444",
"0.6151246",
"0.61298794",
"0.6124105",
"0.61239195",
"0.61172116",
"0.6088289",
"0.6084139",
"0.6078452",
"0.6064074",
"0.6064074",
"0.6064074",
"0.6064074",
"0.6064074",
"0.6064074",
"0.60633963",
"0.6059891",
"0.6052635",
"0.60471314",
"0.6042384",
"0.60170865",
"0.60038257",
"0.6000857",
"0.599806",
"0.599806",
"0.59930575",
"0.59812963",
"0.59777266",
"0.5977469",
"0.5972531",
"0.59682846",
"0.5965305",
"0.5962983",
"0.59619826",
"0.59409606",
"0.59345",
"0.5932312",
"0.59299475",
"0.5924913",
"0.5918713",
"0.59129125",
"0.590423",
"0.58976877",
"0.5888778",
"0.5887844",
"0.5887844",
"0.58858067",
"0.58792424"
] | 0.81206435 | 0 |
Gets the new style. | public VisualizationStyle getNewStyle()
{
return myNewStyle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Style getStyle();",
"public String getStyleNew() {\n return (String) getAttributeInternal(STYLENEW);\n }",
"public VisualizationStyle getOldStyle()\r\n {\r\n return myOldStyle;\r\n }",
"public String getStyle() {\r\n return style;\r\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getCurrentStyle() {\n modifyStyleIfRequested();\n return currentStyle;\n }",
"public int getStyle() {\n\treturn style;\n }",
"public int getStyle() {\r\n\t\treturn style;\r\n\t}",
"public String getStyle() {\n\t\treturn style;\n\t}",
"public int getStyle() {\r\n\t\treturn this.style;\r\n\t}",
"public abstract String getStyle();",
"public RMTextStyle getStyle()\n {\n return new RMTextStyle(_style);\n }",
"public TextStyle getStyle(\n )\n {return style;}",
"STYLE createSTYLE();",
"public abstract BossStyle getStyle();",
"public String getStyle() {\r\n if (style != null) {\r\n return style;\r\n }\r\n ValueBinding vb = getValueBinding(\"style\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) : null;\r\n }",
"private Style getStyle(InstanceWaypoint context) {\n \t\tStyleService ss = (StyleService) PlatformUI.getWorkbench().getService(StyleService.class);\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\t\n \t\tInstanceReference ref = context.getValue();\n \t\tInstance instance = is.getInstance(ref);\n \t\t\n \t\treturn ss.getStyle(instance.getDefinition(), ref.getDataSet());\n \t}",
"public S create() {\n\t\tS style = createDefault();\n\t\tint id = nextID();\n\t\tstyle.setId(id);\n\t\taddStyle(style);\n\t\treturn style;\n\t}",
"public final String getStyleAttribute() {\n return getAttributeValue(\"style\");\n }",
"public NodeStyle getStyle() {\n return style;\n }",
"public StyleId getStyleId ();",
"public abstract TC createStyle();",
"private OOBibStyle getSelectedStyle() {\n if (selectionModel.getSelected().size() > 0) {\n return selectionModel.getSelected().get(0);\n } else {\n return null;\n }\n }",
"public CodeStyle getStyle(){\r\n\t\treturn m_style;\r\n\t}",
"final public String getStyleClass()\n {\n return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));\n }",
"public String getColorStyle() {\n return colorStyle;\n }",
"public StylePanel getStylePanel();",
"public String getStyles() {\n return getState().styles;\n }",
"public FontStyle getStyle();",
"public boolean isNewIsDefaultStyle()\r\n {\r\n return myNewIsDefaultStyle;\r\n }",
"protected static Style getStyle(XMLDataObject xml) {\n\n Style style = new Style();\n style.setName(xml.getString(\"@name\"));\n style.setValue(getCssString(xml));\n\n return style;\n }",
"@Override\n public String getCSSStyle() {\n return null;\n }",
"@Override\r\n\tpublic String getStyleName() {\r\n\t\treturn _hSplit.getStyleName();\r\n\t}",
"@Override\n protected String getStyle() {\n return App.getInstance().getThemeCssFileName();\n\n }",
"public MarkStyle[] getStyles() {\n return styles_;\n }",
"public final LineStyle getStyle(){\n return LineStyleUtils.getLineStyle(stroke);\n }",
"public BoardStyle getChosenStyle() {\n\t\treturn boardStyle;\n\t}",
"public StyleAbstractFactory getStyleFactory() {\r\n\t\t// Leggo da file esterno quale Factory utilizzare\r\n String stile = ULeggiDaFile.getStileInterfaccia();\r\n // Factory da restituire\r\n StyleAbstractFactory styleAbstractFactory;\r\n switch (stile) {\r\n\t\tcase \"light\":\r\n\t\t\tstyleAbstractFactory = LightStyleFactory.getInstance();\r\n\t\t\tbreak; \r\n\t\tcase \"dark\":\r\n\t\t\tstyleAbstractFactory = DarkStyleFactory.getInstance();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// Di default fornisco la factory \"light\"\r\n\t\t\tstyleAbstractFactory = LightStyleFactory.getInstance();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn styleAbstractFactory;\r\n\t}",
"public String getStyleName() {\r\n return getAttributeAsString(\"styleName\");\r\n }",
"public ColorStyle getColorStyle(int i){\n\t\tif(i >=0 && i < styles.size()) return styles.get(i);\n\t\treturn null;\n\t}",
"public NodeStyle getCalculatedStyle() {\n return calculatedStyle;\n }",
"private static String getStyleClass(Object obj) { return ((MetaData)obj).getStyle(); }",
"private String getStyleAttribute() {\n StringBuilder sb = new StringBuilder();\n\n styleAttribute.forEach((key, value) -> {\n sb.append(key).append(\":\").append(value).append(\";\");\n });\n\n return sb.toString();\n }",
"public java.lang.String getStyleId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLEID$30);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"NodeStyle getOwnedStyle();",
"public static Style get(SoState state)\n { return Style.fromValue(SoInt32Element.get(classStackIndexMap.get(SoPickStyleElement.class), state)); }",
"public String getColorNew() {\n return (String) getAttributeInternal(COLORNEW);\n }",
"public static Style getDefault() { return Style.SHAPE; }",
"public ComboBoxWrapper getParseStyle() {\r\n return new ComboBoxWrapper() {\r\n public Object getCurrentObject() {\r\n return parseStyle;\r\n }\r\n\r\n public Object[] getObjects() {\r\n return ParseStyle.values();\r\n }\r\n };\r\n }",
"public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}",
"public String getStyleClass() {\r\n return Util.getQualifiedStyleClass(this,\r\n styleClass, \r\n CSS_DEFAULT.OUTPUT_CHART_DEFAULT_STYLE_CLASS,\r\n \"styleClass\");\r\n }",
"protected Stylesheet stylesheet () {\n return SimpleStyles.newSheet();\n }",
"public ParseStyle getTheParseStyle() {\r\n return parseStyle;\r\n }",
"public final StyleStyle dup() {\r\n // don't use an ODXMLDocument attribute, search for our document in an ODPackage, that way\r\n // even if our element changes document (toSingle()) we will find the proper ODXMLDocument\r\n final ODXMLDocument xmlFile = this.pkg.getXMLFile(this.getElement().getDocument());\r\n final String unusedName = xmlFile.findUnusedName(getFamily(), this.desc == null ? this.getName() : this.desc.getBaseName());\r\n final Element clone = (Element) this.getElement().clone();\r\n clone.setAttribute(\"name\", unusedName, this.getSTYLE());\r\n JDOMUtils.insertAfter(this.getElement(), singleton(clone));\r\n return this.desc == null ? new StyleStyle(this.pkg, clone) : this.desc.create(this.pkg, clone);\r\n }",
"@Override\n\tpublic StyleDatabase getStyleDatabase() {\n\t\tStyleDatabase sdb = null;\n\t\tif (targetMedium != null) {\n\t\t\tDeviceFactory df = getStyleSheetFactory().getDeviceFactory();\n\t\t\tif (df != null) {\n\t\t\t\tsdb = df.getStyleDatabase(targetMedium);\n\t\t\t}\n\t\t}\n\t\treturn sdb;\n\t}",
"public GrepStyle getGrepStyle()\n\t{\n\t\treturn grepStyle;\n\t}",
"public SimpleStyle copy() {\n\t\tSimpleStyle simpleStyle = new SimpleStyle();\n\t\tcopyIn(simpleStyle);\n\t\treturn simpleStyle;\n\t}",
"public CellStyle createCellStyle() {\n\t\treturn null;\n\t}",
"public int getCellStyle() {\n if (cellStyle != null) {\n return cellStyle;\n }\n setCellStyle(getCellStyle(clazz));\n return cellStyle;\n }",
"@Override\n\tpublic String getStyleClass() {\n\n\t\t// getStateHelper().eval(PropertyKeys.styleClass, null) is called because\n\t\t// super.getStyleClass() may return the styleClass name of the super class.\n\t\tString styleClass = (String) getStateHelper().eval(PropertyKeys.styleClass, null);\n\n\t\treturn com.liferay.faces.util.component.ComponentUtil.concatCssClasses(styleClass, \"showcase-output-source-code\", \"prettyprint linenums\");\n\t}",
"public org.sirius.client.win32.core.types.Dword getDwStyle() {\n return dwStyle;\n }",
"public RMColor getColor()\n {\n return getStyle().getColor();\n }",
"public final Pen changeStyle(LineStyle style) {\n Color resultColor = this.color;\n BasicStroke resultStroke = LineStyleUtils.getStroke(style, stroke.getLineWidth());\n return new Pen(resultStroke, resultColor);\n }",
"UiStyle getUiStyle();",
"public Symbol getConnectionStyleSnapshot();",
"public native final String style(String name) /*-{\n\t\treturn this.style(name);\n\t}-*/;",
"protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}",
"public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }",
"public int getLineStyle() {\r\n return LineStyle;\r\n }",
"public void setStyle(String st){\n style = st;\n }",
"public TextStyle getTextStyle() {\n return this.textStyle;\n }",
"@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"{\");\n if (getStyle() != null)\n sb.append(\"Style: \").append(getStyle());\n sb.append(\"}\");\n return sb.toString();\n }",
"public final boolean hasStyle() {\n return hasStyle;\n }",
"public mxStyleSheet getLineStyle()\n\t{\n\t\treturn lineStyle;\n\t}",
"private OdfNumberTimeStyle newTimeStyle() {\n\t\tOdfFileDom dom = (OdfFileDom) timeElement.getOwnerDocument();\n\t\tOdfOfficeAutomaticStyles styles = null;\n\t\tif (dom instanceof OdfContentDom) {\n\t\t\tstyles = ((OdfContentDom) dom).getAutomaticStyles();\n\t\t} else if (dom instanceof OdfStylesDom) {\n\t\t\tstyles = ((OdfStylesDom) dom).getAutomaticStyles();\n\t\t}\n\t\tOdfNumberTimeStyle newStyle = dom.newOdfElement(OdfNumberTimeStyle.class);\n\t\tnewStyle.setStyleNameAttribute(newUniqueStyleName(styles));\n\t\tstyles.appendChild(newStyle);\n\t\treturn newStyle;\n\t}",
"private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}",
"public StringItemStyle getStringStyle() {\r\n\t\treturn stringStyle;\r\n\t}",
"StyleValue getCSSValue();",
"private Style createDefaultStyle() {\n Rule rule = createRule(LINE_COLOUR, FILL_COLOUR); //utilizamos las definiciones anteriores\n\n FeatureTypeStyle fts = sf.createFeatureTypeStyle();\n fts.rules().add(rule);\n\n Style style = sf.createStyle();\n style.featureTypeStyles().add(fts);\n return style;\n}",
"public static ScriptStyle getStyle(int val)\r\n/* 31: */ {\r\n/* 32: 92 */ for (int i = 0; i < styles.length; i++) {\r\n/* 33: 94 */ if (styles[i].getValue() == val) {\r\n/* 34: 96 */ return styles[i];\r\n/* 35: */ }\r\n/* 36: */ }\r\n/* 37:100 */ return NORMAL_SCRIPT;\r\n/* 38: */ }",
"private int[] getStyle(int index) {\n\t\tif (m_styleOffsets==null || m_styles==null ||\n\t\t\tindex>=m_styleOffsets.length)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tint offset=m_styleOffsets[index]/4;\n\t\tint style[];\n\t\t{\n\t\t\tint count=0;\n\t\t\tfor (int i=offset;i<m_styles.length;++i) {\n\t\t\t\tif (m_styles[i]==-1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcount+=1;\n\t\t\t}\n\t\t\tif (count==0 || (count%3)!=0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tstyle=new int[count];\n\t\t}\n\t\tfor (int i=offset,j=0;i<m_styles.length;) {\n\t\t\tif (m_styles[i]==-1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstyle[j++]=m_styles[i++];\n\t\t}\n\t\treturn style;\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.STGuid xgetStyleId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.STGuid target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.STGuid)get_store().find_attribute_user(STYLEID$30);\n return target;\n }\n }",
"public java.lang.String getStyleName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLENAME$32);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"Object getInitialOverride(QName styleName, VerifierContext context);",
"public interface Style extends CssResource {\n\t\t/**\n\t\t * Returns tabTyle\n\t\t */\n\t\tString tabStyle();\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle getSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().find_element_user(SWCELL$20, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }",
"public Encoding setStyle(String value) {\n\t\tstyle = value;\n\t\treturn this;\n\t}",
"public void getStyles() {\n\t\tvisit(mElement);\n\t}",
"public java.util.List getStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLECODE$16);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }",
"public java.util.List getStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLECODE$16);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }",
"StyleSheet createStyleSheet();",
"public long getStyleCount() {\n return ByteUtils.toUnsignedInt(styleCount);\n }",
"public HSSFCellStyle getStyle(HSSFWorkbook workbook) {\r\n\t\t// Set font\r\n\t\tHSSFFont font = workbook.createFont();\r\n\t\t// Set font size\r\n\t\t// font.setFontHeightInPoints((short)10);\r\n\t\t// Bold font\r\n\t\t// font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);\r\n\t\t// Set font name\r\n\t\tfont.setFontName(\"Courier New\");\r\n\t\t// Set the style;\r\n\t\tHSSFCellStyle style = workbook.createCellStyle();\r\n\t\t// Set the bottom border;\r\n\t\tstyle.setBorderBottom(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the bottom border color;\r\n\t\tstyle.setBottomBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Set the left border;\r\n\t\tstyle.setBorderLeft(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the left border color;\r\n\t\tstyle.setLeftBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Set the right border;\r\n\t\tstyle.setBorderRight(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the right border color;\r\n\t\tstyle.setRightBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Set the top border;\r\n\t\tstyle.setBorderTop(HSSFCellStyle.BORDER_THIN);\r\n\t\t// Set the top border color;\r\n\t\tstyle.setTopBorderColor(HSSFColor.BLACK.index);\r\n\t\t// Use the font set by the application in the style;\r\n\t\tstyle.setFont(font);\r\n\t\t// Set auto wrap;\r\n\t\tstyle.setWrapText(false);\r\n\t\t// Set the style of horizontal alignment to center alignment;\r\n\t\tstyle.setAlignment(HSSFCellStyle.ALIGN_CENTER);\r\n\t\t// Set the vertical alignment style to center alignment;\r\n\t\tstyle.setVerticalAlignment(HSSFCellStyle.VERTICAL_CENTER);\r\n\r\n\t\treturn style;\r\n\r\n\t}",
"public String getRowUiStyle() {\r\n return uiRowStyle;\r\n }",
"@DISPID(-2147418038)\n @PropGet\n ms.html.IHTMLStyle style();",
"void setStyle(String style);",
"public Style[] getStylesPreOrder()\n\t{\n\t\tArrayList collect = new ArrayList();\n\t\tStyle root = getStyle(\"base\");\n\t\tcollectStyles(root,collect);\n\t\tStyle[] result = new Style[collect.size()];\n\t\tcollect.toArray(result);\n\t\treturn result;\n\t}"
] | [
"0.80037445",
"0.7916811",
"0.78532344",
"0.7837553",
"0.778576",
"0.778576",
"0.778576",
"0.778576",
"0.77640754",
"0.77362293",
"0.7704955",
"0.7626065",
"0.7540812",
"0.7477853",
"0.7436393",
"0.7294325",
"0.7213739",
"0.7148834",
"0.69813746",
"0.6934046",
"0.69283116",
"0.6898375",
"0.68922466",
"0.68726164",
"0.68371296",
"0.68340033",
"0.67950934",
"0.67757934",
"0.66987526",
"0.66726077",
"0.6647118",
"0.6646883",
"0.6616825",
"0.65782773",
"0.6510899",
"0.6474979",
"0.645404",
"0.6451859",
"0.6447416",
"0.6413914",
"0.63847435",
"0.6373567",
"0.63289726",
"0.62947893",
"0.6263724",
"0.625349",
"0.6250377",
"0.62456083",
"0.6239255",
"0.6205453",
"0.6198603",
"0.6195992",
"0.6188278",
"0.616985",
"0.61451143",
"0.61230606",
"0.61182714",
"0.61053234",
"0.6104749",
"0.60991687",
"0.6091669",
"0.6091481",
"0.6075739",
"0.607461",
"0.6067053",
"0.6064283",
"0.6041733",
"0.60114956",
"0.6006743",
"0.5997043",
"0.59889466",
"0.5980775",
"0.59749085",
"0.59621114",
"0.5961832",
"0.5951796",
"0.59485596",
"0.5948323",
"0.59032464",
"0.58816135",
"0.58618265",
"0.58452743",
"0.58370525",
"0.5836092",
"0.5832651",
"0.5822244",
"0.58169305",
"0.5808432",
"0.5754993",
"0.5744235",
"0.5738877",
"0.573643",
"0.573643",
"0.5731639",
"0.5726663",
"0.57256484",
"0.57181466",
"0.5717533",
"0.57134116",
"0.56927574"
] | 0.85217655 | 0 |
Gets the old style. | public VisualizationStyle getOldStyle()
{
return myOldStyle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getStyleNew() {\n return (String) getAttributeInternal(STYLENEW);\n }",
"public VisualizationStyle getNewStyle()\r\n {\r\n return myNewStyle;\r\n }",
"public String getCurrentStyle() {\n modifyStyleIfRequested();\n return currentStyle;\n }",
"public int getStyle() {\n\treturn style;\n }",
"public String getStyle() {\r\n return style;\r\n }",
"Style getStyle();",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public int getStyle() {\r\n\t\treturn style;\r\n\t}",
"public String getStyle() {\n\t\treturn style;\n\t}",
"public int getStyle() {\r\n\t\treturn this.style;\r\n\t}",
"public abstract String getStyle();",
"public RMTextStyle getStyle()\n {\n return new RMTextStyle(_style);\n }",
"public String getStyles() {\n return getState().styles;\n }",
"public TextStyle getStyle(\n )\n {return style;}",
"public abstract BossStyle getStyle();",
"public String getStyle() {\r\n if (style != null) {\r\n return style;\r\n }\r\n ValueBinding vb = getValueBinding(\"style\");\r\n return vb != null ? (String) vb.getValue(getFacesContext()) : null;\r\n }",
"final public String getStyleClass()\n {\n return ComponentUtils.resolveString(getProperty(STYLE_CLASS_KEY));\n }",
"public CodeStyle getStyle(){\r\n\t\treturn m_style;\r\n\t}",
"public final String getStyleAttribute() {\n return getAttributeValue(\"style\");\n }",
"private OOBibStyle getSelectedStyle() {\n if (selectionModel.getSelected().size() > 0) {\n return selectionModel.getSelected().get(0);\n } else {\n return null;\n }\n }",
"public MarkStyle[] getStyles() {\n return styles_;\n }",
"private Style getStyle(InstanceWaypoint context) {\n \t\tStyleService ss = (StyleService) PlatformUI.getWorkbench().getService(StyleService.class);\n \t\tInstanceService is = (InstanceService) PlatformUI.getWorkbench().getService(InstanceService.class);\n \t\t\n \t\tInstanceReference ref = context.getValue();\n \t\tInstance instance = is.getInstance(ref);\n \t\t\n \t\treturn ss.getStyle(instance.getDefinition(), ref.getDataSet());\n \t}",
"RGB getOldColor();",
"public StyleId getStyleId ();",
"@Override\n public String getCSSStyle() {\n return null;\n }",
"public String getColorStyle() {\n return colorStyle;\n }",
"@Override\n protected String getStyle() {\n return App.getInstance().getThemeCssFileName();\n\n }",
"public FontStyle getStyle();",
"public String getStyleName() {\r\n return getAttributeAsString(\"styleName\");\r\n }",
"public String getCurrentcss() {\n return clean(currentcss);\n }",
"public boolean isNewIsDefaultStyle()\r\n {\r\n return myNewIsDefaultStyle;\r\n }",
"private int[] getStyle(int index) {\n\t\tif (m_styleOffsets==null || m_styles==null ||\n\t\t\tindex>=m_styleOffsets.length)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tint offset=m_styleOffsets[index]/4;\n\t\tint style[];\n\t\t{\n\t\t\tint count=0;\n\t\t\tfor (int i=offset;i<m_styles.length;++i) {\n\t\t\t\tif (m_styles[i]==-1) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcount+=1;\n\t\t\t}\n\t\t\tif (count==0 || (count%3)!=0) {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\tstyle=new int[count];\n\t\t}\n\t\tfor (int i=offset,j=0;i<m_styles.length;) {\n\t\t\tif (m_styles[i]==-1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tstyle[j++]=m_styles[i++];\n\t\t}\n\t\treturn style;\n\t}",
"@Override\r\n\tpublic String getStyleName() {\r\n\t\treturn _hSplit.getStyleName();\r\n\t}",
"public final LineStyle getStyle(){\n return LineStyleUtils.getLineStyle(stroke);\n }",
"private static String getStyleSheet() {\n\t\tif (fgStyleSheet == null)\n\t\t\tfgStyleSheet= loadStyleSheet();\n\t\tString css= fgStyleSheet;\n\t\tif (css != null) {\n\t\t\tFontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];\n\t\t\tcss= HTMLPrinter.convertTopLevelFont(css, fontData);\n\t\t}\n\n\t\treturn css;\n\t}",
"public NodeStyle getStyle() {\n return style;\n }",
"protected static Style getStyle(XMLDataObject xml) {\n\n Style style = new Style();\n style.setName(xml.getString(\"@name\"));\n style.setValue(getCssString(xml));\n\n return style;\n }",
"public mxStyleSheet getTextStyle()\n\t{\n\t\treturn textStyle;\n\t}",
"public java.lang.String getStyleId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLEID$30);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"private void restoreStyle() {\n if(this.backedup) {\n this.backedup = false;\n\n this.currentFillColor = this.lastFillColor;\n DOM.setStyleAttribute(fill.getElement(), \"backgroundColor\",currentFillColor.toCss(false));\n this.fillOpacity.setValue(this.lastFillOpacity);\n this.currentFillColor.setAlpha(this.fillOpacity.getValue());\n\n this.currentStrokeColor = this.lastStrokeColor;\n DOM.setStyleAttribute(stroke.getElement(), \"backgroundColor\",currentStrokeColor.toCss(false));\n this.strokeOpacity.setValue(this.lastStrokeOpacity);\n this.currentStrokeColor.setAlpha(this.strokeOpacity.getValue());\n\n this.currentStrokeSize.setValue(this.lastStrokeSize);\n }\n }",
"public Style[] getStylesPreOrder()\n\t{\n\t\tArrayList collect = new ArrayList();\n\t\tStyle root = getStyle(\"base\");\n\t\tcollectStyles(root,collect);\n\t\tStyle[] result = new Style[collect.size()];\n\t\tcollect.toArray(result);\n\t\treturn result;\n\t}",
"public java.lang.String getStyleName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLENAME$32);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }",
"public BoardStyle getChosenStyle() {\n\t\treturn boardStyle;\n\t}",
"public StylePanel getStylePanel();",
"@Override\n\tpublic String getStyleClass() {\n\n\t\t// getStateHelper().eval(PropertyKeys.styleClass, null) is called because\n\t\t// super.getStyleClass() may return the styleClass name of the super class.\n\t\tString styleClass = (String) getStateHelper().eval(PropertyKeys.styleClass, null);\n\n\t\treturn com.liferay.faces.util.component.ComponentUtil.concatCssClasses(styleClass, \"showcase-output-source-code\", \"prettyprint linenums\");\n\t}",
"private static String getStyleClass(Object obj) { return ((MetaData)obj).getStyle(); }",
"public ColorStyle getColorStyle(int i){\n\t\tif(i >=0 && i < styles.size()) return styles.get(i);\n\t\treturn null;\n\t}",
"public GrepStyle getGrepStyle()\n\t{\n\t\treturn grepStyle;\n\t}",
"public org.sirius.client.win32.core.types.Dword getDwStyle() {\n return dwStyle;\n }",
"STYLE createSTYLE();",
"public java.util.List getStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLECODE$16);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }",
"public java.util.List getStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(STYLECODE$16);\n if (target == null)\n {\n return null;\n }\n return target.getListValue();\n }\n }",
"protected ResourceReference getCSS()\n\t{\n\t\treturn CSS;\n\t}",
"private String getStyleAttribute() {\n StringBuilder sb = new StringBuilder();\n\n styleAttribute.forEach((key, value) -> {\n sb.append(key).append(\":\").append(value).append(\";\");\n });\n\n return sb.toString();\n }",
"@Override\n\tpublic StyleDatabase getStyleDatabase() {\n\t\tStyleDatabase sdb = null;\n\t\tif (targetMedium != null) {\n\t\t\tDeviceFactory df = getStyleSheetFactory().getDeviceFactory();\n\t\t\tif (df != null) {\n\t\t\t\tsdb = df.getStyleDatabase(targetMedium);\n\t\t\t}\n\t\t}\n\t\treturn sdb;\n\t}",
"public Symbol getConnectionStyleSnapshot();",
"public TextStyle getTextStyle() {\n return this.textStyle;\n }",
"Object getInitialOverride(QName styleName, VerifierContext context);",
"public String getStyleClass() {\r\n return Util.getQualifiedStyleClass(this,\r\n styleClass, \r\n CSS_DEFAULT.OUTPUT_CHART_DEFAULT_STYLE_CLASS,\r\n \"styleClass\");\r\n }",
"public final StyleStyle dup() {\r\n // don't use an ODXMLDocument attribute, search for our document in an ODPackage, that way\r\n // even if our element changes document (toSingle()) we will find the proper ODXMLDocument\r\n final ODXMLDocument xmlFile = this.pkg.getXMLFile(this.getElement().getDocument());\r\n final String unusedName = xmlFile.findUnusedName(getFamily(), this.desc == null ? this.getName() : this.desc.getBaseName());\r\n final Element clone = (Element) this.getElement().clone();\r\n clone.setAttribute(\"name\", unusedName, this.getSTYLE());\r\n JDOMUtils.insertAfter(this.getElement(), singleton(clone));\r\n return this.desc == null ? new StyleStyle(this.pkg, clone) : this.desc.create(this.pkg, clone);\r\n }",
"private void readStyles() {\n table.clearSelection();\n\n styles.getReadWriteLock().writeLock().lock();\n styles.clear();\n if (styleDir.getText().length() > 0) {\n addStyles(styleDir.getText(), true);\n }\n styles.getReadWriteLock().writeLock().unlock();\n\n selectLastUsed();\n }",
"final public String getInlineStyle()\n {\n return ComponentUtils.resolveString(getProperty(INLINE_STYLE_KEY));\n }",
"public Color getPrevColor(){\n\t\treturn prevColor;\n\t}",
"public long getStylesStart() {\n return ByteUtils.toUnsignedInt(stylesStart);\n }",
"public String getRowUiStyle() {\r\n return uiRowStyle;\r\n }",
"NodeStyle getOwnedStyle();",
"public StyleAbstractFactory getStyleFactory() {\r\n\t\t// Leggo da file esterno quale Factory utilizzare\r\n String stile = ULeggiDaFile.getStileInterfaccia();\r\n // Factory da restituire\r\n StyleAbstractFactory styleAbstractFactory;\r\n switch (stile) {\r\n\t\tcase \"light\":\r\n\t\t\tstyleAbstractFactory = LightStyleFactory.getInstance();\r\n\t\t\tbreak; \r\n\t\tcase \"dark\":\r\n\t\t\tstyleAbstractFactory = DarkStyleFactory.getInstance();\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t// Di default fornisco la factory \"light\"\r\n\t\t\tstyleAbstractFactory = LightStyleFactory.getInstance();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn styleAbstractFactory;\r\n\t}",
"public State getOldState() {\n\t\treturn oldState;\n\t}",
"abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();",
"public int getLineStyle() {\r\n return LineStyle;\r\n }",
"public StringItemStyle getStringStyle() {\r\n\t\treturn stringStyle;\r\n\t}",
"public ParseStyle getTheParseStyle() {\r\n return parseStyle;\r\n }",
"public long getStyleCount() {\n return ByteUtils.toUnsignedInt(styleCount);\n }",
"UiStyle getUiStyle();",
"@Override\n\tpublic String getLastStyleSheetSet() {\n\t\treturn lastStyleSheetSet;\n\t}",
"public NodeStyle getCalculatedStyle() {\n return calculatedStyle;\n }",
"@objid (\"617db239-55b6-11e2-877f-002564c97630\")\n @Override\n public List<StyleKey> getStyleKeys() {\n return Collections.emptyList();\n }",
"@SuppressWarnings(\"unchecked\")\n public TCS defaultEdging() {\n cellStyle_p.setBorderBottom(BORDER_THIN);\n cellStyle_p.setBottomBorderColor(BLACK.getIndex());\n cellStyle_p.setBorderLeft(BORDER_THIN);\n cellStyle_p.setLeftBorderColor(BLACK.getIndex());\n cellStyle_p.setBorderRight(BORDER_THIN);\n cellStyle_p.setRightBorderColor(BLACK.getIndex());\n cellStyle_p.setBorderTop(BORDER_THIN);\n cellStyle_p.setTopBorderColor(BLACK.getIndex());\n\n return (TCS) this;\n }",
"public native final String style(String name) /*-{\n\t\treturn this.style(name);\n\t}-*/;",
"public int getCellStyle() {\n if (cellStyle != null) {\n return cellStyle;\n }\n setCellStyle(getCellStyle(clazz));\n return cellStyle;\n }",
"public static Style get(SoState state)\n { return Style.fromValue(SoInt32Element.get(classStackIndexMap.get(SoPickStyleElement.class), state)); }",
"public String getPageStyle()\n {\n if (this.pageStyle == null) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<style type='text/css'>\\n\");\n sb.append(\" a:hover { color:#00CC00; }\\n\");\n sb.append(\" h1 { font-family:Arial; font-size:16pt; white-space:pre; }\\n\");\n sb.append(\" h2 { font-family:Arial; font-size:14pt; white-space:pre; }\\n\");\n sb.append(\" h3 { font-family:Arial; font-size:12pt; white-space:pre; }\\n\");\n sb.append(\" h4 { font-family:Arial; font-size:10pt; white-space:pre; }\\n\");\n sb.append(\" form { margin-top:0px; margin-bottom:0px; }\\n\");\n sb.append(\" body { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" td { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" input:focus { background-color: #FFFFC9; }\\n\");\n sb.append(\" select { font-size:7pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" select:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" textarea { font-size:8pt; font-family:verdena,sans-serif; }\\n\");\n sb.append(\" textarea:focus { background-color: #FFFFC9; }\\n\"); \n sb.append(\" .\"+CommonServlet.CSS_TEXT_INPUT+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#FFFFFF; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_TEXT_READONLY+\" { border-width:2px; border-style:inset; border-color:#DDDDDD #EEEEEE #EEEEEE #DDDDDD; padding-left:2px; background-color:#E7E7E7; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_FRAME[1]+\" { padding:5px; width:300px; border-style:double; border-color:#555555; background-color:white; }\\n\");\n sb.append(\" .\"+CommonServlet.CSS_CONTENT_MESSAGE+\" { padding-top:5px; font-style:oblique; text-align:center; }\\n\");\n sb.append(\"</style>\\n\");\n this.pageStyle = sb.toString();\n } \n return this.pageStyle;\n }",
"public org.apache.xmlbeans.XmlString xgetStyleName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(STYLENAME$32);\n return target;\n }\n }",
"public void setStyle(String st){\n style = st;\n }",
"public ComboBoxWrapper getParseStyle() {\r\n return new ComboBoxWrapper() {\r\n public Object getCurrentObject() {\r\n return parseStyle;\r\n }\r\n\r\n public Object[] getObjects() {\r\n return ParseStyle.values();\r\n }\r\n };\r\n }",
"public mxStyleSheet getLineStyle()\n\t{\n\t\treturn lineStyle;\n\t}",
"public RMColor getColor()\n {\n return getStyle().getColor();\n }",
"public int getHeaderStyleIndex() {\n return headerStyleIndex >= 0 ? headerStyleIndex : (headerStyleIndex = styles != null && headerStyle != null ? styles.of(headerStyle) : -1);\n }",
"public String getColorNew() {\n return (String) getAttributeInternal(COLORNEW);\n }",
"public String getCss() {\n return clean(css);\n }",
"public String getLineEndingStyle() {\n/* 412 */ return getCOSObject().getNameAsString(COSName.LE, \"None\");\n/* */ }",
"private static String loadStyleSheet() {\n\t\tBundle bundle= Platform.getBundle(JavaPlugin.getPluginId());\n\t\tURL styleSheetURL= bundle.getEntry(\"/JavadocHoverStyleSheet.css\"); //$NON-NLS-1$\n\t\tif (styleSheetURL != null) {\n\t\t\tBufferedReader reader= null;\n\t\t\ttry {\n\t\t\t\treader= new BufferedReader(new InputStreamReader(styleSheetURL.openStream()));\n\t\t\t\tStringBuffer buffer= new StringBuffer(1500);\n\t\t\t\tString line= reader.readLine();\n\t\t\t\twhile (line != null) {\n\t\t\t\t\tbuffer.append(line);\n\t\t\t\t\tbuffer.append('\\n');\n\t\t\t\t\tline= reader.readLine();\n\t\t\t\t}\n\t\t\t\treturn buffer.toString();\n\t\t\t} catch (IOException ex) {\n\t\t\t\tJavaPlugin.log(ex);\n\t\t\t\treturn \"\"; //$NON-NLS-1$\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (reader != null)\n\t\t\t\t\t\treader.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public SimpleStyle copy() {\n\t\tSimpleStyle simpleStyle = new SimpleStyle();\n\t\tcopyIn(simpleStyle);\n\t\treturn simpleStyle;\n\t}",
"public org.openxmlformats.schemas.drawingml.x2006.main.STGuid xgetStyleId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.STGuid target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.STGuid)get_store().find_attribute_user(STYLEID$30);\n return target;\n }\n }",
"public String getTransitionStyle() {\n\t\treturn transitionStyle;\n\t}",
"public org.apache.xmlbeans.XmlNMTOKENS xgetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNMTOKENS target = null;\n target = (org.apache.xmlbeans.XmlNMTOKENS)get_store().find_attribute_user(STYLECODE$16);\n return target;\n }\n }",
"public org.apache.xmlbeans.XmlNMTOKENS xgetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlNMTOKENS target = null;\n target = (org.apache.xmlbeans.XmlNMTOKENS)get_store().find_attribute_user(STYLECODE$16);\n return target;\n }\n }"
] | [
"0.756048",
"0.7420421",
"0.7403218",
"0.7142423",
"0.71419495",
"0.71257395",
"0.70921385",
"0.70921385",
"0.70921385",
"0.70921385",
"0.70684415",
"0.69626796",
"0.69529265",
"0.6928127",
"0.6869211",
"0.67265046",
"0.6688211",
"0.6589814",
"0.65577173",
"0.6442102",
"0.64074826",
"0.6391543",
"0.631755",
"0.6302662",
"0.6299675",
"0.6298331",
"0.62758857",
"0.6265561",
"0.6260565",
"0.6228808",
"0.61623335",
"0.6116852",
"0.6080533",
"0.60798204",
"0.6066202",
"0.60492593",
"0.60186744",
"0.6017779",
"0.5984232",
"0.5952752",
"0.59468937",
"0.59409696",
"0.5926712",
"0.5898644",
"0.5881763",
"0.58765644",
"0.5870155",
"0.583902",
"0.58352476",
"0.58301556",
"0.58289003",
"0.5824549",
"0.5822774",
"0.5819923",
"0.5819923",
"0.58037215",
"0.57782173",
"0.5776806",
"0.5776766",
"0.57703346",
"0.574271",
"0.5730478",
"0.572729",
"0.5719282",
"0.57029116",
"0.5701477",
"0.570072",
"0.5680227",
"0.5679632",
"0.5658865",
"0.5651404",
"0.56427443",
"0.56421083",
"0.56398183",
"0.56360507",
"0.5631525",
"0.5630571",
"0.56212515",
"0.5618508",
"0.56039596",
"0.5603824",
"0.56016076",
"0.55908513",
"0.5578062",
"0.55693346",
"0.5557327",
"0.55550456",
"0.55485505",
"0.5545679",
"0.55371994",
"0.55055964",
"0.54985815",
"0.54916835",
"0.5479089",
"0.5447772",
"0.5444286",
"0.5420251",
"0.54153454",
"0.5404372",
"0.5404372"
] | 0.86112773 | 0 |
Checks if is new is default style. | public boolean isNewIsDefaultStyle()
{
return myNewIsDefaultStyle;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isDefault() {\r\n\treturn bgclip == border;\r\n }",
"private void setStyleToDefault() {\n // enable syntax highlighting\n commandTextField.enableSyntaxHighlighting();\n }",
"public static Style getDefault() { return Style.SHAPE; }",
"public final boolean hasStyle() {\n return hasStyle;\n }",
"public boolean isDefault();",
"public VisualizationStyle getNewStyle()\r\n {\r\n return myNewStyle;\r\n }",
"public void setDefaultStyleString(String defaultStyleString) {\n/* 564 */ getCOSObject().setString(COSName.DS, defaultStyleString);\n/* */ }",
"boolean isDefault();",
"boolean isDefault();",
"private void defaultStyle() {\n\t\t//idField.setStyle(\"\");\n\t\tproductNameField.setStyle(\"\");\n\t\tinvField.setStyle(\"\");\n\t\tpriceField.setStyle(\"\");\n\t\tmaxField.setStyle(\"\");\n\t\tminField.setStyle(\"\");\n\t}",
"public boolean isSimulateStyle() {\n return simulateStyle;\n }",
"protected boolean isFreeStyle(){\r\n\t\treturn false;\r\n\t}",
"private Style createDefaultStyle() {\n Rule rule = createRule(LINE_COLOUR, FILL_COLOUR); //utilizamos las definiciones anteriores\n\n FeatureTypeStyle fts = sf.createFeatureTypeStyle();\n fts.rules().add(rule);\n\n Style style = sf.createStyle();\n style.featureTypeStyles().add(fts);\n return style;\n}",
"public String getDefaultStyleString() {\n/* 552 */ return getCOSObject().getString(COSName.DS);\n/* */ }",
"Object getInitialOverride(QName styleName, VerifierContext context);",
"public VisualizationStyle getOldStyle()\r\n {\r\n return myOldStyle;\r\n }",
"public String getStyleNew() {\n return (String) getAttributeInternal(STYLENEW);\n }",
"public String getCurrentStyle() {\n modifyStyleIfRequested();\n return currentStyle;\n }",
"public abstract String getDefaultStylesheet ();",
"private static int checkStyle(int style) {\n\t\tstyle |= SWT.NO_FOCUS;\n\t\tint mask = SWT.HORIZONTAL | SWT.VERTICAL | SWT.LEFT_TO_RIGHT | SWT.RIGHT_TO_LEFT | SWT.UP | SWT.DOWN;\n\t\treturn style & ~mask;\n\t}",
"boolean isDefaultMessage();",
"public boolean isPlain() {\n\treturn style == 0;\n }",
"public boolean isDefault()\r\n\t{\treturn this.plugin.getClassManager().getDefaultClass().equals(this);\t}",
"public boolean isReportedDefault() {\n if (\"3\".equals(originalPriority.getId())) {\n return true;\n }\n\n return false;\n }",
"public static boolean isNewStyleEntity(ManagementContext managementContext, Class<?> clazz) {\n try {\n return isNewStyleEntity(clazz);\n } catch (IllegalArgumentException e) {\n return false;\n }\n }",
"public boolean GetIsByDefault()\n {\n return this._defaultSpace;\n }",
"public boolean testFillstyles(EIfcfillareastyle type) throws SdaiException;",
"public boolean isDefaultInflation() {\n boolean isFixDelayedForSevere = isFixDelayed(MAXIMUM_RELEASES_FOR_SEVERE);\n boolean isFixDelayedForDefault = isFixDelayed(MAXIMUM_RELEASES_FOR_DEFAULT);\n return this.isReportedSevere() && !this.isFixRejected() &&\n !this.isIssueIgnored() && !isFixDelayedForDefault && isFixDelayedForSevere;\n }",
"abstract protected DocumentCSSStyleSheet getDefaultStyleSheet(CSSDocument.ComplianceMode mode);",
"public Object getDefault(VisualStyle style) {\n \t\tif (style == null)\n \t\t\treturn null;\n \n \t\tAppearance a = null;\n \n \t\tif (isNodeProp())\n \t\t\ta = style.getNodeAppearanceCalculator().getDefaultAppearance();\n \t\telse\n \t\t\ta = style.getEdgeAppearanceCalculator().getDefaultAppearance();\n \n \t\treturn a.get(this);\n \t}",
"public abstract String getStyle();",
"public boolean isIsDefault() {\n return isDefault;\n }",
"public boolean isDefault() {\n return _default;\n }",
"public String getDefaultAppearance() {\n/* 530 */ return getCOSObject().getString(COSName.DA);\n/* */ }",
"STYLE createSTYLE();",
"public void setDefault(VisualStyle style, Object c) {\n \t\tif ((style == null) || (c == null))\n \t\t\treturn;\n \n \t\tif (isNodeProp()) {\n \t\t\tNodeAppearanceCalculator nodeCalc = style.getNodeAppearanceCalculator();\n \t\t\tNodeAppearance na = nodeCalc.getDefaultAppearance();\n \t\t\tna.set(this, c);\n \t\t\tnodeCalc.setDefaultAppearance(na);\n \t\t} else {\n \t\t\tEdgeAppearanceCalculator edgeCalc = style.getEdgeAppearanceCalculator();\n \t\t\tEdgeAppearance ea = edgeCalc.getDefaultAppearance();\n \t\t\tea.set(this, c);\n \t\t\tedgeCalc.setDefaultAppearance(ea);\n \t\t}\n \t}",
"public abstract TC createStyle();",
"public boolean isSetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(STYLECODE$16) != null;\n }\n }",
"public boolean isSetStyleCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(STYLECODE$16) != null;\n }\n }",
"protected final void baseTestDefaultFont(String defaultName, short defaultSize, short defaultColor) throws IOException {\n Workbook workbook = _testDataProvider.createWorkbook();\n Font fontFind=workbook.findFont(false, defaultColor, defaultSize, defaultName, false, false, Font.SS_NONE, Font.U_NONE);\n assertNotNull(fontFind);\n\n //get default font, then change 2 values and check against different values (height changes)\n Font font=workbook.createFont();\n font.setBold(true);\n assertTrue(font.getBold());\n font.setUnderline(Font.U_DOUBLE);\n assertEquals(Font.U_DOUBLE, font.getUnderline());\n font.setFontHeightInPoints((short)15);\n assertEquals(15*20, font.getFontHeight());\n assertEquals(15, font.getFontHeightInPoints());\n fontFind=workbook.findFont(true, defaultColor, (short)(15*20), defaultName, false, false, Font.SS_NONE, Font.U_DOUBLE);\n assertNotNull(fontFind);\n workbook.close();\n }",
"public Boolean get_is_default()\r\n\t{\r\n\t\treturn this.is_default;\r\n\t}",
"@StyleDefaults(ELEMENT_ID)\n public static void initializeDefaultStyles(Styles styles, Attributes attrs) {\n styles.getSelector(meid, null).set(\"setReadfieldPreferredWidth\", 50, false);\n styles.getSelector(meid, null).set(\"setHeadlineHAlignment\", HAlignment.Center, false);\n styles.getSelector(meid, null).set(\"setReadfieldimagewidth\", 0f, false);\n styles.getSelector(meid, null).set(\"setReadfieldimageheight\", 0f, false);\n }",
"public boolean isDefault() {\n return m_Default;\n }",
"public void styleforOne() {\r\n\t\t\r\n\r\n\t\tsuper.styleforOne();\r\n\t\t\r\n\t}",
"@attribute(value = \"\", required = false, defaultValue=\"NONE\")\r\n\tpublic void setStyle(String style) {\r\n\t\t// dummy function for comment\r\n\t}",
"public synchronized void resetStyle() {\n \t\tstyleInitialized = false;\n \t}",
"@Override\n\tpublic boolean isDefault() {\n\t\tComponent parentCmp = getParentComponent();\n\n\t\tif (parentCmp == null)\n\t\t\treturn false;\n\n\t\treturn equals(parentCmp.getDefaultRemoteCandidate());\n\t}",
"public SimpleStyle() {\n\t\t// set default values\n\t\tthis.foregroundColor = -1;\n\t\t// others are null: VM DONE\n\t}",
"public abstract boolean isStandard();",
"@Override\n public String getCSSStyle() {\n return null;\n }",
"boolean isInheritableStyle(QName eltName, QName styleName);",
"private boolean isDefault(int id) {\n return id == -1;\n }",
"Style getStyle();",
"public Boolean getAlternateRecordStyles() {\r\n return getAttributeAsBoolean(\"alternateRecordStyles\");\r\n }",
"boolean is(TextStyle style);",
"public CellStyle createCellStyle() {\n\t\treturn null;\n\t}",
"private void setStyleToIndicateCommandFailure() {\n //override style and disable syntax highlighting\n commandTextField.overrideStyle(ERROR_STYLE_CLASS);\n }",
"public boolean isColor() {\n\t\treturn !isFormat && this != RESET;\n\t}",
"void onStyleModify() {\n\t\tif (mergedStyleSheet != null) {\n\t\t\tmergedStyleSheet = null;\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t} else if (sheets != null) {\n\t\t\tsheets.setNeedsUpdate(true);\n\t\t}\n\t}",
"public boolean isTheme( )\n {\n return getType( ) != null && ConstanteUtils.CONSTANTE_TYPE_LUTECE_SITE.equals( getType( ) );\n }",
"public int getStyle() {\n\treturn style;\n }",
"public void changeToStandard(){\n drawAttributeManager.toggleStandardView();\n getContentPane().setBackground(DrawAttribute.whiteblue);\n canvas.repaint();\n }",
"boolean hasTheme();",
"public String getStyle() {\r\n return style;\r\n }",
"public boolean isDefaultElement();",
"public final void setMxSheet_DefaultStyle(com.mendix.systemwideinterfaces.core.IContext context, xlsreport.proxies.MxCellStyle mxsheet_defaultstyle)\r\n\t{\r\n\t\tif (mxsheet_defaultstyle == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_DefaultStyle.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.MxSheet_DefaultStyle.toString(), mxsheet_defaultstyle.getMendixObject().getId());\r\n\t}",
"public VisualizationStyleDatatypeChangeEvent(String dtiKey, Class<? extends VisualizationSupport> mgsClass,\r\n VisualizationStyle oldStyle, VisualizationStyle newStyle, boolean newIsDefault, Object source)\r\n {\r\n myDTIKey = dtiKey;\r\n myMGSClass = mgsClass;\r\n myOldStyle = oldStyle;\r\n myNewStyle = newStyle;\r\n myNewIsDefaultStyle = newIsDefault;\r\n mySource = source;\r\n }",
"public boolean isItNew() {\n\t\treturn false;\n\t}",
"private WidgetConfiguration setStyling(Item item, WidgetConfiguration defaultConfig) {\n\t\tWidgetConfiguration newConfig = new WidgetConfiguration(\n\t\t\t\tdefaultConfig.getFont(), defaultConfig.getColor(), new Dimension(defaultConfig.getWidth(), defaultConfig.getHeight()));\n\n\t\t//go through all properties, visit and set found formatting\n\t\tfor (StyleProperty prop : item.getProperties()) {\n\t\t\tprop.accept(new StyleVisitor<Void, Void>() {\n\t\t\t\t@Override\n\t\t\t\tpublic Void visit(Height h, Void ctx2) {\n\t\t\t\t\tnewConfig.setHeight(h.getHeightVal());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Void visit(Width w, Void ctx2) {\n\t\t\t\t\tnewConfig.setWidth(w.getWidthVal());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Void visit(FontName fn, Void ctx2) {\n\t\t\t\t\tnewConfig.setFontName(fn.getName());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Void visit(FontSize fs, Void ctx2) {\n\t\t\t\t\tnewConfig.setFontSize(fs.getSize());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic Void visit(FontColor fc, Void ctx2) {\n\t\t\t\t\tnewConfig.setFontColor(fc.getColor());\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t},\n\t\t\tnull);\n\t\t}\n\t\t//return new configuration to style the question\n\t\treturn newConfig;\n\t}",
"@Override\n\tpublic boolean hasDefault()\n\t{\n\t\treturn (m_default != null);\n\t}",
"public static boolean getDefaultPrettyPrint()\n {\n return defaults.pretty_print;\n }",
"public static boolean shouldChangeTheme(Context context, String currentTheme) {\n if (null == currentTheme) return true; //the app must have a theme\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);\n String themePref = sharedPrefs.getString(\"theme_preference\", \"Light\");\n return !currentTheme.equals(themePref); //should change if the current theme does not match shared preferences\n }",
"default boolean isSpecial() { return false; }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"public String getStyle() {\n return style;\n }",
"@Override\r\n\t\tpublic boolean isDefaultNamespace(String namespaceURI)\r\n\t\t\t{\n\t\t\t\treturn false;\r\n\t\t\t}",
"public boolean isOther() {\n\t\treturn color == null;\n\t}",
"boolean doesStyleApply(QName eltName, QName styleName);",
"@Override\n\tpublic boolean hasStyleIssues() {\n\t\treturn sheets.hasErrorsOrWarnings() || getErrorHandler().hasErrors() || getErrorHandler().hasWarnings();\n\t}",
"public boolean isDefaultOwner() {\r\n\t\treturn defaultOwner;\r\n\t}",
"@Override\n protected boolean isAppropriate() {\n return true; // always show\n }",
"public final void setMxSheet_DefaultStyle(xlsreport.proxies.MxCellStyle mxsheet_defaultstyle)\r\n\t{\r\n\t\tsetMxSheet_DefaultStyle(getContext(), mxsheet_defaultstyle);\r\n\t}",
"abstract protected AbstractCSSStyleSheet getUserNormalStyleSheet();",
"public void styleforZero() {\r\n\t\t\r\n\t\tsuper.styleforZero();\r\n\t\t\r\n\t}",
"public int getStyle() {\r\n\t\treturn style;\r\n\t}",
"public boolean isDefaultChoice()\r\n\t{\r\n\t\treturn defaultChoice;\r\n\t}",
"private OOBibStyle getSelectedStyle() {\n if (selectionModel.getSelected().size() > 0) {\n return selectionModel.getSelected().get(0);\n } else {\n return null;\n }\n }",
"public void styleMe(){\n\t}",
"public void setStyleNew(String value) {\n setAttributeInternal(STYLENEW, value);\n }",
"public static boolean useDefaults()\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._getJavaUseDefaultsCmd);\n return UmlCom.read_bool();\n }",
"private void checkChanges() {\n CertificationStyleWrapper wrapper = (CertificationStyleWrapper) cbCertificationStyle.getSelectedItem();\n if (wrapper != null && settings.getCertificationStyle() != wrapper.style) {\n settings.setCertificationStyle(wrapper.style);\n }\n\n // set NFO filenames\n settings.clearNfoFilenames();\n if (chckbxTvShowNfo1.isSelected()) {\n settings.addNfoFilename(TvShowNfoNaming.TV_SHOW);\n }\n\n settings.clearEpisodeNfoFilenames();\n if (chckbxEpisodeNfo1.isSelected()) {\n settings.addEpisodeNfoFilename(TvShowEpisodeNfoNaming.FILENAME);\n }\n }",
"private Boolean ottieniDefaultFlagConvalidaManuale() {\n\t\tfinal String methodName = \"ottieniDefaultFlagConvalidaManuale\";\n\t\tEnte ente = accountDad.findEnteAssocciatoAdAccount(req.getRichiedente().getAccount().getUid());\n\t\t\n\t\tString gca = ente.getGestioneLivelli().get(TipologiaGestioneLivelli.GESTIONE_CONVALIDA_AUTOMATICA);\n\t\tif(\"CONVALIDA_AUTOMATICA\".equals(gca)){\n\t\t\tlog.debug(methodName, TipologiaGestioneLivelli.GESTIONE_CONVALIDA_AUTOMATICA.name()+ \" impostata a CONVALIDA_AUTOMATICA\");\n\t\t\treturn Boolean.FALSE;\n\t\t} else if(\"CONVALIDA_MANUALE\".equals(gca)){\n\t\t\tlog.debug(methodName, TipologiaGestioneLivelli.GESTIONE_CONVALIDA_AUTOMATICA.name()+ \" impostata a CONVALIDA_MANUALE\");\n\t\t\treturn Boolean.TRUE;\n\t\t}\n\t\t\n\t\treturn Boolean.TRUE;\n\t}",
"boolean hasBodyFormatOverride();",
"static int checkStyle (int style) {\r\n\treturn style & ~(SWT.H_SCROLL | SWT.V_SCROLL);\r\n}",
"public String getStyle() {\n\t\treturn style;\n\t}",
"public void updateStyle()\n {\n this.textOutput.setForeground(new Color(null, ShellPreference.OUTPUT_COLOR_INPUT.getRGB()));\n this.textOutput.setBackground(new Color(null, ShellPreference.OUTPUT_BACKGROUND.getRGB()));\n this.textOutput.setFont(new Font(null, ShellPreference.OUTPUT_FONT.getFontData()));\n this.colorOuput = new Color(null, ShellPreference.OUTPUT_COLOR_OUTPUT.getRGB());\n this.colorError = new Color(null, ShellPreference.OUTPUT_COLOR_ERROR.getRGB());\n\n this.textInput.setForeground(new Color(null, ShellPreference.INPUT_COLOR.getRGB()));\n this.textInput.setBackground(new Color(null, ShellPreference.INPUT_BACKGROUND.getRGB()));\n this.textInput.setFont(new Font(null, ShellPreference.INPUT_FONT.getFontData()));\n\n this.historyMax = ShellPreference.MAX_HISTORY.getInt();\n }",
"public static boolean defaultExit() {\n\t\tif (blockContext.targetCircles[blockContext.exitFlag] == -1) {\n\t\t\treturn (true);\n\t\t} else {\n\t\t\treturn (false);\n\t\t}\n\t}",
"boolean getNoColor();"
] | [
"0.6465549",
"0.607145",
"0.6057712",
"0.5945236",
"0.5934167",
"0.5890563",
"0.5862565",
"0.58523047",
"0.58523047",
"0.58413583",
"0.58318514",
"0.57680535",
"0.574812",
"0.5659577",
"0.5655217",
"0.5616532",
"0.5610897",
"0.558511",
"0.55355924",
"0.54839015",
"0.54640174",
"0.5462666",
"0.54624474",
"0.54528236",
"0.54192096",
"0.5413168",
"0.53819954",
"0.53507185",
"0.534818",
"0.5343406",
"0.5335063",
"0.53232133",
"0.5282107",
"0.5280961",
"0.5279129",
"0.525503",
"0.5250836",
"0.5246202",
"0.5246202",
"0.5244777",
"0.52038044",
"0.518118",
"0.51475304",
"0.50923705",
"0.5091899",
"0.50833964",
"0.5081545",
"0.50810695",
"0.506722",
"0.5057605",
"0.5050585",
"0.505009",
"0.5049157",
"0.5037903",
"0.5037332",
"0.503379",
"0.50295585",
"0.5026481",
"0.5024092",
"0.5020109",
"0.5019043",
"0.5017532",
"0.5013395",
"0.5009838",
"0.500452",
"0.5002678",
"0.50019276",
"0.49831852",
"0.49814764",
"0.49747795",
"0.49617252",
"0.49516276",
"0.49501494",
"0.49460232",
"0.49460232",
"0.49460232",
"0.49460232",
"0.49428633",
"0.49425715",
"0.49391648",
"0.4938975",
"0.49376044",
"0.49341527",
"0.49283394",
"0.49127105",
"0.49002522",
"0.49001145",
"0.48992488",
"0.48944148",
"0.4888044",
"0.48811615",
"0.4872261",
"0.4864861",
"0.48638684",
"0.48610166",
"0.48394772",
"0.48381352",
"0.48361763",
"0.48351282",
"0.48317993"
] | 0.83251965 | 0 |
Checks if is type specific change. | public boolean isTypeSpecificChange()
{
return myDTIKey != null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isChangeType()\n {\n return hasChanges;\n }",
"public boolean isTypeModified() {\n return type_is_modified; \n }",
"public abstract boolean isTypeCorrect();",
"public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }",
"public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }",
"public native final String changedType() /*-{\n\t\treturn this.changedType;\n\t}-*/;",
"@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}",
"public native final EditorBaseEvent changedType(String val) /*-{\n\t\tthis.changedType = val;\n\t\treturn this;\n\t}-*/;",
"private static boolean isOriginalTsType(TsType type) {\n if (type instanceof TsType.BasicType) {\n TsType.BasicType basicType = (TsType.BasicType)type;\n return !(basicType.name.equals(\"null\") || basicType.name.equals(\"undefined\"));\n }\n return true;\n }",
"abstract protected boolean checkType(String myType);",
"public boolean handleChange(final Object oldValue,\n final Object newValue,\n final IFigure figure) {\n if (newValue == null || !(newValue instanceof VType))\n return false;\n\n AlarmSeverity newSeverity = VTypeHelper.getAlarmSeverity((VType) newValue);\n if(newSeverity == null)\n return false;\n\n if (newSeverity != alarmSeverity) {\n alarmSeverity = newSeverity;\n fireAlarmSeverityChanged(newSeverity, figure);\n }\n return true;\n }",
"public interface CHANGED_TYPE {\r\n public static final int FEE = 1;\r\n public static final int GRACE_PERIOD = 2;\r\n }",
"public void isChanged()\n\t{\n\t\tchange = true;\n\t}",
"public boolean isContentType()\n {\n return !hasChanges;\n }",
"boolean handlesEventsOfType(RuleEventType type);",
"public boolean check(EventType event);",
"public int getChangeType() {\r\n return changeType;\r\n }",
"public boolean handlesType(CFrame type) {\n\n\t\treturn coreMatcher.handlesType(type);\n\t}",
"private void logFormatTypeChanges(ObjectFormatIdentifier mnFormatId, ObjectFormatIdentifier cnFormatId) {\n\n try {\n if (mnFormatId.getValue().equals(cnFormatId.getValue())) {\n return;\n }\n\n String mnType = nodeCommunications.getCnCore().getFormat(mnFormatId).getFormatType();\n String cnType = nodeCommunications.getCnCore().getFormat(cnFormatId).getFormatType();\n\n if (mnType.equals(cnType)) {\n return;\n }\n\n // if one and only one (XOR) is data, there's been a loggable change \n if (!mnType.equalsIgnoreCase(cnType)) {\n logger.warn(buildStandardLogMessage(null, String.format(\"Format type for %s has changed from %s to %s\",\n task.getPid(), cnFormatId.getValue().toUpperCase(), mnFormatId.getValue().toUpperCase())));\n }\n\n } catch (ServiceFailure | NotFound | NotImplemented | InvalidRequest e) {\n logger.error(buildStandardLogMessage(e,String.format(\"Format type change for %s could not be determined while looking up the ObjectFormat.\",\n task.getPid())), e);\n } catch (Exception e) {\n logger.error(buildStandardLogMessage(e,String.format(\"Format type change for %s could not be determined.\",\n task.getPid())),\n e);\n }\n }",
"UpdateType updateType();",
"void changeType(NoteTypes newType) {\n this.type = newType;\n }",
"public synchronized static void internal_updateKnownTypes() {\r\n Set<ChangeLogType> changeLogTypes = GrouperDAOFactory.getFactory().getChangeLogType().findAll();\r\n GrouperCache<MultiKey, ChangeLogType> newTypes = new GrouperCache<MultiKey, ChangeLogType>(\r\n ChangeLogTypeFinder.class.getName() + \".typeCache\", 10000, false, 60*10, 60*10, false);\r\n \r\n Map<String, ChangeLogType> newTypesById = new HashMap<String, ChangeLogType>();\r\n \r\n for (ChangeLogType changeLogType : GrouperUtil.nonNull(changeLogTypes)) {\r\n newTypes.put(new MultiKey(changeLogType.getChangeLogCategory(), changeLogType.getActionName()), changeLogType);\r\n newTypesById.put(changeLogType.getId(), changeLogType);\r\n }\r\n \r\n //add builtins if necessary\r\n internal_updateBuiltinTypesOnce(newTypes, newTypesById);\r\n \r\n types = newTypes;\r\n typesById = newTypesById;\r\n }",
"private boolean match(Type t, Type original) {\n\t\t\t\treturn original.getSort() == Type.METHOD && original.getSort() == t.getSort();\n\t\t\t}",
"@DISPID(2)\r\n public void change(\r\n com.github.wshackle.fanuc.robotserver.FREStatusTypeConstants changeType) {\r\n throw new UnsupportedOperationException();\r\n }",
"private void checkModels()\n {\n if (myDataType != null)\n {\n SpecialKey specialKey = myDataType.getMetaDataInfo().getSpecialTypeForKey(myField.get());\n if (specialKey instanceof TimeKey)\n {\n if (!(myCriterionValue instanceof DateModel))\n {\n switchValueModels(DateModel.class);\n }\n }\n else\n {\n if (myCriterionValue instanceof DateModel)\n {\n switchValueModels(GhostTextModel.class);\n }\n }\n }\n }",
"public void check()\n {\n typeDec.check();\n }",
"boolean hasChangeStatus();",
"public boolean is( Type type ) {\n return this.type == type;\n }",
"abstract public boolean isTyped();",
"private boolean switchTypes(String colType, Object obj) throws BPlusEngineException {\n switch (colType) {\n case \"INT\":\n if (obj instanceof Integer) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"VARCHAR\":\n if (obj instanceof String) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"Double\":\n if (obj instanceof Double) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"Boolean\":\n if (obj instanceof Boolean) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n case \"DATE\":\n if (obj instanceof Date) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n break;\n default:\n throw new BPlusEngineException(\"Either You spelled the Type incorectly or the type does not exist, \"\n + \"Supported types: Integer, String, Double, Boolean, Date\");\n }\n return false;\n }",
"public Type getType()\n\t{\n\t\tif (_oldValue == null)\n\t\t{\n\t\t\treturn Type.ADDED;\n\t\t}\n\t\telse if (_newValue == null)\n\t\t{\n\t\t\treturn Type.REMOVED;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Type.CHANGED;\n\t\t}\n\t}",
"boolean replacementfor(Type o);",
"public static boolean isChanged(PO po) {\n\t\tString[] columnNames = s_sourceColumnNames.get(po.get_TableName());\n\t\tif (columnNames == null || columnNames.length == 0) {\n\t\t\treturn false;\n\t\t}\n\t\tif (po.is_new() || po.is_ValueChanged(\"IsActive\")) {\n\t\t\treturn true;\n\t\t}\n\t\tfor (String columnName : columnNames) {\n\t\t\tif (po.is_ValueChanged(columnName)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public <T extends ConfigBeanProxy> NotProcessed changed(Changed.TYPE type, Class<T> changedType,\n T changedInstance) {\n NotProcessed np = null;\n if(!(changedInstance instanceof Application)){\n return np;\n }\n if(serverEnvironment.isDas()){\n ClassLoader contextCL = Thread.currentThread().getContextClassLoader();\n try {\n //use connector-class-loader so as to get access to classes from resource-adapters\n ClassLoader ccl = clh.getConnectorClassLoader(null);\n Thread.currentThread().setContextClassLoader(ccl);\n switch (type) {\n case ADD:\n np = handleAddEvent(changedInstance);\n break;\n default:\n break;\n }\n } finally {\n Thread.currentThread().setContextClassLoader(contextCL);\n }\n }\n return np;\n }",
"private void handleLCTypeChange() {\n\t\tString lc = cbLoadingCharge.getText();\n\t\tif (optionB[3].equals(lc)) {\n\t\t\ttxtLC_article.setEnabled(false);\n\t\t\ttxtLC_article.setText(EMPTYSTRING);\n\t\t} else {\n\t\t\ttxtLC_article.setEnabled(true);\n\t\t}\n\t}",
"@Override\n public void changed( Change change ) {\n if ( !( change.isSelected()\n && change.isForInstanceOf( Node.class )\n && change.isForProperty( \"other\" ) ) ) {\n if ( change.isUpdated() ) {\n setFlowUpdated( true );\n }\n super.changed( change );\n }\n }",
"public boolean hasUpdate(VehicleState change) {\n\n return !this.equals(change);\n }",
"void check()\n {\n checkUsedType(responseType);\n checkUsedType(requestType);\n }",
"public void setType(String newVal) {\n if ((newVal != null && this.type != null && (newVal.compareTo(this.type) == 0)) || \n (newVal == null && this.type == null && type_is_initialized)) {\n return; \n } \n this.type = newVal; \n\n type_is_modified = true; \n type_is_initialized = true; \n }",
"protected boolean isApplicableType(Datatype type) {\n\t\treturn true;\n\t}",
"protected boolean isDataChanged() {\n\n\t\treturn true;\n\t}",
"public void changeToType(TYPE type){\n this.type=type;\n return;\n }",
"public boolean isTypeChecking() {\n return _typeChecking;\n }",
"public boolean supports(Class<?> clazz) {\n\t\treturn PwChangeCommand.class.isAssignableFrom(clazz);\n\t}",
"public boolean hasDoneChanges(Class<?> actionType) {\n \t\tboolean ret = true;\n \t\tif (IDelete.class.equals(actionType)) {\n \t\t\tif (wrappedDeleteFeature != null) {\n \t\t\t\tret = wrappedDeleteFeature.hasDoneChanges();\n \t\t\t}\n \t\t} else if (IRemove.class.equals(actionType)) {\n \t\t\tif (wrappedRemoveFeature != null) {\n \t\t\t\tret = wrappedRemoveFeature.hasDoneChanges();\n \t\t\t}\n \t\t}\n \t\treturn ret;\n \t}",
"protected void checkTransferType(DropTargetDragEvent dtde) {\n acceptableType = false;\n\n if (dtde.isDataFlavorSupported(OtDragDropObject.dataFlavor)) {\n acceptableType = true;\n }\n\n DnDUtils.debugPrintln(\"Data type acceptable - \" + acceptableType);\n }",
"public void change_type(int type_){\n\t\ttype = type_;\n\t\tif(type != 0)\n\t\t\toccupe = 1;\n\t}",
"public boolean testModelordraughting(EIfcfillareastyle type) throws SdaiException;",
"@Override\n public void inputTypeChange(ModelInputTypes m) {\n \n }",
"public boolean canChange(IPokemob mob, PokedexEntry changeTo)\r\n {\r\n return true;\r\n }",
"public boolean sameType(FilterCondition fc) {\n return fc.getClass() == getClass();\n }",
"private void assertChangeMatches(RdaChange.Type changeType) {\n RdaChange<RdaFissClaim> changed = transformer.transformClaim(changeBuilder.build());\n assertEquals(changeType, changed.getType());\n assertThat(changed.getClaim(), samePropertyValuesAs(claim));\n }",
"boolean isHandled(Class<?> type);",
"public interface ChangeHandling {\r\n}",
"protected abstract void sourceChanged(Change<? extends F> c);",
"public void setObjtype(short newValue) {\n\tthis.objtype = newValue;\n}",
"@Override\r\n public boolean hasContentModified(ContainerUser context)\r\n {\n return hasDescriptorPropertyChanged(ReportDescriptor.Prop.json.name());\r\n }",
"@Override\n public void selectionChanged(JavaTextSelection selection) {\n try {\n setEnabled(RefactoringAvailabilityTester.isGeneralizeTypeAvailable(selection));\n } catch (JavaModelException e) {\n setEnabled(false);\n }\n }",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();",
"boolean hasType();"
] | [
"0.7118445",
"0.6371258",
"0.62059873",
"0.6185016",
"0.6139601",
"0.605831",
"0.60529065",
"0.60505635",
"0.5960412",
"0.5891118",
"0.58900136",
"0.58054656",
"0.57938004",
"0.5757483",
"0.5732489",
"0.57241315",
"0.57076335",
"0.5703018",
"0.5688795",
"0.56740135",
"0.5630499",
"0.55945766",
"0.558758",
"0.556703",
"0.55647004",
"0.55584383",
"0.55514413",
"0.5540028",
"0.5505922",
"0.54881567",
"0.545016",
"0.5438405",
"0.5433674",
"0.5428281",
"0.5427771",
"0.54158205",
"0.5405189",
"0.5404766",
"0.5393815",
"0.5391961",
"0.53807336",
"0.5366385",
"0.53580856",
"0.5347916",
"0.53478336",
"0.5331878",
"0.53306764",
"0.5327477",
"0.5325281",
"0.53208524",
"0.53080434",
"0.5307605",
"0.5268057",
"0.52538276",
"0.5245342",
"0.5229671",
"0.52274036",
"0.52125704",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214",
"0.5208214"
] | 0.7736298 | 0 |
Retrieve balances of the account | @POST
@Path("transfer")
BiboxSingleResponse<BiboxAssetsResult> assets(
@FormParam(FORM_CMDS) String cmds,
@FormParam(FORM_APIKEY) String apiKey,
@FormParam(FORM_SIGNATURE) ParamsDigest signature); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getBalances() {\n\n\t\treturn getJson(API_VERSION, ACCOUNT, \"getbalances\");\n\t}",
"@RequestMapping(value = \"/balance\", method = RequestMethod.GET)\r\n public List<BigDecimal> getBalances(Principal principal) {\r\n try {\r\n return accountDAO.getCurrentBalance(principal.getName());\r\n } catch (Exception ex) {\r\n System.out.println(ex);\r\n }\r\n return null;\r\n }",
"public void getBalance( Integer account_id ){\r\n\r\n Map<String, String> params = new HashMap<>();\r\n params.put(\"account_id\", String.valueOf(account_id));\r\n String url = API_DOMAIN + ACCOUNT_EXT + GET_BALANCE;\r\n this.makeVolleyRequest( url, params );\r\n }",
"public String balance() {\n\t\treturn this.apiCall(\"balance\", \"\", \"\", true);\n\t}",
"private void listBalances() {\n\t\t\r\n\t}",
"public Money getTotalBalance();",
"public Double getBalance(){\n Double sum = 0.0;\n // Mencari balance dompet dari transaksi dengan cara menghitung total transaksi\n for (Transaction transaction : transactions) {\n sum += transaction.getAmount().doubleValue();\n }\n return sum;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public BigDecimal getBalance() {\n return balance;\n }",
"public Map<String, Integer> getAccountBalances() throws LedgerException {\n Block lastBlock;\n\n try {\n // Retrieve most recent completed block\n lastBlock = getBlock(blockMap.size());\n } catch (LedgerException e) {\n // Catch exception that 'Block does not exist' and throw a more specific error\n throw new LedgerException(\"get account balances\", \"No blocks have been committed yet.\");\n }\n\n // Get accountBalanceMap from the last committed block\n Map<String, Account> accountMap = lastBlock.getBalanceMap();\n\n // Create new map to store values\n Map<String, Integer> accountBalancesMap = new HashMap<String, Integer>();\n\n // Iterate through accounts to retrieve their current balances.\n for (Map.Entry<String, Account> entry : accountMap.entrySet() ) {\n accountBalancesMap.put(entry.getKey(), entry.getValue().getBalance());\n }\n\n return accountBalancesMap;\n }",
"public static void getAcountsBalance(int value) {\n\t\t\t\n\t\t\taccounts.clear();\n\n\t\t\tString query = \"select account.accID, accType, balance, dateCreated, fName, lName \" + \n\t\t \"from ser322.account,ser322.customer \" + \n\t\t \"WHERE customer.accID = account.accID AND balance =\" + value;\n\t\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\tStatement stmt = con.getConnection().createStatement();\n\t\t\t ResultSet rs = stmt.executeQuery(query);\n\t\t while (rs.next()) {\n\t\t \taccounts.addElement(new Account(rs.getInt(\"accID\"),rs.getString(\"accType\"),\n\t\t \t\t\t rs.getFloat(\"balance\"),rs.getDate(\"dateCreated\"), rs.getString(\"fName\"), rs.getString(\"lName\")));\n\t\t \n\t\t }\n\t\t \n\t\t } catch (SQLException e ) {\n\t\t \tSystem.out.println(\"QUERY WRONG - getAcountsBalance\");\n\t\t }\n\t\n\t\t}",
"double getBalance();",
"double getBalance();",
"@Override\n public ResponseEntity<ResponseAccountBalance> getAccountBalanceById(String accountId) {\n\n final String url = \"https://sandbox.platfr.io/api/gbs/banking/v2/accounts/\"+accountId+\"/balance\";\n //=======================================================================\n //============================= HEADER ==================================\n //=======================================================================\n HttpHeaders requestHeaders = new HttpHeaders();\n requestHeaders.setContentType(MediaType.APPLICATION_JSON);\n requestHeaders.setAccept(Collections.singletonList(MediaType.APPLICATION_JSON));\n requestHeaders.set(\"Auth-Schema\",\"S2S\");\n\n HttpEntity<AccountBalance> entity = new HttpEntity<>(requestHeaders);\n // Send request with GET method, and Headers.\n return restTemplate.exchange(url,HttpMethod.GET, entity, ResponseAccountBalance.class);\n\n }",
"@GetMapping(\"/accountBalance/{accountId}\")\n public ResponseEntity<String> getAccountBalanceAndTransactions(@PathVariable int accountId) {\n try {\n return new ResponseEntity<>(bankingService.getAccountBalanceAndTransactions(accountId), HttpStatus.OK);\n } catch (AccountNonExistentException e) {\n return new ResponseEntity<>(e.getLocalizedMessage(), HttpStatus.BAD_REQUEST);\n } catch (Exception e) {\n return new ResponseEntity<>(\"Error! \" + e.getLocalizedMessage(), HttpStatus.INTERNAL_SERVER_ERROR);\n }\n\n }",
"public void getBalance() {\n\t\tSystem.out.println(\"Balance in Savings account is\" + balance);\n\t\t//return balance;\n\t}",
"public float getBalance()\r\n\t{\n\t\ttry\r\n\t\t{\r\n\t\t\tDBConnection ToDB = new DBConnection(); //Have a connection to the DB\r\n\t\t\tConnection DBConn = ToDB.openConn();\r\n\t\t\tStatement Stmt = DBConn.createStatement();\r\n\t\t\tString SQL_Command = \"SELECT Balance FROM SavingsAccount WHERE SavingsAccountNumber ='\"+SavingsAccountNumber+\"'\"; //SQL query command for Balance\r\n\t\t\tResultSet Rslt = Stmt.executeQuery(SQL_Command);\r\n\t\t\twhile (Rslt.next())\r\n\t\t\t{\r\n\t\t\t\tBalance = Rslt.getFloat(1);\r\n\t\t\t}\r\n\t\t\tStmt.close();\r\n\t\t\tToDB.closeConn();\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SQLException: \" + e);\r\n\t\t\twhile (e != null)\r\n\t\t\t{ System.out.println(\"SQLState: \" + e.getSQLState());\r\n\t\t\t\tSystem.out.println(\"Message: \" + e.getMessage());\r\n\t\t\t\tSystem.out.println(\"Vendor: \" + e.getErrorCode());\r\n\t\t\t\te = e.getNextException();\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception: \" + e);\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\t\treturn Balance;\r\n\t}",
"public Integer getBalance() {\n return balance;\n }",
"public Integer getBalance() {\n return balance;\n }",
"public int getBalance()\n {\n return balance;\n }",
"Balance[] findAllByBankAccount_Id(Long id);",
"@Override\n\tpublic Account getBalance(String username) {\n\t\treturn account.findByUsername(username);\n\t}",
"public Integer getAccountBalance(int account_id){\n Account a = cache.get(account_id);\n if(a != null) return a.getBalance();\n\n try (\n Statement s = rawDataSource.getConnection().createStatement();\n ResultSet res = s.executeQuery(\n \"SELECT BALANCE FROM ACCOUNTS WHERE ACCOUNT_ID = \" + account_id)) {\n\n if (res.next())\n return res.getInt(\"BALANCE\");\n } catch (SQLException ex) {\n return null;\n }\n\n return null;\n }",
"public double getBalance()\n \n {\n \n return balance;\n \n }",
"public int getBalance() {\n return balance;\n }",
"public int getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public java.math.BigDecimal getBalance() {\n return balance;\n }",
"public double getBal() {\n\t\t return balance;\r\n\t }",
"public int getBalance() {\n return total_bal;\n }",
"@Override\n public long getTotalBalances() {\n return accounts.values().stream().map(Account::getBalance).mapToLong(Long::longValue).sum();\n }",
"public double getBalance()\n {\n return balance;\n }",
"public List<DietaBalanceada> consultar_dietaBalanceada();",
"public double getBalance(){\n return balance.getBalance();\n }",
"public Double getBalance() {\r\n return balance;\r\n }",
"public double getBalance(){\r\n\t\treturn balance;\r\n\t}",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public double getBalance() {\n return balance;\n }",
"public void checkBalance()\n\t{\n\t\tList<Account> accounts = Main.aDao.getAllAccounts(this.loggedIn.getUserId());\n\t\tdouble accountsTotal = 0;\n\t\t\n\t\tfor(Account a : accounts)\n\t\t{\n\t\t\taccountsTotal += a.getBalance();\n\t\t}\n\t\t\n\t\tSystem.out.println(\"Total funds available across all accounts:\\n\" + accountsTotal);\n\t}",
"public String getBalance() {\n return this.balance;\n }",
"public AccountDto getBalanceFor(UUID accountId) {\n Account account = repository.getAccount(accountId);\n return getAccountDtoFor(account);\n }",
"public String getBalance() {\n return balance;\n }",
"public ArrayList<BankAccount> getAccounts() {\n\t\tString sql = \"SELECT id, name, balance, balance_saving FROM accounts WHERE id > ?\";\n\n\t\tArrayList<BankAccount> bankAccounts = new ArrayList<>();\n\n\t\ttry (PreparedStatement pstmt = dbConnection.prepareStatement(sql)) {\n\t\t\t// set the value\n\t\t\tpstmt.setInt(1, 0);\n\n\t\t\tResultSet rs = pstmt.executeQuery();\n\n\t\t\t// loop through the result set\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tint checking_balance = rs.getInt(\"balance\");\n\t\t\t\tint saving_balance = rs.getInt(\"balance_saving\");\n\n\t\t\t\tBankAccount bankAccount = new BankAccount(id, name, checking_balance, saving_balance);\n\t\t\t\tbankAccounts.add(bankAccount);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\treturn bankAccounts;\n\t}",
"public BaseJson<BigDecimal> wallet_balance() throws Exception {\n String s = main(\"wallet_balance\",\"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }",
"public double getBankAccountBalance() {\r\n\t\t\r\n\t\tdouble balance = 0.0;\r\n\t\t\r\n\t\t\t\tif( customerBankAccountList.contains(this.getCustomer() ) ) \r\n\t\t\t\t{\t\r\n\t\t\t\t\tbalance = this.getCustomer().getBalance();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\treturn balance;\r\n\t\t}",
"public float getBalance() {\n return balance;\n }",
"@Test\n public void getBaasPortfolioBalanceUsingGetTest() throws ApiException {\n UUID nucleusPortfolioId = null;\n LocalDate endDate = null;\n LocalDate startDate = null;\n BaasBalanceVO response = api.getBaasPortfolioBalanceUsingGet(nucleusPortfolioId, endDate, startDate);\n\n // TODO: test validations\n }",
"public int getBalance() {\n return this.balance;\n\n }",
"public List<Account> getBalanceByPassbook(String passbook_id) throws Exception{\n Session session= sessionFactory.getCurrentSession();\n List<Account> accountList= session.createQuery(\"select a.balance from Account a, Passbook p where p.passbook_id='\"+passbook_id+\"'\").list();\n return AccountDto.getBalanceByPassbook(accountList);\n }",
"public double getBalance(){\n\t\treturn balance;\n\t}",
"public final float getBalance() {\n return balance;\n }",
"public double getBalance()\r\n\t{\r\n\t\treturn balance;\t\t\r\n\t}",
"@Override\n public long totalBalances() {\n long total = 0;\n for(Account account : accounts.values()){\n total += account.balance();\n }\n return total;\n }",
"public double getBalance() {\n return this.balance;\n }",
"public double getBalance() \n\t{\n\t\treturn balance;\n\t\t\n\t}",
"public long getBalance() {\n\t\n\treturn balance;\n}",
"double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance(){\n return balance;\n }",
"public double getBalance() {\r\n\t\t\r\n\t\treturn balance;\r\n\t\t\r\n\t}",
"public int getBalance() {\n\t\treturn balance;\n\t}",
"@Override\n\tpublic double getAccountBalance(final int bankAccountId, final String vcDate, final Connection connection)\n\t{\n\t\tdouble opeAvailable = 0, totalAvailable = 0;\n\t\ttry {\n\n\t\t\tfinal StringBuilder str = new StringBuilder(\"SELECT case when sum(openingDebitBalance) = null then 0\")\n\t\t\t\t\t.append(\" ELSE sum(openingDebitBalance) end - case when sum(openingCreditBalance) = null then 0\")\n\t\t\t\t\t.append(\" else sum(openingCreditBalance) end AS \\\"openingBalance\\\" \")\n\t\t\t\t\t.append(\"FROM transactionSummary WHERE financialYearId=( SELECT id FROM financialYear WHERE startingDate <= ?\")\n\t\t\t\t\t.append(\"AND endingDate >= ?) AND glCodeId =(select glcodeid from bankaccount where id= ?)\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str);\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(str.toString());\n\t\t\tpst.setString(0, vcDate);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setInteger(2, bankAccountId);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset)\n\t\t\t\topeAvailable = Double.parseDouble(element[0].toString());\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(\"opening balance \" + opeAvailable);\n\n\t\t\tfinal StringBuilder str1 = new StringBuilder(\"SELECT (case when sum(gl.debitAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.debitAmount) end - case when sum(gl.creditAmount) = null then 0\")\n\t\t\t\t\t.append(\" else sum(gl.creditAmount) end) + \").append(opeAvailable).append(\"\")\n\t\t\t\t\t.append(\" as \\\"totalAmount\\\" FROM generalLedger gl, voucherHeader vh WHERE vh.id = gl.voucherHeaderId\")\n\t\t\t\t\t.append(\" AND gl.glCodeid = (select glcodeid from bankaccount where id= ?) AND \")\n\t\t\t\t\t.append(\" vh.voucherDate >=( SELECT TO_CHAR(startingDate, 'dd-Mon-yyyy')\")\n\t\t\t\t\t.append(\" FROM financialYear WHERE startingDate <= ? AND endingDate >= ?) AND vh.voucherDate <= ?\");\n\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\tLOGGER.info(str1);\n\t\t\tpst = persistenceService.getSession().createSQLQuery(str1.toString());\n\t\t\tpst.setInteger(0, bankAccountId);\n\t\t\tpst.setString(1, vcDate);\n\t\t\tpst.setString(2, vcDate);\n\t\t\tpst.setString(3, vcDate);\n\t\t\trset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\ttotalAvailable = Double.parseDouble(element[0].toString());\n\t\t\t\tif (LOGGER.isInfoEnabled())\n\t\t\t\t\tLOGGER.info(\"total balance \" + totalAvailable);\n\t\t\t}\n\n\t\t} catch (final HibernateException e) {\n\t\t\tLOGGER.error(\" could not get Bankbalance \" + e.toString(), e);\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn totalAvailable;\n\t}",
"public double getBalance(){\n return this.balance;\r\n }",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"public double getBalance() {\n\t\treturn balance;\n\t}",
"@Override\n public long getTotalBalances() {\n return accountMap.values()\n .stream()\n .map(account -> account.getBalance())\n .reduce(0L, Long::sum);\n }",
"public long getBalance() {\n return this.balance;\n }",
"public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public void showAccountBalance(){\n balance();\n\n }",
"public double getBalance()\t{\n\t\treturn balance;\n\t}",
"public abstract int getBalancesRead();",
"@Override\r\n\tpublic Double getBalance( Integer id) {\n\t\tString sql = \"SELECT balance FROM buyers WHERE id = ?;\";\r\n\t\treturn jdbcTemplate.queryForObject( sql, Double.class, id);\r\n\t}",
"public double getBalance(){\n return balance;\n }",
"public com.redknee.util.crmapi.soap.subscriptions.xsd._2009._04.SubscriptionBundleBalance[] getBalances(){\n return localBalances;\n }",
"@java.lang.Override\n public com.google.protobuf.ByteString\n getBalanceBytes() {\n java.lang.Object ref = balance_;\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 balance_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public double getBalance(){\n return balance;\n }",
"public double getBalance(){\n return balance;\r\n }",
"public String myAfterBalanceAmount() {\r\n\t\tint count=0;\r\n\t\tList<SavingAccount> acc = null;\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"Before Repeat\");\r\n\t\t\tacc = getSavingAccountList();\r\n\r\n\t\t\tfor (SavingAccount savingAcc : acc) {\r\n\t\t\t\tif (!(\"0\".equals(savingAcc.getState()))) {\r\n\t\t\t\t\tif (savingAcc.getState().equals(\"active\")) {\r\n\t\t\t\t\t\tint maxRepeat = Integer.parseInt(savingAcc\r\n\t\t\t\t\t\t\t\t.getRepeatable());\r\n\r\n\t\t\t\t\t\tDate date = new Date();\r\n\t\t\t\t\t\tDate systemDate = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAccSer\r\n\t\t\t\t\t\t\t\t\t\t.convertDateToStringDDmmYYYY(date));\r\n\r\n\t\t\t\t\t\tDate dateEnd = savingAccSer\r\n\t\t\t\t\t\t\t\t.convertStringToDateDDmmYYYY(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t.getDateEnd());\r\n\r\n\t\t\t\t\t\tif (systemDate.getTime() == dateEnd.getTime()) {\r\n\t\t\t\t\t\t\tDate newEndDate = DateUtils.addMonths(systemDate,\r\n\t\t\t\t\t\t\t\t\tsavingAcc.getInterestRateId().getMonth());\r\n\r\n\t\t\t\t\t\t\tfloat balance = savingAcc.getBalanceAmount();\r\n\t\t\t\t\t\t\tfloat interest = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getInterestRate();\r\n\r\n\t\t\t\t\t\t\tint month = savingAcc.getInterestRateId()\r\n\t\t\t\t\t\t\t\t\t.getMonth();\r\n\t\t\t\t\t\t\tint days = Days\r\n\t\t\t\t\t\t\t\t\t.daysBetween(\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateStart())),\r\n\t\t\t\t\t\t\t\t\t\t\tnew DateTime(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tsavingAccSer\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.convertStringToDate(savingAcc\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getDateEnd())))\r\n\t\t\t\t\t\t\t\t\t.getDays();\r\n\t\t\t\t\t\t\tfloat amountAll = balance\r\n\t\t\t\t\t\t\t\t\t+ (balance * ((interest / (100)) / 360) * days);\r\n\t\t\t\t\t\t\tsavingAcc.setDateStart(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(systemDate));\r\n\t\t\t\t\t\t\tsavingAcc.setDateEnd(savingAccSer\r\n\t\t\t\t\t\t\t\t\t.convertDateToString(newEndDate));\r\n\t\t\t\t\t\t\tsavingAcc.setBalanceAmount(amountAll);\r\n\t\t\t\t\t\t\tsavingAcc.setRepeatable(\"\" + (maxRepeat + 1));\r\n\t\t\t\t\t\t\tupdateSavingAccount(savingAcc);\r\n\t\t\t\t\t\t\tcount+=1;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(\"Successfully!! \"+ count +\" Saving Account has been updated. Minh Map!!!\");\r\n\t\t\t\r\n\t\t\treturn \"success\";\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.out.println(\"Exception\");\r\n\r\n\t\t}\r\n\t\treturn \"Fail\";\r\n\t}",
"public List<Balance> getAddBalanceList() {\r\n\t\tList<Balance> balanceList = new ArrayList<Balance>();\r\n\t\tif (selectedItem != null) {\r\n\t\t\tList<Book> bookList = new ArrayList<Book>();\r\n\t\t\tfor (BalanceData b : GlobalBalance.instance().list()) {\r\n\t\t\t\t// Flag no se ha encontrado\r\n\t\t\t\tboolean founded = false;\r\n\t\t\t\t// Recuperar la lista de books a las que pertenece el balance\r\n\t\t\t\tbookList = bookService.getBooksByIdBalance(b.getId());\r\n\t\t\t\tfor (Book book : bookList) {\r\n\t\t\t\t\t// Si el book seleccionado ya pertenece al balance\r\n\t\t\t\t\tif (selectedItem.getId().compareTo(book.getId()) == 0) {\r\n\t\t\t\t\t\t// Flag se ha encontrado\r\n\t\t\t\t\t\tfounded = true;\r\n\t\t\t\t\t\t// Detener el bucle\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Si el balance no ha sido agregado ya al book\r\n\t\t\t\tif (!founded) {\r\n\t\t\t\t\t// Agregarlo a la lista\r\n\t\t\t\t\tbalanceList.add(b.getEntity());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn balanceList;\r\n\t}",
"public float showBalance() {\n\t\treturn dao.showBalance();\r\n\t}",
"double getBalance(UUID name);",
"public AmountOfMoney getCashRegisterBalance(){\n return cashRegister.getBalance();\n }",
"public float getBalance(String SavngsAcct) {\n\t\ttry\r\n\t\t{\r\n\t\t\tDBConnection ToDB = new DBConnection(); //Have a connection to the DB\r\n\t\t\tConnection DBConn = ToDB.openConn();\r\n\t\t\tStatement Stmt = DBConn.createStatement();\r\n\t\t\tString SQL_Command = \"SELECT Balance FROM SavingsAccount WHERE SavingsAccountNumber ='\"+SavingsAccountNumber+\"'\"; //SQL query command for Balance\r\n\t\t\tResultSet Rslt = Stmt.executeQuery(SQL_Command);\r\n\t\t\twhile (Rslt.next()) {\r\n\t\t\t\tBalance = Rslt.getFloat(1);\r\n\t\t\t}\r\n\t\t\tStmt.close();\r\n\t\t\tToDB.closeConn();\r\n\t\t}\r\n\t\tcatch(SQLException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"SQLException: \" + e);\r\n\t\t\twhile (e != null)\r\n\t\t\t{ System.out.println(\"SQLState: \" + e.getSQLState());\r\n\t\t\t\tSystem.out.println(\"Message: \" + e.getMessage());\r\n\t\t\t\tSystem.out.println(\"Vendor: \" + e.getErrorCode());\r\n\t\t\t\te = e.getNextException();\r\n\t\t\t\tSystem.out.println(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Exception: \" + e);\r\n\t\t\te.printStackTrace ();\r\n\t\t}\r\n\t\treturn Balance;\r\n\t}",
"public BankAccount getAccountBalanceRepo(String accountNr){\n String sql = \"SELECT * FROM bankaccount WHERE accountnr = :accountnr\";\n Map paramMap = new HashMap();\n paramMap.put(\"accountnr\", accountNr);\n BankAccount result = jdbcTemplate.queryForObject(sql, paramMap, new AccountRowMapper());\n return result;\n }",
"Collection<Account> getAll();",
"public ResultSet retBalance(Long userid) throws SQLException {\n\trs=DbConnect.getStatement().executeQuery(\"Select balance from account where accno=\"+userid+\"\");\r\n\treturn rs;\r\n}",
"private double getBalance() { return balance; }",
"java.util.List<cosmos.base.v1beta1.Coin> \n getTotalDepositList();",
"@Override\npublic Money getBalance(Enterprise enterprise, Clerk clerk)\n\t\tthrows PermissionsException {\n\treturn balance;\n}",
"public double getBalance() {\n\n double balance = 0;\n balance = overDraftLimit;\n return balance;\n\n }",
"public ArrayList<BankAccount> getAccounts() {\n return accounts;\n }",
"@Override\n public AccountDto getBalance(AccountNumberDto accountNumber) {\n AccountEntity accountEntity = new AccountDaoImpl(new StatementsRunnerImpl()).readBalance(accountNumber);\n return new AccountDto(accountEntity.getId(), accountNumber.getAccountNumber(), accountEntity.getCurrency());\n }",
"BigDecimal getClosingDebitBalance();",
"@Override\n public BigDecimal getBalance(String customerId, EMCUserData userData) {\n BigDecimal outstandingDebit = null;\n\n //Get total outstanding credits for customer, which existed at atDate\n EMCQuery query = new EMCQuery(enumQueryTypes.SELECT, DebtorsOpenTransactions.class);\n query.addFieldAggregateFunction(\"debit\", \"SUM\");\n query.addFieldAggregateFunction(\"debitAmountSettled\", \"SUM\");\n query.addFieldAggregateFunction(\"credit\", \"SUM\");\n query.addFieldAggregateFunction(\"creditAmountSettled\", \"SUM\");\n\n //Customer is optional.\n if (customerId != null) {\n query.addAnd(\"customerId\", customerId);\n }\n\n query.addAnd(\"transactionDate\", Functions.nowDate(), EMCQueryConditions.LESS_THAN_EQ);\n\n Object[] debitTotals = (Object[]) util.executeSingleResultQuery(query, userData);\n\n if (debitTotals != null) {\n BigDecimal totalDebit = debitTotals[0] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[0];\n BigDecimal totalDebitSettled = debitTotals[1] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[1];\n BigDecimal totalCredit = debitTotals[2] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[2];\n BigDecimal totalCreditSettled = debitTotals[3] == null ? BigDecimal.ZERO : (BigDecimal) debitTotals[3];\n outstandingDebit = totalDebit.subtract(totalDebitSettled);\n totalCredit = totalCredit.subtract(totalCreditSettled);\n outstandingDebit = outstandingDebit.subtract(totalCredit);\n }\n return outstandingDebit;\n }",
"public BankAccount getBalance (IDRecord idRecord) {\n\n BankAccount currentBankAccount;\n // extract the bank account number\n int theAcctNum = idRecord.getNumericalID();\n\n // find BankAccount from account -> BankAccount HashMap\n currentBankAccount = hashMapOfAllAccts.get(theAcctNum);\n\n if ( currentBankAccount == null) {\n // if no account was found, generate a generic empty account\n currentBankAccount = new BankAccount();\n\n }\n\n return currentBankAccount;\n }",
"BigDecimal getOpeningDebitBalance();",
"BigDecimal getOpeningDebitBalance();"
] | [
"0.7662915",
"0.7469268",
"0.74636555",
"0.7243607",
"0.70757926",
"0.707035",
"0.6997539",
"0.69716257",
"0.69716257",
"0.6968583",
"0.69478154",
"0.69378805",
"0.69378805",
"0.6925359",
"0.6891448",
"0.6881734",
"0.6879161",
"0.6857811",
"0.6857811",
"0.68410015",
"0.68408567",
"0.6833249",
"0.682059",
"0.6818327",
"0.6797482",
"0.6797482",
"0.6787043",
"0.6784183",
"0.67806405",
"0.67685515",
"0.67621636",
"0.6747041",
"0.67313343",
"0.67206705",
"0.67159015",
"0.67097616",
"0.6701002",
"0.6701002",
"0.6701002",
"0.6701002",
"0.67005575",
"0.66951185",
"0.6687316",
"0.6682691",
"0.6678",
"0.66698307",
"0.6667737",
"0.66577846",
"0.6650687",
"0.6632951",
"0.6631227",
"0.66254896",
"0.6616053",
"0.6614253",
"0.6589388",
"0.658235",
"0.65805846",
"0.6574199",
"0.6570024",
"0.65693206",
"0.65600705",
"0.6548588",
"0.6542309",
"0.65330225",
"0.65309423",
"0.65309423",
"0.65309423",
"0.65309423",
"0.65309423",
"0.6529138",
"0.6519781",
"0.6459974",
"0.64597",
"0.64576447",
"0.64523256",
"0.64438885",
"0.6417365",
"0.64101744",
"0.64047664",
"0.6402708",
"0.6385523",
"0.6384295",
"0.6374682",
"0.6371515",
"0.6365648",
"0.63399917",
"0.6337838",
"0.6332519",
"0.6329792",
"0.63275933",
"0.6278669",
"0.6264473",
"0.62523836",
"0.6252067",
"0.62492645",
"0.6240706",
"0.6235451",
"0.62061495",
"0.618623",
"0.61372554",
"0.61372554"
] | 0.0 | -1 |
Get deposit address for coin | @POST
@Path("transfer")
BiboxSingleResponse<String> depositAddress(
@FormParam(FORM_CMDS) String cmds,
@FormParam(FORM_APIKEY) String apiKey,
@FormParam(FORM_SIGNATURE) ParamsDigest signature); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getDepositAddres(String currency) {\n\n\t\treturn getJson(API_VERSION, ACCOUNT, \"getdepositaddress\", returnCorrectMap(\"currency\", currency));\n\t}",
"public String getAddress() {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\treturn address;\t\t\r\n\t}",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"java.lang.String getAddress();",
"@Override\n public String getAddress() {\n\n if(this.address == null){\n\n this.address = TestDatabase.getInstance().getClientField(token, id, \"address\");\n }\n\n return address;\n }",
"public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }",
"public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }",
"public Call<BCExplorerResult<AddressData>> getAddressData(String address, boolean withSum) {\n return getInstantService().balance(address, withSum ? 1 : 0);\n }",
"String getAddress();",
"String getAddress();",
"static void printAccountBalance(String address){\n }",
"public String userGetDepositAddress(String currency) throws ApiException {\n Object localVarPostBody = null;\n \n // create path and map variables\n String localVarPath = \"/user/depositAddress\".replaceAll(\"\\\\{format\\\\}\",\"json\");\n\n // query params\n List<Pair> localVarQueryParams = new ArrayList<Pair>();\n Map<String, String> localVarHeaderParams = new HashMap<String, String>();\n Map<String, Object> localVarFormParams = new HashMap<String, Object>();\n\n localVarQueryParams.addAll(apiClient.parameterToPairs(\"\", \"currency\", currency));\n\n \n \n final String[] localVarAccepts = {\n \"application/json\", \"application/xml\", \"text/xml\", \"application/javascript\", \"text/javascript\"\n };\n final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);\n\n final String[] localVarContentTypes = {\n \"application/json\", \"application/x-www-form-urlencoded\"\n };\n final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);\n\n String[] localVarAuthNames = new String[] { };\n\n GenericType<String> localVarReturnType = new GenericType<String>() {};\n return apiClient.invokeAPI(localVarPath, \"GET\", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);\n }",
"public BaseJson<String> wallet_new_address() throws Exception {\n String s = main(\"wallet_new_address\", \"[]\");\n return JsonHelper.jsonStr2Obj(s, BaseJson.class);\n }",
"String getAddress() {\n\t\treturn customer.getAddress();\n\t}",
"public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }",
"String getAddress(int type);",
"public static Buyer.Address aPaylineAddress() {\n return Buyer.Address.AddressBuilder.anAddress()\n .withCity(\"Aix-en-Provence\")\n .withCountry(\"FR\")\n .withEmail(\"[email protected]\")\n .withFullName(new Buyer.FullName(\"Thales\", \"Services\", \"M.\"))\n .withStreet1(\"150 rue dont le nom est le plus long que j'ai jamais vu. Y'a pas idée d'habiter un endroit pareil !\")\n .withStreet2(\"Le grand bâtiment orange, avec les fenêtres un peu hautes mais un peu larges aussi, et un toit bleu\")\n .withZipCode(\"13100\")\n .build();\n }",
"public String getAddress() {\n return definition.getString(ADDRESS);\n }",
"public String getAddress()\n {\n \treturn address;\n }",
"cosmos.base.v1beta1.Coin getTotalDeposit(int index);",
"public final String getAddress() {\n return address;\n }",
"@Override\n\tpublic String getAccountAddress(String account) throws WalletException {\n\t\treturn null;\n\t}",
"public int getAddress()\n {\n return address;\n }",
"public int getAddress() {\n return address;\n }",
"public Call<BCExplorerResult<AddressData>> getAddressData(String address) {\n return getInstantService().balance(address);\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}",
"private void returnDeposit(String paymentInfo) {\n }",
"@Override\n\tpublic String getAdres() {\n\t\tString pName= ctx.getCallerPrincipal().getName();\n\t\tPerson p=userEJB.findPerson(pName);\n\t\tString w=p.getAddress();\n\t\treturn w;\n\t}",
"public String getCustAddress() \r\n\t{\r\n\t\t\r\n\t\treturn custAddress;\r\n\t\t\r\n\t}",
"public String getAddress(){\n\t\treturn address;\n\t}",
"public String getAddress() {return address;}",
"public String getAddress();",
"public static String getNewAddress() throws BitcoinException {\n\t\tkeyPoolCheck();\n\t\tString newAddress = BITCOIN.getNewAddress(Config.ACCOUNT);\n\t\treturn newAddress;\n\t}",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\r\n return address;\r\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress() {\n return address;\n }",
"public String getAddress(){\n return address;\n\n }",
"public String getBENEF_ADDRESS() {\r\n return BENEF_ADDRESS;\r\n }",
"private String getAddress() {\n String add = \"\";\n if (mLocationHelper != null) {\n add = getString(R.string.address, mLocationHelper.getAddress());\n }\n return add;\n }",
"String getEndereco2();",
"public java.lang.String getAddress() {\r\n return address;\r\n }",
"public String[] createNewAddress(){\r\n byte[][] pairs=ECDSAgeneratePublicAndPrivateKey();\r\n byte[] afterhashing=RIPEMD160(SHA256hash(pairs[1]));\r\n byte[] checksum=getCheckSum(SHA256hash(SHA256hash(afterhashing)));\r\n byte[] bitcoinaddress=concateByteArray(afterhashing,checksum);\r\n return new String[]{toHex(pairs[0]), convertPrivateKeytoWIF(pairs[0]), base58encode(bitcoinaddress)};\r\n }",
"public String getBENEF_ADDRESS_3() {\r\n return BENEF_ADDRESS_3;\r\n }",
"public String getAddress(){\n\t\treturn this.address;\n\t}",
"java.lang.String getHotelAddress();",
"private String getAddress(String parkName) {\r\n\t\tfor (Park p : allParks)\r\n\t\t\tif (p.getParkName().equals(parkName))\r\n\t\t\t\treturn p.getAddress();\r\n\t\treturn \"\";\r\n\t}",
"public Address getAddress(){\n\t\treturn address;\n\t}",
"public String getAddress(){\r\n return address;\r\n }",
"public String getAddress(){\n return address;\n }",
"public String getAddress(){\n return address;\n }",
"public String getAddress(){\n return address;\n }",
"private SpeechletResponse bankAddressResponse() {\n\n Place place = getPlaceWithOpeningHours();\n\n if (place == null) {\n log.error(\"No place was found! Your address: \" + deviceAddress.toString());\n return getAskResponse(BANK_CONTACT_CARD, ERROR_TEXT);\n }\n\n return doBankAddressResponse(place);\n }",
"public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}",
"public String getAddress() {\r\n\t\treturn address;\r\n\t}",
"public String getAddress() {\r\n\t\treturn address;\r\n\t}",
"com.google.protobuf.ByteString getAddressBytes();"
] | [
"0.6254272",
"0.6222106",
"0.61645716",
"0.61645716",
"0.61645716",
"0.61645716",
"0.61645716",
"0.61645716",
"0.6144745",
"0.6116888",
"0.6116888",
"0.6073217",
"0.6033031",
"0.6033031",
"0.6021582",
"0.59930253",
"0.59589624",
"0.59498006",
"0.5945679",
"0.59370947",
"0.5929724",
"0.5903186",
"0.58733076",
"0.58684015",
"0.58658665",
"0.58647853",
"0.5860376",
"0.585884",
"0.58568245",
"0.5844084",
"0.5844084",
"0.58391476",
"0.5838336",
"0.5836675",
"0.58350074",
"0.58347785",
"0.5824281",
"0.5803094",
"0.5800957",
"0.5796945",
"0.5796945",
"0.5796945",
"0.5796945",
"0.5796945",
"0.5796945",
"0.5796945",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.5776384",
"0.57716376",
"0.5769283",
"0.57527524",
"0.574242",
"0.5742027",
"0.57372284",
"0.57366943",
"0.57357377",
"0.5732566",
"0.5732322",
"0.5726892",
"0.5714342",
"0.5699458",
"0.5699458",
"0.5699458",
"0.56805557",
"0.5678853",
"0.5675244",
"0.5675244",
"0.565525"
] | 0.58413744 | 31 |
Create an order (market/limit) | @POST
@Path("orderpending")
BiboxSingleResponse<String> trade(
@FormParam(FORM_CMDS) String cmds,
@FormParam(FORM_APIKEY) String apiKey,
@FormParam(FORM_SIGNATURE) ParamsDigest signature); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void generateAndSubmitOrder()\n {\n OrderSingle order = Factory.getInstance().createOrderSingle();\n order.setOrderType(OrderType.Limit);\n order.setPrice(BigDecimal.ONE);\n order.setQuantity(BigDecimal.TEN);\n order.setSide(Side.Buy);\n order.setInstrument(new Equity(\"METC\"));\n order.setTimeInForce(TimeInForce.GoodTillCancel);\n if(send(order)) {\n recordOrderID(order.getOrderID());\n }\n }",
"void create(Order order);",
"void createOrders(int orderNum) throws OrderBookOrderException;",
"void newOrder();",
"void createOrder(List<Product> products, Customer customer);",
"Order placeNewOrder(Order order, Project project, User user);",
"@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}",
"protected abstract Order createOrder(Cuisine cuisine);",
"public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }",
"public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}",
"public void placeOrder(TradeOrder order) {\r\n\t\tString msg = \"New order: \";\r\n\t\tif (order.isBuy()) {\r\n\t\t\tbuy.add(order);\r\n\t\t\tmsg += \"Buy \";\r\n\r\n\t\t}\r\n\r\n\t\tif (order.isSell()) {\r\n\t\t\tsell.add(order);\r\n\t\t\tmsg += \"Sell \";\r\n\t\t}\r\n\r\n\t\tmsg += this.getSymbol() + \" (\" + this.getName() + \")\";\r\n\t\tmsg += \"\\n\" + order.getShares() + \" shares at \";\r\n\r\n\t\tif (order.isLimit())\r\n\t\t\tmsg += money.format(order.getPrice());\r\n\t\telse\r\n\t\t\tmsg += \"market\";\r\n\t\tdayVolume += order.getShares();\r\n\t\torder.getTrader().receiveMessage(msg);\r\n\t\t\r\n\t}",
"public static Product[] createOrder()\n {\n Order order = new Order();\n Random r = new Random();\n int x;\n order.orderNumber++;\n int itemCount = 1 + r.nextInt(50);\n order.orderContents = new Product[itemCount];\n for (x = 0 ; x < itemCount; x++){\n Product item = productMaker.generateProduct();\n order.orderContents[x] = item;\n }\n\n return order.orderContents;\n\n }",
"public static void addOrder(String timestamp, String order_id, String side, double price, int size) {\n\t\tDouble min_buy_price, max_sell_price;\n\t\t//add the order to the log\n\t\tid_to_order.put(order_id, new Order(side,price,size));\n\n\t\tif(\"S\".equals(side)){//offer\n\n\t\t\tmin_buy_price = buyer.addNewOffer(price,size);\n\n\t\t\t//check to see if there is a new minimum buy price\n\t\t\tif(min_buy_price == null){}//do nothing, no change in min buy price\n\t\t\telse if(min_buy_price == Double.POSITIVE_INFINITY){//there are no longer enough shares to complete the buy\n\t\t\t\tSystem.out.println(timestamp +\" B NA\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(timestamp +\" B \"+ String.format(\"%.2f\", min_buy_price));\n\t\t\t}\n\t\t} else {//bid\n\t\t\tmax_sell_price = seller.addNewBid(price,size);\n\n\t\t\t//check to see if there is a new maximum sale price\n\t\t\tif(max_sell_price == null){}//do nothing, no change in min buy price\n\t\t\telse if(max_sell_price == Double.NEGATIVE_INFINITY){//there are no longer enough shares to complete the sale\n\t\t\t\tSystem.out.println(timestamp +\" S NA\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(timestamp +\" S \"+ String.format(\"%.2f\", max_sell_price));\n\t\t\t}\n\t\t}\n\t}",
"@GetMapping(\"/createorders\")\n\tpublic void generateOrderRequest(){\n\t\tSystem.out.println(\" == generateOrderRequest == \");\n\t\tfor(int i=0;i<150;i++) {\n\t\t\t// create new order\n\t\t\tOrderRequest order = new OrderRequest();\n\t\t\torder.setOrderReqId(\n\t\t\t\t\tInteger.parseInt(new RandomStringGenerator.Builder().withinRange('1', '9').build().generate(5))\n\t\t\t\t\t);\n\t\t\torder.setName(new RandomStringGenerator.Builder().withinRange('a', 'z').build().generate(5));\n\t\t\t// create status row for this order\n\t\t\tOrderRequestStatus orderStatus = new OrderRequestStatus();\n\t\t\torderStatus.setStatus(\"new\");\n\t\t\torderStatus.setOrderRequest(order);\n\t\t\torderStateRepository.save(orderStatus);\n\t\t}\n\t}",
"public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}",
"NewOrderResponse newOrder(NewOrder order);",
"OrderInformation limitOrder(UUID clientID, int size, boolean buying, int tickPrice, boolean dryRun) {\n\n int totalPrice = 0;\n int leftToFill = size;\n UUID orderID = UUID.randomUUID();\n\n // direction allows us to take advantage of the symmetry of bid and ask\n int direction = buying ? 1 : -1;\n synchronized(lock) {\n for(int i = buying ? 0 : maxPrice - 1; i != tickPrice + direction; i += direction) {\n // Check to see if there are orders opposite of my direction\n PurchaseInformation firstOrder = orderBook[i].peekFirst();\n if(firstOrder == null || firstOrder.direction == direction) {\n continue;\n }\n\n int numAtPrice = orderBook[i].size();\n int maxTradeableAtPrice = Math.min(leftToFill, numAtPrice);\n if(maxTradeableAtPrice > 0) {\n totalPrice += maxTradeableAtPrice * i;\n leftToFill -= maxTradeableAtPrice;\n\n if(!dryRun) {\n completeTrades(i, maxTradeableAtPrice);\n }\n }\n if(leftToFill == 0) {\n break;\n }\n }\n\n if(!dryRun) {\n // Add any left over order to the order book\n startTrades(tickPrice, leftToFill, orderID, clientID, direction);\n }\n }\n\n return new OrderInformation(orderID, size - leftToFill, totalPrice, direction);\n }",
"public Invoice createInvoice(Order order);",
"@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }",
"void makeLimitBuyOrder(AuthInfo authInfo, String pair, String price, String amount,HibtcApiCallback<Object> callback);",
"public Order()\r\n\t{\r\n\t\tnew BigDecimal(\"0.0\");\r\n\t\tsubtotal = new BigDecimal(\"0.0\");\r\n\t\tarraySize = 5;\r\n\t\torderSize = 0;\r\n\t\torder = new Drink[arraySize];\r\n\t\tSystem.out.println(\"New Order started!\");\r\n\t}",
"public Order createOrder() throws SQLException {\n\t\tOrder order = new Order();\n\t\tfor (Object object : Cart.getCart().getListMedia()) {\n\t\t\tCartMedia cartMedia = (CartMedia) object;\n\t\t\tOrderMedia orderMedia = new OrderMedia(cartMedia.getMedia(), cartMedia.getQuantity(), cartMedia.getPrice());\n\t\t\torder.getlstOrderMedia().add(orderMedia);\n\t\t}\n\t\treturn order;\n\t}",
"public void makeOrder(Order order) {\n for(Order_Item x : order.getOrdered()){\n TableRow item_row = build_row(x.getItem().getName(), String.valueOf(x.getQuantity()), (x.getPrice()*x.getQuantity()) + \"€\");\n orderLayout.addView(item_row);\n }\n\n refreshPriceView();\n }",
"Order addOrder(String orderId, Order order) throws OrderBookOrderException;",
"void prepareOrder(int orderId);",
"QuoteCoefficient createQuoteCoefficient();",
"public void placeOrder(TradeOrder order)\r\n {\r\n brokerage.placeOrder(order);\r\n }",
"public Order getBuyOrder(int[] spotPrices, int[] futurePrices, int pos,\r\n long money, int restDay) {\r\n\r\n /* Information available for trading:\r\n spotPrices[]: Time series of spot prices. It provides 120 elements from spotPrices[0]\r\n to spotPrices[119]. The element spotPrices[119] is the latest.\r\n futurePrices[]: Time series of futures price. It provides 60 elements from futurePrices[0]\r\n to futurePrices[59]. The element futurePrices[59] is the latest.\r\n Before opening the market, same values with spot prices are given.\r\n If no contract is made in the market, value -1 is given.\r\n pos: Position of the agent. Positive is buying position. Negative is selling.\r\n money: Available cash. Note that type 'long' is used because of needed precision.\r\n restDay: Number of remaining transaction to the closing of the market. */\r\n\r\n Order order = new Order(); // Object to return values.\r\n\r\n order.buysell = Order.BUY;\r\n // Cancel decision if it may increase absolute value of the position\r\n if (pos > fMaxPosition) {\r\n order.buysell = Order.NONE;\r\n return order;\r\n }\r\n\r\n int latestFuturePrice = futurePrices[futurePrices.length - 1];\r\n if (latestFuturePrice < 0) {\r\n order.buysell = Order.NONE;\r\n return order;\r\n } // If previous price is invalid, it makes no order.\r\n order.price = (int) ( (double) latestFuturePrice * (1.0 - fSpreadRatio));\r\n\r\n if (order.price < 1) {\r\n order.price = 1;\r\n\r\n }\r\n order.quant = fMinQuant + fRandom.nextInt(fMaxQuant - fMinQuant + 1);\r\n\r\n // Message\r\n message(\"Buy\" + \", price = \" + order.price + \", volume = \" + order.quant +\r\n \" )\");\r\n\r\n return order;\r\n }",
"public void create(Order order) {\n order_dao.create(order);\n }",
"public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }",
"@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }",
"Quote createQuote();",
"@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }",
"static void addOrder(orders orders) {\n }",
"int newOrder(OrderBean newOrder);",
"void makeLimitSellOrder(AuthInfo authInfo, String pair, String price, String amount,HibtcApiCallback<Object> callback);",
"private void performMarginalBuyOrder(\n\t\t\tStockExchangeLevel1View traderMarketView) {\n\t\t\n\t\tStock randomStock = chooseElement(inventory.keySet(), random);\n\n\t\tLong bestOfferPrice = \n\t\t\ttraderMarketView.getBestOfferPrice(randomStock);\n\n\t\tLong buyPrice = bestOfferPrice + 1l;\n\n\t\tInteger quantity = (int) (getCash() / buyPrice);\n\n\t\tDefaultLimitBuyOrder defaultLimitBuyOrder = new DefaultLimitBuyOrder(this, randomStock, quantity, buyPrice);\n\t\ttraderMarketView.placeLimitBuyOrder(defaultLimitBuyOrder);\n\n\t}",
"public void submitOrder(BeverageOrder order);",
"public static JSONObject placeOrder(Map<String, String> orderDetails) {\n JSONObject responseJson = new JSONObject();\n\n System.out.println(\"building json\");\n\n try {\n JSONObject orderJson = new JSONObject();\n\n /* \n required attributes: \n 1. retailer\n 2. products\n 3. shipping_address\n 4. shipping_method\n 5. billing_address\n 6. payment_method\n 7. retailer_credentials\n \n /* other attributes we will use:\n 8. max_price \n \n */\n // 1.\n // put the retailer attribute in\n orderJson.put(\"retailer\", \"amazon\");\n\n // 2.\n // create the products array\n JSONArray products = new JSONArray();\n JSONObject product = createProductObject(orderDetails);\n // put product in array\n products.put(product);\n // put the products array in orderJson\n orderJson.put(\"products\", products);\n\n // 3. \n // create shipping address object\n JSONObject shipAddress = createShipAddressObject(orderDetails);\n orderJson.put(\"shipping_address\", shipAddress);\n\n // 4. \n // insert shipping method attribute\n orderJson.put(\"shipping_method\", \"cheapest\");\n\n // 5.\n // create billing address object\n JSONObject billAddress = createBillAddressObject(orderDetails);\n orderJson.put(\"billing_address\", billAddress);\n\n // 6. \n // create payment method object\n JSONObject paymentMethod = createPaymentMethod(orderDetails);\n orderJson.put(\"payment_method\", paymentMethod);\n\n // 7. \n // create retailer credentials object\n JSONObject retailerCredentials = createRetailerCredentialsObject();\n orderJson.put(\"retailer_credentials\", retailerCredentials);\n\n // 8.\n // put max_price in orderJson\n // NOTE: this is the last thing that will prevent an order from \n // actually going through. use 0 for testing purposes, change to \n // maxPrice to actually put the order through\n orderJson.put(\"max_price\", 0); // replace with: orderDetails.get(\"maxPrice\")\n\n //===--- finally: send the json to the api ---===//\n responseJson = sendRequest(orderJson);\n //===-----------------------------------------===//\n\n } catch (JSONException ex) {\n Logger.getLogger(ZincUtils.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return responseJson;\n }",
"QuoteItem createQuoteItem();",
"public Order createOrder(WeeklyRecipe wr, User u, Date deliveryTime,\n\t\t\tint quantity) {\n\t\tem.getTransaction().begin();\n\t\tOrder order = new Order(false, null, false, deliveryTime, false,\n\t\t\t\tquantity, 0, wr, u);\n\t\tem.persist(order);\n\t\tem.getTransaction().commit();\n\t\treturn order;\n\t}",
"public void startOrder() {\r\n this.o= new Order();\r\n }",
"@Override\n public Order createOrder(int stockId, int partyId, int userId, boolean isBuy, BigDecimal price, int size) throws\n InvalidEntityException,\n MissingEntityException,\n IOException {\n Stock stock = stockDao.getStockById(stockId).get();\n User user = userDao.getUserById(userId).get();\n Party party = partyDao.getPartyById(partyId).get();\n LocalDateTime versionTime = LocalDateTime.now();\n Order order = new Order(user, party, stock, price, size, isBuy, PENDING, versionTime);\n order = orderDao.createOrder(order);\n auditDao.writeMessage(\"Add Order: \" + order.getId() + \" to Repository, userId: \" + userId);\n // sets status\n matchOrder(order);\n if (order.getStatus() == PENDING) {\n order.setStatus(ACTIVE);\n orderDao.editOrder(order);\n }\n return order;\n }",
"OrderDTO create(OrderDTO orderDTO);",
"public JSONObject addOrder(String type, long amount, long price)\n\t\t\tthrows Exception;",
"public void create(Order order) {\n\t\torderDao.create(order);\n\t}",
"void getMarketOrders();",
"public interface OpenOrder {\n\n /**\n * Returns the ID for this order.\n *\n * @return the ID of the order.\n */\n String getId();\n\n /**\n * Returns the exchange date/time the order was created.\n *\n * @return The exchange date/time.\n */\n Date getCreationDate();\n\n /**\n * Returns the id of the market this order was placed on.\n *\n * @return the id of the market.\n */\n String getMarketId();\n\n /**\n * Returns the type of order. Value will be {@link OrderType#BUY} or {@link OrderType#SELL}.\n *\n * @return the type of order.\n */\n OrderType getType();\n\n /**\n * Returns the price per unit for this order. This is usually in BTC or USD.\n *\n * @return the price per unit for this order.\n */\n BigDecimal getPrice();\n\n /**\n * Returns the Quantity remaining for this order. This is usually the amount of the other currency\n * you want to trade for BTC/USD.\n *\n * @return the Quantity remaining for this order.\n */\n BigDecimal getQuantity();\n\n /**\n * Returns the Original total order quantity. If the Exchange does not provide this information,\n * the value will be null. This is usually the amount of the other currency you want to trade for\n * BTC/USD.\n *\n * @return the Original total order quantity if the Exchange provides this information, null\n * otherwise.\n */\n BigDecimal getOriginalQuantity();\n\n /**\n * Returns the Total value of order (price * quantity). This is usually in BTC or USD.\n *\n * @return the Total value of order (price * quantity).\n */\n BigDecimal getTotal();\n}",
"private CustomerOrder addOrder(Customer customer, ShoppingCart cart) {\n CustomerOrder order = new CustomerOrder();\r\n order.setCustomerID(customer);\r\n order.setCustomerOrderAmount(BigDecimal.valueOf(cart.getTotal()));\r\n\r\n // Get current timestamp\r\n Calendar calendar = Calendar.getInstance();\r\n Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n order.setCustomerOrderCreated(currentTimestamp);\r\n\r\n // Create confirmation number\r\n Random random = new Random();\r\n int i = random.nextInt(999999999);\r\n order.setCustomerOrderConfirmationNumber(i);\r\n out.print(i);\r\n\r\n // Save order\r\n em.persist(order);\r\n\r\n return order;\r\n }",
"@Test\n public void testCreatePurchaseOrder() throws Exception {\n System.out.println(\"createPurchaseOrder\");\n Long factoryId = 1L;\n Long contractId = 2L;\n Double purchaseAmount = 4D;\n Long storeId = 2L;\n String destination = \"store\";\n Calendar deliveryDate = Calendar.getInstance();\n deliveryDate.set(2015, 0, 13);\n Boolean isManual = false;\n Boolean isToStore = true;\n PurchaseOrderEntity result = PurchaseOrderManagementModule.createPurchaseOrder(factoryId, contractId, purchaseAmount, storeId, destination, deliveryDate, isManual, isToStore);\n assertNotNull(result);\n }",
"Order getOrder();",
"public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}",
"public Order(int _orderId){\n this.orderId = _orderId;\n }",
"public static void PP_Order(MPPOrder o) {\n\t\tProperties ctx = o.getCtx();\n\t\tString trxName = o.get_TrxName();\n\t\t//\n\t\t// Supply\n\t\tMPPMRP mrpSupply = getQuery(o, TYPEMRP_Supply, ORDERTYPE_ManufacturingOrder).firstOnly();\n\t\tif (mrpSupply == null) {\n\t\t\tmrpSupply = new MPPMRP(ctx, 0, trxName);\n\t\t\tmrpSupply.setAD_Org_ID(o.getAD_Org_ID());\n\t\t\tmrpSupply.setTypeMRP(MPPMRP.TYPEMRP_Supply);\n\t\t}\n\t\tmrpSupply.setPP_Order(o);\n\t\tmrpSupply.setPriority(o.getPriorityRule());\n\t\tmrpSupply.setPlanner_ID(o.getPlanner_ID());\n\t\tmrpSupply.setM_Product_ID(o.getM_Product_ID());\n\t\tmrpSupply.setM_Warehouse_ID(o.getM_Warehouse_ID());\n\t\tmrpSupply.setQty(o.getQtyOrdered().subtract(o.getQtyDelivered()));\n\t\tmrpSupply.save();\n\t\t//\n\t\t// Demand\n\t\tList<MPPMRP> mrpDemandList = getQuery(o, TYPEMRP_Demand, ORDERTYPE_ManufacturingOrder).list();\n\t\tfor (MPPMRP mrpDemand : mrpDemandList) {\n\t\t\tmrpDemand.setPP_Order(o);\n\t\t\tmrpDemand.save();\n\t\t}\n\t}",
"@Test\n public void testMarketOrder() throws InterruptedException {\n setUp();\n testMatchingEngine.start();\n\n NewOrder nosB1 = createLimitOrder(\"BUY1\", Side.BUY, 100, 100.1, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB1);\n NewOrder nosB2 = createLimitOrder(\"BUY2\", Side.BUY, 200, 99.99, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB2);\n NewOrder nosB3 = createLimitOrder(\"BUY3\", Side.BUY, 300, 99.79, System.currentTimeMillis());\n clientSession.sendNewOrder(nosB3);\n\n // Sell Order with Qty=150 and Market Order\n NewOrder nosS1 = createMarketOrder(\"SELL1\", Side.SELL, 700, System.currentTimeMillis());\n clientSession.sendNewOrder(nosS1);\n\n List<Event> msg = clientSession.getMessagesInQueue();\n assertEquals(7, msg.size());\n\n Trade t = ( Trade) msg.get(0);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(1);\n assertEquals( t.getLastTradedPrice().value() , new Price(100.1).value() );\n assertEquals( t.getLastTradedQty() , 100 );\n t = ( Trade) msg.get(2);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(3);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.99).value() );\n assertEquals( t.getLastTradedQty() , 200 );\n t = ( Trade) msg.get(4);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n t = ( Trade) msg.get(5);\n assertEquals( t.getLastTradedPrice().value() , new Price(99.79).value() );\n assertEquals( t.getLastTradedQty() , 300 );\n Canceled t1 = ( Canceled) msg.get(6);\n assertEquals( t1.getCanceledQty() , 100 );\n }",
"static void apiSample() {\n ApiClient client = new ApiClient(API_KEY, API_SECRET);\n // get symbol list:\n print(client.getSymbols());\n // get accounts:\n List<Account> accounts = client.getAccounts();\n print(accounts);\n if (!accounts.isEmpty()) {\n // find account id:\n Account account = accounts.get(0);\n long accountId = account.id;\n // create order:\n CreateOrderRequest createOrderReq = new CreateOrderRequest();\n createOrderReq.accountId = String.valueOf(accountId);\n createOrderReq.amount = \"0.02\";\n createOrderReq.price = \"1100.99\";\n createOrderReq.symbol = \"ethcny\";\n createOrderReq.type = CreateOrderRequest.OrderType.BUY_LIMIT;\n Long orderId = client.createOrder(createOrderReq);\n print(orderId);\n // place order:\n String r = client.placeOrder(orderId);\n print(r);\n }\n }",
"public void createOrder() throws FlooringDaoException {\n boolean validData = true;\n do {\n try {\n Order newOrder = view.getNewOrderInfo();\n service.createOrder(newOrder);\n validData = true;\n } catch (InvalidDataException ex) {\n view.displayError(ex.getMessage());\n validData = false;\n } catch (NumberFormatException ex) {\n view.displayError(\"Area must consist of digits 0-9 with or without a decimal point.\");\n validData = false;\n }\n } while (!validData);\n }",
"public JSONObject addOrder(String type, double amount, double price)\n\t\t\tthrows Exception;",
"@Test\n public void enterOrderWithMatchedActiveOrderToCreateTrade() throws Exception {\n List<LimitOrderRequest> orderRequests = new ArrayList<>();\n orderRequests.add(getLimitOrderRequest(Direction.BUY));\n orderRequests.add(getLimitOrderRequest(Direction.SELL));\n\n Trade tradeReference = Trade.builder()\n .matchPrice(orderRequests.get(0).getLimit())\n .matchQuantity(orderRequests.get(0).getQuantity())\n .ticker(orderRequests.get(0).getTicker())\n .buyOrder(1)\n .sellOrder(2)\n .build();\n\n //When: the orders are posted to the service\n for (LimitOrderRequest orderRequest : orderRequests) {\n String orderRequestJsonString = jsonMapper.writeValueAsString(orderRequest);\n performEnterOrderPostRequest(orderRequestJsonString);\n }\n\n MvcResult getResponse = mvc.perform(get(\"/status\")\n .contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n\n PublicMarketStatus status = jsonMapper\n .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class);\n\n //Then: the trade is shown correctly in the market and the orders disappear\n List<Ticker> tickers = status.getOrders();\n Assert.assertEquals(\"There is no ticker\", 0, tickers.size());\n\n List<Trade> trades = status.getTrades();\n Assert.assertEquals(\"There is a trade\", 1, trades.size());\n Trade trade = trades.get(0);\n Assert.assertEquals(\"Trade is correct one\", tradeReference, trade);\n\n }",
"@Override\r\n\tpublic void insertOrder(OrderVO vo) throws Exception {\n\t\tsqlSession.insert(namespaceOrder+\".createOrder\",vo);\r\n\t}",
"QuoteAdjustment createQuoteAdjustment();",
"void pay(Order order);",
"Quantity createQuantity();",
"public Order(long price, long quantity, long seqNo) {\n this.price = price;\n this.quantity = quantity;\n this.seqNo = seqNo;\n }",
"public Order generateAt(int time);",
"void makeMarketBuyOrder(AuthInfo authInfo, String pair, String money,HibtcApiCallback<Object> callback);",
"@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }",
"public void addSimpleOrder(Order o) {\n DatabaseConnection connection = new DatabaseConnection();\r\n if(connection.openConnection())\r\n {\r\n if(o.getType() == 1) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO drank_order (`TafelID`, `DrankID`) VALUES(\" + o.getTafelID() + \",\" + o.getID() + \");\");\r\n }\r\n\r\n else if(o.getType() == 0) {\r\n connection.executeSQLInsertStatement(\"INSERT INTO gerecht_order (`TafelID`, `GerechtID`) VALUES(\" + o.getTafelID() + \",\" + o.getID() + \");\");\r\n }\r\n }\r\n\r\n connection.closeConnection();\r\n }",
"@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}",
"public Order() {\n this(DSL.name(\"order\"), null);\n }",
"public Order createOrder(final Checkout checkout) {\n Map<String, Object> logMap = LoggingUtils.createLogMap();\n LoggingUtils.logIfNotNull(logMap, LoggingUtils.CHECKOUT_ID, checkout.getId());\n LoggingUtils.logIfNotNull(logMap, LoggingUtils.USER_ID, checkout.getUserId());\n LOGGER.info(\"Creating order\", logMap);\n final Order mappedOrder = mapper.checkoutToOrder(checkout);\n setCreationDateTimes(mappedOrder);\n mappedOrder.getData().setLinks(linksGeneratorService.generateOrderLinks(mappedOrder.getId()));\n\n LoggingUtils.logIfNotNull(logMap, LoggingUtils.ORDER_ID, mappedOrder.getId());\n final Optional<Order> order = orderRepository.findById(mappedOrder.getId());\n order.ifPresent(\n o -> {\n final String message = \"Order ID \" + o.getId() + \" already exists. Will not update.\";\n LOGGER.error(message, logMap);\n throw new ForbiddenException(message);\n }\n );\n\n Order savedOrder;\n try {\n savedOrder = orderRepository.save(mappedOrder);\n } catch (MongoException ex) {\n String errorMessage = String.format(\"Failed to save order with id %s\", mappedOrder.getId());\n LOGGER.error(errorMessage, ex, logMap);\n throw new MongoOperationException(errorMessage, ex);\n }\n\n LOGGER.info(\"Publishing notification to Kafka 'order-received' topic for order - \" + mappedOrder.getId(), logMap);\n sendOrderReceivedMessage(mappedOrder.getId());\n\n return savedOrder;\n }",
"public SecurityOrder executeMarketOrder(MarketOrderDto orderDto) {\n if (orderDto.getSize() == 0 || orderDto.getTicker() == null) {\n throw new IllegalArgumentException(\"Fields must not be null and size must be > 0\");\n }\n\n Quote quote = quoteDao.findById(orderDto.getTicker()).orElseThrow(() ->\n new IllegalArgumentException(\"The trader account specified could not be found\"));\n Account account = accountDao.findById(orderDto.getAccountId()).orElseThrow(() ->\n new IllegalArgumentException(\"No account found with specified accountId\"));\n\n SecurityOrder securityOrder = new SecurityOrder();\n securityOrder.setAccountId(orderDto.getAccountId());\n securityOrder.setSize(orderDto.getSize());\n securityOrder.setStatus(\"Starting\");\n securityOrder.setTicker(orderDto.getTicker());\n\n if (orderDto.getSize() > 0) {\n securityOrder.setPrice(quote.getAskPrice());\n handleBuyMarketOrder(orderDto, securityOrder, account);\n } else {\n securityOrder.setPrice(quote.getBidPrice());\n handleSellMarketOrder(orderDto, securityOrder,\n account);\n }\n return securityOrderDao.save(securityOrder);\n }",
"@Test\n public void testOrderFactoryCreate() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n }",
"public void action(int[] spotPrices, int[] futurePrices, int pos,\r\n long money, int restDay) {\r\n /* Class order has instance variables as follows\r\n order.price: limit price,\r\n order.quant: quantity,\r\n order.buysell: no order(0), sell(1) or buy(2)\r\n */\r\n\r\n /* decide 'order' (here we use method getOrder described below),\r\n and call method orderRequest to submit order.\r\n If you want to submit several orders, repeat such procedure\r\n */\r\n\r\n Order buyOrder =\r\n getBuyOrder(spotPrices, futurePrices, pos, money, restDay);\r\n Order sellOrder =\r\n getSellOrder(spotPrices, futurePrices, pos, money, restDay);\r\n orderRequest(buyOrder);\r\n orderRequest(sellOrder);\r\n }",
"void write(MarketOrder mo, String orderer, String comment);",
"@Test\n\tpublic void testOrder() {\n\t\t\n\t\tDateFormat df1 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = df1 .parse(\"2021-10-15\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tshoppingCart = new ShoppingCart();\n\t\tshoppingCart.setExpiry(date);\n\t\tshoppingCart.setUserId(11491);\n\t\tshoppingCart.setItems(shoppingCartSet);\n\t\t\n\t\torder.setId(1);\n\t\torder.setShoppingCart(shoppingCart);\n\t\t\n\t\ttry {\n\t\t\tassertEquals(orderService.order(order), 1);\n\t\t\t\n\t\t} catch (OrderException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void generateOrder() throws IOException, StockException {\n\t\tManifest order = new Manifest();\n\n\t\tfor (Item item : Store.getInstance().getInventory().getItems()) {\n\t\t\tif (item.requiresOrder()) {\n\t\t\t\torder.addItem(item);\n\t\t\t}\n\t\t}\n\t\torder.saveToFile(\"manifest.csv\");\n\n\t\tfor (Truck truck : order.getTrucks()) {\n\t\t\tinventory.adjustBy(truck.getCargo(), true);\n\t\t}\n\t\tcapital -= order.getTotalCost();\n\t}",
"TradeItem createTradeItem(Account proposer, Flippo proposerFlippo, Account receiver, Flippo receiverFlippo);",
"public APIResponse placeOrder(@NotNull Order order){\n try {\n validateOrder(order);\n \n order.getItems().addAll(\n orderItemRepository.saveAll(order.getItems())\n );\n orderRepository.save( order );\n return APIResponse.builder()\n .success( true)\n .data( true )\n .error( null )\n .build();\n }catch (Exception exception){\n\n log.error(exception.getMessage());\n return APIResponse.builder()\n .success( true)\n .data( false )\n .error( exception.getMessage() )\n .build();\n }\n }",
"public void setOrder(Order order){\n this.order = order;\n }",
"@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}",
"void setOrder(Order order);",
"Order addOrder(String orderNumber, Order order)\n throws FlooringMasteryPersistenceException;",
"private void createOrder(Shop shop, FileManager fileManager, ArrayList<Tool> toolList,\n ArrayList<Integer> quantityList) {\n if (toolList.size() != 0) {\n if (shop.createOrderOrAppendOrder(shop, toolList, quantityList, fileManager)) {\n System.out.println(\"Successfully added and/or appended order to orders.txt!\");\n } else {\n System.out.println(\"ERROR: Could not edit orders.txt.\");\n }\n }\n }",
"static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }",
"public MOrder createTransferOrder(Integer newDocTypeID) throws Exception{\n\t\t// Crear el pedido idéntico\n\t\tMOrder newOrder = new MOrder(getCtx(), 0, get_TrxName());\n\t\tMOrder.copyValues(this, newOrder);\n\t\tnewOrder.setC_DocTypeTarget_ID(newDocTypeID);\n\t\tnewOrder.setC_DocType_ID(newDocTypeID);\n\t\t// Intercambiar el depósito y organización origen por destino \n\t\tnewOrder.setAD_Org_ID(getAD_Org_Transfer_ID());\n\t\tnewOrder.setAD_Org_Transfer_ID(getAD_Org_ID());\n\t\tnewOrder.setM_Warehouse_ID(getM_Warehouse_Transfer_ID());\n\t\tnewOrder.setM_Warehouse_Transfer_ID(getM_Warehouse_ID());\n\t\tnewOrder.setRef_Order_ID(getID());\n\t\tnewOrder.setDocStatus(DOCSTATUS_Drafted);\n\t\tnewOrder.setDocAction(DOCACTION_Complete);\n\t\tnewOrder.setProcessed(false);\n\t\t// Guardar\n\t\tif(!newOrder.save()){\n\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t}\n\t\t// Copiar las líneas\n\t\tMOrderLine newOrderLine;\n\t\tBigDecimal pendingQty;\n\t\tfor (MOrderLine orderLine : getLines(true)) {\n\t\t\tnewOrderLine = new MOrderLine(getCtx(), 0, get_TrxName());\n\t\t\tMOrderLine.copyValues(orderLine, newOrderLine);\n\t\t\tpendingQty = orderLine.getQtyOrdered().subtract(orderLine.getQtyDelivered());\n\t\t\t\n\t\t\tnewOrderLine.setC_Order_ID(newOrder.getID());\n\t\t\tnewOrderLine.setQty(pendingQty);\n\t\t\tnewOrderLine.setQtyReserved(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyInvoiced(pendingQty);\n\t\t\tnewOrderLine.setQtyDelivered(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyTransferred(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setPrice(orderLine.getPriceEntered());\n\t\t\tnewOrderLine.setRef_OrderLine_ID(orderLine.getID());\n\t\t\tnewOrderLine.setProcessed(false);\n\t\t\tnewOrderLine.setM_Warehouse_ID(newOrder.getM_Warehouse_ID());\n\t\t\tnewOrderLine.setAD_Org_ID(newOrder.getAD_Org_ID());\n\t\t\tif(!newOrderLine.save()){\n\t\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t\t}\n\t\t}\n\t\treturn newOrder;\n\t}",
"@Test\n\tpublic void createOrderTest() {\n\t\ttry {\n\t\t\tassertNull(salesOrderCtrl.getOrder());\n\t\t\tsalesOrderCtrl.createSalesOrder();\n\t\t\tassertNotNull(salesOrderCtrl.getOrder());\n\t\t} catch (Exception e) {\n\t\t\te.getMessage();\n\t\t}\n\t}",
"private void createIPOOrder(final OrderBO completedOrder)\n\t{\n\t\t// YTODO Auto-generated method stub\n\t\tfinal FMIPOOrderModel order = getmodelService().create(FMIPOOrderModel.class);\n\t\torder.setCode(completedOrder.getMstrOrdNbr().trim());\n\t\torder.setBilltoparty(getAccountByNabs(completedOrder.getBillToAcct().getAccountCode()));\n\t\torder.setShiptoparty(getAccountByNabs(completedOrder.getShipToAcct().getAccountCode()));\n\t\torder.setPONumber(completedOrder.getCustPoNbr());\n\t\torder.setOrdercomments(completedOrder.getComment1() + completedOrder.getComment2() + completedOrder.getComment3());\n\t\torder.setUserFirstName(\"IPO USER\");\n\t\tgetmodelService().save(order);\n\t\tcreateIPOOrderEntry(order, completedOrder.getItemList());\n\t}",
"@RequestMapping(path=\"/createOrder\", method = RequestMethod.POST, produces = \"application/json\", consumes = \"application/json\")\n\tpublic ResponseEntity<PaymentResponseDTO> createOrder(@RequestBody PaymentRequestDTO btcDTO) { \n\t\tlogger.info(\"Init payment\");\n\t\t\n\t\tSellerBitcoinInfo sbi = bitcoinRepo.findByidMagazine(btcDTO.getSellerId());\n\t\t\n\t\tSystem.out.println(\"ADDRESS \" + sbi.getBitcoinAddress());\n\t\t\n\t\tString token = sbi.getBitcoinAddress();\n\t\t\n\t\tString authToken = \"Bearer \" + token;\n\t\t//trebali bismo da kreiramo transakciju koja ce biti u stanju \"pending\" sve dok korisnik ne plati ili mu ne istekne odredjeno vreme\n\t\t\n\t\t//txRepo.save(tx);\n\t\t//RestTemplate restTemplate = new RestTemplate();\n\t\t\n\t\t//restTemplate.getForEntity(\"https://google.rs\", String.class);\n\t\t//restTemplate.getForEntity(\"https://api.coingate.com/v2/ping\", String.class);\n\t\t\n\t\tHttpHeaders headers = new HttpHeaders();\n\t\theaders.add(\"Authorization\", authToken);\t \n\t\t\n\t\tSystem.out.println(\"Amount: \" + btcDTO.getAmount());\n\t\t\n\t\tCreateOrderRequestDTO order = new CreateOrderRequestDTO(\"1111\", btcDTO.getAmount(), \"BTC\", \"DO_NOT_CONVERT\", \"Title\", \"Description\", \"https://localhost:4200/success\", \"https://localhost:4200/failed\", \"https://localhost:4200/success\", \"token\");\n\t\t\n\t\tResponseEntity<Object> responseEntity = new RestTemplate().exchange(\"https://api-sandbox.coingate.com/v2/orders\", HttpMethod.POST,\n\t\t\t\tnew HttpEntity<Object>(order, headers), Object.class);\n\t\t\n\t\tlogger.info(responseEntity.getBody().toString());\n\t\t\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tmapper.configure(Feature.ALLOW_UNQUOTED_FIELD_NAMES, true);\n\t\tBitCoinResponseDTO btcResponse = new BitCoinResponseDTO();\n\n\t\tbtcResponse = mapper.convertValue(responseEntity.getBody(), BitCoinResponseDTO.class);\n\t\t\n\t\tString paymentUrl = btcResponse.getPayment_url();\n\t\t\n\t\tlogger.info(paymentUrl);\n\t\t\n\t\tTx tx = createTransaction(btcResponse,sbi);\n\t\ttxRepo.save(tx);\n\t\t\n\t\tTxInfoDto txInfo = new TxInfoDto();\n\t\ttxInfo.setOrderId(btcDTO.getOrderId());\n\t\ttxInfo.setServiceWhoHandlePayment(\"https://localhost:8764/bitCoin\");\n\t\ttxInfo.setPaymentId(tx.getorder_id()); //ovde se nalazi orderId koji je i na coingate-u\n\t\t\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<TxInfoDto> r = restTemplate.postForEntity(\"https://localhost:8111/request/updateTxAfterPaymentInit\", txInfo, TxInfoDto.class);\n\t\t\n\t\t//BitCoinResponseDTO response = parser.parseList(responseEntity.getBody().toString());\n\t\t\n\t\t//BitCoinResponseDTO responseDTO = responseEntity.;\n\t\t\n\t\t//String pageToRedirec = responseDTO.getPayment_url();\n\t\t\n\t\t//restTemplate.exchange\n\t\t//ResponseEntity<String> response = restTemplate.postForEntity(\"https://api-sandbox.coingate.com/v2/orders\", btcDTO, String.class);\n\t\t\n\t\tPaymentResponseDTO responseDTO = new PaymentResponseDTO();\n\t\tresponseDTO.setPaymentUrl(paymentUrl);\n\t\tresponseDTO.setPaymentId(1l);\n\n\t\tSTATIC_ID = btcResponse.getId();\n\t\tSTATIC_TOKEN = authToken;\n\t\tIS_CREATE = true;\n\t\t\n\t\t//scheduleFixedDelayTask();\n\t\t//scheduleFixedDelayTask(btcResponse.getId(), authToken);\n\t\t\n\t\treturn new ResponseEntity<PaymentResponseDTO>(responseDTO,HttpStatus.OK);\n\t}",
"private void handleOrders()\r\n {\r\n // only 4 orders can fit on the screen, so don't do anything if there's already 4\r\n if (orders.size() < 4)\r\n {\r\n orderTimer--;\r\n \r\n if (orderTimer <= 0)\r\n {\r\n // create a new order\r\n Order nextOrder = new Order();\r\n orders.add(nextOrder);\r\n \r\n // find the position\r\n int xPos = 170 * orders.size() + 70;\r\n addObject(nextOrder, xPos, 100);\r\n \r\n // reset the order timer to a new value (between base time - variance & base time + variance)\r\n int baseFrameDelay = calcOrderDelay();\r\n int maxDelay = baseFrameDelay + orderVariance;\r\n int minDelay = baseFrameDelay - orderVariance;\r\n orderTimer = Greenfoot.getRandomNumber(maxDelay - minDelay) + minDelay;\r\n }\r\n }\r\n }",
"private Order convertOrderElemeToOrderObj04(ISqlAdapter adapter, String orderId) throws HitspException {\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\r\n DataTable dtOrderEleme = getOrderElemeInfo(adapter, orderId);\r\n if (dtOrderEleme == null || dtOrderEleme.size() == 0) {\r\n return null;\r\n }\r\n\r\n Order order = new Order();\r\n if (!Converter.toBoolean(dtOrderEleme.get(0, \"book\"))) {\r\n //若该订单非预订单\r\n order.setDeliverTime(null);\r\n } else {\r\n //若该订单为预订单\r\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT+8\"));\r\n// Date b = formatter.parse(a);\r\n// order.setDeliverTime(Converter.toDate(dtOrderEleme.get(0, \"deliverTime\")));\r\n try {\r\n order.setDeliverTime(formatter.parse(dtOrderEleme.get(0, \"deliverTime\")));\r\n } catch (ParseException e) {\r\n logger.error(\"预计送达时间处理错误\");\r\n }\r\n }\r\n order.setOrderId(dtOrderEleme.get(0, \"orderId\"));\r\n order.setId(Converter.toLong(orderId));\r\n\r\n String udate = dtOrderEleme.get(0, \"activeAt\");\r\n String cdate = dtOrderEleme.get(0, \"createdAt\");\r\n try {\r\n Date uDate = df.parse(udate);\r\n Date cDate = df.parse(cdate);\r\n order.setGmtCreate(cDate);\r\n order.setGmtModify(uDate);\r\n } catch (ParseException e) {\r\n logger.error(\"下单时间处理错误\");\r\n }\r\n\r\n order.setOrderFrom(\"15\");\r\n order.setTotalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"totalPrice\")));\r\n order.setOriginalPrice(Converter.toBigDecimal(dtOrderEleme.get(0, \"originalPrice\")));\r\n order.setStatus(\"0\");\r\n String elemeShopId = dtOrderEleme.get(0, \"shopId\");\r\n DataTable dtShop = getShopInfoByElemeShopId(adapter, elemeShopId);\r\n if (dtShop == null || dtShop.size() == 0) {\r\n logger.error(\"饿了么({})门店不存在\", elemeShopId);\r\n return null;\r\n }\r\n\r\n order.setShopId(dtShop.get(0, \"id\"));\r\n order.setShopName(dtShop.get(0, \"name\"));\r\n// order.setShopAddress(dtOrderEleme.get(0, \"address\"));\r\n order.setShopAddress(\"\");//饿了么推送订单中无门店地址,暂置为空\r\n order.setShopPhone(null);\r\n order.setRecipientName(dtOrderEleme.get(0, \"consignee\"));\r\n order.setRecipientAddress(dtOrderEleme.get(0, \"deliveryPoiAddress\"));\r\n\r\n StringBuilder phones = new StringBuilder();\r\n JSONArray phoneList = JSON.parseArray(dtOrderEleme.get(0, \"phoneList\"));\r\n if (phoneList != null) {\r\n for (int i = 0; i < phoneList.size(); i++) {\r\n String phone = phoneList.getString(i);\r\n if (i != 0) {\r\n phones.append(\";\");\r\n }\r\n phones.append(phone);\r\n }\r\n }\r\n order.setRecipientPhone(phones.toString());\r\n\r\n order.setRecipientLongitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[0]));\r\n order.setRecipientLatitude(Converter.toBigDecimal(dtOrderEleme.get(0, \"deliveryGeo\").split(\",\")[1]));\r\n order.setShippingType(\"10\");\r\n order.setShippingFee(dtOrderEleme.get(0, \"deliverFee\") == null ? BigDecimal.valueOf(0) : Converter.toBigDecimal(dtOrderEleme.get(0, \"deliverFee\")));\r\n order.setShipperName(null);\r\n order.setShipperPhone(null);\r\n order.setHasInvoiced(Converter.toBoolean(dtOrderEleme.get(0, \"invoiced\")));\r\n order.setInvoiceTitle(dtOrderEleme.get(0, \"invoice\"));\r\n order.setPackageFee(Converter.toBigDecimal(dtOrderEleme.get(0, \"packageFee\")));\r\n order.setPayType(Converter.toBoolean(dtOrderEleme.get(0, \"onlinePaid\")) == false ? \"1\" : \"2\");\r\n order.setCaution(dtOrderEleme.get(0, \"description\"));\r\n order.setRemark(\"\");\r\n BigDecimal shopPart = Converter.toBigDecimal(dtOrderEleme.get(0, \"shopPart\"));\r\n if (shopPart.signum() == -1) {\r\n shopPart = shopPart.abs();\r\n }\r\n order.setShopPart(shopPart);\r\n order.setShopIncome(Converter.toBigDecimal(dtOrderEleme.get(0, \"income\")));\r\n BigDecimal serviceFee = Converter.toBigDecimal(dtOrderEleme.get(0, \"serviceFee\"));\r\n if (serviceFee.signum() == -1) {\r\n serviceFee = serviceFee.abs();\r\n }\r\n order.setServiceFee(serviceFee);\r\n// List<OrderDetail> detailList = convertOrderElemeToOrderDetailList(adapter, dtOrderEleme);\r\n List<OrderDetail> detailList = convertOrderElemeToOrderDetailList04(adapter, dtOrderEleme, dtShop.get(0, \"id\"));\r\n order.setDetail(detailList);\r\n return order;\r\n }",
"protected abstract NewOrder getNewOrder( int NO_W_ID, int NO_D_ID ) throws TupleNotFoundException;",
"String registerOrder(int userId, int quantity, int pricePerUnit, OrderType orderType);",
"private void makeOrder(SensorData sensorData)throws IOException{\n try (TTransport transport = new TSocket(HOST_THRIFT, PORT_THRIFT)){\n transport.open();\n TProtocol protocol = new TBinaryProtocol(transport);\n ShopService.Client client = new ShopService.Client(protocol);\n int tmpPriceFromShop = client.getPriceByName(sensorData.getProduct().nameOfProduct);\n int min = 15;\n int max = 30;\n int random = (int )(Math.random() * max + min);\n String resultFromRPCServer = client.buyProduct(sensorData.getProduct().getNameOfProduct(),random,tmpPriceFromShop);\n // check name and value of ordered Product\n testNameAndValue(resultFromRPCServer, sensorData.getProduct().getNameOfProduct(),random);\n System.out.println(\"RPC answer:\" + resultFromRPCServer);\n sendAnswer(sensorData,resultFromRPCServer);\n try {\n Thread.sleep(3000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n transport.close();\n } catch (TException x) {\n x.printStackTrace();\n }\n }",
"@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}",
"public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}",
"public void submitOrder() {\n int price = quantity*5;\n displayPrice(price);\n }",
"@Test\n public void addOrderTest_sizeMin() {\n order.addOrder(1, 0);\n }",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"public Order() {\n\t}"
] | [
"0.7367551",
"0.73161364",
"0.67303",
"0.65390426",
"0.6517796",
"0.648031",
"0.64096564",
"0.63668734",
"0.63661027",
"0.62914497",
"0.6270211",
"0.62699986",
"0.6249967",
"0.6238079",
"0.62216085",
"0.6192217",
"0.6179698",
"0.6159904",
"0.6111856",
"0.6110566",
"0.6063676",
"0.6063089",
"0.6032355",
"0.60195595",
"0.6001444",
"0.59819204",
"0.59649473",
"0.5952433",
"0.5952342",
"0.5946902",
"0.5930142",
"0.59081507",
"0.5890702",
"0.58749646",
"0.5866521",
"0.5861316",
"0.5853417",
"0.58358335",
"0.5831604",
"0.5822152",
"0.58130866",
"0.5811911",
"0.5810894",
"0.58048815",
"0.5762766",
"0.5758599",
"0.5756567",
"0.575616",
"0.5752219",
"0.5738798",
"0.5730977",
"0.5720282",
"0.5714768",
"0.57139355",
"0.56875247",
"0.56832653",
"0.56786674",
"0.5676727",
"0.56702626",
"0.5668027",
"0.5667717",
"0.56563205",
"0.56551397",
"0.56450033",
"0.5626141",
"0.56122154",
"0.5608224",
"0.56050354",
"0.5602675",
"0.55991006",
"0.5585292",
"0.5582775",
"0.5575275",
"0.5571192",
"0.55631876",
"0.5556993",
"0.554962",
"0.5548663",
"0.5542696",
"0.55392444",
"0.55378956",
"0.5534266",
"0.551853",
"0.55101335",
"0.54990387",
"0.5481762",
"0.5479653",
"0.54793125",
"0.54759806",
"0.5466569",
"0.5462065",
"0.5457796",
"0.5456146",
"0.5445703",
"0.5436231",
"0.5433933",
"0.5432772",
"0.54319346",
"0.5430056",
"0.54297084",
"0.5429484"
] | 0.0 | -1 |
Obtain open order list / order history | @POST
@Path("orderpending")
BiboxSingleResponse<BiboxOrders> orderPendingList(
@FormParam(FORM_CMDS) String cmds,
@FormParam(FORM_APIKEY) String apiKey,
@FormParam(FORM_SIGNATURE) ParamsDigest signature); | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Order> getOrderHistory();",
"List<Order> getOpenOrders(OpenOrderRequest orderRequest);",
"List<Order> getHistoryOrders(HistoryOrderRequest orderRequest);",
"public String getOpenOrders() {\n\n\t\treturn getOpenOrders(\"\");\n\t}",
"public String getOrderHistory() {\n\n\t\treturn getOrderHistory(\"\");\n\t}",
"public Order viewOrders() {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\t//Order nextOrder = \r\n\t\treturn nextOrder;\r\n\t}",
"public IOperationHistory getOperationHistory() {\n\t\treturn OperationHistoryFactory.getOperationHistory();\r\n\t}",
"public String open_orders(String pair) {\n\t\treturn this.apiCall(\"open_orders\", pair, \"\", true);\n\t}",
"public List listOrders() throws Exception {\r\n\r\n \r\n XMLUtil.printHeading(\"List Orders\");\r\n\r\n String request = templateReader.readTemplate(\"ACXOrderHistoryRequest\");\r\n request = XMLUtil.insertValueForTag(request, \"</BuyPartnerID>\", BeanCreation.buyPartnerId);\r\n request = XMLUtil.insertValueForTag(request, \"</SellPartnerID>\", BeanCreation.sellPartnerId);\r\n\r\n // Set the begin and end date for orders to search for to today.\r\n long now = System.currentTimeMillis();\r\n //String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date(now+86400000));\r\n String date = DateFormat.getDateInstance(DateFormat.SHORT).format(new Date());\r\n request = XMLUtil.insertValueForTag(request, \"</BeginDate>\", date);\r\n request = XMLUtil.insertValueForTag(request, \"</EndDate>\", date);\r\n\r\n XMLUtil.printXML(\"List Orders Request:\", XMLUtil.prettifyString(request));\r\n\r\n RequestInfo info = null;\r\n try {\r\n // Get the transactionIds\r\n String xmlResponse = partOrderManager.listOrders(request);\r\n info = partOrderManager.getRequestInfo().copy();\r\n XMLUtil.printXML(\"List Orders Response:\", XMLUtil.prettifyString(xmlResponse));\r\n\r\n System.out.println(\"listOrders\");\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n List transactionIds = getTransactionIds(xmlResponse);\r\n return transactionIds;\r\n } catch (Exception e) {\r\n info = partOrderManager.getRequestInfo().copy();\r\n\r\n System.out.println(\"listOrders() caught Exception: \" + e);\r\n System.out.println(\"ACXTrackNum: \" + info.getTrackNum());\r\n System.out.println(\" Total time: \" + info.getTotalTime() + \" millis\");\r\n System.out.println(\" Gateway access: \" + info.getGatewayAccessTime());\r\n System.out.println(\" SDK overhead: \" + (info.getTotalTime() - info.getGatewayAccessTime()));\r\n System.out.println();\r\n\r\n }\r\n\r\n List transactionIds = new ArrayList();\r\n return transactionIds;\r\n }",
"@GetMapping(\"/getOrderHistory\")\n\tpublic ResponseEntity<List<Order>> getOrderHistoryWithOrderId(@RequestParam int orderId) {\n\t\treturn new ResponseEntity<>(dataFetchService.getOrderHistoryWithOrderId(orderId), HttpStatus.OK);\n\t}",
"void getOrders();",
"public List<ReportBaseImpl> getOpenOrders(SimpleUser user)\r\n throws PersistenceException;",
"private IOperationHistory getOperationHistory() {\n return PlatformUI.getWorkbench().getOperationSupport().getOperationHistory();\n }",
"public List<Order> getOrderHistory(Customer customer) throws ExecutionException, InterruptedException {\n\n List<Order> orderList = new ArrayList<>();\n\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future<List<Order>> futures = executorService.submit(new getOrderHistory(customer));\n executorService.shutdown();\n\n if (futures.get() != null) {\n orderList = futures.get();\n }\n\n\n return orderList;\n }",
"public History(ArrayList<Order> orders) {\n this.orders = orders;\n }",
"public List getAccessRequestHistoryExternal() {\n List sortedList = new ArrayList(getAccessRequestHistory());\n Collections.sort(sortedList);\n return Collections.unmodifiableList(sortedList);\n }",
"java.util.List<hr.client.appuser.CouponCenter.ExchangeRecord> \n getExchangeHistoryListList();",
"public List<Order> retrieveOrders1DayAgo( Date currentDate ) throws OrderException;",
"public String getOrderHistory(String market) {\n\n\t\tString method = \"getorderhistory\";\n\n\t\tif(market.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, ACCOUNT, method);\n\n\t\treturn getJson(API_VERSION, ACCOUNT, method, returnCorrectMap(\"market\", market));\n\t}",
"void getMarketOrders();",
"@GET(\"V2/eshopping/driver/getDriverLocationByOrderId/{orderId}\")\n Observable<List<DriverLocation>> getLocationHistoryByOrderId(@Path(\"orderId\") Long orderId);",
"@Override\n public List<Order> findOrders() {\n return orderRepository.findAll(Sort.by(Sort.Direction.DESC, \"created\")).stream()\n .filter(t -> t.getOrder_state().equals(\"ACTIVE\"))\n .map(mapper::toDomainEntity)\n .collect(toList());\n }",
"public String getOpenOrders(String market) {\n\n\t\tString method = \"getopenorders\";\n\n\t\tif(market.equals(\"\"))\n\n\t\t\treturn getJson(API_VERSION, MARKET, method);\n\n\t\treturn getJson(API_VERSION, MARKET, method, returnCorrectMap(\"market\", market));\n\t}",
"public interface OpenOrder {\n\n /**\n * Returns the ID for this order.\n *\n * @return the ID of the order.\n */\n String getId();\n\n /**\n * Returns the exchange date/time the order was created.\n *\n * @return The exchange date/time.\n */\n Date getCreationDate();\n\n /**\n * Returns the id of the market this order was placed on.\n *\n * @return the id of the market.\n */\n String getMarketId();\n\n /**\n * Returns the type of order. Value will be {@link OrderType#BUY} or {@link OrderType#SELL}.\n *\n * @return the type of order.\n */\n OrderType getType();\n\n /**\n * Returns the price per unit for this order. This is usually in BTC or USD.\n *\n * @return the price per unit for this order.\n */\n BigDecimal getPrice();\n\n /**\n * Returns the Quantity remaining for this order. This is usually the amount of the other currency\n * you want to trade for BTC/USD.\n *\n * @return the Quantity remaining for this order.\n */\n BigDecimal getQuantity();\n\n /**\n * Returns the Original total order quantity. If the Exchange does not provide this information,\n * the value will be null. This is usually the amount of the other currency you want to trade for\n * BTC/USD.\n *\n * @return the Original total order quantity if the Exchange provides this information, null\n * otherwise.\n */\n BigDecimal getOriginalQuantity();\n\n /**\n * Returns the Total value of order (price * quantity). This is usually in BTC or USD.\n *\n * @return the Total value of order (price * quantity).\n */\n BigDecimal getTotal();\n}",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public String getHistory () {\r\n\t\treturn history;\r\n\t}",
"public void listOrders() {\n\t\tSystem.out.println(\"\\nMostrant tots els orders\");\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.peek(System.out::println)\n\t\t\t.flatMap(o -> o.getDetails().stream())\n\t\t\t.forEach(System.out::println);\n\t}",
"public List<OrderLine> getOrderLineList() {\n\t\tHttpServletRequest request = (HttpServletRequest)FacesContext.getCurrentInstance()\n\t\t\t\t.getExternalContext().getRequest();\n\t\tHttpSession session = ((HttpServletRequest) request).getSession(false);\n\t\t\n\t\t//recuperation du login\n\t\tlogin = (session != null) ? (LoginMB) session.getAttribute(\"loginMB\") : null;\n\t\t//recuperation du user\n\t\tSystem.out.println(\"login user from session : \"+login.getUser().getIdPerson());\n\t\torderList = orderBu.getLastOrder(login.getUser().getIdPerson());\n\t\t\n\t\tSet<OrderLine> set = new HashSet<OrderLine>();\n\t\tset = orderList.get(orderList.size()-1).getOrderLines();\n\t\torderLineList = new ArrayList<OrderLine>(set);\n\t\tsetTotal(orderList.get(orderList.size()-1).getTotalAmount());\n\t\t\n\t\t\n\t\treturn orderLineList;\n\t}",
"@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //order history\n }",
"static HistoryEvent[] getHistoryEvents() {\n/* 73 */ HISTORY_RW_LOCK.readLock().lock();\n/* */ \n/* */ try {\n/* 76 */ return HISTORY.<HistoryEvent>toArray(new HistoryEvent[HISTORY.size()]);\n/* */ }\n/* */ finally {\n/* */ \n/* 80 */ HISTORY_RW_LOCK.readLock().unlock();\n/* */ } \n/* */ }",
"private Changelist[] getChanges() {\n String depot = parent.getDepot();\n String counterName = parent.getCounter();\n Client client = Client.getClient();\n\n // Obtain the most recent changelist available on the client\n Changelist toChange = Changelist.getChange(depot, client);\n\n // Obtain the lower boundary for the changelist results\n Counter counter = Counter.getCounter(counterName);\n int counterVal = 0;\n if (counter != null) {\n counterVal = counter.getValue();\n } else {\n counterVal = toChange.getNumber();\n }\n\n return Changelist.getChanges(depot, counterVal, toChange.getNumber());\n }",
"public StringBuilder getHistory() {\r\n\t\treturn history;\r\n\t}",
"public List<Order> getOrder() {\n return order;\n }",
"public String getHistory () {\n\t\treturn history;\n\t}",
"public static void viewOrder() {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Viewing existing orders************\");\n\t\t// TODO - implement RRPSS.viewOrder\n\t\tOrderManager orderManager = new OrderManager();\n\t\tList listOfOrders = orderManager.viewOrder();\n\n\t\tOrderedItemManager orderedItemManager = new OrderedItemManager();\n\t\tList listOfOrderedItems = null;\n\t\tOrderedPackageManager orderedPackageManager = new OrderedPackageManager();\n\t\tList listOfOrderedPromotionalPackage = null;\n\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tOrder order = null;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tif (listOfOrders.size() == 0) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"There is no orders!\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t// print the list of orders for the user to select from.\n\t\t\tfor (i = 0; i < listOfOrders.size(); i++) {\n\t\t\t\torder = (Order) listOfOrders.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println((i + 1) + \") Order: \" + order.getId()\n\t\t\t\t\t\t+ \" | Table: \" + order.getTable().getId());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\tSystem.out.print(\"Select an order to view the item ordered: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\torder = (Order) listOfOrders.get(choice - 1);\n\n\t\t\tlistOfOrderedItems = orderedItemManager\n\t\t\t\t\t.retrieveOrderedItemsByOrderID(order.getId());\n\t\t\tlistOfOrderedPromotionalPackage = orderedPackageManager\n\t\t\t\t\t.retrieveOrderedPackageByOrderID(order.getId());\n\n\t\t\tif (listOfOrderedItems.size() == 0\n\t\t\t\t\t&& listOfOrderedPromotionalPackage.size() == 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Order is empty!\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.out.println();\n\t\t\tif (listOfOrderedItems.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"All Cart Items Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedItems.size(); j++) {\n\t\t\t\t\tOrderedItem orderedItem = (OrderedItem) listOfOrderedItems\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedItem.getItem().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedItem.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\n\t\t\tif (listOfOrderedPromotionalPackage.size() > 0) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\tSystem.out.println(\"Promotional Packages Ordered:\");\n\n\t\t\t\tfor (int j = 0; j < listOfOrderedPromotionalPackage.size(); j++) {\n\t\t\t\t\tOrderedPackage orderedPackage = (OrderedPackage) listOfOrderedPromotionalPackage\n\t\t\t\t\t\t\t.get(j);\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\n\t\t\t\t\tSystem.out.println((j + 1) + \") ID: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getId() + \" | Name: \"\n\t\t\t\t\t\t\t+ orderedPackage.getPackage().getName() + \" | $\"\n\t\t\t\t\t\t\t+ orderedPackage.getPrice());\n\t\t\t\t}\n\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of viewing orders************\");\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <O> List<O> activeVersions() {\n return (List<O>) journal.journal\n .retrieve(BarbelQueries.allActive(journal.id), BarbelQueryOptions.sortAscendingByEffectiveFrom())\n .stream().map(d -> journal.processingState.expose(journal.context, (Bitemporal) d))\n .collect(Collectors.toList());\n }",
"public ArrayList<Order> getTodaysOrders() {\n\n\t\tArrayList<Order> order = new ArrayList<Order>();\n\n\t\tOrder or = null;\n\n\t\tDate date = new Date();\n\n\t\tTimestamp ts = new Timestamp(date.getTime());\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM restodb.order WHERE date >= '\" + formatter.format(ts).substring(0, 10) + \"'\";\n\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tResultSet rs = statement.executeQuery(sql);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tor = new Order(rs.getString(\"idorder\"), rs.getString(\"date\"), rs.getString(\"clientName\"),\n\t\t\t\t\t\trs.getString(\"status\"), rs.getString(\"location_idlocation\"));\n\n\t\t\t\torder.add(or);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t\treturn order;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<String> openDiffs() {\n\t\tString path = getCurrentPath()+slash+\"diffs.xml\";\n\t\tList<String> diffs = (List<String>) JavaIO.getObjectFromXML(path);\n\t\treturn diffs;\n\t}",
"public List<Order> getOrders() {\n return _orders;\n }",
"public ArrayList<Order> getOrders() {\n return this.listOrder;\n }",
"public List<GlucoseData> getCompleteHistory() {\n List<GlucoseData> history = new ArrayList<>();\n\n String selectQuery = \"SELECT * FROM \" + TABLE_HISTORY;\n\n SQLiteDatabase db = getReadableDatabase();\n Cursor cursor = db.rawQuery(selectQuery, null);\n\n cursor.moveToFirst();\n\n try {\n if (cursor.moveToFirst()) {\n do {\n GlucoseData glucosedata = new GlucoseData();\n glucosedata.setID(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_ID)));\n glucosedata.setDate(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_DATE)));\n glucosedata.setGlucoseLevel(cursor.getInt(cursor.getColumnIndex(KEY_HISTORY_GLUCOSELEVEL)));\n glucosedata.setComment(cursor.getString(cursor.getColumnIndex(KEY_HISTORY_COMMENT)));\n\n // Adding to list\n history.add(glucosedata);\n } while(cursor.moveToNext());\n }\n } catch (Exception e) {\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n }\n\n return history;\n }",
"public ArrayList<KitchenItemModel> getCurrentOrders() throws SQLException {\n Statement stmt = connection.createStatement();\n ResultSet orderItems = stmt.executeQuery(\"SELECT * FROM order_items, menu, orders \"\n + \"WHERE order_items.menu_id=menu.menu_id \"\n + \"AND order_items.order_id=orders.order_id \"\n + \"AND order_items.status='ordered'\"\n + \"AND orders.status='accepted'\"\n + \"ORDER BY order_items.order_items_id\");\n\n ArrayList<KitchenItemModel> output = new ArrayList<>();\n KitchenItemModel kitchenItemModel;\n OrderItemModel itemModel;\n while (orderItems.next()) {\n // adjustments could be null so this is checked for\n String adjustments = \"\";\n if (orderItems.getObject(\"adjustments\") == null) {\n adjustments = \"None\";\n } else {\n adjustments = orderItems.getString(\"adjustments\");\n }\n\n // making order_item model\n itemModel = new OrderItemModel(orderItems.getInt(\"order_items_id\"),\n orderItems.getInt(\"order_id\"),\n orderItems.getInt(\"menu_id\"),\n adjustments,\n orderItems.getString(\"status\"),\n orderItems.getString(\"name\"));\n\n // making kitchen item model\n kitchenItemModel = new KitchenItemModel(orderItems.getInt(\"table_num\"),\n orderItems.getInt(\"order_id\"),\n timeServices.convertTime(orderItems.getObject(\"time_ordered\").toString()),\n itemModel);\n\n output.add(kitchenItemModel);\n }\n return output;\n }",
"private void printBrowsingHistory()\r\n\t{\r\n\t\tQueue temp = new Queue(SIZE);\r\n\t\tObject element;\r\n\t\t\r\n\t\tSystem.out.println(\"\\nBrowsing History (Oldest to Most Recent):\");\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t{\r\n\t\t\telement = rChronological.dequeue();\t\t\t\t//dequeue first element to the variable element\r\n\t\t\tSystem.out.println(element);\t\t\t\t\t//print out the value of element (the URL)\r\n\t\t\ttemp.enqueue(element);\t\t\t\t\t\t\t//enqueue element to a temporary queue\r\n\t\t}\r\n\t\tfor (int i = 0; i < queueCount; i++)\r\n\t\t\trChronological.enqueue(temp.dequeue());\t\t\t//put all elements in temp back to the original queue\r\n\t}",
"public ArrayList<Order> getOrders() {\n\n\t\tArrayList<Order> order = new ArrayList<Order>();\n\n\t\tOrder or = null;\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM restodb.order\";\n\n\t\t\tjava.sql.PreparedStatement statement = mysqlConnect.connect().prepareStatement(sql);\n\n\t\t\tResultSet rs = statement.executeQuery(sql);\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tor = new Order(rs.getString(\"idorder\"), rs.getString(\"date\"), rs.getString(\"clientName\"),\n\t\t\t\t\t\trs.getString(\"status\"), rs.getString(\"location_idlocation\"));\n\n\t\t\t\torder.add(or);\n\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tmysqlConnect.disconnect();\n\t\t}\n\n\t\treturn order;\n\t}",
"public List<OrderDetails> fetchOderList(){\n List<OrderDetails> orderDetails = null;\n orderDetails = mongoDbConnector.fetchOderList();\n return orderDetails;\n }",
"public OrderList findOrders(){\n sql=\"SELECT * FROM Order\";\n Order order;\n try{\n ResultSet resultSet = db.SelectDB(sql);\n \n while(resultSet.next()){\n order = new Order();\n order.setOrderID(resultSet.getString(\"OrderID\"));\n order.setCustomerID(resultSet.getString(\"CustomerID\"));\n order.setStatus(resultSet.getString(\"Status\"));\n ordersList.addItem(order);\n }\n }\n catch(SQLException e){\n System.out.println(\"Crash finding all orders\" + e);\n }\n return ordersList;\n }",
"@Override\r\n\tpublic List<Order> ListOrder() {\n\t\treturn null;\r\n\t}",
"public ArrayList<HashMap<String, String>> getHistoryOrder(int actId, int roleCode) {\n\n return orderList.getOrderById(actId, roleCode);\n }",
"hr.client.appuser.CouponCenter.ExchangeRecord getExchangeHistoryList(int index);",
"List<List<Order>> getAllOrdersByQuantity() throws OrderBookOrderException;",
"public HashMap<Integer, OpenPositionRecord> getOpenPositions(){\n\t\treturn hmPosition;\n\t}",
"@Override\n public List<Order> getAllOrders(LocalDate date) throws PersistenceException{\n return new ArrayList<Order>(orders.values());\n }",
"public List<Order> getOrders(){\n return this.orders;\n }",
"public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> findAll()\n {\n return findAll(0, Integer.MAX_VALUE);\n }",
"@GET(\"V2/eshopping/order/statusHistories/{orderId}\")\n Observable<List<OrderStatus>> getOrderStatusComment(@Path(\"orderId\") Long orderId);",
"public List<DataGroupInfoActiveHistoryRecord> getActiveHistoryList()\n {\n return myActiveSetConfig.getActivityHistory();\n }",
"public List<InteractionEvent> getInteractionHistory() {\n \t\tSet<InteractionEvent> events = new HashSet<InteractionEvent>();\n \t\tfor (InteractionContext taskscape : contexts.values()) {\n \t\t\tevents.addAll(taskscape.getInteractionHistory());\n \t\t}\n \t\treturn new ArrayList<InteractionEvent>(events);\n \t}",
"@Override\r\n\tpublic List getOrderList() {\n\t\tList orderList = new ArrayList();\t\r\n\t\tConnection conn = null;\t\t\r\n\t\tStatement stmt = null;\t\t\r\n\t\tResultSet rs = null;\r\n\t\ttry{\r\n Class.forName(\"com.mysql.jdbc.Driver\");\t\t\t\r\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/gwap\",\"root\",\"\");\t\t\t\r\n\t\t\tstmt = conn.createStatement();\t\t\t\r\n\t\t\trs = stmt.executeQuery(\"select * from orderview\");\r\n\t\t\t\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\tOrderview orderview = new Orderview();\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\torderview.setLineid(rs.getString(\"lineid\"));\r\n\t\t\t\torderview.setOrderid(rs.getString(\"orderid\"));\r\n\t\t\t\torderview.setCost(rs.getString(\"cost\"));\r\n\t\t\t\torderview.setName(rs.getString(\"name\"));\r\n\t\t orderview.setPaystyle(rs.getString(\"paystyle\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\torderList.add(orderview);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception ex){\r\n\t\t\r\n ex.printStackTrace();\t\t\t\r\n\t\t\tthrow new RuntimeException(\"error when querying orders \",ex);\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\ttry {\r\n\t\t\t\trs.close();\r\n\t\t\t\tstmt.close();\r\n\t\t\t\tconn.close();\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t\tex.printStackTrace();\t\t\t\t\r\n\t\t\t\tthrow new RuntimeException(\"error when querying orders \",ex);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\treturn orderList;\r\n\t}",
"private Order getOrder()\n {\n return orderController.getOrder(getOrderNumber());\n }",
"public List<CommissionDistribution> lookupHistory(Long sourceAccount) {\n throw new UnsupportedOperationException(\"Not Implemented yet.\");\n }",
"public void getHistory() {\n List<Map<String, String>> HistoryList = null;\n HistoryList = getData();\n String[] fromwhere = {\"Line\", \"Station\", \"Repair_Time_Start\", \"Repair_Time_Finish\", \"Repair_Duration\"};\n int[] viewwhere = {R.id.Line, R.id.Station, R.id.RepairTimeStart, R.id.RepairTimeFinish, R.id.Duration};\n ABH = new SimpleAdapter(BreakdownHistory.this, HistoryList, R.layout.list_history, fromwhere, viewwhere);\n BreakdownHistory.setAdapter(ABH);\n }",
"public List<ComplexOrderTO> getOutstandingOrders(long storeID) throws NotInDatabaseException;",
"public String showCurrentOrder(){\n stringBuilder = new StringBuilder();\n for (int i = 0; i < OrderManager.getInstance().getOrder().size(); i++) {\n stringBuilder.append((i + 1) + \". \" + OrderManager.getInstance().getOrder().get(i).toString() + \"\\n\");\n }\n return stringBuilder.toString();\n }",
"int getExchangeHistoryListCount();",
"@Override\n\tpublic void getOrders() {\n\t\t\n\t}",
"public List<Order> getOrdersByDate(Date date);",
"public void listOrder()\r\n {o.listOrder();}",
"@Override\n\tpublic List<WxOrder> queryOrderByExpressList() {\n\t\treturn orderMapper.queryOrderByExpressList();\n\t}",
"@GetMapping(\"/view-all-order\")\n\tpublic List<OrderDTO> viewAllOrders() {\n\t\tLOGGER.info(\"view-all-Order URL is opened\");\n\t\tLOGGER.info(\"view-all-Order() is initiated\");\n\t\tLOGGER.info(\"view-all-Order() has executed\");\n\t\treturn orderService.getAllOrders();\n\t}",
"private ObservableList<Order> getOrders() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n return db.getOrders(selectedCustomer.getCustomer_id());\n }",
"public ArrayList<History> getPriceHistory() { return priceHistory; }",
"public String getWithdrawalHistory() {\n\n\t\treturn getWithdrawalHistory(\"\");\n\t}",
"public String listOfOrders() {\r\n\t\t StringBuilder sb = new StringBuilder();\r\n for (Iterator<Order> it = orders.iterator(); it.hasNext();){\r\n\t\t\t Order o = (Order) it.next();\r\n \t sb.append(o.toString() + NL);\r\n }\r\n return sb.toString();\r\n }",
"public String getJdHistory() {\r\n\t\treturn jdHistory;\r\n\t}",
"public List<Weather> getHistory() {\n return weatherRepo.findAll();\n }",
"@Override\n\tpublic List<Orders> getOrdersLastThreeDays() {\n\t\t// subtract 3 days from today\n\n\t\tDate d = new Date(System.currentTimeMillis());\n\n\t\tDate thirtyDaysAgo = new Date(d.getTime() - (3 * 86400000));\n\n\t\treturn shelfRepository.getOrdersLastThreeDays(thirtyDaysAgo);\n\n\t}",
"List<Order> getAll();",
"public List<Order> getOrders() {\n\t\treturn new ArrayList<Order>(mOrders);\n\t}",
"ObservableList<OrderItem> getObservableOrderItemList();",
"public static List<IOrder> getOrders() throws JFException {\r\n\t\treturn JForexContext.getEngine().getOrders();\r\n\t}",
"public List<Order> getOrders() {\n\t\treturn repo.findAll();\n\t}",
"public String getTravelRequisitionHistoryList() {\n\t\t// default method invoked when this action is called - struts framework rule\n\t\tif (logger.isDebugEnabled())\n\t\t\tlogger.debug(\"inside expense history action\");\n\t\tString status = \"\";\n\t\ttreqMaster = (TravelReqMasters) session.get(IConstants.TRAVEL_REQUISITION_SESSION_DATA);\n\n\t\tif (treqMaster == null) {\n\t\t\tsuper.setJsonResponse(jsonParser.toJson(treqHistoryList));\n\t\t} else {\n\t\t\ttreqHistoryList = treqService.getTravelRequisitionHistory(treqMaster.getTreqeIdentifier().getTreqeIdentifier());\n\t\t\tsuper.setJsonResponse(jsonParser.toJson(treqHistoryList));\n\t\t\tstatus = treqMaster.getStatus();\n\t\t\tString nextActionCode = null;\n\t\t\tnextActionCode = treqService.getNextActionCode(treqMaster);\n\t\t\tif (nextActionCode != null) {\n\t\t\t\tsetStatus(treqService.getRemainingApprovalPaths(\n\t\t\t\t\t\ttreqMaster.getTreqmIdentifier(), getUserSubject()));\n\t\t\t}\t\t\t\n\t\t\telse\n\t\t\t\tif (status != null) {\n\t\t\t\t\tif (status.equals(IConstants.APPROVED)\n\t\t\t\t\t\t\t|| status.equals(IConstants.EXTRACTED)\n\t\t\t\t\t\t\t|| status.equals(IConstants.HOURS_ADJUSTMENT_SENT)) {\n\t\t\t\t\t\tsetStatus(IConstants.HISTORYMSG_APPROVED_EXTRACTED_HOURS_ADJUSTMENT_SENT);\n\t\t\t\t\t} else if (status.equals(IConstants.PROCESSED)) {\n\t\t\t\t\t\tsetStatus(IConstants.HISTORYMSG_PROCESSED);\n\t\t\t\t\t} else if (status.equals(IConstants.REJECTED)) {\n\t\t\t\t\t\tsetStatus(IConstants.HISTORYMSG_REJECTED);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tsetStatus(IConstants.HISTORYMSG_NEEDSTOBESUBMITTED);\n\t\t\t\t}\t\n\t\t}\n\t\t\n\t\treturn IConstants.SUCCESS;\n\t}",
"public FileHistory getFileHistory() {\n\t\treturn theFileHistory;\n\t}",
"public static Cursor getTransactionHistoryDbCursor() {\n // get DB helper\n mDbHelper = PointOfSaleDb.getInstance(context);\n\n // Each row in the list stores amount and date of transaction -- retrieves history from DB\n SQLiteDatabase db = mDbHelper.getReadableDatabase();\n\n // get the following columns:\n String[] tableColumns = { PointOfSaleDb.TRANSACTIONS_COLUMN_TX_ID,\n PointOfSaleDb.TRANSACTIONS_COLUMN_LOCAL_AMOUNT,\n PointOfSaleDb.TRANSACTIONS_COLUMN_LOCAL_CURRENCY,\n PointOfSaleDb.TRANSACTIONS_COLUMN_CREATED_AT,\n PointOfSaleDb.TRANSACTIONS_COLUMN_TX_STATUS,\n PointOfSaleDb.TRANSACTIONS_COLUMN_CRYPTOCURRENCY_AMOUNT,\n PointOfSaleDb.TRANSACTIONS_COLUMN_CRYPTOCURRENCY_ADDRESS,\n \"_ROWID_\", //// getting also _ROWID_ to save the txID after getting the response\n PointOfSaleDb.TRANSACTIONS_COLUMN_CRYPTOCURRENCY};\n\n String sortOrder = PointOfSaleDb.TRANSACTIONS_COLUMN_CREATED_AT + \" DESC\";\n Cursor c = db.query(PointOfSaleDb.TRANSACTIONS_TABLE_NAME, tableColumns, null, null, null, null, sortOrder);\n\n return c;\n }",
"List<RequestHistory> getQueries() throws RemoteException;",
"@Override\n\tpublic List<mOrders> getList() {\n\t\ttry{\n\t\t\tbegin();\n\t\t\tCriteria criteria = getSession().createCriteria(mOrders.class);\n\t\t\tcriteria.add(Restrictions.ne(\"O_Status_Code\",Constants.ORDER_STATUS_DELIVERIED ));\n\t\t\t//criteria.createAlias(\"O_BatchCode\", \"O_BatchCode\");\n\t\t\t//criteria.addOrder(Order.asc(\"O_BatchCode.value\"));\n\t\t\tList<mOrders> listOrders = criteria.list();\n\t\t\tcommit();\n\t\t\treturn listOrders;\n\t\t}catch(HibernateException e){\n\t\t\te.printStackTrace();\n\t\t\trollback();\n\t\t\tclose();\n\t\t\treturn null;\n\t\t}finally{\n\t\t\tflush();\n\t\t\tclose();\n\t\t}\n\t}",
"Order getOrder();",
"@Override\n\tpublic List<Orders> queryOrder() throws SQLException {\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet result = null;\n\t\tList<Orders> messages=null;\n\t\ttry{\n\t\t\tconn = DBCPUtils.getConnection();\n\t\t\tstmt = conn.prepareStatement(\"SELECT * FROM orders\");\n\t\t\tresult = stmt.executeQuery();\n\t\t\tmessages=new ArrayList<Orders>();\n\t\t\twhile (result.next()) {\n\t\t\t\tOrders order=new Orders();\n\t\t\t\torder.setOrderId(result.getInt(1));\n\t\t\t\torder.setOrderName(result.getString(2));\n\t\t\t\torder.setOrderAddress(result.getString(3));\n\t\t\t\torder.setOrderPhone(result.getString(4));\n\t\t\t\torder.setOrderNumber(result.getInt(5));\n\t\t\t\torder.setOrderTime(result.getString(6));\n\t\t\t\torder.setBookName(result.getString(7));\n\t\t\t\torder.setOrderMemo(result.getString(8));\n\t\t\t\tmessages.add(order);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tDBCPUtils.releaseConnection(conn, stmt, result);\n\t\t}\n\t\treturn messages;\n\t\t\n\t\t\n\t}",
"public List<OrderDetail> getOrderDetailByOrder(Long orderId);",
"public List<String> getAllOrders() {\n\t List<String> orderList = new ArrayList<String>();\n\t // Select All Query\n\t String selectQuery = \"SELECT * FROM \" + ORDER_RECORDS_TABLE;\n\t \n\t SQLiteDatabase db = this.getWritableDatabase();\n\t Cursor cursor = db.rawQuery(selectQuery, null);\n\t \n\t // looping through all rows and adding to list\n\t if (cursor.moveToFirst()) {\n\t do {\n\t \torderList.add(\"Order Number:[\" + cursor.getString(0) + \"] Barcode Number:[\" + cursor.getString(1) + \"] Customer Number:[\" + cursor.getString(2) +\n\t \t\t\t\"] Customer Name:[\" + cursor.getString(3) + \"] Order Date:[\" + cursor.getString(4) + \"]\");\n\t } while (cursor.moveToNext());\n\t }\n\t \n\t // return the list\n\t return orderList;\n\t}",
"@Override\r\n\tpublic List<Order> getAllOrders() {\n\t\treturn null;\r\n\t}",
"public List<Weborders> getWeborders() {\r\n List<Weborders> webordersListe = null;\r\n Transaction tx = null;\r\n try {\r\n tx = sessionH.beginTransaction();\r\n Query q = this.sessionH.createQuery(\"from Weborders ORDER BY weborderId\");\r\n webordersListe = q.list();\r\n tx.commit();\r\n } catch (HibernateException e) {\r\n if (tx != null) {\r\n tx.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n sessionH.close();\r\n }\r\n return webordersListe;\r\n }",
"@Override\n\tpublic void openOrderEnd() {\n\t}",
"public Map<Integer, OrderRecord> getRunningOrders(){\n\t\treturn hmRunningOrder;\n\t}",
"@Override\n public ArrayList<Order> getAllAvailableOrders() throws PersistenceException{ //list is the interface\n return new ArrayList<Order>(orders.values()); //ArrayList is the class that implements the List\n }",
"public static com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders> getPendingObjects()\n {\n return (com.sybase.collections.GenericList<ru.terralink.mvideo.sap.Orders>)(Object)DELEGATE.getPendingObjects();\n }",
"public ArrayList<OverdueNotice> open(){\n this.openOrNot = true;\n this.calendar.advance();\n this.println(\"Library is opened today!\");\n ArrayList<OverdueNotice> overdueList = this.createOverdueNotices();\n for (OverdueNotice notice : overdueList){\n this.println(notice.toString());\n } \n return overdueList;\n }",
"public synchronized Map<String, Long> getHistory() {\r\n return settings.getMap(HISTORY_SETTING);\r\n }",
"public Order viewOrder(int on) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tOrder found = em.find(Order.class, on);\r\n\t\tem.close();\r\n\t\treturn found;\r\n\t}",
"public com.sybase.collections.GenericList<com.sybase.persistence.LogRecord> getLogRecords()\n {\n return ru.terralink.mvideo.sap.LogRecordImpl.findByEntity(\"Orders\", keyToString());\n }",
"List<WayBill> getWayBillVisited();"
] | [
"0.7891546",
"0.7296336",
"0.72822",
"0.67100304",
"0.6627718",
"0.62490386",
"0.62301135",
"0.6155328",
"0.6124729",
"0.6078372",
"0.60302734",
"0.60114586",
"0.6004378",
"0.59568626",
"0.5948878",
"0.59288836",
"0.59239626",
"0.59094363",
"0.5867166",
"0.5818587",
"0.581232",
"0.57821864",
"0.5777883",
"0.5766775",
"0.57320607",
"0.57320607",
"0.5729016",
"0.5713355",
"0.5709031",
"0.5707391",
"0.5701753",
"0.5687918",
"0.5683927",
"0.5675497",
"0.5665394",
"0.56569695",
"0.5655232",
"0.56537664",
"0.5643647",
"0.564072",
"0.56304026",
"0.5601524",
"0.5601078",
"0.55983937",
"0.55927545",
"0.5584521",
"0.55829847",
"0.55821246",
"0.5579688",
"0.5571761",
"0.55654377",
"0.55617404",
"0.5545226",
"0.5541306",
"0.55364203",
"0.55353874",
"0.55327153",
"0.5520913",
"0.5520632",
"0.5518673",
"0.5510514",
"0.5509964",
"0.5508647",
"0.5503714",
"0.55032706",
"0.54825175",
"0.54816866",
"0.547857",
"0.54741806",
"0.54671144",
"0.5466922",
"0.5464715",
"0.54592174",
"0.5457328",
"0.54476005",
"0.54400104",
"0.5438746",
"0.5438512",
"0.5437615",
"0.543369",
"0.5430715",
"0.54278344",
"0.54278225",
"0.5423086",
"0.54152036",
"0.54132503",
"0.5411689",
"0.53991723",
"0.5399066",
"0.53965265",
"0.5395052",
"0.53883207",
"0.53820074",
"0.53796506",
"0.53784496",
"0.5376913",
"0.5376649",
"0.5373077",
"0.5369441",
"0.5361794",
"0.53616405"
] | 0.0 | -1 |
TODO Autogenerated method stub | public static void main(String[] args) throws IOException {
String filePath="configs\\Task.properties";
FileInputStream fis=new FileInputStream(filePath);
Properties prop=new Properties();
prop.load(fis);
String browser=prop.getProperty("browser");
String url=prop.getProperty("url");
System.out.println(browser+"-->"+url);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"0.6671074",
"0.6567672",
"0.6523024",
"0.6481211",
"0.6477082",
"0.64591026",
"0.64127725",
"0.63762105",
"0.6276059",
"0.6254286",
"0.623686",
"0.6223679",
"0.6201336",
"0.61950207",
"0.61950207",
"0.61922914",
"0.6186996",
"0.6173591",
"0.61327106",
"0.61285484",
"0.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
test Polynom() default constructor ; | @Test
void testPolynomConstructor() {
Iterator<Monom>it=polynomEx.iteretor();
assertFalse("Checks that the polynom's arrayList is null:",it.hasNext());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PerezosoTest()\n {\n }",
"public RtpPacketTest() {\n\n\t}",
"public Produto() {}",
"public Promo(){\n}",
"public DefaultSimplePolicyValueTestAbstract() {\n }",
"public Potencial() {\r\n }",
"public HawthornWandBehaviorTest() {\n \n }",
"public Orbiter() {\n }",
"public RookTest()\r\n {\r\n }",
"public Communicator() {\n\t}",
"public Purp() {\n }",
"private Protocol() {}",
"Reproducible newInstance();",
"public Phl() {\n }",
"public p7p2() {\n }",
"public LyricAnswer() {\n }",
"public Plato(){\n\t\t\n\t}",
"private MockarooPingHelper(){}",
"public lo() {}",
"public Postoj() {}",
"public PSO() {\r\n initialiseNetwork();\r\n initialisePSO();\r\n }",
"@Test\n public void testInitialize()\n {\n Pistol weap = new Pistol(10, 50, 10, 2, 10);\n assertEquals(10, weap.getMaxAmmo());\n assertEquals(50, weap.getMaxRange());\n assertEquals(10, weap.getBaseDamage());\n assertEquals(2, weap.getRateOfFire());\n assertEquals(10, weap.getCurrentAmmo());\n }",
"private ProtomakEngineTestHelper() {\r\n\t}",
"public LpsClient() {\n super();\n }",
"public Communicator() {\n }",
"public Communicator() {\n }",
"public Propuestas() {}",
"public AllLaboTest() {\n }",
"public RentRPCServer() {\n\t\tsuper(null, null);\n\t\t// mocking purpose\n\t}",
"private Ognl() {\n }",
"private DataClayMockObject() {\n\n\t}",
"public RptPotonganGaji() {\n }",
"public Pitonyak_09_02() {\r\n }",
"@Test\n public void TestConstructor() {\n assertNotNull(q1);\n }",
"private MApi() {}",
"private Rekenhulp()\n\t{\n\t}",
"public TestPawn(){\n }",
"public TestCaseSocket() {\n\t}",
"@Test\n public void testConstructorWithNullsInQuestion() {\n TestRoutePoliciesAnswerer answerer =\n new TestRoutePoliciesAnswerer(\n new TestRoutePoliciesQuestion(Direction.IN, ImmutableList.of(), null, null), _batfish);\n assertEquals(answerer.getNodeSpecifier(), AllNodesNodeSpecifier.INSTANCE);\n assertEquals(answerer.getPolicySpecifier(), ALL_ROUTING_POLICIES);\n }",
"private Ognl(){\n }",
"public NMQModuleClient() {\r\n }",
"public Poem(){}",
"public PppoeSessionInfo() {\n }",
"public AllPoojaResult() {}",
"public no() {}",
"public AcuityTest() {\r\n }",
"public Curso() {\r\n }",
"public Pasien() {\r\n }",
"public Libro() {\r\n }",
"public Nota() {\n }",
"public ClimbingClubTest()\n {\n \n }",
"public BrokerAlgo() {}",
"private MockClientNetworkModule() {\n\t\t// TODO complete this constructor\n\t}",
"public SlanjePoruke() {\n }",
"public DetArqueoRunt () {\r\n\r\n }",
"public CPRCommand()\r\n {\r\n }",
"public PaymentStatusPoll() {\n }",
"private Mocks() { }",
"public TestPrelab2()\n {\n }",
"public AvaliacaoRisco() {\n }",
"public Basic() {}",
"public CMN() {\n\t}",
"public Notifica(){}",
"public GetResponseTest() {\n\t\t/*\n\t\t * This constructor should not be modified. Any initialization code\n\t\t * should be placed in the setUp() method instead.\n\t\t */\n\n\t}",
"@Test\n public void constructor() {\n\n {\n NodeFullUpdateRequest tested = new NodeFullUpdateRequest();\n Assert.assertNull(tested.getRequest());\n }\n\n {\n FullUpdateRequest request = new FullUpdateRequest();\n NodeFullUpdateRequest tested = new NodeFullUpdateRequest(\"myNode\", request);\n Assert.assertEquals(request, tested.getRequest());\n }\n\n }",
"private Teller() {\n }",
"public CustomPdp() throws Exception {\r\n\r\n }",
"@Override\n\tpublic Task constructInstance(Robot robot) {\n\t\treturn null;\n\t}",
"public God() {}",
"public ConversationTest() {\r\n\r\n }",
"defaultConstructor(){}",
"public Produit() {\n }",
"private PumpManager() { }",
"@Test\n\tpublic void testDefaultConstructor() {\n\t\tassertThat(\"Expect not null.\", testling, is(notNullValue()));\n\t}",
"private Instantiation(){}",
"public Lotto2(){\n\t\t\n\t}",
"public PromoBonusImpl() {\n }",
"protected PolicyModelGenerator() {\n // nothing to initialize\n }",
"public ArrivalQuayStub() {\n\t}",
"public Lanceur() {\n\t}",
"public DefaultResponsibleParty() {\n }",
"public CommandResultTest() {\n super(CommandResult.EMPTY);\n }",
"public Client() {}",
"private SingleTon() {\n\t}",
"public FlightTest(){\n }",
"@Test\n void testEmptyConstructor() {\n assertNotNull(isLockedRequest1);\n }",
"public Puppy() {\n\t\t//TODO\n\t}",
"private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}",
"public Test() {\n }",
"public Simulador(){\n }",
"public TestUser() {//NOPMD\n }",
"P createP();",
"@Test\n public void testDefaultConstructor() {\n assertThat(\"Expect not null.\", testling, is(notNullValue()));\n }",
"@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }",
"public WebSocketRPC() {\n\t}",
"public Telefone() {\n\t}",
"public Connection() {\n\t\t\n\t}",
"public Test()\n {\n }",
"public TestPlayer()\n {\n }",
"public ProjektTest()\n {\n }"
] | [
"0.66022253",
"0.6532459",
"0.6489505",
"0.64665014",
"0.6357961",
"0.6325732",
"0.62877905",
"0.618593",
"0.6182368",
"0.61819565",
"0.6181536",
"0.6155789",
"0.6144796",
"0.6144302",
"0.61280215",
"0.61278826",
"0.61271423",
"0.6124504",
"0.61050075",
"0.6102595",
"0.6079079",
"0.6078292",
"0.60743034",
"0.6068514",
"0.6066871",
"0.6066871",
"0.6059417",
"0.60559297",
"0.60371274",
"0.60171986",
"0.59894234",
"0.59813976",
"0.5978867",
"0.59781426",
"0.59667486",
"0.5966419",
"0.59621465",
"0.59600323",
"0.59505886",
"0.59486157",
"0.5946276",
"0.5943007",
"0.59423804",
"0.5938684",
"0.593754",
"0.59300756",
"0.5927918",
"0.59233016",
"0.59161896",
"0.59115",
"0.5907805",
"0.59073746",
"0.58985686",
"0.58875084",
"0.58864284",
"0.5885483",
"0.5880936",
"0.5879903",
"0.58767134",
"0.5870422",
"0.5867457",
"0.5867389",
"0.5860831",
"0.58550715",
"0.5854982",
"0.5852022",
"0.58495325",
"0.5847391",
"0.5846045",
"0.58455664",
"0.58431715",
"0.58415776",
"0.5839126",
"0.58361155",
"0.58327127",
"0.5824098",
"0.581798",
"0.5813206",
"0.5811939",
"0.57938296",
"0.5790975",
"0.57898164",
"0.57800454",
"0.57779485",
"0.5776262",
"0.5773608",
"0.5770847",
"0.5770198",
"0.5768076",
"0.5765738",
"0.5761336",
"0.57596123",
"0.5748847",
"0.5745768",
"0.5743061",
"0.57415134",
"0.5739804",
"0.57372534",
"0.5736577",
"0.5735814"
] | 0.651608 | 2 |
The only entrance for update routing rules step 1) delete all rule nodes from zk step 2) create all rule nodes on zk | public static void main(String args[]) {
try {
ConfigurationContext.loadYamlClientConfig();
new ZookeeperMonicaClient().start();
ConfigurationContext.loadYamlClientConfig();
UpdateRulesMain main = new UpdateRulesMain();
main.deleteRules();
main.storeRules();
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"sync/rules\")\n public Response syncRules() {\n\n KubevirtNodeAdminService service = get(KubevirtNodeAdminService.class);\n\n service.completeNodes(WORKER).forEach(this::syncRulesBase);\n return ok(mapper().createObjectNode()).build();\n }",
"private void installRulesOnFlow()\n\t{\t\t\t\n\t\tVertex sourceVertex = m_graph.getSourceVertex();\n\t\tshort vlanNum = 1;\n\t\tfor(Edge sourceOutEdge :sourceVertex.getOutgoingEdges())\n\t\t{\n\t\t\tif(sourceOutEdge.getFlow()>0)\n\t\t\t{\n\t\t\t\tattachIpAddressToVlan(vlanNum);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_IPV4);\n\t\t\t\tinstallRule(sourceVertex.getName(), sourceOutEdge.getSourcePort(), vlanNum,RULE_TYPE.SOURCE_ARP_ADD_VLAN);\n\t\t\t\tinstallRule(sourceOutEdge.getTo().getName(), sourceOutEdge.getDestPort(), vlanNum,RULE_TYPE.DEST_ARP);\n\t\t\t\tinstallRuleToHostSrc(sourceVertex.getName(),vlanNum, sourceOutEdge.getSourcePort());\n\t\t\t\tsourceOutEdge.setIsRuleInstalled();\n\t\t\t\tinstallRulesOnFlowDFS(sourceOutEdge.getTo(),vlanNum);\n\t\t\t\tvlanNum++;\n\t\t\t}\n\t\t}\t\n\t}",
"public void deduceRules()\n{\n List<RuleInstance> allrules = loadRules();\n\n List<UpodRule> rules = new ArrayList<UpodRule>();\n for (UpodRule ur : for_program.getRules()) {\n if (ur.isExplicit()) {\n\t rules.add(ur);\n\t RuleInstance ri = new RuleInstance(ur,from_world.getUniverse());\n\t allrules.add(ri);\n }\n }\n\n Set<Condition> allconds = getConditions(allrules);\n\n tree_root = new TreeNode(allrules,null);\n\n expandTree(tree_root,allconds);\n\n generateRules(tree_root);\n}",
"@Override\n public void deleteRuleAR() {\n }",
"@Override\n\tpublic void deleteRuleAfterFirstMvt() {\n\t\t\n\t}",
"public void clearRules() {\n this.rules_ = emptyProtobufList();\n }",
"public static void modifyTopology()\r\n\t{\r\n\t\tSystem.out.println(\"===============STARTING TO MODIFY TOPOLOGY==============\");\r\n\t\tscan = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Please enter Router that you want to Shutdown : \"); // Printing Instruction\r\n\t\t\r\n\t\tint delr = Integer.parseInt(scan.nextLine()); // Reading the router to be deleted\r\n\t\twhile (delr < 1 || delr > routers) {\r\n\t\t\tSystem.out.print(\"\\n The entered source router not present, Please enter Again : \");\r\n\t\t\tdelr = Integer.parseInt(scan.nextLine());\r\n\t\t}\r\n\t\tdelr = delr - 1;\r\n\t\t\r\n\t\tint[][] graph2 = new int[routers-1][routers-1];\r\n\t\tint p = 0;\r\n\t\tfor (int i = 0; i < routers; ++i) { // Loop for deleting router and shifting graphay\r\n\r\n\t\t\tif (i == delr)\r\n\t\t\t\tcontinue;\r\n\t\t\tint q = 0;\r\n\t\t\tfor (int j = 0; j < routers; ++j) // Control loop for shifting\r\n\t\t\t{\r\n\t\t\t\tif (j == delr)\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t\r\n\t\t\t\tgraph2[p][q] = graph[i][j]; // shifting row and column\r\n\t\t\t\t++q;\r\n\t\t\t}\r\n\t\t\t++p;\r\n\t\t}\r\n\t\t\r\n\t\trouters -= 1;\r\n\t\t\r\n\t\tSystem.out.println(\"============NEW TOPLOGY============\");\r\n\t\tfor (int row = 0; row < routers; row++) {\r\n\t\t\tfor (int col = 0; col < routers; col++) {\r\n\t\t\t\tLinkstateRouting.graph[row][col] = graph2[row][col];\r\n\t\t\t\tSystem.out.print(graph[row][col] + \"\\t\"); // Printing the new topology again\t\t\t\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t }\r\n\t\tSystem.out.println(\"Router \" + (delr + 1) + \" is Shutdown\");\r\n\t}",
"private void loadRules2() {\n\t\t\r\n\t\tint type = Integer.valueOf(env.getProperty(\"sentinel.server.type\")) ;\r\n\t\t\r\n String appId = \"sentinel-demo\";\r\n String apolloMetaServerAddress = \"http://10.1.77.106:8080\";\r\n System.setProperty(\"app.id\", appId);\r\n System.setProperty(\"apollo.meta\", apolloMetaServerAddress);\r\n\r\n String namespaceName = \"application\";\r\n String flowRuleKey = \"flowRules\";\r\n // It's better to provide a meaningful default value.\r\n String defaultFlowRules = \"[]\";\r\n\r\n ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ApolloDataSource<>(namespaceName,\r\n flowRuleKey, defaultFlowRules, source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {\r\n }));\r\n FlowRuleManager.register2Property(flowRuleDataSource.getProperty());\r\n ClusterFlowRuleManager.setPropertySupplier(namespace ->flowRuleDataSource.getProperty());\r\n \r\n\r\n\t\tif (ClusterStateManager.CLUSTER_SERVER == type) \r\n\t\t{\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_SERVER);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_CLIENT);\r\n\t\t\tinitClientConfigProperty(namespaceName);\r\n\t\t\tinitClientServerAssignProperty(namespaceName);\r\n\t\t}\r\n \r\n \r\n \r\n \r\n }",
"protected abstract void rebuildNetwork(int numNodes);",
"@Override\n public void deleteVisRuleAR() {\n }",
"private void resetRoute() {\n\t\troute = new Route[] {new Route(distanceMatrix)};\n\t\ttotalCost = 0;\n\t}",
"private void saveRules()\n {\n\n HashMap<Long,ContextualAdRule> insertData =(HashMap)serverRules.clone();\n\n\n try\n {\n\n\n //check campaign record to update or insert to the local database\n Cursor campaignsCursor= CampaignRulesDBModel.getRulesByServerIdsList(TextUtils.join(\",\",serverRules.keySet()),context);\n\n if (campaignsCursor != null && campaignsCursor.moveToFirst())\n {\n do {\n\n\n long serverId = campaignsCursor.getLong(campaignsCursor.getColumnIndex(CampaignsDBModel.CAMPAIGNS_TABLE_SERVER_ID));\n if (serverId >0)\n {\n insertData.remove(serverId);\n }\n\n } while (campaignsCursor.moveToNext());\n\n }\n\n }catch (Exception e)\n {\n e.printStackTrace();\n\n }finally {\n //do bulk insert\n if(insertData.size()>0)\n {\n bulkRulesInsert(insertData);\n\n }\n\n\n\n deleteUnknownRules();\n\n deleteUnknownRuleCampaigns();\n\n checkAndInsertRuleCampaigns();\n\n //send success response\n sendSuccessResponse();\n }\n\n\n }",
"private void recalculateAllRoutes() {\n robotModels.parallelStream().forEach(m -> m.recalculateRoute(target, obstacles));\n }",
"public static void createMappingRules(String serviceId) throws URISyntaxException {\n String metricId = \"\";\n Metrics metrics = getThreeScaleApiService().listMetric(serviceId);\n Metric metric = metrics.getMetric();\n logger.info(\"metricId name: \" + metric.getName());\n if (metric.getName().equalsIgnoreCase(\"Hits\")) {\n metricId = String.valueOf(metric.getId());\n }\n\n logger.info(\"metricId : \" + metricId);\n\n MappingRulesParameters mp = new MappingRulesParameters();\n mp.setPattern(\"/\");\n mp.setDelta(\"1\");\n mp.setMetric_id(metricId);\n mp.setHttp_method(\"POST\");\n\n MappingRule rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n //now create mapping rule for PUT under metric \"hit\"\n mp.setHttp_method(\"PUT\");\n rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n //now create mapping rule for PATCH under metric \"hit\"\n mp.setHttp_method(\"PATCH\");\n rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n //now create mapping rule for DELETE under metric \"hit\"\n mp.setHttp_method(\"DELETE\");\n rule = getThreeScaleApiService().createMappingRules(serviceId, mp);\n logger.info(\"creating mapping result : \" + rule.getHttpMethod());\n\n }",
"@Override\n public void update(Routing.Rules rules) {\n rules\n .get(\"/\", this::getAllMovements)\n .get(\"/balance/{customer}\", this::getCustomerBalance)\n .get(\"/orders/{customer}\", this::getOrdersProxy)\n .get(\"/shippinginfo/{orderNo}\", this::getShippingInfo)\n .get(\"/login\", this::loginSTTC)\n .post(\"/create\", this::createMovement)\n .post(\"/compensate\", this::compensateMovement)\n .get(\"/{customer}\", this::getCustomerMovements)\n ;\n }",
"private void reEstablishConnections() {\n// System.out.println(\"Impossible to create overlay, starting over...\");\n for (NodeRecord node : registeredNodes.values()) {\n node.getNodesToConnectToList().clear();\n node.resetNumberOfConnections();\n }\n createOverlay();\n }",
"public void pruneRules_cbaLike() {\n LOGGER.info(\"STARTED Postpruning\");\n //HashMap<ExtendRule,Integer> ruleErrors = new HashMap();\n //HashMap<ExtendRule,AttributeValue> ruleDefClass = new HashMap();\n ArrayList<ExtendRule> rulesToRemove = new ArrayList(); \n int totalErrorsWithoutDefault = 0; \n AttributeValue defClassForLowestTotalErrorsRule = getDefaultRuleClass();\n int lowestTotalErrors = getDefaultRuleError(defClassForLowestTotalErrorsRule);;\n ExtendRule lowestTotalErrorsRule = null;\n // DETERMINE TOTAL ERROR AND DEFAULT CLASS ASSOCIATED WITH EACH RULE \n // REMOVE RULES MATCHING ZERO TRANSACTIONS AND OF ZERO LENGTH\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n\n ExtendRule rule = it.next();\n rule.updateQuality();\n rule.setQualityInRuleList(rule.getRuleQuality());\n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.log(Level.FINE, \"Processing rule {0}\", rule.toString());\n }\n\n if (rule.getAntecedentLength() == 0) {\n LOGGER.fine(\"Rule of length 0, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed\n } \n else if (rule.getRuleQuality().getA() == 0)\n {\n LOGGER.fine(\"Rule classifying 0 instances correctly, MARKED FOR REMOVAL\");\n rulesToRemove.add(rule); //covered transactions should not be removed \n }\n else\n {\n rule.removeTransactionsCoveredByAntecedent(true); \n totalErrorsWithoutDefault = totalErrorsWithoutDefault + rule.getRuleQuality().getB();\n // since transactions matching the current rule have been removed, the default class and error can change\n AttributeValue newDefClass = getDefaultRuleClass();\n int newDefError = getDefaultRuleError(newDefClass);\n int totalErrorWithDefault = newDefError + totalErrorsWithoutDefault;\n if (totalErrorWithDefault < lowestTotalErrors)\n {\n lowestTotalErrors = totalErrorWithDefault;\n lowestTotalErrorsRule = rule;\n defClassForLowestTotalErrorsRule= newDefClass;\n } \n //ruleErrors.put(rule,totalErrorWithDefault );\n //ruleDefClass.put(rule, newDefClass); \n }\n \n }\n boolean removeTail;\n // now we know the errors associated with each rule not marked for removal, we can perform pruning\n if (lowestTotalErrorsRule == null)\n {\n // no rule improves error over a classifier composed of only default rule\n // remove all rules\n removeTail = true;\n }\n else \n {\n removeTail = false;\n }\n \n data.getDataTable().unhideAllTransactions();\n for (Iterator<ExtendRule> it = extendedRules.iterator(); it.hasNext();) {\n ExtendRule rule = it.next();\n if (rulesToRemove.contains(rule) || removeTail)\n {\n it.remove();\n continue;\n }\n if (rule.equals(lowestTotalErrorsRule))\n {\n removeTail = true;\n }\n rule.updateQuality(); \n }\n \n \n if (LOGGER.isLoggable(Level.FINE)) {\n LOGGER.fine(\"Creating new default rule within narrow rule procedure\");\n }\n \n \n extendedRules.add(createNewDefaultRule(defClassForLowestTotalErrorsRule));\n \n \n LOGGER.info(\"FINISHED Postpruning\");\n }",
"private void clearNodes()\r\n\t{\r\n\t clearMetaInfo();\r\n\t nodeMap.clear();\r\n\t}",
"public void removeOldRoutes()\n\t{\n\t\tList<RouteTableEntry> safeList = Collections.synchronizedList(getList());\n\t\t\n\t\ttable.clear(); // clear the table\n\t\t\n\t\tfor (RouteTableEntry entry : safeList)\n\t\t{\n\t\t\tif (entry.getCurrentAgeInSeconds() > NetworkConstants.ROUTE_TABLE_TIMEOUT)\n\t\t\t{\n\t\t\t\t// do nothing, the entry expired so leave it out of the table\n\t\t\t} // end if\n\t\t\telse\n\t\t\t{\n\t\t\t\ttable.add(entry); // put it back in the table\n\t\t\t} // end else\n\t\t} // end for each loop\n\t\t\n\t\t/*addOrUpdate(Utilities.getLL3PIntFromLL3PString(NetworkConstants.MY_LL3P_ADDRESS), \n\t\t\t\tnew NetworkDistancePair(Utilities.getLL3PIntFromLL3PString(NetworkConstants.MY_LL3P_ADDRESS), \n\t\t\t\t0), // I am zero away from myself\n\t\t\t\tUtilities.getLL3PIntFromLL3PString(NetworkConstants.MY_LL3P_ADDRESS));*/\n\t\t\n\t\tparentActivity.runOnUiThread(new Runnable()\n\t\t{ \n\t\t\tpublic void run()\n\t\t\t{\n\t\t\t\tuiManager.resetRoutingListAdapter();\n\t\t\t\tuiManager.resetForwardingListAdapter();\n\t\t\t} // end public method run\n\t\t}); // end runOnUiThread\n\t}",
"@Test\n public void createRule() {\n // BEGIN: com.azure.messaging.servicebus.servicebusrulemanagerclient.createRule\n RuleFilter trueRuleFilter = new TrueRuleFilter();\n CreateRuleOptions options = new CreateRuleOptions(trueRuleFilter);\n ruleManager.createRule(\"new-rule\", options);\n // END: com.azure.messaging.servicebus.servicebusrulemanagerclient.createRule\n\n ruleManager.close();\n }",
"private void createRoutes(Scenario scenario, LeastCostPathCalculator router, int numOrigins) {\n\t\tfor (int i = 0; i < numOrigins; i++) {\n\t\t\tfor (int j = 0; j < numOrigins; j++) {\n\t\t\t\tRoute route;\n\t\t\t\tif (i == j) {\n\t\t\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\t\t\tId<Link> toLinkId = fromLinkId;\n\t\t\t\t\t\n\t\t\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\t\troute.setDistance(0.0);\n\t\t\t\t\troute.setTravelTime(0.0);\n\t\t\t\t} else {\n\t\t\t\t\tId<Link> fromLinkId = Id.create(startLinkIds[i], Link.class);\n\t\t\t\t\tId<Link> toLinkId = Id.create(endLinkIds[j], Link.class);\n\t\t\t\t\tLink fromLink = scenario.getNetwork().getLinks().get(fromLinkId);\n\t\t\t\t\tLink toLink = scenario.getNetwork().getLinks().get(toLinkId);\n\t\t\t\t\t\t\t\n\t\t\t\t\tPath path = router.calcLeastCostPath(fromLink.getToNode(), toLink.getFromNode(), 0.0, null, null);\n\t\t\t\t\troute = new LinkNetworkRouteFactory().createRoute(fromLinkId, toLinkId);\n\t\t\t\t\t\n\t\t\t\t\tdouble distance = RouteUtils.calcDistance((NetworkRoute) route, scenario.getNetwork());\n\t\t\t\t\troute.setDistance(distance);\n\t\t\t\t\troute.setTravelTime(path.travelTime);\n\n\t\t\t\t\t((NetworkRoute) route).setLinkIds(fromLink.getId(), NetworkUtils.getLinkIds(path.links), toLink.getId());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\troutes.put(startLinkIds[i] + \"_\" + endLinkIds[j], route);\n\t\t\t\t\n\t\t\t\tprintRoute(scenario, route, startLinkIds[i], endLinkIds[j]);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// fix bad routes\n\t\tString routeString;\n\t\tString[] links;\n\t\tList<Id<Link>> linkIds;\n\t\tNetworkRoute networkRoute;\n\t\t\t\n\t\trouteString = \"17560000130806FT_17560000126838FT\";\n\t\t//17560000130806FT - start link \n\t\t//17560000126838FT - end link \n\t\tlinks = new String[]{\"17560001813912FT\", \"17560001813913FT\", \"17560002100968FT\", \"17560000122288FT\", \"17560000122328FT\",\n\t\t\t\t\"17560001368986TF\", \"17560001786482TF\", \"17560001862499FT\", \"17560000125722FT\", \"17560001812124FT\", \"17560002102719FT\",\n\t\t\t\t\"17560001838515FT\", \"17560001984994FT\", \"17560001984995FT\", \"17560001812144FT\", \"17560001834645FT\", \"17560000126288FT\",\n\t\t\t\t\"17560002102725FT\", \"17560002102726FT\", \"17560001368914FT\", \"17560001368915FT\", \"17560001846187FT\"};\n\t\tlinkIds = new ArrayList<Id<Link>>();\n\t\tfor (String link : links) linkIds.add(Id.create(link, Link.class));\n\t\tnetworkRoute = (NetworkRoute) routes.get(routeString);\n\t\tnetworkRoute.setLinkIds(networkRoute.getStartLinkId(), linkIds, networkRoute.getEndLinkId());\n\t}",
"public void queryForRoutingManager() {\n PreparedStatement stmt = null;\n\n try {\n //This statement will fetch all tables available in database.\n ResultSet rs = conn.getMetaData().getTables(null, null, null, null);\n while (rs.next()) {\n\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document doc = builder.newDocument();\n\n String ld = rs.getString(\"TABLE_NAME\");\n\n if (!(ld.equals(\"PurgeTable\")||ld.equals(\"UserToCertMap\"))) {\n\n String intValue = ld.replaceAll(\"[^0-9]\", \"\");\n int v = Integer.parseInt(intValue);\n Element root = doc.createElement(\"CheckingRootNodeForIndex\");\n doc.appendChild(root);\n\n root.setAttribute(\"LayerID\", intValue);\n int i = 1;\n stmt = conn.prepareStatement(\"select Key from \" + ld + \" where copyNum = ? \");\n stmt.setInt(1, 0);\n ResultSet rs2 = stmt.executeQuery();\n while (rs2.next()) {\n Element row1 = doc.createElement(\"DATA\");\n root.appendChild(row1);\n row1.setAttribute(\"INDEX\", \"[\" + i + \"]\");\n\n Element nodeID = doc.createElement(\"KEY\");\n nodeID.appendChild(doc.createTextNode(rs2.getString(\"key\")));\n row1.appendChild(nodeID);\n\n Element nodePub = doc.createElement(\"NEXTHOP\");\n nodePub.appendChild(doc.createTextNode(\"\"));\n row1.appendChild(nodePub);\n i += 1;\n }\n rs2.close();\n\n TransformerFactory transformerFactory = TransformerFactory.newInstance();\n Transformer transformer = transformerFactory.newTransformer();\n DOMSource domSource = new DOMSource(doc);\n\n StreamResult streamResult = new StreamResult(new File(ld + \"_RootNodeCheck\" + \".xml\"));\n transformer.transform(domSource, streamResult);\n File f = new File(ld + \"_RootNodeCheck\" + \".xml\");\n IMbuffer.addToIMOutputBuffer(f);\n\n\n } else {\n\n // System.out.println(\"No valid table exists\");\n }\n\n }\n rs.close();\n } catch (TransformerException | SQLException e) {\n e.printStackTrace();\n } catch (ParserConfigurationException e) {\n e.printStackTrace();\n }\n }",
"public void rescanBGPTable() {\n if (this.isWardenAS() && this.poisonMode != AS.ReversePoisonMode.NONE) {\n if (!this.locRib.containsKey(this.asn * -1)) {\n this.advPath(new BGPPath(this.getASN() * -1));\n } else {\n this.dirtyDest.add(this.getASN() * -1);\n }\n }\n\n for (int tDest : this.locRib.keys()) {\n this.recalcBestPath(tDest);\n }\n\n /*\n * If we're a warden and we're in a mode where we're playing around with\n * MPLS games clear out the MPLS table for this round\n */\n if (this.isWardenAS() && this.avoidMode == AS.AvoidMode.LEGACY) {\n this.mplsRoutes.clear();\n }\n }",
"@Override\n protected void initAction() {\n for (GPXWaypoint waypoint : myWaypoints) {\n final GPXLineItem parent = waypoint.getParent();\n \n if (!lineItemCluster.containsKey(parent)) {\n final List<GPXWaypoint> parentWaypoints = myWaypoints.stream().filter((t) -> {\n return parent.equals(t.getParent());\n }).collect(Collectors.toList());\n \n final List<Pair<Integer, GPXWaypoint>> parentPairs = new ArrayList<>();\n for (GPXWaypoint pairWaypoint : parentWaypoints) {\n final int waypointIndex = parent.getGPXWaypoints().indexOf(pairWaypoint);\n\n // only delete if really present\n if (waypointIndex != -1) {\n // store each waypoint with its position in the list of parent's waypoints\n parentPairs.add(Pair.of(parent.getGPXWaypoints().indexOf(pairWaypoint), pairWaypoint));\n }\n }\n // sort by index to make sure undo works\n Collections.sort(parentPairs, new SortByIndex());\n \n lineItemCluster.put(parent, parentPairs);\n }\n }\n }",
"@Override\n\t@Transactional\n\tpublic void deleteAllRoutes() {\n\t\trouteDAO.deleteAllRoutes();\t\t\n\t}",
"protected abstract Builder processSpecificRoutingRule(Builder rb);",
"@Override\n\tpublic void onReCalculateRouteForTrafficJam() {\n\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tprivate void setRules() {\n\t\tthis.result = Result.START;\n\t\t// Create all initial rule executors, and shuffle them if needed.\n\t\tthis.rules = new LinkedList<>();\n\t\tModule module = getModule();\n\t\tfor (Rule rule : module.getRules()) {\n\t\t\tRuleStackExecutor executor = (RuleStackExecutor) getExecutor(rule, getSubstitution());\n\t\t\texecutor.setContext(module);\n\t\t\tthis.rules.add(executor);\n\t\t}\n\t\tif (getRuleOrder() == RuleEvaluationOrder.RANDOM || getRuleOrder() == RuleEvaluationOrder.RANDOMALL) {\n\t\t\tCollections.shuffle((List<RuleStackExecutor>) this.rules);\n\t\t}\n\t}",
"void deleteTAlgmntBussRule(Integer ruleId);",
"public void xsetRules(com.walgreens.rxit.ch.cda.StrucDocTable.Rules rules)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.StrucDocTable.Rules target = null;\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Rules)get_store().find_attribute_user(RULES$26);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.StrucDocTable.Rules)get_store().add_attribute_user(RULES$26);\n }\n target.set(rules);\n }\n }",
"public interface RulesManager extends RulesService {\n\n boolean applyPortForwardingRules(long ipAddressId, boolean continueOnError, Account caller);\n\n boolean applyStaticNatRulesForIp(long sourceIpId, boolean continueOnError, Account caller, boolean forRevoke);\n\n boolean applyPortForwardingRulesForNetwork(long networkId, boolean continueOnError, Account caller);\n\n boolean applyStaticNatRulesForNetwork(long networkId, boolean continueOnError, Account caller);\n\n void checkIpAndUserVm(IpAddress ipAddress, UserVm userVm, Account caller);\n\n void checkRuleAndUserVm(FirewallRule rule, UserVm userVm, Account caller);\n\n boolean revokeAllPFAndStaticNatRulesForIp(long ipId, long userId, Account caller) throws ResourceUnavailableException;\n\n boolean revokeAllPFStaticNatRulesForNetwork(long networkId, long userId, Account caller) throws ResourceUnavailableException;\n\n List<? extends FirewallRule> listFirewallRulesByIp(long ipAddressId);\n\n /**\n * Returns a list of port forwarding rules that are ready for application\n * to the network elements for this ip.\n * \n * @param ip\n * @return List of PortForwardingRule\n */\n List<? extends PortForwardingRule> listPortForwardingRulesForApplication(long ipId);\n\n List<? extends PortForwardingRule> gatherPortForwardingRulesForApplication(List<? extends IpAddress> addrs);\n\n boolean revokePortForwardingRulesForVm(long vmId);\n\n boolean revokeStaticNatRulesForVm(long vmId);\n\n FirewallRule[] reservePorts(IpAddress ip, String protocol, FirewallRule.Purpose purpose, boolean openFirewall, Account caller, int... ports) throws NetworkRuleConflictException;\n\n boolean releasePorts(long ipId, String protocol, FirewallRule.Purpose purpose, int... ports);\n\n List<PortForwardingRuleVO> listByNetworkId(long networkId);\n\n boolean applyStaticNatForIp(long sourceIpId, boolean continueOnError, Account caller, boolean forRevoke);\n\n boolean applyStaticNatsForNetwork(long networkId, boolean continueOnError, Account caller);\n\n void getSystemIpAndEnableStaticNatForVm(UserVm vm, boolean getNewIp) throws InsufficientAddressCapacityException;\n\n boolean disableStaticNat(long ipAddressId, Account caller, long callerUserId, boolean releaseIpIfElastic) throws ResourceUnavailableException;\n\n}",
"private void generateRules(TreeNode tn)\n{\n if (!tn.isLeaf()) {\n generateRules(tn.getPassTree());\n generateRules(tn.getFailTree());\n return;\n }\n RuleInstance ri = tn.getRules().get(0);\n if (ri.getBaseRule() != null) return;\t// rule already in set\n\n Condition c = tn.getCondition();\n List<UpodCondition> cset = new ArrayList<UpodCondition>();\n if (c != null) {\n UpodCondition cond = c.getConditionTest(for_program);\n if (cond != null) cset.add(cond);\n }\n for (TreeNode pn = tn.getParent(); pn != null; pn = pn.getParent()) {\n Condition pc = pn.getCondition();\n if (pc == null) continue;\n UpodCondition pcond = pc.getConditionTest(for_program);\n if (pcond != null) cset.add(pcond);\n }\n\n UpodCondition rcond = null;\n if (cset.isEmpty()) return;\n if (cset.size() == 1) rcond = cset.get(0);\n else {\n UpodCondition [] conds = new UpodCondition[cset.size()];\n conds = cset.toArray(conds);\n rcond = new BasisConditionLogical.And(conds);\n }\n List<UpodAction> racts = ri.getActions();\n if (rcond == null || racts == null) return;\n\n BasisRule rule = new BasisRule(rcond,racts,null,100);\n for_program.addRule(rule);\n}",
"public void removeAllRuleRef();",
"public static void exportAllRoutes(NetworkData data) {\n var segments = new ArrayList<KMLSegment>();\n var stops = new HashSet<XY>();\n\n for (var shape : data.shapes.values()) {\n stops.add(shape.get(0));\n stops.add(shape.get(shape.size()-1));\n segments.add(new KMLSegment(\"\", \"Bus\", shape));\n }\n\n var points = stops.stream().map(s -> new KMLPoint(\"\", \"Change\", s)).collect(Collectors.toList());\n\n try {\n Files.createDirectories(Paths.get(\"kml\"));\n File f = Paths.get(\"kml\", \"all-routes.kml\").toFile();\n KMLWriter.writeJourney(new PrintStream(f), segments, points);\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n }",
"public void clear()\n {\n for (final Rule rule : this.rules)\n {\n rule.clear();\n }\n\n this.rules.clear();\n }",
"public void unsetRules()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(RULES$26);\n }\n }",
"@Override\r\n\tpublic void onReCalculateRouteForTrafficJam() {\n\r\n\t}",
"private void migrateRule(Context context, StringList objectIdList)\r\n throws Exception\r\n {\r\n \t\t int migrationStatus = getAdminMigrationStatus(context);\r\n \t \r\n\tif ((objectIdList == null || objectIdList.size() <= 0) && (migrationStatus == 9 || migrationStatus == 10 )) {\t\t\r\n\t\tsetAdminMigrationStatus(context,\"RuleComplete\");\r\n\t\tmqlLogRequiredInformationWriter(\"All Rule Migration Completely done\\n\");\r\n\t\t\r\n \t\t\t }\r\n\telse if ((objectIdList == null || objectIdList.size() <= 0)) {\t\t\r\n \t\t\t setAdminMigrationStatus(context,\"RuleObjectsNotFound\");\r\n\t\tmqlLogRequiredInformationWriter(\"Rules not found in the file\\n\");\r\n\t\t\r\n \t\t }\r\n\telse{\r\n\r\n try{\r\n \t\t //STEP1 - turn triggers off\r\n \t\t String strMqlCommand = \"trigger off\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n\r\n \t setAdminMigrationStatus(context,\"RuleInProcess\");\r\n\t\tmqlLogRequiredInformationWriter(\"Migration Status set to RuleInProcess\" + \"\\n\");\r\n\r\n \t //Get the info related to all Rule Objects in the list\r\n \t String[] oidsArray = new String[objectIdList.size()];\r\n oidsArray = (String[])objectIdList.toArray(oidsArray);\r\n\r\n StringList objectSelects = new StringList();\r\n objectSelects.addElement(SELECT_TYPE);\r\n objectSelects.addElement(SELECT_NAME);\r\n objectSelects.addElement(SELECT_REVISION);\r\n objectSelects.addElement(SELECT_ID);\r\n objectSelects.addElement(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n objectSelects.addElement(ConfigurationConstants.SELECT_RULE_COMPLEXITY);\r\n objectSelects.addElement(\"interface[\"+INTERFACE_FTRIntermediateObjectMigration +\"]\");\r\n\r\n //Related to LE\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION+ \"].id\");\r\n //Related to RE\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].id\");\r\n objectSelects.addElement(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].to.id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_LEFT_EXPRESSION+ \"].id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].id\");\r\n DomainConstants.MULTI_VALUE_LIST.add(\"from[\"+ ConfigurationConstants.RELATIONSHIP_RIGHT_EXPRESSION+ \"].to.id\");\r\n\t\t //DomainConstants.MULTI_VALUE_LIST.add(ConfigurationConstants.SELECT_DESIGNVARIANTS);\r\n\r\n\r\n MapList mapList = DomainObject.getInfo(context, oidsArray, objectSelects);\r\n Iterator itr = mapList.iterator();\r\n Map ruleInfoMap = new HashMap();\r\n String strRuleId = \"\";\r\n //String strType = \"\";\r\n //String strName = \"\";\r\n //String strRevision = \"\";\r\n //String revId = \"\";\r\n String strInterfaceAdded =\"\";\r\n boolean isAllRulesStamped = true;\r\n while (itr.hasNext())\r\n {\r\n \t //convert Rule objects\r\n \t ruleInfoMap = (Map) itr.next();\r\n \t //strType = (String)ruleInfoMap.get(SELECT_TYPE);\r\n //strName = (String)ruleInfoMap.get(SELECT_NAME);\r\n //strRevision = (String)ruleInfoMap.get(SELECT_REVISION);\r\n strRuleId = (String)ruleInfoMap.get(SELECT_ID);\r\n\r\n mqlLogRequiredInformationWriter(\"Rule Id in Process :: \"+ strRuleId +\"\\n\\n\");\r\n\r\n strInterfaceAdded = (String)ruleInfoMap.get(\"interface[\"+INTERFACE_FTRIntermediateObjectMigration +\"]\");\r\n\r\n try{\r\n boolean bRuleMigrated = updateRuleCache(context,ruleInfoMap);\r\n \t \t //Need to stamp the converted Rules with the migration stamp interface to indicate that it has been converted.\r\n \t \t if(bRuleMigrated){\r\n if(strInterfaceAdded!=null && strInterfaceAdded.equalsIgnoreCase(\"FALSE\")){\r\n \t \t\t\tstampRuleObject(context,strRuleId);\r\n \t \t\t }\r\n \t \t }else{\r\n \t \t\t //To indicate that Rule is not stamped.\r\n \t \t\t isAllRulesStamped = false;\r\n \t \t }\r\n\r\n \t \t loadMigratedOids(strRuleId);\r\n \t \t mqlLogRequiredInformationWriter(\"Migration for Rule id :: \"+ strRuleId + \" is done.\"+\"\\n\\n\\n\\n\");\r\n\r\n \t }catch(Exception e)\r\n \t {\r\n \t\t e.printStackTrace();\r\n \t\t String strCommand = strRuleId + \" : \" + e.getMessage()+\"\\n\";\r\n \t\t\t\t writeUnconvertedOID(strCommand,strRuleId);\r\n \t\t continue;\r\n \t }\r\n }\r\n\r\n if(isAllRulesStamped)\r\n {\r\n // E2W Commented out below to not stop rule migration mid way \t \r\n \t //setAdminMigrationStatus(context,\"RuleComplete\");\r\n mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!! Rule Migration for Ids in this file are Complete. \\n\");\r\n mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\\n\");\r\n \t mqlLogRequiredInformationWriter(\"!!!!!!!!!!!!!! Rule Migration Complete. \\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n }\r\n else{\r\n\r\n \t mqlLogRequiredInformationWriter(\"Rule Migration Successful but not complete as still migration of some Rule objects is not done.\\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n }\r\n\r\n //turn triggers off\r\n \t\t strMqlCommand = \"trigger on\";\r\n \t\t MqlUtil.mqlCommand(context,strMqlCommand,true);\r\n }catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n \t mqlLogRequiredInformationWriter(\"Rule Migration Failed. \\n\");\r\n \t mqlLogRequiredInformationWriter(\"\\n\");\r\n \t throw e;\r\n }\r\n }\r\n return;\r\n }",
"private static void resetConfigTemplateVlanNetworkMaping(List<ConfigTemplate> cft){\n\t\tfor(ConfigTemplate cf: cft) {\r\n\t\t\tif (!cf.getConfigType().isTypeSupport(ConfigTemplateType.ROUTER)) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tSet<ConfigTemplateVlanNetwork> cvnSet = new HashSet<ConfigTemplateVlanNetwork>();\r\n\t\t\tif (AhRestoreNewMapTools.getMapWlanNetworkObjectVlan(cf.getId())!=null) {\r\n\t\t\t\tcvnSet.add(AhRestoreNewMapTools.getMapWlanNetworkObjectVlan(cf.getId()));\r\n\t\t\t}\r\n\t\t\tSet<Long> upIdSet = new HashSet<Long>();\r\n\t\t\tfor(ConfigTemplateSsid cs: cf.getSsidInterfaces().values()){\r\n\t\t\t\tif (cs.getSsidProfile()!=null) {\r\n\t\t\t\t\tSsidProfile ss = QueryUtil.findBoById(SsidProfile.class, cs.getSsidProfile().getId(), new ImplQueryBoVlanNetwork());\r\n\t\t\t\t\tif (ss.getUserProfileDefault()!=null) {\r\n\t\t\t\t\t\tupIdSet.add(ss.getUserProfileDefault().getId());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (ss.getUserProfileSelfReg()!=null) {\r\n\t\t\t\t\t\tupIdSet.add(ss.getUserProfileSelfReg().getId());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (ss.getRadiusUserProfile()!=null) {\r\n\t\t\t\t\t\tfor(UserProfile up: ss.getRadiusUserProfile()){\r\n\t\t\t\t\t\t\tupIdSet.add(up.getId());\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\tfor (PortGroupProfile portGroup : cf.getPortProfiles()) {\r\n\t\t\t List<PortBasicProfile> basicProfiles = portGroup.getBasicProfiles();\r\n\t\t\t if(null != basicProfiles) {\r\n\t\t\t for (PortBasicProfile portBasicProfile : basicProfiles) {\r\n\t\t\t if(null != portBasicProfile.getAccessProfile()) {\r\n\t\t\t PortAccessProfile access = QueryUtil.findBoById(PortAccessProfile.class, portBasicProfile.getAccessProfile().getId(), new ImplQueryBoVlanNetwork());\r\n if(access.getPortType() == PortAccessProfile.PORT_TYPE_8021Q) {\r\n // handle the trunk mode - Network <-> VLAN\r\n if(null != access.getNativeVlan()) {\r\n Long lanId = AhRestoreNewMapTools.getMapLanProfileReverse(access.getId());\r\n if(null != lanId) {\r\n Map<Long, Long> vlanObjNetwork = AhRestoreNewMapTools.getMapLANVLANObjectNetwork(lanId);\r\n if(null != vlanObjNetwork) {\r\n for (Long vlanId : vlanObjNetwork.keySet()) {\r\n Long networkId = vlanObjNetwork.get(vlanId);\r\n\r\n if(null != networkId && null != vlanId) {\r\n VpnNetwork networkObj = AhRestoreNewTools.CreateBoWithId(VpnNetwork.class,networkId);\r\n Vlan vlanObj = AhRestoreNewTools.CreateBoWithId(Vlan.class,vlanId);\r\n\r\n if(networkObj!=null && vlanObj!=null) {\r\n ConfigTemplateVlanNetwork cvn = new ConfigTemplateVlanNetwork();\r\n cvn.setNetworkObj(networkObj);\r\n cvn.setVlan(vlanObj);\r\n cvnSet.add(cvn);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n } else {\r\n // handle the access mode\r\n if(null != access.getDefUserProfile()) {\r\n upIdSet.add(access.getDefUserProfile().getId());\r\n }\r\n if(null != access.getSelfRegUserProfile()) {\r\n upIdSet.add(access.getSelfRegUserProfile().getId());\r\n }\r\n if (null != access.getAuthOkUserProfile()) {\r\n for (UserProfile up : access.getAuthOkUserProfile()) {\r\n upIdSet.add(up.getId());\r\n }\r\n }\r\n }\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t }\r\n }\r\n\r\n\t\t\tfor(Long upId : upIdSet){\r\n\t\t\t\tLong networkId = AhRestoreNewMapTools.getMapUserProfileNetworkObjectWithNewID(upId);\r\n\t\t\t\tLong vlanId = null;\r\n\t\t\t\tif (networkId!=null) {\r\n\t\t\t\t\tvlanId = AhRestoreNewMapTools.getMapNetworkObjectVlanWithNewID(networkId);\r\n\t\t\t\t}\r\n\t\t\t\tVpnNetwork networkObj = AhRestoreNewTools.CreateBoWithId(VpnNetwork.class,networkId);\r\n\t\t\t\tVlan vlanObj = null;\r\n\t\t\t\tif(vlanId!=null) {\r\n\t\t\t\t\tvlanObj = AhRestoreNewTools.CreateBoWithId(Vlan.class,vlanId);\r\n\t\t\t\t}\r\n\t\t\t\tif(networkObj!=null && vlanObj!=null) {\r\n\t\t\t\t\tConfigTemplateVlanNetwork cvn = new ConfigTemplateVlanNetwork();\r\n\t\t\t\t\tcvn.setNetworkObj(networkObj);\r\n\t\t\t\t\tcvn.setVlan(vlanObj);\r\n\t\t\t\t\tcvnSet.add(cvn);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!cvnSet.isEmpty()) {\r\n\t\t\t\tif (cf.getVlanNetwork()==null) {\r\n\t\t\t\t\tList<ConfigTemplateVlanNetwork> myList = new ArrayList<ConfigTemplateVlanNetwork>();\r\n\t\t\t\t\tcf.setVlanNetwork(myList);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcf.getVlanNetwork().clear();\r\n\t\t\t\t}\r\n\t\t\t\tcf.getVlanNetwork().addAll(cvnSet);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void delIncomingRelations();",
"public void flush() {\n\t\tupdateCounter++;\n//\t\trules.update();\n\t}",
"public void freeNodes(){\n\t\t//android.util.Log.d(TAG,\"freeNodes()\");\n\t\tfinal int size = this.nodes.size();\n\t\tfor(int index=0; index < size; index++){\n\t\t\tthis.nodes.delete(this.nodes.keyAt(index));\n\t\t}\n\t}",
"public void refreshPushRules() {\n if (isAlive() && (null != mBingRulesManager)) {\n mBingRulesManager.loadRules(new SimpleApiCallback<Void>() {\n @Override\n public void onSuccess(Void info) {\n onBingRulesUpdate();\n }\n });\n }\n }",
"public void calculateRoute() {\n SKRouteSettings route = new SKRouteSettings();\n route.setStartCoordinate(start);\n route.setDestinationCoordinate(end);\n route.setNoOfRoutes(1);\n switch (routingType) {\n case SHORTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_SHORTEST);\n break;\n case FASTEST:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_FASTEST);\n break;\n case QUIET:\n route.setRouteMode(SKRouteSettings.SKRouteMode.BICYCLE_QUIETEST);\n break;\n }\n route.setRouteExposed(true);\n SKRouteManager.getInstance().calculateRoute(route);\n }",
"private void clearEdgeLinks() {\n edges.clear();\n //keep whole tree to maintain its position when it is expanded (within scroll pane bounds)\n Node rootNode = nodes.get(0);\n VBox rootVBox = (VBox) rootNode.getContainerPane().getParent();\n rootVBox.layout();\n Bounds rootNodeChildrenVBoxBounds = rootNode.getChildrenVBox().getBoundsInLocal();\n rootVBox.setLayoutY(Math.abs(rootVBox.getLayoutY() - ((rootNodeChildrenVBoxBounds.getHeight()) - rootNode.getHeight()) / 2 + rootNode.getLayoutY()));\n rootVBox.layout();\n\n for (int i = 0; i < nodes.size(); i++) {\n Pane containerPane = nodes.get(i).getContainerPane();\n //reposition node to the center of its children\n ObservableList<javafx.scene.Node> genericNodes = nodes.get(i).getChildrenVBox().getChildren();\n if (!genericNodes.isEmpty()) {\n nodes.get(i).setLayoutY(((nodes.get(i).getChildrenVBox().getBoundsInLocal().getHeight()) - rootNode.getHeight()) / 2);\n }\n\n for (int j = 0; j < containerPane.getChildren().size(); j++) {\n if (containerPane.getChildren().get(j) instanceof Edge) {\n containerPane.getChildren().remove(j);\n j--;\n }\n }\n }\n redrawEdges(rootNode);\n }",
"private void refreshNodeList() {\n if (UnderNet.router.status.equals(InterfaceStatus.STARTED)) {\n //Using connected and cached nodes if the router has started.\n ArrayList<Node> nodesToList = UnderNet.router.getConnectedNodes();\n for (Node cachedNode :\n EntryNodeCache.cachedNodes) {\n boolean canAdd = true;\n for (Node connectedNode : UnderNet.router.getConnectedNodes()) {\n if (cachedNode.getAddress().equals(connectedNode.getAddress())) {\n canAdd = false;\n }\n }\n if (canAdd) {\n nodesToList.add(cachedNode);\n }\n }\n nodeList.setListData(nodesToList.toArray());\n } else {\n //Using cached nodes if the router isn't online.\n nodeList.setListData(EntryNodeCache.cachedNodes.toArray());\n }\n }",
"@Override\r\n\tpublic Identifier addRouting(RoutingRule rule) {\n\t\t\r\n\t\tIdentifier i = Identifier.routing(TimeBasedUUID.getUUIDAsString());\r\n\t\troutingTable.put(i, rule);\r\n\t\treturn i;\r\n\t}",
"public void clear()\t{nodes.clear(); allLinks.clear();}",
"private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }",
"void deleteRule(long ruleID, boolean dropPendingCmdlets) throws IOException;",
"public Node() {\n\t\tsplithorizon = false;\n\t\troutingTable = new ArrayList<ArrayList<Integer>>();\n\t\troutingTable.add(new ArrayList<Integer>());\n\t\troutingTable.add(new ArrayList<Integer>());\n\t\troutingTable.add(new ArrayList<Integer>());\n\t}",
"org.landxml.schema.landXML11.LanesDocument.Lanes addNewLanes();",
"private void Clean(){\n \t NodeIterable nodeit = graphModel.getGraph().getNodes();\n \t\n \t for (Node node : nodeit) {\n\t\t\t\n \t\t \n \t\t \n\t\t}\n \t\n }",
"@Test\n public void deleteRule() throws Exception {\n RuleEntity rule = new RuleEntity();\n rule.setPackageName(\"junitPackage\");\n rule.setStatus(Status.INACTIVE);\n rule.setRuleName(\"junitRuleName\");\n rule.setRule(Base64.getEncoder().encodeToString(\"jUnit Rule Contents\".getBytes()));\n\n ResponseEntity<RuleEntity> createResponse = template.postForEntity(\n base.toString() + \"/\",\n rule,\n RuleEntity.class);\n RuleEntity createdRule = createResponse.getBody();\n /*\n * delete it\n */\n template.delete(base.toString() + \"/{1}\", createdRule.getId());\n /*\n * find it\n */\n ResponseEntity<RuleEntity> queryresponse = template.getForEntity(\n base.toString() + \"/{1}\",\n RuleEntity.class,\n createdRule.getId());\n\n Assert.assertEquals(\"checking for 404 notfound\", NOT_FOUND, queryresponse.getStatusCode());\n }",
"private void testAclConstraints006() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints006\");\n\t\t\tsession = tbc.getDmtAdmin().getSession(\".\",\n\t\t\t\t\tDmtSession.LOCK_TYPE_EXCLUSIVE);\n\n\t\t\tString expectedRootAcl = \"Add=*\";\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n\t\t\t\t\tnew org.osgi.service.dmt.Acl(expectedRootAcl));\n\n\t\t\tsession.renameNode(TestExecPluginActivator.INTERIOR_NODE,TestExecPluginActivator.RENAMED_NODE_NAME);\n\t\t\tTestExecPlugin.setAllUriIsExistent(true);\n\t\t\tTestCase.assertNull(\"Asserts that the method rename deletes the ACL of the source.\",session.getNodeAcl(TestExecPluginActivator.INTERIOR_NODE));\n\t\t\t\n\t\t\tTestCase.assertEquals(\"Asserts that the method rename moves the ACL from the source to the destiny.\",\n\t\t\t\t\texpectedRootAcl,session.getNodeAcl(TestExecPluginActivator.RENAMED_NODE).toString());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.RENAMED_NODE);\n\t\t\tTestExecPlugin.setAllUriIsExistent(false);\n\t\t}\n\t}",
"private void resize() {\n int newSize = (xs.length * 3) / 2;\n int[] newXs = new int[newSize];\n int[] newYs = new int[newSize];\n int[] newIn = new int[newSize];\n int[] newOut = new int[newSize];\n int[][] newRoads = new int[newSize][newSize];\n int[][] newDist = new int[newSize][newSize];\n boolean[] newVal = new boolean[newSize];\n System.arraycopy(xs, 0, newXs, 0, nodeCount);\n System.arraycopy(ys, 0, newYs, 0, nodeCount);\n System.arraycopy(inDegree, 0, newIn, 0, nodeCount);\n System.arraycopy(outDegree, 0, newOut, 0, nodeCount);\n System.arraycopy(invalid, 0, newVal, 0, nodeCount);\n for (int i = 0; i < nodeCount; i++) {\n System.arraycopy(roads[i], 0, newRoads[i], 0, nodeCount);\n System.arraycopy(distances[i], 0, newDist[i], 0, nodeCount);\n }\n xs = newXs;\n ys = newYs;\n inDegree = newIn;\n outDegree = newOut;\n roads = newRoads;\n distances = newDist;\n invalid = newVal;\n }",
"private boolean updateRoute(Route rte, Route nuRte) {\n\t\tboolean result = false;\n\t\tLinkInfo nuLink = lnkVec.get(nuRte.outLink);\n\t\tLinkInfo oldLink = lnkVec.get(rte.outLink);\n\t\tif (nuLink.helloState == 0){\n\t\t\tresult = false;\n\t\t}\n\t\t// if the route is invalid, update and return true\n\t\telse if (rte.valid == false){\n\t\t\treplaceExceptPrefix(rte,nuRte);\n\t\t\tresult = true;\n\t\t}\n\t\t//if both routes have same path and link, then timestamp \n\t\t//and cost of rte are updated\n\t\telse if (rte.outLink == nuRte.outLink && \n\t\t\t\trte.path == nuRte.path){\n\t\t\trte.timestamp = nuRte.timestamp;\n\t\t\trte.cost = nuRte.cost;\n\t\t\tresult = true;\n\t\t}\n\t\t//if nuRte has a cost that is less than .9 times the\n\t\t//cost of rte, then all fields in rte except the prefix fields\n\t\t//are replaced with the corresponding fields in nuRte\n\t\telse if (nuRte.cost < (.9 * rte.cost)){\n\t\t\treplaceExceptPrefix (rte, nuRte);\n\t\t\tresult = true;\n\t\t}\n\t\t//else, if nuRte is at least 20 seconds newer than rte\n\t\t//(as indicated by their timestamps), then all fields of\n\t\t//rte except the prefix fields are replaced\n\t\telse if (nuRte.timestamp - rte.timestamp >= 20){\n\t\t\treplaceExceptPrefix (rte, nuRte);\n\t\t\tresult = true;\n\t\t}\n\t\t//else, if the link field for rte refers to a link that is\n\t\t//currently disabled, replace all fields in rte but the\n\t\t//prefix fields\n\t\telse if (oldLink.helloState == 0){\n\t\t\treplaceExceptPrefix(rte, nuRte);\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\t\n\t}",
"public void finalize_when_all_data_exist() throws VerificationException\n {\n\n Map<String, ControlNodeInterface> map_node_names_to_node_data = new HashMap<>();\n\n for ( ControlNodeInterface control_node : this.control_nodes ){\n node_name_add( control_node );\n map_node_names_to_node_data.put( control_node.get_node_name(), control_node );\n }\n\n\n if ( is_node_exist( this.root_name ) ) {\n\n this.root_id = node_name_get_id( this.root_name );\n\n for ( ControlNodeInterface control_node : this.control_nodes ) {\n boolean is_exist = true;\n String node_name = \"\";\n\n if (ControlNodeInterface.ControlNodeType.node_probability == control_node.get_node_kind()) {\n ControlNodeProbability node_probability = (ControlNodeProbability) control_node;\n\n for ( ControlProbabilityForSuccessor probability_for_successor_node : node_probability.probability_for_successor_nodes) {\n String successor_node_name = probability_for_successor_node.node_name;\n\n if ( false == successor_node_name.isEmpty() ) {\n if (false == is_node_exist(successor_node_name)) {\n is_exist = false;\n node_name = successor_node_name;\n break;\n } else {\n ControlNodeInterface successor_node = map_node_names_to_node_data.get(successor_node_name);\n successor_node.add_predecessor(control_node.get_node_name());\n add_transition(control_node.get_node_name(), successor_node_name);\n }\n }\n }\n } else if (ControlNodeInterface.ControlNodeType.node_concurrent == control_node.get_node_kind()) {\n ControlNodeConcurrent node_concurrent = (ControlNodeConcurrent) control_node;\n\n for (String run_node : node_concurrent.run_nodes) {\n\n String successor_node_name = run_node;\n\n if ( false == successor_node_name.isEmpty() ) {\n if (false == is_node_exist(successor_node_name)) {\n is_exist = false;\n node_name = successor_node_name;\n break;\n } else {\n ControlNodeInterface successor_node = map_node_names_to_node_data.get(successor_node_name);\n successor_node.add_predecessor(control_node.get_node_name());\n add_transition(control_node.get_node_name(), successor_node_name);\n }\n }\n }\n } else if (ControlNodeInterface.ControlNodeType.node_sequential == control_node.get_node_kind()) {\n ControlNodeSequential node_sequential = (ControlNodeSequential) control_node;\n\n String successor_node_name = node_sequential.next_node_name;\n\n if ( false == successor_node_name.isEmpty() ) {\n if (false == is_node_exist(successor_node_name)) {\n is_exist = false;\n node_name = successor_node_name;\n } else {\n ControlNodeInterface successor_node = map_node_names_to_node_data.get(successor_node_name);\n successor_node.add_predecessor(control_node.get_node_name());\n add_transition(control_node.get_node_name(), successor_node_name);\n }\n }\n\n for (ControlUpdateForPLP update_for_plp : node_sequential.update_for_plp) {\n if (false == this.plp_catalog.plp_name_is_exist(update_for_plp.plp_name)) {\n throw new VerificationException(\"Control node \\\"\" + control_node.get_node_name() + \"\\\", using non-existing PLP \\\"\" + update_for_plp.plp_name + \"\\\".\");\n }\n }\n\n } else if (ControlNodeInterface.ControlNodeType.node_condition == control_node.get_node_kind()) {\n ControlNodeCondition node_condition = (ControlNodeCondition) control_node;\n\n for (ControlConditionOfSuccessor condition_of_successor : node_condition.condition_of_successor_nodes) {\n\n String successor_node_name = condition_of_successor.node_name;\n\n if ( false == successor_node_name.isEmpty() ) {\n if (false == is_node_exist(successor_node_name)) {\n is_exist = false;\n node_name = successor_node_name;\n break;\n } else {\n ControlNodeInterface successor_node = map_node_names_to_node_data.get(successor_node_name);\n successor_node.add_predecessor(control_node.get_node_name());\n add_transition(control_node.get_node_name(), successor_node_name);\n }\n }\n }\n }\n\n if ( false == is_exist )\n {\n throw new VerificationException( \"Control node \\\"\" + node_name + \"\\\" does not exist, but referred by existing control node.\" );\n }\n }\n }\n else\n {\n throw new VerificationException( \"Control node \\\"\" + this.root_name + \"\\\" does not exist, but referred by existing control node.\" );\n }\n\n }",
"private void testAclConstraints008() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints008\");\n //We need to set that a parent of the node does not have Replace else the acl of the root \".\" is gotten\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.INTERIOR_NODE, DmtConstants.PRINCIPAL, Acl.DELETE );\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.LEAF_NODE, DmtConstants.PRINCIPAL, Acl.REPLACE );\n\n tbc.setPermissions(new PermissionInfo(DmtPrincipalPermission.class.getName(),DmtConstants.PRINCIPAL,\"*\"));\n session = tbc.getDmtAdmin().getSession(DmtConstants.PRINCIPAL,TestExecPluginActivator.LEAF_NODE,DmtSession.LOCK_TYPE_EXCLUSIVE);\n session.setNodeAcl(TestExecPluginActivator.LEAF_NODE,new org.osgi.service.dmt.Acl(\"Get=*\"));\n\t\t\tDefaultTestBundleControl.failException(\"\",DmtException.class);\n\t\t} catch (DmtException e) {\t\n\t\t\tTestCase.assertEquals(\"Asserts that Replace access on a leaf node does not allow changing the ACL property itself.\",\n\t\t\t DmtException.PERMISSION_DENIED,e.getCode());\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.LEAF_NODE);\n tbc.cleanAcl(TestExecPluginActivator.INTERIOR_NODE);\n\t\t\t\n\t\t}\n\t}",
"private static void ParseMapXMLPopulateRoad()\r\n\t{\r\n\t\ttry {\r\n\t\t\tSAXParserFactory factory = SAXParserFactory.newInstance();\r\n\t\t\tSAXParser saxParser = factory.newSAXParser();\r\n\r\n\t\t\tDefaultHandler handler = new DefaultHandler() {\r\n\r\n\t\t\t\tpublic void startElement(String uri, String localName,\r\n\t\t\t\t\t\tString qName, Attributes attributes)\r\n\t\t\t\t\t\tthrows SAXException {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (qName.equalsIgnoreCase(\"way\")) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tpreNode = null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (qName.equalsIgnoreCase(\"nd\")) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tlong reference = Long.valueOf(attributes.getValue(0));\r\n\t\t\t\t\t\tif (hashtableNodes.containsKey(reference))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (preNode == null)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpreNode = hashtableNodes.get(reference);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tpreNode.AddNeighbor(hashtableNodes.get(reference), NumberOfLanes, Simulator.MaxSpeed);\r\n\t\t\t\t\t\t\t\thashtableNodes.get(reference).AddNeighbor(preNode, NumberOfLanes, Simulator.MaxSpeed);\r\n\t\t\t\t\t\t\t\tpreNode = hashtableNodes.get(reference);\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\r\n\t\t\t\tpublic void endElement(String uri, String localName,\r\n\t\t\t\t\t\tString qName) throws SAXException {\r\n\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t\tsaxParser.parse(MapPath, handler);\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// remove the nodes which only appears in nodes declaration.\r\n\t\tLinkedList<Long> removeList = new LinkedList<Long>();\r\n\t\tfor (long theKey : hashtableNodes.keySet())\r\n\t\t{\r\n\t\t\tif (hashtableNodes.get(theKey).GetNumberOfNeighbors() == 0)\r\n\t\t\t{\r\n\t\t\t\tremoveList.add(theKey);\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (long theKey : removeList)\r\n\t\t{\r\n\t\t\thashtableNodes.remove(theKey);\r\n\t\t}\r\n\t}",
"@Override\r\n\tpublic void removeNodeRule(int step) {\n\t}",
"@Override\r\n\tpublic void generateNodeRule(int step) throws IOException {\n\t\t\r\n\t\tgenerateNetNode.setSeedNodes(step, numberMaxSeed, setLayoutSeed);\r\n\t\t\r\n\t\tgenerateNetNodeVectorField.handleCreateSeedGraph(createSeedGraph, step); \r\n\t\r\n\t\t// list node element\r\n\t\tArrayList <Node> listNodeSeed = new ArrayList<Node> ( graphToolkit.getListElement(seedGraph, element.node, elementTypeToReturn.element));\t//\tSystem.out.println(listNodeSeed);\t\r\n\t\tArrayList<Integer> listIdSeedInt = new ArrayList<Integer>( graphToolkit.getListElement(seedGraph, element.node, elementTypeToReturn.integer)) ;\t\t\t\r\n\t\tArrayList<Integer> listIdNetInt = new ArrayList<Integer>( graphToolkit.getListElement(netGraph, element.node, elementTypeToReturn.integer)) ;\t\r\n\t\t\r\n\t\tint idNodeInt = Math.max(graphToolkit.getMaxIdIntElement(netGraph, element.node) , graphToolkit.getMaxIdIntElement(seedGraph, element.node) ) ;\r\n\t\t\r\n\t\t// map to update\r\n\t\tMap< Integer , double[] > mapIdNewSeedCoord = new HashMap< Integer , double[] > ();\r\n\t\tMap< Integer , String > mapIdNewSeedFather = new HashMap< Integer , String > ();\r\n\t\t\r\n\t\t// print\r\n\t\tSystem.out.println(seedGraph + \" \" + listIdSeedInt.size() /* + \" \" + listIdSeedInt */ );//\t\tSystem.out.println(netGraph + \" \" + listIdNetInt.size() + \" \" + listIdNetInt );\r\n\t\r\n\t\tint idLocal = 0 ;\r\n\r\n\t\tfor ( Node nodeSeed : listNodeSeed ) {\r\n\t\t\r\n\t\t\tString idSeed = nodeSeed.getId() ;\r\n\t\t\t\r\n\t\t//\tbucketSet.putNode(netGraph.getNode(idSeed)) ;\r\n\t\t\t\r\n\t\t\tdouble[] \tnodeCoord = GraphPosLengthUtils.nodePosition(nodeSeed) ,\r\n\t\t\t\t\t\tvector = getVector(vecGraph, nodeCoord, typeInterpolation ) ;\t\t\r\n\t\t\t\r\n\t\t\t// check vector\r\n\t\t\tdouble vectorInten = Math.pow( Math.pow(vector[0], 2) + Math.pow(vector[1], 2) , 0.5 ) ;\r\n\t\t\t\r\n\t\t\tif ( vectorInten > maxInten) {\r\n\t\t\t\tvector[0] = vector[0] / vectorInten * maxInten ; \r\n\t\t\t\tvector[1] = vector[1] / vectorInten * maxInten ;\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// check vector in grid\r\n\t\t\tdouble \txTopVector = generateNetNode.checkCoordInGrid ( gsGraph , nodeCoord[0] + vector[0] ) ,\r\n\t\t\t\t\tyTopVector = generateNetNode.checkCoordInGrid ( gsGraph , nodeCoord[1] + vector[1] ) ;\t\t\t\t\t\t// \tSystem.out.println(idSeed + \" \" + vector[0] + \" \" + vector[1]);\t\t\t\t\t\t\r\n\t\t\t\r\n\t\t\tdouble [] newNodeSeedCoord = new double[2] ;\r\n\t\t\t\t\t\t\r\n\t\t\tnewNodeSeedCoord[0] = xTopVector ;\r\n\t\t\tnewNodeSeedCoord[1] = yTopVector ;\r\n\t\t\t\r\n\t\t\tif ( dieBord ) {\t\t\r\n\t\t\t\tif ( newNodeSeedCoord[0] < 1 || newNodeSeedCoord[1] < 1 || newNodeSeedCoord[0] > sizeGridEdge -1 || newNodeSeedCoord[1] > sizeGridEdge - 1 )\r\n\t\t\t\t\tcontinue ;\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\tArrayList<Integer> listIdNetIntLocal = new ArrayList<Integer> ( graphToolkit.getListElement(netGraph, element.node, elementTypeToReturn.integer)) ;\t\t//\tSystem.out.println(listIdNetIntLocal);\r\n\t\t\tArrayList<Integer> listIdSeedIntLocal = new ArrayList<Integer> ( graphToolkit.getListElement(seedGraph, element.node, elementTypeToReturn.integer)) ;\t\t//\tSystem.out.println(listIdNetIntLocal);\r\n\t\t\t\r\n\t\t\tint idInt = Collections.max(listIdNetIntLocal) ; //Math.max(listIdNetIntLocal, b) ;\r\n\t\t\twhile ( listIdNetIntLocal.contains(idInt) && listIdSeedIntLocal.contains(idInt) ) \r\n\t\t\t\tidInt ++ ;\r\n\t\t\t\r\n\t\t\tString id = Integer.toString(idInt) ;\t\t\t//\tSystem.out.println(idInt);\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\tnetGraph.addNode(id);\r\n\t\t\t\tseedGraph.addNode(id);\r\n\t\t\t\tbucketSet.putNode(netGraph.getNode(id));\r\n\t\t\t}\r\n\t\t\tcatch (org.graphstream.graph.IdAlreadyInUseException e) {\r\n\t\t\t\t\r\n\t\t\t\tlistIdSeedIntLocal = new ArrayList<Integer> ( graphToolkit.getListElement(seedGraph, element.node, elementTypeToReturn.integer)) ;\r\n\t\t\t\tlistIdNetIntLocal = new ArrayList<Integer> ( graphToolkit.getListElement(netGraph, element.node, elementTypeToReturn.integer)) ;\r\n\t\t\t\t\r\n\t\t\t\tidInt = Math.max(Collections.max(listIdNetIntLocal) , Collections.max(listIdSeedIntLocal) ) ;\r\n\t\t\t\tidInt ++ ; \r\n\t\t\t\twhile ( listIdNetIntLocal.contains(idInt) && listIdSeedIntLocal.contains(idInt))\r\n\t\t\t\t\tidInt ++ ;\r\n\t\t\t\t\r\n\t\t\t\tid = Integer.toString(idInt) ;\t\t\t//\tSystem.out.println(idInt);\r\n\t\t\t\t\r\n\t\t\t\tnetGraph.addNode(id);\r\n\t\t\t\tseedGraph.addNode(id);\r\n\t\t\t\tbucketSet.putNode(netGraph.getNode(id));\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tNode nodeNewNet = netGraph.getNode(id);\r\n\t\t\tNode nodeNewSeed = seedGraph.getNode(id);\r\n\t\t\t\t\t\t\r\n\t\t\tnodeNewSeed.addAttribute(\"xyz\", newNodeSeedCoord[0] , newNodeSeedCoord[1] , 0 );\r\n\t\t\tnodeNewSeed.addAttribute(\"father\", idSeed );\r\n\t\t\t\r\n\t\t\tnodeNewNet.addAttribute(\"xyz\", newNodeSeedCoord[0] , newNodeSeedCoord[1] , 0 );\r\n\t\t\tnodeNewNet.addAttribute(\"father\", idSeed );\t\r\n\t\t\t\r\n\t\t\tnodeNewNet.setAttribute(\"seedGrad\", 1);\r\n\t\t}\r\n\t\t\r\n\t\t// remove old seed\r\n\t\tfor ( int i : listIdSeedInt) //\tSystem.out.println(i);\r\n\t\t\tseedGraph.removeNode(Integer.toString(i));\t\r\n\t}",
"Set<ControllerNode> seedNodes();",
"private void updateRoutingTable(){\n\tint[] current = new int[RouterSimulator.NUM_NODES];\n\tArrays.fill(current, RouterSimulator.INFINITY);\n\t\n\t//iterate through neighbours distance tables\n\t\n\tfor(int i=0;i<myNeighboursDistTable[myID].length;i++){\n\t //if shortest path goes through current node\n\t if(i==myID){\n\t\tcurrent[i] = myDistTable[i];\n\t\troute[i] = i;\n\t\tcontinue;\n\t }\n\t //iterate through neighbours\n\t for(int j = 0; j < neighbours.length; j++){\n\t\t//if a neighbour exist\n\t\tif(neighbours[j]){\n\t\t int cost = costs[j] + myNeighboursDistTable[j][i];\n\t\t //if shorter path found\n\t\t if(cost < current[i]){\n\t\t\tcurrent[i] = cost;\n\t\t\troute[i] = j;\n \t\t }\n\t\t}\n\t\t\n\t }\n\t}\n\t//if better path found, send new routingtable to neighbours\n\tif(!Arrays.equals(current, myDistTable)){\n\t System.arraycopy(current, 0, myDistTable, 0, RouterSimulator.NUM_NODES);\n\t send();\n\t}\n }",
"public void clearPathData()\r\n {\r\n // Clear out all paths\r\n for(String key: network_topology.keyset())\r\n {\r\n //System.out.println(\"Clearing : \"+ key);\r\n network_topology.get(key).previous=null;\r\n network_topology.get(key).minDistance = Double.POSITIVE_INFINITY;\r\n }\r\n }",
"public void resetDecoyRouter() {\n this.hostsDecoyRouter = false;\n }",
"private void setNodeConnectors(){\n for (MoveableObject moveableObject : gameObjects.getMoveableObjectsList()) {\r\n // if the hashmap doesn't contain that radius then make the nodes\r\n if (!nodeMap.containsKey(moveableObject.getObjectRadius())){\r\n bufferedStationaryObstacles = new ArrayList();\r\n bufferedNodeConnector = new NodeConnector();\r\n // go through each obstace and buffer it by the object radius -0.5\r\n for (PathBlockingObstacle stationaryObstacle : stationaryObstacles) {\r\n KPolygon buffered1 = bufferer.buffer(stationaryObstacle.getPolygon(), moveableObject.getObjectRadius()-0.5, PathBlockingObstacleImpl.NUM_POINTS_IN_A_QUADRANT);\r\n bufferedStationaryObstacles.add(PathBlockingObstacleImpl.createObstacleFromInnerPolygon(buffered1));\r\n }\r\n // add these obstacles to a buffered node list\r\n for (PathBlockingObstacle bufferedStationaryObstacle : bufferedStationaryObstacles) {\r\n bufferedNodeConnector.addObstacle(bufferedStationaryObstacle, bufferedStationaryObstacles, maxConnectionDistanceBetweenObstacles);\r\n }\r\n // add this node list to the hashmap with the radius as key\r\n nodeMap.put(moveableObject.getObjectRadius(), bufferedNodeConnector);\r\n obstaclesMap.put(moveableObject.getObjectRadius(), bufferedStationaryObstacles);\r\n }\r\n \r\n \r\n }\r\n \r\n }",
"public int deleteRoute(RouteEntry rtEntry);",
"@Override\n\tpublic void run()\n\t{\n\t\tremoveOldRoutes();\n\t}",
"public void update_routing_window() {\n Log2(\"update_routing_window\\n\");\n Iterator<RouteEntry> iter= null;\n if (main_rtab!=null) {\n iter= main_rtab.iterator();\n }\n\n // update window\n for (int i= 0; i<tableObj.getRowCount(); i++) {\n if ((main_rtab != null) && iter.hasNext()) {\n RouteEntry next= iter.next();\n tableObj.setValueAt(\"\"+next.dest,i,0);\n tableObj.setValueAt(\"\"+next.next_hop,i,1);\n tableObj.setValueAt(\"\"+next.next_hop_area,i,2);\n tableObj.setValueAt(\"\"+next.dist,i,3);\n } else {\n tableObj.setValueAt(\"\",i,0);\n tableObj.setValueAt(\"\",i,1);\n tableObj.setValueAt(\"\",i,2);\n tableObj.setValueAt(\"\",i,3);\n }\n }\n }",
"public final void rebuild(int numNodes){\n\tclear();\n\trebuildNetwork(numNodes);\n }",
"public synchronized void clearResources()\r\n {\r\n // create a new root, making old tree eligible for GCing\r\n createRootNode();\r\n\r\n // clear all registered objects\r\n unRegisterAll();\r\n }",
"@Test\n public void testProcessor () {\n getOrphanTables(1L);\n updateConstraints();\n deleteConstraints(1L);\n\n }",
"@Override\r\npublic void initRules(){\r\n\t\r\n}",
"public static void reset() {\n\t\tnodes.clear();\n\t\tid = 0;\n\t}",
"public void InstantiateAllRelevantsInRule (Rule rule, boolean forIntersection, boolean online)\n\t{\n\t\t//List<Rule> instRuleVector = new CopyOnWriteArrayList<Rule>();\n\t\tSet<Rule> instRuleVector = Collections.newSetFromMap(new ConcurrentHashMap<Rule, Boolean>());\n\t\t//long startTime = System.currentTimeMillis();\n\t\tif (false == forIntersection && false == rule.isFullyInst()) \n\t\t{\n\t\t\tfor (Atom bodyAtom : rule.getBody().getAtoms()) \n\t\t\t{\n\t\t\t\tfor (Atom instAtom : this.addedInstAtomsInLastIteration) \n\t\t\t\t{\n\t\t\t\t\tif (instAtom.getName().equals(bodyAtom.getName()))\n\t\t\t\t\t{\n\t\t\t\t\t\tAtom copyOfinstAtom = new Atom (instAtom);\n\t\t\t\t\t\tRule temp = new Rule (rule);\n\t\t\t\t\t\ttemp.SwapToInstAtomAndPartiallyInst(bodyAtom, copyOfinstAtom);\n\t\t\t\t\t\tif (true == temp.getIsFullyInst())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//Provenance.getInstance().AddRuleToProv(temp, this.level);\n\t\t\t\t\t\t\t//KeyMap.getInstance().UpdateRule(temp);\n\t\t\t\t\t\t\ttemp.getBody().setRuleUsed(rule);//added for the top-k\n\t\t\t\t\t\t\ttemp.getHead().setRuleUsed(rule);\n\t\t\t\t\t\t\t//for top-1!\n\t\t\t\t\t\t\tif (false == online) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/*KeyMap.getInstance().UpdateFactBody(temp.getBody());\n\t\t\t\t\t\t\t\tBody pointerBody = KeyMap.getInstance().GetPointerBodyForTop1(temp.getBody());\n\t\t\t\t\t\t\t\tif (true == pointerBody.LegalDerivation())\n\t\t\t\t\t\t\t\t{*/\n\t\t\t\t\t\t\t\tKeyMap.getInstance().Update(temp.getHead());\n\t\t\t\t\t\t\t\t//}\n\t\t\t\t\t\t\t\t//AtomsDerived.getInstance().Update(temp.getHead());\n\t\t\t\t\t\t\t\tProvenance.getInstance().AddRuleToProv(temp, this.level);\n\t\t\t\t\t\t\t\t//addedFullProv.add(KeyMap.getInstance().Get(temp.getHead()));\n\t\t\t\t\t\t\t\t//System.out.println(temp);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tHandleTop1Scenario(temp, online);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\telse //if (false == online || temp.getRestricted() == null || false == temp.getBody().Uninstantiatated())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tinstRuleVector.add(temp);\n\t\t\t\t\t\t\t//DeriveRule(temp, online);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (true == this.addedInstAtomsInLastIteration.isEmpty() || false == instRuleVector.isEmpty())\n\t\t\t{\n\t\t\t\tDeriveByRuleBottomUp ruleDeriver = new DeriveByRuleBottomUp(rule, this.p, this.topk, this.treesWaiting, this.previouslyFoundRelevants);\n\t\t\t\truleDeriver.FindDerivationsForRuleBottomUp(instRuleVector, forIntersection, level);\n\t\t\t}\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\tif (false == online || true == rule.getBody().AllAtomsInDb()) \n\t\t\t{\n\t\t\t\trule.getHead().setRuleUsed(rule);\n\t\t\t\trule.getBody().setRuleUsed(rule);//added for the top-k\n\t\t\t\tProvenance.getInstance().AddRuleToProv(rule, this.level);\n\t\t\t\t//for top-1!\n\t\t\t\tif (false == online) KeyMap.getInstance().Update(rule.getHead());\n\t\t\t\telse HandleTop1Scenario(rule, online);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/*long endTime = System.currentTimeMillis();\n\t\tif ((endTime-startTime) > 200)\n\t\t{\n\t\t\tSystem.out.println(\"DeriveByProgramBottomUp::InstantiateAllRelevantsInRule:: iteration time: \" + (endTime-startTime));\n\t\t\tSystem.out.println(\"DeriveByProgramBottomUp::InstantiateAllRelevantsInRule:: rule derived: \" + rule);\n\t\t\tSystem.out.println(\"DeriveByProgramBottomUp::InstantiateAllRelevantsInRule:: num of atoms last iter: \" + this.addedInstAtomsInLastIteration.size());\n\t\t}*/\n\t}",
"protected void resetGraph() {\n for (List<Edge> path : graph) {\r\n for (Edge e : path) {\r\n e.flow = 0;\r\n }\r\n }\r\n }",
"private boolean noNodeDeletingRules(final List<Rule> sequence) {\r\n\t\tboolean result = true;\r\n\t\tfor (int i=0; i<sequence.size(); i++) {\r\n\t\t\tRule r = sequence.get(i);\r\n//\t\t\tSystem.out.println(r.getName());\r\n\t\t\tfinal Pair<Boolean, List<String>> \r\n\t\t\truleRes = this.ruleSequence.getRuleResult(i, r.getName(), ApplicabilityConstants.NO_NODE_DELETING);\r\n\t\t\tif (ruleRes != null) {\r\n\t\t\t\tif (!ruleRes.first.booleanValue())\r\n\t\t\t\t\tresult = false;\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\t\tif (//r.isNodeDeleting() \r\n\t\t\t\t\t\t//&& \r\n\t\t\t\t\t\tr.mayCauseDanglingEdge()\r\n\t\t\t\t) {\r\n\t\t\t\t\tresult = false;\t\t\r\n\t\t\t\t\tsetRuleResult(i, r.getName(), false, ApplicabilityConstants.NO_NODE_DELETING, \"\");\t\r\n\t\t\t\t\tSystem.out.println(\"=== >>> ApplicabilityChecker.noNodeDeletingRules:: FAILED! rule: \"+r.getName()+\" may cause dangling edge.\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsetRuleResult(i, r.getName(), true, ApplicabilityConstants.NO_NODE_DELETING, \"\");\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\tif (!result && !this.ruleSequence.getIgnoreDanglingEdgeOfDelNode()) {\r\n\t\t\tsetApplicabilityResult(false, ApplicabilityConstants.NO_NODE_DELETING);\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private void testAclConstraints007() {\n\t\tDmtSession session = null;\n\t\ttry {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints007\");\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.LEAF_NODE, DmtConstants.PRINCIPAL_2, Acl.GET );\n tbc.openSessionAndSetNodeAcl(TestExecPluginActivator.INTERIOR_NODE, DmtConstants.PRINCIPAL, Acl.REPLACE );\n\t\t\ttbc.setPermissions(new PermissionInfo(DmtPrincipalPermission.class.getName(),DmtConstants.PRINCIPAL,\"*\"));\n\t\t\tsession = tbc.getDmtAdmin().getSession(DmtConstants.PRINCIPAL,TestExecPluginActivator.ROOT,DmtSession.LOCK_TYPE_EXCLUSIVE);\n\t\t\tsession.setNodeAcl(TestExecPluginActivator.LEAF_NODE,new org.osgi.service.dmt.Acl(\"Get=*\"));\n\t\t\t\n\t\t\tDefaultTestBundleControl.pass(\"If a principal has Replace access to a node, the principal is permitted to change the ACL of all its child nodes\");\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\ttbc.failUnexpectedException(e);\n\t\t} finally {\n\t\t\ttbc.cleanUp(session,TestExecPluginActivator.LEAF_NODE);\n\t\t\ttbc.cleanAcl(TestExecPluginActivator.INTERIOR_NODE);\n\t\t\t\n\t\t}\n\t}",
"@Override\n\t public void process(PacketContext context) {\n\t InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n/*\n InboundPacket pkt = context.inPacket();\n Ethernet ethPkt = pkt.parsed();\n\t MacAddress hostId = ethPkt.getSourceMAC();\n HostId id = HostId.hostId(ethPkt.getDestinationMAC());\n\t DeviceId apId = pkt.receivedFrom().deviceId();\n*/\n // Do we know who this is for? If not, flood and bail.\n\t //log.info(\"Host id : {}\",id);\n\n Host dst = hostService.getHost(id);\n\n\t\n if (dst == null) {\n ipv6process(context, pkt);\n\t \n return;\n\t }\n/*\n\t if (pkt.receivedFrom().deviceId().equals(dst.location().deviceId())) {\n if (!context.inPacket().receivedFrom().port().equals(dst.location().port())) {\n\t\t log.info(\"Rule is installed.-1\");\n\t\t log.info(\"DeviceID: dst={}\", pkt.receivedFrom().deviceId(), dst.location().deviceId());\n installRule(context, dst.location().port());\n }\n return;\n }\n\t\t\t\t\n*/\t\n \t if((stPreApId.equals(stNowApId) && stype ==1) || (stPreApId.equals(stNowApId) && stype ==2)){\n\t\t log.info(\"##############test same ap -------------[ok]\\n\");\n\t\t log.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t //TODO ::\t\t\t\n\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t if (paths.isEmpty()) {\n\t\t // If there are no paths, flood and bail.\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t \n\t\t Path path = pickForwardPathIfPossible(paths,pkt.receivedFrom().port());\n\t\t if (path == null) {\n\t\t log.warn(\"Don't know where to go from here {} for {} -> {}\",\n\t\t pkt.receivedFrom(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC());\n\t\t //flood(context);\n\t\t return;\n\t\t }\n\t\t log.info(\"Rule is installed.-2\");\n\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\n\t\t mkList(hostId, apId, flowNum, pkt.receivedFrom().port(), ethPkt.getSourceMAC(), ethPkt.getDestinationMAC(), stype);\n\t\t saveFlowInfo(ethPkt.getDestinationMAC(),pkt.receivedFrom().deviceId(), stype);\n\t\t // stype = 0;\n\n\t }\n\n\n\t if(! stPreApId.equals(stNowApId) && stype ==3){\n\t\tif(! stNowApId.equals(\"\")){\n\t\t\tlog.info(\"##############test handover -------------[ok]\\n\");\n\t\t\tlog.info(\"checking preApId ={}, nowApId={} \\n\",stPreApId, stNowApId);\n\t\t\tlog.info(\"test : {}\",destList2.size());\n\n\t\t\t/*for(int i =0; i<destList2.size();i++){\n\t\t\t\tlog.info(\"test type 2 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList2.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId()); \n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-3\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}*/\n\n\t\t\tfor(int i =0; i<destList1.size();i++){\n\t\t\t\tlog.info(\"test type 1 cnt: {}\",i);\n\t\t\t\t//if(((DeviceId)desApList1.get(i)).equals(dst.location().deviceId())){\n\t\t\t\t\t Set<Path> paths = topologyService.getPaths(topologyService.currentTopology(), pkt.receivedFrom().deviceId(), dst.location().deviceId());\n\t\t\t\t if (paths.isEmpty()){\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t Path path = pickForwardPathIfPossible(paths, pkt.receivedFrom().port());\n\t\t\t\t if (path == null) {\n\t\t\t\t\tlog.warn(\"Don't know where to go from here\");\n\t\t\t\t\treturn;\n\t\t\t\t }\n\t\t\t\t log.info(\"Rule is installed.-4\");\n\t\t\t\t log.info(\"port()={}, path()={}\", pkt.receivedFrom().port(), path);\t\n\t\t\t\t // }\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif (stype ==0) {\n\t\t\tlog.info(\"###-----------what is packet?\\n\");\n\t\t}\n\t\t\n\t }\n\t\tlog.info(\"#############-------------[waitting]\\n\");\n\t\t\n\t}",
"private void CreateSimpleDataBaseRules(String database) throws isisicatclient.IcatException_Exception {\n Grouping publishedDataAdmins = new Grouping();\r\n publishedDataAdmins.name = \"Disordered Materials Published Data Admins\";\r\n publishedDataAdmins.id = port.create(sessionId, publishedDataAdmins);\r\n\r\n //Add Frazer to that group\r\n /*UserGroup frazerToPdas = new UserGroup();\r\n frazerToPdas.grouping = publishedDataAdmins;\r\n frazerToPdas.user = frazer;\r\n frazerToPdas.id = port.create(sessionId, frazerToPdas);*/\r\n String databaseName = \" = '\" + database + \"'\";\r\n\r\n //Create on ParameterType\r\n Rule pdaCreateParamType = new Rule();\r\n pdaCreateParamType.grouping = publishedDataAdmins;\r\n pdaCreateParamType.crudFlags = \"CU\";\r\n pdaCreateParamType.what = \"ParameterType\";\r\n port.create(sessionId, pdaCreateParamType);\r\n String count;\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(i) FROM Investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for Investigation\r\n Rule pdaInvestigation = new Rule();\r\n pdaInvestigation.grouping = publishedDataAdmins;\r\n pdaInvestigation.crudFlags = \"CRUD\";\r\n pdaInvestigation.what = \"SELECT i FROM Investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaInvestigation);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(i) FROM Investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for InvestigationParameter\r\n Rule pdaInvParam = new Rule();\r\n pdaInvParam.grouping = publishedDataAdmins;\r\n pdaInvParam.crudFlags = \"CRUD\";\r\n pdaInvParam.what = \"SELECT ip FROM InvestigationParameter ip JOIN ip.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaInvParam);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(ip) FROM InvestigationParameter ip JOIN ip.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - InvestigationParameter - OK - \" + count);\r\n }\r\n\r\n //Rules for Dataset\r\n Rule pdaDs = new Rule();\r\n pdaDs.grouping = publishedDataAdmins;\r\n pdaDs.crudFlags = \"CRUD\";\r\n pdaDs.what = \"SELECT ds FROM Dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(ds) FROM Dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Dataset - OK - \" + count);\r\n }\r\n\r\n //Rules for DatasetParameter\r\n Rule pdaDsParam = new Rule();\r\n pdaDsParam.grouping = publishedDataAdmins;\r\n pdaDsParam.crudFlags = \"CRUD\";\r\n pdaDsParam.what = \"SELECT dsp FROM DatasetParameter dsp JOIN dsp.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDsParam);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(dsp) FROM DatasetParameter dsp JOIN dsp.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - DatasetParameter - OK - \" + count);\r\n }\r\n\r\n //Rules for Datafile\r\n Rule pdaDf = new Rule();\r\n pdaDf.grouping = publishedDataAdmins;\r\n pdaDf.crudFlags = \"CRUD\";\r\n pdaDf.what = \"SELECT df FROM Datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDf);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(df) FROM Datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Datafile - OK - \" + count);\r\n }\r\n\r\n //Rules for DatasetParameter\r\n Rule pdaDfParam = new Rule();\r\n pdaDfParam.grouping = publishedDataAdmins;\r\n pdaDfParam.crudFlags = \"CRUD\";\r\n pdaDfParam.what = \"SELECT dfp FROM DatafileParameter dfp JOIN dfp.datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaDfParam);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(dfp) FROM DatafileParameter dfp JOIN dfp.datafile df JOIN df.dataset ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - DatafileParameter - OK - \" + count);\r\n }\r\n //Rules for Sample via Investigation\r\n Rule pdaSampleViaInv = new Rule();\r\n pdaSampleViaInv.grouping = publishedDataAdmins;\r\n pdaSampleViaInv.crudFlags = \"CRUD\";\r\n pdaSampleViaInv.what = \"SELECT s FROM Sample s JOIN s.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleViaInv);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(s) FROM Sample s JOIN s.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Sample via Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for Sample Via Dataset\r\n Rule pdaSampleViaDs = new Rule();\r\n pdaSampleViaDs.grouping = publishedDataAdmins;\r\n pdaSampleViaDs.crudFlags = \"CRUD\";\r\n pdaSampleViaDs.what = \"SELECT s FROM Sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleViaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(s) FROM Sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - Sample via Dataset - OK - \" + count);\r\n }\r\n\r\n //Rules for SampleParameter via Investigation\r\n Rule pdaSampleParamViaInv = new Rule();\r\n pdaSampleParamViaInv.grouping = publishedDataAdmins;\r\n pdaSampleParamViaInv.crudFlags = \"CRUD\";\r\n pdaSampleParamViaInv.what = \"SELECT sp FROM SampleParameter sp JOIN sp.sample s JOIN s.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleParamViaInv);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(sp) FROM SampleParameter sp JOIN sp.sample s JOIN s.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleParameter via Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for SampleParameter Via Dataset\r\n Rule pdaSampleParamViaDs = new Rule();\r\n pdaSampleParamViaDs.grouping = publishedDataAdmins;\r\n pdaSampleParamViaDs.crudFlags = \"CRUD\";\r\n pdaSampleParamViaDs.what = \"SELECT sp FROM SampleParameter sp JOIN sp.sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleParamViaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(sp) FROM SampleParameter sp JOIN sp.sample s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleParameter via Dataset - OK - \" + count);\r\n }\r\n\r\n //SampleType - create is independant, so need 'direct' 'C' access, and then to read their own?\r\n Rule pdaCreateSampleType = new Rule();\r\n pdaCreateSampleType.grouping = publishedDataAdmins;\r\n pdaCreateSampleType.crudFlags = \"CR\";\r\n pdaCreateSampleType.what = \"SampleType\";\r\n port.create(sessionId, pdaCreateSampleType);\r\n\r\n //Rules for SampleType via Investigation\r\n Rule pdaSampleTypeViaInv = new Rule();\r\n pdaSampleTypeViaInv.grouping = publishedDataAdmins;\r\n pdaSampleTypeViaInv.crudFlags = \"CRUD\";\r\n pdaSampleTypeViaInv.what = \"SELECT st FROM SampleType st JOIN st.samples s JOIN s.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleTypeViaInv);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(st) FROM SampleType st JOIN st.samples s JOIN s.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleType via Investigation - OK - \" + count);\r\n }\r\n\r\n //Rules for SampleType Via Dataset\r\n Rule pdaSampleTypeViaDs = new Rule();\r\n pdaSampleTypeViaDs.grouping = publishedDataAdmins;\r\n pdaSampleTypeViaDs.crudFlags = \"CRUD\";\r\n pdaSampleTypeViaDs.what = \"SELECT st FROM SampleType st JOIN st.samples s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name \" + databaseName;\r\n port.create(sessionId, pdaSampleTypeViaDs);\r\n\r\n if (test) {\r\n count = port.search(sessionId, \"SELECT COUNT(st) FROM SampleType st JOIN st.samples s JOIN s.datasets ds JOIN ds.investigation i JOIN i.type it WHERE it.name\" + databaseName).get(0).toString();\r\n System.out.println(\"DMPD - SampleType via Dataset - OK - \" + count);\r\n }\r\n }",
"void updateFrom(RuleDetail ruleDetail);",
"@Override\n public void setRules(List rules) {\n this.rules = rules;\n if (schemaGraph != null) {\n // The change of rules invalidates the existing precomputed schema graph\n // This might be recoverable but for now simply flag the error and let the\n // user reorder their code to set the rules before doing a bind!\n throw new ReasonerException(\"Cannot change the rule set for a bound rule reasoner.\\nSet the rules before calling bindSchema\");\n }\n }",
"private List<FlowRule> createRules(OpticalOduIntent intent, ConnectPoint src, ConnectPoint dst,\n Path path, Map<LinkKey, Set<TributarySlot>> slotsMap, boolean reverse) {\n // Build the ingress OTN rule\n TrafficSelector.Builder selector = DefaultTrafficSelector.builder();\n selector.matchInPort(src.port());\n OduSignalType oduCltPortOduSignalType =\n OduSignalUtils.mappingCltSignalTypeToOduSignalType(intent.getSignalType());\n selector.add(Criteria.matchOduSignalType(oduCltPortOduSignalType));\n\n List<FlowRule> rules = new LinkedList<>();\n ConnectPoint current = src;\n\n List<Link> links = ((!reverse) ? path.links() : Lists.reverse(path.links()));\n\n for (Link link : links) {\n Set<TributarySlot> slots = slotsMap.get(linkKey(link));\n OtuPort otuPort = (OtuPort) (deviceService.getPort(link.src().deviceId(), link.src().port()));\n OduSignalType otuPortOduSignalType =\n OduSignalUtils.mappingOtuSignalTypeToOduSignalType(otuPort.signalType());\n\n TrafficTreatment.Builder treat = DefaultTrafficTreatment.builder();\n OduSignalId oduSignalId = null;\n // use Instruction of OduSignalId only in case of ODU Multiplexing\n if (oduCltPortOduSignalType != otuPortOduSignalType) {\n oduSignalId = OduSignalUtils.buildOduSignalId(otuPortOduSignalType, slots);\n treat.add(Instructions.modL1OduSignalId(oduSignalId));\n }\n ConnectPoint next = ((!reverse) ? link.src() : link.dst());\n treat.setOutput(next.port());\n\n FlowRule rule = createFlowRule(intent, current.deviceId(), selector.build(), treat.build());\n rules.add(rule);\n\n current = ((!reverse) ? link.dst() : link.src());\n selector = DefaultTrafficSelector.builder();\n selector.matchInPort(current.port());\n selector.add(Criteria.matchOduSignalType(oduCltPortOduSignalType));\n // use Criteria of OduSignalId only in case of ODU Multiplexing\n if (oduCltPortOduSignalType != otuPortOduSignalType) {\n selector.add(Criteria.matchOduSignalId(oduSignalId));\n }\n }\n\n // Build the egress OTN rule\n TrafficTreatment.Builder treatLast = DefaultTrafficTreatment.builder();\n treatLast.setOutput(dst.port());\n\n FlowRule rule = createFlowRule(intent, dst.deviceId(), selector.build(), treatLast.build());\n rules.add(rule);\n\n return rules;\n }",
"private void rehash() \n\t{\n\t\tnumKeys++;\n LinkedList<SpacePort<String, SpaceShipValet>>[] oldPort = chainedPortList;\n chainedPortList = new LinkedList[chainedPortList.length*2];\n\n for(int i = 0; i < oldPort.length; i++)\n {\n if(oldPort[i] != null && !oldPort[i].equals(DELETED))//If there is something in the old port,\n {\n \tfor(SpacePort<String, SpaceShipValet> ports: oldPort[i])//For all the slots in the SpacePort\n \t\tdock(ports.license, ports.ship);//Add a ship\n \tnumKeys++;//Increments the number of slots\n }\n }\t\n\n\t}",
"@Test\n public void testNodeHashTypeMismatch() throws Exception {\n String drl1 = \"import \" + Person.class.getCanonicalName() + \";\\n\" +\n \"rule \\\"rule1\\\"\\n\" +\n \"when\\n\" +\n \" Person( status == 1 )\\n\" +\n \"then\\n\" +\n \"end\\n\" +\n \"rule \\\"rule2\\\"\\n\" +\n \"when\\n\" +\n \" Person( status == 2 )\\n\" +\n \"then\\n\" +\n \"end\\n\";\n\n KieBase kbase1 = KieBaseUtil.getKieBaseFromKieModuleFromDrl(\"test\", kieBaseTestConfiguration, drl1);\n KieSession ksession1 = kbase1.newKieSession();\n\n Person p1 = new Person();\n p1.setStatus( \"1\" );\n ksession1.insert( p1 );\n\n assertThat(ksession1.fireAllRules()).isEqualTo(1);\n ksession1.dispose();\n\n // 3 rules -- Node Hashing\n String drl2 = \"import \" + Person.class.getCanonicalName() + \";\\n\" +\n \"rule \\\"rule1\\\"\\n\" +\n \"when\\n\" +\n \" Person( status == 1 )\\n\" +\n \"then\\n\" +\n \"end\\n\" +\n \"rule \\\"rule2\\\"\\n\" +\n \"when\\n\" +\n \" Person( status == 2 )\\n\" +\n \"then\\n\" +\n \"end\\n\" +\n \"rule \\\"rule3\\\"\\n\" +\n \"when\\n\" +\n \" Person( status == 3 )\\n\" +\n \"then\\n\" +\n \"end\\n\";\n\n KieBase kbase2 = KieBaseUtil.getKieBaseFromKieModuleFromDrl(\"test\", kieBaseTestConfiguration, drl2);\n KieSession ksession2 = kbase2.newKieSession();\n\n Person p2 = new Person();\n p2.setStatus( \"1\" );\n ksession2.insert( p2 );\n\n assertThat(ksession2.fireAllRules()).isEqualTo(1);\n ksession2.dispose();\n }",
"private void testAclConstraints010() {\n DmtSession session = null;\n try {\n\t\t\tDefaultTestBundleControl.log(\"#testAclConstraints010\");\n tbc.cleanAcl(TestExecPluginActivator.INEXISTENT_NODE);\n \n session = tbc.getDmtAdmin().getSession(\".\",\n DmtSession.LOCK_TYPE_EXCLUSIVE);\n Acl aclParent = new Acl(new String[] { DmtConstants.PRINCIPAL },new int[] { Acl.REPLACE });\n session.setNodeAcl(TestExecPluginActivator.ROOT,\n aclParent);\n \n session.setNodeAcl(TestExecPluginActivator.INTERIOR_NODE,\n new Acl(new String[] { DmtConstants.PRINCIPAL },\n new int[] { Acl.EXEC }));\n TestExecPlugin.setAllUriIsExistent(false);\n session.copy(TestExecPluginActivator.INTERIOR_NODE,\n TestExecPluginActivator.INEXISTENT_NODE, true);\n TestExecPlugin.setAllUriIsExistent(true);\n TestCase.assertTrue(\"Asserts that the copied nodes inherit the access rights from the parent of the destination node.\",\n aclParent.equals(session.getEffectiveNodeAcl(TestExecPluginActivator.INEXISTENT_NODE)));\n \n } catch (Exception e) {\n \ttbc.failUnexpectedException(e);\n } finally {\n tbc.cleanUp(session, TestExecPluginActivator.INTERIOR_NODE);\n tbc.cleanAcl(TestExecPluginActivator.ROOT);\n TestExecPlugin.setAllUriIsExistent(false);\n }\n }",
"public void setReRouting() {\r\n\t\tthis.reRouting = true;\r\n\t}",
"public void sync(){\n\t\tDHTNode myNode = dynamoRing.getNode(MY_ADDRESS);\n\t\tArrayList<DHTNode> dependentNodes = dynamoRing.getNPredecessors(myNode, REPLICATION_COUNT-1);\n\t\tdependentNodes.add(myNode);\n\t\tSparseArray<String> dependentNodeMap = new SparseArray<String>();\n\t\tHashMap<String, KeyVal> resultMap = new HashMap<String, KeyVal>();\n\t\tfor(int i=0;i<dependentNodes.size();i++)\t// Ideally it should contact only N-1 successors and N-1 predecessors\n\t\t\t\t\t\t\t\t\t\t\t\t\t// but for total node count = 5 and replica count = 2, this\n\t\t\t\t\t\t\t\t\t\t\t\t\t// number spans through all the nodes\n\t\t\tdependentNodeMap.put(dependentNodes.get(i).getAddress(), dependentNodes.get(i).getId());\n\t\t\n\t\tArrayList<DHTNode> nodeList = dynamoRing.getAllNodes();\n\t\tfor(int i=0;i<nodeList.size();i++){\n\t\t\tif(nodeList.get(i)==myNode)\n\t\t\t\tcontinue;\n\t\t\tArrayList<KeyVal> keyValList = readDHTAllFromNode(nodeList.get(i));\n\t\t\tfor(int j=0;j<keyValList.size();j++){\n\t\t\t\tKeyVal keyVal = keyValList.get(j);\n\t\t\t\tint responsibleNodeAddress = dynamoRing.getResponsibleNode(keyVal.getKey()).getAddress();\n\t\t\t\tif(dependentNodeMap.get(responsibleNodeAddress)==null)\n\t\t\t\t\tcontinue;\n\t\t\t\telse{\n\t\t\t\t\tif(resultMap.get(keyVal.getKey())==null){\n\t\t\t\t\t\tresultMap.put(keyVal.getKey(), keyVal);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tint oldVersion = Integer.parseInt(resultMap.get(keyVal.getKey()).getVersion());\n\t\t\t\t\t\tint newVersion = Integer.parseInt(keyVal.getVersion());\n\t\t\t\t\t\tif(newVersion > oldVersion)\n\t\t\t\t\t\t\tresultMap.put(keyVal.getKey(), keyVal);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tIterator<Entry<String, KeyVal>> resultIterator = resultMap.entrySet().iterator();\n\t\twhile(resultIterator.hasNext()){\n\t\t\tEntry<String, KeyVal> nextEntry = resultIterator.next();\n\t\t\tKeyVal keyVal = nextEntry.getValue();\n\t\t\twriteLocalKeyVal(keyVal.getKey(), keyVal.getVal(), keyVal.getVersion());\n\t\t}\n\t\t\n\t}",
"public void buildGraph() {\n //System.err.println(\"Build Graph \"+this);\n if (node instanceof eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)\n ((eu.mihosoft.ext.j3d.com.sun.j3d.scenegraph.io.SceneGraphIO)node).restoreSceneGraphObjectReferences( control.getSymbolTable() );\n }",
"public void fixupDatabase() {\n long count = 0;\n count = countBySearch(HierarchyNodeMetaData.class, new Search(\"isDisabled\",\"\", Restriction.NULL) );\n if (count > 0) {\n int counter = 0;\n counter += getHibernateTemplate().bulkUpdate(\"update HierarchyNodeMetaData nm set nm.isDisabled = false where nm.isDisabled is null\");\n log.info(\"Updated \" + counter + \" HierarchyNodeMetaData.isDisabled fields from null to boolean false\");\n }\n }",
"public void analize() {\n\t\t//clearing dropping rules\n\t\tthis.droppingRules.clear();\n\t\t//analysing new rules\n\t\tanalizeParts();\n\t}",
"private void readStaticRoutes(List<Element> staticRouteElements, Model model)\n throws ObjectExistsException {\n // Add the static routes.\n for (int i = 0; i < staticRouteElements.size(); i++) {\n Element curRouteElement = staticRouteElements.get(i);\n Integer routeID;\n try {\n routeID = Integer.valueOf(curRouteElement.getAttributeValue(\"id\"));\n }\n catch (NumberFormatException e) {\n routeID = null;\n }\n\n StaticRoute curRoute = model.createStaticRoute(routeID);\n TCSObjectReference<StaticRoute> routeRef = curRoute.getReference();\n String routeName = curRouteElement.getAttributeValue(\"name\");\n if (routeName == null || routeName.isEmpty()) {\n routeName = \"RouteName\" + i + \"Unknown\";\n }\n model.getObjectPool().renameObject(curRoute.getReference(), routeName);\n // Add hops.\n List<Element> hopElements = curRouteElement.getChildren(\"hop\");\n for (int j = 0; j < hopElements.size(); j++) {\n Element curHopElement = hopElements.get(j);\n String pointName = curHopElement.getAttributeValue(\"name\");\n if (pointName == null || pointName.isEmpty()) {\n pointName = \"PointName\" + j + \"Unknown\";\n }\n TCSObjectReference<Point> pointRef\n = model.getPoint(pointName).getReference();\n curRoute.addHop(pointRef);\n }\n List<Element> properties = curRouteElement.getChildren(\"property\");\n for (int k = 0; k < properties.size(); k++) {\n Element curPropElement = properties.get(k);\n String curKey = curPropElement.getAttributeValue(\"name\");\n if (curKey == null || curKey.isEmpty()) {\n curKey = \"Key\" + k + \"Unknown\";\n }\n String curValue = curPropElement.getAttributeValue(\"value\");\n if (curValue == null || curValue.isEmpty()) {\n curValue = \"Value\" + k + \"Unknown\";\n }\n model.getObjectPool().setObjectProperty(routeRef, curKey, curValue);\n }\n }\n }",
"public void setRules(ArrayList<Rule> rules) {\n\t\tthis.rules = rules;\n\t}",
"private void prepareRuleFiles() {\n\n if (IronSyslog.class.getResource(RULE_FOLDER) == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"service/\") == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"publish/\") == null\n || IronSyslog.class.getResource(RULE_FOLDER + \"other/\") == null) {\n LOGGER.error(\"Error while preparing rule files. Broken file system folder structure. \\n\"\n + \"Make sure that: rules/drools/ and its subfolders service/, publish/ and other/ exist\");\n System.exit(1);\n }\n\n // Prepare Configuration\n Yaml yaml = new Yaml();\n InputStream input = IronSyslog.class.getResourceAsStream(RULE_FOLDER\n + \"config.yml\");\n RulesConfiguration config = yaml\n .loadAs(input, RulesConfiguration.class);\n\n try {\n // Add only the service rules (in the service folder) specified in\n // the configuration\n for (String service : config.getServiceInclude()) {\n String fileName = RULE_FOLDER + \"service/\" + service + \".drl\";\n if (IronSyslog.class.getResource(fileName) != null) {\n LOGGER.debug(\"Adding rule file: \" + fileName);\n mRuleFiles.add(RULE_FOLDER + \"service/\" + service + \".drl\");\n } else {\n LOGGER.warn(\"Failed to add rule file: \" + fileName);\n }\n }\n\n // Add all publish rules (in the \"publish\" folder) excluding the one\n // specified on the\n // configuration\n File publishFolder = new File(IronSyslog.class.getResource(\n RULE_FOLDER + \"publish/\").toURI());\n File[] publishFiles = publishFolder.listFiles();\n for (int i = 0; i < publishFiles.length; i++) {\n String fileName = publishFiles[i].getName();\n if (fileName.endsWith(\".drl\")\n && !config.getPublishExclude().contains(\n fileName.substring(0, fileName.length() - 4))) {\n LOGGER.debug(\"Adding rule file: \" + RULE_FOLDER\n + \"publish/\" + fileName);\n mRuleFiles.add(RULE_FOLDER + \"publish/\" + fileName);\n }\n }\n\n // Add all other rules (\"other\" folder, including subfolders)\n addAllRuleFilesInFolder(RULE_FOLDER + \"other/\");\n } catch (URISyntaxException e) {\n LOGGER.debug(\"Error while searching for rule files. \" + e);\n }\n }",
"public RoutingTree(int size){\r\n\t\tthis.routes = new Route[size];\r\n\t}",
"void reserverTopo(String user, Integer topoId);",
"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 void delRelations();",
"private void fiveNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pI(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\")));\n n(tx, true, \"n2\", Stream.of(pI(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\")));\n n(tx, true, \"n3\", Stream.of(pO(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pI(\"n3:4\")));\n n(tx, true, \"n4\", Stream.of(pO(\"n4:1\"), pI(\"n4:2\"), pB(\"n4:3\"), pB(\"n4:4\")));\n n(tx, true, \"n5\", Stream.of(pI(\"n5:1\"), pB(\"n5:2\"), pB(\"n5:3\"), pO(\"n5:4\")));\n l(tx, \"n2\", \"n2:3\", \"n3\", \"n3:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:1\", \"n1\", \"n1:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n3\", \"n3:3\", \"n5\", \"n5:1\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n4\", \"n4:1\", \"n1\", \"n1:3\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n l(tx, \"n5\", \"n5:4\", \"n4\", \"n4:2\", OperationalState.ENABLED, ForwardingDirection.BIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }",
"private static void exportRules(GraknClient.Session session, Path schemaRoot) throws IOException {\n File outputFile = schemaRoot.resolve(\"rule\").toFile();\n Writer writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(outputFile), StandardCharsets.UTF_8));\n GraknClient.Transaction tx = session.transaction().write();\n\n tx.getRule(\"rule\").subs()\n .filter(rule -> !rule.label().toString().equals(\"rule\"))\n .forEach(rule -> {\n String when = rule.when().toString();\n String then = rule.then().toString();\n String label = rule.label().toString();\n try {\n writer.write(label);\n writer.write(\"\\n\");\n writer.write(when);\n writer.write(\"\\n\");\n writer.write(then);\n writer.write(\"\\n\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n writer.flush();\n writer.close();\n tx.close();\n }"
] | [
"0.5860765",
"0.58574283",
"0.5672602",
"0.5643731",
"0.5525514",
"0.5471143",
"0.5406749",
"0.53783536",
"0.53752136",
"0.53247905",
"0.53112876",
"0.5268452",
"0.5262559",
"0.5254215",
"0.52379096",
"0.52082896",
"0.51954526",
"0.5178041",
"0.5158061",
"0.51570505",
"0.51560116",
"0.5155781",
"0.51473266",
"0.51389116",
"0.51331437",
"0.51096755",
"0.5079964",
"0.50715715",
"0.50715715",
"0.5067461",
"0.50508595",
"0.5044686",
"0.5040104",
"0.5031165",
"0.50190717",
"0.5015051",
"0.5002715",
"0.49851164",
"0.49719408",
"0.49626964",
"0.49487564",
"0.49442083",
"0.49386156",
"0.493567",
"0.4925985",
"0.49256638",
"0.49042395",
"0.4891434",
"0.4880155",
"0.48732254",
"0.48697877",
"0.48685122",
"0.48634526",
"0.48544583",
"0.484773",
"0.48454165",
"0.48332545",
"0.48315874",
"0.48276645",
"0.48191836",
"0.47912577",
"0.47729447",
"0.4772341",
"0.47704354",
"0.47538328",
"0.4747122",
"0.4745001",
"0.47423592",
"0.47387302",
"0.4738686",
"0.47381556",
"0.47367814",
"0.47363776",
"0.47307587",
"0.47273165",
"0.4715116",
"0.47113243",
"0.47076645",
"0.47019854",
"0.4701391",
"0.46992144",
"0.4698032",
"0.46906814",
"0.46896622",
"0.4682968",
"0.46826825",
"0.46821293",
"0.46765462",
"0.46753332",
"0.46737516",
"0.4671455",
"0.46666524",
"0.4665389",
"0.46646634",
"0.46635264",
"0.46597078",
"0.46595764",
"0.46580803",
"0.46580124",
"0.4643962",
"0.46353546"
] | 0.0 | -1 |
To read and return username | public String user_id(int a) throws IOException {
FileInputStream fil = new FileInputStream(new File(""));
XSSFWorkbook workbook = new XSSFWorkbook(fil);
XSSFSheet sheet=workbook.getSheet("Sheet1");
int count=sheet.getLastRowNum();
System.out.println(count);
XSSFRow row =sheet.getRow(a);
XSSFCell cell=row.getCell(0);
String un=cell.getStringCellValue();
return un;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUsername();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"java.lang.String getUserName();",
"String getUserUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUsername();",
"String getUserName();",
"String getUserName();",
"protected static String getUsername() {\n if (username == null || username.isEmpty()) {\n Console console = System.console();\n if (console != null) {\n username = console.readLine(\"Username:\");\n } else {\n throw new UnsupportedOperationException(\n \"Username must be specified\");\n }\n }\n return username;\n }",
"public final String getUsername() {\n\t\treturn username.trim();\n\t}",
"public final String getUser() {\n return username;\n }",
"public java.lang.CharSequence getUsername() {\n return username;\n }",
"public String getUserName();",
"public java.lang.CharSequence getUsername() {\n return username;\n }",
"public final String getUsername() {\n return properties.get(USERNAME_PROPERTY);\n }",
"java.lang.String getUser();",
"String getUser();",
"String getUser();",
"public String getUsername() {\n return username.get();\n }",
"public static String getUsername() { return lblUsername.getText(); }",
"public final String getUsername() {\n return username;\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n }\n }",
"public String getUsername()\r\n\t{\r\n\t\treturn username;\r\n\t}",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String get_username()\r\n\t{\r\n\t\treturn this.username;\r\n\t}",
"private String extractUsername() {\n return SwingUtil.extract(usernameJTextField, Boolean.TRUE);\n }",
"public static String getUserName() {\n\t\treturn readTestData.getkeyData(\"SignUpDetails\", \"Key\", \"Value\", \"userName\");\n\t}",
"public String getUsername() {\n \t\treturn username;\n \t}",
"@AutoEscape\n\t@Override\n\tpublic String getUserName();",
"@AutoEscape\n\t@Override\n\tpublic String getUserName();",
"public String getUserName() {\n return txtUserName().getText();\n }",
"@Override\n\tpublic String getUsername() {\n\t\treturn user.getUserName();\n\t}",
"public String getUsername()\n\t{\n\t\treturn username;\n\t}",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getUsername() {\n Object ref = username_;\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 username_ = s;\n return s;\n }\n }",
"public String getUsername() {\n Object ref = username_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n username_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"@Override\n public String getUsername() {\n String username = mTxtUsername.getText().toString().trim()\n .toLowerCase(Locale.getDefault());\n checkUsername(username);\n return username;\n }",
"public String getUsername() {\r\n return this.username;\r\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getUsername(){\r\n\t\treturn username;\r\n\t}",
"public String getUserName() throws FrameException {\n try {\n byte data[] = (byte[])infoElements.get(new Integer(InfoElement.USERNAME));\n return new String(data);\n } catch (Exception e) {\n throw new FrameException(e);\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n }\n }",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n }\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\n return username;\r\n }",
"public UTF8String getUserName() {\n return this.userName;\n }",
"String getUserName() {\r\n\t\t\treturn username;\r\n\t\t}",
"public String getUsername()\n\t{\n\t\treturn m_username;\n\t}",
"public String getUsername()\r\n {\r\n return this.username; \r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"public String getUsername() {\r\n return username;\r\n }",
"@Override\r\n\tpublic String getUsername() {\n\t\treturn username;\r\n\t}",
"private String getUserName() {\n EditText nameEditText = (EditText) findViewById(R.id.name_edit_text);\n return nameEditText.getText().toString().trim();\n }",
"public String getUsername() {\n\t\treturn this.username;\n\t}",
"@Override\n\tpublic String getUsername() {\n\t\treturn username;\n\t}",
"@Override\n\tpublic String getUsername() {\n\t\treturn username;\n\t}",
"public java.lang.String getUsername() {\n java.lang.Object ref = username_;\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 username_ = s;\n return s;\n }\n }",
"@Override\n\tpublic String getUsername() {\n\t\treturn this.username;\n\t}",
"public String getUsername()\n {\n return this.username;\n }",
"public String getUsername()\n {\n return this.username;\n }",
"@AutoEscape\n\tpublic String getUser_name();",
"public String getUsername()\r\n {\r\n return username;\r\n }",
"public String getUsername()\n {\n return username;\n }",
"public String getUsername()\n {\n return username;\n }",
"public String getUsername() {\n return this.username;\n }",
"public String getUsername() {\n return this.username;\n }",
"public String getUsername() {\n return this.username;\n }",
"public String getName(){\n return username;\n\t}",
"@DISPID(8)\r\n\t// = 0x8. The runtime will prefer the VTID if present\r\n\t@VTID(14)\r\n\tjava.lang.String username();"
] | [
"0.86455095",
"0.86455095",
"0.86455095",
"0.86455095",
"0.86455095",
"0.86455095",
"0.86455095",
"0.86455095",
"0.86455095",
"0.8367106",
"0.8367106",
"0.8367106",
"0.8237511",
"0.8195579",
"0.8195579",
"0.8195579",
"0.8195579",
"0.8195579",
"0.8195579",
"0.8079429",
"0.8079429",
"0.793341",
"0.7777742",
"0.76895714",
"0.76883024",
"0.7661574",
"0.7630237",
"0.7627585",
"0.7622488",
"0.7604387",
"0.7604387",
"0.7587879",
"0.7504488",
"0.74978656",
"0.7482622",
"0.7482622",
"0.7482622",
"0.7482622",
"0.7466104",
"0.74618423",
"0.74618423",
"0.74618423",
"0.74618423",
"0.744966",
"0.74341017",
"0.74200267",
"0.74142796",
"0.7409265",
"0.7409265",
"0.7403987",
"0.73931783",
"0.738742",
"0.7385115",
"0.7385115",
"0.7385115",
"0.73800176",
"0.7375135",
"0.73733705",
"0.73691356",
"0.73628753",
"0.73456264",
"0.73440665",
"0.7343863",
"0.7343863",
"0.7343863",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7336523",
"0.7332502",
"0.73314065",
"0.7326835",
"0.73259264",
"0.7323204",
"0.7316795",
"0.7316795",
"0.73129934",
"0.7310175",
"0.7307442",
"0.72991633",
"0.72991633",
"0.7296084",
"0.72890127",
"0.72885895",
"0.72885895",
"0.7282978",
"0.72808796",
"0.7278371",
"0.7278371",
"0.7276225",
"0.7276225",
"0.7276225",
"0.72707903",
"0.7263502"
] | 0.0 | -1 |
To read and return password | public String password(int a) throws IOException {
FileInputStream fil = new FileInputStream(new File("C:\\Users\\BLTuser.BLT147\\Desktop\\Demo\\TestFramework\\src\\test\\resources\\Testdata\\testdata.xlsx"));
XSSFWorkbook workbook = new XSSFWorkbook(fil);
XSSFSheet sheet=workbook.getSheet("Sheet1");
int count=sheet.getLastRowNum();
System.out.println(count);
XSSFRow row =sheet.getRow(a);
XSSFCell cell=row.getCell(1);
String pass=cell.getStringCellValue();
return pass;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"java.lang.String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"String getPassword();",
"public java.lang.String getPassword();",
"String getUserPassword();",
"public String getPassword();",
"public String getPassword();",
"private static String readPassword() {\n\t\treturn consoleInput.nextLine();\r\n\t}",
"public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}",
"String password();",
"public String readPassword(String password) {\n if (!this.encryptor.isPresent()) {\n return password;\n }\n Matcher matcher = PASSWORD_PATTERN.matcher(password);\n if (matcher.find()) {\n return this.decryptPassword(matcher.group(1));\n } else {\n return password;\n }\n }",
"java.lang.String getPasswd();",
"public String getPassword() throws RemoteException;",
"public char[] getPassword();",
"private String getPassword() {\n\t\tif (null == password || password.isBlank() || password.isEmpty()) {\n\t\t\tConsole cons;\n\t\t\tchar[] passwd = null;\n\t\t\tif ((cons = System.console()) != null) {\n\t\t\t\tpasswd = cons.readPassword(\"[%s]\", \"Password : \");\n\t\t\t\tpassword = Arrays.toString(passwd);\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"Console not found\");\n\t\t\t\tpassword = getProperty(\"password\");\n\t\t\t}\n\t\t}\n\t\treturn password;\n\t}",
"public String Password()// method for getting the password given by user\n\t{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tSystem.out.println(\"enter password: \");\n\t\tString password = sc.next();\n\n\t\treturn password;\n\t}",
"Password getPsw();",
"private String getPasswordFromUser() {\n JPasswordField passField = new JPasswordField(10);\n int action = JOptionPane.showConfirmDialog(null, passField, \"Please enter your password:\", JOptionPane.OK_CANCEL_OPTION);\n\n if (action < 0) {\n System.exit(0);\n }\n\n __logger.info(\"Got password from user\");\n\n return new String(passField.getPassword());\n }",
"public String getPassword() {\n return (String) getObject(\"password\");\n }",
"java.lang.String getPwd();",
"private char[] getPass()\n {\n return password.getPassword();\n }",
"public String getPassword() {return password;}",
"String getTemporaryPassword();",
"public String getPassword()\n \t{\n \t\treturn password;\n \t}",
"public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }",
"public static String getPassword()\n\t{\n\t\tScanner kb = new Scanner(System.in);\n\n\t\tp(\"Guideline for password:\");\n\t\tp(\"The password should be at least six characters long.\");\n\t\tp(\"The password should contain at least one uppercase and at least one lowercase letter.\");\n\t\tp(\"The password should have at least one digit.\");\n\t\tp(\"Enter a password:\");\n\t\treturn kb.nextLine();\n\t}",
"public String getPassword() {\n return getProperty(PASSWORD);\n }",
"public final String getPassword() {\n return properties.get(PASSWORD_PROPERTY);\n }",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword() {\n return txtPassword().getText();\n }",
"public String getPassWord() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"PASSWORD\", null);\n\t}",
"public String getPassword() {\n\treturn strPasswd;\n }",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"@Override\n\tpublic String getPass() {\n\t\treturn password;\n\t}",
"public String getPassword()\r\n {\r\n return password;\r\n }",
"public abstract String getPassword() throws DataServiceException;",
"public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\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 passwd_ = s;\n }\n return s;\n }\n }",
"public String getPassword(){\n \treturn password;\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n }\n }",
"public String get_password()\r\n\t{\r\n\t\treturn this.password;\r\n\t}",
"public String getPassword(){\n return password;\n\t}",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword()\n {\n return password;\n }",
"public String getPassword() {\n return password;\r\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getPassword() {\n \t\treturn password;\n \t}",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getPasswd() {\n java.lang.Object ref = passwd_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n passwd_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword()\n {\n return _password;\n }",
"@Override\n\tpublic String getPassword() {\n\t\treturn user.getUserPwd();\n\t}",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }",
"public String getPassword(){\r\n\t\treturn password;\r\n\t}",
"public String getPassword()\n {\n return this.password;\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n return password;\r\n }",
"public String getPassword() {\r\n\t\t// Get the password\r\n\t\tchar []code = password.getPassword();\r\n\t\t\r\n\t\t// Make the password string\r\n\t\tString password = \"\";\r\n\t\t\r\n\t\t// convert the char[] to string\r\n\t\tfor (char c: code){\r\n\t\t\tpassword += c;\r\n\t\t}\r\n\t\t\r\n\t\t// Return the password string\r\n\t\treturn password;\r\n\t}",
"public String getPassword() {\n Object ref = password_;\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 password_ = s;\n return s;\n }\n }",
"public String getPassword() {\n Object ref = password_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n password_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public String getPassword() { \n return this.password; \n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword() {\n return password;\n }",
"public String getPassword(){\n\t\treturn this.password;\n\t}",
"public java.lang.String getPassword () {\r\n\t\treturn password;\r\n\t}",
"@Override public String getPassword()\r\n {\r\n return password;\r\n }",
"public String getPassword() {\r\n return this.password;\r\n }",
"@Override\n\tpublic String getPassword() {\n\t\treturn user.getPassword();\n\t}",
"public java.lang.String getPassword() {\n java.lang.Object ref = password_;\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 password_ = s;\n return s;\n }\n }",
"public String getPassword() {\n\treturn password;\n}",
"private String extractPassword() {\n return SwingUtil.extract(passwordJPasswordField, Boolean.TRUE);\n }"
] | [
"0.8500434",
"0.8500434",
"0.8500434",
"0.8500434",
"0.8500434",
"0.8500434",
"0.8500434",
"0.8264952",
"0.8264952",
"0.8264952",
"0.8264952",
"0.8264952",
"0.8264952",
"0.8264952",
"0.8264952",
"0.8264952",
"0.82554126",
"0.8127172",
"0.80266345",
"0.80266345",
"0.78799635",
"0.7761267",
"0.77505314",
"0.7742485",
"0.77361554",
"0.77252346",
"0.7620285",
"0.76068705",
"0.760185",
"0.7556706",
"0.7553276",
"0.7536293",
"0.75191647",
"0.74697196",
"0.7460086",
"0.7443468",
"0.74397695",
"0.7438268",
"0.7437119",
"0.742785",
"0.7423682",
"0.74044347",
"0.7397626",
"0.7365967",
"0.7359602",
"0.73560846",
"0.73533696",
"0.73445886",
"0.7337535",
"0.7332501",
"0.7327056",
"0.7324477",
"0.7324477",
"0.7323094",
"0.7317267",
"0.7310884",
"0.7310884",
"0.7307575",
"0.7307575",
"0.7305712",
"0.7302205",
"0.7302205",
"0.72886664",
"0.72886664",
"0.72886664",
"0.72870886",
"0.7281856",
"0.7275747",
"0.72715795",
"0.7263799",
"0.72633255",
"0.72607374",
"0.72607374",
"0.72607374",
"0.7255214",
"0.72526354",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7246207",
"0.7242344",
"0.7242253",
"0.7237984",
"0.7226875",
"0.7225547",
"0.7225547",
"0.7225276",
"0.7222945",
"0.72160065",
"0.72154766",
"0.72120154",
"0.7203397",
"0.72002274",
"0.7190721"
] | 0.0 | -1 |
To read and return lastname | public String lastname(int a) throws IOException {
FileInputStream fil = new FileInputStream(new File("C:\\Users\\BLTuser.BLT147\\Desktop\\Demo\\TestFramework\\src\\test\\resources\\Testdata\\testdata.xlsx"));
XSSFWorkbook workbook = new XSSFWorkbook(fil);
XSSFSheet sheet=workbook.getSheet("Sheet1");
int count=sheet.getLastRowNum();
System.out.println(count);
XSSFRow row =sheet.getRow(a);
XSSFCell cell=row.getCell(2);
String lastn=cell.getStringCellValue();
return lastn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"java.lang.String getLastName();",
"java.lang.String getLastName();",
"String getLastName();",
"String getLastName();",
"public java.lang.String getLastName();",
"public String getLastName();",
"public String getLastname() {\n return (String) get(\"lastname\");\n }",
"public String getLast_name() {\r\n return last_name;\r\n }",
"public String returnLastName() {\n\t\treturn this.registration_lastname.getAttribute(\"value\");\r\n\t}",
"public String getLastName() {\n return lastNameField.getText();\n }",
"@AutoEscape\n\tpublic String getLast_name();",
"public String getLastname() {\n return lastname;\n }",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public String getLastName() { return lastName; }",
"public String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"public java.lang.String getLast_name() {\n return last_name;\n }",
"public String getLastname() {\r\n\t\treturn lastname;\r\n\t}",
"public String getLastName(){\r\n return lastname;\r\n }",
"@AutoEscape\n\tpublic String getLastname();",
"public java.lang.CharSequence getLastName() {\n return last_name;\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"static String getLastName() {\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter last name: \");\n\t\tString ln = s.nextLine();\n\t\treturn ln;\n\t}",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastname() {\n\t\treturn lastname;\n\t}",
"public String getLastName(){\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public synchronized String getLastName()\r\n {\r\n return lastName;\r\n }",
"public String getLastName()\n {\n return this.lastName;\n }",
"public String extractLastName(String fullName) throws IllegalArgumentException {\n // check to make sure there is a space in the name, if there is no space in the name\n // we don't know if there is a first and a last name\n \n if (fullName == null || fullName.isEmpty() || fullName.indexOf(\" \") < LAST_NAME_IDX) {\n throw new IllegalArgumentException(\"Name cannot be null, empty, and must contain a space.\");\n }\n //String lastName = null;\n \n int spaceIndex = fullName.lastIndexOf(\" \");\n String lastName = fullName.substring(spaceIndex, fullName.length());\n \n // alternative\n // String[] parts = fullName.split(\" \");\n \n // Your code goes here. Assign your value to lastName\n return lastName;\n }",
"public String getLastName() {\n \treturn lName;\n }",
"Optional<String> getLastname();",
"public final String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public String getLastName() {\r\n return lastName;\r\n }",
"@AutoEscape\n\tpublic String getLastName();",
"public String getLastName(){\n return(this.lastName);\n }",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName()\n {\n return lastName;\n }",
"public String getLastName()\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the last name.\n\t\treturn lastName;\n\n\t}",
"public String getLastName() {\n return _lastName;\n }",
"public String getLastName() {\n return userItem.getLastName();\n }",
"public String getLastName(){\n\t\treturn this.lastName;\n\t}",
"public String getLastName(){\n\t\treturn lastName;\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\t\t\r\n\t}",
"public java.lang.CharSequence getLastName() {\n return lastName;\n }",
"public final String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n return _lastName;\n }",
"public String getLastName()\n\t{\n\t\treturn lastName;\n\t}",
"public java.lang.String getLastName() {\r\n return lastName;\r\n }",
"public String getLastName() {\r\n // Bouml preserved body begin 00040B82\r\n\t System.out.println(lastName);\r\n\t return lastName;\r\n\r\n // Bouml preserved body end 00040B82\r\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return lastName;\n }",
"@java.lang.Override\n public java.lang.String getLastName() {\n java.lang.Object ref = lastName_;\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 lastName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getLastName() {\n java.lang.Object ref = lastName_;\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 lastName_ = s;\n return s;\n }\n }",
"@java.lang.Override\n public java.lang.String getLastName() {\n java.lang.Object ref = lastName_;\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 lastName_ = s;\n return s;\n }\n }",
"public String getLastName() {\n return this.lastName;\n }",
"public String getLastName()\r\n\t{\r\n\t\treturn lastName.getModelObjectAsString();\r\n\t}",
"public java.lang.String getLastName() {\n java.lang.Object ref = lastName_;\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 lastName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\r\n\t\treturn lastName;\r\n\t}",
"public String getLastName() {\n\t\treturn lastName;\r\n\t}",
"public java.lang.String getLastName() {\n return lastName;\n }",
"public String getLastName() {\n return (String)getAttributeInternal(LASTNAME);\n }",
"public java.lang.String getLastName() {\n java.lang.Object ref = lastName_;\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 lastName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getLastName() {\n java.lang.Object ref = lastName_;\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 lastName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getLastName() {\n\t\t\t\tjava.lang.Object ref = lastName_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\tlastName_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}",
"public String getLastName() {\n\t\tthis.setLastName(this.lastName);\n\t\treturn this.lastName;\n\t}",
"private String getLastName() {\n System.out.println(\"Enter Your Last Name Of First Letter In Capital \");\n return sc.next();\n }",
"java.lang.String getFirstName();",
"java.lang.String getFirstName();",
"public java.lang.String getLastName() {\n\t\t\tjava.lang.Object ref = lastName_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\tlastName_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}",
"public java.lang.String getUserLastName() {\r\n return userLastName;\r\n }",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}",
"public String getLastName() {\n\t\treturn lastName;\n\t}"
] | [
"0.8397752",
"0.8397752",
"0.8271591",
"0.8271591",
"0.8202924",
"0.81339973",
"0.80001986",
"0.7823721",
"0.7807865",
"0.78006226",
"0.77971977",
"0.7775687",
"0.77705914",
"0.7766956",
"0.7757805",
"0.7724346",
"0.7724346",
"0.77231205",
"0.7708508",
"0.7699964",
"0.7682529",
"0.76512444",
"0.76254714",
"0.7620729",
"0.7620729",
"0.7620729",
"0.76090926",
"0.75828904",
"0.75755584",
"0.7568377",
"0.7568377",
"0.75471693",
"0.7546388",
"0.7539877",
"0.7534618",
"0.7523502",
"0.75229776",
"0.7517317",
"0.75099164",
"0.750236",
"0.7500277",
"0.7491381",
"0.74851054",
"0.7481739",
"0.7481261",
"0.74759287",
"0.74466085",
"0.7445908",
"0.74407315",
"0.7437363",
"0.74321115",
"0.74250025",
"0.74240416",
"0.7420762",
"0.7419763",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.74193543",
"0.7414236",
"0.7414236",
"0.74105275",
"0.74088776",
"0.7401532",
"0.7387299",
"0.7384503",
"0.7384503",
"0.7364258",
"0.7346934",
"0.7346708",
"0.7339288",
"0.7339288",
"0.733814",
"0.7325577",
"0.73189735",
"0.73176885",
"0.73176885",
"0.73169714",
"0.7311121",
"0.7273682",
"0.7273682",
"0.7273682",
"0.7273682",
"0.7273682",
"0.7273682"
] | 0.0 | -1 |
To read and return email | public String email(int a) throws IOException {
FileInputStream fil = new FileInputStream(new File("C:\\Users\\BLTuser.BLT147\\Desktop\\Demo\\TestFramework\\src\\test\\resources\\Testdata\\testdata.xlsx"));
XSSFWorkbook workbook = new XSSFWorkbook(fil);
XSSFSheet sheet=workbook.getSheet("Sheet1");
int count=sheet.getLastRowNum();
System.out.println(count);
XSSFRow row =sheet.getRow(a);
XSSFCell cell=row.getCell(3);
String e=cell.getStringCellValue();
return e;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String storedEmail(Context context) throws IOException {\n FileInputStream fis = context.openFileInput(\"email\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new InputStreamReader(fis));\n return in.readLine();\n } finally {\n if (in != null) try { in.close(); } catch (IOException ex) {\n Log.e(\"aqx1010\", \"could not close email file\", ex);\n }\n }\n\n }",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"java.lang.String getEmail();",
"String getUserMail();",
"java.lang.String getUserEmail();",
"public String getEmail() {\r\n // Bouml preserved body begin 00040D82\r\n\t System.out.println(email);\r\n\t return email;\r\n // Bouml preserved body end 00040D82\r\n }",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"String getEmail();",
"private EMail extractEMail() {\n final String emailAddress = extractEMailAddress();\n if (null == emailAddress) {\n return null;\n } else {\n try {\n return EMailBuilder.parse(emailAddress);\n } catch (final EMailFormatException emfx) {\n return null;\n }\n }\n }",
"public String getFromEMail() {\n return fromEMail;\n }",
"private String extractEMailAddress() {\n return SwingUtil.extract(emailJTextField, Boolean.TRUE);\n }",
"String getEmail(int type);",
"public String getEmail() throws Exception {\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(email);\r\n\t\t\t\tStr_email = element.getText();\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 Str_email;\r\n\t\t}",
"public synchronized String getMail()\r\n {\r\n return mail;\r\n }",
"public abstract String getEmail( String [ ] strLineDataArray );",
"public static String validEmail(String message){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n success = checkEmail(line);\n if (!success)\n System.out.println(\"Debes introducir una dirección de correo \"\n + \"válida... \");\n } while(!success);\n return line;\n }",
"public String getEmailInString() {\n\t\tString shortenedBody = StringHelper.shortenString(body, 75, .5);\n\t\tString indentedBody = \"\\t\" + shortenedBody.replace(StringHelper.newline, StringHelper.newline + \"\\t\");\n\t\tString bodyLine = \"(Shortened) Body (html >>> \" + html + \"):\" + StringHelper.newline + indentedBody;\n\n\t\tStringBuilder bodyPartBuilder = new StringBuilder(\"bodyParts:\");\n\t\tfor (MimeBodyPart mimeBodyPart : bodyParts) {\n\t\t\tbodyPartBuilder.append(StringHelper.newline).append(\"\\t\");\n\t\t\ttry {\n\t\t\t\tbodyPartBuilder.append(mimeBodyPart.getFileName());\n\t\t\t} catch (Throwable ex) {\n\t\t\t\t//We don't care if this error is thrown. We don't want this to break anything.\n\t\t\t\tbodyPartBuilder.append(\"N/A\");\n\t\t\t}\n\t\t}\n\t\treturn StringHelper.splitBy(StringHelper.newline,\n\t\t\t\t\t\t\"from: \" + from,\n\t\t\t\t\t\t\"replyTo: \" + StringHelper.splitBy(\", \", replyTo),\n\t\t\t\t\t\t\"to: \" + StringHelper.splitBy(\", \", to),\n\t\t\t\t\t\t\"cc: \" + StringHelper.splitBy(\", \", cc),\n\t\t\t\t\t\t\"bcc: \" + StringHelper.splitBy(\", \", bcc),\n\t\t\t\t\t\t\"subject: \" + subject,\n\t\t\t\t\t\tbodyLine,\n\t\t\t\t\t\tbodyPartBuilder.toString());\n\t}",
"public java.lang.String getEMail () {\r\n\t\treturn eMail;\r\n\t}",
"private void getMailDetailsFromTemplate(String mailTemp, tcEmailOperationsIntf emailOpIntf) throws Exception {\n\t\tHashMap hashMap = new HashMap();\n\t\thashMap.put(\"Email Definition.Name\", mailTemp);\n\t\ttry {\n\t\t\temailOpIntf = Platform.getService(tcEmailOperationsIntf.class);\n\t\t\ttcResultSet mailSet = emailOpIntf.findEmailDefinition(hashMap);\n\t\t\tsubject = mailSet.getStringValue(\"Email Definition.Subject\");\n\t\t\tlogger.info(className+\"Mail Subject Original : \" + subject);\n\t\t\tbodyText = mailSet.getStringValue(\"Email Definition.Body\");\n\t\t\tlogger.info(className+\"Mail Body Original : \" + bodyText);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.info(\"Error occured while reading mail templete \"+ mailTemp);\n\t\t}\n\t}",
"String getFirstAlertMailBody( );",
"public String readEmail(Connection conn, String emailId) throws Exception {\n StringBuffer sb = new StringBuffer();\r\n String query = \"SELECT * from oa_email,oa_email_body where oa_email.BODY_ID=oa_email_body.SEQ_ID and oa_email.SEQ_ID='\"+emailId+\"'\";\r\n Statement stm2 = null;\r\n ResultSet rs2 = null;\r\n try {\r\n stm2 = conn.createStatement();\r\n rs2 = stm2.executeQuery(query);\r\n YHPersonLogic logic = new YHPersonLogic();\r\n if (rs2.next()){\r\n int fromId = rs2.getInt(\"FROM_ID\");\r\n String toIdStr = rs2.getString(\"TO_ID\");\r\n String copyToId = rs2.getString(\"COPY_TO_ID\");\r\n String subjectStr = rs2.getString(\"SUBJECT\");\r\n subjectStr = subjectStr.replaceAll(\"\\\"\", \"“\");\r\n subjectStr = subjectStr.replaceAll(\"'\", \"’\");\r\n Timestamp sendTime = rs2.getTimestamp(\"SEND_TIME\");\r\n String dateStr = YHUtility.getDateTimeStr(sendTime);\r\n String attId = rs2.getString(\"ATTACHMENT_ID\");\r\n attId = (attId == null ? \"\":attId); \r\n String attName = rs2.getString(\"ATTACHMENT_NAME\");\r\n attName = (attName == null ? \"\":attName);\r\n String important = rs2.getString(\"important\");\r\n String content = rs2.getString(\"COMPRESS_CONTENT\");\r\n if (YHUtility.isNullorEmpty(content)) {\r\n content = rs2.getString(\"CONTENT\");\r\n }\r\n content = content.replaceAll(\"\\\"\", \"“\");\r\n content = content.replaceAll(\"'\", \"’\");\r\n content = content.replaceAll(\"\\\\s\", \"\");\r\n String fromName = this.getUserName(conn, fromId);\r\n String toName = logic.getNameBySeqIdStr(toIdStr, conn);\r\n String copyIdName = logic.getNameBySeqIdStr(copyToId, conn);\r\n sb.append(\"{\");\r\n sb.append(\"emailId:'\" + emailId +\"'\");\r\n sb.append(\",important:'\" + important +\"'\");\r\n sb.append(\",subject:'\" + subjectStr +\"'\");\r\n sb.append(\",attId:'\" + attId +\"'\");\r\n sb.append(\",attName:'\" + attName +\"'\");\r\n sb.append(\",content:'\" + content +\"'\");\r\n sb.append(\",sendTime:'\" + dateStr +\"'\");\r\n sb.append(\",fromName:'\" + fromName +\"'\");\r\n sb.append(\",toName:'\" + toName +\"'\");\r\n sb.append(\",copyIdName:'\" + copyIdName +\"'\");\r\n sb.append(\"}\");\r\n }\r\n } catch(Exception ex) {\r\n throw ex;\r\n } finally {\r\n YHDBUtility.close(stm2, rs2, null); \r\n }\r\n return sb.toString();\r\n}",
"private String getPlayerMail() {\n EditText mail = (EditText) findViewById(R.id.mail_edittext_view);\n return mail.getText().toString();\n }",
"private EmailAddress getEmail(final String mail) {\r\n\t\treturn (EmailAddress) this.getSingleResult(this.em.createNativeQuery(\"select * from emailaddress WHERE eMailAddress ='\" + mail + \"'\",\r\n\t\t\t\tEmailAddress.class));\r\n\t}",
"public String getEmailBodyContent(AppAccount accModel, String fileName) throws Exception {\r\n\t\tlogger.debug(\"Reading Reg Email content started\");\r\n\t\tBufferedReader br = new BufferedReader(new FileReader(fileName));\r\n\t\tStringBuffer body = new StringBuffer();\r\n\t\tString line = br.readLine();\r\n\t\twhile (line != null) {\r\n\t\t\tif (line != null && !\"\".equals(line) && !\"<br/>\".equals(line)) {\r\n\t\t\t\t// process\r\n\t\t\t\tif (line.contains(\"USER_NAME\")) {\r\n\t\t\t\t\tline = line.replace(\"USER_NAME\", accModel.getFirstName() + \" \" + accModel.getLastName());\r\n\t\t\t\t}\r\n\t\t\t\tif (line.contains(\"APP_URL\")) {\r\n\t\t\t\t\tline = line.replace(\"APP_URL\", \"<a href='http://localhost:7070/IES/'>IES URL</a>\");\r\n\t\t\t\t}\r\n\t\t\t\tif (line.contains(\"APP_USER_EMAIL\")) {\r\n\t\t\t\t\tline = line.replace(\"APP_USER_EMAIL\", accModel.getEmail());\r\n\t\t\t\t}\r\n\t\t\t\tif (line.contains(\"APP_USER_PWD\")) {\r\n\t\t\t\t\tline = line.replace(\"APP_USER_PWD\", accModel.getPassword());\r\n\t\t\t\t}\r\n\t\t\t\t// Adding processed line to SB body\r\n\t\t\t\tbody.append(line);\r\n\t\t\t}\r\n\t\t\t// read next line\r\n\t\t\tline = br.readLine();\r\n\t\t}\r\n\t\t// closing br\r\n\t\tbr.close();\r\n\t\tlogger.debug(\"Reading Reg Email content Ended\");\r\n\t\tlogger.info(\"Reg Email body parsing completed\");\r\n\t\treturn body.toString();\r\n\t}",
"public java.lang.String getEmailAddress();",
"String getOtherAlertMailBody( );",
"String getEmailLocation();",
"String getPlayerMail() {\r\n EditText editText = (EditText) findViewById(R.id.mail_edit_text_view);\r\n return editText.getText().toString();\r\n }",
"String getPasswordExpiredMailBody( );",
"public String adcionarEmail() {\n\t\tpessoa.adicionaEmail(email);\n\t\tthis.email = new Email();\n\t\treturn null;\n\t}",
"String getExpirationtMailBody( );",
"private String getEmail(){\n System.out.println(\"Enter The Email Address\");\n return sc.next();\n }",
"private String readFile(File file, int flag) throws IOException {\n\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\n\t\tString senderDomain = \"\";\n\t\tString subject = \"\";\n\t\tint nonCharNum = -1;\n\t\tint sendTime = -1;\n\t\tBoolean firstLine = true;\n\t\tBoolean base64 = false;\n\t\tBoolean reply = false;\n\t\tBoolean firstSpace = true;\n\t\tString emailContent = \"\";\n\t\tString emailContentLine = new String();\n\t\twhile ((emailContentLine = reader.readLine()) != null) {\n\t\t\tif (emailContentLine.equals(\"-- \"))\n\t\t\t\tbreak;\n\t\t\tif (emailContentLine.startsWith(\"From \") && (firstLine == true)) {\n\t\t\t\tsenderDomain = emailContentLine.split(\" \")[1].split(\"\\\\.\")[emailContentLine\n\t\t\t\t\t\t.split(\" \")[1].split(\"\\\\.\").length - 1].toLowerCase();\n\t\t\t}\n\t\t\tif (emailContentLine.startsWith(\"Return-Path: \")) {\n\t\t\t\tif (emailContentLine.split(\" \")[1].split(\"\\\\.\")[emailContentLine\n\t\t\t\t\t\t.split(\" \")[1].split(\"\\\\.\").length - 1]\n\t\t\t\t\t\t.replaceAll(\"\\\\W+\", \"\").toLowerCase().length() <= 3)\n\t\t\t\t\tsenderDomain = emailContentLine.split(\" \")[1].split(\"\\\\.\")[emailContentLine\n\t\t\t\t\t\t\t.split(\" \")[1].split(\"\\\\.\").length - 1].replaceAll(\n\t\t\t\t\t\t\t\"\\\\W+\", \"\").toLowerCase();\n\t\t\t}\n\t\t\tif ((emailContentLine.startsWith(\"From \") && (firstLine == true))\n\t\t\t\t\t|| emailContentLine.startsWith(\"Delivery-Date\")) {\n\t\t\t\tint hour = Integer\n\t\t\t\t\t\t.parseInt(emailContentLine.split(\" \")[emailContentLine\n\t\t\t\t\t\t\t\t.split(\" \").length - 2].split(\":\")[0]);\n\t\t\t\tsendTime = hour;\n\t\t\t}\n\t\t\tif (emailContentLine.startsWith(\"Date: \")\n\t\t\t\t\t&& (emailContentLine.split(\"\\\\s+\").length == 7)) {\n\t\t\t\tint hour = 0;\n\t\t\t\ttry {\n\t\t\t\t\thour = Integer.parseInt(emailContentLine.split(\"\\\\s+\")[5]\n\t\t\t\t\t\t\t.split(\":\")[0]);\n\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tSystem.out.println(file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t\tsendTime = hour;\n\t\t\t}\n\t\t\tif (emailContentLine.startsWith(\"Subject:\")) {\n\t\t\t\tsubject = emailContentLine.substring(9);\n\t\t\t\tif (subject.startsWith(\"Re:\")) {\n\t\t\t\t\treply = true;\n\t\t\t\t\tsubject = subject.substring(5);\n\t\t\t\t}\n\t\t\t}\n\t\t\temailContent += emailContentLine + \"\\n\";\n\t\t\tfirstLine = false;\n\t\t\tif (emailContentLine.length() == 0) {\n\t\t\t\tif (firstSpace == true)\n\t\t\t\t\temailContent = subject + \"\\n\";\n\t\t\t\tfirstSpace = false;\n\t\t\t}\n\t\t\tif (emailContentLine.contains(\"base64\")) {\n\t\t\t\temailContent = \"\";\n\t\t\t\tbase64 = true;\n\t\t\t}\n\t\t}\n\t\tif (base64 == true) {\n\t\t\temailContent = emailContent.replace(\" \", \"+\");\n\t\t\temailContent = Jsoup.parse(\n\t\t\t\t\tnew String(Base64.decodeBase64(emailContent.getBytes())))\n\t\t\t\t\t.text();\n\t\t}\n\t\temailContent = Jsoup.parse(emailContent).text().replaceAll(\" \", \" \");\n\t\tint orginalLengh = emailContent.length();\n\t\temailContent = emailContent.replaceAll(\"[^a-zA-Z0-9$]+\", \" \");\n\t\temailContent = emailContent.replace(\"$\", \"$ \");\n\t\tnonCharNum = (int) (((double) (orginalLengh - emailContent.length()) / orginalLengh) * 10);\n\t\tif (flag == 0) {\n\t\t\thamSenderDomain = new String();\n\t\t\thamTime = new String();\n\t\t\thamReply = new String();\n\t\t\thamNonCharNum = new String();\n\t\t\thamSenderDomain = senderDomain;\n\t\t\thamTime = String.valueOf(sendTime);\n\t\t\thamReply = reply.toString();\n\t\t\thamNonCharNum = String.valueOf(nonCharNum);\n\t\t} else if (flag == 1) {\n\t\t\tspamSenderDomain = new String();\n\t\t\tspamTime = new String();\n\t\t\tspamReply = new String();\n\t\t\tspamNonCharNum = new String();\n\t\t\tspamSenderDomain = senderDomain;\n\t\t\tspamTime = String.valueOf(sendTime);\n\t\t\tspamReply = reply.toString();\n\t\t\tspamNonCharNum = String.valueOf(nonCharNum);\n\t\t} else if (flag == 2) {\n\t\t\ttestSenderDomain = new String();\n\t\t\ttestTime = new String();\n\t\t\ttestReply = new String();\n\t\t\ttestNonCharNum = new String();\n\t\t\ttestSenderDomain = senderDomain;\n\t\t\ttestTime = String.valueOf(sendTime);\n\t\t\ttestReply = reply.toString();\n\t\t\ttestNonCharNum = String.valueOf(nonCharNum);\n\t\t}\n\t\treader.close();\n\n\t\treturn emailContent;\n\t}",
"public java.lang.String getEmailAddress()\r\n\t{\r\n\t\tString result = \"\";\r\n\t\tint length = emailAddress.length();\r\n\t\t\r\n\t\tif (!locked)\r\n\t\t\tresult = emailAddress;\r\n\t\telse\r\n\t\t{\r\n\t\t\tfor(int i = 1; i < length; i++)\r\n\t\t\t{\r\n\t\t\t\t//char asterisk = emailAddress.charAt(i);\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\t\r\n\t\t}\r\n\t\treturn result;\r\n\t\t\t\r\n\t}",
"@GET\n\t@Produces(MediaType.TEXT_PLAIN)\n\tpublic Object get() throws MalformedURLException, IOException {\n\t\tURI uri = URI.create(request.getRequestURL().toString());\n\t\tURI serviceUri = uri.resolve(\"mail/multipart\");\n\t\ttry(InputStream is = serviceUri.toURL().openStream()) {\n\t\t\treturn StreamUtil.readString(is);\n\t\t}\n\t}",
"public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }",
"public void testProcessReturnedMail() throws Exception {\n \n logln(\"\\n==== Process Returned Mail ====\\n\");\n \n //login\n loginAFSCME();\n \n //go to the 'Process Returned Mail' page.\n selectLink(\"Process Returned Mail\");\n \n //fill in the parameters\n setParameter(\"addressIds\", \"120\\n221\" );\n \n submit(\"submit\");\n //logout\n selectLink(\"LOGOUT\");\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getEmail() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(EMAIL_PROP.get());\n }",
"public String getEmailById(long emailID) {\n SQLiteDatabase db_read = ClientBaseOpenHelper.getHelper(mContext).getReadableDatabase();\n Cursor cursor = null;\n String email = \"\";\n\n try {\n cursor = db_read.query(ClientBaseOpenHelper.TABLE_EMAILS,\n new String[]{ClientBaseOpenHelper.EMAIL},\n BaseColumns._ID + \"=\" + emailID, null, null, null, null);\n while (cursor.moveToNext()) {\n email = cursor.getString(cursor.getColumnIndex(ClientBaseOpenHelper.EMAIL));\n }\n return email;\n\n } catch (Exception e) {\n Log.e(TAG, e.getMessage());\n return email;\n\n } finally {\n if (cursor != null && !cursor.isClosed()) {\n cursor.close();\n }\n if (db_read != null && db_read.isOpen()) {\n db_read.close();\n }\n if (ClientBaseOpenHelper.getHelper(mContext) != null) {\n ClientBaseOpenHelper.getHelper(mContext).close();\n }\n }\n }",
"public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}",
"public String getEmail(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, EMAIL);\n\t}",
"public String geteMail() {\n return eMail;\n }",
"public String geteMail() {\n return eMail;\n }",
"public gov.nih.nlm.ncbi.www.soap.eutils.efetch_pmc.Email getEmail() {\r\n return email;\r\n }",
"public String getEmailMessage(Agent agent);",
"public Email getEmail()\r\n {\r\n /**\r\n * Ya hemos leido. Se devuelve una nueva instancia en cada envio de mail para evitar problemas de sincronizacion.\r\n */\r\n return createEmailInstance();\r\n }",
"@AutoEscape\n\tpublic String getEmail_address();",
"String getCustomerEmail(String bookingRef);",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getEmail() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(EMAIL_PROP.get());\n }",
"public String returnEmail() {\n\t\treturn this.registration_email.getAttribute(\"value\");\r\n\t}",
"public static void main(String[] args) throws MimeException, IOException {\r\n\t\tMimeAnalysis ma=new MimeAnalysis();\r\n\t\tList<String> list = ma.getEmailTextList(null);\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t\t\tSystem.out.println(list.get(i));\r\n\t\t}\r\n\t}",
"public String getEmailBodyString() {\r\n return this.emailBodyString;\r\n }",
"public java.lang.String getMail() {\n return mail;\n }",
"public synchronized String getUserString(String email) {\r\n User user = email2user.get(email);\r\n return (user == null) ? null : user2xml.get(user);\r\n }",
"public String getEmail(int n) {\r\n\t\tif(email.size()>n && n>=0)\r\n\t\t\treturn email.get(n);\r\n\t\telse\r\n\t\t\treturn null;\t\t\r\n\t}",
"private String getPlainFrom(MimeMessage m)\r\n\t{\r\n\t\tString fromEmail = null;\r\n\t\ttry\r\n\t\t{\r\n\t fromEmail = m.getFrom()[0].toString().toLowerCase();\r\n\t int idx;\r\n\t if ((idx = fromEmail.indexOf('<')) != -1)\r\n\t \tfromEmail = fromEmail.substring(++idx, fromEmail.indexOf('>', idx));\r\n\t\t}\r\n\t\tcatch (MessagingException e) {}\r\n return fromEmail;\r\n\t}",
"public static String getExistingEmail() throws Exception {\n return executeQuery(\"SELECT * FROM players;\", \"us_email\");\n }",
"private C_ReadMail(Builder builder) {\n super(builder);\n }",
"public String getUserEmailAdress() throws Exception\r\n {\n return null;\r\n }",
"public String getEmail() {return email; }",
"public void read() {\r\n\t\tProperties props = new Properties();\r\n\t\ttry {\r\n\t\t\t// Read smtp.\r\n\t\t\tprops.load(new FileInputStream(\r\n\t\t\t\t\t\"C:\\\\Users\\\\danielnistreanu\\\\git\\\\t3bluecircles\\\\src\\\\test\\\\resources\\\\smtpZimbra.properties\"));\r\n\t\t\tSession session = Session.getDefaultInstance(props, null);\r\n\t\t\t// Login.\r\n\t\t\tStore store = session.getStore(\"imaps\");\r\n\t\t\tstore.connect(\"mail.evozon.com\", \"[email protected]\", \"Asdf1234!@#$\");\r\n\t\t\t// Get messages number.\r\n\t\t\tFolder inbox = store.getFolder(\"inbox\");\r\n\t\t\tinbox.open(Folder.READ_ONLY);\r\n\t\t\tint messageCount = inbox.getMessageCount();\r\n\r\n\t\t\t// Part where using for loop we check messages list and print\r\n\t\t\t// content.\r\n\r\n\t\t\tSystem.out.println(\"Total Messages:- \" + messageCount);\r\n\t\t\tMessage[] messages = inbox.getMessages();\r\n\t\t\tfor (int i = 0; i < messages.length; i++) {\r\n\t\t\t\tMessage message = messages[i];\r\n\t\t\t\tSystem.out.println(\"---------------------------------\");\r\n\t\t\t\tSystem.out.println(\"Email Number \" + (i + 1));\r\n\t\t\t\tSystem.out.println(\"Subject: \" + message.getSubject());\r\n\t\t\t\tSystem.out.println(\"From: \" + message.getFrom()[0]);\r\n\t\t\t\tSystem.out.println(\"Text: \" + getTextFromMessage(message));\r\n\t\t\t\twriteToFile(getTextFromMessage(message));\r\n\t\t\t}\r\n\t\t\tinbox.close(true);\r\n\t\t\tstore.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public String getAlternateEmail() { return alternateEmail; }",
"Object getMailhost();",
"public java.lang.String getEmail () {\n\t\treturn email;\n\t}",
"com.google.protobuf.ByteString getEmailBytes();",
"@Override\r\n\tpublic String getEmail() {\n\t\treturn email;\r\n\t}",
"public java.lang.String getEmail() {\r\n return email;\r\n }",
"String getUserMainEmail( int nUserId );",
"@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n return s;\n }\n }",
"public String getEmail()\r\n {\r\n return email;\r\n }",
"public String getEmail()\n\t{\n\t\treturn this._email;\n\t}",
"public String getMail() {\r\n\t\treturn mail;\r\n\t}",
"public String getEmail()\r\n {\r\n return getAttribute(\"email\");\r\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n email_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public String getEmailAddress();",
"private S_ReadMail(Builder builder) {\n super(builder);\n }",
"public String getEmail() { return email; }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n }\n }",
"public String getEmail()\n {\n return emailAddress;\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public java.lang.String getEmail() {\n java.lang.Object ref = email_;\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 email_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public Email getEmail() {\n return email;\n }",
"public String getEmail()\n {\n return email;\n }",
"public String getEmail()\n {\n return email;\n }",
"public String getEmail() {return email;}",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"public java.lang.String getEmail() {\n return email;\n }",
"private String getEmailAddressForResource(long resourceId)\r\n throws LateDeliverablesProcessingException {\r\n Resource resource;\r\n\r\n try {\r\n resource = resourceManager.getResource(resourceId);\r\n } catch (ResourcePersistenceException e) {\r\n throw new LateDeliverablesProcessingException(\"Fails to get resource.\", e);\r\n }\r\n\r\n if (resource == null) {\r\n throw new LateDeliverablesProcessingException(\"Resource with id[\" + resourceId\r\n + \"] not exist.\");\r\n }\r\n\r\n long userId = resource.getUserId();\r\n\r\n ExternalUser user;\r\n\r\n try {\r\n user = userRetrieval.retrieveUser(userId);\r\n } catch (RetrievalException e) {\r\n throw new LateDeliverablesProcessingException(\"Fails to retrieve external user for id : \"\r\n + userId, e);\r\n }\r\n\r\n if (user == null) {\r\n throw new LateDeliverablesProcessingException(\"External user with id[\" + userId\r\n + \"] not exist.\");\r\n }\r\n\r\n String email = user.getEmail();\r\n\r\n if (email == null) {\r\n throw new LateDeliverablesProcessingException(\"email address of resource is null.\");\r\n }\r\n\r\n return email;\r\n }",
"@AutoEscape\n\tpublic String getFromEmailAddress();",
"public final String getEmail() {\n\t\treturn email;\n\t}"
] | [
"0.7339799",
"0.7292601",
"0.7292601",
"0.7292601",
"0.7292601",
"0.7292601",
"0.7292601",
"0.7248349",
"0.687675",
"0.6867777",
"0.6845681",
"0.6845681",
"0.6845681",
"0.6845681",
"0.6845681",
"0.67426205",
"0.668665",
"0.6657711",
"0.66377145",
"0.66060585",
"0.65910274",
"0.656712",
"0.6556885",
"0.652577",
"0.6499559",
"0.64959997",
"0.6474868",
"0.6449381",
"0.6371711",
"0.635092",
"0.63260376",
"0.6322743",
"0.6318609",
"0.6306529",
"0.6277428",
"0.6277037",
"0.6276909",
"0.62747425",
"0.62288195",
"0.6228523",
"0.6194354",
"0.6176789",
"0.61662155",
"0.61561286",
"0.61506146",
"0.6111941",
"0.6110487",
"0.6110487",
"0.6104128",
"0.6104128",
"0.60918236",
"0.60876876",
"0.6084185",
"0.60782707",
"0.6067",
"0.60630155",
"0.6056176",
"0.60556173",
"0.6048758",
"0.6046473",
"0.60441715",
"0.604236",
"0.6037778",
"0.60361964",
"0.6032787",
"0.6031212",
"0.60259086",
"0.6022233",
"0.6020882",
"0.601025",
"0.5994179",
"0.5988163",
"0.59825796",
"0.5980131",
"0.59727675",
"0.59630984",
"0.5959418",
"0.59567875",
"0.594606",
"0.5940995",
"0.5938375",
"0.59349406",
"0.5932287",
"0.59107405",
"0.59057176",
"0.59057176",
"0.59057176",
"0.5901217",
"0.59007853",
"0.59007853",
"0.58941317",
"0.58889896",
"0.58889896",
"0.58626246",
"0.5858385",
"0.5858385",
"0.5858385",
"0.5858385",
"0.5856018",
"0.585452",
"0.58510023"
] | 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() {
jPanel1 = new javax.swing.JPanel();
jTabbedPane1 = new javax.swing.JTabbedPane();
jPanel2 = new javax.swing.JPanel();
jLabel1 = new javax.swing.JLabel();
jComboBox1 = new javax.swing.JComboBox<>();
jPanel3 = new javax.swing.JPanel();
jLabel5 = new javax.swing.JLabel();
jLabel6 = new javax.swing.JLabel();
jsSingular = new javax.swing.JSpinner();
jsInstituicao = new javax.swing.JSpinner();
jPanel4 = new javax.swing.JPanel();
jLabel4 = new javax.swing.JLabel();
jsEstudantesSala = new javax.swing.JSpinner();
jLabel3 = new javax.swing.JLabel();
jsFaltas = new javax.swing.JSpinner();
jPanel5 = new javax.swing.JPanel();
jbFechar = new javax.swing.JButton();
jbsalvar = new javax.swing.JButton();
jbEditar = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jLabel1.setText("Curso:");
jComboBox1.setFont(new java.awt.Font("Tahoma", 1, 11)); // NOI18N
jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "INFORMATICA" }));
jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Precos"));
jLabel5.setText("Preco Singular");
jLabel6.setText("Preco Instituicao");
javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
jPanel3.setLayout(jPanel3Layout);
jPanel3Layout.setHorizontalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel5)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jsInstituicao, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jsSingular, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel3Layout.setVerticalGroup(
jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel3Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel5)
.addComponent(jsSingular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel6)
.addComponent(jsInstituicao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), "Outros"));
jLabel4.setText("Numero maximo de estudantes por Sala");
jLabel3.setText("Numero maximo de faltas");
javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
jPanel4.setLayout(jPanel4Layout);
jPanel4Layout.setHorizontalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addGap(22, 22, 22)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel3)
.addComponent(jLabel4))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jsEstudantesSala)
.addComponent(jsFaltas, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(26, Short.MAX_VALUE))
);
jPanel4Layout.setVerticalGroup(
jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel4Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel4)
.addComponent(jsEstudantesSala, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel3)
.addComponent(jsFaltas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
jPanel5.setLayout(jPanel5Layout);
jPanel5Layout.setHorizontalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
jPanel5Layout.setVerticalGroup(
jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 100, Short.MAX_VALUE)
);
javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
jPanel2.setLayout(jPanel2Layout);
jPanel2Layout.setHorizontalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(30, 30, 30)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
jPanel2Layout.setVerticalGroup(
jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGap(28, 28, 28)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel1)
.addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(82, 82, 82)
.addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
jTabbedPane1.addTab("Curso", jPanel2);
jbFechar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icones/remover.png"))); // NOI18N
jbFechar.setText("Fechar");
jbsalvar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/icones/ok.png"))); // NOI18N
jbsalvar.setText("Salvar");
jbEditar.setText("Editar");
javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
jPanel1.setLayout(jPanel1Layout);
jPanel1Layout.setHorizontalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 559, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jbEditar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbsalvar)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jbFechar)
.addContainerGap())
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 267, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jbFechar)
.addComponent(jbsalvar)
.addComponent(jbEditar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addContainerGap())
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
pack();
setLocationRelativeTo(null);
} | {
"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 quotaGUI() {\n initComponents();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public Oddeven() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Magasin() {\n initComponents();\n }",
"public intrebarea() {\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 LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"public kunde() {\n initComponents();\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 MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\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 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 FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\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 MiFrame2() {\n initComponents();\n }",
"public IssueBookForm() {\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 Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public JFrmPrincipal() {\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 POS1() {\n initComponents();\n }",
"public CreateAccount_GUI() {\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.7319396",
"0.7290941",
"0.7290941",
"0.7290941",
"0.7285927",
"0.7248002",
"0.72139066",
"0.72086275",
"0.71958303",
"0.718997",
"0.7184516",
"0.7159095",
"0.71481097",
"0.709288",
"0.70806605",
"0.70578784",
"0.6986726",
"0.6977067",
"0.6955257",
"0.6954392",
"0.6945326",
"0.69436216",
"0.6935779",
"0.69320637",
"0.6928225",
"0.6924907",
"0.69248605",
"0.6911609",
"0.6911109",
"0.6892906",
"0.6892066",
"0.68918383",
"0.6891177",
"0.6889087",
"0.6883209",
"0.6882372",
"0.6880651",
"0.68782973",
"0.6876634",
"0.6874696",
"0.68711734",
"0.6859314",
"0.68565166",
"0.6855607",
"0.68552643",
"0.6854565",
"0.68534696",
"0.68530536",
"0.68530536",
"0.6843682",
"0.6836637",
"0.6836613",
"0.6829145",
"0.68281287",
"0.682634",
"0.6824281",
"0.68238854",
"0.681735",
"0.6816949",
"0.6811127",
"0.68091583",
"0.6808792",
"0.680855",
"0.6808137",
"0.6802665",
"0.67954504",
"0.67941535",
"0.6793186",
"0.6791855",
"0.67899567",
"0.67891306",
"0.678766",
"0.67817825",
"0.67669976",
"0.67660517",
"0.6764966",
"0.67571455",
"0.6755968",
"0.6752885",
"0.6751322",
"0.6742087",
"0.6739845",
"0.673701",
"0.6736383",
"0.67338026",
"0.6727401",
"0.67262983",
"0.67209303",
"0.67158926",
"0.6715857",
"0.67147917",
"0.67091477",
"0.6708007",
"0.6704485",
"0.6701657",
"0.67003953",
"0.6699588",
"0.6698673",
"0.66944015",
"0.6690715",
"0.6689867"
] | 0.0 | -1 |
1. get all entries when Near Cache is full, so some values will come from Near Cache | private void assertNoStaleDataExistInNearCache(IMap<Integer, Integer> map) {
Map<Integer, Integer> fromNearCache = getAllEntries(map);
// 2. clear Near Cache
((NearCachedMapProxyImpl) map).getNearCache().clear();
// 3. get all values when Near Cache is empty, these requests
// will go directly to underlying IMap because Near Cache is empty
Map<Integer, Integer> fromIMap = getAllEntries(map);
for (int i = 0; i < ENTRY_COUNT; i++) {
assertEquals(fromIMap.get(i), fromNearCache.get(i));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testCoh3710_getAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertEquals(NullImplementation.getMap(),\n getNamedCache(getCacheName0()).getAll(\n Collections.singleton(Integer.valueOf(1))));\n }\n });\n }",
"long getCacheHits();",
"@Override\n\tpublic Set<T> retrieveAllItems() {\n\t\treturn cache;\n\t}",
"@Override\n public List<CacheObject<K, V>> getAll(){\n return new ArrayList<>(this.cache.values());\n }",
"public void updateCache() {\n\n log.info(\"Updating solar flare cache\");\n Date fallbackStartDate = DateHelper.getFallbackDate();\n solarFlareRepository.count()\n .map(total -> {\n if (total > 0) {\n solarFlareRepository.findTopByBeginTimeIsNotNullOrderByBeginTimeDesc()\n .map(solarFlare -> {\n log.info(\"Entries exist, performing incremental update\");\n log.info(\n \"Last entry found at {}\",\n DateHelper.getPrintableString(solarFlare.getBeginTime())\n );\n collectForRange(solarFlare.getBeginTime(), null);\n return solarFlare;\n })\n .subscribe();\n } else {\n log.info(\"No entries found, performing a full import\");\n collectForRange(fallbackStartDate, null);\n }\n return total;\n })\n .subscribe();\n }",
"private List[] query() {\n\t\tList[] result = new ArrayList[topics.length];\n\t\tint i = 0;\n\t\tfor(String topic:topics) {\n\t\t\tList<byte[]> bocache = fcache.getList(topic);\n\t\t\tif(bocache == null || bocache.isEmpty()) {\n\t\t\t\tlog.info(\"topic {} has no message in cache\",topic);\n\t\t\t}else {\n\t\t\t\tresult[i++] = bocache;\n\t\t\t}\t\t\n\t\t}\n\t\treturn result;\n\t}",
"public void cacheResult(java.util.List<DataEntry> dataEntries);",
"List<Link> findLinkByCache();",
"private JSONArray getAllFromCache(){\n\n JSONArray response = new JSONArray();\n String cacheResponse = this.cacheConnector.getFromCache(policy.\n getCachePolicy(\"Policy Value\"));\n\n if(cacheResponse !=\"-1\"){\n System.out.println(\"Sucessfully go cache content!\");\n System.out.println(cacheResponse);\n response = new JSONArray(cacheResponse); //constructs a json array from string\n System.out.println(\"JSON Result Queried from Cache\");\n }\n //If the policy asks to query from cache but it is not present, then add to cache.\n else if (cacheResponse ==\"-1\") {\n System.out.println(\"Failed to retrieve cache content\");\n }\n\n return response;\n }",
"private void getCache(Context context) throws IOException {\n\t\t // Read file from distributed caches - each line is a item/itemset with its frequent\n\n \t// get caches files.\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tSystem.out.println(\"SETUP ------ MAPPER ----------- GET FREQUENT ITEMS--------------\");\n\t\t\n\t\t\n\t\t// URI to locate cachefile, ex URI a = new URI(\"http://www.foo.com\");\n\t\tList<URI> uris = Arrays.asList(context.getCacheFiles());\n\t\t\n\t\tSystem.out.println(\"Reading cached files\");\n\t\t// read cache files which contains candidates?\n\t\t\n\t\tnItems = 0;\n\t\t\n\t\tfor (URI uri : uris) {\n\t\t\tPath p = new Path(uri);\n\t\t\tSystem.out.println(\"Loading \" + uri.toString());\n\t\t\tFileSystem fs = FileSystem.get(context.getConfiguration());\n\t\t\tInputStreamReader ir = new InputStreamReader(fs.open(p));\n\t\t\tBufferedReader data = new BufferedReader(ir);\n\t \twhile (data.ready()) { \t\t\n\t \t\tString line=data.readLine();\n\t \t\tif (line.matches(\"\\\\s*\")) continue; // be friendly with empty lines\n\t \t\tString[] numberStrings = line.split(\"\\t\");\n\t \t\t\n \n\t \t\tint frequentItem = Integer.parseInt(numberStrings[0]);\n \t\t\tif (!hashItems.containsKey(frequentItem)) {\n\t \t\t\t\thashItems.put(frequentItem, nItems);\n\t \t\t\t\tnItems++;\n\t \t\t\t}\n\t \t\t}\n\t \t\t\n\t \t} \n\n }",
"java.util.List<com.google.protobuf.ByteString> getCachedList();",
"public static void loadAllAdditionalCachedObjectList() {\n\n\t\t// TODO Completar cuando sea necesario.\n\n\t}",
"List<CacheHealth> getCacheHealth();",
"public static Map<String,String> getGeoTargetsFromCache(){\n\t\tMap<String,String> dataMap=null; \t\n \tif(memcache !=null && memcache.contains(ALL_GEO_TARGETS_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_GEO_TARGETS_KEY);\n \t\tlog.info(\"Memcache getGeoTargetsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}",
"@RequestMapping(value = \"/cache\", method = RequestMethod.GET)\n public ResponseEntity<List<LocationEntity>> getCache(){\n ResponseEntity<List<LocationEntity>> responseEntity = null;\n\n // Get last 10 geocode lookups\n List<LocationEntity> location = geoLocationService.getLocationCache();\n\n if (location != null && location.size() > 0){\n responseEntity= new ResponseEntity<List<LocationEntity>>(location, HttpStatus.OK);\n }else{\n responseEntity= new ResponseEntity<List<LocationEntity>>(location, HttpStatus.NO_CONTENT);\n }\n\n\n return responseEntity;\n }",
"public void cacheableQuery() throws HibException;",
"public synchronized long getEntries() {\n return entries;\n }",
"long getCacheMisses();",
"int cacheRowsWhenScan();",
"@Override\n\tpublic void printCacheEntries() {\n\t\tSystem.out.println(\"********* Fast Cache Entries *********\");\n\t\tSet<Map.Entry<K, V>> entrySet = cache.entrySet();\n\t\tfor (Map.Entry<K, V> entry : entrySet) {\n\t\t\tSystem.out.println(entry.getKey() + \", \" + entry.getValue());\n\t\t}\n\t\tSystem.out.println(\"*******************************\");\n\t}",
"@Override\n public synchronized Enumeration elements() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.elements();\n }",
"@Override\n public synchronized Enumeration keys() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keys();\n }",
"public static Map<String,String> getAgenciesFromCache(){\n\t\tlog.info(\"getAgenciesFromCache..\");\n\t\tMap<String,String> agencyMap=null; \t\n \tif(memcache !=null && memcache.contains(MEDIA_PLAN_AGENCIES_KEY)){\n \t\tagencyMap=(Map<String,String>) memcache.get(MEDIA_PLAN_AGENCIES_KEY);\n \t} \t\n \treturn agencyMap;\n\t}",
"protected void createLookupCache()\n/* */ {\n/* 1260 */ this.lookup = new SimpleCache(1, Math.max(getSize() * 2, 64));\n/* */ }",
"public void cacheResult(DataEntry dataEntry);",
"public ArrayList<KeyVal> readAllLocal(){\n\t\tDHTNode myNode = dynamoRing.getNode(MY_ADDRESS);\n\t\treturn readDHTAllFromNode(myNode);\n\t}",
"public List<T> read(int numbersToRetrieve)\r\n {\r\n// final String methodName = \"read\";\r\n List<T> list = null;\r\n\r\n if (_cache.isEmpty())\r\n {\r\n// Advisory advisory = new Advisory();\r\n//\r\n// advisory.setPackageName (ConstantsPackages.CACHE);\r\n// advisory.setMethodName (_className + \"::\" + methodName);\r\n// advisory.setStatus (Status.STATUS_CACHE_INVALID);\r\n//\r\n// AdvisoryLog.log (advisory);\r\n }\r\n\r\n else\r\n {\r\n int elementIndex = 0;\r\n int pageIndex = 0;\r\n\r\n list = new ArrayList<T>();\r\n\r\n while((list.size() < numbersToRetrieve)&&(!_cache.isEmpty()))\r\n {\r\n List<T> workList;\r\n \r\n synchronized(_cache)\r\n {\r\n workList = _cache.get (pageIndex);\r\n }\r\n \r\n int numbersRemaining = numbersToRetrieve - list.size();\r\n\r\n // Can current cache be used to retrieve all data?\r\n if (numbersRemaining < workList.size())\r\n {\r\n for (int index = 0; index < numbersRemaining; index++)\r\n {\r\n list.add (workList.remove (elementIndex));\r\n }\r\n }\r\n\r\n // Data must be retrieved from multiple pages of cache.\r\n else\r\n {\r\n // Retrieve available data from current page of cache.\r\n int available = workList.size();\r\n\r\n for (int index = 0; index < available; index++)\r\n {\r\n list.add (workList.remove (elementIndex));\r\n }\r\n \r\n synchronized(_cache)\r\n {\r\n _cache.remove (pageIndex);\r\n }\r\n \r\n // Refill page.\r\n _addPages (1);\r\n }\r\n }\r\n }\r\n\r\n return list;\r\n }",
"@Cacheable(\"lastRunInfo\")\n private GeobatchRunInfo getLastRunInfoCache(String id) {\n List<GeobatchRunInfo> search = search(id);\n \n return search != null && !search.isEmpty() ? search.get(0) : null;\n }",
"public Map<String, URLValue> loadAllURLs()\n\t{\n\t\tEntityCursor<URLEntity> results = this.env.getEntityStore().getPrimaryIndex(String.class, URLEntity.class).entities();\n\t\tMap<String, URLValue> urls = new HashMap<String, URLValue>();\n\t\tURLValue url;\n\t\tfor (URLEntity entity : results)\n\t\t{\n\t\t\turl = new URLValue(entity.getKey(), entity.getURL(), entity.getUpdatingPeriod());\n\t\t\turls.put(url.getKey(), url);\n\t\t}\n\t\tresults.close();\n\t\treturn urls;\n\t}",
"protected void createLookupCache() {\n }",
"@Override\n\tpublic Map<InetSocketAddress, String> getVersions(long arg0)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic Map<String, Object> readAllHitos() {\n\t\treturn hitosDao.readAllHitos();\n\t}",
"CACHE_ELEMENT[] get(Key ... keys);",
"protected abstract Collection<Cache> loadCaches();",
"private synchronized void flushCache() {\n /*\n r6 = this;\n monitor-enter(r6)\n r0 = 0\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n boolean r1 = r1.isEmpty() // Catch:{ all -> 0x005a }\n if (r1 == 0) goto L_0x000c\n monitor-exit(r6)\n return\n L_0x000c:\n r1 = 4\n if (r0 >= r1) goto L_0x0058\n int r1 = r6.cdS // Catch:{ all -> 0x005a }\n r2 = 64\n if (r1 > r2) goto L_0x001e\n int r1 = r6.cdT // Catch:{ all -> 0x005a }\n long r1 = (long) r1 // Catch:{ all -> 0x005a }\n long r3 = r6.cdV // Catch:{ all -> 0x005a }\n int r1 = (r1 > r3 ? 1 : (r1 == r3 ? 0 : -1))\n if (r1 <= 0) goto L_0x0058\n L_0x001e:\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n java.util.Set r1 = r1.entrySet() // Catch:{ all -> 0x005a }\n java.util.Iterator r1 = r1.iterator() // Catch:{ all -> 0x005a }\n java.lang.Object r1 = r1.next() // Catch:{ all -> 0x005a }\n java.util.Map$Entry r1 = (java.util.Map.Entry) r1 // Catch:{ all -> 0x005a }\n java.io.File r2 = new java.io.File // Catch:{ all -> 0x005a }\n java.lang.Object r3 = r1.getValue() // Catch:{ all -> 0x005a }\n java.lang.String r3 = (java.lang.String) r3 // Catch:{ all -> 0x005a }\n r2.<init>(r3) // Catch:{ all -> 0x005a }\n long r2 = r2.length() // Catch:{ all -> 0x005a }\n java.util.Map<java.lang.String, java.lang.String> r4 = r6.cdY // Catch:{ all -> 0x005a }\n java.lang.Object r1 = r1.getKey() // Catch:{ all -> 0x005a }\n r4.remove(r1) // Catch:{ all -> 0x005a }\n java.util.Map<java.lang.String, java.lang.String> r1 = r6.cdY // Catch:{ all -> 0x005a }\n int r1 = r1.size() // Catch:{ all -> 0x005a }\n r6.cdS = r1 // Catch:{ all -> 0x005a }\n int r1 = r6.cdT // Catch:{ all -> 0x005a }\n long r4 = (long) r1 // Catch:{ all -> 0x005a }\n long r4 = r4 - r2\n int r1 = (int) r4 // Catch:{ all -> 0x005a }\n r6.cdT = r1 // Catch:{ all -> 0x005a }\n int r0 = r0 + 1\n goto L_0x000c\n L_0x0058:\n monitor-exit(r6)\n return\n L_0x005a:\n r0 = move-exception\n monitor-exit(r6)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.introvd.template.common.bitmapfun.util.DiskLruCache.flushCache():void\");\n }",
"int getCacheConcurrency();",
"public Collection getAllCaches()\n {\n Set setRef = new HashSet();\n Collection<Map> colLoader = m_mapByName.values();\n\n for (Map mapByLoader : colLoader)\n {\n synchronized (mapByLoader)\n {\n for (Object oHolder : mapByLoader.values())\n {\n if (oHolder instanceof SubjectScopedReference)\n {\n setRef.addAll(((SubjectScopedReference) oHolder).values());\n }\n else if (oHolder instanceof NamedCache)\n {\n setRef.add(oHolder);\n }\n else\n {\n throw new UnsupportedOperationException();\n }\n }\n }\n }\n\n return setRef;\n }",
"@Test\n public void testCoh3710_entrySetFilter()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n Iterator iter = cache.entrySet(AlwaysFilter.INSTANCE).iterator();\n validateIndex(cache);\n\n assertFalse(iter.hasNext());\n }\n });\n }",
"Collection<V> getAllEntries();",
"public void cacheResult(ua.org.gostroy.guestbook.model.Entry3 entry3);",
"public CacheStatus[] getCacheStatuses(String populateBucketsKey)\nthrows MediaAlbumException;",
"@Override\n\tpublic <T> Map<String, GetsResponse<T>> gets(Collection<String> arg0,\n\t\t\tlong arg1) throws TimeoutException, InterruptedException,\n\t\t\tMemcachedException {\n\t\treturn null;\n\t}",
"public Long get_cachecurhits() throws Exception {\n\t\treturn this.cachecurhits;\n\t}",
"private synchronized int[] getLookupCache(String name) {\n if (this.lookupCacheURLs != null && (lookupCacheEnabled ^ 1) == 0) {\n int[] cache = getLookupCacheForClassLoader(this.lookupCacheLoader, name);\n if (cache != null && cache.length > 0) {\n int maxindex = cache[cache.length - 1];\n if (!ensureLoaderOpened(maxindex)) {\n if (DEBUG_LOOKUP_CACHE) {\n System.out.println(\"Expanded loaders FAILED \" + this.loaders.size() + \" for maxindex=\" + maxindex);\n }\n }\n }\n }\n }",
"@Override\n\tpublic Map loadAll(Iterable keys) throws CacheLoaderException {\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tpublic void run() {\n\t\t\tsynchronized (mInetAddressList) {\n\t\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\t\tif (System.currentTimeMillis() - cacheEntry.getValue().getCreateTime() >= mCacheTime * 1000) {\n\t\t\t\t\t\tcacheIterator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Test\n public void testCoh3710_get()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n assertNull(getNamedCache(getCacheName0()).get(Integer.valueOf(1)));\n }\n });\n }",
"Map getAll();",
"@Test\n public void testCoh3710_keySetContainsAll()\n {\n doExpiryOpTest(new Runnable()\n {\n public void run()\n {\n NamedCache cache = getNamedCache(getCacheName0());\n\n assertFalse(cache.keySet().containsAll(\n Collections.singleton(Integer.valueOf(1))));\n validateIndex(cache);\n }\n });\n }",
"public void cacheResult(java.util.List<com.Hotel.model.Hotel> hotels);",
"@Test\n public void testGetAll() throws Exception {\n JumpCloneImplant existing;\n Map<Integer, Map<Integer, JumpCloneImplant>> listCheck = new HashMap<>();\n\n existing = new JumpCloneImplant(jumpCloneID, typeID);\n existing.setup(testAccount, 7777L);\n existing = CachedData.update(existing);\n listCheck.put(jumpCloneID, new HashMap<>());\n listCheck.get(jumpCloneID)\n .put(typeID, existing);\n\n existing = new JumpCloneImplant(jumpCloneID + 10, typeID + 10);\n existing.setup(testAccount, 7777L);\n existing = CachedData.update(existing);\n listCheck.put(jumpCloneID + 10, new HashMap<>());\n listCheck.get(jumpCloneID + 10)\n .put(typeID + 10, existing);\n\n // Associated with different account\n existing = new JumpCloneImplant(jumpCloneID, typeID);\n existing.setup(otherAccount, 7777L);\n CachedData.update(existing);\n\n // Not live at the given time\n existing = new JumpCloneImplant(jumpCloneID + 3, typeID + 3);\n existing.setup(testAccount, 9999L);\n CachedData.update(existing);\n\n // EOL before the given time\n existing = new JumpCloneImplant(jumpCloneID + 4, typeID + 4);\n existing.setup(testAccount, 7777L);\n existing.evolve(null, 7977L);\n CachedData.update(existing);\n\n List<JumpCloneImplant> result = CachedData.retrieveAll(8888L,\n (contid, at) -> JumpCloneImplant.accessQuery(testAccount,\n contid, 1000,\n false, at,\n AttributeSelector.any(),\n AttributeSelector.any()));\n Assert.assertEquals(listCheck.size(), result.size());\n for (JumpCloneImplant next : result) {\n int jumpCloneID = next.getJumpCloneID();\n int typeID = next.getTypeID();\n Assert.assertTrue(listCheck.containsKey(jumpCloneID));\n Assert.assertTrue(listCheck.get(jumpCloneID)\n .containsKey(typeID));\n Assert.assertEquals(listCheck.get(jumpCloneID)\n .get(typeID), next);\n }\n\n }",
"protected final void copyNearCacheDetails( HazelCastClusterFileState hcState) {\n\t\tm_nearCacheTime = hcState.getNearCacheTime();\n\t\tm_nearLastAccess= hcState.getNearCacheLastAccessTime();\n\t\tm_nearCacheHits = hcState.getNearCacheHitCount();\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic void printCacheContents() {\n\t\tsynchronized (mInetAddressList) {\n\t\t\tIterator<?> cacheIterator = mInetAddressList.entrySet().iterator();\n\t\t\twhile (cacheIterator.hasNext()) {\n\t\t\t\tMap.Entry<String, CacheElement> cacheEntry = (Map.Entry<String, CacheElement>) cacheIterator.next();\n\t\t\t\tSystem.out.println(\"Key: \" + cacheEntry.getKey());\n\t\t\t\tSystem.out.println(\"Value: \" + cacheEntry.getValue());\n\t\t\t}\n\t\t}\n\t}",
"protected List cacheLoadOrStore(List<Object> loadedObjects) {\n if (loadedObjects.isEmpty()) {\n return loadedObjects;\n }\n if (!(loadedObjects.get(0) instanceof Entity)) {\n return loadedObjects;\n }\n\n List<Entity> filteredObjects = new ArrayList<>(loadedObjects.size());\n for (Object loadedObject : loadedObjects) {\n Entity cachedEntity = cacheLoadOrStore((Entity) loadedObject);\n filteredObjects.add(cachedEntity);\n }\n return filteredObjects;\n }",
"private void fetchNextBlock() {\n try {\n \tSearchClient _client = new SearchClient(\"cubansea-instance\");\n \tWebSearchResults _results = _client.webSearch(createNextRequest());\n \t\tfor(WebSearchResult _result: _results.listResults()) {\n \t\t\tresults.add(new YahooSearchResult(_result, cacheStatus+1));\n \t\t\tcacheStatus++;\n \t\t}\n \t\tif(resultCount == -1) resultCount = _results.getTotalResultsAvailable().intValue();\n } catch (IOException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t} catch (SearchException e) {\n\t\t\tthrow new TechnicalError(e);\n\t\t}\n\t}",
"public native boolean allRowsCached() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n return self.allRowsCached();\r\n }-*/;",
"public Cache<ImmutableBytesPtr,PMetaDataEntity> getMetaDataCache() {\n Cache<ImmutableBytesPtr,PMetaDataEntity> result = metaDataCache;\n if (result == null) {\n synchronized(this) {\n result = metaDataCache;\n if(result == null) {\n long maxTTL = config.getLong(\n QueryServices.MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_SERVER_METADATA_CACHE_TIME_TO_LIVE_MS);\n long maxSize = config.getLongBytes(\n QueryServices.MAX_SERVER_METADATA_CACHE_SIZE_ATTRIB,\n QueryServicesOptions.DEFAULT_MAX_SERVER_METADATA_CACHE_SIZE);\n metaDataCache = result = CacheBuilder.newBuilder()\n .maximumWeight(maxSize)\n .expireAfterAccess(maxTTL, TimeUnit.MILLISECONDS)\n .weigher(new Weigher<ImmutableBytesPtr, PMetaDataEntity>() {\n @Override\n public int weigh(ImmutableBytesPtr key, PMetaDataEntity table) {\n return SizedUtil.IMMUTABLE_BYTES_PTR_SIZE + key.getLength() + table.getEstimatedSize();\n }\n })\n .build();\n }\n }\n }\n return result;\n }",
"int getCachedCount();",
"public static Map<String,String> getIndustriesFromCache(){\n\t\tMap<String,String> dataMap=null;\n \t\n \tif(memcache !=null && memcache.contains(ALL_INDUSTRIES_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_INDUSTRIES_KEY);\n \t\tlog.info(\"Memcache getIndustriesFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}",
"Collection<T> getAll() {\n _readLock.lock();\n try {\n return ImmutableList.copyOf(_toMap.values());\n } finally {\n _readLock.unlock();\n }\n }",
"protected synchronized MemoryCache getExtremesLookupCache()\n {\n // Note that the extremes lookup cache does not belong to the WorldWind memory cache set, therefore it will not\n // be automatically cleared and disposed when World Wind is shutdown. However, since the extremes lookup cache\n // is a local reference to this elevation model, it will be reclaimed by the JVM garbage collector when this\n // elevation model is reclaimed by the GC.\n\n if (this.extremesLookupCache == null)\n {\n // Default cache size holds 1250 min/max pairs. This size was experimentally determined to hold enough\n // value lookups to prevent cache thrashing.\n long size = Configuration.getLongValue(AVKey.ELEVATION_EXTREMES_LOOKUP_CACHE_SIZE, 20000L);\n this.extremesLookupCache = new BasicMemoryCache((long) (0.85 * size), size);\n }\n\n return this.extremesLookupCache;\n }",
"public java.util.List<com.google.protobuf.ByteString>\n getCachedList() {\n return java.util.Collections.unmodifiableList(cached_);\n }",
"public Collection<GlobalIdEntry> getAllEntries();",
"public native boolean allMatchingRowsCached() /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n return self.allMatchingRowsCached();\r\n }-*/;",
"private void displayAll()\n {\n for (int i = 0; i < cache.size(); ++i)\n {\n Record r = cache.get(i); \n System.out.println(r.key() + \" \" + r.value());\n }\n }",
"public Long get_cachetothits() throws Exception {\n\t\treturn this.cachetothits;\n\t}",
"@Override\n\tpublic Map<Serializable, Serializable> gets(String name, List<Serializable> keys)\n\t\t\tthrows CacheException {\n\t\treturn null;\n\t}",
"public void getRemoteItems() {\n url = getAllItemsOrderedByCategory;\n params = new HashMap<>();\n params.put(param_securitykey, param_securitykey);\n\n if (ApiHelper.checkInternet(mContext)) {\n mApiHelper.getItems(mIRestApiCallBack, true, url, params);\n } else {\n //Toast.makeText(mContext, mContext.getString(R.string.noInternetConnection), Toast.LENGTH_LONG).show();\n mIRestApiCallBack.onNoInternet();\n CacheApi cacheApi = loadCacheData(url, params);\n mSqliteCallBack.onDBDataObjectLoaded(cacheApi);\n }\n\n }",
"public List<Map.Entry<String, L>> entries() {\n rwLock.readLock().lock();\n try {\n return new ArrayList<Map.Entry<String, L>>(serversToLoad.entrySet());\n } finally {\n rwLock.readLock().unlock();\n }\n }",
"protected void ensureResultsAreFetched(int last) {\n\t\twhile(last > cacheStatus) {\n\t\t\tfetchNextBlock();\n\t\t}\n\t}",
"private static void getFromCache(Session session) {\n\t\tCacheManager cm=CacheManager.getInstance();\n\t\tCache cache=cm.getCache(\"namanCache\");\n\t\tfor(int i=0;i<2;i++){\n\t\t\tif(cache.get(i)!=null){\n\t\t\t\tSystem.out.println(((UserDetails)cache.get(1).getObjectValue()).getName());\n\t\t\t}else{\n\t\t\t\tUserDetails user1=(UserDetails)session.get(UserDetails.class, i);\n\t\t\t\tSystem.out.println(user1.getName());\n\t\t\t\tcache.put(new Element(i+1,user1));\n\t\t\t}\n\t\t}\n\t\tcm.shutdown();\n\t}",
"public Collection<RegionLocations> getAll() {\n return Collections.unmodifiableCollection(cache.values());\n }",
"public void resetCache() {\n logger.info(\"resetCache(): refilling clinical attribute cache\");\n\n Date dateOfCurrentCacheRefresh = new Date();\n ArrayList<ClinicalAttributeMetadata> latestClinicalAttributeMetadata = null;\n // latestOverrides is a map of study-id to list of overridden ClinicalAttributeMetadata objects\n Map<String, ArrayList<ClinicalAttributeMetadata>> latestOverrides = null;\n\n // attempt to refresh ehcache stores seperately and store success status\n boolean failedClinicalAttributeMetadataCacheRefresh = false;\n boolean failedOverridesCacheRefresh = false;\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull clinical attributes from repository. Error message returned: \" + e.getMessage());\n failedClinicalAttributeMetadataCacheRefresh = true;\n }\n\n try {\n clinicalAttributeMetadataPersistentCache.updateClinicalAttributeMetadataOverridesInPersistentCache();\n } catch (RuntimeException e) {\n logger.error(\"resetCache(): failed to pull overrides from repository. Error message returned: \" + e.getMessage());\n failedOverridesCacheRefresh = true;\n }\n\n // regardless of whether ehcache was updated with new data - use that data to populate modeled object caches\n // ensures app starts up (between tomcat restarts) if TopBraid is down\n logger.info(\"Loading modeled object cache from EHCache\");\n try {\n // this will throw an exception if we cannot connect to TopBraid AND cache is corrupt\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCache();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCache();\n } catch (Exception e) {\n try {\n // this will throw an exception if backup is unavailable\n logger.error(\"Unable to load modeled object cache from default EHCache... attempting to read from backup\");\n latestClinicalAttributeMetadata = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataFromPersistentCacheBackup();\n latestOverrides = clinicalAttributeMetadataPersistentCache.getClinicalAttributeMetadataOverridesFromPersistentCacheBackup();\n if (latestClinicalAttributeMetadata == null || latestOverrides == null) {\n throw new FailedCacheRefreshException(\"No data found in specified backup cache location...\", new Exception());\n }\n } catch (Exception e2) {\n logger.error(\"Unable to load modeled object cache from backup EHCache...\");\n throw new FailedCacheRefreshException(\"Unable to load data from all backup caches...\", new Exception());\n }\n }\n\n // backup cache at this point (maybe backup after each successful update above?)\n if (!failedClinicalAttributeMetadataCacheRefresh && !failedOverridesCacheRefresh) {\n logger.info(\"resetCache(): cache update succeeded, backing up cache...\");\n try {\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataPersistentCache(latestClinicalAttributeMetadata);\n clinicalAttributeMetadataPersistentCache.backupClinicalAttributeMetadataOverridesPersistentCache(latestOverrides);\n logger.info(\"resetCache(): succesfully backed up cache\");\n } catch (Exception e) {\n logger.error(\"resetCache(): failed to backup cache: \" + e.getMessage());\n }\n }\n\n HashMap<String, ClinicalAttributeMetadata> latestClinicalAttributeMetadataCache = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : latestClinicalAttributeMetadata) {\n latestClinicalAttributeMetadataCache.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n\n // latestOverridesCache is a map of study-id to map of clinical attribute name to overridden ClinicalAttributeMetadata object\n HashMap<String, Map<String,ClinicalAttributeMetadata>> latestOverridesCache = new HashMap<String, Map<String, ClinicalAttributeMetadata>>();\n for (Map.Entry<String, ArrayList<ClinicalAttributeMetadata>> entry : latestOverrides.entrySet()) {\n HashMap<String, ClinicalAttributeMetadata> clinicalAttributesMetadataMapping = new HashMap<String, ClinicalAttributeMetadata>();\n for (ClinicalAttributeMetadata clinicalAttributeMetadata : entry.getValue()) {\n fillOverrideAttributeWithDefaultValues(clinicalAttributeMetadata, latestClinicalAttributeMetadataCache.get(clinicalAttributeMetadata.getColumnHeader()));\n clinicalAttributesMetadataMapping.put(clinicalAttributeMetadata.getColumnHeader(), clinicalAttributeMetadata);\n }\n latestOverridesCache.put(entry.getKey(), clinicalAttributesMetadataMapping);\n }\n\n clinicalAttributeCache = latestClinicalAttributeMetadataCache;\n logger.info(\"resetCache(): refilled cache with \" + latestClinicalAttributeMetadata.size() + \" clinical attributes\");\n overridesCache = latestOverridesCache;\n logger.info(\"resetCache(): refilled overrides cache with \" + latestOverrides.size() + \" overrides\");\n\n if (failedClinicalAttributeMetadataCacheRefresh || failedOverridesCacheRefresh) {\n logger.info(\"Unable to update cache with latest data from TopBraid... falling back on EHCache store.\");\n throw new FailedCacheRefreshException(\"Failed to refresh cache\", new Exception());\n } else {\n dateOfLastCacheRefresh = dateOfCurrentCacheRefresh;\n logger.info(\"resetCache(): cache last refreshed on: \" + dateOfLastCacheRefresh.toString());\n }\n }",
"final CacheData<K, V> getEntry(final Object key) {\r\n // validateKey the key in the buckets\r\n\r\n // synchronization is not a problem here\r\n // if someone changes or resets a key/value right before this\r\n // it will be properly handled, either it won't find a validateKey in the if or the\r\n // obj being returned will be null, that is fine and expected for a no-validateKey\r\n // then the client will just validateKey whatever data he was looking for in the buckets\r\n return getCacheData(getKeyPosition(key));\r\n }",
"Map<String, String> getCachedLinks(Page page);",
"public abstract List<String> getCachedLogs(String readerName);",
"public List<Value> getTop(FetchNotification notification) throws DistributedListFetchException\n\t{\n\t\tif (super.getLeftSizeAtBase(notification.getCacheKey(), notification.getEndIndex()) <= this.prefetchThresholdSize)\n\t\t{\n\t\t\tif (!this.prefetchDispatcher.isReady())\n\t\t\t{\n\t\t\t\tthis.threadPool.execute(this.prefetchDispatcher);\n\t\t\t}\n\t\t\tthis.prefetchDispatcher.enqueue(notification);\n\t\t}\n\t\tif (notification.getEndIndex() < super.getCacheSizeAtBase())\n\t\t{\n\t\t\tList<Value> rscs = super.getTopAtBase(notification.getCacheKey(), notification.getEndIndex());\n\t\t\tif (rscs != null)\n\t\t\t{\n\t\t\t\tif (rscs.size() >= notification.getEndIndex())\n\t\t\t\t{\n\t\t\t\t\treturn rscs;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (notification.isBlocking())\n\t\t\t\t\t{\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * In the previous solution, it assumes that the terminal cache has the data that covers its distributed ones. But in practice, the assumption might not be correct. So it is reasonable to put the loaded data into the postfetchedData. Otherwise, the data from the terminal might overwrite the loaded data. 04/30/2019, Bing Li\n\t\t\t\t\t\t */\n\t\t\t\t\t\tthis.postfetchedData.put(notification.getKey(), rscs);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//\t\t\tnotification.setStartIndex(rscs.size() - 1);\n\t\t\tif (!this.postfetchDispatcher.isReady())\n\t\t\t{\n\t\t\t\tthis.threadPool.execute(this.postfetchDispatcher);\n\t\t\t}\n\t\t\tthis.postfetchDispatcher.enqueue(notification);\n\t\t\tif (notification.isBlocking())\n\t\t\t{\n\t\t\t\tthis.syncs.put(notification.getKey(), new Sync(false));\n\t\t\t\tthis.syncs.get(notification.getKey()).holdOn(this.postfetchTimeout);\n//\t\t\t\tthis.syncs.remove(notification.getKey());\n//\t\t\t\treturn super.getTop(notification.getCacheKey(), notification.getEndIndex());\n\t\t\t\tList<Value> values = this.postfetchedData.get(notification.getKey());\n\t\t\t\tthis.postfetchedData.remove(notification.getKey());\n\t\t\t\treturn values;\n\t\t\t}\n\t\t\treturn rscs;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new DistributedListFetchException(super.getCacheSizeAtBase(), notification.getEndIndex());\n\t\t}\n\t}",
"@Override\n\tpublic Map<InetSocketAddress, Map<String, String>> getStats(long arg0)\n\t\t\tthrows MemcachedException, InterruptedException, TimeoutException {\n\t\treturn null;\n\t}",
"@Override\n public List<Transaction> getTxListFromCache() {\n return null;\n }",
"@Override\r\n protected ICacheElement<K, V> processGet(final K key)\r\n {\r\n if (!isAlive())\r\n {\r\n log.error(\"{0}: No longer alive so returning null for key = {1}\",\r\n logCacheName, key);\r\n return null;\r\n }\r\n\r\n log.debug(\"{0}: Trying to get from disk: {1}\", logCacheName, key);\r\n\r\n ICacheElement<K, V> object = null;\r\n try\r\n {\r\n storageLock.readLock().lock();\r\n try\r\n {\r\n object = readElement(key);\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n if (object != null)\r\n {\r\n hitCount.incrementAndGet();\r\n }\r\n }\r\n catch (final IOException ioe)\r\n {\r\n log.error(\"{0}: Failure getting from disk, key = {1}\", logCacheName, key, ioe);\r\n reset();\r\n }\r\n return object;\r\n }",
"static int[] implement_LRU_cache(int capacity, int[] query_type, int[] key, int[] value) {\n // Stores the key as key of map and value as position of this provided value in linkedlist\n Map<Integer, Node> cacheMap = new HashMap<Integer, Node>();\n LinkedList keyList = new LinkedList();\n List<Integer> returnedValues = new ArrayList<Integer>();\n for(int i=0;i<query_type.length;i++){\n if(query_type[i]==0){\n // Add the linked list node to head if its accessed\n if(cacheMap.containsKey(key[i])){\n Node valueNode = cacheMap.get(key[i]);\n returnedValues.add(valueNode.value);\n // refresh the position of this element in the list\n keyList.replaceNode(valueNode);\n }else{\n returnedValues.add(-1);\n }\n\n }else{\n Node node = new Node(key[i], value[i]);\n if(cacheMap.containsKey(key[i])) {\n node = cacheMap.get(key[i]);\n node.value = value[i];\n keyList.replaceNode(node);\n }\n else {\n if (capacity > cacheMap.size()) {\n keyList.addFirst(node);\n cacheMap.put(key[i], node);\n\n }else{\n cacheMap.remove(keyList.tail.key);\n keyList.deleteNode();\n\n keyList.addFirst(node);\n cacheMap.put(node.key, node);\n }\n\n }\n }\n }\n int[] returnArray = new int[returnedValues.size()];\n for(int i=0;i<returnedValues.size();i++){\n returnArray[i] = returnedValues.get(i);\n }\n return returnArray;\n }",
"@Override\n public Set keySet() {\n if ((System.currentTimeMillis() - this.lastCheck) > this.CACHE_TIME) {\n update();\n }\n return super.keySet();\n }",
"public void reloadCache(DB db) {\n // LevelDB is great at scanning consecutive keys.\n // This take seconds even with 20m keys to add.\n log.info(\"Loading Bloom Filter\");\n DBIterator iterator = db.iterator();\n byte[] key = getKey(KeyType.OPENOUT_ALL);\n for (iterator.seek(key); iterator.hasNext(); iterator.next()) {\n ByteBuffer bbKey = ByteBuffer.wrap(iterator.peekNext().getKey());\n byte firstByte = bbKey.get(); // remove the KeyType.OPENOUT_ALL\n // byte.\n if (key[0] != firstByte) {\n printStat();\n return;\n }\n\n byte[] hash = new byte[32];\n bbKey.get(hash);\n add(hash);\n }\n try {\n iterator.close();\n } catch (IOException e) {\n log.error(\"Error closing iterator\", e);\n }\n printStat();\n }",
"@Override\n public boolean isCaching() {\n return false;\n }",
"public void cacheResult(\n\t\tjava.util.List<ua.org.gostroy.guestbook.model.Entry3> entry3s);",
"@Override\n public int getRetainedEntries(final boolean valid) {\n if (otherCheckForSingleItem(mem_)) { return 1; }\n final int preLongs = extractPreLongs(mem_);\n final int curCount = (preLongs == 1) ? 0 : extractCurCount(mem_);\n return curCount;\n }",
"@Override\n\tpublic <T> Map<String, GetsResponse<T>> gets(Collection<String> arg0)\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"private void prefetchRegionCache(final byte[] tableName,\n final byte[] row) {\n // Implement a new visitor for MetaScanner, and use it to walk through\n // the .META.\n MetaScannerVisitor visitor = new MetaScannerVisitorBase() {\n public boolean processRow(Result result) throws IOException {\n try {\n byte[] value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.REGIONINFO_QUALIFIER);\n HRegionInfo regionInfo = null;\n\n if (value != null) {\n // convert the row result into the HRegionLocation we need!\n regionInfo = Writables.getHRegionInfo(value);\n\n // possible we got a region of a different table...\n if (!Bytes.equals(regionInfo.getTableName(),\n tableName)) {\n return false; // stop scanning\n }\n if (regionInfo.isOffline()) {\n // don't cache offline regions\n return true;\n }\n value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.SERVER_QUALIFIER);\n if (value == null) {\n return true; // don't cache it\n }\n final String hostAndPort = Bytes.toString(value);\n String hostname = Addressing.parseHostname(hostAndPort);\n int port = Addressing.parsePort(hostAndPort);\n value = result.getValue(HConstants.CATALOG_FAMILY,\n HConstants.STARTCODE_QUALIFIER);\n // instantiate the location\n HRegionLocation loc =\n new HRegionLocation(regionInfo, hostname, port);\n // cache this meta entry\n cacheLocation(tableName, loc);\n }\n return true;\n } catch (RuntimeException e) {\n throw new IOException(e);\n }\n }\n };\n try {\n // pre-fetch certain number of regions info at region cache.\n MetaScanner.metaScan(conf, this, visitor, tableName, row,\n this.prefetchRegionLimit, HConstants.META_TABLE_NAME);\n } catch (IOException e) {\n LOG.warn(\"Encountered problems when prefetch META table: \", e);\n }\n }",
"public static Map<String,String> getAdvertisersFromCache(){\n\t\tlog.info(\"getAdvertisersFromCache..\");\n\t\tMap<String,String> advertiserMap=null; \t\n \tif(memcache !=null && memcache.contains(MEDIA_PLAN_ADVERTISERS_KEY)){\n \t\tadvertiserMap=(Map<String,String>) memcache.get(MEDIA_PLAN_ADVERTISERS_KEY);\n \t} \t\n \treturn advertiserMap;\n\t}",
"void prefetchValues(Collection<R> entities);",
"public static Map<String,String> getKPIsFromCache(){\n\t\tMap<String,String> dataMap=null;\n \t\n \tif(memcache !=null && memcache.contains(ALL_KPI_KEY)){\n \t\tdataMap=(Map<String,String>) memcache.get(ALL_KPI_KEY);\n \t\tlog.info(\"Memcache getKPIsFromCache size = \"+dataMap.size());\n \t} \t\n \treturn dataMap;\n\t}",
"@Override\n public boolean moreToReceive() throws InvalidParameterException,\n UserNotAuthorizedException,\n PropertyServerException\n {\n if ((entitiesCache == null) || (entitiesCache.isEmpty()))\n {\n entitiesCache = new ArrayList<>();\n\n /*\n * The loop is needed to ensure that another retrieve is attempted if the repository handler returns an empty list.\n * This occurs if all elements returned from the repositories do not match the effectiveTime requested.\n */\n while ((entitiesCache != null) && (entitiesCache.isEmpty()))\n {\n entitiesCache = repositoryHandler.getEntitiesForRelationshipType(userId,\n startingEntityGUID,\n startingEntityTypeName,\n relationshipTypeGUID,\n relationshipTypeName,\n null,\n selectionEnd,\n forLineage,\n forDuplicateProcessing,\n startingFrom,\n pageSize,\n effectiveTime,\n methodName);\n\n if (entitiesCache != null)\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"RepositoryRelatedEntitiesIterator : moreToReceive() entitiesCache not null\");\n\n for (EntityDetail entity : entitiesCache)\n {\n String displayName = \"\";\n String qualifiedName = \"\";\n\n if (entity.getProperties() != null && entity.getProperties().getInstanceProperties() != null)\n {\n if (entity.getProperties().getInstanceProperties().get(\"displayName\") != null)\n {\n displayName = entity.getProperties().getInstanceProperties().get(\"displayName\").toString();\n }\n else if (entity.getProperties().getInstanceProperties().get(\"name\") != null)\n {\n displayName = entity.getProperties().getInstanceProperties().get(\"name\").toString();\n }\n if (entity.getProperties().getInstanceProperties().get(\"qualifiedName\") != null)\n {\n qualifiedName = entity.getProperties().getInstanceProperties().get(\"qualifiedName\").toString();\n }\n }\n\n log.debug(\"Cached entity \" + entity.getGUID() + \", displayName=\" + displayName + \", qualifiedName=\" + qualifiedName);\n }\n }\n }\n\n startingFrom = startingFrom + pageSize;\n\n if (log.isDebugEnabled())\n {\n log.debug(\"StartingFrom=\" + startingFrom);\n }\n }\n }\n\n return (entitiesCache != null);\n }",
"@Override\n\tpublic Map<InetSocketAddress, String> getVersions()\n\t\t\tthrows TimeoutException, InterruptedException, MemcachedException {\n\t\treturn null;\n\t}",
"public Map<K,V> getMap() {\n Map<K,V> results = new HashMap<K,V>(valueMap.size());\n\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (! isExpired(entry.getValue())) {\n results.put(entry.getKey(), entry.getValue().cachedObject);\n }\n }\n }\n\n return results;\n }",
"public Collection<V> getAllElements() {\n\t\treturn cacheMap.values();\n\t}",
"public void reload() {\r\n\t\tList<Object> data = currencyImpl.getAll();\r\n\t\twrite.lock();\r\n\t\tIterator<ConcurrentHashMap<String, List<Object>>> iter = cachedData.values().iterator();\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tConcurrentHashMap<String, List<Object>> map = (ConcurrentHashMap<String, List<Object>>) iter.next();\r\n\t\t\tmap.clear();\r\n\t\t}\r\n\t\tpopulateCachedData((List<Object>)data);\r\n\t\twrite.unlock();\r\n\t}",
"protected void loadCachedFolderMessages() {\r\n boolean dispOrder = MailSettings.getInstance().getGlobalConfig().getDispOrder();\r\n FolderMessage[] messages = folderMessageCache.getFolderMessages(folderTreeItem);\r\n if(messages.length > 0) {\r\n // Add all the messages that have been loaded from the\r\n // cache. Server-side messages will be removed from the\r\n // set later on.\r\n for(int i=0; i<messages.length; i++) {\r\n orphanedMessageSet.put(messages[i].getMessageToken().getMessageUid(), messages[i]);\r\n }\r\n \r\n // If the cached messages have already been loaded, then we can\r\n // skip notifying mail store listeners. However, we still have to\r\n // add them to the orphan set, as seen above.\r\n if(!cacheLoaded) {\r\n if(dispOrder) {\r\n for(int i=0; i<messages.length; i+=5) {\r\n int endIndex = Math.min(i + 5, messages.length);\r\n FolderMessage[] subset = new FolderMessage[endIndex - i];\r\n for(int j=0; j<subset.length; j++) {\r\n subset[j] = messages[i + j];\r\n }\r\n mailStoreServices.fireFolderMessagesAvailable(folderTreeItem, subset, false, false);\r\n }\r\n }\r\n else {\r\n for(int i=messages.length-1; i >= 0; i-=5) {\r\n int startIndex = Math.max(i - 4, 0);\r\n FolderMessage[] subset = new FolderMessage[i - startIndex + 1];\r\n for(int j=0; j<subset.length; j++) {\r\n subset[j] = messages[i - j];\r\n }\r\n mailStoreServices.fireFolderMessagesAvailable(folderTreeItem, subset, false, false);\r\n }\r\n }\r\n cacheLoaded = true;\r\n }\r\n }\r\n }",
"protected void handleGets(final CommandMessage command, final Channel channel) {\n final Future<CacheElement[]> futureResponse = cache.get(Collections.<Key>singleton(command.key));\r\n commandQueue.enqueueFutureResponse(new AsyncGetMultiCommand(command, channel, futureResponse));\r\n }",
"public final long incrementNearCacheHitCount() {\n\t\tm_nearLastAccess = System.currentTimeMillis();\n\t\treturn ++m_nearCacheHits;\n\t}",
"long getEvictions();"
] | [
"0.65810615",
"0.6528426",
"0.6399268",
"0.62748677",
"0.6138358",
"0.6067242",
"0.6035883",
"0.60034835",
"0.59748125",
"0.59641874",
"0.593153",
"0.5887047",
"0.5862805",
"0.58544034",
"0.5851814",
"0.5816557",
"0.5794551",
"0.57733196",
"0.5722419",
"0.57187647",
"0.57006246",
"0.5690336",
"0.56819123",
"0.5655819",
"0.5639878",
"0.5627259",
"0.56138617",
"0.560163",
"0.55974215",
"0.5596673",
"0.559177",
"0.5586396",
"0.5575576",
"0.55668885",
"0.5564661",
"0.55628014",
"0.55576766",
"0.555235",
"0.5549034",
"0.5546638",
"0.55369204",
"0.54987055",
"0.54930985",
"0.5490415",
"0.54865825",
"0.5473622",
"0.5450435",
"0.5443599",
"0.5428496",
"0.5428293",
"0.54264086",
"0.5426137",
"0.5423817",
"0.5422976",
"0.5418855",
"0.54181385",
"0.54107636",
"0.5409662",
"0.54086304",
"0.5408357",
"0.54080653",
"0.5407468",
"0.5407304",
"0.5403464",
"0.5402589",
"0.54004633",
"0.5396618",
"0.53954893",
"0.53935605",
"0.5382584",
"0.5380741",
"0.5377756",
"0.53740495",
"0.53699076",
"0.5358767",
"0.53577447",
"0.5356333",
"0.5354966",
"0.5352043",
"0.53456944",
"0.53419536",
"0.53374964",
"0.5335251",
"0.5333987",
"0.5333433",
"0.53324825",
"0.53303283",
"0.53281295",
"0.5326712",
"0.532448",
"0.53150547",
"0.5314483",
"0.5310124",
"0.5306774",
"0.530486",
"0.52991563",
"0.5295907",
"0.5294473",
"0.5289209",
"0.5278442"
] | 0.58270836 | 15 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.