query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
this function analyse input merged vcut children and children's level and pick out all the matrixs and multiexpressions the output params are listMergeMatrixMExprs and listMergeMMLevel. They must be empty list when input.
public static void lookForMatrixMExprs(LinkedList<StructExprRecog> listMergeVCutChildren, LinkedList<Integer> listCharLevel, LinkedList<StructExprRecog> listMergeMatrixMExprs, LinkedList<Integer> listMergeMMLevel) { // 0 is normal mode // 1 is round bracket mode // 2 is square bracket mode // 3 is brace mode // 4 is vertical line mode // 5 is double vertical line mode (not supported) int nExprGoThroughMode = 0; int nGoThroughModeStartIdx = -1; int nMMLeft = Integer.MAX_VALUE, nMMRightP1 = Integer.MIN_VALUE; int nMMTop = Integer.MAX_VALUE, nMMBottomP1 = Integer.MIN_VALUE; boolean bGetMM = false; for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) { StructExprRecog ser = listMergeVCutChildren.get(idx); if (nExprGoThroughMode == 0) { // we are in normal mode if (idx != (listMergeVCutChildren.size() - 1) && !ser.isChildListType() && listCharLevel.get(idx) == 0) { if (ser.mType == UnitProtoType.Type.TYPE_ROUND_BRACKET) { nExprGoThroughMode = 1; nGoThroughModeStartIdx = idx; } else if (ser.mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET) { nExprGoThroughMode = 2; nGoThroughModeStartIdx = idx; } else if (ser.mType == UnitProtoType.Type.TYPE_BRACE) { nExprGoThroughMode = 3; nGoThroughModeStartIdx = idx; } else if (ser.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE) { nExprGoThroughMode = 4; nGoThroughModeStartIdx = idx; } else if (ser.mnHeight / ser.mnWidth > ConstantsMgr.msdExtendableCharWOverHThresh * ConstantsMgr.msdCharWOverHGuaranteedExtRatio) { // any other character that can be start of a matrix nExprGoThroughMode = 5; nGoThroughModeStartIdx = idx; } } if (nExprGoThroughMode == 0) { //we are in normal mode listMergeMatrixMExprs.add(ser); listMergeMMLevel.add(listCharLevel.get(idx)); // listCharLevel.get(idx) should be 0 } else { // we start Matrix or M-expr mode nMMLeft = Integer.MAX_VALUE; nMMRightP1 = Integer.MIN_VALUE; nMMTop = Integer.MAX_VALUE; nMMBottomP1 = Integer.MIN_VALUE; } } else if ((!ser.isChildListType()) && listCharLevel.get(idx) == 0 // must be a base character && idx != (listMergeVCutChildren.size() - 1) // should not be in the last character && (ser.mType == UnitProtoType.Type.TYPE_ROUND_BRACKET || ser.mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET || ser.mType == UnitProtoType.Type.TYPE_BRACE || ser.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE || (ser.mType != UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET && ser.mType != UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET && ser.mType != UnitProtoType.Type.TYPE_CLOSE_BRACE && ser.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE && ser.mnHeight / ser.mnWidth > ConstantsMgr.msdExtendableCharWOverHThresh * ConstantsMgr.msdCharWOverHGuaranteedExtRatio)) // seems to be the beginning of a matrix && ser.mnTop <= listMergeVCutChildren.get(nGoThroughModeStartIdx).mnTop && ser.getBottomPlus1() >= listMergeVCutChildren.get(nGoThroughModeStartIdx).getBottomPlus1()) { // we are not in normal mode, but old beginning of the matrix is not a real beginning of a matrix. Beginning of a matrix should start from here. for (int idx1 = nGoThroughModeStartIdx; idx1 < idx; idx1 ++) { //serFromGTS cannot be vertically cut. it must either be horizontally cut or a character. StructExprRecog serFromGTS = listMergeVCutChildren.get(idx1); listMergeMatrixMExprs.add(serFromGTS); listMergeMMLevel.add(listCharLevel.get(idx1)); } if (ser.mType == UnitProtoType.Type.TYPE_ROUND_BRACKET) { nExprGoThroughMode = 1; nGoThroughModeStartIdx = idx; } else if (ser.mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET) { nExprGoThroughMode = 2; nGoThroughModeStartIdx = idx; } else if (ser.mType == UnitProtoType.Type.TYPE_BRACE) { nExprGoThroughMode = 3; nGoThroughModeStartIdx = idx; } else if (ser.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE) { nExprGoThroughMode = 4; nGoThroughModeStartIdx = idx; } else if (ser.mnHeight / ser.mnWidth > ConstantsMgr.msdExtendableCharWOverHThresh * ConstantsMgr.msdCharWOverHGuaranteedExtRatio) { nExprGoThroughMode = 5; nGoThroughModeStartIdx = idx; } nMMLeft = Integer.MAX_VALUE; nMMRightP1 = Integer.MIN_VALUE; nMMTop = Integer.MAX_VALUE; nMMBottomP1 = Integer.MIN_VALUE; } else if (ser.isChildListType() == false && listCharLevel.get(idx) == 0 // must be a base character && (ser.getBottomPlus1() - listMergeVCutChildren.get(nGoThroughModeStartIdx).mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * ser.mnHeight && (listMergeVCutChildren.get(nGoThroughModeStartIdx).getBottomPlus1() - ser.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * ser.mnHeight && ser.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * listMergeVCutChildren.get(nGoThroughModeStartIdx).mnHeight // must have similar height as the start character && ser.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * listMergeVCutChildren.get(nGoThroughModeStartIdx).mnHeight && (ser.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET || ser.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET || ser.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE || ser.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE || (ser.mType != UnitProtoType.Type.TYPE_ROUND_BRACKET && ser.mType != UnitProtoType.Type.TYPE_SQUARE_BRACKET && ser.mType != UnitProtoType.Type.TYPE_BRACE && ser.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE && ser.mnHeight / ser.mnWidth > ConstantsMgr.msdExtendableCharWOverHThresh * ConstantsMgr.msdCharWOverHGuaranteedExtRatio))) { bGetMM = false; boolean bHasBaseBlankDiv = false; for (int idx1 = nGoThroughModeStartIdx + 1; idx1 < idx; idx1 ++) { // should have at least one base level ser with type HBlankCut, otherwise, it cannot be a matrix. if (listCharLevel.get(idx1) == 0 && listMergeVCutChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { bHasBaseBlankDiv = true; break; } } if (bHasBaseBlankDiv && (ser.getBottomPlus1() - nMMTop) > ConstantsMgr.msdMatrixBracketHeightRatio * ser.mnHeight && (nMMBottomP1 - ser.mnTop) > ConstantsMgr.msdMatrixBracketHeightRatio * ser.mnHeight && ser.mnHeight > ConstantsMgr.msdMatrixBracketHeightRatio * (nMMBottomP1 - nMMTop) // must have similar height as the start character && ser.mnHeight < 1/ConstantsMgr.msdMatrixBracketHeightRatio * (nMMBottomP1 - nMMTop)) { // we do have at least one H-blank cut between two brackets/vlines // ok, this might be a matrix // step a. first calculate average char width and average char height. double dAvgCharWidth = 0, dAvgCharHeight = 0, dSumWeight = 0; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < idx; idx2 ++) { double[] darrayMetrics = listMergeVCutChildren.get(idx2).calcAvgCharMetrics(); dAvgCharWidth += darrayMetrics[AVG_CHAR_WIDTH_IDX] * darrayMetrics[CHAR_CNT_IDX]; dAvgCharHeight += darrayMetrics[AVG_CHAR_HEIGHT_IDX] * darrayMetrics[CHAR_CNT_IDX]; dSumWeight += darrayMetrics[CHAR_CNT_IDX]; } if (dSumWeight > 0) { dAvgCharWidth /= dSumWeight; dAvgCharHeight /= dSumWeight; } else { dAvgCharWidth = ConstantsMgr.msnMinCharWidthInUnit; dAvgCharHeight = ConstantsMgr.msnMinCharHeightInUnit; } // step b. find h divs. LinkedList<Integer[]> listMMHDivs = new LinkedList<Integer[]>(); boolean bIsLastHDivLine = false, bIsHDivLine = true; int nStartMMHDivIdx = -1, nEndMMHDivIdx = -1; for (int idx1 = nMMTop; idx1 < nMMBottomP1; idx1 ++) { bIsHDivLine = true; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < idx; idx2 ++) { StructExprRecog serMMChild = listMergeVCutChildren.get(idx2); if (serMMChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { for (int idx3 = 0; idx3 < serMMChild.mlistChildren.size(); idx3 ++) { if (serMMChild.mlistChildren.get(idx3).mnTop <= idx1 && idx1 < serMMChild.mlistChildren.get(idx3).getBottomPlus1()) { // cut through one element. bIsHDivLine = false; break; } } if (!bIsHDivLine) { break; } } else { // serMMChild is a single element. if (serMMChild.mnTop <= idx1 && idx1 < serMMChild.getBottomPlus1()) { // cut through one element. bIsHDivLine = false; break; } } } if (!bIsLastHDivLine && bIsHDivLine) { //start of hdiv nStartMMHDivIdx = idx1; } else if (bIsLastHDivLine && !bIsHDivLine) { // end of hdiv. nEndMMHDivIdx = idx1 - 1; if (nEndMMHDivIdx + 1 - nStartMMHDivIdx >= ConstantsMgr.msdMatrixMExprsHDivRelaxRatio * dAvgCharHeight) { Integer[] narrayHDivTopBottom = new Integer[2]; narrayHDivTopBottom[0] = nStartMMHDivIdx; narrayHDivTopBottom[1] = nEndMMHDivIdx; listMMHDivs.add(narrayHDivTopBottom); } } bIsLastHDivLine = bIsHDivLine; } for (int idx1 = 0; idx1 < listMMHDivs.size(); idx1 ++) { int nStartIdx = listMMHDivs.get(idx1)[0]; int nEndIdx = listMMHDivs.get(idx1)[1]; if (nEndIdx + 1 - nStartIdx < ConstantsMgr.msdMatrixMExprsHDivRatio * dAvgCharHeight) { // the h-div gap is not wide enough, need to double-check int nLastHCutTop = (idx1 == 0)?nMMTop:(listMMHDivs.get(idx1 - 1)[1] + 1); int nLastHCutBtmP1 = nStartIdx; int nNextHCutTop = nEndIdx + 1; int nNextHCutBtmP1 = (idx1 == listMMHDivs.size() - 1)?nMMBottomP1:listMMHDivs.get(idx1 + 1)[0]; int nSumGapTimesWidth = 0, nSumWidth = 0; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < idx; idx2 ++) { StructExprRecog serMMChild = listMergeVCutChildren.get(idx2); if (serMMChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { int nLastChildInLastHCut = -1, nFirstChildInNextHCut = -1; for (int idx3 = 0; idx3 < serMMChild.mlistChildren.size(); idx3 ++) { if (serMMChild.mlistChildren.get(idx3).mnTop > nLastHCutTop) { continue; // haven't been in last hcut, continue; } if (serMMChild.mlistChildren.get(idx3).mnTop >= nLastHCutTop && nLastHCutBtmP1 >= serMMChild.mlistChildren.get(idx3).getBottomPlus1()) { // cut through one element. nLastChildInLastHCut = idx3; } else if (serMMChild.mlistChildren.get(idx3).mnTop >= nNextHCutTop && nNextHCutBtmP1 >= serMMChild.mlistChildren.get(idx3).getBottomPlus1() /*&& nFirstChildInNextHCut == -1*/) { // no need to check if nFirstChildInNextHCut == -1 coz it will break anyway. nFirstChildInNextHCut = idx3; break; } if (serMMChild.mlistChildren.get(idx3).mnTop >= nNextHCutBtmP1) { // have been beyond next hcut, so exit. break; } } if (nLastChildInLastHCut != -1 && nFirstChildInNextHCut != -1) { int nGap = serMMChild.mlistChildren.get(nFirstChildInNextHCut).mnTop - serMMChild.mlistChildren.get(nLastChildInLastHCut).getBottomPlus1(); int nWidth = serMMChild.mnWidth; nSumGapTimesWidth += nGap * nWidth; nSumWidth += nWidth; } } } double dExtHDivHeight = nEndIdx + 1 - nStartIdx; if (nSumWidth > 0) { dExtHDivHeight = (double)nSumGapTimesWidth/(double)nSumWidth; } if (dExtHDivHeight < ConstantsMgr.msdMatrixMExprsExtHDivRatio * dAvgCharHeight) { // even consider ext h-div, it is still too narrow, it cannot be a h-div. listMMHDivs.remove(idx1); idx1 --; } } } // step c. find v divs. LinkedList<Integer[]> listMMVDivs = new LinkedList<Integer[]>(); boolean bIsLastVDivLine = false, bIsVDivLine = true; int nStartMMVDivIdx = -1, nEndMMVDivIdx = -1; for (int idx1 = nMMLeft; idx1 < nMMRightP1; idx1 ++) { bIsVDivLine = true; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < idx; idx2 ++) { StructExprRecog serMMChild = listMergeVCutChildren.get(idx2); // serMMChild must be a single element or Hcut list. All vcut children has been merged in listMergeVCutChildren. if (serMMChild.mnLeft <= idx1 && idx1 < serMMChild.getRightPlus1()) { // cut through one element. bIsVDivLine = false; break; } } if (!bIsLastVDivLine && bIsVDivLine) { //start of vdiv nStartMMVDivIdx = idx1; } else if (bIsLastVDivLine && !bIsVDivLine) { // end of vdiv. nEndMMVDivIdx = idx1 - 1; if (nEndMMVDivIdx + 1 - nStartMMVDivIdx >= ConstantsMgr.msdMatrixMExprsVDivRatio * dAvgCharWidth) { boolean bIsaVCut = true; double dAvgChildGapWidth = 0; for (int idxHCutChild = 0; idxHCutChild <= listMMHDivs.size(); idxHCutChild ++) { int nChildTop, nChildBottom, nVChildGapLeft = Integer.MIN_VALUE, nVChildGapRight = Integer.MAX_VALUE; if (idxHCutChild == 0) { nChildTop = nMMTop; nChildBottom = (listMMHDivs.size() > 0)?(listMMHDivs.getFirst()[0] - 1):(nMMBottomP1 - 1); } else if (idxHCutChild == listMMHDivs.size()) { // need not to worry about listMMHDivs.size() == 0 coz if listMMHDivs.size() == 0 then idxHCutChild == 0, this branch is not executed. nChildTop = listMMHDivs.getLast()[1] + 1;; nChildBottom = nMMBottomP1 - 1; } else { nChildTop = listMMHDivs.get(idxHCutChild - 1)[1] + 1;; nChildBottom = listMMHDivs.get(idxHCutChild)[0] - 1;; } for (int idxMMChild = nGoThroughModeStartIdx + 1; idxMMChild < idx; idxMMChild ++) { StructExprRecog serMMChild = listMergeVCutChildren.get(idxMMChild); if (serMMChild.getRightPlus1() <= nStartMMVDivIdx) { // MMChild left of gap if (serMMChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { for (int idxMMGrandChild = 0; idxMMGrandChild < serMMChild.mlistChildren.size(); idxMMGrandChild ++) { StructExprRecog serMMGrandChild = serMMChild.mlistChildren.get(idxMMGrandChild); if (serMMGrandChild.mnTop >= nChildTop && serMMGrandChild.getBottom() <= nChildBottom && serMMGrandChild.getRightPlus1() > nVChildGapLeft) { nVChildGapLeft = serMMGrandChild.getRightPlus1(); } } } else { // treated as a single element. if (serMMChild.mnTop >= nChildTop && serMMChild.getBottom() <= nChildBottom && serMMChild.getRightPlus1() > nVChildGapLeft) { nVChildGapLeft = serMMChild.getRightPlus1(); } } } else { // MMChild right of gap. if (serMMChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { for (int idxMMGrandChild = 0; idxMMGrandChild < serMMChild.mlistChildren.size(); idxMMGrandChild ++) { StructExprRecog serMMGrandChild = serMMChild.mlistChildren.get(idxMMGrandChild); if (serMMGrandChild.mnTop >= nChildTop && serMMGrandChild.getBottom() <= nChildBottom && serMMGrandChild.mnLeft <= nVChildGapRight) { nVChildGapRight = serMMGrandChild.mnLeft - 1; } } } else { // treated as a single element. if (serMMChild.mnTop >= nChildTop && serMMChild.getBottom() <= nChildBottom && serMMChild.mnLeft <= nVChildGapRight) { nVChildGapRight = serMMChild.mnLeft - 1; } } } } int nChildGap = nVChildGapRight - nVChildGapLeft + 1; if (nChildGap < ConstantsMgr.msdMatrixMExprsChildVDivRatio * dAvgCharWidth) { bIsaVCut = false; break; } dAvgChildGapWidth += nChildGap; } if (bIsaVCut) { dAvgChildGapWidth /= (listMMHDivs.size() + 1); if (dAvgChildGapWidth >= ConstantsMgr.msdMatrixMExprsAvgChildVDivRatio * dAvgCharWidth) { Integer[] narrayVDivLeftRight = new Integer[2]; narrayVDivLeftRight[0] = nStartMMVDivIdx; narrayVDivLeftRight[1] = nEndMMVDivIdx; listMMVDivs.add(narrayVDivLeftRight); } } } } bIsLastVDivLine = bIsVDivLine; } // step d. get matrix. if (listMMHDivs.size() == 0) { // this is not a matrix, bGetMM = false; } else { bGetMM = true; // this is a matrix. LinkedList<StructExprRecog> listMatrixCols = new LinkedList<StructExprRecog>(); int nVChildStartIdx = nGoThroughModeStartIdx + 1; for (int idx1 = 0; idx1 <= listMMVDivs.size(); idx1 ++) { int nVChildEndIdx = idx - 1; for (int idx3 = nVChildStartIdx; idx3 < idx; idx3 ++) { if (idx1 != listMMVDivs.size() && listMergeVCutChildren.get(idx3).getRightPlus1() > listMMVDivs.get(idx1)[0]) { nVChildEndIdx = idx3 - 1; break; } } StructExprRecog serMatrixCol = new StructExprRecog(listMergeVCutChildren.get(idx).mbarrayBiValues); LinkedList<StructExprRecog> listMatrixColChildren = new LinkedList<StructExprRecog>(); int[] narrayRowStartIdices = new int[nVChildEndIdx - nVChildStartIdx + 1]; for (int idx2 = 0; idx2 <= listMMHDivs.size(); idx2 ++) { LinkedList<StructExprRecog> listMatrixCellChildren = new LinkedList<StructExprRecog>(); for (int idx3 = nVChildStartIdx; idx3 <= nVChildEndIdx; idx3 ++) { StructExprRecog serThisVChild = listMergeVCutChildren.get(idx3); StructExprRecog serVChildInCell = new StructExprRecog(listMergeVCutChildren.get(idx).mbarrayBiValues); if (serThisVChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { int nRowEndIdx = serThisVChild.mlistChildren.size() - 1; if (idx2 != listMMHDivs.size()) { int idx4 = narrayRowStartIdices[idx3 - nVChildStartIdx]; if (idx4 >= serThisVChild.mlistChildren.size() || serThisVChild.mlistChildren.get(idx4).mnTop >= listMMHDivs.get(idx2)[0]) { //narrayRowStartIdices[idx3 - nVChildStartIdx] has been beyond list children size() // or child narrayRowStartIdices[idx3 - nVChildStartIdx] is below this H Div, continue; continue; } else { for (; idx4 < serThisVChild.mlistChildren.size(); idx4 ++) { if (serThisVChild.mlistChildren.get(idx4).mnTop >= listMMHDivs.get(idx2)[0]) { nRowEndIdx = idx4 - 1; break; } } } } if (narrayRowStartIdices[idx3 - nVChildStartIdx] == nRowEndIdx) { // single child. serVChildInCell = serThisVChild.mlistChildren.get(nRowEndIdx); listMatrixCellChildren.add(serVChildInCell); } else if (narrayRowStartIdices[idx3 - nVChildStartIdx] < nRowEndIdx) { // multiple child. serVChildInCell = restructHDivMatrixMExprChild(serThisVChild.mlistChildren, narrayRowStartIdices[idx3 - nVChildStartIdx], nRowEndIdx); listMatrixCellChildren.add(serVChildInCell); } narrayRowStartIdices[idx3 - nVChildStartIdx] = nRowEndIdx + 1; } else { // single element. int nRowEndIdx = -1; if (idx2 == 0) { if (serThisVChild.getBottomPlus1() <= listMMHDivs.get(idx2)[0]) { nRowEndIdx = 0; } } else if (idx2 == listMMHDivs.size()) { if (serThisVChild.mnTop > listMMHDivs.get(idx2 - 1)[1]) { nRowEndIdx = 0; } } else if (serThisVChild.mnTop > listMMHDivs.get(idx2 - 1)[1] && serThisVChild.getBottomPlus1() <= listMMHDivs.get(idx2)[0]) { nRowEndIdx = 0; } if (nRowEndIdx == 0) { serVChildInCell = serThisVChild; listMatrixCellChildren.add(serVChildInCell); } } } StructExprRecog serMatrixElem = new StructExprRecog(listMergeVCutChildren.get(idx).mbarrayBiValues); if (listMatrixCellChildren.size() == 0) { int nCellLeft = (idx1 == 0)?nMMLeft:(listMMVDivs.get(idx1 - 1)[1] + 1); int nCellTop = (idx2 == 0)?nMMTop:(listMMHDivs.get(idx2 - 1)[1] + 1); int nCellRightP1 = (idx1 == listMMVDivs.size())?nMMRightP1:listMMVDivs.get(idx1)[0]; int nCellBottomP1 = (idx2 == listMMHDivs.size())?nMMBottomP1:listMMHDivs.get(idx2)[0]; ImageChop imgChop = new ImageChop(); byte[][] barrayImg = new byte[nCellRightP1 - nCellLeft][nCellBottomP1 - nCellTop]; imgChop.setImageChop(barrayImg, 0, 0, nCellRightP1 - nCellLeft, nCellBottomP1 - nCellTop, listMergeVCutChildren.get(idx).mbarrayBiValues, nCellLeft, nCellTop, ImageChop.TYPE_UNKNOWN); serMatrixElem.setStructExprRecog(UnitProtoType.Type.TYPE_EMPTY, "", nCellLeft, nCellTop, nCellRightP1 - nCellLeft, nCellBottomP1 - nCellTop, imgChop, 1); } else if (listMatrixCellChildren.size() == 1) { serMatrixElem = listMatrixCellChildren.getFirst(); } else { serMatrixElem.setStructExprRecog(listMatrixCellChildren, EXPRRECOGTYPE_VBLANKCUT); } listMatrixColChildren.add(serMatrixElem); } serMatrixCol.setStructExprRecog(listMatrixColChildren, EXPRRECOGTYPE_HBLANKCUT); listMatrixCols.add(serMatrixCol); nVChildStartIdx = nVChildEndIdx + 1; } StructExprRecog serMatrix = new StructExprRecog(listMergeVCutChildren.get(idx).mbarrayBiValues); serMatrix.setStructExprRecog(listMatrixCols, EXPRRECOGTYPE_VCUTMATRIX); if (nExprGoThroughMode == 4 || ser.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE) { // if the matrix is surrouned by vertical line. StructExprRecog serStart = listMergeVCutChildren.get(nGoThroughModeStartIdx).clone(); // need not to reset left top width height coz serStart's left top width height have been cloned. // similarly, need not to reset similarity // here serStart should be an enum type, so need not to worry about image chop. serStart.changeSEREnumType(UnitProtoType.Type.TYPE_VERTICAL_LINE, serStart.mstrFont); StructExprRecog serEnd = ser.clone(); // need not to reset left top width height coz serEnd's left top width height have been cloned. // similarly, need not to reset similarity // here serEnd should be an enum type, so need not to worry about image chop. serEnd.changeSEREnumType(UnitProtoType.Type.TYPE_VERTICAL_LINE, serEnd.mstrFont); listMergeMatrixMExprs.add(serStart); listMergeMMLevel.add(listCharLevel.get(nGoThroughModeStartIdx)); //listCharLevel.get(nGoThroughModeStartIdx) should be 0 listMergeMatrixMExprs.add(serMatrix); listMergeMMLevel.add(listCharLevel.get(idx)); // listCharLevel.get(idx) should be 0 listMergeMatrixMExprs.add(serEnd); listMergeMMLevel.add(listCharLevel.get(idx)); // listCharLevel.get(idx) should be 0 } else { // the {([ and ])} should not be shown. listMergeMatrixMExprs.add(serMatrix); listMergeMMLevel.add(listCharLevel.get(idx)); // listCharLevel.get(idx) should be 0 } nExprGoThroughMode = 0; nGoThroughModeStartIdx = -1; } } if (bGetMM == false) { // is not Matrix or M-exprs. // exit to normal mode, but rewind idx to idx - 1 because if it is v-line, it could be start of a matrix. for (int idx1 = nGoThroughModeStartIdx; idx1 < idx; idx1 ++) { //serFromGTS cannot be vertically cut. it must either be horizontally cut or a character. StructExprRecog serFromGTS = listMergeVCutChildren.get(idx1); listMergeMatrixMExprs.add(serFromGTS); listMergeMMLevel.add(listCharLevel.get(idx1)); } nExprGoThroughMode = 0; nGoThroughModeStartIdx = -1; idx --; } } else { // in the middle of a matrix. nMMLeft = (nMMLeft > ser.mnLeft)?ser.mnLeft:nMMLeft; nMMRightP1 = (nMMRightP1 < ser.getRightPlus1())?ser.getRightPlus1():nMMRightP1; nMMTop = (nMMTop > ser.mnTop)?ser.mnTop:nMMTop; nMMBottomP1 = (nMMBottomP1 < ser.getBottomPlus1())?ser.getBottomPlus1():nMMBottomP1; } } bGetMM = false; if (nGoThroughModeStartIdx >= 0 && nGoThroughModeStartIdx < listMergeVCutChildren.size() - 1 && nExprGoThroughMode == 3) { // ok we are following brace and brace is not the last char. StructExprRecog serStartBrace = listMergeVCutChildren.get(nGoThroughModeStartIdx); if ((serStartBrace.getBottomPlus1() - nMMTop) > ConstantsMgr.msdMatrixBracketHeightRatio * serStartBrace.mnHeight && (nMMBottomP1 - serStartBrace.mnTop) > ConstantsMgr.msdMatrixBracketHeightRatio * serStartBrace.mnHeight && serStartBrace.mnHeight > ConstantsMgr.msdMatrixBracketHeightRatio * (nMMBottomP1 - nMMTop) // must have similar height as the start character && serStartBrace.mnHeight < 1/ConstantsMgr.msdMatrixBracketHeightRatio * (nMMBottomP1 - nMMTop)) { // step a. first calculate average char height and initialize variables. double dAvgCharHeight = 0, dSumWeight = 0; boolean bIsLastHDivLine = false, bIsHDivLine = true; int nStartMMHDivIdx = -1, nEndMMHDivIdx = -1; LinkedList<StructExprRecog> listMExprElems = new LinkedList<StructExprRecog>(); LinkedList<Integer[]> listLastCutThru = new LinkedList<Integer[]>(); LinkedList<Integer> listGapSizes = new LinkedList<Integer>(); Integer[] narrayB4LastCutThruIdx = new Integer[listMergeVCutChildren.size() - nGoThroughModeStartIdx - 1]; Integer[] narrayLastCutThroughIdx = new Integer[listMergeVCutChildren.size() - nGoThroughModeStartIdx - 1]; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < listMergeVCutChildren.size(); idx2 ++) { narrayB4LastCutThruIdx[idx2 - nGoThroughModeStartIdx - 1] = -1; narrayLastCutThroughIdx[idx2 - nGoThroughModeStartIdx - 1] = -1; double[] darrayMetrics = listMergeVCutChildren.get(idx2).calcAvgCharMetrics(); dAvgCharHeight += darrayMetrics[AVG_CHAR_HEIGHT_IDX] * darrayMetrics[CHAR_CNT_IDX]; dSumWeight += darrayMetrics[CHAR_CNT_IDX]; } if (dSumWeight > 0) { dAvgCharHeight /= dSumWeight; } else { dAvgCharHeight = ConstantsMgr.msnMinCharHeightInUnit; } // step b. find h div for (int idx1 = nMMTop; idx1 < nMMBottomP1; idx1 ++) { bIsHDivLine = true; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < listMergeVCutChildren.size(); idx2 ++) { narrayB4LastCutThruIdx[idx2 - nGoThroughModeStartIdx - 1] = narrayLastCutThroughIdx[idx2 - nGoThroughModeStartIdx - 1]; StructExprRecog serMMChild = listMergeVCutChildren.get(idx2); if (serMMChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { for (int idx3 = 0; idx3 < serMMChild.mlistChildren.size(); idx3 ++) { if (serMMChild.mlistChildren.get(idx3).mnTop <= idx1 && idx1 < serMMChild.mlistChildren.get(idx3).getBottomPlus1()) { // cut through one element. bIsHDivLine = false; narrayLastCutThroughIdx[idx2 - nGoThroughModeStartIdx - 1] = idx3; break; } } } else { // serMMChild is a single element. if (serMMChild.mnTop <= idx1 && idx1 < serMMChild.getBottomPlus1()) { // cut through one element. bIsHDivLine = false; narrayLastCutThroughIdx[idx2 - nGoThroughModeStartIdx - 1] = 0; } } } if (!bIsLastHDivLine && bIsHDivLine) { //start of hdiv nStartMMHDivIdx = idx1; } else if (bIsLastHDivLine && !bIsHDivLine) { // end of hdiv. nEndMMHDivIdx = idx1 - 1; if (nEndMMHDivIdx + 1 - nStartMMHDivIdx >= ConstantsMgr.msdMatrixMExprsHDivRelaxRatio * dAvgCharHeight) { Integer[] narrayCutThru2Store = new Integer[listMergeVCutChildren.size() - nGoThroughModeStartIdx - 1]; for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < listMergeVCutChildren.size(); idx2 ++) { int nEndChildIdx = narrayB4LastCutThruIdx[idx2 - nGoThroughModeStartIdx - 1]; narrayCutThru2Store[idx2 - nGoThroughModeStartIdx - 1] = nEndChildIdx; } listLastCutThru.add(narrayCutThru2Store); listGapSizes.add(nEndMMHDivIdx + 1 - nStartMMHDivIdx); } } bIsLastHDivLine = bIsHDivLine; } // ok, now double check if some gaps are too narrow. for (int idx1 = 0; idx1 < listGapSizes.size(); idx1 ++) { if (listGapSizes.get(idx1) < ConstantsMgr.msdMatrixMExprsHDivRatio * dAvgCharHeight) { // gap size is not wide enough, we need to do double check. int nSumGapTimesWidth = 0, nSumWidth = 0; int nNumOfVCuts = listMergeVCutChildren.size() - nGoThroughModeStartIdx - 1; for (int idx2 = 0; idx2 < nNumOfVCuts; idx2 ++) { int nLastHCutIdx = listLastCutThru.get(idx1)[idx2]; int nNextHCutIdx; StructExprRecog serThisVCutChild = listMergeVCutChildren.get(idx2 + nGoThroughModeStartIdx + 1); if (idx1 == listGapSizes.size() - 1) { // this is the last gap if (serThisVCutChild.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) { nNextHCutIdx = 0; } else { nNextHCutIdx = serThisVCutChild.mlistChildren.size() - 1; // last child idx. } } else { // this is not the last gap. nNextHCutIdx = listLastCutThru.get(idx1 + 1)[idx2]; } if (nNextHCutIdx > nLastHCutIdx) { // at this moment nNextHCutIdx is actually the last child in next h-cut, not the first, so adjust it to the first child. nNextHCutIdx = nLastHCutIdx + 1; if (nLastHCutIdx >= 0) { // it is not -1, and serThisVCutChild must be h-blank cut. int nWidth = serThisVCutChild.mnWidth; int nGap = serThisVCutChild.mlistChildren.get(nNextHCutIdx).mnTop - serThisVCutChild.mlistChildren.get(nLastHCutIdx).getBottomPlus1(); nSumGapTimesWidth += nGap * nWidth; nSumWidth += nWidth; } } } double dExtGapSize = (nSumWidth == 0)?listGapSizes.get(idx1):(double)nSumGapTimesWidth / (double)nSumWidth; if (dExtGapSize < ConstantsMgr.msdMatrixMExprsExtHDivRatio * dAvgCharHeight) { // even consider ext-gap, the gap is still too narrow. listGapSizes.remove(idx1); listLastCutThru.remove(idx1); idx1 --; } } } // now after remove all too narrow gaps, we can construct child expressions. for (int idx1 = 0; idx1 <= listLastCutThru.size(); idx1 ++) { StructExprRecog serMExprsElem = new StructExprRecog(listMergeVCutChildren.get(nGoThroughModeStartIdx).mbarrayBiValues); LinkedList<StructExprRecog> listMExprsElemChildren = new LinkedList<StructExprRecog>(); for (int idx2 = nGoThroughModeStartIdx + 1; idx2 < listMergeVCutChildren.size(); idx2 ++) { int nStartChildIdx = (idx1 == 0)?0 :(listLastCutThru.get(idx1 - 1)[idx2 - nGoThroughModeStartIdx - 1] + 1); int nEndChildIdx; if (idx1 < listLastCutThru.size()) { nEndChildIdx = listLastCutThru.get(idx1)[idx2 - nGoThroughModeStartIdx - 1]; } else { nEndChildIdx = (listMergeVCutChildren.get(idx2).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) ?(listMergeVCutChildren.get(idx2).mlistChildren.size() - 1):0; } if (nEndChildIdx == nStartChildIdx) { if (listMergeVCutChildren.get(idx2).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) { // in this case nStartChildIdx and nEndChildIdx must be 0. listMExprsElemChildren.add(listMergeVCutChildren.get(idx2)); } else { listMExprsElemChildren.add(listMergeVCutChildren.get(idx2).mlistChildren.get(nEndChildIdx)); } } else if (nEndChildIdx > nStartChildIdx) { StructExprRecog serMEChild = restructHDivMatrixMExprChild(listMergeVCutChildren.get(idx2).mlistChildren, nStartChildIdx, nEndChildIdx); listMExprsElemChildren.add(serMEChild); } } if (listMExprsElemChildren.size() == 0) { // actually this will not happen. } else if (listMExprsElemChildren.size() == 1) { serMExprsElem = listMExprsElemChildren.getFirst(); } else { serMExprsElem.setStructExprRecog(listMExprsElemChildren, EXPRRECOGTYPE_VBLANKCUT); } listMExprElems.add(serMExprsElem); } // now all the children are ready, construct serMExprs. StructExprRecog serMExprs = new StructExprRecog(listMergeVCutChildren.get(nGoThroughModeStartIdx).mbarrayBiValues); if (listMExprElems.size() == 1) { serMExprs = listMExprElems.getFirst(); } else if (listMExprElems.size() > 1) { serMExprs.setStructExprRecog(listMExprElems, EXPRRECOGTYPE_MULTIEXPRS); } else { //actually this will not happen, if happens, means a bug. } // add multiexpres into return param listMergeMatrixMExprs.add(serStartBrace); listMergeMMLevel.add(listCharLevel.get(nGoThroughModeStartIdx)); listMergeMatrixMExprs.add(serMExprs); listMergeMMLevel.add(listCharLevel.get(nGoThroughModeStartIdx)); bGetMM = true; } } if (bGetMM == false && nExprGoThroughMode != 0) { // we are still in abnormal mode. //add unmerged to return param for (int idx1 = nGoThroughModeStartIdx; idx1 < listMergeVCutChildren.size(); idx1 ++) { //serFromGTS cannot be vertically cut. it must either be horizontally cut or a character. StructExprRecog serFromGTS = listMergeVCutChildren.get(idx1); listMergeMatrixMExprs.add(serFromGTS); listMergeMMLevel.add(listCharLevel.get(idx1)); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void loadTree() throws NotBoundException, MalformedURLException, RemoteException, ClassNotFoundException, SQLException, InterruptedException {\n\n List<Object> ob1 = new ArrayList<>();\n ob1.add(1);\n ob1.add(1);\n//db Access1 \n List<List<Object>> sspFindMultyResult1 = ServerConnection.getServerConnector().searchMultipleResults(ob1, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n DefaultTreeModel model = (DefaultTreeModel) jTree1.getModel();\n\n DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();\n\n for (List<Object> sspFindMultyResults1 : sspFindMultyResult1) {\n DefaultMutableTreeNode dmtn1 = new DefaultMutableTreeNode(sspFindMultyResults1.get(1) + \"-\" + sspFindMultyResults1.get(3));\n root.add(dmtn1);\n\n List<Object> ob2 = new ArrayList<>();\n ob2.add(2);\n ob2.add(sspFindMultyResults1.get(0));\n//db Access2\n List<List<Object>> sspFindMultyResult2 = ServerConnection.getServerConnector().searchMultipleResults(ob2, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults2 : sspFindMultyResult2) {\n DefaultMutableTreeNode dmtn2 = new DefaultMutableTreeNode(sspFindMultyResults2.get(1) + \"-\" + sspFindMultyResults2.get(3));\n dmtn1.add(dmtn2);\n dmtn1.getLevel();\n\n List<Object> ob3 = new ArrayList<>();\n ob3.add(3);\n ob3.add(sspFindMultyResults2.get(0));\n//db Access3\n List<List<Object>> sspFindMultyResult3 = ServerConnection.getServerConnector().searchMultipleResults(ob3, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults3 : sspFindMultyResult3) {\n DefaultMutableTreeNode dmtn3 = new DefaultMutableTreeNode(sspFindMultyResults3.get(1) + \"-\" + sspFindMultyResults3.get(3));\n dmtn2.add(dmtn3);\n\n List<Object> ob4 = new ArrayList<>();\n ob4.add(4);\n ob4.add(sspFindMultyResults3.get(0));\n//db Access4\n List<List<Object>> sspFindMultyResult4 = ServerConnection.getServerConnector().searchMultipleResults(ob4, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults4 : sspFindMultyResult4) {\n DefaultMutableTreeNode dmtn4 = new DefaultMutableTreeNode(sspFindMultyResults4.get(1) + \"-\" + sspFindMultyResults4.get(3));\n dmtn3.add(dmtn4);\n\n List<Object> ob5 = new ArrayList<>();\n ob5.add(5);\n ob5.add(sspFindMultyResults4.get(0));\n//db Access5 \n List<List<Object>> sspFindMultyResult5 = ServerConnection.getServerConnector().searchMultipleResults(ob5, \"ssp_GL_LoadCombo_ActTree\", 4);\n\n for (List<Object> sspFindMultyResults5 : sspFindMultyResult5) {\n DefaultMutableTreeNode dmtn5 = new DefaultMutableTreeNode(sspFindMultyResults5.get(1) + \"-\" + sspFindMultyResults5.get(3));\n dmtn4.add(dmtn5);\n\n }\n }\n }\n }\n }\n model.reload(root);\n }", "public void resetCollapseByMenu() {\n //NOTE: can only collapse on OTU metadata\n collapseByMenu.removeAll();\n JMenuItem item = new JMenuItem(\"Uncollapse All\");\n item.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n frame.uncollapseTree();\n }\n });\n collapseByMenu.add(item);\n item = new JMenuItem(\"Collapse All\");\n item.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n frame.collapseTree();\n }\n });\n collapseByMenu.add(item);\n item = new JMenuItem(\"Node Labels\");\n item.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n String value = e.getActionCommand();\n double level = Double.parseDouble(((String)JOptionPane.showInputDialog(\n frame,\n \"Enter percent threshold to collapse by:\\n\"+\n \"Use 100(%) for completely homogeneous\\n\"+\n \"collapsing\",\n \"Collapse by \"+value,\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n \"90\")))/100;\n if(level > 0 && level <= 1)\n {\n frame.collapseTreeByNodeLabels(level);\n }\n else\n JOptionPane.showMessageDialog(frame,\n \"Invalid threshold percentage.\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n \n }\n });\n collapseByMenu.add(item);\n item = new JMenuItem(\"Consensus Lineage\");\n item.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n String value = e.getActionCommand();\n double level = Double.parseDouble(((String)JOptionPane.showInputDialog(\n frame,\n \"Enter percent threshold to collapse by:\\n\"+\n \"Use 100(%) for completely homogeneous\\n\"+\n \"collapsing\",\n \"Collapse by \"+value,\n JOptionPane.PLAIN_MESSAGE,\n null,\n null,\n \"90\")))/100;\n if(level > 0 && level <= 1)\n {\n frame.collapseTreeByConsensusLineage(level);\n }\n else\n JOptionPane.showMessageDialog(frame,\n \"Invalid threshold percentage.\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n \n }\n });\n item.setEnabled(false);\n collapseByMenu.add(item);\n collapseByMenu.add(new JSeparator());\n // \n // item = new JMenuItem(\"External Node Labels\");\n // item.addActionListener(new ActionListener() {\n // public void actionPerformed(ActionEvent e) {\n // collapseItemClicked(e);\n // }\n // });\n // collapseByMenu.add(item);\n\n if (frame.frame.otuMetadata != null) { \n ArrayList<String> data = frame.frame.otuMetadata.getColumnNames();\n //start at 1 to skip ID column\n for (int i = 1; i < data.size(); i++) {\n String value = data.get(i);\n item = new JMenuItem(value);\n item.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n collapseItemClicked(e);\n }\n });\n collapseByMenu.add(item);\n }\n }\n }", "public static void main(String... args){\n\n List<List<Integer>> listN = new ArrayList<>();\n\n List<Integer> list1N = new ArrayList<>();\n list1N.add(1);\n list1N.add(2);\n list1N.add(3);\n\n\n List<Integer> list2N = new ArrayList<>();\n list2N.add(4);\n list2N.add(5);\n\n\n\n List<Integer> list3N = new ArrayList<>();\n list3N.add(5);\n list3N.add(6);\n\n\n List<Integer> list4N = new ArrayList<>();\n list4N.add(7);\n list4N.add(8);\n list4N.add(9);\n\n listN.add(list1N);\n listN.add(list2N);\n listN.add(list3N);\n listN.add(list4N);\n\n List<Integer> outputN = getMergedLLEfficient(listN);\n\n for(Integer elem : outputN)\n System.out.println(elem);\n }", "private void addAllMembers(ZQuadTree<?> tree, ArrayList<Object> elms) {\n if (size <= tree.splitThreshold) {\n Leaf<?>[] children = (Leaf<?>[]) data;\n for (int i = 0; i < size; i++)\n elms.add(children[i].value);\n } else {\n Node<?>[] children = (Node<?>[]) data;\n for (int i = 0; i < kJunctionChildCount; i++) {\n Node<?> child = children[i];\n if (child != null)\n child.addAllMembers(tree, elms);\n }\n }\n }", "@Override\n public JsonNode visit(JmesPathMultiSelectList multiSelectList, JsonNode input) throws InvalidTypeException {\n List<JmesPathExpression> expressionsList = multiSelectList.getExpressions();\n ArrayNode evaluatedExprList = ObjectMapperSingleton.getObjectMapper().createArrayNode();\n for (JmesPathExpression expression : expressionsList) {\n evaluatedExprList.add(expression.accept(this, input));\n }\n return evaluatedExprList;\n }", "void merge(int arr[], int l, int m , int r)\n {\n int n1 = m-l+1;\n int n2 = r-m;\n\n //create temp arrays\n int L[] = new int[n1];\n int R[] = new int[n2];\n\n //copy the elements to the array\n for(int i=0; i < n1 ;i++)\n L[i] = arr[l+i];\n for(int j=0; j < n2 ;j++)\n R[j] = arr[m+1+j];\n\n // Initial indexes of first and second subarrays\n int i = 0, j = 0;\n\n // Initial index of merged subarry array\n int k = l;\n\n while(i<n1 && j< n2)\n {\n if(L[i] <= R[j])\n {\n arr[k++] = L[i++];\n }\n else\n {\n arr[k++] = R[j++];\n }\n }\n\n while(i<n1)\n {\n arr[k++]=L[i++];\n }\n\n while(j<n2)\n {\n arr[k++]=R[j++];\n }\n\n }", "final public void OneMoreListMerge() throws ParseException {\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case S_MORE:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[78] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[79] = jj_gen;\n ;\n }\n break;\n case LIST:\n List();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[80] = jj_gen;\n ;\n }\n break;\n case MERGE:\n Merge();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[81] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[82] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[83] = jj_gen;\n ;\n }\n break;\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case ONE:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[84] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[85] = jj_gen;\n ;\n }\n break;\n case LIST:\n List();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[86] = jj_gen;\n ;\n }\n break;\n case MERGE:\n Merge();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[87] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[88] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[89] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[96] = jj_gen;\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n case MERGE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case LIST:\n List();\n break;\n case MERGE:\n Merge();\n break;\n default:\n jj_la1[90] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n case S_MORE:\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case S_MORE:\n More();\n break;\n default:\n jj_la1[91] = jj_gen;\n ;\n }\n break;\n case S_MORE:\n More();\n switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {\n case ONE:\n One();\n break;\n default:\n jj_la1[92] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[93] = jj_gen;\n jj_consume_token(-1);\n throw new ParseException();\n }\n break;\n default:\n jj_la1[94] = jj_gen;\n ;\n }\n break;\n default:\n jj_la1[95] = jj_gen;\n ;\n }\n }\n }", "private void compose() {\n for(Group group : inputGroupList){\n if(group.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = group.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(group);\n }\n } else{\n root.addChild(group);\n }\n }\n for(Address adr : inputAddressList){\n if(adr.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = adr.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(adr);\n adr.addParent(upper);\n }\n } else{\n root.addChild(adr);\n }\n }\n\n assert(root.getChildren().size() > 0);\n }", "public static void main(String[] args) {\r\n\r\n\t\t// Dataset: 5 X 10 matrix\r\n\t\tint[][] multi = new int[][]{\r\n\t\t\t{ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 },\r\n\t\t\t{ 2, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\r\n\t\t\t{ 3, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\r\n\t\t\t{ 4, 0, 0, 0, 0, 0, 0, 0, 0, 0 },\r\n\t\t\t{ 5, 0, 0, 0, 0, 0, 0, 0, 0, 0 }\r\n\t\t};\r\n\r\n\t\tMergekSortedLists outer = new MergekSortedLists();\r\n\t\tMergekSortedLists.LinkedList[] inner_list = new MergekSortedLists.LinkedList[5];\r\n\r\n\t\tint outer_index = 0;\r\n\t\tfor( LinkedList inner : inner_list) {\r\n\t\t\tinner = outer.new LinkedList();\r\n\t\t\t\tfor(int data : multi[outer_index]) {\r\n\t\t\t\t\tinner.addFront(data);\r\n\t\t\t\t}\r\n\t\t\tinner_list[outer_index++] = inner;\r\n\t\t}\r\n\t\t\r\n\t\tfor( LinkedList inner : inner_list) {\r\n\t\t\tinner.print();\r\n\t\t}\r\n\r\n\t}", "public static ArrayList<String> joinArrayLists(ArrayList<String> EqList, ArrayList<String> sshList){\n\n\t\t\t\n\t\t\tArrayList<Integer> counteq = new ArrayList<Integer>();\n\t\t\tArrayList<Integer> countssh = new ArrayList<Integer>();\n\t\t\t\n\t\t\tList<String> split1 = new ArrayList<String>();\n\t\t\tList<String> split2 = new ArrayList<String>();\n\t\t\t\n\t\t\tArrayList<String> combine = new ArrayList<String>();\n\t\t\t\n\t\t\t//Checks how many object exist in arrayList and addes their index to a new list\n\t\t\tfor(int i = 0;i<EqList.size();i++){\n\t\t\t\tif(EqList.get(i) == \"Object\"){\n\t\t\t\t\tcounteq.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfor(int j = 0;j<sshList.size();j++){\n\t\t\t\tif(sshList.get(j) == \"Object\"){\n\t\t\t\t\tcountssh.add(j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//The size of the matrices must be equal. If it is 1, removes the ID and object index from the second matrix and addes it to the first arrayList\n\t\t\tif(counteq.size() == countssh.size()){\n\t\t\t\tif(counteq.size() == 1){\n\t\t\t\t\tif(EqList.get(1).equals(sshList.get(1))){\n\t\t\t\t\t\tEqList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tsshList.remove(0);\n\t\t\t\t\t\tcombine.addAll(EqList);\n\t\t\t\t\t\tcombine.addAll(sshList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t//Based on the IDs of both lists, it splits both lists on the specified index and addes the two parts to the new combined matrix\n\t\t\t\t\t//The indexes are taken from the specified matrices counteq and countssh\n\t\t\t\t\tcounteq.add(EqList.size());\n\t\t\t\t\tcountssh.add(sshList.size());\n\t\t\t\t\tfor(int i = 0;i<counteq.size()-1;i++){\n\t\t\t\t\t\tfor(int j = 0;j<countssh.size()-1;j++){\n\t\t\t\t\t\t\tif(EqList.get(counteq.get(i)+1).equals(sshList.get(countssh.get(j)+1))){\n\n\t\t\t\t\t\t\t\t\tsplit1 = EqList.subList(counteq.get(i),counteq.get(i+1));\n\t\t\t\t\t\t\t\t\tsplit2 = sshList.subList(countssh.get(j)+2,countssh.get(j+1));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tcombine.addAll(split1);\n\t\t\t\t\t\t\t\t\tcombine.addAll(split2);\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\telse\n\t\t\t\tSystem.out.println(\"Error! Arraylists size not the same. Please check the data\");\n\t\t\t\n\t\t\t//If any remaining object indexes are left, remove them\n\t\t\tfor(int i = 0;i<combine.size();i++){\n\t\t\t\tif(combine.get(i) == \"Object\"){\n\t\t\t\t\tcombine.remove(i);\n\t\t\t\t\ti=0;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn combine;\n\t\t}", "MergeHandler[] getChildren();", "private void buildFunctionList(DefaultMutableTreeNode root){\n MBTNode\n calculatedMembersNode\n , rowsNode\n , columnsNode\n , pagesNode\n , fromNode\n , whereNode;\n\n calculatedMembersNode = new MBTWithMembersNode(\"WITH\");\n /**\n * Changed second parameter from 'true' to 'false' to allow empty results on axis.\n * By Prakash. 8 June 2007. \n */\n rowsNode = new DefaultMBTAxisNode(\"ROWS\", false);\n columnsNode = new DefaultMBTAxisNode(\"COLUMNS\", false);\n pagesNode = new DefaultMBTAxisNode(\"PAGES\", false);\n /*\n *\tEnd of the modification.\n */\n fromNode = new MBTFromNode(cubeName);\n whereNode =new MBTWhereNode(\"WHERE\");\n\n ((MBTNode) (root).getUserObject()).addChild(calculatedMembersNode);\n ((MBTNode) (root).getUserObject()).addChild(columnsNode);\n ((MBTNode) (root).getUserObject()).addChild(rowsNode);\n ((MBTNode) (root).getUserObject()).addChild(pagesNode);\n ((MBTNode) (root).getUserObject()).addChild(fromNode);\n ((MBTNode) (root).getUserObject()).addChild(whereNode);\n\n root.add(new DefaultMutableTreeNode(calculatedMembersNode));\n root.add(new DefaultMutableTreeNode(columnsNode));\n root.add(new DefaultMutableTreeNode(rowsNode));\n root.add(new DefaultMutableTreeNode(pagesNode));\n root.add(new DefaultMutableTreeNode(fromNode));\n root.add(new DefaultMutableTreeNode(whereNode));\n\n }", "ArrayList< LinkedList< Node > > levellist(Node root)\n{\n\t//results contain all the linkedlists containing all the nodes on each level of the tree\n\tArrayList< LinkedList< Node > > results = new ArrayList< LinkedList< Node > > ();\n\t//basic condition for the following built-in calling of recursive\n\tlevellist(root, results, 0);\n\t//because results is used as a parameter in the recursive and then we all need to return the output\n\treturn results;\n}", "static void merge(int arr[], int l, int m, int r) \n { \n // Sizes of the two subarrays\n int size1 = m - l + 1; \n int size2 = r - m; \n \n // Temporary arrays\n int left[] = new int [size1]; \n int right[] = new int [size2]; \n \n // Copy over to temps\n for (int i=0; i<size1; ++i) \n left[i] = arr[l + i]; \n for (int j=0; j<size2; ++j) \n right[j] = arr[m + 1+ j]; \n \n \n // Initial indexes of first and second subarrays \n int i = 0, j = 0; \n \n // Initial index of merged subarry array \n int k = l; \n while (i < size1 && j < size2) \n { \n if (left[i] <= right[j]) \n { \n arr[k] = left[i]; \n i++; \n } \n else\n { \n arr[k] = right[j]; \n j++; \n } \n k++; \n } \n \n // Copy rest of arrays\n while (i < size1) \n { \n arr[k] = left[i]; \n i++; \n k++; \n } \n \n // For the other array\n while (j < size2) \n { \n arr[k] = right[j]; \n j++; \n k++; \n } \n }", "private boolean getJoinOpsAndLeafInputs(ILogicalOperator op) throws AlgebricksException {\n if (joinClause(op)) {\n JoinOperator jO = new JoinOperator((AbstractBinaryJoinOperator) op);\n allJoinOps.add(jO);\n if (op.getOperatorTag() == LogicalOperatorTag.LEFTOUTERJOIN) {\n jO.setOuterJoin(true);\n }\n\n int firstLeafInputNumber, lastLeafInputNumber;\n int k = 0;\n for (int i = 0; i < 2; i++) {\n ILogicalOperator nextOp = op.getInputs().get(i).getValue();\n firstLeafInputNumber = leafInputNumber + 1; // we are interested in the 2nd input only\n boolean canTransform = getJoinOpsAndLeafInputs(nextOp);\n if (!canTransform) {\n return false;\n }\n lastLeafInputNumber = leafInputNumber; // we are interested in the 2nd input only\n k = 0;\n // now we know the leafInput numbers that occurred on the right side of this join.\n //if ((op.getOperatorTag() == LogicalOperatorTag.LEFTOUTERJOIN) && (i == 1)) {\n if ((joinClause(op)) && (i == 1)) {\n for (int j = firstLeafInputNumber; j <= lastLeafInputNumber; j++) {\n k |= 1 << (j - 1);\n }\n // buildSets are only for outerjoins.\n if ((op.getOperatorTag() == LogicalOperatorTag.LEFTOUTERJOIN)\n && (firstLeafInputNumber < lastLeafInputNumber)) { // if more is than one leafInput, only then buildSets make sense.\n buildSets.add(new Triple<>(k, lastLeafInputNumber - firstLeafInputNumber + 1, true)); // convert the second to boolean later\n }\n boolean ret = buildDependencyList(op, jO, outerJoinsDependencyList, k);\n if (!ret) {\n return false;\n }\n }\n }\n } else {\n if (op.getOperatorTag() == LogicalOperatorTag.GROUP) { // cannot handle group by's in leaf Inputs.\n return false;\n }\n Pair<EmptyTupleSourceOperator, DataSourceScanOperator> etsDataSource = containsLeafInputOnly(op);\n if (etsDataSource != null) { // a leaf input\n EmptyTupleSourceOperator etsOp = etsDataSource.first;\n DataSourceScanOperator dataSourceOp = etsDataSource.second;\n if (op.getOperatorTag().equals(LogicalOperatorTag.DISTRIBUTE_RESULT)) {// single table query\n ILogicalOperator selectOp = findSelectOrDataScan(op);\n if (selectOp == null) {\n return false;\n } else {\n leafInputs.add(selectOp);\n }\n } else {\n leafInputNumber++;\n leafInputs.add(op);\n if (!addLeafInputNumbersToVars(op)) {\n return false;\n }\n }\n } else { // This must be an internal edge\n if (onlyAssigns(op, assignOps)) {\n ILogicalOperator skipAssisgnsOp = skipPastAssigns(op);\n boolean canTransform = getJoinOpsAndLeafInputs(skipAssisgnsOp);\n if (!canTransform) {\n return false;\n }\n } else {\n return false;\n }\n }\n }\n return true;\n }", "private void merge(Object [] arr, int l, int m, int r) \n\t{\n\t\tint n1 = m - l + 1; \n\t\tint n2 = r - m; \n\n\t\t/* Create temp arrays */\n\t\tObject L[] = new Object [n1]; \n\t\tObject R[] = new Object [n2]; \n\n\t\t/*Copy data to temp arrays*/\n\t\tfor (int i=0; i<n1; ++i) \n\t\t\tL[i] = arr[l + i]; \n\t\tfor (int j=0; j<n2; ++j) \n\t\t\tR[j] = arr[m + 1+ j]; \n\n\n\t\t/* Merge the temp arrays */\n\n\t\t// Initial indexes of first and second subarrays \n\t\tint i = 0, j = 0; \n\n\t\t// Initial index of merged subarry array \n\t\tint k = l; \n\t\twhile (i < n1 && j < n2) \n\t\t{ \n\t\t\tint comparison = ((T)L[i]).compareTo((T)R[j]);\n\t\t\tif (comparison <= 0) \n\t\t\t{ \n\t\t\t\tarr[k] = L[i]; \n\t\t\t\ti++; \n\t\t\t} \n\t\t\telse\n\t\t\t{ \n\t\t\t\tarr[k] = R[j]; \n\t\t\t\tj++; \n\t\t\t} \n\t\t\tk++; \n\t\t} \n\n\t\t/* Copy remaining elements of L[] if any */\n\t\twhile (i < n1) \n\t\t{ \n\t\t\tarr[k] = L[i]; \n\t\t\ti++; \n\t\t\tk++; \n\t\t} \n\n\t\t/* Copy remaining elements of R[] if any */\n\t\twhile (j < n2) \n\t\t{ \n\t\t\tarr[k] = R[j]; \n\t\t\tj++; \n\t\t\tk++; \n\t\t} \n\t}", "private Node merge(Node r) {\r\n if (r.op() == Empty) return r;\r\n assert(r.op() == List);\r\n if (r.left().op() == Rule) { merge(r.right()); return r; }\r\n Node n = r.left();\r\n assert(n.op() == List);\r\n r.left(n.left());\r\n if (n.right().op() == Empty) return r;\r\n n.left(n.right());\r\n n.right(r.right());\r\n r.right(n);\r\n merge(r);\r\n return r;\r\n }", "public abstract Multigraph buildMatchedGraph();", "private List<Object> handleResult(List<Object> resultSet)\n {\n List<Object> result = new ArrayList<>();\n final Expression[] grouping = compilation.getExprGrouping();\n if (grouping != null)\n {\n Comparator<Object> c = new Comparator<>()\n {\n public int compare(Object arg0, Object arg1)\n {\n for (int i = 0; i < grouping.length; i++)\n {\n state.put(candidateAlias, arg0);\n Object a = grouping[i].evaluate(evaluator);\n state.put(candidateAlias, arg1);\n Object b = grouping[i].evaluate(evaluator);\n\n // Put any null values at the end\n if (a == null && b == null)\n {\n return 0;\n }\n else if (a == null)\n {\n return -1;\n }\n else if (b == null)\n {\n return 1;\n }\n else\n {\n int result = ((Comparable)a).compareTo(b);\n if (result != 0)\n {\n return result;\n }\n }\n }\n return 0;\n }\n };\n \n List<List<Object>> groups = new ArrayList<>();\n List<Object> group = new ArrayList<>();\n if (!resultSet.isEmpty())\n {\n groups.add(group);\n }\n for (int i = 0; i < resultSet.size(); i++)\n {\n if (i > 0)\n {\n if (c.compare(resultSet.get(i - 1), resultSet.get(i)) != 0)\n {\n group = new ArrayList<>();\n groups.add(group);\n }\n }\n group.add(resultSet.get(i));\n }\n\n // Apply the result to the generated groups\n for (int i = 0; i < groups.size(); i++)\n {\n group = groups.get(i);\n result.add(result(group));\n }\n }\n else\n {\n boolean aggregates = false;\n Expression[] resultExprs = compilation.getExprResult();\n if (resultExprs.length > 0 && resultExprs[0] instanceof CreatorExpression)\n {\n Expression[] resExpr = ((CreatorExpression)resultExprs[0]).getArguments().toArray(\n new Expression[((CreatorExpression)resultExprs[0]).getArguments().size()]);\n for (int i = 0; i < resExpr.length; i++)\n {\n if (resExpr[i] instanceof InvokeExpression)\n {\n String method = ((InvokeExpression) resExpr[i]).getOperation().toLowerCase();\n if (method.equals(\"count\") || method.equals(\"sum\") || method.equals(\"avg\") || method.equals(\"min\") || method.equals(\"max\"))\n {\n aggregates = true;\n }\n }\n }\n }\n else\n {\n for (int i = 0; i < resultExprs.length; i++)\n {\n if (resultExprs[i] instanceof InvokeExpression)\n {\n String method = ((InvokeExpression)resultExprs[i]).getOperation().toLowerCase();\n if (method.equals(\"count\") || method.equals(\"sum\") || method.equals(\"avg\") || method.equals(\"min\") || method.equals(\"max\"))\n {\n aggregates = true;\n }\n }\n }\n }\n \n if (aggregates)\n {\n result.add(result(resultSet));\n }\n else\n {\n for (int i = 0; i < resultSet.size(); i++)\n {\n result.add(result(resultSet.get(i)));\n }\n }\n }\n\n if (!result.isEmpty() && ((Object[])result.get(0)).length == 1)\n {\n List r = result;\n result = new ArrayList<>();\n for (int i = 0; i < r.size(); i++)\n {\n result.add(((Object[]) r.get(i))[0]);\n }\n }\n return result;\n }", "void assignToLists() {\n\n int lastOuterIndex = -1;\n int lastRightIndex = -1;\n for (int i = 0; i < rangeVariables.length; i++) {\n if (rangeVariables[i].isLeftJoin) {\n lastOuterIndex = i;\n }\n if(rangeVariables[i].isRightJoin) {\n lastOuterIndex = i;\n lastRightIndex = i;\n }\n\n if (lastOuterIndex == i) {\n joinExpressions[i].addAll(tempJoinExpressions[i]);\n } else {\n for (int j = 0; j < tempJoinExpressions[i].size(); j++) {\n assignToJoinLists(\n (Expression) tempJoinExpressions[i].get(j),\n joinExpressions, lastOuterIndex + 1);\n }\n }\n }\n\n for (int i = 0; i < queryExpressions.size(); i++) {\n assignToWhereLists((Expression) queryExpressions.get(i),\n whereExpressions, lastRightIndex);\n }\n }", "private void addSecondLevelMonitors(ArrayList<String> childIds)\n/* */ {\n/* 792 */ for (String childResId : (ArrayList)childIds.clone())\n/* */ {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 801 */ if ((this.parentVsChildMap.getCollection(childResId) != null) && (!getResourceType(childResId).equals(\"HAI\")))\n/* */ {\n/* 803 */ ArrayList<String> secondLevelMonitorIdsList = (ArrayList)this.parentVsChildMap.getCollection(childResId);\n/* 804 */ for (String secondLevelMonitorId : secondLevelMonitorIdsList)\n/* */ {\n/* 806 */ ArrayList<String> validSeconLevelEntitys = (ArrayList)this.validResIdsVsEntitySet.get(secondLevelMonitorId);\n/* 807 */ if (validSeconLevelEntitys != null)\n/* */ {\n/* 809 */ addAllResIds(childIds, validSeconLevelEntitys);\n/* */ }\n/* */ \n/* 812 */ ArrayList<String> v2 = (ArrayList)this.validResIdsForAction.get(secondLevelMonitorId);\n/* 813 */ if (v2 != null)\n/* */ {\n/* 815 */ addAllResIds(childIds, v2);\n/* */ }\n/* */ }\n/* */ }\n/* */ }\n/* */ }", "@Override public List<Node> visitJoin(@NotNull XQueryParser.JoinContext ctx) {\n\t\tHashMap<String, List<Node>> hashJoin = new HashMap<String, List<Node>>();\n\t\tList<Node> result = new ArrayList<Node>();\n\t\tList<Node> left = new ArrayList<Node>(visit(ctx.query(0)));\n\t\tList<Node> right = new ArrayList<Node>(visit(ctx.query(1)));\n\t\tList<String> latt = transform(ctx.attrs(0));\n\t\tList<String> ratt = transform(ctx.attrs(1));\n\t\t\n\t\tif(latt.isEmpty()){\n\t\t\tfor(Node lnode : left){\n\t\t\t\tfor(Node rnode: right){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(lnode);\n\t\t\t\t\tchild.addAll(findChild(rnode));\n\t\t\t\t\tfor(Node childNode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childNode, true));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\tList<Node> small = left.size() < right.size() ? left : right,\n\t\t\t\tlarge = left.size() < right.size() ? right : left;\n\t\tList<String> smatt = left.size() < right.size() ? latt : ratt,\n\t\t\t\tlgatt = left.size() < right.size() ? ratt : latt;\n\t\t\n\t\t// store into hash map\n\t\tfor(Node smnode : small){\n\t\t\tString key = convertChildren(smnode, smatt);\n\t\t\tif(hashJoin.containsKey(key)){\n\t\t\t\thashJoin.get(key).add(smnode);\n\t\t\t} else hashJoin.put(key, new ArrayList<Node>(Arrays.asList(smnode)));\n\t\t}\n\t\t\n\t\t// actual join operation\n\t\tfor(Node lgnode : large){\n\t\t\tString attributes = convertChildren(lgnode, lgatt);\n\t\t\tif(hashJoin.containsKey(attributes)){\n\t\t\t\tfor(Node smnode : hashJoin.get(attributes)){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(smnode);\n\t\t\t\t\tchild.addAll(findChild(lgnode));\n\t\t\t\t\tfor(Node childnode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childnode, true));\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(container);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private void buildTree() {\n if (treeBuilt) {\n return;\n }\n\n Vector gItems = protocol.getGroupItems();\n int gCount = gItems.size();\n for (int i = 0; i < gCount; ++i) {\n Group gItem = (Group)gItems.elementAt(i);\n gItem.updateContacts();\n gItem.updateGroupData();\n }\n\n TreeNode currentNode = getCurrentNode();\n TreeBranch root = getRoot();\n clear();\n root.setExpandFlag(false);\n boolean showOffline = !Options.getBoolean(Options.OPTION_CL_HIDE_OFFLINE);\n for (int groupIndex = 0; groupIndex < gCount; ++groupIndex) {\n Group group = (Group)gItems.elementAt(groupIndex);\n boolean isExpanded = group.isExpanded();\n group.setExpandFlag(false);\n cleanNode(group);\n Vector contacts = group.getContacts();\n int contactCount = contacts.size();\n for (int contactIndex = 0; contactIndex < contactCount; ++contactIndex) {\n Contact cItem = (Contact)contacts.elementAt(contactIndex);\n if (cItem.isVisibleInContactList()) {\n addNode(group, cItem);\n }\n }\n group.setExpandFlag(isExpanded);\n if (showOffline || (0 < group.getSubnodesCount())) {\n addNode(root, group);\n }\n }\n Vector cItems = getContactItems();\n int cCount = cItems.size();\n for (int contactIndex = 0; contactIndex < cCount; ++contactIndex) {\n Contact cItem = (Contact)cItems.elementAt(contactIndex);\n if ((Group.NOT_IN_GROUP == cItem.getGroupId()) && cItem.isVisibleInContactList()) {\n addNode(root, cItem);\n }\n }\n\n setCurrentNode(currentNode);\n root.setExpandFlag(true);\n updateMetrics();\n treeBuilt = true;\n }", "void merge_collapse() {\n while (this.n > 1) {\n int localN = this.n - 2;\n if (localN > 0 && this.len[localN-1] <= this.len[localN] + this.len[localN+1]) {\n if (this.len[localN-1] < this.len[localN+1])\n --localN;\n merge_at(localN);\n } else if (this.len[localN] <= this.len[localN+1]) {\n merge_at(localN);\n } else {\n break;\n }\n }\n }", "protected void recursiveInitialize(List<JoinPath> joinPaths, Object rootObj) throws OgnlException\n {\n\n Map<String, Object> joinPathMap = new HashMap<String, Object>();\n Map<String, Object> flatIndex = new HashMap<String, Object>();\n HashMap parentMap = new HashMap();\n parentMap.put(\"alias\",\"this\");\n parentMap.put(\"joinType\", JoinType.LEFT_JOIN);\n joinPathMap.put(\"this\", parentMap);\n flatIndex.put(\"this\", parentMap);\n\n for (JoinPath joinPath : joinPaths)\n {\n if(StringUtils.isBlank(joinPath.alias))\n {\n //kalo kosong lewati\n/*\n String[] pathArray = joinPath.path.split(\"[.]\");\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = pathArray[pathArray.length - 1];\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n*/\n }\n else\n {\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = joinPath.alias;\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n }\n }\n for (JoinPath joinPath : joinPaths)\n {\n String[] pathArray = joinPath.path.split(\"[.]\");\n if(pathArray.length>1)\n {\n //gabung alias ke pathnya\n //cari parent\n Map mapParent = (Map) flatIndex.get(pathArray[0]);\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[1]);\n }\n mapParent.put(pathArray[1], mapChild);\n }\n else\n {\n //gabung alias ke pathnya\n //cari parent -- this\n Map mapParent = (Map) flatIndex.get(\"this\");\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[0]);\n }\n mapParent.put(pathArray[0], mapChild);\n }\n }\n if(cleanUp((Map<String, Object>) joinPathMap.get(\"this\")))\n {\n if (Collection.class.isAssignableFrom(rootObj.getClass()))\n {\n for (Object rootObjIter : ((Collection) rootObj))\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObjIter, true);\n }\n }\n else\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObj, false);\n }\n }\n }", "void pairwiseCombine(){\n\t\t\n\t\tmin.Left.Right = min.Right;\n\t\tmin.Right.Left = min.Left;\n\t\t/**\n\t\tPairwise combine differentiates itself in operation of depending on the presence of a child node\n\t\t*/\n\t\t\n\t\tif(min.Child==null){\n\t\t/*map acts as the table to store similar degree nodes*/\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Right;\n\t\t\tmin = null;\n\t\t\tmin = current;\n\t\t\tlast = current.Left;\n\t\t\twhile(current!=last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\t\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\t\n\t\t\t\t\t/*Since a parent node can have only one child node a condition is checked to update its child node*/\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t/*If the node stored is less than the incoming node*/\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\tif(temp.Child == temp.Child.Right){\n\t\t\t\t\t\t\t\ttemp.Child.Right = current;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t/*If the incoming node is lower*/\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\t\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\t/*Since our condition is used only till last node and exits during last node the iteration is repeated for the last node*/\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\n\t\t}\n\t\telse{\n\t\t\tHashMap<Integer, Nodefh> map = new HashMap<Integer, Nodefh>();\n\t\t\tcurrent = min.Child;\n\t\t\tcurrent.Parent = null;\n\t\t\tif(min!=min.Right){\n\t\t\t\tcurrent.Right.Left = min.Left;\n\t\t\t\tmin.Left.Right = current.Right;\n\t\t\t\tcurrent.Right = min.Right;\n\t\t\t\tmin.Right.Left = current;\n\t\t\t\tlast = current.Left;\n\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tlast = current.Left;\n\n\t\t\t}\n\t\t\tmin =null;\n\t\t\tmin = current;\n\t\t\t/*In the presence of a child the child has to be inserted at the top level*/\n\t\t\twhile(current != last){\n\t\t\t\tNodefh check = new Nodefh();\n\t\t\t\tcheck = current.Right;\n\n\t\t\t\twhile(map.containsKey(current.degree)){\n\n\t\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\t\tif(temp.dist < current.dist){\n\t\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\t\tif(temp.isChildEmpty()){\n\n\t\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcurrent = temp;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(min.dist >= current.dist){\n\t\t\t\t\tmin = current;\n\n\t\t\t\t}\n\t\t\t\tmap.put(current.degree, current);\n\t\t\t\tcurrent = check;\n\t\t\t}\n\t\t\tlast = min.Left;\n\t\t\twhile(map.containsKey(current.degree)){\n\t\t\t\tNodefh temp = map.remove(current.degree);\n\t\t\t\tif(temp.dist < current.dist && temp.dist!=0){\n\t\t\t\t\tcurrent.Right.Left = current.Left;\n\t\t\t\t\tcurrent.Left.Right = current.Right;\n\t\t\t\t\ttemp.ChildCut = false;\n\t\t\t\t\tif(temp.isChildEmpty()){\n\t\t\t\t\t\ttemp.Child = current;\n\t\t\t\t\t\tcurrent.Left = current.Right = current;\n\t\t\t\t\t\ttemp.Child.Parent = temp;\n\t\t\t\t\t\ttemp.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tcurrent.Right = temp.Child;\n\t\t\t\t\t\tcurrent.Left = temp.Child.Left;\n\t\t\t\t\t\ttemp.Child.Left.Right = current;\n\t\t\t\t\t\ttemp.Child.Left = current;\n\t\t\t\t\t\tcurrent.Parent = temp;\n\t\t\t\t\t\ttemp.degree +=1;\n\t\t\t\t\t}\n\t\t\t\t\tcurrent = temp;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\ttemp.Right.Left = temp.Left;\n\t\t\t\t\ttemp.Left.Right = temp.Right;\n\t\t\t\t\tcurrent.ChildCut = false;\n\t\t\t\t\tif(current.isChildEmpty()){\n\t\t\t\t\t\tcurrent.Child = temp;\n\t\t\t\t\t\ttemp.Left = temp.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Parent = current;\n\t\t\t\t\t\tcurrent.degree = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\ttemp.Right = current.Child;\n\t\t\t\t\t\ttemp.Left = current.Child.Left;\n\t\t\t\t\t\tcurrent.Child.Left.Right = temp;\n\t\t\t\t\t\tcurrent.Child.Left = temp;\n\t\t\t\t\t\ttemp.Parent = current;\n\t\t\t\t\t\tcurrent.degree +=1;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(min.dist >= current.dist){\n\t\t\t\tmin = current;\n\n\t\t\t}\n\t\t\tcurrent = min;\n\t\t\tlast = min.Left;\n\t\t}\n\n\t}", "void updateParamAndModPanels(Object[] obj) {\n\n if ((obj == null) || (obj.length == 0)) {\n synchronized (basicPanel.getClusterPanel().getTreeLock()) {\n basicPanel.getClusterPanel().updateClusters(new Vector(), new Hashtable());\n }\n synchronized (basicPanel.getValPanel().getTreeLock()) {\n basicPanel.getValPanel().updateValues(new Vector());\n }\n synchronized (basicPanel.getModPanel().getTreeLock()) {\n basicPanel.getModPanel().updateList(new Vector());\n }\n return;\n }\n Hashtable nodes = new Hashtable();\n Hashtable nodeTreeSets = new Hashtable();\n Vector clusters = new Vector(getClusterList(obj[0], nodes, nodeTreeSets));\n Vector func = new Vector(getParamList(obj[0]));\n Vector modules = new Vector(getModuleList(obj[0]));\n TreeSet clusterSet = null;\n TreeSet funcSet = null;\n TreeSet moduleSet = null;\n if (!intersectSelected) {\n clusterSet = new TreeSet();\n auxiliarAdding(clusterSet, clusters);\n funcSet = new TreeSet();\n auxiliarAdding(funcSet, func);\n moduleSet = new TreeSet();\n auxiliarAdding(moduleSet, modules);\n }\n for (int i = 1; i < obj.length; i++) {\n if (intersectSelected) {\n intersectVectors(clusters, getClusterList(obj[i], nodes, nodeTreeSets));\n intersectVectors(func, getParamList(obj[i]));\n intersectVectors(modules, getModuleList(obj[i]));\n } else {\n reunionVectors(clusterSet, clusters, getClusterList(obj[i], nodes, nodeTreeSets));\n reunionVectors(funcSet, func, getParamList(obj[i]));\n reunionVectors(moduleSet, modules, getModuleList(obj[i]));\n }\n }\n func = order(func);\n modules = order(modules);\n synchronized (basicPanel.getClusterPanel().getTreeLock()) {\n basicPanel.getClusterPanel().updateClusters(clusters, nodes);\n }\n if (!basicPanel.getClusterPanel().areNodesSelected()) {\n synchronized (basicPanel.getValPanel().getTreeLock()) {\n basicPanel.getValPanel().updateValues(func);\n }\n }\n synchronized (basicPanel.getModPanel().getTreeLock()) {\n basicPanel.getModPanel().updateList(modules);\n }\n }", "private <X extends Jgxx> X buildTree(X root) {\n\t\tList<X> list = this.extendedModelProvider.find(EXTEND_MODEL_XTGL_ZHGL_JGXX_CODE, Jgxx.class, SELECT_PRE_SQL + \" WHERE J.LFT BETWEEN ? AND ? AND J.DELETED = 0 ORDER BY J.LFT\",\n\t\t\t\troot.getLft(), root.getRgt());\n\t\tStack<X> rightStack = new Stack<X>();\n\t\tfor (X node : list) {\n\t\t\tif (!rightStack.isEmpty()) {\n\t\t\t\twhile (rightStack.lastElement().getRgt() < node.getRgt()) {\n\t\t\t\t\trightStack.pop();\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!rightStack.isEmpty()) {\n\t\t\t\trightStack.lastElement().addChild(node);\n\t\t\t}\n\t\t\trightStack.push(node);\n\t\t}\n\t\treturn rightStack.firstElement();\n\t}", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "@Override\n public List<cScene> collectScenes() {\n List<Element> eScenes = root.getChild(\"library_visual_scenes\", ns).getChildren(\"visual_scene\", ns);\n List<cScene> scenes = new ArrayList<>();\n\n List<cCamera> cameras = collectCameras();\n List<cLight> lights = collectLights();\n List<cGeometry> geometries = collectGeometry();\n List<cMaterial> materials = collectMaterials();\n\n for (Element eScene : eScenes) {\n\n cScene scene = new cScene(); //<visual_scene>..\n scene.collect(eScene, ns);\n\n for (Element eNode : eScene.getChildren(\"node\", ns)) {\n\n cNode node = new cNode(); //<node>..\n node.collect(eNode, ns);\n\n Element eInstance_Nodes;\n cInstance_Node instance_node = null;\n if ((eInstance_Nodes = eNode.getChild(\"instance_light\", ns)) != null) { //<instance_..>..\n instance_node = new cInstance_Light();\n instance_node.collect(eInstance_Nodes, ns, lights);\n } else if ((eInstance_Nodes = eNode.getChild(\"instance_geometry\", ns)) != null) {\n instance_node = new cInstance_Geometry();\n\n Element eBind_Material;\n if ((eBind_Material = eInstance_Nodes.getChild(\"bind_material\", ns)) != null) {\n List<Element> instance_materials = eBind_Material.getChild(\"technique_common\",ns).getChildren(\"instance_material\",ns);\n\n for (Element eInstMaterial : instance_materials) {\n cInstance_Geometry.Instance_Material instance_material = ((cInstance_Geometry)instance_node).getInstanceMaterial();\n instance_material.collect(eInstMaterial, ns, materials);\n ((cInstance_Geometry)instance_node).boundedMaterials.add(instance_material);\n }\n }\n instance_node.collect(eInstance_Nodes, ns, geometries);\n }\n else if ((eInstance_Nodes = eNode.getChild(\"instance_camera\", ns)) != null) {\n instance_node = new cInstance_Camera();\n instance_node.collect(eInstance_Nodes, ns, cameras);\n }\n node.instanceNode = instance_node;\n scene.nodes.add(node);\n }\n scenes.add(scene);\n }\n\n cameras = null;\n lights = null;\n geometries = null;\n materials = null;\n\n return scenes;\n }", "private boolean [][] buildConnectionMatrix(ArrayList<Integer> st) throws Exception{\n \tboolean [][] canReach=new boolean[st.size()][st.size()]; //initial values of boolean is false in JAVA\n\t\tfor(int i=0;i<st.size();i++) canReach[i][i]=true;\n\t\t//build connection matrix\n \tfor(TreeAutomaton ta:lt)\n \t\tfor(Transition tran:ta.getTrans()){\n \t\t\tint topLoc=st.indexOf(tran.getTop());\n \t\t\tfor(SubTerm t:tran.getSubTerms()){\n \t\t\t\tif(boxes.containsKey(t.getSubLabel())){//the case of a box transition\n \t\t\t\t\tBox box=boxes.get(t.getSubLabel());\n \t\t\t\t\tfor(int i=0;i<box.outPorts.size();i++){\n\t\t\t\t\t\t\tint botLoc_i=st.indexOf(t.getStates().get(i));\n \t\t\t\t\tfor(int j=0;j<box.outPorts.size();j++){\n \t\t\t\t\t\t\tint botLoc_j=st.indexOf(t.getStates().get(j));\n \t\t\t\t\t\tif(box.checkPortConnections(box.outPorts.get(i), box.outPorts.get(j)))//handle outport->outport\n \t\t\t\t\t\t\tcanReach[botLoc_i][botLoc_j]=true;\n \t\t\t\t\t}\n \t\t\t\t\t\tif(box.checkPortConnections(box.outPorts.get(i), box.inPort))//handle outport->inport\n \t\t\t\t\t\t\tcanReach[botLoc_i][topLoc]=true;\n \t\t\t\t\t\tif(box.checkPortConnections(box.inPort, box.outPorts.get(i)))//handle inport->outport\n \t\t\t\t\t\t\tcanReach[topLoc][botLoc_i]=true;\n \t\t\t\t\t}\n \t\t\t\t}else{ \n \t\t\t\t\tint rootRef=ta.referenceTo(tran.getTop());\n \t\t\t\t\tif(rootRef!=-1){//root reference\n \t\t \t\t\tint refLoc=st.indexOf(rootRef);\n \t\t\t\t\t\tcanReach[topLoc][refLoc]=true;\n\t \t\t\t\t}else{//normal transition\n\t \t\t\t\t\n\t \t\t\t\t\tfor(int bot:t.getStates()){\n\t \t\t \t\t\tint botLoc=st.indexOf(bot);\n\t \t\t\t\t\t\tcanReach[topLoc][botLoc]=true;\n\t \t\t\t\t\t}\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \treturn canReach;\n }", "public void apply(at.ac.tuwien.dsg.mela.common.monitoringConcepts.ServiceMonitoringSnapshot serviceMonitoringSnapshot) {\n\n //1'step extract the monitoring data for the target service elements\n Map<MonitoredElement, MonitoredElementMonitoringSnapshot> levelMonitoringData = serviceMonitoringSnapshot.getMonitoredData(targetMonitoredElementLevel);\n\n if (levelMonitoringData == null) {\n Logger.getRootLogger().log(Level.WARN, \"Level \" + targetMonitoredElementLevel + \" not found in monitoring data\");\n return;\n }\n\n Collection<MonitoredElementMonitoringSnapshot> toBeProcessed = new ArrayList<MonitoredElementMonitoringSnapshot>();\n\n //step 2\n //if target IDs have ben supplied, use them to extract only the monitoring data for the target elements, else process all elements on this level\n if (targetMonitoredElementIDs.isEmpty()) {\n //if all on level, get each elementy data, and add its children data. Might destroy the data in the long run\n Collection<MonitoredElementMonitoringSnapshot> levelData = levelMonitoringData.values();\n for (MonitoredElementMonitoringSnapshot levelElementData : levelData) {\n\n toBeProcessed.add(levelElementData);\n }\n } else {\n for (String id : targetMonitoredElementIDs) {\n\n //TODO: an issue is that in the MonitoredElementMonitoringSnapshot I do NOT hold the children snapshots.\n //So now I follow the MonitoredElement children, get their MonitoredElementMonitoringSnapshot, and enrich the MonitoredElementMonitoringSnapshot supplied to the operations\n MonitoredElement element = new MonitoredElement(id);\n if (levelMonitoringData.containsKey(element)) {\n MonitoredElementMonitoringSnapshot elementData = levelMonitoringData.get(element);\n toBeProcessed.add(elementData);\n } else {\n Logger.getRootLogger().log(Level.WARN, \"Element with ID \" + id + \" not found in monitoring data\");\n }\n }\n }\n //step 3 \n //for each MonitoredElementMonitoringSnapshot apply composition rule and enrich monitoring data in place\n for (MonitoredElementMonitoringSnapshot snapshot : toBeProcessed) {\n\n MetricValue result = operation.apply(snapshot);\n// resultingMetric.setMonitoredElement(snapshot.getMonitoredElement());\n if (result != null) {\n //put new composite metric\n snapshot.putMetric(resultingMetric, result);\n }\n }\n }", "public ArrayList<ArrayList<Integer>> sequenceOfGroups(){\n\t\tArrayList<ArrayList<Integer>> tempResult = new ArrayList<ArrayList<Integer>>();\n\t\tArrayList<ArrayList<Integer>> finalResult = new ArrayList<ArrayList<Integer>>();\n\t\ttempResult.add(new ArrayList<Integer>());\n\t\tfor(int i=1;i<=payload.getnumber_of_such_that_predicates();i++) {\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tlist.add(0);\n\t\t\tString str=payload.getsuch_that_predicates().get(i);\n\t\t\tfor(int j=1;j<=payload.getnumber_of_such_that_predicates(); j++) {\n\t\t\t\tif(i!=j && (str.contains(j+\".\") || str.contains(j+\"_\"))) list.add(j);\n\t\t\t}\n\t\t\ttempResult.add(list);\n\t\t}\n\t\t\n\t\tfor(int k=0; k<=payload.getnumber_of_such_that_predicates(); k++) {\n\t\t\t\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i=0;i<=payload.getnumber_of_such_that_predicates();i++) {\n\t\t\t\tif(tempResult.get(i)!=null && tempResult.get(i).size()==0) {\n\t\t\t\t\ttempResult.set(i,null);\n\t\t\t\t\tlist.add(i);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(list.size()==0) break;\n\t\t\tfinalResult.add(list);\n\t\t\tfor(int i=0;i<=payload.getnumber_of_such_that_predicates();i++) {\n\t\t\t\tif(tempResult.get(i)==null) continue;\n\t\t\t\tfor(int j=0; j <list.size(); j++) {\n\t\t\t\t\ttempResult.get(i).remove(Integer.valueOf(list.get(j)));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn finalResult;\n\t}", "public static List<Integer> getMulti(List<Integer> resList) {\r\n\t\tList<Integer> multiList = new ArrayList<Integer>();\r\n\t\tint depth1 = 0;// hit\r\n\t\tint depth2 = 0;\r\n\r\n\t\tmultiList.add(1);\r\n\t\tmultiList.add(1);\r\n\t\tfor (int i = 2; i < resList.size(); i++) {\r\n\r\n\t\t\tif (i < 11) {\r\n\t\t\t\tdepth1 = ConditionUtil.getHitDepth(resList.subList(0, i));\r\n\t\t\t\tdepth2 = ConditionUtil.getNotHitDepth(resList.subList(0, i));\r\n\t\t\t} else {\r\n\t\t\t\tdepth1 = ConditionUtil.getHitDepth(resList.subList(i - 10, i));\r\n\t\t\t\tdepth2 = ConditionUtil.getNotHitDepth(resList\r\n\t\t\t\t\t\t.subList(i - 10, i));\r\n\t\t\t}\r\n\r\n\t\t\tif (depth1 > 0) {\r\n\t\t\t\tmultiList.add(3);\r\n\t\t\t} else if(depth2 >0){\r\n\t\t\t\tif(depth2 == 1){\r\n\t\t\t\t\tmultiList.add(7);\r\n\t\t\t\t}else if(depth2 == 2){\r\n\t\t\t\t\tmultiList.add(15);\r\n\t\t\t\t}else if(depth2 == 3){\r\n\t\t\t\t\tmultiList.add(34);\r\n\t\t\t\t}else if(depth2 == 4){\r\n\t\t\t\t\tmultiList.add(77);\r\n\t\t\t\t}else if(depth2 == 5){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 6){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 7){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 8){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 9){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 10){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 11){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 12){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 == 13){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}else if(depth2 > 14){\r\n\t\t\t\t\tmultiList.add(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn multiList;\r\n\t}", "private static ListExpression makeAbstractSyntaxTree(final ParseTree<Grammar> parseTree, final DefinedMailingLists definedMailingLists) {\n switch(parseTree.name()){\n case ROOT:\n {\n final ParseTree<Grammar> child = parseTree.children().get(0);\n return makeAbstractSyntaxTree(child, definedMailingLists);\n }\n\n case UNION:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeUnion(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case INTERSECTION:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeIntersection(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case DIFFERENCE:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeDifference(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case SEQUENCE:\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeSequence(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n\n case MAILINGLIST: //defining a mailing list\n {\n final List<ParseTree<Grammar>> children = parseTree.children();\n final String name = children.get(0).text(); //name of mailing list\n ListExpression expression = makeAbstractSyntaxTree(children.get(1),definedMailingLists);\n ListExpression newMailingList = ListExpression.makeMailingList(name, expression);\n definedMailingLists.addMailingList(name, newMailingList); //now a defined list\n return newMailingList;\n }\n case EMAIL:\n {\n final String email = parseTree.text();\n if (email.equals(\"\")){\n return ListExpression.makeEmpty();\n }\n return ListExpression.makeEmail(email);\n }\n case NAME:\n {\n final String name = parseTree.text();\n if (definedMailingLists.getMailingLists().containsKey(name)){\n return definedMailingLists.getMailingLists().get(name);\n }\n throw new AssertionError(\"mailing list does not exist:\"+name);\n\n }\n case PAREN:\n { \n final ParseTree<Grammar> child = parseTree.children().get(0);\n switch(child.name()){\n case UNION: {\n final List<ParseTree<Grammar>> children = parseTree.children();\n ListExpression expression = makeAbstractSyntaxTree(children.get(0),definedMailingLists);\n for (int i = 1; i < children.size(); ++i) {\n expression = ListExpression.makeUnion(expression, makeAbstractSyntaxTree(children.get(i),definedMailingLists));\n }\n return expression;\n }\n case NAME: {\n final String name = parseTree.text();\n if (definedMailingLists.getMailingLists().containsKey(name)){\n return definedMailingLists.getMailingLists().get(name);\n }\n throw new AssertionError(\"mailing list does not exist\");\n }\n case EMAIL: {\n final String email = parseTree.text();\n if (email.equals(\"\")){\n return ListExpression.makeEmpty();\n }\n return ListExpression.makeEmail(email);\n }\n default:\n throw new AssertionError(\"should never get here!\"); \n }\n }\n default:\n throw new AssertionError(\"should never get here!\"); \n }\n }", "public enumerateMultiMotifsParallel(int[][] adjMatrix, ArrayList<comNodeAtom> nodeList,\r\n\t\t\tHashMap<Integer, Integer> nodeTypeMap)\r\n\t{\r\n\t\tthis.adjMatrix = adjMatrix;\r\n\t\tthis.nodeList = nodeList;\r\n\t\tthis.nodeTypeMap = nodeTypeMap;\r\n\t\t//isoGraphMap = new HashMap<String, ArrayList<ArrayList<Integer>>>();\r\n\t\t//countSubgraph = new HashMap<String, Integer>();\r\n\t\tmicroRNAList = new ArrayList<Integer>();\r\n\t\ttFactorList = new ArrayList<Integer>();\r\n\t\tgeneList = new ArrayList<Integer>();\r\n\t\t\r\n\t\toverallGeneList = new ArrayList<Integer>();\r\n\t\t\r\n\t\tfor(int i = 0;i < nodeList.size();i++)\r\n\t\t{\r\n\t\t\tcomNodeAtom curAtom = nodeList.get(i);\r\n\t\t\tif(curAtom.nodeType == 0)\r\n\t\t\t{\r\n\t\t\t\tmicroRNAList.add(curAtom.nodeID);\r\n\t\t\t}\r\n\t\t\telse if(curAtom.nodeType == 1)\r\n\t\t\t{\r\n\t\t\t\ttFactorList.add(curAtom.nodeID);\r\n\t\t\t}\r\n\t\t\telse if(curAtom.nodeType == 2)\r\n\t\t\t{\r\n\t\t\t\tgeneList.add(curAtom.nodeID);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tSystem.err.println(\"Oh you must be kidding me.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "void doMcTree() throws NotConnectedException, NotSuspendedException, NoResponseException\n\t{\n\t\t/* wait a bit if we are not halted */\n\t\twaitTilHalted();\n\t\ttry\n\t\t{\n\t\t\tString var = nextToken(); // our variable reference\n\t\t\tString member = \"_target\"; //$NON-NLS-1$\n\t\t\tboolean printPath = false;\n\t\t\tObject result = null;\n\t\t\tString name = null;\n\n\t\t\t// did the user specify a member name\n\t\t\tif (hasMoreTokens())\n\t\t\t{\n\t\t\t\tmember = nextToken();\n\n\t\t\t\t// did they specify some other options\n\t\t\t\twhile(hasMoreTokens())\n\t\t\t\t{\n\t\t\t\t\tString option = nextToken();\n\t\t\t\t\tif (option.equalsIgnoreCase(\"fullpath\")) //$NON-NLS-1$\n\t\t\t\t\t\tprintPath = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// first parse it, then attempt to evaluate the expression\n\t\t\tValueExp expr = parseExpression(var);\n\t\t\tresult = evalExpression(expr).value;\n\n\t\t\tStringBuilder sb = new StringBuilder();\n\n\t\t\tif (result instanceof Variable)\n\t\t\t{\n\t\t\t\tname = ((Variable)result).getName();\n\t\t\t\tresult = ((Variable)result).getValue();\n\t\t\t}\n\n\t\t\t// It worked an should now be a value that we can traverse looking for member properties\n\n\t\t\tif (result instanceof Value)\n\t\t\t{\n\t\t\t\tArrayList<Object> e = new ArrayList<Object>();\n\t\t\t\tdumpTree(new HashMap<Object, String>(), e, name, (Value)result, member);\n\n\t\t\t\t// now sort according to our criteria\n\t\t\t\ttreeResults(sb, e, member, printPath);\n\t\t\t}\n\t\t\telse\n\t\t\t\tthrow new NoSuchVariableException(result);\n\n\t\t\tout( sb.toString() );\n\t\t}\n\t\tcatch(NoSuchVariableException nsv)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"variable\", nsv.getMessage()); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"variableUnknown\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"couldNotEvaluate\")); //$NON-NLS-1$\n\t\t}\n\t}", "public static void builtTree\n ( ArrayList<DefaultMutableTreeNode> treeArray , \n int recursion , DefaultMutableTreeNode selected , \n boolean enableDirs , boolean enableFiles )\n {\n int m;\n if (recursion<0) { m = DEFAULT_RECURSION_LIMIT; }\n else { m = recursion; }\n for ( int k=0; k<m; k++ )\n {\n boolean request = false;\n // Start cycle for entries\n int n = treeArray.size();\n for ( int i=0; i<n; i++ )\n {\n DefaultMutableTreeNode x1 = treeArray.get(i);\n // Support selective mode, skip if not selected\n if ( (selected != null) & ( selected != x1 ) ) continue;\n // Analyse current entry, skip if already handled\n ListEntry x2 = (ListEntry)x1.getUserObject();\n if ( x2.handled == true ) continue;\n request = true;\n x2.failed = false;\n // Start handling current entry\n String x3 = x2.path;\n File file1 = new File( x3 );\n boolean exists1 = file1.exists();\n boolean directory1=false;\n if (exists1) { directory1 = file1.isDirectory(); }\n // Handling directory: make list of childs directories/files\n if ( exists1 & directory1 )\n {\n String[] list = file1.list();\n int count=0;\n if ( list != null ) count = list.length;\n for ( int j=0; j<count; j++ )\n {\n String s1 = list[j];\n String s2 = x3+\"/\"+s1;\n File file2 = new File(s2);\n boolean dir = file2.isDirectory();\n if ( ( enableDirs & dir ) | ( enableFiles & !dir ) )\n {\n ListEntry y1 = \n new ListEntry ( s1, \"\", s2, false, false );\n DefaultMutableTreeNode y2 = \n new DefaultMutableTreeNode( y1 );\n treeArray.add( y2 );\n x1.add( y2 );\n x1.setAllowsChildren( true ); // this entry is DIRECTORY\n }\n }\n }\n // Handling file: read content\n if ( exists1 & !directory1 )\n {\n int readSize = 0;\n //\n StringBuilder data = new StringBuilder(\"\");\n FileInputStream fis;\n byte[] array = new byte[BUFFER_SIZE];\n try \n { \n fis = new FileInputStream(file1);\n readSize = fis.read(array); \n fis.close();\n }\n catch ( Exception e ) \n // { data = \"N/A : \" + e; x2.failed=true; }\n { data.append( \"N/A : \" + e ); x2.failed = true; }\n char c1;\n for (int j=0; j<readSize; j++)\n { \n c1 = (char)array[j];\n // if ( (c1=='\\n') | (c1=='\\r') ) { data = data + \" \"; }\n if ( ( c1 == '\\n' ) | (c1 == '\\r' ) ) { data.append( \" \" ); }\n else \n { \n if ( ( c1 < ' ' )|( c1 > 'z' ) ) { c1 = '_'; }\n // data = data + c1;\n data.append( c1 );\n }\n }\n x2.name2 = data.toString();\n x2.leaf = true;\n x1.setAllowsChildren( false ); // this entry is FILE\n }\n // End cycle for entries\n x2.handled = true;\n }\n // End cycle for recursion\n if (request==false) break;\n }\n }", "public void setStructExprRecog(LinkedList<StructExprRecog> listChildren) {\n mnExprRecogType = EXPRRECOGTYPE_LISTCUT;\n mType = UnitProtoType.Type.TYPE_UNKNOWN;\n mstrFont = UNKNOWN_FONT_TYPE;\n mlistChildren = new LinkedList<StructExprRecog>();\n mlistChildren.addAll(listChildren);\n int nLeft = Integer.MAX_VALUE, nTop = Integer.MAX_VALUE, nRightPlus1 = Integer.MIN_VALUE, nBottomPlus1 = Integer.MIN_VALUE;\n int nTotalArea = 0, nTotalValidChildren = 0;\n double dSumWeightedSim = 0;\n double dSumSimilarity = 0;\n for (StructExprRecog ser: mlistChildren) {\n if (ser.mnLeft == 0 && ser.mnTop == 0 && ser.mnHeight == 0 && ser.mnWidth == 0) {\n continue; // this can happen in some extreme case like extract2Recog input is null or empty imageChops\n // to avoid jeapodize the ser place, skip.\n }\n if (ser.mnLeft < nLeft) {\n nLeft = ser.mnLeft;\n }\n if (ser.mnLeft + ser.mnWidth > nRightPlus1) {\n nRightPlus1 = ser.mnLeft + ser.mnWidth;\n }\n if (ser.mnTop < nTop) {\n nTop = ser.mnTop;\n }\n if (ser.mnTop + ser.mnHeight > nBottomPlus1) {\n nBottomPlus1 = ser.mnTop + ser.mnHeight;\n }\n nTotalArea += ser.getArea();\n dSumSimilarity += ser.getArea() * ser.mdSimilarity;\n nTotalValidChildren ++;\n dSumSimilarity += ser.mdSimilarity;\n }\n mnLeft = nLeft;\n mnTop = nTop;\n mnWidth = nRightPlus1 - nLeft;\n mnHeight = nBottomPlus1 - nTop;\n \n mimgChop = null;\n if (nTotalArea > 0) {\n mdSimilarity = dSumSimilarity / nTotalArea;\n } else {\n mdSimilarity = dSumSimilarity / nTotalValidChildren;\n }\n }", "private List<Object> handleAggregates(List<Object> resultSet)\n {\n final Expression[] grouping = compilation.getExprGrouping();\n Comparator<Object> c = new Comparator<>()\n {\n public int compare(Object arg0, Object arg1)\n {\n for (int i=0; i<grouping.length; i++)\n {\n state.put(candidateAlias, arg0);\n Object a = grouping[i].evaluate(evaluator);\n state.put(candidateAlias, arg1);\n Object b = grouping[i].evaluate(evaluator);\n // Put any null values at the end\n if (a == null && b == null)\n {\n return 0;\n }\n else if (a == null)\n {\n return -1;\n }\n else if (b == null)\n {\n return 1;\n }\n else\n {\n int result = ((Comparable)a).compareTo(b);\n if (result != 0)\n {\n return result;\n }\n }\n }\n return 0;\n }\n };\n \n List<List<Object>> groups = new ArrayList<>();\n List<Object> group = new ArrayList<>();\n groups.add(group);\n for (int i=0; i<resultSet.size(); i++)\n {\n if (i > 0)\n {\n if (c.compare(resultSet.get(i-1), resultSet.get(i)) != 0)\n {\n group = new ArrayList<>();\n groups.add(group);\n }\n }\n group.add(resultSet.get(i));\n }\n List<Object> result = new ArrayList<>();\n Expression having = compilation.getExprHaving();\n if (having != null)\n {\n for (int i=0; i<groups.size(); i++)\n {\n if (satisfiesHavingClause(groups.get(i)))\n {\n result.addAll(groups.get(i));\n }\n }\n }\n else\n {\n for (int i = 0; i < groups.size(); i++)\n {\n result.addAll(groups.get(i));\n }\n }\n return result;\n }", "public void runMaxProductAndDecompose() throws AlgorithmException\n {\n Submodel invariant = recursiveMaxProduct();\n \n logger.info(\"submodels before merge\");\n DataPrinter.printSubmodels(\"submodels.dat\", _submodels);\n \n // merge submodels\n _submodels = SubmodelAlgorithms.mergeSubmodelsByIndepVar(_submodels);\n\n //_submodels = SubmodelAlgorithms.mergeSubmodels(_submodels);\n\n DataPrinter.printSubmodels(\"merged-models.dat\", _submodels);\n \n // filter submodels that do not explain any knockout effects\n if(filter)\n {\n for(ListIterator it = _submodels.listIterator(); it.hasNext();)\n {\n Submodel m = (Submodel) it.next(); \n int numKO = countKO(m);\n m.setNumExplainedKO(numKO);\n if( numKO < 3 )\n {\n logger.info(\"Submodel \" + m.getId() + \" explains no KO's\");\n \n it.remove();\n }\n }\n }\n\n // make the invariant model the first submodel\n _submodels.add(0, invariant);\n \n // annotate edges of submodel\n _fg.annotateSubmodelEdges(_submodels);\n\n // print submodels\n logger.info(\"### Decomposed models: \" + _submodels.size());\n \n for(Iterator it = _submodels.iterator(); it.hasNext();)\n {\n logger.info(_fg.toString((Submodel) it.next()));\n }\n \n logger.info(\"### Found \" + _submodels.size() + \" submodels\");\n \n // send submodels to interaction graph\n _fg.getInteractionGraph().setSubmodels(_submodels);\n }", "@Override\n public Object visit(ASTJoinList node, Object data) {\n\t\tint indent = (Integer) data;\n\t\tprintIndent(indent);\n\t\t\n\t\tSystem.out.print(\"[\");\n\t\tint numOfChild = node.jjtGetNumChildren();\n\t\tboolean first = true;\n\t\tfor (int i = 0; i < numOfChild; i++) {\n\t\t\tif (first)\n\t\t\t\tfirst = false;\n\t\t\telse\n\t\t\t\tSystem.out.print(\", \");\n\t\t\tnode.jjtGetChild(i).jjtAccept(this, data);\n\t\t}\n\t\tSystem.out.print(\"]\");\n\t return null;\n }", "private void populateTree(DefaultMutableTreeNode top, KIDSUIEventComponent eventUIC, KIDSUITimePeriodComponent timeUIC){\n\t\tSet<KIDSUISignalComponent> sigset = controller.getEvaluableSignals(eventUIC, timeUIC);\n\n\t\tDefaultMutableTreeNode signals = new DefaultMutableTreeNode(\"Signals\");\n\t\t\n\t\tfor (KIDSUISignalComponent sig : sigset){\n\t\t\tDefaultMutableTreeNode sigNode = new DefaultMutableTreeNode(sig.getIRI().getShortForm());\n\t\t\tsigNode.setUserObject(sig);\n\t\t\tsignals.add(sigNode);\n\t\t}\n\t\ttop.add(signals);\n\t\t\n\t\t// Build list of compatible datasets -- from isEvaluatedBy\n\t\tSet<KIDSUIDatasetComponent> datset = controller.getEvaluableDatasets(eventUIC, timeUIC);\n\t\tDefaultMutableTreeNode datasets = new DefaultMutableTreeNode(\"Datasets\");\n\t\t\n\t\tfor (KIDSUIDatasetComponent dat : datset){\n\t\t\tDefaultMutableTreeNode datNode = new DefaultMutableTreeNode(dat.getIRI().getShortForm());\n\t\t\tdatNode.setUserObject(dat);\n\t\t\tdatasets.add(datNode);\n\t\t}\n\t\ttop.add(datasets);\n\t\t\n\t\t// Build list of compatible detectors -- from isIdentifiedByDetector\n\t\tSet<KIDSUIDetectorComponent> detset = controller.getEvaluableDetectors(eventUIC, timeUIC);\n\t\tDefaultMutableTreeNode detectors = new DefaultMutableTreeNode(\"Detectors\");\n\t\t\n\t\tfor (KIDSUIDetectorComponent det : detset){\n\t\t\tDefaultMutableTreeNode detNode = new DefaultMutableTreeNode(det.getIRI().getShortForm());\n\t\t\tdetNode.setUserObject(det);\n\t\t\tdetectors.add(detNode);\n\t\t}\n\t\ttop.add(detectors);\n\t}", "public List<Component> getAllTree() {\n\t\tList<Component> ret = new ArrayList<>();\n\t\tret.add(this);\n\t\tfor (Component c : getChilds()) {\n\t\t\tList<Component> childs = c.getAllTree();\n\t\t\t// retire les doublons\n\t\t\tfor (Component c1 : childs) {\n\t\t\t\tif (!ret.contains(c1)) {\n\t\t\t\t\tret.add(c1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public void makeAllCollapse(GraphData data){\r\n// \t\tSystem.out.println(\"Collapsing all..\");\r\n \t\tcollapsingList.clear();\r\n \t\tthis.collapsingList.add(new Integer(0));\r\n \t\tfor (int i=1;i<data.nnodes; i++){\r\n \t\t\tif ((data.nodes[i].inDegree > 1) || (data.nodes[i].outDegree>1))\r\n \t\t\t\t\tthis.collapsingList.add(new Integer(i));\r\n \t\t\t}\r\n \t\tthis.clearCollapseList(data);\r\n\t\tthis.unCollaspeAll(data);\r\n\t\tthis.collapseAll(data);\r\n \t}", "public final float[][] reconstructedLevelSets() {\n \tfloat[][] levelsets = new float[nobj][nx*ny*nz];\n \tfor (int n=0;n<nobj;n++) {\n \t\tfor (int xyz=0; xyz<nx*ny*nz; xyz++) {\n \t\t\tif (mgdmlabels[0][xyz]==n) levelsets[n][xyz] = -mgdmfunctions[0][xyz];\n \t\t\telse levelsets[n][xyz] = 0.0f;\n \t\t\t\n \t\t\tfor (int l=0;l<nmgdm && mgdmlabels[l][xyz]!=n;l++) {\n \t\t\t\tlevelsets[n][xyz] += mgdmfunctions[l][xyz];\n \t\t\t}\n \t\t}\n \t}\n \treturn levelsets;\n }", "private static int[][] grab(List<RelNode> leaves, RexNode rex) {\n switch (rex.getKind()) {\n case EQUALS:\n break;\n default:\n throw new AssertionError(\"only equi-join allowed\");\n }\n final List<RexNode> operands = ((RexCall) rex).getOperands();\n return new int[][] {\n inputField(leaves, operands.get(0)),\n inputField(leaves, operands.get(1))};\n }", "private void multiLeafUpdate()\r\n {\n \t\tfor (int i=0;i<this.allCols.size();i++)\r\n \t{\r\n \t\t\tif (this.allCols.get(i).endsWith(HEADER))\r\n \t\t\t{\r\n \t\t\t\tString headerCol=this.allCols.get(i);\r\n \t\t\t\tString col=this.allCols.get(i).replace(HEADER, \"\");\r\n \t\t\t\t\r\n \t\t\t\tthis.requete.append(\"\\n UPDATE \"+this.tempTableA+\" SET i_\"+headerCol+\"=i_\"+col+\" WHERE i_\"+headerCol+\" IS NULL and i_\"+col+\" IS NOT NULL;\");\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n }", "public List<Configuration> solve(){\n int group = 0;\n for(List<Configuration> set : input){\n minimize(set);\n\n for(Configuration root : set) {\n root.setGroup(group);\n }\n group++;\n\n }\n\n // Step 2: Preprocess\n sortBySize(input);\n\n // Step 5: Initialize set of partial solutions\n List<Configuration> partialSolutions;\n if(input.size()==0){\n return null;\n }\n else {\n partialSolutions = input.get(0);\n input.remove(partialSolutions);\n }\n\n // Step 6: The compositional computations\n for(List<Configuration> set : input) {\n filter(partialSolutions, setCutoff);\n filter(set, setCutoff);\n partialSolutions = combine(partialSolutions, set, constraints);\n }\n\n // Step 7: Postprocessing\n //greedyPostProcessing(partialSolutions);\n\n return partialSolutions;\n }", "@Override\n\tpublic void buildBVH() {\n\t\tif(this.bvhObjList.size()<=4) {\n\t\t}else {\n\t\t BVH nebt1 = new BVH(this.bvHi);\n\t\t BVH nebt2 = new BVH(this.bvHi);\n\t\tint tmp = this.calculateSplitDimension(this.bvhBox.getMax().sub(this.bvhBox.getMin()));\n\t\tfloat splitpos;\n\t\tif(tmp==0) {\n\t\t\tsplitpos = this.calculateMinMax().b.avg(this.calculateMinMax().a).x();\n\t\t}else if(tmp==1) {\n\t\t\tsplitpos = this.calculateMinMax().b.avg(this.calculateMinMax().a).y();\n\t\t}else {\n\t\t\tsplitpos = this.calculateMinMax().b.avg(this.calculateMinMax().a).z();\n\t\t\t\n\t\t}\n\t\tthis.distributeObjects(nebt1, nebt2, tmp, splitpos);\n\t\tthis.bvHi.add(nebt1);\n\t\tthis.neb1 = bvHi.indexOf(nebt1);\n\t\tthis.bvHi.add(nebt2);\n\t\tthis.neb2 = bvHi.indexOf(nebt2);\n\t\tnebt2.buildBVH();\n\t\tnebt1.buildBVH();\n\n\t\t}\n\t}", "private void computeConflicts() {\n\t\tthis.conflictGraph = new HashMap<Class, List<Class>>();\n\n\t\tfor (Class c : this.core) {\n\t\t\tif (c.getSuperClasses().size() >= 2) {\n\n\t\t\t\tList<List<Class>> linExts = new ArrayList<List<Class>>();\n\t\t\t\tfor (int i = 0; i < c.getSuperClasses().size(); i++) {\n\t\t\t\t\tlinExts.add(this.linearExts.get(c.getSuperClasses().get(i)));\n\t\t\t\t\tlinExts.get(i).add(c.getSuperClasses().get(i));\n\t\t\t\t}\n\n\t\t\t\tList<HashSet<Class>> diffs = new ArrayList<HashSet<Class>>();\n\n\t\t\t\t// Compute lini - linj for all i != j\n\t\t\t\tfor (List<Class> linExt : linExts) {\n\t\t\t\t\tfor (List<Class> linExt2 : linExts) {\n\t\t\t\t\t\tif (linExt != linExt2) {\n\t\t\t\t\t\t\tHashSet<Class> diff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt2) {\n\t\t\t\t\t\t\t\tif (!linExt.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\n\t\t\t\t\t\t\tdiff = new HashSet<Class>();\n\t\t\t\t\t\t\tfor (Class p : linExt) {\n\t\t\t\t\t\t\t\tif (!linExt2.contains(p))\n\t\t\t\t\t\t\t\t\tdiff.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tdiffs.add(diff);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Compute conflicts di * dj for all j != i\n\t\t\t\tfor (HashSet<Class> diff : diffs) {\n\t\t\t\t\tfor (HashSet<Class> diff2 : diffs) {\n\t\t\t\t\t\tif (diff != diff2) {\n\t\t\t\t\t\t\tfor (Class c1 : diff) {\n\t\t\t\t\t\t\t\tList<Class> conflicts = new ArrayList<Class>();\n\t\t\t\t\t\t\t\tif (this.conflictGraph.containsKey(c1))\n\t\t\t\t\t\t\t\t\tconflicts = this.conflictGraph.get(c1);\n\n\t\t\t\t\t\t\t\tfor (Class c2 : diff2) {\n\t\t\t\t\t\t\t\t\tconflicts.add(c2);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.conflictGraph.put(c1, conflicts);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public StructExprRecog preRestructHDivSer4MatrixMExprs(StructExprRecog ser) {\n switch(ser.mnExprRecogType) {\n case StructExprRecog.EXPRRECOGTYPE_HBLANKCUT: {\n LinkedList<StructExprRecog> listNewSers = new LinkedList<StructExprRecog>();\n for (int idx = 0; idx < ser.mlistChildren.size(); idx ++) {\n StructExprRecog serNewChild = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.get(idx));\n if (serNewChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT) {\n listNewSers.addAll(serNewChild.mlistChildren);\n } else {\n listNewSers.add(serNewChild);\n }\n }\n StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues);\n serReturn.setStructExprRecog(listNewSers, StructExprRecog.EXPRRECOGTYPE_HBLANKCUT); // listNewSers size should be > 1\n return serReturn;\n } case StructExprRecog.EXPRRECOGTYPE_HLINECUT: {\n StructExprRecog serNewNumerator = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.getFirst());\n StructExprRecog serNewDenominator = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.getLast());\n if (serNewNumerator.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT\n && serNewDenominator.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) {\n return ser;\n }\n LinkedList<StructExprRecog> listSersAbove = new LinkedList<StructExprRecog>();\n if (serNewNumerator.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n listSersAbove.addAll(serNewNumerator.mlistChildren);\n serNewNumerator = listSersAbove.removeLast();\n }\n LinkedList<StructExprRecog> listSersBelow = new LinkedList<StructExprRecog>();\n if (serNewDenominator.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n listSersBelow.addAll(serNewDenominator.mlistChildren);\n serNewDenominator = listSersBelow.removeFirst();\n }\n StructExprRecog serNewHLnCut = new StructExprRecog(ser.mbarrayBiValues);\n LinkedList<StructExprRecog> listNewHLnCut = new LinkedList<StructExprRecog>();\n listNewHLnCut.add(serNewNumerator);\n listNewHLnCut.add(ser.mlistChildren.get(1));\n listNewHLnCut.add(serNewDenominator);\n serNewHLnCut.setStructExprRecog(listNewHLnCut, EXPRRECOGTYPE_HLINECUT);\n LinkedList<StructExprRecog> listNewChildren = listSersAbove;\n listNewChildren.add(serNewHLnCut);\n listNewChildren.addAll(listSersBelow);\n StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues);\n serReturn.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HBLANKCUT);\n return serReturn;\n } case StructExprRecog.EXPRRECOGTYPE_HCUTCAP:\n case StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER:\n case StructExprRecog.EXPRRECOGTYPE_HCUTUNDER: {\n StructExprRecog serNewPrinciple = preRestructHDivSer4MatrixMExprs(ser.getPrincipleSER(1));\n if (serNewPrinciple.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) {\n return ser;\n }\n LinkedList<StructExprRecog> listNewBlankCuts = new LinkedList<StructExprRecog>();\n listNewBlankCuts.addAll(serNewPrinciple.mlistChildren); // have to add all instead of using = because otherwise we change serNewPrinciple.\n if (ser.mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER) {\n StructExprRecog serTop = ser.mlistChildren.getFirst();\n StructExprRecog serMajor = listNewBlankCuts.removeFirst();\n StructExprRecog serNew1st = new StructExprRecog(ser.mbarrayBiValues);\n LinkedList<StructExprRecog> listNewChildren = new LinkedList<StructExprRecog>();\n listNewChildren.add(serTop);\n listNewChildren.add(serMajor);\n serNew1st.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HCUTCAP);\n listNewBlankCuts.addFirst(serNew1st);\n }\n if (ser.mnExprRecogType != EXPRRECOGTYPE_HCUTCAP) {\n StructExprRecog serMajor = listNewBlankCuts.removeLast();\n StructExprRecog serBottom = ser.mlistChildren.getLast();\n StructExprRecog serNewLast = new StructExprRecog(ser.mbarrayBiValues);\n LinkedList<StructExprRecog> listNewChildren = new LinkedList<StructExprRecog>();\n listNewChildren.add(serMajor);\n listNewChildren.add(serBottom);\n serNewLast.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HCUTUNDER);\n listNewBlankCuts.addLast(serNewLast);\n }\n StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues);\n serReturn.setStructExprRecog(listNewBlankCuts, EXPRRECOGTYPE_HBLANKCUT);\n return serReturn;\n } default:\n return ser;\n }\n }", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "private byte [] mergeTestInternal(final List<EBMLTypeInfo> typeInfosToMergeOn)\n throws IOException, MkvElementVisitException {\n final byte [] inputBytes = TestResourceUtil.getTestInputByteArray(\"output_get_media.mkv\");\n\n\n //Reading again purely to show that the OutputSegmentMerger works even with streams\n //where all the data is not in memory.\n final InputStream in = TestResourceUtil.getTestInputStream(\"output_get_media.mkv\");\n\n //Stream to receive the merged output.\n final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n\n //Do the actual merge.\n final OutputSegmentMerger merger =\n OutputSegmentMerger.create(outputStream, OutputSegmentMerger.Configuration.builder()\n .typeInfosToMergeOn(typeInfosToMergeOn)\n .build());\n\n final StreamingMkvReader mkvStreamReader =\n StreamingMkvReader.createDefault(new InputStreamParserByteSource(in));\n while (mkvStreamReader.mightHaveNext()) {\n final Optional<MkvElement> mkvElement = mkvStreamReader.nextIfAvailable();\n if (mkvElement.isPresent()) {\n mkvElement.get().accept(merger);\n }\n }\n\n final byte []outputBytes = outputStream.toByteArray();\n Assert.assertFalse(Arrays.equals(inputBytes, outputBytes));\n\n //Count different types of elements present in the merged stream.\n final CountVisitor countVisitor = getCountVisitorResult(outputBytes);\n\n //Validate that there is only one EBML header and segment and tracks\n //but there are 5 clusters and tracks as expected.\n assertCountsAfterMerge(countVisitor);\n\n return outputBytes;\n }", "private void buildCombinedData() throws PipelineModelException {\n List<PipelineData> combined;\n if (baseStack != null) {\n combined = new ArrayList<>(baseStack.size() + 1);\n } else {\n combined = new ArrayList<>(1);\n }\n\n if (baseStack != null) {\n combined.addAll(baseStack);\n }\n if (pipelineData != null) {\n combined.add(pipelineData);\n }\n\n final PipelineDataMerger pipelineDataMerger = new PipelineDataMerger();\n pipelineDataMerger.merge(combined);\n combinedData = pipelineDataMerger;\n }", "public void multiSolver() {\n\t\tmsSize = 0;\n\t\tmsMin = Integer.MAX_VALUE;\n\t\tmsMax = Integer.MIN_VALUE;\n\t\tmsHeight = 0;\n\t\tmultiSolver(root, 0);\n\t\tSystem.out.println(\"Size = \" + msSize);\n\t\tSystem.out.println(\"Min = \" + msMin);\n\t\tSystem.out.println(\"Max = \" + msMax);\n\t\tSystem.out.println(\"Height = \" + msHeight);\n\t}", "public static void main(String[] args) {\n\n MultiChildTreeNode<String> ff = new MultiChildTreeNode<>(\"F\");\n MultiChildTreeNode<String> iff = new MultiChildTreeNode<>(\"I\");\n ff.children.add(iff);\n MultiChildTreeNode<String> kff = new MultiChildTreeNode<>(\"K\");\n ff.children.add(kff);\n MultiChildTreeNode<String> t2 = ff;//Subtree to find\n\n //Main tree\n MultiChildTreeNode<String> t1 = new MultiChildTreeNode<>(\"A\");\n MultiChildTreeNode<String> b = new MultiChildTreeNode<>(\"B\");\n MultiChildTreeNode<String> c = new MultiChildTreeNode<>(\"C\");\n MultiChildTreeNode<String> d = new MultiChildTreeNode<>(\"D\");\n t1.children.add(b);\n t1.children.add(c);\n t1.children.add(d);\n\n MultiChildTreeNode<String> e = new MultiChildTreeNode<>(\"E\");\n MultiChildTreeNode<String> h = new MultiChildTreeNode<>(\"H\");\n e.children.add(h);\n\n MultiChildTreeNode<String> f = new MultiChildTreeNode<>(\"F\");\n b.children.add(f);\n MultiChildTreeNode<String> i = new MultiChildTreeNode<>(\"I\");\n f.children.add(i);\n MultiChildTreeNode<String> j = new MultiChildTreeNode<>(\"J\");\n f.children.add(j);\n\n\n /**\n * A\n * / | \\\n * B C.. D...\n * / |\n *E.. F\n * / \\\n * I J\n * |\n * F\n * / \\\n * I K\n */\n j.children.add(ff); //commenting out this line should give false otherwise true\n\n MultiChildTreeNode<String> k = new MultiChildTreeNode<>(\"K\");\n MultiChildTreeNode<String> g = new MultiChildTreeNode<>(\"G\");\n b.children.add(e);\n\n b.children.add(g);\n MultiChildTreeNode<String> l = new MultiChildTreeNode<>(\"L\");\n c.children.add(k);\n c.children.add(l);\n\n MultiChildTreeNode<String> m = new MultiChildTreeNode<>(\"M\");\n MultiChildTreeNode<String> n = new MultiChildTreeNode<>(\"N\");\n MultiChildTreeNode<String> o = new MultiChildTreeNode<>(\"O\");\n d.children.add(m);\n d.children.add(n);\n d.children.add(o);\n CheckForSubTree<String> checker = new CheckForSubTree<>();\n System.out.println (checker.isSubTree(t1, t2));\n }", "private List<TreeNode> helper(int m, int n) {\n\t\t//System.out.println(\"== \" + m + \" \" + n + \"== \");\n\t\tList<TreeNode> result = new ArrayList<TreeNode>();\n\t\tif (m > n) {\n\t\t\t/* MUST add null \n\t\t\t * Cannot do nothing because foreach loop cannot find it if nothing inside \n\t\t\t */\n\t\t\tresult.add(null);\n\t\t} else if (m == n) {\n\t\t\tTreeNode node = new TreeNode(m);\n\t\t\tresult.add(node);\n\t\t} else {\n\t\t\tfor (int i = m; i <= n; i++) {\n\t\t\t\t//System.out.println(\"m, n, i : \" + m + \" \" + n + \" - \" + i);\n\t\t\t\tList<TreeNode> ls = helper(m, i - 1);\n\t\t\t\tList<TreeNode> rs = helper(i + 1, n);\n\t\t\t\t\n\t\t\t\tfor(TreeNode l: ls){\n\t\t\t\t\tfor(TreeNode r: rs){\n\t\t\t\t\t\tTreeNode node = new TreeNode(i);\n\t\t\t\t\t\tnode.left =l;\n\t\t\t\t\t\tnode.right=r;\n\t\t\t\t\t\tresult.add(node);\n\t\t\t\t\t\t//System.out.println(\">>>>>>>\");\n\t\t\t\t\t\t//node.printBFS();\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private AVLTree[] splitLoop(IAVLNode nodeX, AVLTree [] arr){\r\n\t\t\tAVLTree tmp1 = new AVLTree();\r\n\t\t\tAVLTree tmp2 = new AVLTree();\r\n\t\t\tAVLTree tmp3 = new AVLTree();\r\n\t\t\tAVLTree tmp4 = new AVLTree();\r\n\t\t\tIAVLNode preOfX, newNodeForJoin; \r\n\t\t\tint newHeight, newSize;\r\n\t\t\t\r\n\t\t\tIAVLNode curr = nodeX;\r\n\t\t\ttmp1.setRoot(curr.getLeft());\r\n\t\t\ttmp1.getRoot().setParent(null);\r\n\t\t\ttmp3.setRoot(curr.getRight());\r\n\t\t\ttmp3.getRoot().setParent(null);\r\n\t\t\twhile (curr != null) {\r\n\t\t\t\tif(curr.getParent() == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif(curr.getParent().getRight() == curr) // im his left son\r\n\t\t\t\t\t{preOfX = curr.getParent();\r\n\t\t\t\t\ttmp2.setRoot(preOfX.getLeft());\r\n\t\t\t\t\ttmp2.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp1.join(newNodeForJoin, tmp2);\r\n\t\t\t\t\tnewHeight = tmp1.HeightCalc(tmp1.getRoot());\r\n\t\t\t\t\tnewSize = tmp1.sizeCalc(tmp1.getRoot());\r\n\t\t\t\t\ttmp1.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp1.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp2.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreOfX = curr.getParent();\r\n\t\t\t\t\ttmp4.setRoot(preOfX.getRight());\r\n\t\t\t\t\ttmp4.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp3.join(newNodeForJoin, tmp4);\r\n\t\t\t\t\tnewHeight = tmp3.HeightCalc(tmp3.getRoot());\r\n\t\t\t\t\tnewSize = tmp3.sizeCalc(tmp3.getRoot());\r\n\t\t\t\t\ttmp3.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp3.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp4.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t}\r\n\t\t\t\tnewNodeForJoin = new AVLNode(null);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tarr[0] = tmp1;\r\n\t\t\t\tarr[1]= tmp3;\r\n\t\t\t\tarr[0].minimum = arr[0].minPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].minimum = arr[1].minPointer(arr[1].getRoot());\r\n\t\t\t\tarr[0].maximum = arr[0].maxPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].maximum = arr[1].maxPointer(arr[1].getRoot());\r\n\t\r\n\t\t\t\treturn arr;\r\n\t\t\t\t\r\n\t\t\t}", "public void merge(int l, int m, int r){\n int n1 = m-l+1;\n int n2 = r-m;\n\n // temp arrays \n int[] L = new int[n1];\n int[] R = new int[n2];\n\n // copy data of the 2 subarrays int he temp ones\n // TODO : can be reduced to one loop and another loop of length |n1-n2|\n for(int i=0; i<n1; i++) L[i] = arr[l+i];\n for(int i=0; i<n2; i++) R[i] = arr[m+1+i];\n\n\n // init indexes\n int i=0, j=0, k=l;\n while (i<n1 && j<n2){ // ordering in asc order\n if(L[i] <= R[j]){\n arr[k] = L[i];\n i++;\n } else{\n arr[k] = R[j];\n j++;\n }\n k++;\n }\n\n // insert the remaining items\n while(i<n1){\n arr[k] = L[i];\n i++;\n k++;\n }\n\n while(j<n2){\n arr[k] = R[j];\n j++;\n k++;\n }\n \n\n }", "private static List<List<Integer>> findLeavesII(TreeNode root) {\n List<List<Integer>> result = new ArrayList<>();\n List<Integer> list = new ArrayList<>();\n\n while(root != null) {\n list = new ArrayList<>();\n root = findLeavesRecurII(root, list);\n result.add(list);\n }\n return result;\n }", "public static void main(String[] args) {\n\t\tList<List<Integer>> res = new ArrayList<List<Integer>>();\n\t\t\n\t\tList<Integer> list = new ArrayList<>();\n\t\tlist.add(2);\n\t\tlist.add(3);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(4);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(5);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(6);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(7);\n\t\tlist.add(8);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(9);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(10);\n\t\tlist.add(11);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tlist = new ArrayList<>();\n\t\tlist.add(-1);\n\t\tlist.add(-1);\n\t\tres.add(list);\n\t\tSystem.out.println(res);\n\t\tSystem.out.println(Inorder(res));\n\t\tList<Integer> queries = new ArrayList<>();\n\t\tqueries.add(2);\n\t\tqueries.add(4);\n\t\tswapNodes(res, queries);\n\n\t}", "public void flatten()\r\n\t\t{\r\n\t\t\tif (_children.size() > 0) \r\n\t\t\t{\r\n\t\t\t\tint i = 0;\r\n\t\t\t\twhile(i < _children.size())\r\n\t\t\t\t{\r\n\t\t\t\t\tExpressionNode subExpr = _children.get(i);\r\n\t\t\t\t\tsubExpr.flatten();\r\n\t\t\t\t\tif (_data.equals(subExpr._data)) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t_children.addAll(subExpr._children);\r\n\t\t\t\t\t\t_children.remove(subExpr);\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti++;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t}", "private String setAttributeValuesOfChildFeatureObj(Context context,Map flMap,Map htChildObjData,boolean bConflictSelType)\r\n throws Exception{\r\n\r\n \tString strChildFeatureId = (String)htChildObjData.get(ConfigurationConstants.SELECT_ID);\r\n \tString strChildFeatureType = (String)htChildObjData.get(ConfigurationConstants.SELECT_TYPE);\r\n\r\n \tmqlLogRequiredInformationWriter(\"Inside method 'setAttributeValuesOfChildFeatureObj' \" +\"\\n\\n\");\r\n \tmqlLogRequiredInformationWriter(\"Feature List Info ---->\"+ \"\\n\" + flMap +\"\\n\\n\");\r\n \tmqlLogRequiredInformationWriter(\"Child Object Data ---->\"+ \"\\n\" + htChildObjData +\"\\n\\n\");\r\n\r\n\r\n \tString strChildNewFeatureType = strChildFeatureType;\r\n\r\n\t\t//Check if child is already converted to New Type\r\n\t\tif(strChildFeatureType!=null\r\n\t\t && !mxType.isOfParentType(context,strChildFeatureType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)\r\n\t\t\t && !mxType.isOfParentType(context,strChildFeatureType, ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t && !mxType.isOfParentType(context,strChildFeatureType, ConfigurationConstants.TYPE_LOGICAL_STRUCTURES)\r\n\t\t\t && !mxType.isOfParentType(context,strChildFeatureType, ConfigurationConstants.TYPE_PRODUCTS)){\r\n\r\n\t\t\t\tString newChildFeatureType = (String)htChildObjData.get(\"attribute[\"+ATTRIBUTE_NEW_FEATURE_TYPE+\"]\");\r\n\t\t\t\t//String newChildFeatureChangeType = PropertyUtil.getSchemaProperty(context,newChildFeatureType);\r\n\t\t\t\tString newChildFeatureChangeType = getSchemaProperty(context,newChildFeatureType);\r\n\r\n\r\n\t\t\t mqlLogRequiredInformationWriter(\"Child Object id :: \"+strChildFeatureId +\"\\n\");\r\n\t\t\t //Get the new Feature Policy\r\n\t\t\t Map mNewChildFeatPolicy = mxType.getDefaultPolicy(context, newChildFeatureChangeType, true);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Child Feature New Type :: \"+ newChildFeatureChangeType +\"\\n\");\r\n\r\n\r\n\t\t\t String strNewChildFeatPolicy = (String) mNewChildFeatPolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Child Feature New Policy :: \"+ strNewChildFeatPolicy +\"\\n\\n\");\r\n\r\n\t\t\t //change the feature to new type\r\n\t\t\t //BusinessObject childFeatureBO = changeType(context,htChildObjData,strChildFeatureId,newChildFeatureChangeType,strNewChildFeatPolicy);\r\n\t\t\t BusinessObject boChildFeatureObj = new DomainObject(strChildFeatureId);\r\n\r\n\t\t\t boChildFeatureObj.change(context,\r\n\t\t\t\t\t \t\t\t\t\t\t newChildFeatureChangeType,\r\n\t\t\t\t\t\t\t\t\t\t\t (String) htChildObjData.get(DomainConstants.SELECT_NAME),\r\n\t\t\t\t\t\t\t\t\t\t\t (String) htChildObjData.get(DomainConstants.SELECT_REVISION),\r\n\t\t\t\t\t\t\t\t\t\t\t (String) htChildObjData.get(DomainConstants.SELECT_VAULT),\r\n\t\t\t\t\t\t\t\t\t\t\t strNewChildFeatPolicy);\r\n\r\n\r\n\t \t\t mqlLogRequiredInformationWriter(\"Child Object changed from type :: \"\r\n\t \t\t\t\t\t\t\t\t\t\t\t+ strChildFeatureType\r\n\t \t\t\t\t\t\t\t\t\t\t\t+ \" to new type \"\r\n\t \t\t\t\t\t\t\t\t\t\t\t+ newChildFeatureChangeType\r\n\t \t\t\t\t\t\t\t\t\t\t + \" new policy \"\r\n\t \t\t\t\t\t\t\t\t\t\t + strNewChildFeatPolicy\r\n\t \t\t\t\t\t\t\t\t\t\t\t+ \"\\n\");\r\n\r\n\t\t\t strChildNewFeatureType = newChildFeatureChangeType;\r\n\r\n\t\t}\r\n\r\n\t\tif(strChildFeatureType!=null && isOfDerivationChangedType(context, strChildFeatureType)){\r\n\t\t\t Map mNewFeaturePolicy = mxType.getDefaultPolicy(context, strChildFeatureType, true);\r\n\t\t\t String newFeaturePolicy = (String) mNewFeaturePolicy.get(ConfigurationConstants.SELECT_NAME);\r\n\t\t\t mqlLogRequiredInformationWriter(\"Child Object id :: \"+strChildFeatureId +\"\\n\");\r\n\t\t\t mqlLogRequiredInformationWriter(\"Child Feature New Type :: \"+ strChildNewFeatureType +\"\\n\");\r\n\t\t\t mqlLogRequiredInformationWriter(\"Child Feature New Policy :: \"+ newFeaturePolicy +\"\\n\\n\");\r\n\r\n\t\t\t DomainObject boFeatureObj = new DomainObject(strChildFeatureId);\r\n\t\t\t boFeatureObj.setPolicy(context, newFeaturePolicy);\r\n\t\t}\r\n\t\t //Need to set the attribute values for the child object\r\n\t\t String strFeatSelType = (String)flMap.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_FEATURE_SELECTION_TYPE+\"]\");\r\n\t\t String strSelType =\"\";\r\n\t\t String strSelCriterion =\"\";\r\n\r\n\t\t //Set the attribute values of new Type Child Feature object\r\n\t\t HashMap mapChildFeatAttribute = new HashMap();\r\n\t\t \r\n\t\t \r\n\t\t String MarketText = (String)htChildObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_TEXT+\"]\");\r\n\t\t String MarketName = (String)htChildObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_MARKETING_NAME+\"]\");\r\n\r\n\t\t \r\n\t\t \r\n\t\t if(MarketText!=null && !MarketText.equals(\"\")){\r\n\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_VARIANT_DISPLAY_TEXT, MarketText);\r\n\t\t }\r\n\t\t if(MarketName!=null && !MarketName.equals(\"\")){\r\n\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_DISPLAY_NAME, MarketName);\r\n\t\t }\r\n\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT,\r\n\t\t\t\t (String)htChildObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_SUBFEATURECOUNT+\"]\"));\r\n\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_ORIGINATOR,\r\n\t\t\t\t (String)htChildObjData.get(\"attribute[\"+ConfigurationConstants.ATTRIBUTE_ORIGINATOR+\"]\"));\r\n\r\n\r\n\t\t if(strFeatSelType!=null && strFeatSelType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_KEY_IN)){\r\n\t\t\t strSelType = ConfigurationConstants.RANGE_VALUE_SINGLE; //Default values\r\n\t\t\t strSelCriterion = ConfigurationConstants.RANGE_VALUE_MUST;\r\n\t\t }else if(strFeatSelType!=null && strFeatSelType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MAY_SELECT_ONE_OR_MORE)){\r\n\t\t\t strSelType = ConfigurationConstants.RANGE_VALUE_MULTIPLE;\r\n\t\t\t strSelCriterion = ConfigurationConstants.RANGE_VALUE_MAY;\r\n\t\t }else if(strFeatSelType!=null && strFeatSelType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MAY_SELECT_ONLY_ONE)){\r\n\t\t\t strSelType = ConfigurationConstants.RANGE_VALUE_SINGLE;\r\n\t\t\t strSelCriterion = ConfigurationConstants.RANGE_VALUE_MAY;\r\n\t\t }else if(strFeatSelType!=null && strFeatSelType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MUST_SELECT_AT_LEAST_ONE)){\r\n\t\t\t strSelType = ConfigurationConstants.RANGE_VALUE_MULTIPLE;\r\n\t\t\t strSelCriterion = ConfigurationConstants.RANGE_VALUE_MUST;\r\n\t\t }else if(strFeatSelType!=null && strFeatSelType.equalsIgnoreCase(ConfigurationConstants.RANGE_VALUE_MUST_SELECT_ONLY_ONE)){\r\n\t\t\t strSelType = ConfigurationConstants.RANGE_VALUE_SINGLE;\r\n\t\t\t strSelCriterion = ConfigurationConstants.RANGE_VALUE_MUST;\r\n\t\t }\r\n\r\n\t\t //When Feature is used in more than one context with Conflict Sel Type\r\n\t\t if(bConflictSelType){\r\n\t\t\t\t //strSelType = getResourceProperty(context,\"emxConfiguration.Migration.DefaultSelectionType\");\r\n\t\t\t\t strSelType = EnoviaResourceBundle.getProperty(context, \"emxConfigurationMigration\", Locale.US, \"emxConfiguration.Migration.DefaultSelectionType\");\r\n\t\t }\r\n\r\n\t\t if(strChildNewFeatureType!=null & mxType.isOfParentType(context,strChildNewFeatureType, ConfigurationConstants.TYPE_CONFIGURATION_FEATURES)){\r\n\t\t\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_CONFIGURATION_SELECTION_TYPE,strSelType);\r\n\t\t }\r\n\r\n\t\t //For type \"Configuration Feature\" add \"Key-In Type\"\r\n\t\t if(strChildNewFeatureType!=null && strChildNewFeatureType.equalsIgnoreCase(TYPE_CONFIGURATION_FEATURE)){\r\n\r\n\r\n\t\t\t StringList slKITOnChildFLs = new StringList();\r\n\t\t\t Object objKITOnChildFLs = flMap.get(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\");\r\n\t\t\t if (objKITOnChildFLs instanceof StringList) {\r\n\t\t\t\t slKITOnChildFLs = (StringList) flMap.get(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\");\r\n\r\n\t\t\t\t} else if (objKITOnChildFLs instanceof String) {\r\n\t\t\t\t\tslKITOnChildFLs.addElement((String) flMap.get(\"from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_TO+\"].to.from[\"+ConfigurationConstants.RELATIONSHIP_FEATURE_LIST_FROM+\"].to.attribute[\"+ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE+\"]\"));\r\n\t\t\t\t}\r\n\r\n\t\t\t if(slKITOnChildFLs.contains(RANGE_VALUE_INPUT))\r\n\t\t\t {\r\n\t\t\t\t String strKeyInType = RANGE_VALUE_INPUT;\r\n\t\t\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_KEY_IN_TYPE,strKeyInType);\r\n\t\t\t }\r\n\t\t }else if(strChildNewFeatureType!=null && strChildNewFeatureType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)){\r\n\t\t\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_LOGICAL_SELECTION_TYPE,strSelType);\r\n\t\t }\r\n\r\n\t\t if(strChildNewFeatureType!=null\r\n\t\t\t && (strChildNewFeatureType.equalsIgnoreCase(ConfigurationConstants.TYPE_LOGICAL_FEATURE)\r\n\t\t\t\t || strChildNewFeatureType.equalsIgnoreCase(ConfigurationConstants.TYPE_MANUFACTURING_FEATURE))\r\n\t\t\t\t ){\r\n\r\n\t\t\t String strDupPartXML = (String)htChildObjData.get(ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML);\r\n\t\t\t mapChildFeatAttribute.put(ConfigurationConstants.ATTRIBUTE_DUPLICATE_PART_XML,strDupPartXML);\r\n\t\t }\r\n\r\n\t\t //Set attribute values on Feature Object\r\n\t\t DomainObject domChildFeat = new DomainObject(strChildFeatureId);\r\n\t\t mqlLogRequiredInformationWriter(\"Attribute value Map set for this id ---->\" + \"\\n\" + mapChildFeatAttribute +\"\\n\\n\");\r\n\t\t domChildFeat.setAttributeValues(context,mapChildFeatAttribute);\r\n\t\t return strSelCriterion;\r\n }", "private long computeNumTuples() {\n\t\t// get size of left & right children\n\t\tlong leftSize = this.left.getnTuples();\n\t\tlong rightSize = this.right.getnTuples();\n\t\t\n\t\t// find which union find elements contain info about join\n\t\tHashSet<UnionFindElement> goodPartitions = new HashSet<UnionFindElement>();\n\t\tHashSet<UnionFindElement> badPartitions = new HashSet<UnionFindElement>();\n\t\tfor (String attr : this.union.getAttributes()) {\n\t\t\tif (badPartitions.contains(this.union.find(attr)) || goodPartitions.contains(this.union.find(attr)))\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tboolean inLeft = false;\n\t\t\tboolean inRight = false;\n\t\t\tfor (String attr2 : this.union.find(attr).getAttributes()) {\n\t\t\t\tString tbl = attr2.substring(0, attr2.indexOf('.'));\n\t\t\t\tinLeft = this.left.getTables().contains(tbl) ? true : inLeft;\n\t\t\t\tinRight = this.right.getTables().contains(tbl) ? true : inRight;\n\t\t\t}\n\t\t\t\n\t\t\tif (inLeft && inRight)\n\t\t\t\tgoodPartitions.add(this.union.find(attr));\n\t\t\telse\n\t\t\t\tbadPartitions.add(this.union.find(attr));\n\t\t}\n\t\t\n\t\t// hold vVals maxes to be multiplied together\n\t\tArrayList<Long> vVals = new ArrayList<Long>();\n\t\t\n\t\t// get relevant vVals\n\t\tfor (UnionFindElement condList : goodPartitions) {\n\t\t\tlong max = 1;\n\t\t\t\n\t\t\tfor (String attr : condList.getAttributes()) {\n\t\t\t\tString tbl = attr.substring(0, attr.indexOf('.'));\n\t\t\t\tif (left.getTables().contains(tbl)) {\n\t\t\t\t\tlong tmp = left.vValCompute(attr);\n\t\t\t\t\tmax = Math.max(tmp, max);\n\t\t\t\t}\n\t\t\t\telse if (right.getTables().contains(tbl)) {\n\t\t\t\t\tlong tmp = right.vValCompute(attr);\n\t\t\t\t\tmax = Math.max(tmp, max);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tvVals.add(max);\n\t\t}\n\t\t\n\t\tlong numer = leftSize * rightSize;\n\t\tlong denom = 1;\n\t\t\n\t\tfor (Long n : vVals)\n\t\t\tdenom *= n;\n\t\t//System.out.println(\"left size: \" + leftSize + \" & right size: \" + rightSize);\n\t\t//System.out.println(this.getTables() + \" cost: \" + this.getCost() + \", size: \" + numer + \" / \" + denom + \" = \" + Math.max(numer / denom, 1));\n\t\treturn Math.max(numer / denom, 1);\n\t}", "private static void doTransform(Tree t) {\n\n if (t.value().startsWith(\"QP\")) {\n //look at the children\n List<Tree> children = t.getChildrenAsList();\n if (children.size() >= 3 && children.get(0).isPreTerminal()) {\n //go through the children and check if they match the structure we want\n String child1 = children.get(0).value();\n String child2 = children.get(1).value();\n String child3 = children.get(2).value();\n if((child3.startsWith(\"CD\") || child3.startsWith(\"DT\")) &&\n (child1.startsWith(\"RB\") || child1.startsWith(\"JJ\") || child1.startsWith(\"IN\")) &&\n (child2.startsWith(\"IN\") || child2.startsWith(\"JJ\"))) {\n transformQP(t);\n }\n }\n /* --- to be written or deleted\n } else if (t.value().startsWith(\"NP\")) {\n //look at the children\n List<Tree> children = t.getChildrenAsList();\n if (children.size() >= 3) {\n\n }\n ---- */\n } else if (t.isPhrasal()) {\n for (Tree child : t.getChildrenAsList()) {\n doTransform(child);\n }\n }\n }", "public static void mergeSort(ArrayList<Integer> inputList) {\n recursiveCallCounter++;\n System.out.println(\"Current recursive call count: \" + recursiveCallCounter);\n\n if (inputList.size() < 2) {\n System.out.println(\"\\nCurrent list length < 2\");\n System.out.println(\"Current recursive call count: \" + recursiveCallCounter + \"\\n\");\n\n return;\n }\n\n ArrayList<Integer> leftList = arrayListCopy(inputList, 0, inputList.size() / 2);\n ArrayList<Integer> rightList = arrayListCopy(inputList, inputList.size() / 2, inputList.size());\n\n System.out.println(\"\\nMerging left\");\n System.out.println(\"Pre-Sort left: \" + printCurrentList(leftList));\n mergeSort(leftList);\n System.out.println(\"Post-Sort left: \" + printCurrentList(leftList));\n\n\n\n System.out.println(\"\\nMerging right\");\n System.out.println(\"Pre-Sort right: \" + printCurrentList(rightList));\n mergeSort(rightList);\n System.out.println(\"Post-Sort right: \" + printCurrentList(rightList));\n\n merge(leftList, rightList, inputList);\n }", "public ArrayList<Tuple2<Input, Input>> call(ArrayList<Tuple2<Data<Type0, Type1>, Input>> lst1a,\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> lst1b) {\n\n if (sameRDD) {\n\n int[] permutationArray = new int[lst1a.size()];\n for (int i = 0; i < permutationArray.length; i++) {\n permutationArray[i] = i;\n }\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list2 = new ArrayList<Tuple2<Data<Type0, Type1>, Input>>();//new Tuple2<Data<Type0,Type1>,Input>[lst1a.length];\n //Collections.copy(lst1a,list2);\n list2.addAll(lst1a);\n\n new myMergeSort<Type0, Type1, Input>().sort(list2, permutationArray, new revDataComparator<Type0, Type1, Input>(\n list2ASC, list2ASCSec, equalReverse));\n\n ArrayList<Tuple2<Input, Input>> wilResult = getViolationsSelf(lst1a,\n permutationArray);\n return wilResult;\n } else {\n\n // reset pivot flag\n for (int i = 0; i < lst1b.size(); i++) {\n lst1b.get(i)._1().resetPivot();\n }\n\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list1 = merge(lst1a, lst1b, list1ASC, list1ASCSec);\n\n int[] permutationArray = new int[list1.size()];\n for (int i = 0; i < permutationArray.length; i++) {\n permutationArray[i] = i;\n }\n ArrayList<Tuple2<Data<Type0, Type1>, Input>> list2 = new ArrayList<Tuple2<Data<Type0, Type1>, Input>>();//Tuple2<Data<Type0,Type1>,Record>[list1.length];\n //System.arraycopy(list1, 0, list2, 0, list1.size());\n //Collections.copy(list1,list2);\n list2.addAll(list1);\n new myMergeSort<Type0, Type1, Input>().sort(list2, permutationArray, new revDataComparator<Type0, Type1, Input>(\n list2ASC, list2ASCSec, equalReverse));\n\n ArrayList<Tuple2<Input, Input>> wilResult = getViolationsNonSelf(\n list1, permutationArray);\n\n return wilResult;\n }\n // return output;\n\n }", "private void CreateJTree(List<MainCategoryDTO> allTree) {\n \n \n DefaultMutableTreeNode root = new DefaultMutableTreeNode(\"Listem\");\n for (int i = 0; i < allTree.size(); i++) {\n MainCategoryDTO mainCategory = allTree.get(i);\n DefaultMutableTreeNode mainCategoryTree = new DefaultMutableTreeNode(mainCategory.getName());\n CreatSubCategory(mainCategory.getList(),mainCategoryTree);\n root.add(mainCategoryTree);\n } \n \n \n DefaultTreeModel model = new DefaultTreeModel(root); \n jTree1.setModel(model); \n jTree1.setRootVisible(false);\n jTree1.addTreeSelectionListener((javax.swing.event.TreeSelectionEvent evt) -> {\n JTree1ValueChanged(evt);\n });\n \n }", "ArrayList<Expression> getChildren();", "private List<ExpandGroup> initData() {\n List<ExpandGroup> parentObjects = new ArrayList<>();\n\n // Initialize outside so we can use it more than once\n ExpandGroup mExpand;\n\n try {\n // For each ParentView\n for (int i = 0; i < myQueue.getInstance().getList().size(); i++) {\n // Create a ExpandGroup that will hold the children of each Parent (The assignment occur_name and due date)\n // ExpandGroup takes a String for the Title and a List<? extends ExpandableGroup>\n String Title = myQueue.getInstance().getList().get(i).toString();\n List<?> myChildList = myQueue.getInstance().getList().get(i).getMyTaskList();\n mExpand = new ExpandGroup(Title, myChildList);\n Log.d(\"childList\", \"myQueue.getInstance().getList().get(i).getMyTaskList() \" + \"of size \" + myQueue.getInstance().getList().get(i).getObjectList().size() + \" inserted into mExpand\");\n Log.d(\"childList\", myQueue.getInstance().getList().get(i).getMyTaskList().get(0).getClass().toString());\n\n parentObjects.add(mExpand);\n }\n } catch (IndexOutOfBoundsException e) {\n Log.d(\"QueueFragment\", \"Nothing in queue, catching \" + e.toString());\n }\n //We finished populating the parents so we can return the list\n return parentObjects;\n }", "private List<Entity> treemapMultidimensional(List<Entity> entityList, Rectangle rectangle) {\n\n // Sort using entities weight -- layout tends to turn out better\n // entityList.sort(Comparator.comparing(o -> ((Entity) o).getWeight(0)).reversed());\n // Make a copy of data, as the original is destroyed during treemapSingledimensional computation\n List<Entity> entityCopy = new ArrayList<>();\n entityCopy.addAll(entityList);\n\n treemapSingledimensional(entityList, rectangle);\n\n // Recursive calls for the children\n for (Entity entity : entityCopy) {\n if (!entity.isLeaf() && getNormalizedWeight(entity) > 0) {\n List<Entity> newEntityList = new ArrayList<>();\n newEntityList.addAll(entity.getChildren());\n treemapMultidimensional(newEntityList, entity.getRectangle());\n }\n }\n\n return entityCopy;\n }", "public static void main(String[] args) {\n\n\nList<List<Integer>> list=new ArrayList<List<Integer>>();\nList<Integer> l1=new ArrayList<Integer>();\nList<Integer> l2=new ArrayList<Integer>();\nList<Integer> l3=new ArrayList<Integer>();\nList<Integer> l4=new ArrayList<Integer>();\nl1.add(1);\nl1.add(2);\nl1.add(3);\nl2.add(4);\nl2.add(5);\nl2.add(5);\nl2.add(6);\nl3.add(7);\nl3.add(8);\nl4.add(9);\nlist.add(l1);\nlist.add(l2);\nlist.add(l3);\nlist.add(l4);\nSolution solution=new Solution();\nsolution.nP(list);\n\n}", "private void streamlinedGo(String[] argsList) {\n\t\tstates = alignment.getAminoAcidsAsFitchStates();\n\t\tbaseStates = phylogeny.getFitchStates(states).clone();\n\t\tambiguousAtRoot = 0;\n\t\tancestorAmbiguities = new boolean[baseStates.length];\n\t\t/* Establish how many ancestral states are ambiguous */\n\t\tfor(int i=0;i<baseStates.length;i++){\n\t\t\tHashSet<String> statesSet=baseStates[i];\n\t\t\tif(statesSet.size()>1){\n\t\t\t\tambiguousAtRoot++;\n\t\t\t\tancestorAmbiguities[i] = true;\n\t\t\t}\n\t\t}\n\t\t/* Attempt to resolve the rootnode states */\n\t\tphylogeny.resolveFitchStatesTopnode();\n\t\tphylogeny.resolveFitchStates(phylogeny.states);\n\t\t/* A new PR object used to hold reconstructions */\n\t\tpr = new ParsimonyReconstruction(states, phylogeny);\n\t\t/* Should now be resolved as far as possible.\n\t\t * Compare each taxon to tree root MRCA */\n\t\t//pr.printAncestralComparison();\n\n\t\t/*\n\t\t * Parse the args into lists\n\t\t * Then find the tips and MRCAs of each list. at this point print all branches below\n\t\t * Then walk through the MRCA / lists counting subs\n\t\t */\n\t\tint numberOfClades = argsList.length-2;\t// we'll assume the first two args are alignment and phylogeny respectively, and all the others (we've checked >2) are clades described by tips\n\t\t// Guessed the number of clades, initialise arrays\n\t\tcladeTips = new HashSet[numberOfClades];\n\t\tcladeTipsAsNodes = new HashSet[numberOfClades];\n\t\tMRCAnodes = new TreeNode[numberOfClades];\n\t\tMRCAcladesBranchTotals = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesBranchTotalsInternal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotals = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsTerminal = new int[numberOfClades];\n\t\tMRCAcladesSubstitutionTotalsInternal = new int[numberOfClades];\n\t\tSystem.out.println(\"Assuming \"+numberOfClades+\" separate clades. Parsing clade descriptions...\");\n\t\t// Parse the clade lists\n\t\tfor(int i=2;i<argsList.length;i++){\n\t\t\tString[] taxaTokens = argsList[i].split(\":\");\n\t\t\tcladeTips[i-2] = new HashSet<String>();\n\t\t\tcladeTipsAsNodes[i-2] = new HashSet<TreeNode>();\n\t\t\tfor(String aTaxon:taxaTokens){\n\t\t\t\tcladeTips[i-2].add(aTaxon);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check we've parsed them correctly\n\t\tSystem.out.println(\"Read these taxon lists:\");\n\t\tfor(int i=0;i<cladeTips.length;i++){\n\t\t\tSystem.out.print(\"Clade \"+i);\n\t\t\tfor(String taxon:cladeTips[i]){\n\t\t\t\tSystem.out.print(\" \"+taxon);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t// Find the MRCA node of each clade, and also print all the branches beneath that MRCA node\n\t\tSystem.out.println(\"Searching the tree for the MRCAs of each clade...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\t// Find the tip nodes corresponding to extant taxa\n\t\t\tIterator<String> itr = cladeTips[i].iterator();\n\t\t\twhile(itr.hasNext()){\n\t\t\t\tint nodeIDofTip = phylogeny.getTipNumber(itr.next());\n\t\t\t\tTreeNode tipNode = phylogeny.getNodeByNumberingID(nodeIDofTip);\n\t\t\t\tcladeTipsAsNodes[i].add(tipNode);\n\t\t\t}\n\t\t\t\t\n\t\t\t// Find the ID of the MRCA node\n\t\t\tint nodeIDofMRCA = phylogeny.getNodeNumberingIDContainingTaxa(cladeTips[i]);\n\t\t\tTreeNode cladeNodeMRCA = phylogeny.getNodeByNumberingID(nodeIDofMRCA);\n\t\t\tMRCAnodes[i] = cladeNodeMRCA;\n\n\t\t\t// Print all the branches below MRCA\n\t\t\tSystem.out.println(\"Found the MRCA of clade \"+i+\" (\"+nodeIDofMRCA+\"):\\n\"+cladeNodeMRCA.getContent()+\"\\nPrinting all branches below this node:\");\n\t\t\tMRCAcladesBranchTotals[i] = cladeNodeMRCA.howManyTips();\n\t\t\tfor(TreeBranch branch:cladeNodeMRCA.getBranches()){\n\t\t\t\tSystem.out.println(branch);\n\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(branch.getParentNode().states, branch.getDaughterNode().states, branch.getParentNode().getContent(), branch.getDaughterNode().getContent());\n\t\t\t\tMRCAcladesSubstitutionTotals[i] = substitutions.length;\n\t\t\t\tif(branch.isEndsInTerminalTaxon()){\n\t\t\t\t\tMRCAcladesBranchTotalsTerminal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsTerminal[i] = substitutions.length;\n\t\t\t\t}else{\n\t\t\t\t\tMRCAcladesBranchTotalsInternal[i]++;\n\t\t\t\t\tMRCAcladesSubstitutionTotalsInternal[i] = substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// For each MRCA node and clade tips combination, compare and print substitutions\n\t\tSystem.out.println(\"Comparing ancestral clade MRCA node sequences with extant sequences...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(\"Comparing ancestral MRCA sequence for CLADE \"+i+\" against *ALL* clades' terminal taxa...\");\n\t\t\tTreeNode thisMRCA = MRCAnodes[i];\n\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\tSystem.out.println(\"Clade MRCA: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[j]){\n\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(thisMRCA.states, someTip.states, \"MRCA_clade_\"+i, someTip.getContent());\n\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// All uncorrected pairwise comparisons\n\t\tSystem.out.println(\"Comparing extant sequences directly...\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tfor(TreeNode someTip:cladeTipsAsNodes[i]){\n\t\t\t\tfor(int j=0;j<cladeTipsAsNodes.length;j++){\n\t\t\t\t\tSystem.out.println(\"Basis clade: \"+i+\" -vs- clade tips: \"+j);\n\t\t\t\t\tint MRCAtoTipsSubstitutions = 0;\n\t\t\t\t\tfor(TreeNode someOtherTip:cladeTipsAsNodes[j]){\n\t\t\t\t\t\tInteger[] substitutions = StateComparison.printStateComparisonBetweenTwoNodes(someTip.states, someOtherTip.states, someTip.getContent(), someOtherTip.getContent());\n\t\t\t\t\t\tMRCAtoTipsSubstitutions+= substitutions.length;\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Substitutions from Clade MRCA: \"+i+\" -vs- clade tips: \"+j+\": \"+MRCAtoTipsSubstitutions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t// Print a summary of each clade\n\t\tSystem.out.println(\"Summary of clade counts...\");\n\t\tSystem.out.println(\"Clade\\tbranches\\texternal\\tinternal\\t\\tsubstitutions\\texternal\\tinternal\");\n\t\tfor(int i=0;i<numberOfClades;i++){\n\t\t\tSystem.out.println(i\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesBranchTotalsInternal[i]+\"\\t\"\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotals[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsTerminal[i]\n\t\t\t\t\t+\"\\t\"+MRCAcladesSubstitutionTotalsInternal[i]);\n\t\t}\n\t\tSystem.out.println(\"Done.\");\n\t}", "@Override\r\n\tpublic List<Menu> selAll() {\n\t\tList<Menu> list=mapper.selAll();\r\n\t\tfor(Menu menu:list){\r\n\t\t\tList<Menu> listChildren=mapper.selByPid(menu.getId());\r\n\t\t\tfor(Menu child:listChildren){\r\n\t\t\t\tAttributes att=new Attributes();\r\n\t\t\t\tatt.setFilename(child.getFilename());\r\n\t\t\t\tchild.setAttributes(att);\r\n\t\t\t}\r\n\t\t\tmenu.setChildren(listChildren);\r\n\t\t}\r\n\t\treturn list;\r\n\t}", "public static void main(String[] args) throws IOException{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb = new StringBuilder();\n StringTokenizer st;\n for (int i = 1; i <= 10; i++) {\n sb.append(\"#\").append(i).append(\" \");\n int N = Integer.parseInt(br.readLine());\n int[][] tree = new int[N+1][2];\n String[] cal = new String[N+1];\n \n for (int j = 1; j <= N; j++) {\n st = new StringTokenizer(br.readLine());\n int n = Integer.parseInt(st.nextToken());\n String tmp = st.nextToken();\n cal[j] = tmp;\n if(operator.indexOf(tmp)!=-1) {\n tree[j][0] = Integer.parseInt(st.nextToken());\n tree[j][1] = Integer.parseInt(st.nextToken());\n }\n }\n sb.append(calcTree(1,tree,cal)).append(\"\\n\");\n }\n System.out.println(sb);\n }", "private SearchResultInfo doDependencyAnalysisSearch(\n\t\t\tList<String> cluVersionIndIds, List<String> cluSetIds) {\n \tList<Object[]> results = statementDao.getStatementsWithDependencies(cluVersionIndIds,cluSetIds);\n \t\n \t//From the Object[], which contains a statement at index 0, and a result component id at index 1\n \t//obtain a list of statements and a comma delimited list of requirement component ids for each \n \t//statement which contain the target clu/cluset\n \tMap<String,String> statementToResultComponentIds = new HashMap<String,String>();\n \tMap<String, Statement> statements = new HashMap<String,Statement>();\n \tfor(Object[] result:results){\n \t\tStatement statement = (Statement) result[0];\n \t\tstatements.put(statement.getId(),statement);\n \t\tString resultComponentIds = statementToResultComponentIds.get(statement.getId());\n \t\tif(resultComponentIds == null){\n \t\t\tresultComponentIds = (String)result[1];\n \t\t}else{\n \t\t\tresultComponentIds+=\",\" + (String)result[1];\n \t\t}\n \t\tstatementToResultComponentIds.put(statement.getId(), resultComponentIds);\n \t}\n \t\n \t\n \t//HashMap of root statements used to store non duplicate root statements \n \tMap<String,Statement> rootStatements = new HashMap<String,Statement>();\n \t\n \tMap<String,String> rootToRequirementComponentList = new HashMap<String,String>();\n \t\n \t//Next find the root statements since only the root is related to a clu\n \tfor(Statement statement:statements.values()){\n \t\tStatement child = statement;\n \t\tStatement parent = child;\n \t\twhile(parent!=null){\n\t \t\ttry{\n\t \t\t\t//Search for parent of this child\n\t \t\t\tparent = statementDao.getParentStatement(child.getId());\n\t \t\t\tchild = parent;\n\t \t\t}catch(DoesNotExistException e){\n\t \t\t\t//This is the root (no parent) so add to list of roots\n\t \t\t\trootStatements.put(child.getId(), child);\n\t \t\t\t\n\t \t\t\t//Create a comma delimited mapping of all the requirement components\n\t \t\t\t//ids that contain the trigger clu within this root statement\n\t \t\tString childStatementList = rootToRequirementComponentList.get(child.getId());\n\t \t\tif(childStatementList==null){\n\t \t\t\tchildStatementList = statementToResultComponentIds.get(statement.getId());\n\t \t\t}else{\n\t \t\t\tchildStatementList += \",\"+statementToResultComponentIds.get(statement.getId());\n\t \t\t}\n\t \t\trootToRequirementComponentList.put(child.getId(), childStatementList);\n\t \t\t\t\n\t \t\t\t//Exit condition(hopefully there are no cyclic statements)\n\t \t\t\tparent = null;\n\t \t\t}\n \t\t}\n \t}\n \t\n \tSearchResultInfo searchResult = new SearchResultInfo();\n \t\n \t//Record each statement's reference id type and reference type as a search result row\n \t//Use a hashset of the cell values to remove duplicates\n \tSet<String> processed = new HashSet<String>();\n \tfor(Statement statement:rootStatements.values()){\n \t\tfor(RefStatementRelation relation:statement.getRefStatementRelations()){\n \t\t\tString rowId = relation.getRefObjectId()+\"|\"+relation.getRefObjectTypeKey();\n \t\t\tif(!processed.contains(rowId)){\n \t\t\t\t//This row does not exist yet so we can add it to the results.\n \t\t\t\tprocessed.add(rowId);\n\t \t\t\tSearchResultRowInfo row = new SearchResultRowInfo();\n\t \t\t\trow.addCell(\"stmt.resultColumn.refObjId\",relation.getRefObjectId());\n\t \t\t\trow.addCell(\"stmt.resultColumn.rootId\",statement.getId());\n\t \t\t\trow.addCell(\"stmt.resultColumn.requirementComponentIds\",rootToRequirementComponentList.get(statement.getId()));\n\t \t\t\trow.addCell(\"stmt.resultColumn.statementTypeId\",statement.getStatementType().getId());\n\t \t\t\trow.addCell(\"stmt.resultColumn.statementTypeName\",statement.getStatementType().getName());\n\t \t\t\tsearchResult.getRows().add(row);\n \t\t\t}\n \t\t}\n \t}\n \t\n\t\treturn searchResult;\n\t}", "public static void main(String[] args) {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tString[] arr = br.readLine().split(\" \");\n\t\t\tint N = Integer.parseInt(arr[0]);\n\t\t\tint M = Integer.parseInt(arr[1]);\n\n\t\t\tArrayList<Integer>[] adlist = (ArrayList<Integer>[]) new ArrayList[N + 1];\n\t\t\tfor (int i = 1; i <= N; i++)\n\t\t\t\tadlist[i] = new ArrayList<Integer>();\n\t\t\tfor (int i = 0; i < M; i++) {\n\t\t\t\tString[] arr1 = br.readLine().split(\" \");\n\t\t\t\tint a = Integer.parseInt(arr1[0]);\n\t\t\t\tint b = Integer.parseInt(arr1[1]);\n\t\t\t\tadlist[b].add(a);\n\t\t\t}\n\t\t\tint[] num = new int[N + 1];\n\t\t\tfor (int i = 1; i <= N; i++) {\n\t\t\t\tint[] c = new int[N + 1];\n\t\t\t\tconnectedCom = 0;\n\t\t\t\tdfs(i, adlist, c);\n\t\t\t\tnum[i] = connectedCom;\n\t\t\t}\n\t\t\tint max = 0;\n\t\t\tfor (int i = 1; i <= N; i++) {\n\t\t\t\tif (max < num[i])\n\t\t\t\t\tmax = num[i];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= N; i++) {\n\t\t\t\tif (num[i] == max)\n\t\t\t\t\tSystem.out.print(i + \" \");\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "void updateTreeSelection() {\n\n TreePath[] selections = tree.getSelectionPaths();\n currentSelectedPaths.clear();\n if (selections != null) {\n for (TreePath selection : selections) {\n currentSelectedPaths.add(selection);\n }\n }\n if ((selections == null) || (selections.length == 0)) {\n farmStatistics.setEnabled(false);\n linkStatistics.setEnabled(false);\n synchronized (basicPanel.getClusterPanel().getTreeLock()) {\n basicPanel.getClusterPanel().updateClusters(new Vector(), new Hashtable());\n }\n synchronized (basicPanel.getValPanel().getTreeLock()) {\n basicPanel.getValPanel().updateValues(new Vector());\n }\n synchronized (basicPanel.getModPanel().getTreeLock()) {\n basicPanel.getModPanel().updateList(new Vector());\n }\n return;\n }\n if ((selections.length == 1)\n && (((DefaultMutableTreeNode) selections[0].getLastPathComponent()).getUserObject() instanceof rcNode)) {\n farmStatistics.setEnabled(canShowFarmStatistics());\n linkStatistics.setEnabled(canShowLinkStatistics());\n } else {\n farmStatistics.setEnabled(false);\n linkStatistics.setEnabled(false);\n }\n Object[] userSel = new Object[selections.length];\n selectedGroups.clear();\n for (int j = 0; j < selections.length; j++) {\n userSel[j] = ((DefaultMutableTreeNode) selections[j].getLastPathComponent()).getUserObject();\n if (userSel[j] instanceof String) { // group selected\n selectedGroups.add(userSel[j]);\n DefaultMutableTreeNode groupNode = ((DefaultMutableTreeNode) selections[j].getLastPathComponent());\n for (int i = 0; i < treeModel.getChildCount(groupNode); i++) {\n tree.addSelectionPath(selections[j].pathByAddingChild(treeModel.getChild(groupNode, i)));\n }\n }\n }\n\n // update the parameters window to show only common parameters\n updateParamAndModPanels(userSel);\n }", "public void mergeClassesIntoTree(DefaultTreeModel model, boolean reset);", "public void merge(int arr[],int l, int m, int r){\n int n1 =m-l+1;\n int n2=r-m;\n \n //create temp array\n int L[]=new int[n1];\n int R[] = new int[n2];\n \n //Copy data in temp array\n for(int i=0;i<n1;i++){\n L[i]=arr[l+1];\n }\n for(int j=0;j<n2;j++){\n R[j]=arr[m+1+j];\n }\n \n // Merge arrray\n int i=0,j=0;\n int k=l;\n while(i<n1 && j<n2){\n if(L[i]<=R[i]){\n arr[k] = L[i];\n i++;\n }\n else{\n arr[k]=R[j];\n j++;\n }\n k++;\n }\n // Copy rmaing elements of L[]\n while(i<n1){\n arr[k]=L[i];\n i++;\n k++;\n }\n \n while(j<n2){\n arr[k]=R[j];\n j++;\n k++;\n }\n \n }", "@Override\n\tpublic INode build(List<INode> input) {\n\t\treturn null;\n\t}", "ArrayList<Cell> getChildren(Integer[][] level){\n int[][] values={{0,1},{0,-1},{1,0},{-1,0}};\n ArrayList<Cell> children = new ArrayList<>();\n for (int i = 0; i < values.length; i++){\n if (isLegalMove(this.getI()+values[i][0], this.getJ()+values[i][1],level)){\n children.add(new Cell(this.getI()+values[i][0], this.getJ()+values[i][1]));\n }\n }\n //the code below achieves the same goal; still here for clarity\n\n// if (isLegalMove(this.getI(), this.getJ()+1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()+1));\n// }\n// if (isLegalMove(this.getI(), this.getJ()-1, level)) {\n// children.add(new Cell(this.getI(), this.getJ()-1));\n// }\n// if (isLegalMove(this.getI()+1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()+1, this.getJ()));\n// }\n// if (isLegalMove(this.getI()-1, this.getJ(), level)) {\n// children.add(new Cell(this.getI()-1, this.getJ()));\n// }\n return children;\n }", "void calcAllMatrixSSP(int iNode1, int iNode2, int iNode3) {\n\t\tint [] iStates1 = m_iStates[iNode1];\n\t\tint [] iStates2 = m_iStates[iNode2];\n\t\tdouble [] fMatrices1 = m_fMatrices[m_iCurrentMatrices[iNode1]][iNode1];\n\t\tdouble [] fMatrices2 = m_fMatrices[m_iCurrentMatrices[iNode2]][iNode2];\n\t\tdouble [] fPartials3 = m_fPartials[m_iCurrentPartials[iNode3]][iNode3];\n\t\tint v = 0;\n\n\t\tfor (int l = 0; l < m_nMatrices; l++) {\n\n\t\t\tfor (int k = 0; k < m_nPatterns; k++) {\n\n\t\t\t\tint state1 = iStates1[k];\n\t\t\t\tint state2 = iStates2[k];\n\n\t\t\t\tint w = l * m_nMatrixSize;\n\n if (state1 < m_nStates && state2 < m_nStates) {\n\n\t\t\t\t\tfor (int i = 0; i < m_nStates; i++) {\n\n\t\t\t\t\t\tfPartials3[v] = fMatrices1[w + state1] * fMatrices2[w + state2];\n\n\t\t\t\t\t\tv++;\n\t\t\t\t\t\tw += m_nStates;\n\t\t\t\t\t}\n\n\t\t\t\t} else if (state1 < m_nStates) {\n\t\t\t\t\t// child 2 has a gap or unknown state so treat it as unknown\n\n\t\t\t\t\tfor (int i = 0; i < m_nStates; i++) {\n\n\t\t\t\t\t\tfPartials3[v] = fMatrices1[w + state1];\n\n\t\t\t\t\t\tv++;\n\t\t\t\t\t\tw += m_nStates;\n\t\t\t\t\t}\n\t\t\t\t} else if (state2 < m_nStates) {\n\t\t\t\t\t// child 2 has a gap or unknown state so treat it as unknown\n\n\t\t\t\t\tfor (int i = 0; i < m_nStates; i++) {\n\n\t\t\t\t\t\tfPartials3[v] = fMatrices2[w + state2];\n\n\t\t\t\t\t\tv++;\n\t\t\t\t\t\tw += m_nStates;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// both children have a gap or unknown state so set partials to 1\n\n\t\t\t\t\tfor (int j = 0; j < m_nStates; j++) {\n\t\t\t\t\t\tfPartials3[v] = 1.0;\n\t\t\t\t\t\tv++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void BuildHierarchyTree(Dataset d, int dim_num,\n\t\t\tArrayList<KDNode> class_buff) throws IOException {\n\t\t\n\t\tfor(int k=0; k<class_buff.size(); k++) {\n\t\t\tclass_buff.get(k).class_vect = new double[20];\n\t\t}\n\t\t\n\t\tCreateClassifierVec(d, dim_num, class_buff, 0);\n\t\t\n\t\twhile(root_map.size() > 4) {\n\t\t\t\n\t\t\tSystem.out.println(\"Root Size: \"+root_map.size());\n\t\t\tArrayList<KDNode> root_buff = new ArrayList<KDNode>();\n\t\t\tfor(KDNode k : root_map) {\n\t\t\t\troot_buff.add(k);\n\t\t\t\t\n\t\t\t\tfloat length = 0;\n\t\t\t\tfor(int i=0; i<k.class_vect.length; i++) {\n\t\t\t\t\tlength += k.class_vect[i] * k.class_vect[i];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlength = (float) Math.sqrt(length);\n\t\t\t\tfor(int i=0; i<k.class_vect.length; i++) {\n\t\t\t\t\tk.class_vect[i] /= length;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfloat max = -99999999;\n\t\t\tTable max_join = new Table();\n\t\t\tfor(int j=0; j<root_buff.size(); j++) {\n\t\t\t\t\n\t\t\t\tfor(int i=j+1; i<root_buff.size(); i++) {\n\n\t\t\t\t\tKDNode dim1 = root_buff.get(j);\n\t\t\t\t\tKDNode dim2 = root_buff.get(i);\n\t\t\t\t\t\n\t\t\t\t\tfloat dot_product = 0;\n\t\t\t\t\tfor(int k=0; k<dim1.class_vect.length; k++) {\n\t\t\t\t\t\tdot_product += dim1.class_vect[k] * dim2.class_vect[k];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tdot_product /= (dim1.LeafNodeNum() + dim2.LeafNodeNum());\n\t\t\t\t\t\n\t\t\t\t\tif(dot_product > max) {\n\t\t\t\t\t\tmax = dot_product;\n\t\t\t\t\t\tmax_join.dim1 = dim1;\n\t\t\t\t\t\tmax_join.dim2 = dim2;\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\t\n\t\t\tmax_join.dim1.RemoveRootNode();\n\t\t\tmax_join.dim2.RemoveRootNode();\n\t\t\t\n\t\t\tKDNode parent = new KDNode(null, 0);\n\t\t\tparent.left_ptr = max_join.dim1;\n\t\t\tparent.right_ptr = max_join.dim2;\n\t\t\tparent.node_corr = max;\n\t\t\t\n\t\t\tparent.class_vect = new double[max_join.dim1.class_vect.length];\n\t\t\tfor(int k=0; k<max_join.dim1.class_vect.length; k++) {\n\t\t\t\tparent.class_vect[k] = (max_join.dim1.class_vect[k] + max_join.dim2.class_vect[k]) / 2;\n\t\t\t}\n\t\t\t\n\t\t\tfloat length = 0;\n\t\t\tfor(int i=0; i<parent.class_vect.length; i++) {\n\t\t\t\tlength += parent.class_vect[i] * parent.class_vect[i];\n\t\t\t}\n\t\t\t\n\t\t\tlength = (float) Math.sqrt(length);\n\t\t\tfor(int i=0; i<parent.class_vect.length; i++) {\n\t\t\t\tparent.class_vect[i] /= length;\n\t\t\t}\n\t\t\t\n\t\t\tparent.left_ptr.parent_ptr = parent;\n\t\t\tparent.right_ptr.parent_ptr = parent;\n\t\t}\n\t\t\n\t\tint offset = 0;\n\t\tSampleSpace s = new SampleSpace();\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\tKDNodeDim dim = new KDNodeDim(k, offset++);\n\t\t\ts.k_neighbour.add(dim);\n\t\t\ts.kdnode_dim.add(dim);\n\t\t}\n\t\t\n\t\tfor(KDNode k : KDNode.RootSet()) {\n\t\t\tk.space = s;\n\t\t}\n\t}", "public TreeStructure<String> optimiseTree() throws IllegalAccessException {\n\n canonicalTree.createStack(canonicalTree.getRootNode());\n TreeStructure.Node<String> popNode;\n TreeStructure.Node<String> whereNodeToDelete = null;\n Stack<TreeStructure.Node<String>> stack = canonicalTree.getStack();\n Stack<TreeStructure.Node<String>> optimizationStack = new Stack<>();\n\n boolean conditionAlready;\n while (!stack.empty()) {\n popNode = stack.pop();\n switch (popNode.getNodeStatus()) {\n case RELATION_NODE_STATUS:{\n conditionAlready = false;\n /*if there is a condition associated with that relation then call the method. and set set conditionAlready to TRue so that\n if a node is associated with more than one conditions all the associated conditions will be added to it's parent node.\n after every iteration of the loop the popNode is becoming the node that holds the condition if any so need to make pop node to hold the\n relation node again (if node has a child node-> avoid exception)!!!*/\n while(optimizedWhere.containsValue(new LinkedList<>(Collections.singleton(popNode.getData())))) {\n conditionAlready = relationNodeAction(popNode, conditionAlready);\n if(popNode.getChildren().size() == 1) popNode = popNode.getChildren().get(0);\n }\n associatedRelations = new LinkedList<>();\n break;\n }\n case CARTESIAN_NODE_STATUS: {\n\n cartesianNodeAction(popNode,(Stack<TreeStructure.Node<String>>) optimizationStack.clone());\n cartesianNodesIncludeCond(popNode);\n associatedRelations = new LinkedList<>();\n }\n case WHERE_NODE_STATUS:{\n whereNodeToDelete = popNode;\n break;\n }\n }\n optimizationStack.push(popNode);\n }\n //Delete node that holds the condition if any from the initial tree\n if(whereNodeToDelete!=null){\n /*The condition node will be removed so the root node level must become the condition node's level\n *Make the root node the parent of its child node so the whole tree won't be deleted when the node is deleted*/\n canonicalTree.getRootNode().setNodeLevel(whereNodeToDelete.getNodeLevel());\n whereNodeToDelete.getChildren().get(0).setParentNode(whereNodeToDelete.getParentNode());\n canonicalTree.deleteNode(whereNodeToDelete);\n }\n convertCartesianToJoin();\n\n\n return canonicalTree;\n }", "public void collisionCalculation(ArrayList<GameObject> gameobject, int elementcheck ) {\n\r\n _solid_Object_Detected = false;\r\n _total_Objects_Collided = 0;\r\n\r\n\r\n int lenght = gameobject.size();\r\n for (int i = 0; i < lenght; i++)\r\n {\r\n\r\n if(i != elementcheck)\r\n {\r\n //Set the object equal to\r\n\r\n\r\n switch (gameobject.get(i).getObjectType())\r\n {\r\n case Static.PLAYER:\r\n case Static.FIREBALL:\r\n case Static.FLOATINGICEBLOCK:\r\n case Static.BLUEFIREBALL:\r\n case Static.ENERGYICESPHERE:\r\n case Static.BALLISTICMETALBOX:\r\n case Static.EXTRAHITBOX:\r\n //gameobject.get(i).eventFlags();\r\n //break;\r\n _omega_Array = gameobject.get(i).getCollisionDetailsArray();\r\n object_State_2D = _global.twoDSquareObjectDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8]);\r\n\r\n\r\n\r\n //Nested Collisions for special object with controlled children\r\n switch(_alpha_Array[1])\r\n {\r\n //Players detect children objects\r\n case Static.PLAYER:\r\n switch (_omega_Array[1])\r\n {\r\n //Player can detect the children of all object listed below.\r\n case Static.BALLISTICMETALBOX:\r\n\r\n if(_total_Objects_Collided <= _jagged_Super_Int_Array.size() - 1)\r\n {\r\n _jagged_Super_Int_Array.set(_total_Objects_Collided, gameobject.get(i).getChildrenCollisionDetailsJaggedArray());\r\n }\r\n else if(_total_Objects_Collided > _jagged_Super_Int_Array.size() - 1)\r\n {\r\n _jagged_Super_Int_Array.add(gameobject.get(i).getChildrenCollisionDetailsJaggedArray());\r\n }\r\n\r\n\r\n //Retest the collision status with all the children\r\n for (int z = 0; z <_jagged_Super_Int_Array.size();z++)\r\n {\r\n int lenghtofarray = _jagged_Super_Int_Array.get(_total_Objects_Collided).length;\r\n for(int y = 0; y < lenghtofarray ; y++)\r\n {\r\n int _child_object_state;\r\n _child_Omega_Array = _jagged_Super_Int_Array.get(z)[y];\r\n\r\n\r\n _child_object_state = _global.twoDSquareObjectDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _child_Omega_Array[5], _child_Omega_Array[6], _child_Omega_Array[7], _child_Omega_Array[8]);\r\n _jagged_Super_Int_Array.get(_total_Objects_Collided)[y][0] = _child_object_state;\r\n\r\n\r\n\r\n\r\n }\r\n\r\n }\r\n _children_Object_Detected = true;\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n //Solid object detector\r\n switch(_alpha_Array[1])\r\n {\r\n case Static.PLAYER:\r\n switch (_omega_Array[1])\r\n {\r\n case Static.FLOATINGICEBLOCK:\r\n if (_total_Objects_Collided <= _jagged_Boolean_Array.size() - 1) {\r\n _jagged_Boolean_Array.set(_total_Objects_Collided, _global.pointOfContactDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8], object_State_2D));\r\n }\r\n else if (_total_Objects_Collided > _jagged_Boolean_Array.size() - 1)\r\n {\r\n _jagged_Boolean_Array.add(_global.pointOfContactDetection(_alpha_Array[5], _alpha_Array[6], _alpha_Array[7], _alpha_Array[8], _omega_Array[5], _omega_Array[6], _omega_Array[7], _omega_Array[8], object_State_2D));\r\n }\r\n _solid_Object_Detected = true;\r\n break;\r\n case Static.FIREBALL:\r\n break;\r\n }\r\n break;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n ///////////////////////////////////////////////////////////////////////////////////////////\r\n\r\n switch (object_State_2D)\r\n {\r\n case Static.COLLISION_2D_PIERCE:\r\n case Static.COLLISION_2D_TOUCH:\r\n\r\n if(_total_Objects_Collided <= _jagged_Array.size() - 1)\r\n {\r\n _jagged_Array.set(_total_Objects_Collided, gameobject.get(i).getCollisionDetailsArray());\r\n\r\n }\r\n else if(_total_Objects_Collided > _jagged_Array.size() - 1)\r\n {\r\n _jagged_Array.add(gameobject.get(i).getCollisionDetailsArray());\r\n }\r\n _jagged_Array.get(_total_Objects_Collided)[0] = object_State_2D;\r\n\r\n _total_Objects_Collided++;\r\n\r\n break;\r\n case Static.MIDAIR:\r\n break;\r\n }\r\n break;\r\n\r\n }\r\n }\r\n }\r\n\r\n //if (_total_Objects_Collided == 0) {\r\n // _jagged_Array = null;\r\n //}\r\n }", "@Contract(pure = true)\n @Nullable\n private static TreeElement[] childCallTreeElements(@NotNull Modular modular, Call[] childCalls) {\n TreeElement[] treeElements = null;\n\n if (childCalls != null) {\n Queue<Call> childCallQueue = new ArrayDeque<>(Arrays.asList(childCalls));\n int length = childCalls.length;\n final List<TreeElement> treeElementList = new ArrayList<TreeElement>(length);\n FunctionByNameArity functionByNameArity = new FunctionByNameArity(length, treeElementList, modular);\n MacroByNameArity macroByNameArity = new MacroByNameArity(length, treeElementList, modular);\n Set<Overridable> overridableSet = new HashSet<Overridable>();\n Set<org.elixir_lang.structure_view.element.Use> useSet = new HashSet<org.elixir_lang.structure_view.element.Use>();\n\n while (!childCallQueue.isEmpty()) {\n Call childCall = childCallQueue.remove();\n\n if (childCall instanceof Or) {\n childCallQueue.addAll(orChildCallList((Or) childCall));\n } else if (Callback.is(childCall)) {\n treeElementList.add(new Callback(modular, childCall));\n } else if (Delegation.is(childCall)) {\n functionByNameArity.addDelegationToTreeElementList(childCall);\n } else if (Exception.is(childCall)) {\n functionByNameArity.setException(new Exception(modular, childCall));\n } else if (CallDefinitionClause.isFunction(childCall)) {\n functionByNameArity.addClausesToCallDefinition(childCall);\n } else if (CallDefinitionSpecification.is(childCall)) {\n functionByNameArity.addSpecificationToCallDefinition(childCall);\n } else if (Implementation.is(childCall)) {\n treeElementList.add(new Implementation(modular, childCall));\n } else if (CallDefinitionClause.isMacro(childCall)) {\n macroByNameArity.addClausesToCallDefinition(childCall);\n } else if (Module.is(childCall)) {\n treeElementList.add(new Module(modular, childCall));\n } else if (Overridable.is(childCall)) {\n Overridable overridable = new Overridable(modular, childCall);\n overridableSet.add(overridable);\n treeElementList.add(overridable);\n } else if (Protocol.is(childCall)) {\n treeElementList.add(new Protocol(modular, childCall));\n } else if (org.elixir_lang.structure_view.element.Quote.is(childCall)) {\n treeElementList.add(new Quote(modular, childCall));\n } else if (Structure.is(childCall)) {\n treeElementList.add(new Structure(modular, childCall));\n } else if (Type.is(childCall)) {\n treeElementList.add(Type.fromCall(modular, childCall));\n } else if (org.elixir_lang.structure_view.element.Use.is(childCall)) {\n org.elixir_lang.structure_view.element.Use use = new org.elixir_lang.structure_view.element.Use(modular, childCall);\n useSet.add(use);\n treeElementList.add(use);\n } else if (Unknown.is(childCall)) { // Should always be last since it will match all macro calls\n treeElementList.add(new Unknown(modular, childCall));\n }\n }\n\n for (Overridable overridable : overridableSet) {\n for (TreeElement treeElement : overridable.getChildren()) {\n CallReference callReference = (CallReference) treeElement;\n Integer arity = callReference.arity();\n\n if (arity != null) {\n String name = callReference.name();\n\n CallDefinition function = functionByNameArity.get(pair(name, arity));\n\n if (function != null) {\n function.setOverridable(true);\n }\n }\n }\n }\n\n Collection<TreeElement> useCollection = new HashSet<TreeElement>(useSet.size());\n useCollection.addAll(useSet);\n Collection<TreeElement> nodesFromUses = Used.provideNodesFromChildren(useCollection);\n Map<Pair<String, Integer>, CallDefinition> useFunctionByNameArity = Used.functionByNameArity(nodesFromUses);\n\n for (Map.Entry<Pair<String, Integer>, CallDefinition> useNameArityFunction : useFunctionByNameArity.entrySet()) {\n CallDefinition useFunction = useNameArityFunction.getValue();\n\n if (useFunction.isOverridable()) {\n Pair<String, Integer> useNameArity = useNameArityFunction.getKey();\n\n CallDefinition function = functionByNameArity.get(useNameArity);\n\n if (function != null) {\n function.setOverride(true);\n }\n }\n }\n\n treeElements = treeElementList.toArray(new TreeElement[treeElementList.size()]);\n }\n\n return treeElements;\n }", "private PlanNode planMergeJoin(PlanNode current, PlanNode root) throws QueryMetadataException,\n\t\t\tTeiidComponentException {\n\t\tfloat sourceCost = NewCalculateCostUtil.computeCostForTree(current.getFirstChild(), metadata);\n\t\tCriteria crit = (Criteria)current.getProperty(NodeConstants.Info.SELECT_CRITERIA);\n\t\t\n\t\tPlannedResult plannedResult = findSubquery(crit, true);\n\t\tif (plannedResult.query == null) {\n\t\t\treturn current;\n\t\t}\n\t\tif (sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE \n\t\t\t\t&& sourceCost < RuleChooseDependent.DEFAULT_INDEPENDENT_CARDINALITY && !plannedResult.mergeJoin) {\n\t\t\t//TODO: see if a dependent join applies the other direction\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\tRelationalPlan originalPlan = (RelationalPlan)plannedResult.query.getProcessorPlan();\n Number originalCardinality = originalPlan.getRootNode().getEstimateNodeCardinality();\n if (!plannedResult.mergeJoin && originalCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE) {\n //TODO: this check isn't really accurate - exists and scalarsubqueries will always have cardinality 2/1\n \t//if it's currently unknown, removing criteria won't make it any better\n \treturn current;\n }\n \n Collection<GroupSymbol> leftGroups = FrameUtil.findJoinSourceNode(current).getGroups();\n\n\t\tif (!planQuery(leftGroups, false, plannedResult)) {\n\t\t\tif (plannedResult.mergeJoin && analysisRecord != null && analysisRecord.recordAnnotations()) {\n\t\t\t\tthis.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, \"Could not plan as a merge join: \" + crit, \"ignoring MJ hint\", Priority.HIGH)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\t//check if the child is already ordered. TODO: see if the ordering is compatible.\n\t\tPlanNode childSort = NodeEditor.findNodePreOrder(root, NodeConstants.Types.SORT, NodeConstants.Types.SOURCE | NodeConstants.Types.JOIN);\n\t\tif (childSort != null) {\n\t\t\tif (plannedResult.mergeJoin && analysisRecord != null && analysisRecord.recordAnnotations()) {\n\t\t\t\tthis.analysisRecord.addAnnotation(new Annotation(Annotation.HINTS, \"Could not plan as a merge join since the parent join requires a sort: \" + crit, \"ignoring MJ hint\", Priority.HIGH)); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t}\n\t\t\treturn current;\n\t\t}\n\t\t\n\t\t//add an order by, which hopefully will get pushed down\n\t\tplannedResult.query.setOrderBy(new OrderBy(plannedResult.rightExpressions).clone());\n\t\tfor (OrderByItem item : plannedResult.query.getOrderBy().getOrderByItems()) {\n\t\t\tint index = plannedResult.query.getProjectedSymbols().indexOf(item.getSymbol());\n\t\t\tif (index >= 0 && !(item.getSymbol() instanceof ElementSymbol)) {\n\t\t\t\titem.setSymbol((Expression) plannedResult.query.getProjectedSymbols().get(index).clone());\n\t\t\t}\n\t\t\titem.setExpressionPosition(index);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//clone the symbols as they may change during planning\n\t\t\tList<Expression> projectedSymbols = LanguageObject.Util.deepClone(plannedResult.query.getProjectedSymbols(), Expression.class);\n\t\t\t//NOTE: we could tap into the relationalplanner at a lower level to get this in a plan node form,\n\t\t\t//the major benefit would be to reuse the dependent join planning logic if possible.\n\t\t\tRelationalPlan subPlan = (RelationalPlan)QueryOptimizer.optimizePlan(plannedResult.query, metadata, idGenerator, capFinder, analysisRecord, context);\n\t\t\tNumber planCardinality = subPlan.getRootNode().getEstimateNodeCardinality();\n \n\t\t\tif (!plannedResult.mergeJoin) {\n\t\t\t\t//if we don't have a specific hint, then use costing\n\t if (planCardinality.floatValue() == NewCalculateCostUtil.UNKNOWN_VALUE \n\t \t\t|| planCardinality.floatValue() > 10000000\n\t \t\t|| (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() > 1000)\n\t \t\t|| (sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE && sourceCost * originalCardinality.floatValue() < planCardinality.floatValue() / (100 * Math.log(Math.max(4, sourceCost))))) {\n\t \t//bail-out if both are unknown or the new plan is too large\n\t \tif (analysisRecord != null && analysisRecord.recordDebug()) {\n\t \t\tcurrent.recordDebugAnnotation(\"cost of merge join plan was not favorable\", null, \"semi merge join will not be used\", analysisRecord, metadata); //$NON-NLS-1$ //$NON-NLS-2$\n\t \t\t\t}\n\t \treturn current;\n\t }\n\t\t\t}\n \n\t\t\t//assume dependent\n\t\t\tif ((sourceCost != NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() != NewCalculateCostUtil.UNKNOWN_VALUE \n\t\t\t\t\t&& planCardinality.floatValue() < sourceCost / 8) || (sourceCost == NewCalculateCostUtil.UNKNOWN_VALUE && planCardinality.floatValue() <= 1000)) {\n\t\t\t\tplannedResult.makeInd = true;\n\t\t\t}\n\t\t\t\n\t\t\t/*if (plannedResult.makeInd \n\t\t\t\t\t&& plannedResult.query.getCorrelatedReferences() == null\n\t\t\t\t\t&& !plannedResult.not\n\t\t\t\t\t&& plannedResult.leftExpressions.size() == 1) {\n \t//TODO: this should just be a dependent criteria node to avoid sorts\n }*/\n\t\t\t\n\t\t\tcurrent.recordDebugAnnotation(\"Conditions met (hint or cost)\", null, \"Converting to a semi merge join\", analysisRecord, metadata); //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\t\n PlanNode semiJoin = NodeFactory.getNewNode(NodeConstants.Types.JOIN);\n semiJoin.addGroups(current.getGroups());\n Set<GroupSymbol> groups = GroupsUsedByElementsVisitor.getGroups(plannedResult.rightExpressions);\n semiJoin.addGroups(groups);\n semiJoin.setProperty(NodeConstants.Info.JOIN_STRATEGY, JoinStrategyType.MERGE);\n semiJoin.setProperty(NodeConstants.Info.JOIN_TYPE, plannedResult.not?JoinType.JOIN_ANTI_SEMI:JoinType.JOIN_SEMI);\n semiJoin.setProperty(NodeConstants.Info.NON_EQUI_JOIN_CRITERIA, plannedResult.nonEquiJoinCriteria);\n List<Criteria> joinCriteria = new ArrayList<Criteria>();\n joinCriteria.addAll(plannedResult.nonEquiJoinCriteria);\n for (int i = 0; i < plannedResult.leftExpressions.size(); i++) {\n \tjoinCriteria.add(new CompareCriteria((Expression)plannedResult.rightExpressions.get(i), CompareCriteria.EQ, (Expression)plannedResult.leftExpressions.get(i)));\n }\n semiJoin.setProperty(NodeConstants.Info.JOIN_CRITERIA, joinCriteria);\n //nested subqueries are possibly being promoted, so they need their references updated\n List<SymbolMap> refMaps = semiJoin.getAllReferences();\n SymbolMap parentRefs = plannedResult.query.getCorrelatedReferences();\n for (SymbolMap refs : refMaps) {\n \tfor (Map.Entry<ElementSymbol, Expression> ref : refs.asUpdatableMap().entrySet()) {\n \t Expression expr = ref.getValue();\n \t if (expr instanceof ElementSymbol) {\n\t \t Expression convertedExpr = parentRefs.getMappedExpression((ElementSymbol)expr);\n\t \t if (convertedExpr != null) {\n\t \t \tref.setValue(convertedExpr);\n\t \t }\n \t }\n \t semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(ref.getValue()));\n \t }\n }\n semiJoin.setProperty(NodeConstants.Info.LEFT_EXPRESSIONS, plannedResult.leftExpressions);\n semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(plannedResult.leftExpressions));\n semiJoin.setProperty(NodeConstants.Info.RIGHT_EXPRESSIONS, plannedResult.rightExpressions);\n semiJoin.getGroups().addAll(GroupsUsedByElementsVisitor.getGroups(plannedResult.rightExpressions));\n semiJoin.setProperty(NodeConstants.Info.SORT_RIGHT, SortOption.ALREADY_SORTED);\n semiJoin.setProperty(NodeConstants.Info.OUTPUT_COLS, root.getProperty(NodeConstants.Info.OUTPUT_COLS));\n \n List childOutput = (List)current.getFirstChild().getProperty(NodeConstants.Info.OUTPUT_COLS);\n PlanNode toCorrect = root;\n while (toCorrect != current) {\n \ttoCorrect.setProperty(NodeConstants.Info.OUTPUT_COLS, childOutput);\n \ttoCorrect = toCorrect.getFirstChild();\n }\n \n PlanNode node = NodeFactory.getNewNode(NodeConstants.Types.ACCESS);\n node.setProperty(NodeConstants.Info.PROCESSOR_PLAN, subPlan);\n node.setProperty(NodeConstants.Info.OUTPUT_COLS, projectedSymbols);\n node.setProperty(NodeConstants.Info.EST_CARDINALITY, planCardinality);\n node.addGroups(groups);\n root.addAsParent(semiJoin);\n semiJoin.addLastChild(node);\n PlanNode result = current.getParent();\n NodeEditor.removeChildNode(result, current);\n RuleImplementJoinStrategy.insertSort(semiJoin.getFirstChild(), (List<Expression>) plannedResult.leftExpressions, semiJoin, metadata, capFinder, true, context);\n if (plannedResult.makeInd && !plannedResult.not) {\n \t//TODO: would like for an enhanced sort merge with the semi dep option to avoid the sorting\n \t//this is a little different than a typical dependent join in that the right is the independent side\n \tString id = RuleChooseDependent.nextId();\n \tPlanNode dep = RuleChooseDependent.getDependentCriteriaNode(id, plannedResult.rightExpressions, plannedResult.leftExpressions, node, metadata, null, false, null);\n \tsemiJoin.getFirstChild().addAsParent(dep);\n \tsemiJoin.setProperty(NodeConstants.Info.DEPENDENT_VALUE_SOURCE, id);\n \tthis.dependent = true;\n }\n return result;\n\t\t} catch (QueryPlannerException e) {\n\t\t\t//can't be done - probably access patterns - what about dependent\n\t\t\treturn current;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tOrderedTree tree_77, tree_44, tree_99, tree_33, tree_55;\n\t\t// 자식을 갖는 객체 이름 지정\n\t\t\n\t\tOrderedTree tree_22 = new OrderedTree(22); // root가 22인 단독 트리 생성\n\t\tOrderedTree tree_66 = new OrderedTree(66); // root가 66인 단독 트리 생성\n\t\tOrderedTree tree_88 = new OrderedTree(88); // root가 88인 단독 트리 생성\n\t\t\n\t\tList subtreeOf_33 = new LinkedList(); // root를 33으로 하는 트리의 subtree를 담을 list 객체\n\t\tsubtreeOf_33.add(tree_22); // subtree list에 root가 22인 트리를 넣음\n\t\ttree_33 = new OrderedTree(33, subtreeOf_33);\n\t\t// subtree로 subtreeOf_33 list에 담겨있는 트리를 갖고 root가 33인 트리 생성\n\t\t\n\t\tList subtreeOf_55 = new LinkedList(); // root를 55로 하는 트리의 subtree를 담을 list 객체\n\t\tsubtreeOf_55.add(tree_66); // subtree list에 root가 66인 트리를 넣음\n\t\ttree_55 = new OrderedTree(55, subtreeOf_55);\n\t\t// subtree로 subtreeOf_55 list에 담겨있는 트리를 갖고 root가 55인 트리 생성\n\t\t\n\t\tList subtreeOf_44 = new LinkedList(); // root를 44로 하는 트리의 subtree를 담을 list 객체\n\t\tsubtreeOf_44.add(tree_33); // subtree list에 root가 33인 트리를 넣음\n\t\tsubtreeOf_44.add(tree_55); // subtree list에 root가 55인 트리를 넣음\n\t\ttree_44 = new OrderedTree(44, subtreeOf_44);\n\t\t// subtree로 subtreeOf_44 list에 담겨있는 트리를 갖고 root가 44인 트리 생성\n\t\t\n\t\tList subtreeOf_99 = new LinkedList(); // root를 99로 하는 트리의 subtree를 담을 list 객체\n\t\tsubtreeOf_99.add(tree_88); // subtree list에 root가 88인 트리를 넣음\n\t\ttree_99 = new OrderedTree(99, subtreeOf_99);\n\t\t// subtree로 subtreeOf_99 list에 담겨있는 트리를 갖고 root가 99인 트리 생성\n\t\t\n\t\tList subtreeOf_77 = new LinkedList(); // root를 77로 하는 트리의 subtree를 담을 list 객체\n\t\tsubtreeOf_77.add(tree_44); // subtree list에 root가 44인 트리를 넣음\n\t\tsubtreeOf_77.add(tree_99); // subtree list에 root가 99인 트리를 넣음\n\t\ttree_77 = new OrderedTree(77, subtreeOf_77);\n\t\t// subtree로 subtreeOf_77 list에 담겨있는 트리를 갖고 root가 77인 트리 생성\n\t\t\n\t\tSystem.out.print(\"레벨 순서 순회 : \");\n\t\ttree_77.levelorder(); // 레벨 순서 순회 메소드 호출\n\t}", "public static void main(String[] args) {\n\t\t\n\t\t\tint[] nums={1,2,3};\n\t\t\n\t\t\tList <List<Integer>>mainList = new ArrayList<List<Integer>>();\n\t\t \n\t List<Integer> list = new ArrayList<Integer>();\n\t \n\t \n\t HashSet<List<Integer>> set = new HashSet<List<Integer>>();\n\t \n\t \n\t for(int j=0;j<nums.length;j++)\n\t list.add(nums[j]);\n\t \n\t int k=0;\n\t mainList.add(list);\n\t set.add(list);\n\t subSetList(mainList,list,set,k);\n\t\t System.out.println(\"mainList\"+ mainList);\n\t\t System.out.println(\"set\"+ set);\n\n\t}", "private static List<List<Integer>> findLeavesI(TreeNode root) {\n List<List<Integer>> result = new ArrayList<>();\n findLeavesRecurI(root, result);\n return result;\n }", "public static void main(String[] args) throws Exception {\n String ade_view_root = args[1].trim();\n String filelistpath=args[0].trim();\n String[] files=FamilyModuleHelper.getFileList(filelistpath, ade_view_root);\n HashSet<String> projectDirs = new HashSet<String>(); \n \n vcScanner.debugWriter = new BufferedWriter(new FileWriter(\"listBindings.txt\"));\n vcScanner.writer = new BufferedWriter(new FileWriter(\"VC_scan_UI_Performance.csv\")); \n vcScanner.writer1 = new BufferedWriter(new FileWriter(\"VC_scan_UI_Performance_noVC.csv\"));\n vcScanner.generateExemptionList();\n vcScanner.writer1.write(\"Family,Module,Product,Filename,Label,ViewName,Issue,Jsff,Model,Component\\n\");\n vcScanner.writer.write(\"Family,Module,Product,Filename,Label,ViewName, ViewAttribute,\" +\n \"Column Name, Table Name, IsView, ResolvedTableCol, Indexed Table, NumRows, NumBlocks, Column Type, Index, Column Position, \" +\n \"VC Required, Is VC Case-insensitive?, IsQueriable?, RenderMode, VCR:VCI, \" +\n \"UI File, modelValue, componentName\\n\");\n \n boolean familySet = false;\n for(int i = 0; i < files.length; i++) {\n String filePath = ade_view_root + \"/\" + files[i].trim();\n File f = new File(filePath);\n if(!f.exists())\n continue;\n if(fileOfInterest(filePath)) {\n viewFilesInTransaction.add(files[i].trim());\n if(!familySet){\n vcScanner.sCrawlDir = files[i].trim();\n vcScanner.m_family = ViewCriteriaHelper.getFamily(files[i].trim());\n familySet = true;\n }\n String jprDir = VCPremergeChecker.findProjectDirectory(filePath);\n projectDirs.add(jprDir);\n } \n } \n if(projectDirs.size()==0)\n return;\n \n if(args.length > 2){\n String label = args[2].trim();\n String release = FamilyModuleHelper.getRelease(label);\n if(!ViewCriteriaHelper.isEmpty(release)) {\n try{\n int releaseNo= Integer.parseInt(release);\n \n if(releaseNo >= 11){\n vcScanner.function_indexColumns = SqlIndexFinder.readIndexesFromFile_rel11(\"function\");\n vcScanner.default_indexColumns = SqlIndexFinder.readIndexesFromFile_rel11(\"default\");\n SqlIndexFinder.readColPositionsFromFile_rel11();\n SqlIndexFinder.readTableDataFromFile_rel11();\n SqlIndexFinder.readViewDataFromFile_rel11();\n }else {\n vcScanner.function_indexColumns = SqlIndexFinder.readIndexesFromFile(\"function\");\n vcScanner.default_indexColumns = SqlIndexFinder.readIndexesFromFile(\"default\");\n SqlIndexFinder.readColPositionsFromFile();\n SqlIndexFinder.readTableDataFromFile();\n SqlIndexFinder.readViewDataFromFile();\n }\n if(releaseNo >=8)\n SqlIndexFinder.readTableDataFromFile_customer();\n \n }catch (NumberFormatException e) {\n //do nothing\n }\n }\n }else{\n vcScanner.function_indexColumns = SqlIndexFinder.readIndexesFromFile(\"function\");\n vcScanner.default_indexColumns = SqlIndexFinder.readIndexesFromFile(\"default\");\n SqlIndexFinder.readColPositionsFromFile();\n SqlIndexFinder.readTableDataFromFile();\n SqlIndexFinder.readViewDataFromFile();\n }\n \n \n \n \n vcScanner.parser =new ModifiedComboboxParser(vcScanner.m_family.toLowerCase(), ModifiedComboboxParser.ScanType.ALL);\n \n crawlDirectories(projectDirs); \n vcScanner.processFiles();\n vcScanner.writer.close();\n vcScanner.writer1.close();\n \n BufferedReader reader = new BufferedReader(new FileReader(\"VC_scan_UI_Performance_noVC.csv\"));\n vcScanner.writer1 = new BufferedWriter(new FileWriter(\"VC_scan_UI_Performance_noVC_rows.csv\"));\n vcScanner.writer1.write(\"Family,Module,Product,Filename,Label,ViewName,Issue,\" +\n \"UI File,Model,Component, ListOfTables, MaxRows, Blocks, TableWithMaxRows,WHEREContainsBinds\\n\");\n \n String line = reader.readLine();\n while((line = reader.readLine()) != null){\n \n String[] parts = line.split(\",\");\n String fileName = ade_view_root + \"/\" + parts[3].trim(); \n XMLDocument voXml = null;\n if(parts[3].trim().startsWith(\"oracle\"))\n voXml = vcScanner.voXmlsFromOtherJars.get(parts[3].trim());\n //ViewCriteriaHelper.getMaxRows(fileName,writer1,line,voXml, exemptions,currentVCViolations);\n ViewCriteriaHelper.getMaxRows(fileName,vcScanner.writer1,line,voXml,vcScanner.noVCexemptedTables1, vcScanner.noVCexemptedTables2_maxrows,vcScanner.lovVOToBaseVOMapping,vcScanner.voMaxRowsCalculated);\n }\n \n vcScanner.writer1.close();\n \n BufferedWriter outputFileWriter = new BufferedWriter(new FileWriter(\"vc_perf_scan.txt\"));\n \n reader = new BufferedReader(new FileReader(\"VC_scan_UI_Performance.csv\"));\n line = reader.readLine();\n boolean hasViolation = false;\n while((line = reader.readLine()) != null){\n String[] parts = line.split(\",\");\n if(parts.length < 25) continue; \n \n String fileName = parts[22].trim();\n if(viewFilesInTransaction.contains(fileName)){\n hasViolation = true;\n if(line.contains(\"savedSearch\"))\n outputFileWriter.write(\"Issue: SavedSearchBadViewCriteriaItems\\n\");\n else\n outputFileWriter.write(\"Issue: BadViewCriteriaItems\\n\");\n outputFileWriter.write(\"VO FileName: \" + parts[3] + \"\\n\");\n outputFileWriter.write(\"ViewAttribute: \" + parts[6].trim() + \"\\n\");\n outputFileWriter.write(\"ViewCriteria Name: \" + parts[21] + \"\\n\");\n outputFileWriter.write(\"Table Name: \" + parts[8] + \"\\n\");\n outputFileWriter.write(\"Column Name: \" + parts[7] + \"\\n\");\n outputFileWriter.write(\"Column position in index: \" + parts[16] + \"\\n\");\n outputFileWriter.write(\"UI File: \" + parts[22] + \"\\n\"); \n outputFileWriter.write(\"Model value: \" + parts[23] + \"\\n\"); \n outputFileWriter.write(\"Component: \" + parts[24] + \"\\n\");\n outputFileWriter.write(\"Description:\" + \"Required and Selectively Required ViewCriteria items \" +\n \"used in query panels and LOVs should be backed by proper indexes\\n\\n\");\n }\n }\n \n reader.close();\n \n if(hasViolation)\n outputFileWriter.write(\"\\n\\nPlease see http://myforums.oracle.com/jive3/thread.jspa?threadID=871762&tstart=0 \" +\n \"for description of the issue and resolution.\\n\\n\\n\");\n \n reader = new BufferedReader(new FileReader(\"VC_scan_UI_Performance_noVC_rows.csv\"));\n line = reader.readLine();\n hasViolation = false;\n while((line = reader.readLine()) != null){\n String[] parts = line.split(\",\");\n if(parts.length < 15) continue; \n \n String fileName = parts[7].trim();\n if(viewFilesInTransaction.contains(fileName)){\n hasViolation = true;\n if(line.contains(\"savedSearch\"))\n outputFileWriter.write(\"Issue: SavedSearchNoViewCriteria\\n\");\n else\n outputFileWriter.write(\"Issue: NoViewCriteria\\n\");\n outputFileWriter.write(\"VO FileName: \" + parts[3] + \"\\n\");\n outputFileWriter.write(\"UI File: \" + parts[7] + \"\\n\"); \n outputFileWriter.write(\"Model: \" + parts[8] + \"\\n\");\n outputFileWriter.write(\"Component: \" + parts[9] + \"\\n\");\n outputFileWriter.write(\"Description:\" + parts[6] + \"\\n\\n\");\n }\n }\n \n reader.close(); \n \n if(hasViolation)\n outputFileWriter.write(\"\\n\\nPlease see http://myforums.oracle.com/jive3/thread.jspa?threadID=871763&tstart=0\" +\n \" for description of the issue and resolution.\\n\\n\");\n \n outputFileWriter.close();\n \n }", "public List<Atom> mergeComplementaryProvRelAtoms(List<Atom> discarded){\r\n\t\tList<Atom> body = getBody();\r\n\t\t//\t\tboolean someMerged = false;\r\n\t\tList<Atom> ret = new ArrayList<Atom>();\r\n\r\n\t\tfor(int i = 0; i < body.size(); ){ \r\n\t\t\tAtom a = body.get(i);\r\n\t\t\tboolean merged = false;\r\n\t\t\tfor(int j = i+1; j < body.size(); ){\r\n\t\t\t\tAtom b = body.get(j);\r\n\t\t\t\tAtom mergedAtom = mergeProvRelAtoms(a, b);\r\n\t\t\t\tif(mergedAtom != null){\r\n\t\t\t\t\t//\t\t\t\t\tbody.add(mergedAtom);\r\n\t\t\t\t\tdiscarded.add(body.get(i));\r\n\t\t\t\t\tdiscarded.add(body.get(j));\r\n\t\t\t\t\tbody.set(i, mergedAtom);\r\n\t\t\t\t\tbody.remove(j);\r\n\t\t\t\t\tret.add(mergedAtom);\r\n\t\t\t\t\t//\t\t\t\t\tbody.remove(i);\r\n\t\t\t\t\tmerged = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(!merged){\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\t//\t\t\tsomeMerged = someMerged || merged;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "ArrayList<Edge> mergeHelp(ArrayList<Edge> l) {\n if (l.size() <= 1) {\n return l;\n }\n ArrayList<Edge> l1 = new ArrayList<Edge>();\n ArrayList<Edge> l2 = new ArrayList<Edge>();\n for (int i = 0; i < l.size() / 2; i++) {\n l1.add(l.get(i));\n }\n for (int i = l.size() / 2; i < l.size(); i++) {\n l2.add(l.get(i));\n }\n l1 = mergeHelp(l1);\n l2 = mergeHelp(l2);\n return merge(l1, l2);\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // int m = sc.nextInt();\n int n = sc.nextInt();\n Tree[] tree = new Tree[n];\n for (int i = 0; i < n; i++) {\n tree[i] = new Tree(i + 1, sc.nextInt());\n }\n // System.out.println(Arrays.toString(tree));\n\n // Arrays.sort(tree,(a,b)->b.num-a.num);\n StringBuilder sb = new StringBuilder();\n int first = 0;\n\n boolean shibai = false;\n\n while (first < n) {\n while (first < n && tree[first].num == 0) {\n first++;\n }\n int idx = first + 1;\n out:\n while (idx < n) {\n while (idx < n && tree[idx].num == 0) {\n idx++;\n\n }\n while (idx < n && first < n && tree[idx].num > 0 && tree[first].num > 0) {\n\n sb.append(tree[first].type)\n .append(\" \")\n .append(tree[idx].type)\n .append(\" \");\n tree[idx].num--;\n tree[first].num--;\n if (tree[first].num == 0) {\n first++;\n break out;\n }\n }\n }\n// System.out.println(Arrays.toString(tree));\n// System.out.println(idx);\n if (idx > n - 1) {\n if (tree[first].num == 0) break;\n if (tree[first].num == 1) {\n sb.append(tree[first].type);\n break;\n } else {\n System.out.println(\"-\");\n shibai = true;\n break;\n }\n }\n }\n\n// while (true){\n// if(tree[0].num==1){\n// sb.append(tree[0].type);\n// break;\n// }\n// if(tree[1].num==0){\n// System.out.println(\"-\");\n// shibai=true;\n// break;\n// }\n// while (tree[1].num>0){\n// sb.append(tree[0].type).append(\" \").append(tree[1].type).append(\" \");\n// tree[0].num--;\n// tree[1].num--;\n// }\n// //System.out.println(sb.toString());\n// // System.out.println(Arrays.toString(tree));\n// // Arrays.sort(tree,(a,b)->b.num-a.num);\n//\n// }\n if (!shibai) {\n System.out.println(sb.toString());\n }\n\n\n }", "public boolean updateMenu() {\n selectedMotifNames=panel.getSelectedMotifNames();\n if (selectedMotifNames==null) return false;\n for (JMenuItem item:limitedToOne) {\n item.setEnabled(selectedMotifNames.length==1);\n }\n selectMotifsFromMenu.removeAll();\n selectOnlyMotifsFromMenu.removeAll(); \n for (String collectionName:engine.getNamesForAllDataItemsOfType(MotifCollection.class)) {\n JMenuItem subitem=new JMenuItem(collectionName);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenu.add(subitem);\n JMenuItem subitem2=new JMenuItem(collectionName);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenu.add(subitem2);\n } \n for (String partitionName:engine.getNamesForAllDataItemsOfType(MotifPartition.class)) {\n Data data=engine.getDataItem(partitionName);\n if (data instanceof MotifPartition) {\n JMenu selectMotifsFromMenuCluster=new JMenu(data.getName()); \n JMenu selectOnlyMotifsFromMenuCluster=new JMenu(data.getName()); \n for (String cluster:((MotifPartition)data).getClusterNames()) { \n JMenuItem subitem=new JMenuItem(cluster);\n subitem.setActionCommand(partitionName+\".\"+cluster);\n subitem.addActionListener(selectFromCollectionListener);\n selectMotifsFromMenuCluster.add(subitem);\n JMenuItem subitem2=new JMenuItem(cluster);\n subitem2.setActionCommand(partitionName+\".\"+cluster);\n subitem2.addActionListener(clearAndselectFromCollectionListener);\n selectOnlyMotifsFromMenuCluster.add(subitem2);\n }\n selectMotifsFromMenu.add(selectMotifsFromMenuCluster);\n selectOnlyMotifsFromMenu.add(selectOnlyMotifsFromMenuCluster);\n }\n } \n selectMotifsFromMenu.setEnabled(selectMotifsFromMenu.getMenuComponentCount()>0);\n selectOnlyMotifsFromMenu.setEnabled(selectOnlyMotifsFromMenu.getMenuComponentCount()>0);\n dbmenu.updateMenu((selectedMotifNames.length==1)?selectedMotifNames[0]:null,true);\n if (selectedMotifNames.length==1) {\n displayMotif.setText(DISPLAY_MOTIF+\" \"+selectedMotifNames[0]);\n displayMotif.setVisible(true);\n compareMotifToOthers.setText(\"Compare \"+selectedMotifNames[0]+\" To Other Motifs\");\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(true);\n } else { \n displayMotif.setVisible(false);\n compareMotifToOthers.setVisible(true);\n saveMotifLogo.setVisible(true);\n dbmenu.setVisible(false);\n }\n return true;\n }", "private void splitLevels() {\n\t\tint first = 0;\n\t\tfor(int i = 1; i<allCoords.size(); i++) {\n\t\t\tif (allCoords.get(i).z != allCoords.get(i-1).z) {\n\t\t\t\tfor(int j=first; j<i; j++) {\n\t\t\t\t\tcurrentLevel.add(allCoords.get(j));\n\t\t\t\t}\n\t\t\t\tsplitIntoRoots(); // automatically splits the cross section into roots\n\t\t\t\tcurrentLevel.clear();\n\t\t\t\tfirst = i;\n\t\t\t}\n\t\t}\n\t}", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "private void updateData() {\n\t\tDefaultMutableTreeNode root = new DefaultMutableTreeNode(\"Rollmaterial\");\n\n\t\tif (treeModel == null) {\n\t\t\ttreeModel = new DefaultTreeModel(root);\n\t\t\tstocksTree.setModel(treeModel);\n\t\t}\n\n\t\tHashMap<String, HashSet<rollingstock>> allsorted = new HashMap<>();\n\t\tHashSet<rollingstock> sorted = new HashSet<>();\n\n\t\tfor (rollingstock rs : dataCollector.collector.getAllTrainData().stocks.values()) {\n\t\t\tsorted.add(rs);\n\t\t\tfor (String t : rs.getTypes()) {\n\t\t\t\tHashSet<rollingstock> th;\n\t\t\t\tth = allsorted.get(t);\n\t\t\t\tif (th == null) {\n\t\t\t\t\tth = new HashSet<>();\n\t\t\t\t\tallsorted.put(t, th);\n\t\t\t\t}\n\t\t\t\tth.add(rs);\n\t\t\t}\n\t\t}\n\n\t\tDefaultMutableTreeNode list1 = new DefaultMutableTreeNode(\"alphabetisch\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t}\n\t\tlist1 = new DefaultMutableTreeNode(\"mit Antrieb\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tif (rs.getEngine() != null) {\n\t\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t\t}\n\t\t}\n\t\tlist1 = new DefaultMutableTreeNode(\"ohne Antrieb\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tif (rs.getEngine() == null) {\n\t\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t\t}\n\t\t}\n\n\t\tlist1 = new DefaultMutableTreeNode(\"nach Typ\");\n\t\troot.add(list1);\n\t\tfor (String t : allsorted.keySet()) {\n\t\t\tDefaultMutableTreeNode list2 = new DefaultMutableTreeNode(t);\n\t\t\tlist1.add(list2);\n\t\t\tDefaultMutableTreeNode welist = new DefaultMutableTreeNode(\"mit Antrieb\");\n\t\t\tDefaultMutableTreeNode woelist = new DefaultMutableTreeNode(\"ohne Antrieb\");\n\n\t\t\tlist2.add(welist);\n\t\t\tlist2.add(woelist);\n\t\t\tfor (rollingstock rs : allsorted.get(t)) {\n\t\t\t\tif (rs.getEngine() == null) {\n\t\t\t\t\twoelist.add(new DefaultMutableTreeNode(rs));\n\t\t\t\t} else {\n\t\t\t\t\twelist.add(new DefaultMutableTreeNode(rs));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttreeModel.setRoot(root);\n\t}" ]
[ "0.5268098", "0.48641083", "0.4768136", "0.47386518", "0.4724392", "0.4718642", "0.47090706", "0.46983567", "0.4617505", "0.4544636", "0.45405447", "0.45360434", "0.44980127", "0.4496603", "0.44925898", "0.44844973", "0.44805574", "0.44767112", "0.44700566", "0.44667906", "0.4463551", "0.44418883", "0.44273782", "0.4419332", "0.44113794", "0.4393555", "0.43811986", "0.43548256", "0.43442225", "0.43399084", "0.43359092", "0.43347827", "0.433129", "0.4330272", "0.43273652", "0.43191186", "0.43187538", "0.4304386", "0.42974728", "0.425892", "0.42552716", "0.42520076", "0.42512837", "0.42471835", "0.4244797", "0.4244347", "0.4234352", "0.42311037", "0.4225546", "0.42251843", "0.42250058", "0.42229614", "0.42178956", "0.42065245", "0.42046586", "0.4203809", "0.42003947", "0.41941082", "0.4191495", "0.4189202", "0.41855055", "0.41795412", "0.41760674", "0.41668686", "0.4164854", "0.41609755", "0.41563216", "0.41553694", "0.41550732", "0.41486284", "0.4146748", "0.41435027", "0.41359746", "0.41176996", "0.4116233", "0.41150475", "0.4110602", "0.4109213", "0.4108361", "0.4099185", "0.40978092", "0.4096419", "0.40961117", "0.40925398", "0.40844294", "0.40843394", "0.4084271", "0.40827543", "0.40827215", "0.4081756", "0.4079682", "0.4077933", "0.4077624", "0.4077434", "0.4071381", "0.4070432", "0.40691838", "0.40681553", "0.40674368", "0.40645278" ]
0.6610569
0
assume listHDivChildren size is not 0 or 1.
public static StructExprRecog restructHDivMatrixMExprChild(LinkedList<StructExprRecog> listHDivChildren, int nStart, int nEnd) { if (listHDivChildren.size() == 0 || nStart > nEnd) { return null; // this should not happen. } else if (nStart == nEnd) { return listHDivChildren.get(nStart); } int mnLeft = Integer.MAX_VALUE, mnTop = Integer.MAX_VALUE, mnRightP1 = Integer.MIN_VALUE, mnBottomP1 = Integer.MIN_VALUE; for (int idx = nStart; idx <= nEnd; idx ++) { if (listHDivChildren.get(idx).mnLeft < mnLeft) { mnLeft = listHDivChildren.get(idx).mnLeft; } if (listHDivChildren.get(idx).mnTop < mnTop) { mnTop = listHDivChildren.get(idx).mnTop; } if (listHDivChildren.get(idx).getRightPlus1() > mnRightP1) { mnRightP1 = listHDivChildren.get(idx).getRightPlus1(); } if (listHDivChildren.get(idx).getBottomPlus1() > mnBottomP1) { mnBottomP1 = listHDivChildren.get(idx).getBottomPlus1(); } } int mnWidth = mnRightP1 - mnLeft, mnHeight = mnBottomP1 - mnTop; int nLongestHDivIdx = -1; int mnMinLnDivLen = (int)Math.max(mnWidth * ConstantsMgr.msdWorstCaseLineDivOnLenRatio, (mnWidth - 2.0 * ConstantsMgr.msnMinNormalCharWidthInUnit)); for (int idx = nStart; idx <= nEnd; idx ++) { if (listHDivChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && listHDivChildren.get(idx).mType == UnitProtoType.Type.TYPE_SUBTRACT && listHDivChildren.get(idx).mnWidth >= mnMinLnDivLen && (nLongestHDivIdx == -1 || listHDivChildren.get(idx).mnWidth > listHDivChildren.get(nLongestHDivIdx).mnWidth)) { nLongestHDivIdx = idx; } } int nDivType = -1; // 0 means blank cut, 1 means top bar, 2 means bottom bar, 3 means line div. // Currently assume top and bottom divs have been clearly identified in exprseperator // so we only need to identify if it is line div. if (nLongestHDivIdx > nStart && nLongestHDivIdx < nEnd) { StructExprRecog serLnDiv = listHDivChildren.get(nLongestHDivIdx); StructExprRecog serTop = listHDivChildren.get(nLongestHDivIdx - 1); StructExprRecog serBtm = listHDivChildren.get(nLongestHDivIdx + 1); int nGapTop = serLnDiv.mnTop - serTop.getBottomPlus1(); int nGapBtm = serBtm.mnTop - serLnDiv.getBottomPlus1(); double dLnDivGapRefHeight = ConstantsMgr.msdExpressionGap * Math.min(serTop.mnHeight, serBtm.mnHeight); if ((serTop.mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE || serTop.mType != UnitProtoType.Type.TYPE_SUBTRACT) && nGapTop <= dLnDivGapRefHeight && (serBtm.mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE || serBtm.mType != UnitProtoType.Type.TYPE_SUBTRACT) && nGapBtm <= dLnDivGapRefHeight) { nDivType = 3; // line div } else { nDivType = 0; // if gap is too narrow, it either have been merged in exprseperator or has been identified as top bottom there. } } StructExprRecog serReturn = new StructExprRecog(listHDivChildren.getFirst().mbarrayBiValues); if (nDivType == 3) { LinkedList<StructExprRecog> listDivChildren = new LinkedList<StructExprRecog>(); StructExprRecog serNewFirst = restructHDivMatrixMExprChild(listHDivChildren, nStart, nLongestHDivIdx - 1); StructExprRecog serNewLast = restructHDivMatrixMExprChild(listHDivChildren, nLongestHDivIdx + 1, nEnd); listDivChildren.add(serNewFirst); listDivChildren.add(listHDivChildren.get(nLongestHDivIdx)); listDivChildren.add(serNewLast); serReturn.setStructExprRecog(listDivChildren, StructExprRecog.EXPRRECOGTYPE_HLINECUT); } else { LinkedList<StructExprRecog> listHCutChildren = new LinkedList<StructExprRecog>(); for (int idx = nStart; idx <= nEnd; idx ++) { listHCutChildren.add(listHDivChildren.get(idx)); } serReturn.setStructExprRecog(listHCutChildren, EXPRRECOGTYPE_HBLANKCUT); } return serReturn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract List<T> getChildren();", "public int getChildCount() {return children.size();}", "public List<RealObject> getChildren();", "private void initChildList() {\n if (childList == null) {\n childList = new ArrayList<>();\n }\n }", "List<UIComponent> getChildren();", "int childrenSize();", "public int getChildCount()\n/* */ {\n/* 500 */ return this.children.size();\n/* */ }", "protected int numChildren() {\r\n return 3;\r\n }", "public abstract int getNumChildren();", "List<HNode> getChildren(Long id);", "@Override\n public int getNumChildren() {\n\t return this._children.size();\n }", "@Override\n public final int size() {\n return children.size();\n }", "@Override\n\tpublic int getChildrenNum() {\n\t\treturn children.size();\n\t}", "public int getChildCount() { return 0; }", "private Object[] localGetChildren(Object arg0) {\r\n\t\t\tArrayList<Object> returnList = new ArrayList<Object>();\r\n\t\t\tObject[] children = super.getChildren(arg0);\r\n\t\t\tfor (Object child: children) {\r\n\t\t\t\tif (child instanceof IViewSite || \r\n\t\t\t\t\tchild instanceof IWorkspaceRoot || \r\n\t\t\t\t\tchild instanceof IFolder)\r\n\t\t\t\t{\r\n\t\t\t\t\treturnList.add(child);\r\n\t\t\t\t} else if (child instanceof IProject) {\r\n\t\t\t\t\tif (((IProject)child).isOpen()) {\r\n\t\t\t\t\t\treturnList.add(child);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn returnList.toArray(new Object[returnList.size()]);\r\n\t\t}", "private int numChildren(int index){\n\t\t\n\t\tint children = 0;\n\t\t\n\t\tif((index*2) + 1 <= this.currentSize){\n\t\t\tif(array[(index * 2) + 1] != null){\n\t\t\t\tchildren++;\n\t\t\t}\n\t\t}\n\t\tif((index*2) + 1 <= this.currentSize){\n\t\t\tif(array[(index * 2) + 2] != null){\n\t\t\t\tchildren++;\n\t\t\t}\n\t\t}\n\t\treturn children;\n\t}", "@Override\n public int getChildrenCount()\n {\n return children.getSubNodes().size();\n }", "int getChildCount();", "protected String[] doListChildren()\n {\n return (String[])m_children.toArray( new String[ m_children.size() ] );\n }", "@Override\n public List<String> getChildren(String path) {\n return null;\n }", "public Vector<Node> getChildren(){\n\t\t Vector<Node> children = new Vector<>(0);\n\t\t Iterator<Link> l= myLinks.iterator();\n\t\t\twhile(l.hasNext()){\n\t\t\t\tLink temp=l.next();\n\t\t\t\tif(temp.getM().equals(currNode))\n\t\t\t\t children.add(temp.getN());\n\t\t\t\tif(temp.getN().equals(currNode))\n\t\t\t\t children.add(temp.getM());\n\t\t\t}\n\t\treturn children;\n\t}", "@Override\n\tprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n\t\tsuper.onMeasure(widthMeasureSpec, heightMeasureSpec);\n\n\t\tmListPadding.left = super.getPaddingLeft();\n\t\tmListPadding.top = super.getPaddingTop();\n\t\tmListPadding.right = super.getPaddingRight();\n\t\tmListPadding.bottom = super.getPaddingBottom();\n\n\t\tint widthMode = MeasureSpec.getMode(widthMeasureSpec);\n\t\tint heightMode = MeasureSpec.getMode(heightMeasureSpec);\n\t\tint widthSize = MeasureSpec.getSize(widthMeasureSpec);\n\t\tint heightSize = MeasureSpec.getSize(heightMeasureSpec);\n\n\t\tint childWidth = 0;\n\t\tint childHeight = 0;\n\n\t\tmItemCount = mAdapter == null ? 0 : mAdapter.getCount();\n\t\tif (mItemCount > 0\n\t\t\t\t&& (widthMode == MeasureSpec.UNSPECIFIED || heightMode == MeasureSpec.UNSPECIFIED)) {\n\t\t\tfinal View child = obtainView(0);\n\n\t\t\tmeasureScrapChild(child, 0, heightMeasureSpec);\n\n\t\t\tchildWidth = child.getMeasuredWidth();\n\t\t\tchildHeight = child.getMeasuredHeight();\n\n\t\t\tmRemovedViewQueue.offer(child);\n\t\t}\n\n\t\tif (widthMode == MeasureSpec.UNSPECIFIED) {\n\t\t\twidthSize = mListPadding.left + mListPadding.right + childWidth\n\t\t\t\t\t+ getVerticalScrollbarWidth();\n\t\t}\n\n\t\tif (heightMode == MeasureSpec.UNSPECIFIED) {\n\t\t\theightSize = mListPadding.top + mListPadding.bottom + childHeight\n\t\t\t\t\t+ getVerticalFadingEdgeLength() * 2;\n\t\t}\n\n\t\tif (widthMode == MeasureSpec.AT_MOST) {\n\t\t\t// TODO: after first layout we should maybe start at the first\n\t\t\t// visible position, not 0\n\t\t\twidthSize = measureWidthOfChildren(heightMeasureSpec, 0,\n\t\t\t\t\tNO_POSITION, widthSize, -1);\n\t\t}\n\n\t\tsetMeasuredDimension(widthSize, heightSize);\n\t\tmWidthMeasureSpec = widthMeasureSpec;\n\t}", "MergeHandler[] getChildren();", "@Override\n\tpublic List<Node> chilren() {\n\t\treturn children;\n\t}", "public String getAllChildNodestoDisplay(ArrayList singlechilmos, String resIdTOCheck, String currentresourceidtree, Hashtable childmos, Hashtable availhealth, int level, HttpServletRequest request, HashMap extDeviceMap, HashMap site24x7List)\n/* */ {\n/* 1152 */ boolean isIt360 = com.adventnet.appmanager.util.Constants.isIt360;\n/* 1153 */ boolean forInventory = false;\n/* 1154 */ String trdisplay = \"none\";\n/* 1155 */ String plusstyle = \"inline\";\n/* 1156 */ String minusstyle = \"none\";\n/* 1157 */ String haidTopLevel = \"\";\n/* 1158 */ if (request.getAttribute(\"forInventory\") != null)\n/* */ {\n/* 1160 */ if (\"true\".equals((String)request.getAttribute(\"forInventory\")))\n/* */ {\n/* 1162 */ haidTopLevel = request.getParameter(\"haid\");\n/* 1163 */ forInventory = true;\n/* 1164 */ trdisplay = \"table-row;\";\n/* 1165 */ plusstyle = \"none\";\n/* 1166 */ minusstyle = \"inline\";\n/* */ }\n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1173 */ haidTopLevel = resIdTOCheck;\n/* */ }\n/* */ \n/* 1176 */ ArrayList listtoreturn = new ArrayList();\n/* 1177 */ StringBuffer toreturn = new StringBuffer();\n/* 1178 */ Hashtable availabilitykeys = (Hashtable)availhealth.get(\"avail\");\n/* 1179 */ Hashtable healthkeys = (Hashtable)availhealth.get(\"health\");\n/* 1180 */ Properties alert = (Properties)availhealth.get(\"alert\");\n/* */ \n/* 1182 */ for (int j = 0; j < singlechilmos.size(); j++)\n/* */ {\n/* 1184 */ ArrayList singlerow = (ArrayList)singlechilmos.get(j);\n/* 1185 */ String childresid = (String)singlerow.get(0);\n/* 1186 */ String childresname = (String)singlerow.get(1);\n/* 1187 */ childresname = com.adventnet.appmanager.util.ExtProdUtil.decodeString(childresname);\n/* 1188 */ String childtype = ((String)singlerow.get(2) + \"\").trim();\n/* 1189 */ String imagepath = ((String)singlerow.get(3) + \"\").trim();\n/* 1190 */ String shortname = ((String)singlerow.get(4) + \"\").trim();\n/* 1191 */ String unmanagestatus = (String)singlerow.get(5);\n/* 1192 */ String actionstatus = (String)singlerow.get(6);\n/* 1193 */ String linkclass = \"monitorgp-links\";\n/* 1194 */ String titleforres = childresname;\n/* 1195 */ String titilechildresname = childresname;\n/* 1196 */ String childimg = \"/images/trcont.png\";\n/* 1197 */ String flag = \"enable\";\n/* 1198 */ String dcstarted = (String)singlerow.get(8);\n/* 1199 */ String configMonitor = \"\";\n/* 1200 */ String configmsg = FormatUtil.getString(\"am.webclient.vcenter.esx.notconfigured.text\");\n/* 1201 */ if ((\"VMWare ESX/ESXi\".equals(childtype)) && (!\"2\".equals(dcstarted)))\n/* */ {\n/* 1203 */ configMonitor = \"&nbsp;&nbsp;<img src='/images/icon_ack.gif' align='absmiddle' style='width=16px;heigth:16px' border='0' title='\" + configmsg + \"' />\";\n/* */ }\n/* 1205 */ if (singlerow.get(7) != null)\n/* */ {\n/* 1207 */ flag = (String)singlerow.get(7);\n/* */ }\n/* 1209 */ String haiGroupType = \"0\";\n/* 1210 */ if (\"HAI\".equals(childtype))\n/* */ {\n/* 1212 */ haiGroupType = (String)singlerow.get(9);\n/* */ }\n/* 1214 */ childimg = \"/images/trend.png\";\n/* 1215 */ String actionmsg = FormatUtil.getString(\"Actions Enabled\");\n/* 1216 */ String actionimg = \"<img src=\\\"/images/alarm-icon.png\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* 1217 */ if ((actionstatus == null) || (actionstatus.equalsIgnoreCase(\"null\")) || (actionstatus.equals(\"1\")))\n/* */ {\n/* 1219 */ actionimg = \"<img src=\\\"/images/alarm-icon.png\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* */ }\n/* 1221 */ else if (actionstatus.equals(\"0\"))\n/* */ {\n/* 1223 */ actionmsg = FormatUtil.getString(\"Actions Disabled\");\n/* 1224 */ actionimg = \"<img src=\\\"/images/icon_actions_disabled.gif\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* */ }\n/* */ \n/* 1227 */ if ((unmanagestatus != null) && (!unmanagestatus.trim().equalsIgnoreCase(\"null\")))\n/* */ {\n/* 1229 */ linkclass = \"disabledtext\";\n/* 1230 */ titleforres = titleforres + \"-UnManaged\";\n/* */ }\n/* 1232 */ String availkey = childresid + \"#\" + availabilitykeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1233 */ String availmouseover = \"\";\n/* 1234 */ if (alert.getProperty(availkey) != null)\n/* */ {\n/* 1236 */ availmouseover = \"onmouseover=\\\"ddrivetip(this,event,'\" + alert.getProperty(availkey).replace(\"\\\"\", \"&quot;\") + \"<br><span style=color: #000000;font-weight:bold;>\" + FormatUtil.getString(\"am.webclient.tooltip.text\") + \"</span>',null,true,'#000000')\\\" onmouseout=\\\"hideddrivetip()\\\" \";\n/* */ }\n/* 1238 */ String healthkey = childresid + \"#\" + healthkeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1239 */ String healthmouseover = \"\";\n/* 1240 */ if (alert.getProperty(healthkey) != null)\n/* */ {\n/* 1242 */ healthmouseover = \"onmouseover=\\\"ddrivetip(this,event,'\" + alert.getProperty(healthkey).replace(\"\\\"\", \"&quot;\") + \"<br><span style=color: #000000;font-weight:bold;>\" + FormatUtil.getString(\"am.webclient.tooltip.text\") + \"</span>',null,true,'#000000')\\\" onmouseout=\\\"hideddrivetip()\\\" \";\n/* */ }\n/* */ \n/* 1245 */ String tempbgcolor = \"class=\\\"whitegrayrightalign\\\"\";\n/* 1246 */ int spacing = 0;\n/* 1247 */ if (level >= 1)\n/* */ {\n/* 1249 */ spacing = 40 * level;\n/* */ }\n/* 1251 */ if (childtype.equals(\"HAI\"))\n/* */ {\n/* 1253 */ ArrayList singlechilmos1 = (ArrayList)childmos.get(childresid + \"\");\n/* 1254 */ String tempresourceidtree = currentresourceidtree + \"|\" + childresid;\n/* 1255 */ String availimage = getSeverityImageForAvailability(alert.getProperty(childresid + \"#\" + availabilitykeys.get(childtype)));\n/* */ \n/* 1257 */ String availlink = \"<a href=\\\"javascript:void(0);\\\" \" + availmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + availabilitykeys.get(childtype) + \"')\\\"> \" + availimage + \"</a>\";\n/* 1258 */ String healthimage = getSeverityImageForHealth(alert.getProperty(childresid + \"#\" + healthkeys.get(childtype)));\n/* 1259 */ String healthlink = \"<a href=\\\"javascript:void(0);\\\" \" + healthmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + healthkeys.get(childtype) + \"')\\\"> \" + healthimage + \"</a>\";\n/* 1260 */ String editlink = \"<a href=\\\"/showapplication.do?method=editApplication&fromwhere=allmonitorgroups&haid=\" + childresid + \"\\\" class=\\\"staticlinks\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.maintenance.edit\") + \"\\\"><img align=\\\"center\\\" src=\\\"/images/icon_edit.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1261 */ String imglink = \"<img src=\\\"\" + childimg + \"\\\" align=\\\"center\\\" align=\\\"left\\\" border=\\\"0\\\" height=\\\"24\\\" width=\\\"24\\\">\";\n/* 1262 */ String checkbox = \"<input type=\\\"checkbox\\\" name=\\\"select\\\" id=\\\"\" + tempresourceidtree + \"\\\" value=\\\"\" + childresid + \"\\\" onclick=\\\"selectAllChildCKbs('\" + tempresourceidtree + \"',this,this.form),deselectParentCKbs('\" + tempresourceidtree + \"',this,this.form)\\\" >\";\n/* 1263 */ String thresholdurl = \"/showActionProfiles.do?method=getHAProfiles&haid=\" + childresid;\n/* 1264 */ String configalertslink = \" <a title='\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"' href=\\\"\" + thresholdurl + \"\\\" ><img src=\\\"images/icon_associateaction.gif\\\" align=\\\"center\\\" border=\\\"0\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"\\\" /></a>\";\n/* 1265 */ String associatelink = \"<a href=\\\"/showresource.do?method=getMonitorForm&type=All&fromwhere=monitorgroupview&haid=\" + childresid + \"\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.associatemonitors.text\") + \"\\\" ><img align=\\\"center\\\" src=\\\"images/icon_assoicatemonitors.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1266 */ String removefromgroup = \"<a class='staticlinks' href=\\\"javascript: removeMonitorFromGroup ('\" + resIdTOCheck + \"','\" + childresid + \"','\" + haidTopLevel + \"');\\\" title='\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.remove.text\") + \"'><img width='13' align=\\\"center\\\" height='14' border='0' src='/images/icon_removefromgroup.gif'/></a>&nbsp;&nbsp;\";\n/* 1267 */ String configcustomfields = \"<a href=\\\"javascript:void(0)\\\" onclick=\\\"fnOpenNewWindow('/jsp/MyField_Alarms.jsp?resourceid=\" + childresid + \"&mgview=true')\\\" title='\" + FormatUtil.getString(\"am.myfield.assign.text\") + \"'><img align=\\\"center\\\" src=\\\"/images/icon_assigncustomfields.gif\\\" border=\\\"0\\\" /></a>\";\n/* */ \n/* 1269 */ if (!forInventory)\n/* */ {\n/* 1271 */ removefromgroup = \"\";\n/* */ }\n/* */ \n/* 1274 */ String actions = \"&nbsp;&nbsp;\" + configalertslink + \"&nbsp;&nbsp;\" + removefromgroup + \"&nbsp;&nbsp;\";\n/* */ \n/* 1276 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1278 */ actions = editlink + actions;\n/* */ }\n/* 1280 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"3\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1282 */ actions = actions + associatelink;\n/* */ }\n/* 1284 */ actions = actions + \"&nbsp;&nbsp;&nbsp;&nbsp;\" + configcustomfields;\n/* 1285 */ String arrowimg = \"\";\n/* 1286 */ if (request.isUserInRole(\"ENTERPRISEADMIN\"))\n/* */ {\n/* 1288 */ actions = \"\";\n/* 1289 */ arrowimg = \"<img align=\\\"center\\\" hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1290 */ checkbox = \"\";\n/* 1291 */ childresname = childresname + \"_\" + com.adventnet.appmanager.server.framework.comm.CommDBUtil.getManagedServerNameWithPort(childresid);\n/* */ }\n/* 1293 */ if (isIt360)\n/* */ {\n/* 1295 */ actionimg = \"\";\n/* 1296 */ actions = \"\";\n/* 1297 */ arrowimg = \"<img align=\\\"center\\\" hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1298 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1301 */ if (!request.isUserInRole(\"ADMIN\"))\n/* */ {\n/* 1303 */ actions = \"\";\n/* */ }\n/* 1305 */ if (request.isUserInRole(\"OPERATOR\"))\n/* */ {\n/* 1307 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1310 */ String resourcelink = \"\";\n/* */ \n/* 1312 */ if ((flag != null) && (flag.equals(\"enable\")))\n/* */ {\n/* 1314 */ resourcelink = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"toggleChildMos('#monitor\" + tempresourceidtree + \"'),toggleTreeImage('\" + tempresourceidtree + \"');\\\"><div id=\\\"monitorShow\" + tempresourceidtree + \"\\\" style=\\\"display:\" + plusstyle + \";\\\"><img src=\\\"/images/icon_plus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div><div id=\\\"monitorHide\" + tempresourceidtree + \"\\\" style=\\\"display:\" + minusstyle + \";\\\"><img src=\\\"/images/icon_minus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div> </a>\" + checkbox + \"<a href=\\\"/showapplication.do?haid=\" + childresid + \"&method=showApplication\\\" class=\\\"\" + linkclass + \"\\\">\" + getTrimmedText(titilechildresname, 45) + \"</a> \";\n/* */ }\n/* */ else\n/* */ {\n/* 1318 */ resourcelink = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"toggleChildMos('#monitor\" + tempresourceidtree + \"'),toggleTreeImage('\" + tempresourceidtree + \"');\\\"><div id=\\\"monitorShow\" + tempresourceidtree + \"\\\" style=\\\"display:\" + plusstyle + \";\\\"><img src=\\\"/images/icon_plus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div><div id=\\\"monitorHide\" + tempresourceidtree + \"\\\" style=\\\"display:\" + minusstyle + \";\\\"><img src=\\\"/images/icon_minus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div> </a>\" + checkbox + \"\" + getTrimmedText(titilechildresname, 45);\n/* */ }\n/* */ \n/* 1321 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + currentresourceidtree + \"\\\" style=\\\"display:\" + trdisplay + \";\\\" width='100%'>\");\n/* 1322 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1323 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"47%\\\" style=\\\"padding-left: \" + spacing + \"px !important;\\\" title=\" + childresname + \">\" + arrowimg + resourcelink + \"</td>\");\n/* 1324 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">\" + \"<table><tr class='whitegrayrightalign'><td><div id='mgaction'>\" + actions + \"</div></td></tr></table></td>\");\n/* 1325 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"8%\\\" align=\\\"center\\\">\" + availlink + \"</td>\");\n/* 1326 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"center\\\">\" + healthlink + \"</td>\");\n/* 1327 */ if (!isIt360)\n/* */ {\n/* 1329 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">\" + actionimg + \"</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1333 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* */ \n/* 1336 */ toreturn.append(\"</tr>\");\n/* 1337 */ if (childmos.get(childresid + \"\") != null)\n/* */ {\n/* 1339 */ String toappend = getAllChildNodestoDisplay(singlechilmos1, childresid + \"\", tempresourceidtree, childmos, availhealth, level + 1, request, extDeviceMap, site24x7List);\n/* 1340 */ toreturn.append(toappend);\n/* */ }\n/* */ else\n/* */ {\n/* 1344 */ String assocMessage = \"<td \" + tempbgcolor + \" colspan=\\\"2\\\"><span class=\\\"bodytext\\\" style=\\\"padding-left: \" + (spacing + 10) + \"px !important;\\\"> &nbsp;&nbsp;&nbsp;&nbsp;\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.nomonitormessage.text\") + \"</span><span class=\\\"bodytext\\\">\";\n/* 1345 */ if ((!request.isUserInRole(\"ENTERPRISEADMIN\")) && (!request.isUserInRole(\"DEMO\")) && (!request.isUserInRole(\"OPERATOR\")))\n/* */ {\n/* */ \n/* 1348 */ assocMessage = assocMessage + FormatUtil.getString(\"am.webclient.monitorgroupdetails.click.text\") + \" <a href=\\\"/showresource.do?method=getMonitorForm&type=All&haid=\" + childresid + \"&fromwhere=monitorgroupview\\\" class=\\\"staticlinks\\\" >\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.linktoadd.text\") + \"</span></td>\";\n/* */ }\n/* */ \n/* */ \n/* 1352 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"3\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1354 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + tempresourceidtree + \"\\\" style=\\\"display: \" + trdisplay + \";\\\" width='100%'>\");\n/* 1355 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1356 */ toreturn.append(assocMessage);\n/* 1357 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1358 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1359 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1360 */ toreturn.append(\"</tr>\");\n/* */ }\n/* */ }\n/* */ }\n/* */ else\n/* */ {\n/* 1366 */ String resourcelink = null;\n/* 1367 */ boolean hideEditLink = false;\n/* 1368 */ if ((extDeviceMap != null) && (extDeviceMap.get(childresid) != null))\n/* */ {\n/* 1370 */ String link1 = (String)extDeviceMap.get(childresid);\n/* 1371 */ hideEditLink = true;\n/* 1372 */ if (isIt360)\n/* */ {\n/* 1374 */ resourcelink = \"<a href=\" + link1 + \" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* */ else\n/* */ {\n/* 1378 */ resourcelink = \"<a href=\\\"javascript:MM_openBrWindow('\" + link1 + \"','ExternalDevice','width=950,height=600,top=50,left=75,scrollbars=yes,resizable=yes')\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* 1380 */ } else if ((site24x7List != null) && (site24x7List.containsKey(childresid)))\n/* */ {\n/* 1382 */ hideEditLink = true;\n/* 1383 */ String link2 = URLEncoder.encode((String)site24x7List.get(childresid));\n/* 1384 */ resourcelink = \"<a href=\\\"javascript:MM_openBrWindow('\" + link2 + \"','Site24x7','width=950,height=600,top=50,left=75,scrollbars=yes,resizable=yes')\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1389 */ resourcelink = \"<a href=\\\"/showresource.do?resourceid=\" + childresid + \"&method=showResourceForResourceID&haid=\" + resIdTOCheck + \"\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* */ \n/* 1392 */ String imglink = \"<img src=\\\"\" + childimg + \"\\\" align=\\\"left\\\" border=\\\"0\\\" height=\\\"24\\\" width=\\\"24\\\" />\";\n/* 1393 */ String checkbox = \"<input type=\\\"checkbox\\\" name=\\\"select\\\" id=\\\"\" + currentresourceidtree + \"|\" + childresid + \"\\\" value=\\\"\" + childresid + \"\\\" onclick=\\\"deselectParentCKbs('\" + currentresourceidtree + \"|\" + childresid + \"',this,this.form);\\\" >\";\n/* 1394 */ String key = childresid + \"#\" + availabilitykeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1395 */ String availimage = getSeverityImageForAvailability(alert.getProperty(childresid + \"#\" + availabilitykeys.get(childtype)));\n/* 1396 */ String healthimage = getSeverityImageForHealth(alert.getProperty(childresid + \"#\" + healthkeys.get(childtype)));\n/* 1397 */ String availlink = \"<a href=\\\"javascript:void(0);\\\" \" + availmouseover + \"onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + availabilitykeys.get(childtype) + \"')\\\"> \" + availimage + \"</a>\";\n/* 1398 */ String healthlink = \"<a href=\\\"javascript:void(0);\\\" \" + healthmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + healthkeys.get(childtype) + \"')\\\"> \" + healthimage + \"</a>\";\n/* 1399 */ String editlink = \"<a href=\\\"/showresource.do?haid=\" + resIdTOCheck + \"&resourceid=\" + childresid + \"&resourcename=\" + childresname + \"&type=\" + childtype + \"&method=showdetails&editPage=true&moname=\" + childresname + \"\\\" class=\\\"staticlinks\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.maintenance.edit\") + \"\\\"><img align=\\\"center\\\" src=\\\"/images/icon_edit.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1400 */ String thresholdurl = \"/showActionProfiles.do?method=getResourceProfiles&admin=true&all=true&resourceid=\" + childresid;\n/* 1401 */ String configalertslink = \" <a href=\\\"\" + thresholdurl + \"\\\" title='\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"'><img src=\\\"images/icon_associateaction.gif\\\" align=\\\"center\\\" border=\\\"0\\\" /></a>\";\n/* 1402 */ String img2 = \"<img src=\\\"/images/trvline.png\\\" align=\\\"absmiddle\\\" border=\\\"0\\\" height=\\\"15\\\" width=\\\"15\\\"/>\";\n/* 1403 */ String removefromgroup = \"<a class='staticlinks' href=\\\"javascript: removeMonitorFromGroup ('\" + resIdTOCheck + \"','\" + childresid + \"','\" + haidTopLevel + \"');\\\" title='\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.remove.text\") + \"'><img width='13' align=\\\"center\\\" height='14' border='0' src='/images/icon_removefromgroup.gif'/></a>\";\n/* 1404 */ String configcustomfields = \"<a href=\\\"javascript:void(0)\\\" onclick=\\\"fnOpenNewWindow('/jsp/MyField_Alarms.jsp?resourceid=\" + childresid + \"&mgview=true')\\\" title='\" + FormatUtil.getString(\"am.myfield.assign.text\") + \"'><img align=\\\"center\\\" src=\\\"/images/icon_assigncustomfields.gif\\\" border=\\\"0\\\" /></a>\";\n/* */ \n/* 1406 */ if (hideEditLink)\n/* */ {\n/* 1408 */ editlink = \"&nbsp;&nbsp;&nbsp;\";\n/* */ }\n/* 1410 */ if (!forInventory)\n/* */ {\n/* 1412 */ removefromgroup = \"\";\n/* */ }\n/* 1414 */ String actions = \"&nbsp;&nbsp;\" + configalertslink + \"&nbsp;&nbsp;\" + removefromgroup + \"&nbsp;&nbsp;\";\n/* 1415 */ if (!com.adventnet.appmanager.util.Constants.sqlManager) {\n/* 1416 */ actions = actions + configcustomfields;\n/* */ }\n/* 1418 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1420 */ actions = editlink + actions;\n/* */ }\n/* 1422 */ String managedLink = \"\";\n/* 1423 */ if ((request.isUserInRole(\"ENTERPRISEADMIN\")) && (!com.adventnet.appmanager.util.Constants.isIt360))\n/* */ {\n/* 1425 */ checkbox = \"<img hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1426 */ actions = \"\";\n/* 1427 */ if (Integer.parseInt(childresid) >= com.adventnet.appmanager.server.framework.comm.Constants.RANGE) {\n/* 1428 */ managedLink = \"&nbsp; <a target=\\\"mas_window\\\" href=\\\"/showresource.do?resourceid=\" + childresid + \"&type=\" + childtype + \"&moname=\" + URLEncoder.encode(childresname) + \"&resourcename=\" + URLEncoder.encode(childresname) + \"&method=showdetails&aam_jump=true&useHTTP=\" + (!isIt360) + \"\\\"><img border=\\\"0\\\" title=\\\"View Monitor details in Managed Server console\\\" src=\\\"/images/jump.gif\\\"/></a>\";\n/* */ }\n/* */ }\n/* 1431 */ if ((isIt360) || (request.isUserInRole(\"OPERATOR\")))\n/* */ {\n/* 1433 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1436 */ if (!request.isUserInRole(\"ADMIN\"))\n/* */ {\n/* 1438 */ actions = \"\";\n/* */ }\n/* 1440 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + currentresourceidtree + \"\\\" style=\\\"display: \" + trdisplay + \";\\\" width='100%'>\");\n/* 1441 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1442 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"47%\\\" nowrap=\\\"false\\\" style=\\\"padding-left: \" + spacing + \"px !important;\\\" >\" + checkbox + \"&nbsp;<img align='absmiddle' border=\\\"0\\\" title='\" + shortname + \"' src=\\\"\" + imagepath + \"\\\"/>&nbsp;\" + resourcelink + managedLink + configMonitor + \"</td>\");\n/* 1443 */ if (isIt360)\n/* */ {\n/* 1445 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1449 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">\" + \"<table><tr class='whitegrayrightalign'><td><div id='mgaction'>\" + actions + \"</div></td></tr></table></td>\");\n/* */ }\n/* 1451 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"8%\\\" align=\\\"center\\\">\" + availlink + \"</td>\");\n/* 1452 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"center\\\">\" + healthlink + \"</td>\");\n/* 1453 */ if (!isIt360)\n/* */ {\n/* 1455 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">\" + actionimg + \"</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1459 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* 1461 */ toreturn.append(\"</tr>\");\n/* */ }\n/* */ }\n/* 1464 */ return toreturn.toString();\n/* */ }", "@DISPID(4)\n\t// = 0x4. The runtime will prefer the VTID if present\n\t@VTID(10)\n\tcom.gc.IList children();", "public List<GuiElementBase> getChildren()\n\t\t{ return Collections.unmodifiableList(children); }", "public String getAllChildNodestoDisplay(ArrayList singlechilmos, String resIdTOCheck, String currentresourceidtree, Hashtable childmos, Hashtable availhealth, int level, HttpServletRequest request, HashMap extDeviceMap, HashMap site24x7List)\n/* */ {\n/* 1149 */ boolean isIt360 = com.adventnet.appmanager.util.Constants.isIt360;\n/* 1150 */ boolean forInventory = false;\n/* 1151 */ String trdisplay = \"none\";\n/* 1152 */ String plusstyle = \"inline\";\n/* 1153 */ String minusstyle = \"none\";\n/* 1154 */ String haidTopLevel = \"\";\n/* 1155 */ if (request.getAttribute(\"forInventory\") != null)\n/* */ {\n/* 1157 */ if (\"true\".equals((String)request.getAttribute(\"forInventory\")))\n/* */ {\n/* 1159 */ haidTopLevel = request.getParameter(\"haid\");\n/* 1160 */ forInventory = true;\n/* 1161 */ trdisplay = \"table-row;\";\n/* 1162 */ plusstyle = \"none\";\n/* 1163 */ minusstyle = \"inline\";\n/* */ }\n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1170 */ haidTopLevel = resIdTOCheck;\n/* */ }\n/* */ \n/* 1173 */ ArrayList listtoreturn = new ArrayList();\n/* 1174 */ StringBuffer toreturn = new StringBuffer();\n/* 1175 */ Hashtable availabilitykeys = (Hashtable)availhealth.get(\"avail\");\n/* 1176 */ Hashtable healthkeys = (Hashtable)availhealth.get(\"health\");\n/* 1177 */ Properties alert = (Properties)availhealth.get(\"alert\");\n/* */ \n/* 1179 */ for (int j = 0; j < singlechilmos.size(); j++)\n/* */ {\n/* 1181 */ ArrayList singlerow = (ArrayList)singlechilmos.get(j);\n/* 1182 */ String childresid = (String)singlerow.get(0);\n/* 1183 */ String childresname = (String)singlerow.get(1);\n/* 1184 */ childresname = com.adventnet.appmanager.util.ExtProdUtil.decodeString(childresname);\n/* 1185 */ String childtype = ((String)singlerow.get(2) + \"\").trim();\n/* 1186 */ String imagepath = ((String)singlerow.get(3) + \"\").trim();\n/* 1187 */ String shortname = ((String)singlerow.get(4) + \"\").trim();\n/* 1188 */ String unmanagestatus = (String)singlerow.get(5);\n/* 1189 */ String actionstatus = (String)singlerow.get(6);\n/* 1190 */ String linkclass = \"monitorgp-links\";\n/* 1191 */ String titleforres = childresname;\n/* 1192 */ String titilechildresname = childresname;\n/* 1193 */ String childimg = \"/images/trcont.png\";\n/* 1194 */ String flag = \"enable\";\n/* 1195 */ String dcstarted = (String)singlerow.get(8);\n/* 1196 */ String configMonitor = \"\";\n/* 1197 */ String configmsg = FormatUtil.getString(\"am.webclient.vcenter.esx.notconfigured.text\");\n/* 1198 */ if ((\"VMWare ESX/ESXi\".equals(childtype)) && (!\"2\".equals(dcstarted)))\n/* */ {\n/* 1200 */ configMonitor = \"&nbsp;&nbsp;<img src='/images/icon_ack.gif' align='absmiddle' style='width=16px;heigth:16px' border='0' title='\" + configmsg + \"' />\";\n/* */ }\n/* 1202 */ if (singlerow.get(7) != null)\n/* */ {\n/* 1204 */ flag = (String)singlerow.get(7);\n/* */ }\n/* 1206 */ String haiGroupType = \"0\";\n/* 1207 */ if (\"HAI\".equals(childtype))\n/* */ {\n/* 1209 */ haiGroupType = (String)singlerow.get(9);\n/* */ }\n/* 1211 */ childimg = \"/images/trend.png\";\n/* 1212 */ String actionmsg = FormatUtil.getString(\"Actions Enabled\");\n/* 1213 */ String actionimg = \"<img src=\\\"/images/alarm-icon.png\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* 1214 */ if ((actionstatus == null) || (actionstatus.equalsIgnoreCase(\"null\")) || (actionstatus.equals(\"1\")))\n/* */ {\n/* 1216 */ actionimg = \"<img src=\\\"/images/alarm-icon.png\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* */ }\n/* 1218 */ else if (actionstatus.equals(\"0\"))\n/* */ {\n/* 1220 */ actionmsg = FormatUtil.getString(\"Actions Disabled\");\n/* 1221 */ actionimg = \"<img src=\\\"/images/icon_actions_disabled.gif\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* */ }\n/* */ \n/* 1224 */ if ((unmanagestatus != null) && (!unmanagestatus.trim().equalsIgnoreCase(\"null\")))\n/* */ {\n/* 1226 */ linkclass = \"disabledtext\";\n/* 1227 */ titleforres = titleforres + \"-UnManaged\";\n/* */ }\n/* 1229 */ String availkey = childresid + \"#\" + availabilitykeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1230 */ String availmouseover = \"\";\n/* 1231 */ if (alert.getProperty(availkey) != null)\n/* */ {\n/* 1233 */ availmouseover = \"onmouseover=\\\"ddrivetip(this,event,'\" + alert.getProperty(availkey).replace(\"\\\"\", \"&quot;\") + \"<br><span style=color: #000000;font-weight:bold;>\" + FormatUtil.getString(\"am.webclient.tooltip.text\") + \"</span>',null,true,'#000000')\\\" onmouseout=\\\"hideddrivetip()\\\" \";\n/* */ }\n/* 1235 */ String healthkey = childresid + \"#\" + healthkeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1236 */ String healthmouseover = \"\";\n/* 1237 */ if (alert.getProperty(healthkey) != null)\n/* */ {\n/* 1239 */ healthmouseover = \"onmouseover=\\\"ddrivetip(this,event,'\" + alert.getProperty(healthkey).replace(\"\\\"\", \"&quot;\") + \"<br><span style=color: #000000;font-weight:bold;>\" + FormatUtil.getString(\"am.webclient.tooltip.text\") + \"</span>',null,true,'#000000')\\\" onmouseout=\\\"hideddrivetip()\\\" \";\n/* */ }\n/* */ \n/* 1242 */ String tempbgcolor = \"class=\\\"whitegrayrightalign\\\"\";\n/* 1243 */ int spacing = 0;\n/* 1244 */ if (level >= 1)\n/* */ {\n/* 1246 */ spacing = 40 * level;\n/* */ }\n/* 1248 */ if (childtype.equals(\"HAI\"))\n/* */ {\n/* 1250 */ ArrayList singlechilmos1 = (ArrayList)childmos.get(childresid + \"\");\n/* 1251 */ String tempresourceidtree = currentresourceidtree + \"|\" + childresid;\n/* 1252 */ String availimage = getSeverityImageForAvailability(alert.getProperty(childresid + \"#\" + availabilitykeys.get(childtype)));\n/* */ \n/* 1254 */ String availlink = \"<a href=\\\"javascript:void(0);\\\" \" + availmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + availabilitykeys.get(childtype) + \"')\\\"> \" + availimage + \"</a>\";\n/* 1255 */ String healthimage = getSeverityImageForHealth(alert.getProperty(childresid + \"#\" + healthkeys.get(childtype)));\n/* 1256 */ String healthlink = \"<a href=\\\"javascript:void(0);\\\" \" + healthmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + healthkeys.get(childtype) + \"')\\\"> \" + healthimage + \"</a>\";\n/* 1257 */ String editlink = \"<a href=\\\"/showapplication.do?method=editApplication&fromwhere=allmonitorgroups&haid=\" + childresid + \"\\\" class=\\\"staticlinks\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.maintenance.edit\") + \"\\\"><img align=\\\"center\\\" src=\\\"/images/icon_edit.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1258 */ String imglink = \"<img src=\\\"\" + childimg + \"\\\" align=\\\"center\\\" align=\\\"left\\\" border=\\\"0\\\" height=\\\"24\\\" width=\\\"24\\\">\";\n/* 1259 */ String checkbox = \"<input type=\\\"checkbox\\\" name=\\\"select\\\" id=\\\"\" + tempresourceidtree + \"\\\" value=\\\"\" + childresid + \"\\\" onclick=\\\"selectAllChildCKbs('\" + tempresourceidtree + \"',this,this.form),deselectParentCKbs('\" + tempresourceidtree + \"',this,this.form)\\\" >\";\n/* 1260 */ String thresholdurl = \"/showActionProfiles.do?method=getHAProfiles&haid=\" + childresid;\n/* 1261 */ String configalertslink = \" <a title='\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"' href=\\\"\" + thresholdurl + \"\\\" ><img src=\\\"images/icon_associateaction.gif\\\" align=\\\"center\\\" border=\\\"0\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"\\\" /></a>\";\n/* 1262 */ String associatelink = \"<a href=\\\"/showresource.do?method=getMonitorForm&type=All&fromwhere=monitorgroupview&haid=\" + childresid + \"\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.associatemonitors.text\") + \"\\\" ><img align=\\\"center\\\" src=\\\"images/icon_assoicatemonitors.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1263 */ String removefromgroup = \"<a class='staticlinks' href=\\\"javascript: removeMonitorFromGroup ('\" + resIdTOCheck + \"','\" + childresid + \"','\" + haidTopLevel + \"');\\\" title='\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.remove.text\") + \"'><img width='13' align=\\\"center\\\" height='14' border='0' src='/images/icon_removefromgroup.gif'/></a>&nbsp;&nbsp;\";\n/* 1264 */ String configcustomfields = \"<a href=\\\"javascript:void(0)\\\" onclick=\\\"fnOpenNewWindow('/jsp/MyField_Alarms.jsp?resourceid=\" + childresid + \"&mgview=true')\\\" title='\" + FormatUtil.getString(\"am.myfield.assign.text\") + \"'><img align=\\\"center\\\" src=\\\"/images/icon_assigncustomfields.gif\\\" border=\\\"0\\\" /></a>\";\n/* */ \n/* 1266 */ if (!forInventory)\n/* */ {\n/* 1268 */ removefromgroup = \"\";\n/* */ }\n/* */ \n/* 1271 */ String actions = \"&nbsp;&nbsp;\" + configalertslink + \"&nbsp;&nbsp;\" + removefromgroup + \"&nbsp;&nbsp;\";\n/* */ \n/* 1273 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1275 */ actions = editlink + actions;\n/* */ }\n/* 1277 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"3\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1279 */ actions = actions + associatelink;\n/* */ }\n/* 1281 */ actions = actions + \"&nbsp;&nbsp;&nbsp;&nbsp;\" + configcustomfields;\n/* 1282 */ String arrowimg = \"\";\n/* 1283 */ if (request.isUserInRole(\"ENTERPRISEADMIN\"))\n/* */ {\n/* 1285 */ actions = \"\";\n/* 1286 */ arrowimg = \"<img align=\\\"center\\\" hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1287 */ checkbox = \"\";\n/* 1288 */ childresname = childresname + \"_\" + com.adventnet.appmanager.server.framework.comm.CommDBUtil.getManagedServerNameWithPort(childresid);\n/* */ }\n/* 1290 */ if (isIt360)\n/* */ {\n/* 1292 */ actionimg = \"\";\n/* 1293 */ actions = \"\";\n/* 1294 */ arrowimg = \"<img align=\\\"center\\\" hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1295 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1298 */ if (!request.isUserInRole(\"ADMIN\"))\n/* */ {\n/* 1300 */ actions = \"\";\n/* */ }\n/* 1302 */ if (request.isUserInRole(\"OPERATOR\"))\n/* */ {\n/* 1304 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1307 */ String resourcelink = \"\";\n/* */ \n/* 1309 */ if ((flag != null) && (flag.equals(\"enable\")))\n/* */ {\n/* 1311 */ resourcelink = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"toggleChildMos('#monitor\" + tempresourceidtree + \"'),toggleTreeImage('\" + tempresourceidtree + \"');\\\"><div id=\\\"monitorShow\" + tempresourceidtree + \"\\\" style=\\\"display:\" + plusstyle + \";\\\"><img src=\\\"/images/icon_plus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div><div id=\\\"monitorHide\" + tempresourceidtree + \"\\\" style=\\\"display:\" + minusstyle + \";\\\"><img src=\\\"/images/icon_minus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div> </a>\" + checkbox + \"<a href=\\\"/showapplication.do?haid=\" + childresid + \"&method=showApplication\\\" class=\\\"\" + linkclass + \"\\\">\" + getTrimmedText(titilechildresname, 45) + \"</a> \";\n/* */ }\n/* */ else\n/* */ {\n/* 1315 */ resourcelink = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"toggleChildMos('#monitor\" + tempresourceidtree + \"'),toggleTreeImage('\" + tempresourceidtree + \"');\\\"><div id=\\\"monitorShow\" + tempresourceidtree + \"\\\" style=\\\"display:\" + plusstyle + \";\\\"><img src=\\\"/images/icon_plus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div><div id=\\\"monitorHide\" + tempresourceidtree + \"\\\" style=\\\"display:\" + minusstyle + \";\\\"><img src=\\\"/images/icon_minus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div> </a>\" + checkbox + \"\" + getTrimmedText(titilechildresname, 45);\n/* */ }\n/* */ \n/* 1318 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + currentresourceidtree + \"\\\" style=\\\"display:\" + trdisplay + \";\\\" width='100%'>\");\n/* 1319 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1320 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"47%\\\" style=\\\"padding-left: \" + spacing + \"px !important;\\\" title=\" + childresname + \">\" + arrowimg + resourcelink + \"</td>\");\n/* 1321 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">\" + \"<table><tr class='whitegrayrightalign'><td><div id='mgaction'>\" + actions + \"</div></td></tr></table></td>\");\n/* 1322 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"8%\\\" align=\\\"center\\\">\" + availlink + \"</td>\");\n/* 1323 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"center\\\">\" + healthlink + \"</td>\");\n/* 1324 */ if (!isIt360)\n/* */ {\n/* 1326 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">\" + actionimg + \"</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1330 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* */ \n/* 1333 */ toreturn.append(\"</tr>\");\n/* 1334 */ if (childmos.get(childresid + \"\") != null)\n/* */ {\n/* 1336 */ String toappend = getAllChildNodestoDisplay(singlechilmos1, childresid + \"\", tempresourceidtree, childmos, availhealth, level + 1, request, extDeviceMap, site24x7List);\n/* 1337 */ toreturn.append(toappend);\n/* */ }\n/* */ else\n/* */ {\n/* 1341 */ String assocMessage = \"<td \" + tempbgcolor + \" colspan=\\\"2\\\"><span class=\\\"bodytext\\\" style=\\\"padding-left: \" + (spacing + 10) + \"px !important;\\\"> &nbsp;&nbsp;&nbsp;&nbsp;\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.nomonitormessage.text\") + \"</span><span class=\\\"bodytext\\\">\";\n/* 1342 */ if ((!request.isUserInRole(\"ENTERPRISEADMIN\")) && (!request.isUserInRole(\"DEMO\")) && (!request.isUserInRole(\"OPERATOR\")))\n/* */ {\n/* */ \n/* 1345 */ assocMessage = assocMessage + FormatUtil.getString(\"am.webclient.monitorgroupdetails.click.text\") + \" <a href=\\\"/showresource.do?method=getMonitorForm&type=All&haid=\" + childresid + \"&fromwhere=monitorgroupview\\\" class=\\\"staticlinks\\\" >\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.linktoadd.text\") + \"</span></td>\";\n/* */ }\n/* */ \n/* */ \n/* 1349 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"3\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1351 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + tempresourceidtree + \"\\\" style=\\\"display: \" + trdisplay + \";\\\" width='100%'>\");\n/* 1352 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1353 */ toreturn.append(assocMessage);\n/* 1354 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1355 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1356 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1357 */ toreturn.append(\"</tr>\");\n/* */ }\n/* */ }\n/* */ }\n/* */ else\n/* */ {\n/* 1363 */ String resourcelink = null;\n/* 1364 */ boolean hideEditLink = false;\n/* 1365 */ if ((extDeviceMap != null) && (extDeviceMap.get(childresid) != null))\n/* */ {\n/* 1367 */ String link1 = (String)extDeviceMap.get(childresid);\n/* 1368 */ hideEditLink = true;\n/* 1369 */ if (isIt360)\n/* */ {\n/* 1371 */ resourcelink = \"<a href=\" + link1 + \" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* */ else\n/* */ {\n/* 1375 */ resourcelink = \"<a href=\\\"javascript:MM_openBrWindow('\" + link1 + \"','ExternalDevice','width=950,height=600,top=50,left=75,scrollbars=yes,resizable=yes')\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* 1377 */ } else if ((site24x7List != null) && (site24x7List.containsKey(childresid)))\n/* */ {\n/* 1379 */ hideEditLink = true;\n/* 1380 */ String link2 = URLEncoder.encode((String)site24x7List.get(childresid));\n/* 1381 */ resourcelink = \"<a href=\\\"javascript:MM_openBrWindow('\" + link2 + \"','Site24x7','width=950,height=600,top=50,left=75,scrollbars=yes,resizable=yes')\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1386 */ resourcelink = \"<a href=\\\"/showresource.do?resourceid=\" + childresid + \"&method=showResourceForResourceID&haid=\" + resIdTOCheck + \"\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* */ \n/* 1389 */ String imglink = \"<img src=\\\"\" + childimg + \"\\\" align=\\\"left\\\" border=\\\"0\\\" height=\\\"24\\\" width=\\\"24\\\" />\";\n/* 1390 */ String checkbox = \"<input type=\\\"checkbox\\\" name=\\\"select\\\" id=\\\"\" + currentresourceidtree + \"|\" + childresid + \"\\\" value=\\\"\" + childresid + \"\\\" onclick=\\\"deselectParentCKbs('\" + currentresourceidtree + \"|\" + childresid + \"',this,this.form);\\\" >\";\n/* 1391 */ String key = childresid + \"#\" + availabilitykeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1392 */ String availimage = getSeverityImageForAvailability(alert.getProperty(childresid + \"#\" + availabilitykeys.get(childtype)));\n/* 1393 */ String healthimage = getSeverityImageForHealth(alert.getProperty(childresid + \"#\" + healthkeys.get(childtype)));\n/* 1394 */ String availlink = \"<a href=\\\"javascript:void(0);\\\" \" + availmouseover + \"onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + availabilitykeys.get(childtype) + \"')\\\"> \" + availimage + \"</a>\";\n/* 1395 */ String healthlink = \"<a href=\\\"javascript:void(0);\\\" \" + healthmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + healthkeys.get(childtype) + \"')\\\"> \" + healthimage + \"</a>\";\n/* 1396 */ String editlink = \"<a href=\\\"/showresource.do?haid=\" + resIdTOCheck + \"&resourceid=\" + childresid + \"&resourcename=\" + childresname + \"&type=\" + childtype + \"&method=showdetails&editPage=true&moname=\" + childresname + \"\\\" class=\\\"staticlinks\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.maintenance.edit\") + \"\\\"><img align=\\\"center\\\" src=\\\"/images/icon_edit.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1397 */ String thresholdurl = \"/showActionProfiles.do?method=getResourceProfiles&admin=true&all=true&resourceid=\" + childresid;\n/* 1398 */ String configalertslink = \" <a href=\\\"\" + thresholdurl + \"\\\" title='\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"'><img src=\\\"images/icon_associateaction.gif\\\" align=\\\"center\\\" border=\\\"0\\\" /></a>\";\n/* 1399 */ String img2 = \"<img src=\\\"/images/trvline.png\\\" align=\\\"absmiddle\\\" border=\\\"0\\\" height=\\\"15\\\" width=\\\"15\\\"/>\";\n/* 1400 */ String removefromgroup = \"<a class='staticlinks' href=\\\"javascript: removeMonitorFromGroup ('\" + resIdTOCheck + \"','\" + childresid + \"','\" + haidTopLevel + \"');\\\" title='\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.remove.text\") + \"'><img width='13' align=\\\"center\\\" height='14' border='0' src='/images/icon_removefromgroup.gif'/></a>\";\n/* 1401 */ String configcustomfields = \"<a href=\\\"javascript:void(0)\\\" onclick=\\\"fnOpenNewWindow('/jsp/MyField_Alarms.jsp?resourceid=\" + childresid + \"&mgview=true')\\\" title='\" + FormatUtil.getString(\"am.myfield.assign.text\") + \"'><img align=\\\"center\\\" src=\\\"/images/icon_assigncustomfields.gif\\\" border=\\\"0\\\" /></a>\";\n/* */ \n/* 1403 */ if (hideEditLink)\n/* */ {\n/* 1405 */ editlink = \"&nbsp;&nbsp;&nbsp;\";\n/* */ }\n/* 1407 */ if (!forInventory)\n/* */ {\n/* 1409 */ removefromgroup = \"\";\n/* */ }\n/* 1411 */ String actions = \"&nbsp;&nbsp;\" + configalertslink + \"&nbsp;&nbsp;\" + removefromgroup + \"&nbsp;&nbsp;\";\n/* 1412 */ if (!com.adventnet.appmanager.util.Constants.sqlManager) {\n/* 1413 */ actions = actions + configcustomfields;\n/* */ }\n/* 1415 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1417 */ actions = editlink + actions;\n/* */ }\n/* 1419 */ String managedLink = \"\";\n/* 1420 */ if ((request.isUserInRole(\"ENTERPRISEADMIN\")) && (!com.adventnet.appmanager.util.Constants.isIt360))\n/* */ {\n/* 1422 */ checkbox = \"<img hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1423 */ actions = \"\";\n/* 1424 */ if (Integer.parseInt(childresid) >= com.adventnet.appmanager.server.framework.comm.Constants.RANGE) {\n/* 1425 */ managedLink = \"&nbsp; <a target=\\\"mas_window\\\" href=\\\"/showresource.do?resourceid=\" + childresid + \"&type=\" + childtype + \"&moname=\" + URLEncoder.encode(childresname) + \"&resourcename=\" + URLEncoder.encode(childresname) + \"&method=showdetails&aam_jump=true&useHTTP=\" + (!isIt360) + \"\\\"><img border=\\\"0\\\" title=\\\"View Monitor details in Managed Server console\\\" src=\\\"/images/jump.gif\\\"/></a>\";\n/* */ }\n/* */ }\n/* 1428 */ if ((isIt360) || (request.isUserInRole(\"OPERATOR\")))\n/* */ {\n/* 1430 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1433 */ if (!request.isUserInRole(\"ADMIN\"))\n/* */ {\n/* 1435 */ actions = \"\";\n/* */ }\n/* 1437 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + currentresourceidtree + \"\\\" style=\\\"display: \" + trdisplay + \";\\\" width='100%'>\");\n/* 1438 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1439 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"47%\\\" nowrap=\\\"false\\\" style=\\\"padding-left: \" + spacing + \"px !important;\\\" >\" + checkbox + \"&nbsp;<img align='absmiddle' border=\\\"0\\\" title='\" + shortname + \"' src=\\\"\" + imagepath + \"\\\"/>&nbsp;\" + resourcelink + managedLink + configMonitor + \"</td>\");\n/* 1440 */ if (isIt360)\n/* */ {\n/* 1442 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1446 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">\" + \"<table><tr class='whitegrayrightalign'><td><div id='mgaction'>\" + actions + \"</div></td></tr></table></td>\");\n/* */ }\n/* 1448 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"8%\\\" align=\\\"center\\\">\" + availlink + \"</td>\");\n/* 1449 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"center\\\">\" + healthlink + \"</td>\");\n/* 1450 */ if (!isIt360)\n/* */ {\n/* 1452 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">\" + actionimg + \"</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1456 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* 1458 */ toreturn.append(\"</tr>\");\n/* */ }\n/* */ }\n/* 1461 */ return toreturn.toString();\n/* */ }", "public int getChildCount();", "public String getAllChildNodestoDisplay(ArrayList singlechilmos, String resIdTOCheck, String currentresourceidtree, Hashtable childmos, Hashtable availhealth, int level, HttpServletRequest request, HashMap extDeviceMap, HashMap site24x7List)\n/* */ {\n/* 1158 */ boolean isIt360 = com.adventnet.appmanager.util.Constants.isIt360;\n/* 1159 */ boolean forInventory = false;\n/* 1160 */ String trdisplay = \"none\";\n/* 1161 */ String plusstyle = \"inline\";\n/* 1162 */ String minusstyle = \"none\";\n/* 1163 */ String haidTopLevel = \"\";\n/* 1164 */ if (request.getAttribute(\"forInventory\") != null)\n/* */ {\n/* 1166 */ if (\"true\".equals((String)request.getAttribute(\"forInventory\")))\n/* */ {\n/* 1168 */ haidTopLevel = request.getParameter(\"haid\");\n/* 1169 */ forInventory = true;\n/* 1170 */ trdisplay = \"table-row;\";\n/* 1171 */ plusstyle = \"none\";\n/* 1172 */ minusstyle = \"inline\";\n/* */ }\n/* */ \n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1179 */ haidTopLevel = resIdTOCheck;\n/* */ }\n/* */ \n/* 1182 */ ArrayList listtoreturn = new ArrayList();\n/* 1183 */ StringBuffer toreturn = new StringBuffer();\n/* 1184 */ Hashtable availabilitykeys = (Hashtable)availhealth.get(\"avail\");\n/* 1185 */ Hashtable healthkeys = (Hashtable)availhealth.get(\"health\");\n/* 1186 */ Properties alert = (Properties)availhealth.get(\"alert\");\n/* */ \n/* 1188 */ for (int j = 0; j < singlechilmos.size(); j++)\n/* */ {\n/* 1190 */ ArrayList singlerow = (ArrayList)singlechilmos.get(j);\n/* 1191 */ String childresid = (String)singlerow.get(0);\n/* 1192 */ String childresname = (String)singlerow.get(1);\n/* 1193 */ childresname = com.adventnet.appmanager.util.ExtProdUtil.decodeString(childresname);\n/* 1194 */ String childtype = ((String)singlerow.get(2) + \"\").trim();\n/* 1195 */ String imagepath = ((String)singlerow.get(3) + \"\").trim();\n/* 1196 */ String shortname = ((String)singlerow.get(4) + \"\").trim();\n/* 1197 */ String unmanagestatus = (String)singlerow.get(5);\n/* 1198 */ String actionstatus = (String)singlerow.get(6);\n/* 1199 */ String linkclass = \"monitorgp-links\";\n/* 1200 */ String titleforres = childresname;\n/* 1201 */ String titilechildresname = childresname;\n/* 1202 */ String childimg = \"/images/trcont.png\";\n/* 1203 */ String flag = \"enable\";\n/* 1204 */ String dcstarted = (String)singlerow.get(8);\n/* 1205 */ String configMonitor = \"\";\n/* 1206 */ String configmsg = FormatUtil.getString(\"am.webclient.vcenter.esx.notconfigured.text\");\n/* 1207 */ if ((\"VMWare ESX/ESXi\".equals(childtype)) && (!\"2\".equals(dcstarted)))\n/* */ {\n/* 1209 */ configMonitor = \"&nbsp;&nbsp;<img src='/images/icon_ack.gif' align='absmiddle' style='width=16px;heigth:16px' border='0' title='\" + configmsg + \"' />\";\n/* */ }\n/* 1211 */ if (singlerow.get(7) != null)\n/* */ {\n/* 1213 */ flag = (String)singlerow.get(7);\n/* */ }\n/* 1215 */ String haiGroupType = \"0\";\n/* 1216 */ if (\"HAI\".equals(childtype))\n/* */ {\n/* 1218 */ haiGroupType = (String)singlerow.get(9);\n/* */ }\n/* 1220 */ childimg = \"/images/trend.png\";\n/* 1221 */ String actionmsg = FormatUtil.getString(\"Actions Enabled\");\n/* 1222 */ String actionimg = \"<img src=\\\"/images/alarm-icon.png\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* 1223 */ if ((actionstatus == null) || (actionstatus.equalsIgnoreCase(\"null\")) || (actionstatus.equals(\"1\")))\n/* */ {\n/* 1225 */ actionimg = \"<img src=\\\"/images/alarm-icon.png\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* */ }\n/* 1227 */ else if (actionstatus.equals(\"0\"))\n/* */ {\n/* 1229 */ actionmsg = FormatUtil.getString(\"Actions Disabled\");\n/* 1230 */ actionimg = \"<img src=\\\"/images/icon_actions_disabled.gif\\\" border=\\\"0\\\" title=\\\"\" + actionmsg + \"\\\" />\";\n/* */ }\n/* */ \n/* 1233 */ if ((unmanagestatus != null) && (!unmanagestatus.trim().equalsIgnoreCase(\"null\")))\n/* */ {\n/* 1235 */ linkclass = \"disabledtext\";\n/* 1236 */ titleforres = titleforres + \"-UnManaged\";\n/* */ }\n/* 1238 */ String availkey = childresid + \"#\" + availabilitykeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1239 */ String availmouseover = \"\";\n/* 1240 */ if (alert.getProperty(availkey) != null)\n/* */ {\n/* 1242 */ availmouseover = \"onmouseover=\\\"ddrivetip(this,event,'\" + alert.getProperty(availkey).replace(\"\\\"\", \"&quot;\") + \"<br><span style=color: #000000;font-weight:bold;>\" + FormatUtil.getString(\"am.webclient.tooltip.text\") + \"</span>',null,true,'#000000')\\\" onmouseout=\\\"hideddrivetip()\\\" \";\n/* */ }\n/* 1244 */ String healthkey = childresid + \"#\" + healthkeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1245 */ String healthmouseover = \"\";\n/* 1246 */ if (alert.getProperty(healthkey) != null)\n/* */ {\n/* 1248 */ healthmouseover = \"onmouseover=\\\"ddrivetip(this,event,'\" + alert.getProperty(healthkey).replace(\"\\\"\", \"&quot;\") + \"<br><span style=color: #000000;font-weight:bold;>\" + FormatUtil.getString(\"am.webclient.tooltip.text\") + \"</span>',null,true,'#000000')\\\" onmouseout=\\\"hideddrivetip()\\\" \";\n/* */ }\n/* */ \n/* 1251 */ String tempbgcolor = \"class=\\\"whitegrayrightalign\\\"\";\n/* 1252 */ int spacing = 0;\n/* 1253 */ if (level >= 1)\n/* */ {\n/* 1255 */ spacing = 40 * level;\n/* */ }\n/* 1257 */ if (childtype.equals(\"HAI\"))\n/* */ {\n/* 1259 */ ArrayList singlechilmos1 = (ArrayList)childmos.get(childresid + \"\");\n/* 1260 */ String tempresourceidtree = currentresourceidtree + \"|\" + childresid;\n/* 1261 */ String availimage = getSeverityImageForAvailability(alert.getProperty(childresid + \"#\" + availabilitykeys.get(childtype)));\n/* */ \n/* 1263 */ String availlink = \"<a href=\\\"javascript:void(0);\\\" \" + availmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + availabilitykeys.get(childtype) + \"')\\\"> \" + availimage + \"</a>\";\n/* 1264 */ String healthimage = getSeverityImageForHealth(alert.getProperty(childresid + \"#\" + healthkeys.get(childtype)));\n/* 1265 */ String healthlink = \"<a href=\\\"javascript:void(0);\\\" \" + healthmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + healthkeys.get(childtype) + \"')\\\"> \" + healthimage + \"</a>\";\n/* 1266 */ String editlink = \"<a href=\\\"/showapplication.do?method=editApplication&fromwhere=allmonitorgroups&haid=\" + childresid + \"\\\" class=\\\"staticlinks\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.maintenance.edit\") + \"\\\"><img align=\\\"center\\\" src=\\\"/images/icon_edit.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1267 */ String imglink = \"<img src=\\\"\" + childimg + \"\\\" align=\\\"center\\\" align=\\\"left\\\" border=\\\"0\\\" height=\\\"24\\\" width=\\\"24\\\">\";\n/* 1268 */ String checkbox = \"<input type=\\\"checkbox\\\" name=\\\"select\\\" id=\\\"\" + tempresourceidtree + \"\\\" value=\\\"\" + childresid + \"\\\" onclick=\\\"selectAllChildCKbs('\" + tempresourceidtree + \"',this,this.form),deselectParentCKbs('\" + tempresourceidtree + \"',this,this.form)\\\" >\";\n/* 1269 */ String thresholdurl = \"/showActionProfiles.do?method=getHAProfiles&haid=\" + childresid;\n/* 1270 */ String configalertslink = \" <a title='\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"' href=\\\"\" + thresholdurl + \"\\\" ><img src=\\\"images/icon_associateaction.gif\\\" align=\\\"center\\\" border=\\\"0\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"\\\" /></a>\";\n/* 1271 */ String associatelink = \"<a href=\\\"/showresource.do?method=getMonitorForm&type=All&fromwhere=monitorgroupview&haid=\" + childresid + \"\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.associatemonitors.text\") + \"\\\" ><img align=\\\"center\\\" src=\\\"images/icon_assoicatemonitors.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1272 */ String removefromgroup = \"<a class='staticlinks' href=\\\"javascript: removeMonitorFromGroup ('\" + resIdTOCheck + \"','\" + childresid + \"','\" + haidTopLevel + \"');\\\" title='\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.remove.text\") + \"'><img width='13' align=\\\"center\\\" height='14' border='0' src='/images/icon_removefromgroup.gif'/></a>&nbsp;&nbsp;\";\n/* 1273 */ String configcustomfields = \"<a href=\\\"javascript:void(0)\\\" onclick=\\\"fnOpenNewWindow('/jsp/MyField_Alarms.jsp?resourceid=\" + childresid + \"&mgview=true')\\\" title='\" + FormatUtil.getString(\"am.myfield.assign.text\") + \"'><img align=\\\"center\\\" src=\\\"/images/icon_assigncustomfields.gif\\\" border=\\\"0\\\" /></a>\";\n/* */ \n/* 1275 */ if (!forInventory)\n/* */ {\n/* 1277 */ removefromgroup = \"\";\n/* */ }\n/* */ \n/* 1280 */ String actions = \"&nbsp;&nbsp;\" + configalertslink + \"&nbsp;&nbsp;\" + removefromgroup + \"&nbsp;&nbsp;\";\n/* */ \n/* 1282 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1284 */ actions = editlink + actions;\n/* */ }\n/* 1286 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"3\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1288 */ actions = actions + associatelink;\n/* */ }\n/* 1290 */ actions = actions + \"&nbsp;&nbsp;&nbsp;&nbsp;\" + configcustomfields;\n/* 1291 */ String arrowimg = \"\";\n/* 1292 */ if (request.isUserInRole(\"ENTERPRISEADMIN\"))\n/* */ {\n/* 1294 */ actions = \"\";\n/* 1295 */ arrowimg = \"<img align=\\\"center\\\" hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1296 */ checkbox = \"\";\n/* 1297 */ childresname = childresname + \"_\" + com.adventnet.appmanager.server.framework.comm.CommDBUtil.getManagedServerNameWithPort(childresid);\n/* */ }\n/* 1299 */ if (isIt360)\n/* */ {\n/* 1301 */ actionimg = \"\";\n/* 1302 */ actions = \"\";\n/* 1303 */ arrowimg = \"<img align=\\\"center\\\" hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1304 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1307 */ if (!request.isUserInRole(\"ADMIN\"))\n/* */ {\n/* 1309 */ actions = \"\";\n/* */ }\n/* 1311 */ if (request.isUserInRole(\"OPERATOR\"))\n/* */ {\n/* 1313 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1316 */ String resourcelink = \"\";\n/* */ \n/* 1318 */ if ((flag != null) && (flag.equals(\"enable\")))\n/* */ {\n/* 1320 */ resourcelink = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"toggleChildMos('#monitor\" + tempresourceidtree + \"'),toggleTreeImage('\" + tempresourceidtree + \"');\\\"><div id=\\\"monitorShow\" + tempresourceidtree + \"\\\" style=\\\"display:\" + plusstyle + \";\\\"><img src=\\\"/images/icon_plus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div><div id=\\\"monitorHide\" + tempresourceidtree + \"\\\" style=\\\"display:\" + minusstyle + \";\\\"><img src=\\\"/images/icon_minus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div> </a>\" + checkbox + \"<a href=\\\"/showapplication.do?haid=\" + childresid + \"&method=showApplication\\\" class=\\\"\" + linkclass + \"\\\">\" + getTrimmedText(titilechildresname, 45) + \"</a> \";\n/* */ }\n/* */ else\n/* */ {\n/* 1324 */ resourcelink = \"<a href=\\\"javascript:void(0);\\\" onclick=\\\"toggleChildMos('#monitor\" + tempresourceidtree + \"'),toggleTreeImage('\" + tempresourceidtree + \"');\\\"><div id=\\\"monitorShow\" + tempresourceidtree + \"\\\" style=\\\"display:\" + plusstyle + \";\\\"><img src=\\\"/images/icon_plus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div><div id=\\\"monitorHide\" + tempresourceidtree + \"\\\" style=\\\"display:\" + minusstyle + \";\\\"><img src=\\\"/images/icon_minus.gif\\\" border=\\\"0\\\" hspace=\\\"5\\\"></div> </a>\" + checkbox + \"\" + getTrimmedText(titilechildresname, 45);\n/* */ }\n/* */ \n/* 1327 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + currentresourceidtree + \"\\\" style=\\\"display:\" + trdisplay + \";\\\" width='100%'>\");\n/* 1328 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1329 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"47%\\\" style=\\\"padding-left: \" + spacing + \"px !important;\\\" title=\" + childresname + \">\" + arrowimg + resourcelink + \"</td>\");\n/* 1330 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">\" + \"<table><tr class='whitegrayrightalign'><td><div id='mgaction'>\" + actions + \"</div></td></tr></table></td>\");\n/* 1331 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"8%\\\" align=\\\"center\\\">\" + availlink + \"</td>\");\n/* 1332 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"center\\\">\" + healthlink + \"</td>\");\n/* 1333 */ if (!isIt360)\n/* */ {\n/* 1335 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">\" + actionimg + \"</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1339 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* */ \n/* 1342 */ toreturn.append(\"</tr>\");\n/* 1343 */ if (childmos.get(childresid + \"\") != null)\n/* */ {\n/* 1345 */ String toappend = getAllChildNodestoDisplay(singlechilmos1, childresid + \"\", tempresourceidtree, childmos, availhealth, level + 1, request, extDeviceMap, site24x7List);\n/* 1346 */ toreturn.append(toappend);\n/* */ }\n/* */ else\n/* */ {\n/* 1350 */ String assocMessage = \"<td \" + tempbgcolor + \" colspan=\\\"2\\\"><span class=\\\"bodytext\\\" style=\\\"padding-left: \" + (spacing + 10) + \"px !important;\\\"> &nbsp;&nbsp;&nbsp;&nbsp;\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.nomonitormessage.text\") + \"</span><span class=\\\"bodytext\\\">\";\n/* 1351 */ if ((!request.isUserInRole(\"ENTERPRISEADMIN\")) && (!request.isUserInRole(\"DEMO\")) && (!request.isUserInRole(\"OPERATOR\")))\n/* */ {\n/* */ \n/* 1354 */ assocMessage = assocMessage + FormatUtil.getString(\"am.webclient.monitorgroupdetails.click.text\") + \" <a href=\\\"/showresource.do?method=getMonitorForm&type=All&haid=\" + childresid + \"&fromwhere=monitorgroupview\\\" class=\\\"staticlinks\\\" >\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.linktoadd.text\") + \"</span></td>\";\n/* */ }\n/* */ \n/* */ \n/* 1358 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"3\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1360 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + tempresourceidtree + \"\\\" style=\\\"display: \" + trdisplay + \";\\\" width='100%'>\");\n/* 1361 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1362 */ toreturn.append(assocMessage);\n/* 1363 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1364 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1365 */ toreturn.append(\"<td \" + tempbgcolor + \" >&nbsp;</td> \");\n/* 1366 */ toreturn.append(\"</tr>\");\n/* */ }\n/* */ }\n/* */ }\n/* */ else\n/* */ {\n/* 1372 */ String resourcelink = null;\n/* 1373 */ boolean hideEditLink = false;\n/* 1374 */ if ((extDeviceMap != null) && (extDeviceMap.get(childresid) != null))\n/* */ {\n/* 1376 */ String link1 = (String)extDeviceMap.get(childresid);\n/* 1377 */ hideEditLink = true;\n/* 1378 */ if (isIt360)\n/* */ {\n/* 1380 */ resourcelink = \"<a href=\" + link1 + \" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* */ else\n/* */ {\n/* 1384 */ resourcelink = \"<a href=\\\"javascript:MM_openBrWindow('\" + link1 + \"','ExternalDevice','width=950,height=600,top=50,left=75,scrollbars=yes,resizable=yes')\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* 1386 */ } else if ((site24x7List != null) && (site24x7List.containsKey(childresid)))\n/* */ {\n/* 1388 */ hideEditLink = true;\n/* 1389 */ String link2 = URLEncoder.encode((String)site24x7List.get(childresid));\n/* 1390 */ resourcelink = \"<a href=\\\"javascript:MM_openBrWindow('\" + link2 + \"','Site24x7','width=950,height=600,top=50,left=75,scrollbars=yes,resizable=yes')\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ \n/* */ }\n/* */ else\n/* */ {\n/* 1395 */ resourcelink = \"<a href=\\\"/showresource.do?resourceid=\" + childresid + \"&method=showResourceForResourceID&haid=\" + resIdTOCheck + \"\\\" class=\\\"\" + linkclass + \"\\\" title=\\\"\" + titleforres + \"\\\">\" + getTrimmedText(childresname, 45) + \"</a>\";\n/* */ }\n/* */ \n/* 1398 */ String imglink = \"<img src=\\\"\" + childimg + \"\\\" align=\\\"left\\\" border=\\\"0\\\" height=\\\"24\\\" width=\\\"24\\\" />\";\n/* 1399 */ String checkbox = \"<input type=\\\"checkbox\\\" name=\\\"select\\\" id=\\\"\" + currentresourceidtree + \"|\" + childresid + \"\\\" value=\\\"\" + childresid + \"\\\" onclick=\\\"deselectParentCKbs('\" + currentresourceidtree + \"|\" + childresid + \"',this,this.form);\\\" >\";\n/* 1400 */ String key = childresid + \"#\" + availabilitykeys.get(childtype) + \"#\" + \"MESSAGE\";\n/* 1401 */ String availimage = getSeverityImageForAvailability(alert.getProperty(childresid + \"#\" + availabilitykeys.get(childtype)));\n/* 1402 */ String healthimage = getSeverityImageForHealth(alert.getProperty(childresid + \"#\" + healthkeys.get(childtype)));\n/* 1403 */ String availlink = \"<a href=\\\"javascript:void(0);\\\" \" + availmouseover + \"onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + availabilitykeys.get(childtype) + \"')\\\"> \" + availimage + \"</a>\";\n/* 1404 */ String healthlink = \"<a href=\\\"javascript:void(0);\\\" \" + healthmouseover + \" onClick=\\\"fnOpenNewWindow('/jsp/RCA.jsp?resourceid=\" + childresid + \"&attributeid=\" + healthkeys.get(childtype) + \"')\\\"> \" + healthimage + \"</a>\";\n/* 1405 */ String editlink = \"<a href=\\\"/showresource.do?haid=\" + resIdTOCheck + \"&resourceid=\" + childresid + \"&resourcename=\" + childresname + \"&type=\" + childtype + \"&method=showdetails&editPage=true&moname=\" + childresname + \"\\\" class=\\\"staticlinks\\\" title=\\\"\" + FormatUtil.getString(\"am.webclient.maintenance.edit\") + \"\\\"><img align=\\\"center\\\" src=\\\"/images/icon_edit.gif\\\" border=\\\"0\\\" /></a>\";\n/* 1406 */ String thresholdurl = \"/showActionProfiles.do?method=getResourceProfiles&admin=true&all=true&resourceid=\" + childresid;\n/* 1407 */ String configalertslink = \" <a href=\\\"\" + thresholdurl + \"\\\" title='\" + FormatUtil.getString(\"am.webclient.common.util.ALERTCONFIG_TEXT\") + \"'><img src=\\\"images/icon_associateaction.gif\\\" align=\\\"center\\\" border=\\\"0\\\" /></a>\";\n/* 1408 */ String img2 = \"<img src=\\\"/images/trvline.png\\\" align=\\\"absmiddle\\\" border=\\\"0\\\" height=\\\"15\\\" width=\\\"15\\\"/>\";\n/* 1409 */ String removefromgroup = \"<a class='staticlinks' href=\\\"javascript: removeMonitorFromGroup ('\" + resIdTOCheck + \"','\" + childresid + \"','\" + haidTopLevel + \"');\\\" title='\" + FormatUtil.getString(\"am.webclient.monitorgroupdetails.remove.text\") + \"'><img width='13' align=\\\"center\\\" height='14' border='0' src='/images/icon_removefromgroup.gif'/></a>\";\n/* 1410 */ String configcustomfields = \"<a href=\\\"javascript:void(0)\\\" onclick=\\\"fnOpenNewWindow('/jsp/MyField_Alarms.jsp?resourceid=\" + childresid + \"&mgview=true')\\\" title='\" + FormatUtil.getString(\"am.myfield.assign.text\") + \"'><img align=\\\"center\\\" src=\\\"/images/icon_assigncustomfields.gif\\\" border=\\\"0\\\" /></a>\";\n/* */ \n/* 1412 */ if (hideEditLink)\n/* */ {\n/* 1414 */ editlink = \"&nbsp;&nbsp;&nbsp;\";\n/* */ }\n/* 1416 */ if (!forInventory)\n/* */ {\n/* 1418 */ removefromgroup = \"\";\n/* */ }\n/* 1420 */ String actions = \"&nbsp;&nbsp;\" + configalertslink + \"&nbsp;&nbsp;\" + removefromgroup + \"&nbsp;&nbsp;\";\n/* 1421 */ if (!com.adventnet.appmanager.util.Constants.sqlManager) {\n/* 1422 */ actions = actions + configcustomfields;\n/* */ }\n/* 1424 */ if ((haiGroupType == null) || ((haiGroupType != null) && (!\"1009\".equals(haiGroupType)) && (!\"1010\".equals(haiGroupType)) && (!\"1012\".equals(haiGroupType))))\n/* */ {\n/* 1426 */ actions = editlink + actions;\n/* */ }\n/* 1428 */ String managedLink = \"\";\n/* 1429 */ if ((request.isUserInRole(\"ENTERPRISEADMIN\")) && (!com.adventnet.appmanager.util.Constants.isIt360))\n/* */ {\n/* 1431 */ checkbox = \"<img hspace=\\\"3\\\" border=\\\"0\\\" src=\\\"/images/icon_arrow_childattribute_grey.gif\\\"/>\";\n/* 1432 */ actions = \"\";\n/* 1433 */ if (Integer.parseInt(childresid) >= com.adventnet.appmanager.server.framework.comm.Constants.RANGE) {\n/* 1434 */ managedLink = \"&nbsp; <a target=\\\"mas_window\\\" href=\\\"/showresource.do?resourceid=\" + childresid + \"&type=\" + childtype + \"&moname=\" + URLEncoder.encode(childresname) + \"&resourcename=\" + URLEncoder.encode(childresname) + \"&method=showdetails&aam_jump=true&useHTTP=\" + (!isIt360) + \"\\\"><img border=\\\"0\\\" title=\\\"View Monitor details in Managed Server console\\\" src=\\\"/images/jump.gif\\\"/></a>\";\n/* */ }\n/* */ }\n/* 1437 */ if ((isIt360) || (request.isUserInRole(\"OPERATOR\")))\n/* */ {\n/* 1439 */ checkbox = \"\";\n/* */ }\n/* */ \n/* 1442 */ if (!request.isUserInRole(\"ADMIN\"))\n/* */ {\n/* 1444 */ actions = \"\";\n/* */ }\n/* 1446 */ toreturn.append(\"<tr \" + tempbgcolor + \" id=\\\"#monitor\" + currentresourceidtree + \"\\\" style=\\\"display: \" + trdisplay + \";\\\" width='100%'>\");\n/* 1447 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"3%\\\" >&nbsp;</td> \");\n/* 1448 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"47%\\\" nowrap=\\\"false\\\" style=\\\"padding-left: \" + spacing + \"px !important;\\\" >\" + checkbox + \"&nbsp;<img align='absmiddle' border=\\\"0\\\" title='\" + shortname + \"' src=\\\"\" + imagepath + \"\\\"/>&nbsp;\" + resourcelink + managedLink + configMonitor + \"</td>\");\n/* 1449 */ if (isIt360)\n/* */ {\n/* 1451 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1455 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"15%\\\" align=\\\"left\\\">\" + \"<table><tr class='whitegrayrightalign'><td><div id='mgaction'>\" + actions + \"</div></td></tr></table></td>\");\n/* */ }\n/* 1457 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"8%\\\" align=\\\"center\\\">\" + availlink + \"</td>\");\n/* 1458 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"center\\\">\" + healthlink + \"</td>\");\n/* 1459 */ if (!isIt360)\n/* */ {\n/* 1461 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">\" + actionimg + \"</td>\");\n/* */ }\n/* */ else\n/* */ {\n/* 1465 */ toreturn.append(\"<td \" + tempbgcolor + \" width=\\\"7%\\\" align=\\\"left\\\">&nbsp;</td>\");\n/* */ }\n/* 1467 */ toreturn.append(\"</tr>\");\n/* */ }\n/* */ }\n/* 1470 */ return toreturn.toString();\n/* */ }", "public abstract List<Node> getChildNodes();", "public XMLElement[] getChildren()\n/* */ {\n/* 532 */ int childCount = getChildCount();\n/* 533 */ XMLElement[] kids = new XMLElement[childCount];\n/* 534 */ this.children.copyInto(kids);\n/* 535 */ return kids;\n/* */ }", "@Override\n protected void refreshChildren() {\n }", "Node[] getChildren(Node node);", "@Override\r\n\tpublic List<Node> getChildren() {\r\n\t\treturn null;\r\n\t}", "public boolean hasChildren()\n/* */ {\n/* 487 */ return !this.children.isEmpty();\n/* */ }", "int getNumberOfChildren(int nodeID){\n check(nodeID);\n return nodes_[nodeID].size_;\n }", "public int getChildCount() {\r\n if (_children == null) {\r\n return 0;\r\n }\r\n return _children.size();\r\n }", "public Vector getChildren() {\n return null;\n }", "public void init$Children() {\n }", "public void init$Children() {\n }", "public void init$Children() {\n }", "public String[] listChildren()\n/* */ {\n/* 519 */ int childCount = getChildCount();\n/* 520 */ String[] outgoing = new String[childCount];\n/* 521 */ for (int i = 0; i < childCount; i++) {\n/* 522 */ outgoing[i] = getChild(i).getName();\n/* */ }\n/* 524 */ return outgoing;\n/* */ }", "protected void recurseOnChildList (Vector children, Object obj, XmlDescriptor desc, UnmarshalContext context) throws\n\t Exception {\n\t\t if (children == null) return ;\n\t\t for (int i = 0; i < children.size (); i++ )\n\t\t\t try {\n\t\t\t\t setElement ((XmlNode)children.elementAt (i), obj, desc, context);\n\t\t\t } catch (FieldNotFoundException e) {\n\t\t\t\t if (context.ignoreMissingFields)\n\t\t\t\t\t System.err.println (e.getMessage ());\n\t\t\t\t else throw e;\n\t\t\t }\n\t }", "ArrayList<Expression> getChildren();", "int childCount(){\n return this.children.size();\n }", "private static void walkTree(Collection<String> children, Collection<String> list, TypeTree tree) {\n\t if (children != null) {\n\t\tlist.addAll(children);\n\t String[] kids = children.toArray(new String[children.size()]);\n\t\tfor (int i = 0; i< kids.length; i++) {\n\t\t walkTree(tree.classSet(kids[i]), list, tree);\n\t\t}\n\t }\n\t}", "@Override\n public List<TreeNode<N>> children() {\n return Collections.unmodifiableList(children);\n }", "public void setStructExprRecog(LinkedList<StructExprRecog> listChildren) {\n mnExprRecogType = EXPRRECOGTYPE_LISTCUT;\n mType = UnitProtoType.Type.TYPE_UNKNOWN;\n mstrFont = UNKNOWN_FONT_TYPE;\n mlistChildren = new LinkedList<StructExprRecog>();\n mlistChildren.addAll(listChildren);\n int nLeft = Integer.MAX_VALUE, nTop = Integer.MAX_VALUE, nRightPlus1 = Integer.MIN_VALUE, nBottomPlus1 = Integer.MIN_VALUE;\n int nTotalArea = 0, nTotalValidChildren = 0;\n double dSumWeightedSim = 0;\n double dSumSimilarity = 0;\n for (StructExprRecog ser: mlistChildren) {\n if (ser.mnLeft == 0 && ser.mnTop == 0 && ser.mnHeight == 0 && ser.mnWidth == 0) {\n continue; // this can happen in some extreme case like extract2Recog input is null or empty imageChops\n // to avoid jeapodize the ser place, skip.\n }\n if (ser.mnLeft < nLeft) {\n nLeft = ser.mnLeft;\n }\n if (ser.mnLeft + ser.mnWidth > nRightPlus1) {\n nRightPlus1 = ser.mnLeft + ser.mnWidth;\n }\n if (ser.mnTop < nTop) {\n nTop = ser.mnTop;\n }\n if (ser.mnTop + ser.mnHeight > nBottomPlus1) {\n nBottomPlus1 = ser.mnTop + ser.mnHeight;\n }\n nTotalArea += ser.getArea();\n dSumSimilarity += ser.getArea() * ser.mdSimilarity;\n nTotalValidChildren ++;\n dSumSimilarity += ser.mdSimilarity;\n }\n mnLeft = nLeft;\n mnTop = nTop;\n mnWidth = nRightPlus1 - nLeft;\n mnHeight = nBottomPlus1 - nTop;\n \n mimgChop = null;\n if (nTotalArea > 0) {\n mdSimilarity = dSumSimilarity / nTotalArea;\n } else {\n mdSimilarity = dSumSimilarity / nTotalValidChildren;\n }\n }", "public void removeChildren() {\r\n this.children.clear();\r\n childNum = 0;\r\n }", "private static void listChildren(Path p, List<String> list)\n throws IOException {\n for (Path c : p.getDirectoryEntries()) {\n list.add(c.getPathString());\n if (c.isDirectory()) {\n listChildren(c, list);\n }\n }\n }", "boolean hasChildren();", "public HTMLComponent getChild(int i);", "public ResultMap<BaseNode> listChildren();", "public LinkedList<Node> getChildren() { \r\n LinkedList<Node> nodes = new LinkedList<>();\r\n for(int i=0;i<=size;i++)\r\n nodes.add(children[i]);\r\n return nodes;\r\n }", "boolean hasChildNodes();", "Collection<DendrogramNode<T>> getChildren();", "public void init$Children() {\n children = new ASTNode[3];\n setChild(new List(), 1);\n setChild(new List(), 2);\n }", "public void init$Children() {\n children = new ASTNode[2];\n setChild(new List(), 1);\n }", "@Override\r\n \tpublic boolean hasChildren() {\n \t\treturn getChildren().length > 0;\r\n \t}", "int childrenParent () {\r\n\treturn OS.PtWidgetChildBack (handle);\r\n}", "public int getChildCount() { return data.length; }", "public int numberOfChildren() {\n\t\tif(children == null) return 0;\n\t\telse return children.size();\n\t}", "private void addMenuChildren( MenuManager menuParent, List<XulComponent> children ) {\n for ( Element comp : children ) {\n\n // TODO\n /*\n * for (XulComponent compInner : ((SwtMenupopup) comp).getChildNodes()) { if(compInner instanceof XulMenu){\n * MenuItem item = new MenuItem(menuParent, SWT.CASCADE); Menu flyout = new Menu(shell, SWT.DROP_DOWN);\n * item.setMenu(flyout); addMenuChildren(flyout, compInner.getChildNodes()); } else {\n * \n * \n * \n * } }\n */\n }\n }", "protected final synchronized Iterator<T> children() {\n if( children == null ) {\n children = Collections.emptyList();\n }\n \n return children.iterator();\n }", "public static void computeChildren() {\n\t\tArrayList<BNNode> children = new ArrayList<BNNode>();\n\t\t// For each node, build an array of children by checking which nodes have it as a parent.\n\t\tfor (BNNode node : nodes) {\n\t\t\tchildren.clear();\n\t\t\tfor (BNNode node2 : nodes) {\n\t\t\t\tif (node == node2)\n\t\t\t\t\tcontinue;\n\t\t\t\tfor (BNNode node3 : node2.parents)\n\t\t\t\t\tif (node3 == node)\n\t\t\t\t\t\tchildren.add(node2);\n\t\t\t}\n\t\t\tnode.children = new BNNode[children.size()];\n\t\t\tnode.children = (BNNode[]) children.toArray(node.children);\n\t\t}\n\t}", "public int getChildCount()\n {\n return mChildren.length; // The indexes and constraints\n }", "public List<TreeNode> getChildrenNodes();", "private void populateChildData(List<RestTreeNode> children, RepositoryService repoService, List<ItemInfo> items,\n boolean isCompact) {\n for (ItemInfo pathItem : items) {\n RepoPath repoPath = pathItem.getRepoPath();\n if (!repoService.isRepoPathVisible(repoPath)) {\n continue;\n }\n children.add(getChildItem(pathItem, pathItem.getRelPath(),repoPath,isCompact));\n }\n }", "@Override\n public Collection<WrapperAwareElement> getChildren()\n {\n return null;\n }", "abstract void setChildren(List<T> spans);", "public String getUnusedChildren();", "public ListNode[] getChildren(){\n\t\tListNode[] ret = new ListNode[length()];\n\t\tListNode temp = firstNode;\n\t\tfor(int i = 0; i < ret.length && temp != null; i++){\n\t\t\tret[i] = temp;\n\t\t\ttemp = temp.getNextNode();\n\t\t}\n\n\t\treturn ret;\n\t}", "private void assertHeapProperty(AbstractList<T> list, int elementsCount, Comparator<T> copmarator) {\n\t\tfinal int lastParentNodeIdx = elementsCount / 2 - 1;//the last child belongs to the last parent\n\t\tint currentIndex = lastParentNodeIdx;\n\t\t//invoke heapify on each element of every levels but last one, in a bottom-up manner\n\t\tfor (; currentIndex >= 0; --currentIndex) {\n\t\t\tT parentValue = list.get(currentIndex);\n\t\t\tint chIdx = leftChildIdx(currentIndex);\n\t\t\tif (chIdx < elementsCount)\n\t\t\t\tassert(1 != copmarator.compare(parentValue, list.get(chIdx)));\n\t\t\tchIdx = rightChildIdx(currentIndex);\n\t\t\tif (chIdx < elementsCount)\n\t\t\t\tassert(1 != copmarator.compare(parentValue, list.get(chIdx)));\n\t\t}\n\t}", "abstract public List<Command> getChildren();", "public void testGetChildrenCaches() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n List<FileObject> l = new ArrayList<FileObject>();\n parent = parent.createFolder(\"parent\");\n for (int i = 0; i < 20; i++) {\n l.add(parent.createData(\"file\" + i + \".txt\"));\n }\n\n monitor.reset();\n //20 x FileObject + 1 File.listFiles\n FileObject[] children = parent.getChildren();\n monitor.getResults().assertResult(1, StatFiles.ALL);\n monitor.getResults().assertResult(1, StatFiles.READ);\n for (FileObject ch : children) {\n assertNull(\"No sibling\", FileUtil.findBrother(ch, \"exe\"));\n }\n monitor.getResults().assertResult(1, StatFiles.ALL);\n monitor.getResults().assertResult(1, StatFiles.READ);\n }", "@Override\n public int getChildrenCount() {\n return 1 + mRecentTabsManager.getRecentlyClosedEntries().size();\n }", "@DISPID(-2147417075)\n @PropGet\n com4j.Com4jObject children();", "HNode getLastChild();", "public List<PafDimMember> getChildren() {\r\n\t\t\r\n\t\tList<PafDimMember> childList = null;\r\n\t\t\r\n\t\t// If no children are found, return empty array list\r\n\t\tif (children == null) {\r\n\t\t\tchildList = new ArrayList<PafDimMember>();\r\n\t\t} else {\r\n\t\t\t// Else, return pointer to children\r\n\t\t\tchildList = children;\r\n\t\t}\r\n\t\treturn childList;\r\n\t}", "@Override\n protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {\n measureChildren(widthMeasureSpec, heightMeasureSpec);\n int maxWidth = MeasureSpec.getSize(widthMeasureSpec);\n int maxHeight = MeasureSpec.getSize(heightMeasureSpec);\n int viewListSize = viewList.size();\n for (int i = 0; i < viewListSize; i++) {\n View child = this.getChildAt(i);\n //this.measureChild(child, widthMeasureSpec, heightMeasureSpec);\n child.measure( MeasureSpec.makeMeasureSpec(getWidth()/2 + 100,\n MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(getHeight(),\n MeasureSpec.UNSPECIFIED));\n LayoutParams lParams = (LayoutParams) child.getLayoutParams();\n lParams.left = 250;\n lParams.right = maxWidth - 250;\n }\n setMeasuredDimension(maxWidth, maxHeight);\n viewGroupWidth = getMeasuredWidth();\n viewGroupHeight = getMeasuredHeight();\n }", "public int childrenSize()\r\n\t{\r\n\t\treturn this.children.size();\r\n\t}", "public int countChildren() {\n return this.children.size();\n }", "@Override\r\n\tprotected void processAddChildElementObject(ElementObjectI ceo) {\r\n\t\tif (ceo instanceof ListI) {// actions\r\n\t\t\tthis.actionsDiv.append(ceo.getElement());\r\n\t\t} else {\r\n\t\t\tsuper.processAddChildElementObject(ceo);\r\n\t\t}\r\n\t}", "public int getLengthOfChildren() {\n int length = 0;\n IBiNode childTmp;\n\n if (this.child != null) {\n // length of first child\n length += this.child.getLength();\n\n childTmp = this.child.getSibling();\n while (childTmp != null) {\n // length of 2nd - nth children\n length += childTmp.getLength();\n childTmp = childTmp.getSibling();\n }\n\n }\n\n return length;\n }", "public List<AccessibleElement> getAccessibleChildren();", "@Override\n public LinkedList<ApfsElement> getChildren() {\n return this.children;\n }", "final GapBoxViewChildren getChildrenNull() {\n return children;\n }", "public void testGetChildren() throws IOException {\n FileObject fobj = getFileObject(testFile);\n FileObject parent = fobj.getParent();\n parent = parent.createFolder(\"parent\");\n File pFile = getFile(parent);\n for (int i = 0; i < 10; i++) {\n assertTrue(new File(pFile, \"file\" + i).createNewFile());\n assertTrue(new File(pFile, \"fold\" + i).mkdir());\n }\n monitor.reset();\n FileObject[] children = parent.getChildren();\n //20 x children, 1 x File.listFiles \n monitor.getResults().assertResult(21, StatFiles.ALL);\n monitor.getResults().assertResult(21, StatFiles.READ);\n //second time\n monitor.reset();\n children = parent.getChildren();\n monitor.getResults().assertResult(0, StatFiles.ALL);\n }", "public List<String> getChildren() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void resizeToChildren () {\n\t}", "protected void customReloadChildren(int index, int removeLength,\n int startOffset, int endOffset) {\n\n View[] added = null;\n ViewFactory f = getViewFactory();\n // Null view factory can mean that one of the grand parents is already disconnected\n // from the view hierarchy. No added children for null factory.\n \n if (f != null) {\n Element elem = getElement();\n\n int elementCount = elem.getElementCount();\n int elementIndex = (elem != null) ? elem.getElementIndex(startOffset) : -1;\n if (elementIndex >= elementCount) {\n return; // Create no after last element\n }\n List childViews = new ArrayList();\n int viewCount = getViewCount();\n\n loop:\n while (startOffset < endOffset) {\n // Create custom child\n View childView = createCustomView(f, startOffset, endOffset, elementIndex);\n if (childView == null) {\n throw new IllegalStateException(\"No view created for area (\" // NOI18N\n + startOffset + \", \" + endOffset + \")\"); // NOI18N\n }\n\n // Assuming childView.getStartOffset() is at startOffset\n childViews.add(childView);\n\n // Update elementIndex\n int childViewEndOffset = childView.getEndOffset();\n while (childViewEndOffset > endOffset) {\n/* throw new IllegalStateException(\n \"childViewEndOffset=\" + childViewEndOffset // NOI18N\n + \" > endOffset=\" + endOffset // NOI18N\n );\n */\n /* The created child view interferes with a view\n * that is still present and which is not planned\n * to be removed.\n * This can happen e.g. when a fold hierarchy change\n * (caused by a document change) is fired\n * prior to the document change gets fired\n * to the view hierarchy.\n * The fix for that situation is to continue to remove\n * the present views until the end of the created view will match\n * a beginning of a present view.\n */\n if (index + removeLength >= viewCount) {\n // Should not happen but can't remove past the last view\n break;\n }\n endOffset = getView(index + removeLength).getEndOffset();\n removeLength++;\n if (LOG.isLoggable(Level.FINE)) {\n LOG.fine(\n \"GapBoxView.customReloadChildren(): Increased removeLength to \" // NOI18N\n + removeLength + \", eo=\" + endOffset // NOI18N\n );\n }\n }\n\n Element childElem = elem.getElement(elementIndex);\n while (childElem.getEndOffset() <= childViewEndOffset) {\n elementIndex++;\n if (elementIndex == elementCount) {\n // #115034\n break loop;\n }\n childElem = elem.getElement(elementIndex);\n }\n\n startOffset = childViewEndOffset;\n }\n\n added = new View[childViews.size()];\n childViews.toArray(added);\n }\n\n replace(index, removeLength, added);\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "@Override\n protected void iterChildren(TreeFunction f) {\n }", "private ImmutableList<Node> constructChildNodes(@Nullable List<Step> childSteps) {\n if (childSteps != null && !childSteps.isEmpty()) {\n List<Node> children = new ArrayList<>();\n for (Step childStep : childSteps) {\n children.add(new Node(childStep));\n }\n\n ImmutableList.Builder<Node> builder = new ImmutableList.Builder<>();\n builder.addAll(children);\n return builder.build();\n }\n\n return null;\n }", "List<Node<T>> children();", "public void createChild (GenericTreeNode<String> daddy)\r\n\t{\r\n\t\t\tList < GenericTreeNode<String> > child= daddy.getChildren();\r\n\t\t\r\n\t\tif (daddy.getData().equalsIgnoreCase(\"next.CommonProfile.Dashboard_SI\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Admin.Admin_Principal\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Client.Client_Principal\"));\t\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Member.Member_Principal\"));\t\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.CommonProfile.Dashboard_SU\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\t//child.add(new GenericTreeNode<String>(\"next.CommonProfile.DashboardPrincipal\"));\t\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.Admin.Admin_Principal\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.CommonProfile.PersonalInfo\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.CommonProfile.Products\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.Admin.Business_Rules\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.view.support.CustomList\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t}\r\n\t\telse if (daddy.getData().equalsIgnoreCase(\"next.view.support.CustomList\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.MapsFunctionality\"));\r\n\t\t\t\r\n\t\t}else if (daddy.getData().equalsIgnoreCase(\"next.SupportFunctionality.MapsFunctionality\")){\r\n\t\t\tchild.add(new GenericTreeNode<String>(\"next.SupportFunctionality.VoiceRecogFunctionality\"));\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tdaddy.setChildren(child);\r\n\t\t for (GenericTreeNode<String> node : daddy.getChildren()) {\r\n\t\t\t createChild (node);\r\n\t }\r\n\t}", "public static List<nsIDOMNode> getChildren(nsIDOMElement visualElement) {\r\n return getChildren(visualElement, false);\r\n }", "@Override\n public void removeChildren()\n {\n children.clear();\n }" ]
[ "0.614584", "0.6015187", "0.59492296", "0.59485245", "0.59208095", "0.5853816", "0.58425057", "0.58018124", "0.5788579", "0.5704668", "0.5679706", "0.5678553", "0.5667127", "0.5663888", "0.56184846", "0.55872023", "0.55765", "0.55322856", "0.55283415", "0.55171806", "0.5490739", "0.5489528", "0.548474", "0.5477634", "0.5475469", "0.54660916", "0.5452743", "0.54520446", "0.54434097", "0.5442542", "0.54191566", "0.5405966", "0.5387755", "0.53866553", "0.5359468", "0.5349224", "0.53413504", "0.5340166", "0.5327369", "0.53187716", "0.53187716", "0.53187716", "0.5317615", "0.53108895", "0.5298721", "0.52867967", "0.52761567", "0.52678347", "0.52666324", "0.52652454", "0.5250176", "0.5250088", "0.52489966", "0.52460706", "0.5244271", "0.52401537", "0.523979", "0.52297413", "0.52297074", "0.522712", "0.5218265", "0.52159816", "0.5208781", "0.5198795", "0.519872", "0.51985085", "0.5196819", "0.5196419", "0.51957834", "0.51955414", "0.5194606", "0.5191018", "0.5190828", "0.51897484", "0.5170834", "0.5170124", "0.5162969", "0.51461387", "0.5140637", "0.5130609", "0.51273644", "0.5123169", "0.51225114", "0.5119647", "0.51083916", "0.5104349", "0.51008433", "0.5094188", "0.5091729", "0.50896007", "0.5087393", "0.5071221", "0.50686425", "0.50686425", "0.50686425", "0.5065777", "0.50611347", "0.5060212", "0.5052823", "0.50517756" ]
0.61974996
0
it is possible that ser is a type like hcap, but principle is hblank cut, so this is wrong struct, the bottom hblank cuts in principle should be the top level children, the first hblank cut is the real principle for hcap.
public StructExprRecog preRestructHDivSer4MatrixMExprs(StructExprRecog ser) { switch(ser.mnExprRecogType) { case StructExprRecog.EXPRRECOGTYPE_HBLANKCUT: { LinkedList<StructExprRecog> listNewSers = new LinkedList<StructExprRecog>(); for (int idx = 0; idx < ser.mlistChildren.size(); idx ++) { StructExprRecog serNewChild = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.get(idx)); if (serNewChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT) { listNewSers.addAll(serNewChild.mlistChildren); } else { listNewSers.add(serNewChild); } } StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues); serReturn.setStructExprRecog(listNewSers, StructExprRecog.EXPRRECOGTYPE_HBLANKCUT); // listNewSers size should be > 1 return serReturn; } case StructExprRecog.EXPRRECOGTYPE_HLINECUT: { StructExprRecog serNewNumerator = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.getFirst()); StructExprRecog serNewDenominator = preRestructHDivSer4MatrixMExprs(ser.mlistChildren.getLast()); if (serNewNumerator.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT && serNewDenominator.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) { return ser; } LinkedList<StructExprRecog> listSersAbove = new LinkedList<StructExprRecog>(); if (serNewNumerator.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { listSersAbove.addAll(serNewNumerator.mlistChildren); serNewNumerator = listSersAbove.removeLast(); } LinkedList<StructExprRecog> listSersBelow = new LinkedList<StructExprRecog>(); if (serNewDenominator.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { listSersBelow.addAll(serNewDenominator.mlistChildren); serNewDenominator = listSersBelow.removeFirst(); } StructExprRecog serNewHLnCut = new StructExprRecog(ser.mbarrayBiValues); LinkedList<StructExprRecog> listNewHLnCut = new LinkedList<StructExprRecog>(); listNewHLnCut.add(serNewNumerator); listNewHLnCut.add(ser.mlistChildren.get(1)); listNewHLnCut.add(serNewDenominator); serNewHLnCut.setStructExprRecog(listNewHLnCut, EXPRRECOGTYPE_HLINECUT); LinkedList<StructExprRecog> listNewChildren = listSersAbove; listNewChildren.add(serNewHLnCut); listNewChildren.addAll(listSersBelow); StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues); serReturn.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HBLANKCUT); return serReturn; } case StructExprRecog.EXPRRECOGTYPE_HCUTCAP: case StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER: case StructExprRecog.EXPRRECOGTYPE_HCUTUNDER: { StructExprRecog serNewPrinciple = preRestructHDivSer4MatrixMExprs(ser.getPrincipleSER(1)); if (serNewPrinciple.mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT) { return ser; } LinkedList<StructExprRecog> listNewBlankCuts = new LinkedList<StructExprRecog>(); listNewBlankCuts.addAll(serNewPrinciple.mlistChildren); // have to add all instead of using = because otherwise we change serNewPrinciple. if (ser.mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER) { StructExprRecog serTop = ser.mlistChildren.getFirst(); StructExprRecog serMajor = listNewBlankCuts.removeFirst(); StructExprRecog serNew1st = new StructExprRecog(ser.mbarrayBiValues); LinkedList<StructExprRecog> listNewChildren = new LinkedList<StructExprRecog>(); listNewChildren.add(serTop); listNewChildren.add(serMajor); serNew1st.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HCUTCAP); listNewBlankCuts.addFirst(serNew1st); } if (ser.mnExprRecogType != EXPRRECOGTYPE_HCUTCAP) { StructExprRecog serMajor = listNewBlankCuts.removeLast(); StructExprRecog serBottom = ser.mlistChildren.getLast(); StructExprRecog serNewLast = new StructExprRecog(ser.mbarrayBiValues); LinkedList<StructExprRecog> listNewChildren = new LinkedList<StructExprRecog>(); listNewChildren.add(serMajor); listNewChildren.add(serBottom); serNewLast.setStructExprRecog(listNewChildren, EXPRRECOGTYPE_HCUTUNDER); listNewBlankCuts.addLast(serNewLast); } StructExprRecog serReturn = new StructExprRecog(ser.mbarrayBiValues); serReturn.setStructExprRecog(listNewBlankCuts, EXPRRECOGTYPE_HBLANKCUT); return serReturn; } default: return ser; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic List<IPrintable> getStructureParts() {\n\t\treturn null;\r\n\t}", "public JsonElement serialize(hv paramhv, Type paramType, JsonSerializationContext paramJsonSerializationContext)\r\n/* 82: */ {\r\n/* 83:344 */ if (paramhv.g()) {\r\n/* 84:345 */ return null;\r\n/* 85: */ }\r\n/* 86:347 */ JsonObject localJsonObject1 = new JsonObject();\r\n/* 87:349 */ if (hv.b(paramhv) != null) {\r\n/* 88:350 */ localJsonObject1.addProperty(\"bold\", hv.b(paramhv));\r\n/* 89: */ }\r\n/* 90:352 */ if (hv.c(paramhv) != null) {\r\n/* 91:353 */ localJsonObject1.addProperty(\"italic\", hv.c(paramhv));\r\n/* 92: */ }\r\n/* 93:355 */ if (hv.d(paramhv) != null) {\r\n/* 94:356 */ localJsonObject1.addProperty(\"underlined\", hv.d(paramhv));\r\n/* 95: */ }\r\n/* 96:358 */ if (hv.e(paramhv) != null) {\r\n/* 97:359 */ localJsonObject1.addProperty(\"strikethrough\", hv.e(paramhv));\r\n/* 98: */ }\r\n/* 99:361 */ if (hv.f(paramhv) != null) {\r\n/* 100:362 */ localJsonObject1.addProperty(\"obfuscated\", hv.f(paramhv));\r\n/* 101: */ }\r\n/* 102:364 */ if (hv.g(paramhv) != null) {\r\n/* 103:365 */ localJsonObject1.add(\"color\", paramJsonSerializationContext.serialize(hv.g(paramhv)));\r\n/* 104: */ }\r\n/* 105:367 */ if (hv.h(paramhv) != null) {\r\n/* 106:368 */ localJsonObject1.add(\"insertion\", paramJsonSerializationContext.serialize(hv.h(paramhv)));\r\n/* 107: */ }\r\n/* 108: */ JsonObject localJsonObject2;\r\n/* 109:371 */ if (hv.i(paramhv) != null)\r\n/* 110: */ {\r\n/* 111:372 */ localJsonObject2 = new JsonObject();\r\n/* 112:373 */ localJsonObject2.addProperty(\"action\", hv.i(paramhv).a().b());\r\n/* 113:374 */ localJsonObject2.addProperty(\"value\", hv.i(paramhv).b());\r\n/* 114:375 */ localJsonObject1.add(\"clickEvent\", localJsonObject2);\r\n/* 115: */ }\r\n/* 116:378 */ if (hv.j(paramhv) != null)\r\n/* 117: */ {\r\n/* 118:379 */ localJsonObject2 = new JsonObject();\r\n/* 119:380 */ localJsonObject2.addProperty(\"action\", hv.j(paramhv).a().b());\r\n/* 120:381 */ localJsonObject2.add(\"value\", paramJsonSerializationContext.serialize(hv.j(paramhv).b()));\r\n/* 121:382 */ localJsonObject1.add(\"hoverEvent\", localJsonObject2);\r\n/* 122: */ }\r\n/* 123:385 */ return localJsonObject1;\r\n/* 124: */ }", "Structure createStructure();", "public Commande_structureSerializationTest(){\n }", "public AttachedPartsStruct()\n\t{\n\t\tthis.station = new EnumHolder<>( StationEnum32.Nothing_Empty );\n\t\tthis.storeType = new EntityTypeStruct();\n\t\t\n\t\t// Add to the elements in the parent so that it can do its generic fixed-record stuff\n\t\tsuper.add( station );\n\t\tsuper.add( storeType );\n\t}", "public void serializeT(Node15 root) {\n\t sb.append(root.val).append(\",\");\n\t sb.append(\"#\").append(String.valueOf(root.children.size())).append(\",\");\n\t for(Node15 curr : root.children){\n\t serializeT(curr);\n\t }\n\t return;\n\t }", "BElementStructure createBElementStructure();", "public void organizeInternalStructure( ) throws LoaderException\r\n {\r\n // Fist cast the object for easier use and validation\r\n IEmpty empty = null;\r\n try\r\n {\r\n empty = ( IEmpty )element;\r\n }\r\n catch( ClassCastException e )\r\n {\r\n throw new LoaderException( \"Class does not implement IEmpty.\", e );\r\n }\r\n \r\n if(((IActivity)element).getName( )==null)\r\n throw new LoaderException(\"The empty element must have a name defined\");\r\n }", "public interface TreeElementI extends Serializable\n{\n public void addChild(TreeElementI child);\n public String getId();\n public void setId(String id);\n public String getOutlineTitle();\n public void setOutlineTitle(String outlineTitle);\n public boolean isHasParent();\n public void setHasParent(boolean hasParent);\n public boolean isHasChild();\n public void setHasChild(boolean hasChild);\n public int getLevel();\n public void setLevel(int level);\n public boolean isExpanded();\n public void setExpanded(boolean expanded);\n public ArrayList<TreeElementI> getChildList();\n public TreeElementI getParent();\n public void setParent(TreeElementI parent);\n\n}", "public byte[] serialize() { length 9 bits, each value == byte\n // info string\n final short scratch = (short) ((0x7f & this.type) << 9 | 0x1ff & this.length);\n final byte[] data = new byte[2 + this.length];\n final ByteBuffer bb = ByteBuffer.wrap(data);\n bb.putShort(scratch);\n if (this.value != null) {\n bb.put(this.value);\n }\n return data;\n }", "@Override\r\n\tpublic boolean isStructure() {\n\t\treturn false;\r\n\t}", "@Test\n public void serialSimpleTest(){\n\n byte b = 1;\n Object obj = new SimpleObject(1, 1.0, 1f, b);\n Document document = Serializer.serialize(obj);\n assertNotNull(document);\n\n assertNotNull(document.getRootElement());\n Element rootElement = document.getRootElement();\n assertTrue(rootElement.getName().equals(\"serialized\"));\n assertNotNull(rootElement.getChildren());\n\n List objList = rootElement.getChildren();\n assertNotNull(objList);\n assertNotNull(objList.get(0));\n\n Element objElement = (Element) objList.get(0);\n assertTrue(objElement.getName().equals(\"object\"));\n assertNotNull(objElement.getAttribute(\"class\"));\n assertNotNull(objElement.getAttribute(\"id\"));\n assertNull(objElement.getAttribute(\"length\"));\n assertEquals(\"0\", objElement.getAttributeValue(\"id\"));\n assertNotNull(objElement.getChildren());\n\n\n List objContents = objElement.getChildren();\n for (int i =0; i < objContents.size(); i++){\n Element contentElement = (Element) objContents.get(i);\n assertEquals(null, contentElement.getAttributeValue(\"declaringclass\"));\n assertNotNull(contentElement.getValue());\n\n if(contentElement.getName().equals(\"simpleInt\"))\n assertEquals(\"1\", contentElement.getValue());\n if(contentElement.getName().equals((\"simpleDouble\")))\n assertEquals(\"1.0\", contentElement.getValue());\n if(contentElement.getName().equals(\"simpleFloat\"))\n assertEquals(\"1\", contentElement.getValue());\n if(contentElement.getName().equals((\"simpleByte\")))\n assertEquals(\"1\", contentElement.getValue());\n }\n }", "public abstract OMElement serialize();", "@Override\r\n\t\t\tpublic void serializar() {\n\r\n\t\t\t}", "public Structure getStructure() {\n/* 3557 */ return this.structure;\n/* */ }", "private void split () {\n\n if (firstClassList != null && firstClassList.size() > MAX_OBJECTS && depth < MAX_DEPTH) {\n\n // Set new bounds along each axis\n double[] xBounds = new double[] {bounds.getMinX(), bounds.getCenterX(), bounds.getMaxX()};\n double[] yBounds = new double[] {bounds.getMinY(), bounds.getCenterY(), bounds.getMaxY()};\n double[] zBounds = new double[] {bounds.getMinZ(), bounds.getCenterZ(), bounds.getMaxZ()};\n\n // Create each child\n children = new SceneOctTree[8];\n for (int x = 0; x <= 1; x++) {\n for (int y = 0; y <= 1; y++) {\n for (int z = 0; z <= 1; z++) {\n Bounds childBounds = new BoundingBox (\n xBounds[x], yBounds[y], zBounds[z],\n xBounds[x+1] - xBounds[x], yBounds[y+1] - yBounds[y], zBounds[z+1] - zBounds[z]\n );\n int index = x + y*2 + z*4;\n children[index] = new SceneOctTree (childBounds, this.depth+1);\n } // for\n } // for\n } // for\n\n // Insert first class objects into children. Note that we don't know\n // if the object will be first or second class in the child so we have\n // to perform a full insert.\n for (Node object : firstClassList) {\n Bounds objectBounds = object.getBoundsInLocal();\n for (SceneOctTree child : children) {\n if (objectBounds.intersects (child.bounds))\n child.insert (object);\n } // for\n } // for\n firstClassList = null;\n\n // Insert second class objects into children (if any exist). We know\n // that the object will be second class in the child, so we just\n // perform a second class insert.\n if (secondClassList != null) {\n for (Node object : secondClassList) {\n Bounds objectBounds = object.getBoundsInLocal();\n for (SceneOctTree child : children) {\n if (objectBounds.intersects (child.bounds))\n child.insertSecondClass (object, objectBounds);\n } // for\n } // for\n } // if\n secondClassList = null;\n\n // Perform a split on the children, just in case all the first class\n // objects that we just inserted all went into one child.\n for (SceneOctTree child : children) child.split();\n\n } // if\n\n }", "public TreeNode deserialize(StringBuilder data) {\r\n //分成两组\r\n \tHashMap<Integer,Integer> showMapAct = new HashMap<>();\r\n \tStringBuilder[] result = data.split(\"k\");\r\n \t//deal with showMapAct\r\n \tif(result.length==1 || result[1].length()==0){\r\n \t}\r\n \telse{\r\n \t\tStringBuilder[] extraInfo = result[1].split(\",\");\r\n \t\tfor(int i = 0; i < extraInfo.length;i++){\r\n \t\t\tStringBuilder[] temp = extraInfo[i].split(\":\");\r\n \t\t\tshowMapAct.put(Integer.valueOf(temp[0]),Integer.valueOf(temp[1]));\r\n \t\t}///////\r\n \t}\r\n \tStringBuilder[] nums = result[0].split(\",\");\r\n \tint[] preOrder = new int[nums.length/2];\r\n \tint[] inOrder = new int[nums.length/2];\r\n \tinitArray(preOrder,nums,0,nums.length/2);\r\n \tinitArray(inOrder,nums,nums.length/2,nums.length);\r\n \treturn constructTree(preOrder,0,preOrder.length,inOrder,0,inOrder.length,showMapAct);\r\n }", "@Test\n public void testSerDeserTree() {\n\n TreeSerDeser.Node node0 = new TreeSerDeser.Node('A');\n TreeSerDeser.Node node1 = new TreeSerDeser.Node('B');\n TreeSerDeser.Node node2 = new TreeSerDeser.Node('C');\n TreeSerDeser.Node node3 = new TreeSerDeser.Node('D');\n TreeSerDeser.Node node4 = new TreeSerDeser.Node('E');\n TreeSerDeser.Node node5 = new TreeSerDeser.Node('F');\n TreeSerDeser.Node node6 = new TreeSerDeser.Node('G');\n TreeSerDeser.Node node7 = new TreeSerDeser.Node('H');\n TreeSerDeser.Node node8 = new TreeSerDeser.Node('I');\n TreeSerDeser.Node node9 = new TreeSerDeser.Node('J');\n TreeSerDeser.Node node10 = new TreeSerDeser.Node('K');\n node0.children.addAll(Arrays.asList(node1, node2, node3));\n node1.children.addAll(Arrays.asList(node4, node5));\n node3.children.addAll(Arrays.asList(node6, node7, node8, node9));\n node4.children.add(node10);\n\n String result = TreeSerDeser.serializeTree(node0);\n System.out.println(result);\n TreeSerDeser.Node root = TreeSerDeser.deserializeTree(result);\n System.out.println(TreeSerDeser.serializeTree(root));\n\n StringBuffer sb = new StringBuffer();\n TreeSerDeser.serializeTreeRecursively(node0, sb);\n System.out.println(sb.toString());\n\n TreeSerDeser.Counter counter = new TreeSerDeser.Counter();\n root = TreeSerDeser.deserializeTreeRecursively(sb.toString(), counter);\n sb = new StringBuffer();\n TreeSerDeser.serializeTreeRecursively(root, sb);\n System.out.println(sb.toString());\n }", "public void writeObject( Container.ContainerOutputStream cos ) throws SerializationException;", "private boolean isSerializable(FieldDescriptor childFd, Object object)\n \t\t\tthrows SIMPLTranslationException\n \t{\n \t\tswitch (childFd.getType())\n \t\t{\n \t\tcase SCALAR:\n \t\t\tif (childFd.isDefaultValueFromContext(object))\n \t\t\t\treturn false;\n \t\t\tbreak;\n \t\tcase COMPOSITE_ELEMENT:\n \t\tcase COLLECTION_ELEMENT:\n \t\tcase MAP_ELEMENT:\n \t\t\tObject obj = childFd.getObject(object);\n \t\t\tif (obj == null)\n \t\t\t\treturn false;\n \t\t\tbreak;\n \t\tcase COLLECTION_SCALAR:\n \t\tcase MAP_SCALAR:\n\t\t\tObject scalarCollectionObject = childFd.getObject(object);\n\t\t\tCollection<?> scalarCollection = XMLTools.getCollection(scalarCollectionObject);\n \t\t\tif (scalarCollection == null || scalarCollection.size() <= 0)\n \t\t\t\treturn false;\n \t\t\tbreak;\n \t\t}\n \n \t\treturn true;\n \t}", "private RFCMessageStructure pushPartsStack (final RFCMessageStructure curPart)\n throws UnsupportedEncodingException\n {\n if (null == curPart)\n return null;\n\n final String mmb=curPart.isMIMEBoundarySet() ? curPart.getMIMEBoundary() : curPart.extractMIMEBoundary(true);\n if ((mmb != null) && (mmb.length() > 0))\n _mmDelimiter.setBoundary(mmb);\n\n // if we have a MIME boundary then we need to parse a multipart message\n if (_mmDelimiter.isBoundarySet())\n _topParts.push(curPart);\n\n if (curPart.isRootPart() || curPart.isCompoundPart())\n return curPart;\n\n final RFCMessageStructure newPart=new RFCMessageStructure();\n newPart.setPartId(RFCMessageStructure.getNextPartId(curPart));\n newPart.setParent(curPart);\n newPart.setHeadersStartOffset(_streamOffset);\n\n return newPart;\n }", "public StructExprRecog restruct() throws InterruptedException {\n if (Thread.currentThread().isInterrupted()) {\n throw new InterruptedException();\n }\n if (mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) {\n return this; // basic element return this to save computing time and space\n } else if (mlistChildren.size() == 0) {\n StructExprRecog ser = new StructExprRecog(mbarrayBiValues);\n ser.setSERPlace(this);\n ser.setSimilarity(0); // type unknown, similarity is 0.\n return ser;\n } else if (mlistChildren.size() == 1 && mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) {\n // if a matrix, we cannot convert [x] -> x (e.g. 2 * [2 + 3] -> 2 * 2 + 3 is wrong).\n StructExprRecog ser = mlistChildren.getFirst().restruct();\n return ser;\n } else if (mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT || mnExprRecogType == EXPRRECOGTYPE_HCUTCAP\n || mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER || mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER\n || mnExprRecogType == EXPRRECOGTYPE_HLINECUT || mnExprRecogType == EXPRRECOGTYPE_MULTIEXPRS\n || mnExprRecogType == EXPRRECOGTYPE_GETROOT || mnExprRecogType == EXPRRECOGTYPE_VCUTMATRIX) {\n // assume horizontal cut is always clear before call restruct, i.e. hblank, hcap, hunder, hcapunder are not confused.\n // there is a special case for HBlankCut, Under and cap cut (handwriting divide may miss recognized).\n StructExprRecog[] serarrayNoLnDe = new StructExprRecog[3];\n boolean bIsDivide = isActuallyHLnDivSER(this, serarrayNoLnDe); //need to do it here as well as in vertical restruct \n\n StructExprRecog serReturn = new StructExprRecog(mbarrayBiValues);\n LinkedList<StructExprRecog> listCuts = new LinkedList<StructExprRecog>();\n if (bIsDivide) {\n listCuts.add(serarrayNoLnDe[0].restruct());\n listCuts.add(serarrayNoLnDe[1].restruct());\n listCuts.add(serarrayNoLnDe[2].restruct());\n } else {\n for (StructExprRecog ser : mlistChildren) {\n listCuts.add(ser.restruct());\n }\n }\n if (listCuts.getFirst().getExprRecogType() == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n && listCuts.getFirst().isPossibleVLnChar()\n && listCuts.getLast().getExprRecogType() == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n && listCuts.getLast().isPossibleVLnChar()\n && (bIsDivide || mnExprRecogType == EXPRRECOGTYPE_HLINECUT) // is actually H-line cut.\n && mnWidth >= ConstantsMgr.msdPlusHeightWidthRatio * mnHeight\n && mnWidth <= mnHeight / ConstantsMgr.msdPlusHeightWidthRatio\n && listCuts.getFirst().mnHeight >= ConstantsMgr.msdPlusTopVLnBtmVLnRatio * listCuts.getLast().mnHeight\n && listCuts.getFirst().mnHeight <= listCuts.getLast().mnHeight / ConstantsMgr.msdPlusTopVLnBtmVLnRatio\n && listCuts.getFirst().mnLeft < listCuts.getLast().getRight()\n && listCuts.getFirst().getRight() > listCuts.getLast().mnLeft\n && listCuts.getFirst().getBottomPlus1() >= listCuts.get(1).mnTop\n && listCuts.getLast().mnTop <= listCuts.get(1).getBottomPlus1()) { // the shape of this ser should match +\n // seems like a + instead of 1/1\n double dSimilarity = (listCuts.getFirst().getArea() * listCuts.getFirst().mdSimilarity\n + listCuts.get(1).getArea() * listCuts.get(1).mdSimilarity\n + listCuts.getLast().getArea() * listCuts.getLast().mdSimilarity)\n / (listCuts.getFirst().getArea() + listCuts.get(1).getArea() + listCuts.getLast().getArea()); // total area should not be zero here.\n // now we merge the three parts into +\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopTop = listCuts.getFirst().getImageChop(false);\n listParts.add(imgChopTop);\n ImageChop imgChopHLn = listCuts.get(1).getImageChop(false);\n listParts.add(imgChopHLn);\n ImageChop imgChopBottom = listCuts.getLast().getImageChop(false);\n listParts.add(imgChopBottom);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serReturn.setStructExprRecog(UnitProtoType.Type.TYPE_ADD, UNKNOWN_FONT_TYPE, mnLeft, mnTop, mnWidth, mnHeight, imgChop4SER, dSimilarity);\n } else if (bIsDivide) {\n // is actually an h line cut, i.e. div.\n serReturn.setStructExprRecog(listCuts, EXPRRECOGTYPE_HLINECUT);\n } else {\n serReturn.setStructExprRecog(listCuts, mnExprRecogType);\n serReturn = serReturn.identifyHSeperatedChar(); // special treatment for like =, i, ... \n if (serReturn.mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) {\n serReturn = serReturn.identifyStrokeBrokenChar(); // convert like 7 underline to 2.\n }\n }\n \n return serReturn;\n } else { // listcut, vblankcut, vcutlefttop, vcutlower, vcutupper, vcutlowerupper\n // the children are vertically cut. if cut mode is LISTCUT, also treated as vertically cut.\n // make the following assumptions for horizontally cut children\n // 1. the h-cut modes have been clear (i.e. normal horizontally cut, cap, undercore etc)\n // 2. the getroot, vcutmatrix and multiexprs have been clear.\n // 3. the v-cut modes are not clear\n \n // step 1. merge all the vertically cut children into main mlistChildren, and for all h-blank cut children, merge all of its h-blank cut\n // into itself.\n LinkedList<StructExprRecog> listMergeVCutChildren1 = new LinkedList<StructExprRecog>();\n listMergeVCutChildren1.addAll(mlistChildren);\n LinkedList<StructExprRecog> listMergeVCutChildren = new LinkedList<StructExprRecog>();\n boolean bHasVCutChild = true;\n while(bHasVCutChild) {\n bHasVCutChild = false;\n for (int idx = 0; idx < listMergeVCutChildren1.size(); idx ++) {\n if (/*listMergeVCutChildren1.get(idx).mnExprRecogType == EXPRRECOGTYPE_LISTCUT // treat list cut like vblankcut only when we print its value to string\n || */listMergeVCutChildren1.get(idx).isVCutNonMatrixType()) {\n for (int idx1 = 0; idx1 < listMergeVCutChildren1.get(idx).mlistChildren.size(); idx1 ++) {\n if (/*listMergeVCutChildren1.get(idx).mlistChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_LISTCUT // treat list cut like vblankcut only when we print its value to string\n || */listMergeVCutChildren1.get(idx).mlistChildren.get(idx1).isVCutNonMatrixType()) {\n bHasVCutChild = true;\n }\n int idx2 = listMergeVCutChildren.size() - 1;\n StructExprRecog serToAdd = listMergeVCutChildren1.get(idx).mlistChildren.get(idx1);\n for (; idx2 >= 0; idx2 --) {\n double dListChildCentral = listMergeVCutChildren.get(idx2).mnLeft + listMergeVCutChildren.get(idx2).mnWidth / 2.0;\n double dToAddCentral = serToAdd.mnLeft + serToAdd.mnWidth / 2.0;\n if (dListChildCentral < dToAddCentral) {\n break;\n }\n }\n listMergeVCutChildren.add(idx2 + 1, serToAdd);\n }\n // do not consider hblankcut list size == 1 case because it is impossible.\n } else {\n int idx2 = listMergeVCutChildren.size() - 1;\n StructExprRecog serToAdd = listMergeVCutChildren1.get(idx);\n for (; idx2 >= 0; idx2 --) {\n double dListChildCentral = listMergeVCutChildren.get(idx2).mnLeft + listMergeVCutChildren.get(idx2).mnWidth / 2.0;\n double dToAddCentral = serToAdd.mnLeft + serToAdd.mnWidth / 2.0;\n if (dListChildCentral < dToAddCentral) {\n break;\n }\n }\n listMergeVCutChildren.add(idx2 + 1, serToAdd);\n }\n }\n if (bHasVCutChild) {\n listMergeVCutChildren1.clear();\n listMergeVCutChildren1 = listMergeVCutChildren;\n listMergeVCutChildren = new LinkedList<StructExprRecog>();\n }\n }\n \n for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) {\n StructExprRecog serChild = listMergeVCutChildren.get(idx);\n if (serChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n LinkedList<StructExprRecog> listHBlankCutChildren1 = new LinkedList<StructExprRecog>();\n listHBlankCutChildren1.addAll(serChild.mlistChildren);\n LinkedList<StructExprRecog> listHBlankCutChildren = new LinkedList<StructExprRecog>();\n boolean bHasHBlankCutChild = true;\n while(bHasHBlankCutChild) {\n bHasHBlankCutChild = false;\n for (int idx0 = 0; idx0 < listHBlankCutChildren1.size(); idx0 ++) {\n if (listHBlankCutChildren1.get(idx0).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n for (int idx1 = 0; idx1 < listHBlankCutChildren1.get(idx0).mlistChildren.size(); idx1 ++) {\n if (listHBlankCutChildren1.get(idx0).mlistChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n bHasHBlankCutChild = true;\n }\n listHBlankCutChildren.add(listHBlankCutChildren1.get(idx0).mlistChildren.get(idx1));\n }\n } else {\n listHBlankCutChildren.add(listHBlankCutChildren1.get(idx0));\n }\n }\n if (bHasHBlankCutChild) {\n listHBlankCutChildren1.clear();\n listHBlankCutChildren1 = listHBlankCutChildren;\n listHBlankCutChildren = new LinkedList<StructExprRecog>();\n }\n }\n StructExprRecog serNewChild = new StructExprRecog(serChild.mbarrayBiValues);\n serNewChild.setStructExprRecog(listHBlankCutChildren, EXPRRECOGTYPE_HBLANKCUT);\n listMergeVCutChildren.set(idx, serNewChild);\n }\n }\n\n // step 2: identify upper notes or lower notes, This is raw upper lower identification procedure. h-cut\n // children are not analyzed.\n LinkedList<Integer> listCharLevel = new LinkedList<Integer>();\n LinkedList<Integer> list1SideAnchorBaseIdx = new LinkedList<Integer>();\n // first of all, find out the highest child which must be base\n int nBiggestChildHeight = 0;\n int nBiggestChildIdx = 0;\n int nHighestNonHDivChildHeight = -1;\n int nHighestNonHDivChildIdx = -1;\n for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) {\n if (listMergeVCutChildren.get(idx).mnHeight > nBiggestChildHeight) {\n nBiggestChildIdx = idx;\n nBiggestChildHeight = listMergeVCutChildren.get(idx).mnHeight;\n }\n if (isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx)) == false\n && listMergeVCutChildren.get(idx).mnHeight > nHighestNonHDivChildHeight) {\n // non-hdiv child could be cap or under.\n nHighestNonHDivChildIdx = idx;\n nHighestNonHDivChildHeight = listMergeVCutChildren.get(idx).mnHeight;\n }\n }\n boolean bHasNonHDivBaseChild = false;\n // ok, if we have a non h-div child, biggest child is the biggest non h-div child. Otherwise, use biggest child.\n if (nHighestNonHDivChildIdx >= 0) {\n nBiggestChildHeight = nHighestNonHDivChildHeight;\n nBiggestChildIdx = nHighestNonHDivChildIdx;\n bHasNonHDivBaseChild = true;\n }\n \n listCharLevel.add(0);\n list1SideAnchorBaseIdx.add(nBiggestChildIdx);\n \n // from highest child to right\n StructExprRecog serBiggestChild = listMergeVCutChildren.get(nBiggestChildIdx);\n BLUCharIdentifier bluCIBiggest = new BLUCharIdentifier(serBiggestChild);\n BLUCharIdentifier bluCI = bluCIBiggest.clone();\n int nLastBaseHeight = listMergeVCutChildren.get(nBiggestChildIdx).mnHeight;\n for (int idx = nBiggestChildIdx + 1; idx < listMergeVCutChildren.size(); idx ++) {\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n if (idx > nBiggestChildIdx + 1 // if idx == nBiggestChildIdx + 1, we have already used the bluCIBiggest.\n && ((bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getLast() == 0\n && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1)))\n || (!bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getLast() == 0))) {\n StructExprRecog serBase = listMergeVCutChildren.get(idx - 1);\n bluCI.setBLUCharIdentifier(serBase);\n nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight;\n list1SideAnchorBaseIdx.add(idx - 1);\n } else {\n list1SideAnchorBaseIdx.add(list1SideAnchorBaseIdx.getLast());\n }\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n\n // only from left to right we do the following work.\n if (thisCharLevel == 0 && listCharLevel.size() > 0\n && ((listCharLevel.getLast() != 0\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight)\n || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base / listMergeVCutChildren.get(idx - 1).mlistChildren.size() >= ser.mnHeight))\n ) {\n // to see if it could be upper lower note or lower upper note.\n if (listCharLevel.getLast() == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) {\n thisCharLevel = 1;\n } else if (listCharLevel.getLast() == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) {\n thisCharLevel = -1;\n } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type.\n // first of all, find out which h-blank-div child is closest to it.\n int nMinDistance = Integer.MAX_VALUE;\n int nMinDistanceIdx = 0;\n double dAvgChildHeight = 0;\n for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) {\n int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1()\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1());\n if (nDistance <= nMinDistance) { // allow a little bit overhead\n nMinDistance = nDistance;\n nMinDistanceIdx = idx2;\n }\n dAvgChildHeight += listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnHeight;\n }\n dAvgChildHeight /= listMergeVCutChildren.get(idx - 1).mlistChildren.size();\n if (dAvgChildHeight * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) {\n StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx);\n int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild);\n if (thisHCutChildCharLevel == 0) {\n // this char level is calculated from its closest last ser if it is base.\n BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild);\n thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser);\n } else {\n thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base.\n }\n }\n }\n }\n listCharLevel.add(thisCharLevel);\n }\n \n // from highest char to left\n bluCI = bluCIBiggest.clone();\n for (int idx = nBiggestChildIdx - 1; idx >= 0; idx --) {\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n if ((bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getFirst() == 0\n && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx + 1)))\n || (!bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getFirst() == 0)) {\n StructExprRecog serBase = listMergeVCutChildren.get(idx + 1);\n bluCI.setBLUCharIdentifier(serBase);\n list1SideAnchorBaseIdx.addFirst(idx + 1);\n } else {\n list1SideAnchorBaseIdx.addFirst(list1SideAnchorBaseIdx.getFirst());\n }\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n listCharLevel.addFirst(thisCharLevel);\n }\n \n // from left to highest char\n bluCI = bluCIBiggest.clone();\n nLastBaseHeight = 0;// to avoid the first char misrecognized to note instead of base,\n // do not use listMergeVCutChildren.get(nBiggestChildIdx).mnHeight;\n // however, from right to left identification can still misrecognize it to note\n // so we need further check later on.\n for (int idx = 1; idx < nBiggestChildIdx; idx ++) {\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n if ((bHasNonHDivBaseChild && listCharLevel.get(idx - 1) == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1)))\n || (!bHasNonHDivBaseChild && listCharLevel.get(idx - 1) == 0)) { // base char\n StructExprRecog serBase = listMergeVCutChildren.get(idx - 1);\n bluCI.setBLUCharIdentifier(serBase);\n nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight;\n }\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n \n // only from left to right we do the following work.\n if (thisCharLevel == 0 && idx > 0\n && (listCharLevel.get(idx - 1) != 0\n || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1))\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) {\n // to see if it could be upper lower note or lower upper note.\n if (listCharLevel.get(idx - 1) == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) {\n thisCharLevel = 1;\n } else if (listCharLevel.get(idx - 1) == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) {\n thisCharLevel = -1;\n } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type.\n // first of all, find out which h-blank-div child is closest to it.\n int nMinDistance = Integer.MAX_VALUE;\n int nMinDistanceIdx = 0;\n for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) {\n int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1()\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1());\n if (nDistance <= nMinDistance) { // allow a little bit overhead\n nMinDistance = nDistance;\n nMinDistanceIdx = idx2;\n }\n }\n StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx);\n int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild);\n if (thisHCutChildCharLevel == 0) {\n // this char level is calculated from its closest last ser if it is base.\n BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild);\n thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser);\n } else {\n thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base.\n }\n }\n }\n int nLastSideAnchorBaseType = listMergeVCutChildren.get(list1SideAnchorBaseIdx.get(idx)).mnExprRecogType;\n int nThisSideAnchorBaseType = bluCI.mserBase.mnExprRecogType;\n if (listCharLevel.get(idx) != thisCharLevel) {\n if ((nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAP\n || nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTUNDER\n || nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAPUNDER)\n && (nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAP\n && nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTUNDER\n && nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAPUNDER)) {\n // h-cut is always not accurate\n listCharLevel.set(idx, thisCharLevel);\n } else if ((nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAP\n || nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTUNDER\n || nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAPUNDER)\n && (nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAP\n && nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTUNDER\n && nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAPUNDER)) {\n // do not change.\n } else if (listCharLevel.get(idx) == 0) { // if from one side this char is not base char, then it is not base char\n listCharLevel.set(idx, thisCharLevel);\n } else if (thisCharLevel != 0) { // if one side is 1 while the other side is - 1, then use left side value\n listCharLevel.set(idx, thisCharLevel);\n } else if (listCharLevel.get(idx) != 0 && list1SideAnchorBaseIdx.get(idx) > idx + 1) {\n // if see from right this ser is a note and right anchor is not next to this ser, we use left side value.\n listCharLevel.set(idx, thisCharLevel);\n }\n }\n }\n \n // from right to highest char seems not necessary.\n \n boolean bNeedReidentifyFirst = false;\n // now the first child may be misrecognized to be -1 or 1, correct it and reidentify char level from 0 to the original first base\n if (listCharLevel.getFirst() == -1\n && (listMergeVCutChildren.size() < 2 // only have one child, so it has to be base\n || listMergeVCutChildren.getFirst().mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE // could be base of base**something\n || ((listMergeVCutChildren.getFirst().isLetterChar() || listMergeVCutChildren.getFirst().isNumberChar())\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTUNDER))) { // could be base of base ** something\n listCharLevel.set(0, 0);\n bNeedReidentifyFirst = true;\n } else if (listCharLevel.getFirst() == 1) {\n boolean bIsRoot = true, bIsTemperature = true;\n int idx = 1;\n for (; idx < listCharLevel.size(); idx ++) {\n if (listCharLevel.get(idx) != 1) {\n break;\n }\n }\n if (idx == listCharLevel.size() || listCharLevel.get(idx) != 0\n || listMergeVCutChildren.get(idx).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_GETROOT) {\n bIsRoot = false;\n }\n if (listMergeVCutChildren.size() < 2\n || listMergeVCutChildren.getFirst().mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n || (listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_SMALL_O\n && listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_BIG_O\n && listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_ZERO)\n || listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n || (listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_SMALL_C\n && listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_BIG_C\n && listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_BIG_F)) {\n bIsTemperature = false;\n }\n if (!bIsRoot && !bIsTemperature // if root or temperature, then it should be upper note\n && (listMergeVCutChildren.size() < 2 // only have one child, so it has to be base\n || (listMergeVCutChildren.getFirst().mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n && listMergeVCutChildren.getFirst().isLetterChar()\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAP\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER) // could be base_something\n )) {\n listCharLevel.set(0, 0);\n bNeedReidentifyFirst = true;\n }\n }\n if (bNeedReidentifyFirst) {\n \n int idx = 1;\n while (idx < listMergeVCutChildren.size()) {\n if ((listCharLevel.get(idx - 1) == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1)))\n || ((idx - 1) == 0)) { // base char can be anchor or first ser\n StructExprRecog serBase = listMergeVCutChildren.get(idx - 1);\n bluCI.setBLUCharIdentifier(serBase);\n nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight;\n }\n\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n\n // only from left to right we do the following work.\n if (thisCharLevel == 0 && idx > 0\n && (listCharLevel.get(idx - 1) != 0\n || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1))\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) {\n // to see if it could be upper lower note or lower upper note.\n if (listCharLevel.get(idx - 1) == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) {\n thisCharLevel = 1;\n } else if (listCharLevel.get(idx - 1) == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) {\n thisCharLevel = -1;\n } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type.\n // first of all, find out which h-blank-div child is closest to it.\n int nMinDistance = Integer.MAX_VALUE;\n int nMinDistanceIdx = 0;\n for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) {\n int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1()\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1());\n if (nDistance <= nMinDistance) { // allow a little bit overhead\n nMinDistance = nDistance;\n nMinDistanceIdx = idx2;\n }\n }\n StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx);\n int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild);\n if (thisHCutChildCharLevel == 0) {\n // this char level is calculated from its closest last ser if it is base.\n BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild);\n thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser);\n } else {\n thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base.\n }\n }\n }\n if (listCharLevel.get(idx) != thisCharLevel) {\n // do not consider the impact seen from the other side, even the other side is root or Fahranheit or celcius\n // this is because if the other side is root or Fahrenheit or celcius, if this level is -1, then it is -1\n // anyway, if it is 0, because the left most should not be 1 seen from the other side, so doesn't matter\n // if it is 1, then Fahranheit and celcius and root can handle.\n listCharLevel.set(idx, thisCharLevel);\n } else if (thisCharLevel == 0) {\n break; // this char level is base and is the same as before adjusting, so no need to go futher.\n }\n idx ++;\n }\n // need not to go through from right to left again.\n }\n \n // step 3. idenitify the mode: matrix mode, multi-expr mode or normal mode\n LinkedList<StructExprRecog> listMergeMatrixMExprs = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listMergeMMLevel = new LinkedList<Integer>();\n for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) {\n if (listCharLevel.get(idx) == 0) {\n //restruct hdivs first, change like hcap(cap, hblank) to hblank(hcap, ...).\n // otherwise, multi expressions can not be correctly identified.\n StructExprRecog serPreRestructedHCut = preRestructHDivSer4MatrixMExprs(listMergeVCutChildren.get(idx));\n if (serPreRestructedHCut != listMergeVCutChildren.get(idx)) {\n listMergeVCutChildren.set(idx, serPreRestructedHCut);\n }\n }\n }\n lookForMatrixMExprs(listMergeVCutChildren, listCharLevel, listMergeMatrixMExprs, listMergeMMLevel);\n \n // step 4: identify upper notes or lower notes.\n LinkedList<StructExprRecog> listBaseULIdentified = new LinkedList<StructExprRecog>();\n listCharLevel.clear();\n int idx0 = 0;\n // step 1: find the first real base ser, real base means a base ser which would be better if it is not hblankcut\n for (; idx0 < listMergeMatrixMExprs.size(); idx0 ++) {\n if (listMergeMMLevel.get(idx0) == 0 && listMergeMatrixMExprs.get(idx0).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HBLANKCUT) {\n break;\n }\n }\n if (idx0 == listMergeMatrixMExprs.size()) {\n // no non-hblankcut base, so find hblankcut base instead.\n for (idx0 = 0; idx0 < listMergeMatrixMExprs.size(); idx0 ++) {\n if (listMergeMMLevel.get(idx0) == 0) {\n break;\n }\n }\n }\n // there should be a base, so we need not to worry about idx0 == listMergeMatrixMExprs.size()\n int nIdxFirstBaseChar = idx0;\n for (idx0 = 0; idx0 <= nIdxFirstBaseChar; idx0 ++) {\n listBaseULIdentified.add(listMergeMatrixMExprs.get(idx0));\n listCharLevel.add(listMergeMMLevel.get(idx0));\n }\n \n for (; idx0 < listMergeMatrixMExprs.size(); idx0 ++) {\n StructExprRecog ser = listMergeMatrixMExprs.get(idx0);\n if (idx0 > 0 && listCharLevel.getLast() == 0) {\n StructExprRecog serBase = listBaseULIdentified.getLast();\n bluCI.setBLUCharIdentifier(serBase);\n }\n if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n ser = ser.identifyHSeperatedChar(); // find out if they are special char or not. have to do it here before child restruct coz if it is =, its position may change later.\n }\n if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n StructExprRecog[] serarrayNoLnDe = new StructExprRecog[3];\n boolean bIsDivide = isActuallyHLnDivSER(ser, serarrayNoLnDe); //need to do it here as well as in h-cut restruct because h-cut restruct may for independent h-cut ser so never come here.\n if (bIsDivide) {\n LinkedList<StructExprRecog> listCuts = new LinkedList<StructExprRecog>();\n listCuts.add(serarrayNoLnDe[0].restruct());\n listCuts.add(serarrayNoLnDe[1].restruct());\n listCuts.add(serarrayNoLnDe[2].restruct());\n ser.setStructExprRecog(listCuts, EXPRRECOGTYPE_HLINECUT);\n }\n }\n if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { // special treatment for hblankcut\n LinkedList<StructExprRecog> listSerTopParts = new LinkedList<StructExprRecog>();\n LinkedList<StructExprRecog> listSerBaseParts = new LinkedList<StructExprRecog>();\n LinkedList<StructExprRecog> listSerBottomParts = new LinkedList<StructExprRecog>();\n for (int idx1 = 0; idx1 < ser.mlistChildren.size(); idx1 ++) {\n StructExprRecog serChild = ser.mlistChildren.get(idx1);\n if (bluCI.isUpperNote(serChild)) {\n listSerTopParts.add(serChild);\n } else if (bluCI.isLowerNote(serChild)) {\n listSerBottomParts.add(serChild);\n } else {\n listSerBaseParts.add(serChild);\n }\n }\n // add the parts into base-upper-lower list following the order bottom->top->base.\n if (listSerBottomParts.size() > 0) {\n StructExprRecog serChildBottomPart = new StructExprRecog(ser.getBiArray());\n if (listSerBottomParts.size() == 1) {\n serChildBottomPart = listSerBottomParts.getFirst();\n } else {\n serChildBottomPart.setStructExprRecog(listSerBottomParts, EXPRRECOGTYPE_HBLANKCUT);\n }\n listBaseULIdentified.add(serChildBottomPart);\n listCharLevel.add(-1);\n }\n if (listSerTopParts.size() > 0) {\n StructExprRecog serChildTopPart = new StructExprRecog(ser.getBiArray());\n if (listSerTopParts.size() == 1) {\n serChildTopPart = listSerTopParts.getFirst();\n } else {\n serChildTopPart.setStructExprRecog(listSerTopParts, EXPRRECOGTYPE_HBLANKCUT);\n }\n listBaseULIdentified.add(serChildTopPart);\n listCharLevel.add(1);\n }\n if (listSerBaseParts.size() > 0) {\n StructExprRecog serChildBasePart = new StructExprRecog(ser.getBiArray());\n if (listSerBaseParts.size() == 1) {\n serChildBasePart = listSerBaseParts.getFirst();\n } else {\n serChildBasePart.setStructExprRecog(listSerBaseParts, EXPRRECOGTYPE_HBLANKCUT);\n }\n listBaseULIdentified.add(serChildBasePart);\n listCharLevel.add(0);\n }\n } else {\n listBaseULIdentified.add(ser);\n listCharLevel.add(listMergeMMLevel.get(idx0));\n }\n }\n \n // step 4.1 special treatment for upper or lower note divided characters like j, i is different coz very unlikely i's dot will be looked like a independent upper note.\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n if (listCharLevel.get(idx) != 0 || listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) {\n continue; // need to find base and the base has to be a single char.\n }\n StructExprRecog serBase = listBaseULIdentified.get(idx);\n if (idx < listBaseULIdentified.size() - 2 && listCharLevel.get(idx + 1) == -1 && listCharLevel.get(idx + 2) == 0\n && serBase.isPossibleNumberChar() && listBaseULIdentified.get(idx + 2).isPossibleNumberChar()) {\n // left and right are both number char, middle is a lower note\n StructExprRecog serPossibleDot = listBaseULIdentified.get(idx + 1);\n StructExprRecog serNextBase = listBaseULIdentified.get(idx + 2);\n double dWOverHThresh = ConstantsMgr.msdExtendableCharWOverHThresh / ConstantsMgr.msdCharWOverHMaxSkewRatio;\n if (serPossibleDot.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotHeight * serPossibleDot.mnHeight\n && serNextBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotHeight * serPossibleDot.mnHeight\n && serBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotWidth * serPossibleDot.mnWidth\n && serNextBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotWidth * serPossibleDot.mnWidth\n && serPossibleDot.mnWidth < dWOverHThresh * serPossibleDot.mnHeight\n && serPossibleDot.mnHeight < dWOverHThresh * serPossibleDot.mnWidth) {\n // serPossibleDot is a dot \n serPossibleDot.mType = UnitProtoType.Type.TYPE_DOT;\n }\n }\n if (serBase.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET\n || serBase.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET\n || serBase.mType == UnitProtoType.Type.TYPE_BIG_J\n || serBase.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE\n || serBase.mType == UnitProtoType.Type.TYPE_INTEGRATE\n || serBase.mType == UnitProtoType.Type.TYPE_SMALL_J_WITHOUT_DOT) {\n int idx1 = idx + 1;\n for (; idx1 < listBaseULIdentified.size(); idx1 ++) {\n if (listCharLevel.get(idx1) == 1) {\n break; // find the first upper note\n }\n }\n if (idx1 < listBaseULIdentified.size()\n && listBaseULIdentified.get(idx1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (listBaseULIdentified.get(idx1).mType == UnitProtoType.Type.TYPE_DOT // at this moment there is no dot multiply.\n || listBaseULIdentified.get(idx1).mType == UnitProtoType.Type.TYPE_STAR)\n && (listBaseULIdentified.get(idx1).mnLeft - serBase.getRightPlus1())\n < serBase.mnWidth * ConstantsMgr.msdSmallJDotVPlaceThresh // the left-right gap between dot and j main body has to be very small\n && (serBase.mnTop - listBaseULIdentified.get(idx1).getBottomPlus1())\n < serBase.mnHeight * ConstantsMgr.msdSmallJDotHPlaceThresh // the top-bottom gap between dot and j main body has to be very small\n && serBase.mnTop > listBaseULIdentified.get(idx1).getBottomPlus1()) { // main body must be low the dot\n StructExprRecog serSmallj = new StructExprRecog(serBase.mbarrayBiValues);\n int nLeft = Math.min(serBase.mnLeft, listBaseULIdentified.get(idx1).mnLeft);\n int nTop = Math.min(serBase.mnTop, listBaseULIdentified.get(idx1).mnTop);\n int nRightPlus1 = Math.max(serBase.getRightPlus1(), listBaseULIdentified.get(idx1).getRightPlus1());\n int nBottomPlus1 = Math.max(serBase.getBottomPlus1(), listBaseULIdentified.get(idx1).getBottomPlus1());\n int nTotalArea = serBase.getArea() + listBaseULIdentified.get(idx1).getArea();\n double dSimilarity = (serBase.getArea() * serBase.mdSimilarity\n + listBaseULIdentified.get(idx1).getArea() * listBaseULIdentified.get(idx1).mdSimilarity)/nTotalArea; // total area should not be zero here.\n // now we merge the two into small j and replace the seperated two sers with small j\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopTop = listBaseULIdentified.get(idx1).getImageChop(false);\n listParts.add(imgChopTop);\n ImageChop imgChopBase = serBase.getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serSmallj.setStructExprRecog(UnitProtoType.Type.TYPE_SMALL_J, UNKNOWN_FONT_TYPE, nLeft, nTop, nRightPlus1 - nLeft, nBottomPlus1 - nTop, imgChop4SER, dSimilarity);\n listBaseULIdentified.remove(idx1); // remove idx1 first because idx1 is after idx. Otherwise, will remove a wrong child.\n listBaseULIdentified.remove(idx);\n listCharLevel.remove(idx1); // remove idx1 first because idx1 is after idx. Otherwise, will remove a wrong child.\n listCharLevel.remove(idx);\n listBaseULIdentified.add(idx, serSmallj);\n listCharLevel.add(idx, 0);\n }\n }\n }\n \n // step 4.2, identify cap under\n // now we need to handle the cap and/or under notes for \\Sigma, \\Pi and \\Integrate\n // this is for the case that \\topunder{infinite, \\Sigma, n = 1} is misrecognized to\n // \\topunder{infinite, \\Sigma, n^=}_1, or \\topunder{1+2+3+4, \\integrate, 5+6+7+8+9}\n // is misrecognized to 1 + 5 ++26 \\topunder(+3, \\integrate, +} + 7+8++4+9.\n LinkedList<StructExprRecog> listCUIdentifiedBLU = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listCUIdentifiedCharLvl = new LinkedList<Integer>();\n int nLastCUBaseAreaIdx = -1;\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n StructExprRecog serBase = listBaseULIdentified.get(idx).getPrincipleSER(1);\n if ((listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER\n || listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP\n || listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)\n && listCharLevel.get(idx) == 0 && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serBase.mType == UnitProtoType.Type.TYPE_INTEGRATE\n || serBase.mType == UnitProtoType.Type.TYPE_BIG_SIGMA\n || serBase.mType == UnitProtoType.Type.TYPE_BIG_PI)\n && idx < listBaseULIdentified.size() - 1) {\n StructExprRecog serCap = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)?\n null:listBaseULIdentified.get(idx).mlistChildren.getFirst();\n int nWholeCapTop = (serCap==null)?0:serCap.mnTop;\n int nWholeCapBottomP1 = (serCap==null)?0:serCap.getBottomPlus1();\n StructExprRecog serUnder = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP)?\n null:listBaseULIdentified.get(idx).mlistChildren.getLast();\n int nWholeUnderTop = (serUnder==null)?0:serUnder.mnTop;\n int nWholeUnderBottomP1 = (serUnder==null)?0:serUnder.getBottomPlus1();\n LinkedList<StructExprRecog> listIdentifiedCap = new LinkedList<StructExprRecog>();\n if (serCap != null) {\n listIdentifiedCap.add(serCap);\n }\n LinkedList<StructExprRecog> listIdentifiedUnder = new LinkedList<StructExprRecog>();\n if (serUnder != null) {\n listIdentifiedUnder.add(serUnder);\n }\n int idx1 = idx - 1;\n // now go through its left side\n for (; idx1 > nLastCUBaseAreaIdx; idx1 --) {\n StructExprRecog serThis = listBaseULIdentified.get(idx1);\n if (listCharLevel.get(idx1) == 1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER // this character is a top level char and we have cap note\n && (serCap.mnLeft - serThis.getRightPlus1())\n <= Math.max(serCap.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.mnTop >= serThis.getBottomPlus1() // Base is below this which means this is a cap.\n && (Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1) - Math.min(serThis.mnTop, nWholeCapTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serCap.mnTop && serThis.mnTop > serCap.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n listIdentifiedCap.addFirst(serThis);\n serCap = serThis;\n nWholeCapTop = Math.min(serThis.mnTop, nWholeCapTop);\n nWholeCapBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1);\n } else if (listCharLevel.get(idx1) == -1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTCAP // this character is a bottom level char and we have under\n && (serUnder.mnLeft - serThis.getRightPlus1())\n <= Math.max(serUnder.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.getBottomPlus1() <= serThis.mnTop // Base is above this which means this is a under\n && (Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1) - Math.min(serThis.mnTop, nWholeUnderTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serUnder.mnTop && serThis.mnTop > serUnder.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n listIdentifiedUnder.addFirst(serThis);\n serUnder = serThis;\n nWholeUnderTop = Math.min(serThis.mnTop, nWholeUnderTop);\n nWholeUnderBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1);\n } else {\n break; // ok, we arrive at the left edge of this CUBase Area, exit.\n }\n }\n \n for (int idx2 = nLastCUBaseAreaIdx + 1; idx2 <= idx1; idx2 ++) {\n // so, now add the chars which are not belong to this cap under area.\n listCUIdentifiedBLU.add(listBaseULIdentified.get(idx2));\n listCUIdentifiedCharLvl.add(listCharLevel.get(idx2));\n }\n \n nLastCUBaseAreaIdx = idx;\n // now go through its right side\n serCap = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)?\n null:listBaseULIdentified.get(idx).mlistChildren.getFirst();\n serUnder = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP)?\n null:listBaseULIdentified.get(idx).mlistChildren.getLast();\n idx1 = idx + 1;\n for (; idx1 < listBaseULIdentified.size(); idx1 ++) {\n StructExprRecog serThis = listBaseULIdentified.get(idx1);\n if (listCharLevel.get(idx1) == 1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER // this character is a top level char and we have cap note\n && (serThis.mnLeft - serCap.getRightPlus1())\n <= Math.max(serCap.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.mnTop >= serThis.getBottomPlus1() // Base is below this which means this is a cap.\n && (Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1) - Math.min(serThis.mnTop, nWholeCapTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serCap.mnTop && serThis.mnTop > serCap.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n nLastCUBaseAreaIdx = idx1;\n listIdentifiedCap.add(serThis);\n serCap = serThis;\n nWholeCapTop = Math.min(serThis.mnTop, nWholeCapTop);\n nWholeCapBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1);\n } else if (listCharLevel.get(idx1) == -1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTCAP // this character is a bottom level char and we have under note\n && (serThis.mnLeft - serUnder.getRightPlus1())\n <= Math.max(serUnder.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.getBottomPlus1() <= serThis.mnTop // Base is above this which means this is a under\n && (Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1) - Math.min(serThis.mnTop, nWholeUnderTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serUnder.mnTop && serThis.mnTop > serUnder.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n nLastCUBaseAreaIdx = idx1;\n listIdentifiedUnder.add(serThis);\n serUnder = serThis;\n nWholeUnderTop = Math.min(serThis.mnTop, nWholeUnderTop);\n nWholeUnderBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1);\n } else {\n break; // ok, we arrive at the left edge of this CUBase Area, exit.\n }\n }\n // ok, now we have get all the cap parts and all the under parts,\n // it is time for us to reconstruct this SER and add it to the new BLU list.\n StructExprRecog serNewCap = null, serNewUnder = null, serNew;\n if (listIdentifiedCap.size() == 1) {\n serNewCap = listIdentifiedCap.getFirst();\n } else if (listIdentifiedCap.size() > 1) { // size > 1\n serNewCap = new StructExprRecog(serBase.mbarrayBiValues);\n serNewCap.setStructExprRecog(listIdentifiedCap, EXPRRECOGTYPE_VBLANKCUT);\n }\n if (listIdentifiedUnder.size() == 1) {\n serNewUnder = listIdentifiedUnder.getFirst();\n } else if (listIdentifiedUnder.size() > 1) { // size > 1\n serNewUnder = new StructExprRecog(serBase.mbarrayBiValues);\n serNewUnder.setStructExprRecog(listIdentifiedUnder, EXPRRECOGTYPE_VBLANKCUT);\n }\n LinkedList<StructExprRecog> listThisAllChildren = new LinkedList<StructExprRecog>();\n int nExprRecogType = EXPRRECOGTYPE_HCUTCAPUNDER;\n if (serNewCap != null) {\n listThisAllChildren.add(serNewCap);\n } else {\n nExprRecogType = EXPRRECOGTYPE_HCUTUNDER;\n }\n listThisAllChildren.add(serBase);\n if (serNewUnder != null) {\n listThisAllChildren.add(serNewUnder);\n } else {\n nExprRecogType = EXPRRECOGTYPE_HCUTCAP;\n }\n serNew = new StructExprRecog(serBase.mbarrayBiValues);\n serNew.setStructExprRecog(listThisAllChildren, nExprRecogType);\n listCUIdentifiedBLU.add(serNew);\n listCUIdentifiedCharLvl.add(0);\n // done! Now go to the next SER in listBaseULIdentified.\n idx = nLastCUBaseAreaIdx;\n }\n }\n // now we have arrive at the end of listBaseULIdentified. We need to go through from nLastCUBaseAreaIdx + 1 to here\n // and add the remaining parts into listCUIdentifiedBLU.\n for (int idx = nLastCUBaseAreaIdx + 1; idx < listBaseULIdentified.size(); idx ++) {\n // so, now add the chars which are not belong to this cap under area.\n listCUIdentifiedBLU.add(listBaseULIdentified.get(idx));\n listCUIdentifiedCharLvl.add(listCharLevel.get(idx));\n }\n // reset listBaseULIdentified and listCharLevel because they will be used latter on.\n listBaseULIdentified = listCUIdentifiedBLU;\n listCharLevel = listCUIdentifiedCharLvl;\n \n // step 4.3 : at last, trying to rectify some miss-identified char levels\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_EQUAL\n || listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_EQUAL_ALWAYS)\n && (idx > 0 && idx < listBaseULIdentified.size() - 1)\n && listCharLevel.get(idx) != 0\n && ((listCharLevel.get(idx - 1) == 0 && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx - 1).mnTop\n && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx - 1).getBottomPlus1())\n || (listCharLevel.get(idx + 1) == 0 && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx + 1).mnTop\n && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx + 1).getBottomPlus1())\n )\n ) {\n // if the character is = or always=, and its left or right char is a base char but it is not base char and this char is\n // in right position then change its char level to base char.\n listCharLevel.set(idx, 0);\n }\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_SUBTRACT) {\n // need not to convert low and small subtract to dot because we have done before.\n if (listCharLevel.get(idx) != 0 && (idx < listBaseULIdentified.size() - 1) && (listCharLevel.get(idx + 1) == 0)\n && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx + 1).mnTop\n + listBaseULIdentified.get(idx + 1).mnHeight * ConstantsMgr.msdSubtractVRangeAgainstNeighbourH\n && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx + 1).getBottomPlus1()\n - listBaseULIdentified.get(idx + 1).mnHeight * ConstantsMgr.msdSubtractVRangeAgainstNeighbourH\n && (listBaseULIdentified.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE\n || listBaseULIdentified.get(idx).mnWidth >= listBaseULIdentified.get(idx + 1).mnWidth * ConstantsMgr.msdSubtractWidthAgainstNeighbourW)) {\n // if the character is -, and its right char is a base char but it is an upper or lower note char and it's in right position\n // and its width is long enough, then change its char level to base char. do not use calculate char level because we have got\n // wrong information from calculate char level.\n listCharLevel.set(idx, 0);\n }\n }\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_DOT) {\n if (((idx < listBaseULIdentified.size() - 1)?(listCharLevel.get(idx + 1) == 0):true)\n && ((idx > 0)?(listCharLevel.get(idx - 1) == 0):true)) {\n if (listCharLevel.get(idx) == -1) {\n // if the character is \\dot, and its left and right char is a base char but it is an lower note char\n // then change its char level to base char.\n listCharLevel.set(idx, 0);\n } else if (listCharLevel.get(idx) == 0 && idx != 0 && idx != listBaseULIdentified.size() - 1) {\n // if the character is \\dot, and its left and right char is a base char and itself is also a base char\n // then it actually means multiply.\n listBaseULIdentified.get(idx).mType = UnitProtoType.Type.TYPE_DOT_MULTIPLY;\n }\n } else if (listCharLevel.get(idx) == 0 && idx > 0 && idx < listBaseULIdentified.size() - 1\n && listCharLevel.get(idx + 1) == 1 && listCharLevel.get(idx - 1) == 1) {\n // if the character is \\dot, and its left and right char is a upper note char and itself is a base char\n // then change its char level to upper note.\n listCharLevel.set(idx, 1);\n }\n }\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_DOT\n && listCharLevel.get(idx) == -1\n && ((idx < listBaseULIdentified.size() - 1)?(listCharLevel.get(idx + 1) == 0):true)\n && ((idx > 0)?(listCharLevel.get(idx - 1) == 0):true)) {\n // if the character is \\dot, and its left and right char is a base char but it is an lower note char\n // then change its char level to base char.\n listCharLevel.set(idx, 0);\n }\n // need not to consider a case like \\topunder{infinite, \\Sigma, n = 1} is misrecognized to\n // \\topunder{infinite, \\Sigma, n^=}_1. This kind of situation has been processed.\n }\n \n // step 5, since different levels have been well-sorted, we merge them.\n LinkedList<StructExprRecog> listBaseTrunk = new LinkedList<StructExprRecog>();\n LinkedList<LinkedList<StructExprRecog>> listLeftTopNote = new LinkedList<LinkedList<StructExprRecog>>();\n LinkedList<LinkedList<StructExprRecog>> listLeftBottomNote = new LinkedList<LinkedList<StructExprRecog>>();\n LinkedList<LinkedList<StructExprRecog>> listUpperNote = new LinkedList<LinkedList<StructExprRecog>>();\n LinkedList<LinkedList<StructExprRecog>> listLowerNote = new LinkedList<LinkedList<StructExprRecog>>();\n int nLastBaseIdx = -1;\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n if (listCharLevel.get(idx) == 0) {\n listBaseTrunk.add(listBaseULIdentified.get(idx));\n listLeftTopNote.add(new LinkedList<StructExprRecog>());\n listLeftBottomNote.add(new LinkedList<StructExprRecog>());\n listUpperNote.add(new LinkedList<StructExprRecog>()); \n listLowerNote.add(new LinkedList<StructExprRecog>());\n int nLastBaseIdxInBaseTrunk = listBaseTrunk.size() - 2;\n if (nLastBaseIdx < idx - 1) {\n // nLastBaseIdx == idx - 1 means no notes between nLastBaseIdx and this base.\n // Note that even if nLastBaseIdx is -1, nLastBaseIdx == idx - 1 is still a valid adjustment.\n int[] narrayNoteGroup = groupNotesForPrevNextBases(listBaseULIdentified, listCharLevel, nLastBaseIdx, idx);\n for (int idx1 = nLastBaseIdx + 1; idx1 < idx; idx1 ++) {\n int nGroupIdx = idx1 - nLastBaseIdx - 1;\n if (listCharLevel.get(idx1) == -1) {\n // lower note\n if (narrayNoteGroup[nGroupIdx] == 0) {\n listLowerNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n } else if (narrayNoteGroup[nGroupIdx] == 1) {\n listLeftBottomNote.getLast().add(listBaseULIdentified.get(idx1));\n } // ignore if narrayNoteGroup[nGroupIdx] == other values\n } else if (listCharLevel.get(idx1) == 1) {\n // upper note\n if (narrayNoteGroup[nGroupIdx] == 0) {\n listUpperNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n } else if (narrayNoteGroup[nGroupIdx] == 1) {\n listLeftTopNote.getLast().add(listBaseULIdentified.get(idx1));\n } // ignore if narrayNoteGroup[nGroupIdx] == other values\n } // ignore if listCharLevel.get(idx1) is not -1 or 1.\n }\n }\n if (nLastBaseIdxInBaseTrunk > 0) {\n convertNotes2HCut(nLastBaseIdxInBaseTrunk, listBaseTrunk, listLeftTopNote, listLeftBottomNote, listUpperNote, listLowerNote);\n }\n nLastBaseIdx = idx;\n }\n }\n if (nLastBaseIdx >= 0) {\n int nLastBaseIdxInBaseTrunk = listBaseTrunk.size() - 1;\n for (int idx1 = nLastBaseIdx + 1; idx1 < listBaseULIdentified.size(); idx1 ++) {\n if (listCharLevel.get(idx1) == -1) {\n listLowerNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n } else { // idx1 is not nLastBaseIdx, so that it must be either 1 or -1.\n listUpperNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n }\n }\n convertNotes2HCut(nLastBaseIdxInBaseTrunk, listBaseTrunk, listLeftTopNote, listLeftBottomNote, listUpperNote, listLowerNote);\n }\n \n // step 6, create a list of merged and reconstructed children.\n LinkedList<StructExprRecog> listProcessed = new LinkedList<StructExprRecog>();\n for (int idx = 0; idx < listBaseTrunk.size(); idx ++) {\n StructExprRecog serThis = listBaseTrunk.get(idx);\n serThis = serThis.restruct();\n if (listLeftTopNote.get(idx).size() > 0) {\n StructExprRecog serLeftTopNote = new StructExprRecog(mbarrayBiValues);\n if (listLeftTopNote.get(idx).size() > 1) {\n serLeftTopNote.setStructExprRecog(listLeftTopNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serLeftTopNote = listLeftTopNote.get(idx).getFirst();\n }\n serLeftTopNote = serLeftTopNote.restruct();\n LinkedList<StructExprRecog> listWithLeftTopNote = new LinkedList<StructExprRecog>();\n listWithLeftTopNote.add(serLeftTopNote);\n listWithLeftTopNote.add(serThis);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithLeftTopNote, EXPRRECOGTYPE_VCUTLEFTTOPNOTE);\n \n if (serThis.mlistChildren.getLast().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serThis.mlistChildren.getFirst().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_ZERO\n || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SMALL_O\n || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_BIG_O)\n ) {\n if (serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_SMALL_C\n || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_BIG_C) {\n // need not to reset left top width and height because they have been set.\n // similarly, need not to reset similarity.\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false);\n listParts.add(imgChopLeftTop);\n ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serThis.setStructExprRecog(UnitProtoType.Type.TYPE_CELCIUS, UNKNOWN_FONT_TYPE, imgChop4SER);\n } else if (serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_BIG_F) {\n // need not to reset left top width and height because they have been set.\n // similarly, need not to reset similarity.\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false);\n listParts.add(imgChopLeftTop);\n ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serThis.setStructExprRecog(UnitProtoType.Type.TYPE_FAHRENHEIT, UNKNOWN_FONT_TYPE, imgChop4SER);\n } else if ((serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_ONE\n || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_FORWARD_SLASH\n || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_SMALL_L) \n && listLowerNote.get(idx).size() >= 1\n && listLowerNote.get(idx).getFirst().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_ZERO\n || listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_SMALL_O\n || listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_BIG_O)\n ) {\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false);\n listParts.add(imgChopLeftTop);\n ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChopLowerNote = listLowerNote.get(idx).getFirst().getImageChop(false);\n listParts.add(imgChopLowerNote);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serThis.setStructExprRecog(UnitProtoType.Type.TYPE_PERCENT, UNKNOWN_FONT_TYPE, imgChop4SER);\n listLowerNote.get(idx).removeFirst(); // first element of lower note list should be removed here because it has been merged into serThis.\n }\n } else if (serThis.mlistChildren.getLast().mnExprRecogType == EXPRRECOGTYPE_GETROOT) {\n StructExprRecog serRootLevel = serThis.mlistChildren.getLast().mlistChildren.getFirst();\n StructExprRecog serRooted = serThis.mlistChildren.getLast().mlistChildren.getLast();\n if (serRootLevel.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_LEFT\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_SHORT\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_MEDIUM\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_LONG\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_TALL\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_VERY_TALL)) {\n LinkedList<StructExprRecog> listRoot = new LinkedList<StructExprRecog>();\n listRoot.add(serLeftTopNote);\n listRoot.add(serRootLevel);\n listRoot.add(serRooted);\n serThis.setStructExprRecog(listRoot, EXPRRECOGTYPE_GETROOT);\n } else {\n LinkedList<StructExprRecog> listNewRootLevel = new LinkedList<StructExprRecog>();\n listNewRootLevel.add(serLeftTopNote);\n listNewRootLevel.add(serRootLevel);\n StructExprRecog serNewRootLevel = new StructExprRecog(mbarrayBiValues);\n serNewRootLevel.setStructExprRecog(listNewRootLevel, EXPRRECOGTYPE_VBLANKCUT);\n serNewRootLevel = serNewRootLevel.restruct();\n LinkedList<StructExprRecog> listRoot = new LinkedList<StructExprRecog>();\n listRoot.add(serNewRootLevel);\n listRoot.add(serThis.mlistChildren.getLast().mlistChildren.get(1));\n listRoot.add(serRooted);\n serThis.setStructExprRecog(listRoot, EXPRRECOGTYPE_GETROOT);\n }\n } else {\n // ignore left top note\n serThis = serThis.mlistChildren.getLast();\n }\n }\n if (listLowerNote.get(idx).size() > 0 && listUpperNote.get(idx).size() > 0) {\n StructExprRecog serLowerNote = new StructExprRecog(mbarrayBiValues);\n if (listLowerNote.get(idx).size() > 1) {\n serLowerNote.setStructExprRecog(listLowerNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serLowerNote = listLowerNote.get(idx).getFirst();\n }\n serLowerNote = serLowerNote.restruct(); // restruct lower note\n StructExprRecog serUpperNote = new StructExprRecog(mbarrayBiValues);\n if (listUpperNote.get(idx).size() > 1) {\n serUpperNote.setStructExprRecog(listUpperNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serUpperNote = listUpperNote.get(idx).getFirst();\n }\n serUpperNote = serUpperNote.restruct(); // restruct upper note\n LinkedList<StructExprRecog> listWithLUNote = new LinkedList<StructExprRecog>();\n listWithLUNote.add(serThis);\n listWithLUNote.add(serLowerNote);\n listWithLUNote.add(serUpperNote);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithLUNote, EXPRRECOGTYPE_VCUTLUNOTES);\n } else if(listLowerNote.get(idx).size() > 0) {\n StructExprRecog serLowerNote = new StructExprRecog(mbarrayBiValues);\n if (listLowerNote.get(idx).size() > 1) {\n serLowerNote.setStructExprRecog(listLowerNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serLowerNote = listLowerNote.get(idx).getFirst();\n }\n serLowerNote = serLowerNote.restruct(); // restruct lower note\n LinkedList<StructExprRecog> listWithLowerNote = new LinkedList<StructExprRecog>();\n listWithLowerNote.add(serThis);\n listWithLowerNote.add(serLowerNote);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithLowerNote, EXPRRECOGTYPE_VCUTLOWERNOTE);\n } else if (listUpperNote.get(idx).size() > 0) {\n StructExprRecog serUpperNote = new StructExprRecog(mbarrayBiValues);\n if (listUpperNote.get(idx).size() > 1) {\n serUpperNote.setStructExprRecog(listUpperNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serUpperNote = listUpperNote.get(idx).getFirst();\n }\n serUpperNote = serUpperNote.restruct(); // restruct upper note\n LinkedList<StructExprRecog> listWithUpperNote = new LinkedList<StructExprRecog>();\n listWithUpperNote.add(serThis);\n listWithUpperNote.add(serUpperNote);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithUpperNote, EXPRRECOGTYPE_VCUTUPPERNOTE);\n serThis = serThis.identifyHSeperatedChar(); // a VCUTUPPERNOTE could be misrecognized i.\n }\n // base is always not v cut.\n listProcessed.add(serThis);\n }\n \n StructExprRecog serReturn = new StructExprRecog(mbarrayBiValues);\n if (listProcessed.size() == 1) {\n serReturn = listProcessed.getFirst();\n } else if (listProcessed.size() > 1) {\n serReturn.setStructExprRecog(listProcessed, EXPRRECOGTYPE_VBLANKCUT);\n }\n return serReturn;\n }\n }", "private void encodeStructure(Encoder encoder, Structure type, int size) throws IOException {\n\t\tencoder.openElement(ELEM_TYPE);\n\t\tencodeNameIdAttributes(encoder, type);\n\t\t// if size is 0, insert an Undefined4 component\n\t\t//\n\t\tint sz = type.getLength();\n\t\tif (sz == 0) {\n\t\t\ttype = new StructureDataType(type.getCategoryPath(), type.getName(), 1);\n\t\t\tsz = type.getLength();\n\t\t}\n\t\tencoder.writeString(ATTRIB_METATYPE, \"struct\");\n\t\tencoder.writeSignedInteger(ATTRIB_SIZE, sz);\n\t\tDataTypeComponent[] comps = type.getDefinedComponents();\n\t\tfor (DataTypeComponent comp : comps) {\n\t\t\tif (comp.isBitFieldComponent() || comp.getLength() == 0) {\n\t\t\t\t// TODO: bitfields, zero-length components and zero-element arrays are not yet supported by decompiler\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tencoder.openElement(ELEM_FIELD);\n\t\t\tString field_name = comp.getFieldName();\n\t\t\tif (field_name == null || field_name.length() == 0) {\n\t\t\t\tfield_name = comp.getDefaultFieldName();\n\t\t\t}\n\t\t\tencoder.writeString(ATTRIB_NAME, field_name);\n\t\t\tencoder.writeSignedInteger(ATTRIB_OFFSET, comp.getOffset());\n\t\t\tDataType fieldtype = comp.getDataType();\n\t\t\tencodeTypeRef(encoder, fieldtype, comp.getLength());\n\t\t\tencoder.closeElement(ELEM_FIELD);\n\t\t}\n\t\tencoder.closeElement(ELEM_TYPE);\n\t}", "public GenericData.Record serialize() {\n return null;\n }", "private void buildInternalRepresentations() {\n new DAGBuilder(data).buildMethods(this);//.dump();\n }", "public void preSerialize(){\n\t\tfittings = new ArrayList<Fitting>();\n\t\tfor(CutSheetInfo csi : getMainThreadedList()){\n\t\t\tpreSerializeOne(csi);\n\t\t}\n\t\tfor(BranchInfo bi : getBranchMap().values()){\n\t\t\tfor(EdgeMultiplicity em : bi.getEdgeMultiplicity()){\n\t\t\t\tCutSheetInfo csi = em.getEdgeInfo();\n\t\t\t\tpreSerializeOne(csi);\n\t\t\t\t/*\n\t\t\t\tfor(int i = 0; i < 2; i++){\n\t\t\t\t\tFitting f = (i == 0) ? csi.getStartFitting() : csi.getEndFitting();\n\t\t\t\t\tint idx = fittings.indexOf(f);\n\t\t\t\t\tif(idx < 0){\n\t\t\t\t\t\tidx = fittings.size();\n\t\t\t\t\t\tfittings.add(f);\n\t\t\t\t\t}\n\t\t\t\t\tif(i == 0){\n\t\t\t\t\t\tcsi.startFittingId = idx;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tcsi.endFittingId = idx;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t*/\n\t\t\t}\n\t\t}\n\t}", "public void serialize() {\n\t\t\n\t}", "@Override\n public void write(DataWriter out) throws IOException {\n if (versionInfo.getAssetVersion() >= 7) {\n out.writeStringNull(versionInfo.getUnityRevision().toString());\n out.writeInt(attributes);\n }\n \n if (versionInfo.getAssetVersion() >= 14) {\n // TODO\n throw new UnsupportedOperationException();\n } else {\n int numBaseClasses = classes.size();\n out.writeInt(numBaseClasses);\n\n for (TypeClass bc : classes) {\n int classID = bc.getClassID();\n out.writeInt(classID);\n\n TypeNode node = bc.getTypeTree();\n writeFieldTypeNodeOld(out, node);\n }\n\n // padding\n if (versionInfo.getAssetVersion() >= 7) {\n out.writeInt(0);\n }\n }\n }", "public void dumpChildren ()\r\n {\r\n dumpChildren(0);\r\n }", "public void testSerialization() {\n TaskSeries s1 = new TaskSeries(\"S\");\n s1.add(new Task(\"T1\", new Date(1), new Date(2)));\n s1.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeries s2 = new TaskSeries(\"S\");\n s2.add(new Task(\"T1\", new Date(1), new Date(2)));\n s2.add(new Task(\"T2\", new Date(11), new Date(22)));\n TaskSeriesCollection c1 = new TaskSeriesCollection();\n c1.add(s1);\n c1.add(s2);\n TaskSeriesCollection c2 = (TaskSeriesCollection) TestUtilities.serialised(c1);\n }", "@Override\r\n\tpublic void serializar() {\n\r\n\t}", "private void startNonleafNode(ArrayList<String> out, CldrNode node, int level)\n throws IOException {\n String objName = node.getNodeKeyName();\n // Some node should be skipped as indicated by objName being null.\n if (objName == null) {\n return;\n }\n\n // first level need no key, it is the container.\n // if (level == 0) {\n // out.add(\"{\");\n // return;\n // }\n\n Map<String, String> attrAsValueMap = node.getAttrAsValueMap();\n out.add(indent(level) + \"\\\"\" + objName + \"\\\": {\");\n for (String key : attrAsValueMap.keySet()) {\n String value = escapeValue(attrAsValueMap.get(key));\n // attribute is prefixed with \"@\" when being used as key.\n out.add(indent(level + 1) + \"\\\"@\" + key + \"\\\": \\\"\" + value + \"\\\"\");\n }\n }", "private byte[] packObject(ProtocolObject obj) {\n ByteArrayOutputStream bos = new ByteArrayOutputStream(37);\n for (int i = 0; i < 5; i++) {\n \t// write header bytes...\n \tbos.write(0);\n }\n packObject(obj, bos);\n return bos.toByteArray();\n }", "private void serializeSerializable(final Serializable object, final StringBuffer buffer)\n {\n String className;\n Class<?> c;\n Field[] fields;\n int i, max;\n Field field;\n String key;\n Object value;\n StringBuffer fieldBuffer;\n int fieldCount;\n\n this.history.add(object);\n c = object.getClass();\n className = c.getSimpleName();\n buffer.append(\"O:\");\n buffer.append(className.length());\n buffer.append(\":\\\"\");\n buffer.append(className);\n buffer.append(\"\\\":\");\n\n fieldBuffer = new StringBuffer();\n fieldCount = 0;\n while (c != null)\n {\n fields = c.getDeclaredFields();\n for (i = 0, max = fields.length; i < max; i++)\n {\n field = fields[i];\n if (Modifier.isStatic(field.getModifiers())) continue;\n if (Modifier.isVolatile(field.getModifiers())) continue;\n\n try\n {\n field.setAccessible(true);\n key = field.getName();\n value = field.get(object);\n serializeObject(key, fieldBuffer);\n this.history.remove(this.history.size() - 1);\n serializeObject(value, fieldBuffer);\n fieldCount++;\n }\n catch (final SecurityException e)\n {\n // Field is just ignored when this exception is thrown\n }\n catch (final IllegalArgumentException e)\n {\n // Field is just ignored when this exception is thrown\n }\n catch (final IllegalAccessException e)\n {\n // Field is just ignored when this exception is thrown\n }\n }\n c = c.getSuperclass();\n }\n buffer.append(fieldCount);\n buffer.append(\":{\");\n buffer.append(fieldBuffer);\n buffer.append(\"}\");\n }", "public void buildNestedClassInfo() {\n\t\twriter.writeNestedClassInfo();\n\t}", "public static void main(String[] args) {\n TreeNode root = new TreeNode(50);\n root.left = new TreeNode(30);\n root.right = new TreeNode(70);\n root.left.left = new TreeNode(20);\n root.left.right = new TreeNode(40);\n root.right.left = new TreeNode(60);\n root.right.right = new TreeNode(80);\n StringBuilder result = serialiseBT(root, new StringBuilder());\n System.out.println(result.toString());\n String[] strings = result.toString().split(\",\");\n TreeNode head = deserialize(strings, new int[]{0});\n System.out.println(serialiseBT(head, new StringBuilder()));\n }", "public XsdTreeStructImpl() {\n\t\tsuper(false, false);\n\t}", "@Override\n\t\tpublic Container convert(ChildData source) {\n\t\t\treturn new Container(Paths.stripPath(source.getPath()), mapBytesUtility.toMap(source.getData()));\n\t\t}", "R serializeData(T t);", "@Override\n public void serialize(ByteBuffer buf) {\n }", "@Override\n public int getDepth() {\n return 0;\n }", "@Override\n\tpublic void marshal(Object arg0, HierarchicalStreamWriter arg1, MarshallingContext arg2) {\n\n\t}", "public static byte[] serializeBswabePrv(BswabePrv prv) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n\n try {\n serializeElement(stream, prv.d);\n writeInt(stream, prv.comps.size());\n\n for (BswabePrvComp comp : prv.comps) {\n serializeString(stream, comp.attr);\n serializeElement(stream, comp.d);\n serializeElement(stream, comp.dp);\n }\n\n return stream.toByteArray();\n } catch (IOException e) {\n return null;\n }\n }", "private byte[] serialize(RealDecisionTree object){\n try{\n // Serialize data object to a file\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"MyObject.ser\"));\n out.writeObject(object);\n out.close();\n\n // Serialize data object to a byte array\n ByteArrayOutputStream bos = new ByteArrayOutputStream() ;\n out = new ObjectOutputStream(bos) ;\n out.writeObject(object);\n out.close();\n\n // Get the bytes of the serialized object\n byte[] buf = bos.toByteArray();\n return buf;\n } catch (IOException e) {\n System.exit(1);\n }\n\n return null;\n }", "public interface Node extends Serializable {\n\n\tvoid setOwner(Object owner);\n Object getOwner();\n\n String getName();\n Node getChild(int i);\n List<Node> childList();\n\n Node attach(int id, Node n) throws VetoTypeInduction;\n void induceOutputType(Class type) throws VetoTypeInduction;\n int getInputCount();\n\tClass getInputType(int id);\n List<Class> getInputTypes();\n Class getOutputType();\n Tuple.Two<Class,List<Class>> getType();\n\n Object evaluate();\n\n boolean isTerminal();\n\n <T extends Node> T copy();\n String debugString(Set<Node> set);\n}", "public interface FieldSerializer {\n\n boolean serializeField(JsonSerializerInternal serializer, Object parent, FieldAccess fieldAccess, CharBuf builder );\n\n}", "protected int makeClassDot(Class cls, FileWriter writer, int cluster) throws IOException{\r\n\t\t\r\n\t\tString parentStr = new String();\r\n\t\tHashMap<Vertex, Integer> vertexToPass = new HashMap<Vertex, Integer>();\r\n\t\tHashMap<String, HashSet<String>> existingMappings = new HashMap<String, HashSet<String>>();\r\n\t\t\r\n\t\tString className = cls.getName();\r\n\t\twriter.write(\"\\tsubgraph cluster\" + cluster + \"{\\n\");\r\n\t\tcluster++;\r\n\t\twriter.write(\"\\t\\tcolor=black;\\n\");\r\n\t\twriter.write(\"\\t\\tlabel=\\\"\" + className + \"-graph\\\";\\n\");\r\n\t\t\r\n\t\t// make class vertices\r\n\t\twriter.write(\"\\t\\tsubgraph cluster\" + cluster + \"{\\n\");\r\n\t\tcluster++;\r\n\t\twriter.write(\"\\t\\t\\tlabel=\\\"\" + className + \"\\\";\\n\");\r\n\t\twriter.write(\"\\t\\t\\tnode[style=filled];\\n\");\r\n\t\tfor (Vertex vert : cls.getVertices()){\r\n\t\t\tString modifier = \"[label=\\\"\" + vert.getExtVar() + \"\\\"\";\r\n\t\t\tif (!vert.isPublic()){\r\n\t\t\t\tmodifier = \"[label=\\\"$\" + vert.getExtVar() + \"\\\"\";\r\n\t\t\t}\r\n\t\t\tif (vert.isVertexType(VertType.FIELD))\r\n\t\t\t\tmodifier += \", shape=box\";\r\n\t\t\twriter.write(\"\\t\\t\\t\" + resolveVertexStr(vert, cls) + modifier + \"];\\n\");\r\n\t\t}\r\n\t\twriter.write(\"\\t\\t}\\n\");\r\n\t\t\r\n\t\t// make child interface vertices\r\n\t\tif (cls.hasChildren()){\r\n\t\t\tfor (IFace iface : cls.getChildrenTypes()){\r\n\t\t\t\twriter.write(\"\\t\\tsubgraph cluster\" + cluster + \"{\\n\");\r\n\t\t\t\twriter.write(\"\\t\\t\\tlabel=\\\"\" + iface.getName() + \"\\\";\\n\");\r\n\t\t\t\twriter.write(\"\\t\\t\\tnode[style=filled];\\n\");\r\n\t\t\t\tcluster++;\r\n\t\t\t\tfor (Vertex ifaceVert : iface.getVertices()){\r\n\t\t\t\t\tString begin = \"\\t\\t\\t\" + resolveVertexStr(ifaceVert, cls) + \"[label=\\\"\" + ifaceVert.getExtVar() + \"\\\"\";\r\n\t\t\t\t\tif (ifaceVert.isVertexType(VertType.FIELD))\r\n\t\t\t\t\t\tbegin += \", shape=box\";\r\n\t\t\t\t\twriter.write(begin + \"];\\n\");\r\n\t\t\t\t}\r\n\t\t\t\twriter.write(\"\\t\\t}\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// add parent vertex if applicable\r\n\t\tif (cls.getInterface().hasKontracts()){\r\n\t\t\tparentStr = \"parent\" + getParentCounter();\r\n\t\t\twriter.write(\"\\t\\t\" + parentStr + \"[label=\\\"Parent\\\",style=dotted];\\n\");\r\n\t\t}\r\n\t\t\r\n\t\t// make edges\r\n\t\tint passNum = 0;\r\n\t\tfor (ArrayList<EvalStep> visit : cls.getVisitors()){\r\n\t\t\tString edgeColor = passColoring.get(passNum);\r\n\t\t\tboolean inCall = false;\r\n\t\t\tfor (EvalStep step : visit){\r\n\t\t\t\tif (step.getType() == EvalType.CALL){\r\n\t\t\t\t\tif (inCall){\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tpassNum ++;\r\n\t\t\t\t\t\tedgeColor = passColoring.get(passNum);\r\n\t\t\t\t\t\tinCall = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tif (inCall){\r\n\t\t\t\t\t\tinCall = false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tFunction action = null;\r\n\t\t\t\t\tif (step.getType() == EvalType.SET){\r\n\t\t\t\t\t\taction = ((EvalStepSet) step).getFunction();\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (step.getType() == EvalType.APPLY){\r\n\t\t\t\t\t\taction = ((EvalStepApply) step).getFunction();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (action != null){\r\n\t\t\t\t\t\tVertex[] srcs = action.getSources();\r\n\t\t\t\t\t\tVertex dest = action.getDestination();\r\n\t\t\t\t\t\tString destStr = resolveVertexStr(dest, cls);\r\n\t\t\t\t\t\tif (srcs != null){\r\n\t\t\t\t\t\t\tfor (Vertex src : srcs){\r\n\t\t\t\t\t\t\t\tString srcStr = resolveVertexStr(src, cls);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// filter out repeated child edges\r\n\t\t\t\t\t\t\t\tif (existingMappings.containsKey(srcStr)){\r\n\t\t\t\t\t\t\t\t\tif (existingMappings.get(srcStr).contains(destStr)){\r\n\t\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\t\t\twriter.write(\"\\t\\t\" + srcStr + \" -> \" + destStr + \"[color=\" + edgeColor + \"];\\n\");\r\n\t\t\t\t\t\t\t\t\t\texistingMappings.get(srcStr).add(destStr);\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\telse {\r\n\t\t\t\t\t\t\t\t\tHashSet<String> dests = new HashSet<String>();\r\n\t\t\t\t\t\t\t\t\tdests.add(destStr);\r\n\t\t\t\t\t\t\t\t\texistingMappings.put(srcStr, dests);\r\n\t\t\t\t\t\t\t\t\twriter.write(\"\\t\\t\" + srcStr + \" -> \" + destStr + \"[color=\" + edgeColor + \"];\\n\");\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tvertexToPass.put(dest, passNum);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if there are kontracts...\r\n\t\tif (!parentStr.isEmpty()){\r\n\t\t\tHashMap<Integer, HashMap<Vertex, HashSet<Class>>> kontracts = cls.getInterface().getKontracts();\r\n\t\t\tfor (Integer val : kontracts.keySet()){\r\n\t\t\t\tString parentColor = passColoring.get(val);\r\n\t\t\t\tfor (Vertex vert : kontracts.get(val).keySet()){\r\n\t\t\t\t\tVertex clsVert = cls.findVertex(vert.getVar());\r\n\t\t\t\t\tint vertPass = vertexToPass.get(clsVert);\r\n\t\t\t\t\tString vertStr = resolveVertexStr(clsVert, cls);\r\n\t\t\t\t\tString edgeColor = passColoring.get(vertPass);\r\n\t\t\t\t\twriter.write(\"\\t\\t\" + vertStr + \" -> \" + parentStr + \"[color=\" + edgeColor + \",label=\\\"\" + val + \"\\\",fontcolor=\" + parentColor + \"];\\n\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\twriter.write(\"\\t}\\n\");\r\n\t\treturn cluster;\r\n\t}", "public static void writingHelper(BufferedWriter bwOut, SparseBackoffTreeStructure curr, int indent, HashMap<Integer,TreeMap<Integer,Double>> topic,\r\n HashMap<Integer, String> dict) throws Exception {\r\n String ind = \"\";\r\n for (int i = 0; i < indent; i++){\r\n ind += \"\\t\";\r\n }\r\n\r\n bwOut.write(ind + \"{\\\"name\\\": \" + \"\\\"\"+ curr._minGlobalIndex + \"-\" + (curr._minGlobalIndex + curr.numLeaves() - 1) + \"\\\",\" + \"\\n\");\r\n if(curr._children != null){\r\n bwOut.write(ind + \"\\\"children\\\": \" + \"[\\n\");\r\n int lenOfChildren = curr._children.length;\r\n for(int i = 0; i < lenOfChildren - 1; i++){\r\n writingHelper(bwOut, curr._children[i], indent + 1, topic, dict);\r\n bwOut.write(\",\\n\");\r\n }\r\n writingHelper(bwOut, curr._children[lenOfChildren - 1], indent + 1, topic, dict);\r\n bwOut.write(\"\\n\" + ind + \"\\t]\");\r\n }\r\n // if we reach the second last layer\r\n else {\r\n bwOut.write(ind + \"\\\"children\\\": \" + \"[\\n\");\r\n int len = curr._numLeaves.length;\r\n // output the topics\r\n int per = 3;\r\n for(int j = 0; j < len ; j++){\r\n int topNum = j + curr._minGlobalIndex;\r\n bwOut.write(ind + \"\\t{\\\"name\\\": \" + \"\\\"\"+ topNum + \"\\\"\");\r\n bwOut.write(\",\\n\" + ind + \"\\t\\\"children\\\": \" + \"[\\n\");\r\n \r\n \r\n int idx = 0;\r\n if(topic.get(topNum) != null) {\r\n bwOut.write(ind + \"\\t\\t{\\\"name\\\": \\\"\");\r\n String vals = \"\";\r\n for(int k : topic.get(topNum).keySet()){\r\n if(idx > 0 && idx < per){\r\n bwOut.write(\" \" + dict.get(k));\r\n vals += topic.get(topNum).get(k) + \" \";\r\n }\r\n else if(idx == per){\r\n break;\r\n }\r\n else{\r\n bwOut.write(dict.get(k));\r\n vals += topic.get(topNum).get(k) + \" \";\r\n }\r\n idx ++;\r\n }\r\n bwOut.write(\"\\\"\");\r\n bwOut.write(\", \\\"value\\\": \\\"\" + vals + \"\\\"\");\r\n bwOut.write(\"}\\n\" + ind);\r\n }\r\n bwOut.write(\"\\t]\");\r\n if(j < len - 1){\r\n bwOut.write(\"\\n\" + ind + \"\\t},\\n\");\r\n }\r\n else{\r\n bwOut.write(\"\\n\" + ind + \"\\t}\\n\");\r\n }\r\n }\r\n \r\n \r\n bwOut.write(\"\\n\" + ind + \"\\t]\");\r\n }\r\n bwOut.write(\"\\n\");\r\n bwOut.write(ind + \"}\");\r\n }", "public void extractStackedDataObjects(AbstractModelAdapter model) {\n\t\tfor(NodeInterface n : model.getNodes()) {\r\n\t\t\tBPMNNodeInterface _n = (BPMNNodeInterface) n;\r\n\t\t\tif(_n.isDataObject()) {\r\n\t\t\t\tif(isPartOfTree(_n,model)) {\r\n\t\t\t\t\tf_data.add(new DOTree(_n,model));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public StructureParserOutputStream (OutputStream os, boolean realClose)\n {\n super(os, realClose);\n // we start with the root\n _curPart.setPartId(\"\");\n }", "public AllOOneDataStructure() {\n\t\thead=new Node(\"\", 0);\n\t\ttail=new Node(\"\", 0);\n\t\thead.next=tail;\n\t\ttail.prev=head;\n\t\tmap=new HashMap<>();\n\t}", "public HIRTree(){\r\n\t\t\r\n\t}", "private void readObject(java.io.ObjectInputStream s)\r\n throws java.io.IOException, ClassNotFoundException {\r\n // Read in any hidden serialization magic\r\n s.defaultReadObject();\r\n\r\n // Read in size\r\n int size = s.readInt();\r\n\r\n // Initialize header\r\n//INSTRUMENTATION BEGIN\r\n //header = new Entry(null, null, null);\r\n header = new Entry(null, null, null, this);\r\n//INSTRUMENTATION END\r\n header.next = header.previous = header;\r\n\r\n // Read in all elements in the proper order.\r\n for (int i = 0; i < size; i++)\r\n add(s.readObject());\r\n }", "private void serializeOutOfTypeSystemElements() throws SAXException {\n if (cds.marker != null) {\n return;\n }\n if (cds.sharedData == null) {\n return;\n }\n Iterator<OotsElementData> it = cds.sharedData.getOutOfTypeSystemElements().iterator();\n while (it.hasNext()) {\n OotsElementData oed = it.next();\n workAttrs.clear();\n // Add ID attribute\n addIdAttribute(workAttrs, oed.xmiId);\n\n // Add other attributes\n Iterator<XmlAttribute> attrIt = oed.attributes.iterator();\n while (attrIt.hasNext()) {\n XmlAttribute attr = attrIt.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n // debug\n if (oed.elementName.qName.endsWith(\"[]\")) {\n Misc.internalError(new Exception(\n \"XMI Cas Serialization: out of type system data has type name ending with []\"));\n }\n // serialize element\n startElement(oed.elementName, workAttrs, oed.childElements.size());\n\n // serialize features encoded as child elements\n Iterator<XmlElementNameAndContents> childElemIt = oed.childElements.iterator();\n while (childElemIt.hasNext()) {\n XmlElementNameAndContents child = childElemIt.next();\n workAttrs.clear();\n Iterator<XmlAttribute> attrIter = child.attributes.iterator();\n while (attrIter.hasNext()) {\n XmlAttribute attr = attrIter.next();\n addAttribute(workAttrs, attr.name, attr.value);\n }\n\n if (child.contents != null) {\n startElement(child.name, workAttrs, 1);\n addText(child.contents);\n } else {\n startElement(child.name, workAttrs, 0);\n }\n endElement(child.name);\n }\n\n endElement(oed.elementName);\n }\n }", "public XMLEntry(Recordable parent) {\r\n this.parent = parent;\r\n this.atributes = new HashMap<String, String>();\r\n this.children = new ArrayList<XMLEntry>();\r\n}", "public ReportType(ReportType o, final ReportGeneration<?> rg) {\r\n // cannot pass this but getType() handles it\r\n super(o.elem, null);\r\n this.parent = o.parent;\r\n this.template = o.template;\r\n // since ReportPart are immutable we need to create our own so that they reference us\r\n // we don't want to be modified so no need of forks\r\n this.children = Collections.unmodifiableList(this.createParts(this.elem));\r\n this.forks = null;\r\n this.rg = rg;\r\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "@Override\n protected void prettyPrintChildren(PrintStream s, String prefix) {\n }", "public abstract JsonElement serialize();", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "public static byte[] serializeBswabePrv(BswabePrv prv) {\n\t\tArrayList<Byte> arrlist;\n\t\tint prvCompsLen, i;\n\t\n\t\tarrlist = new ArrayList<Byte>();\n\t\tprvCompsLen = prv.comps.size();\n\t\tserializeElement(arrlist, prv.d);\n\t\tserializeUint32(arrlist, prvCompsLen);\n\t\n\t\tfor (i = 0; i < prvCompsLen; i++) {\n\t\t\tserializeString(arrlist, prv.comps.get(i).attr);\n\t\t\tserializeElement(arrlist, prv.comps.get(i).d);\n\t\t\tserializeElement(arrlist, prv.comps.get(i).dp);\n\t\t}\n\t\treturn Byte_arr2byte_arr(arrlist);\n\t}", "VirtualNetworkTapPropertiesFormatInner innerModel();", "public abstract String describe(int depth);", "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}", "public Struct(String b){\r\n\tid=b;\r\n\tsize=0;\r\n\tform=0;\r\n }", "DataTree getDatatypeHierarchy();", "private JsonElement serializeEntityType(Pair<EntityPrimitiveTypes, Stats> content) {\n JsonObject entityObject = new JsonObject();\n JsonObject statObject = new JsonObject();\n for (Map.Entry<Statistic, Double> entry :\n content.getSecond().getStatistics().entrySet()) {\n statObject.add(entry.getKey().name(), new JsonPrimitive(entry.getValue()));\n }\n entityObject.add(STATS, statObject);\n entityObject.add(JSONEntitySerializer.PRIMITIVE_TYPE, new JsonPrimitive(content.getFirst().name()));\n return entityObject;\n }", "@Override\n public Map<Boolean, Sort> split2 (int delim) {\n int subcl = 0, offset=0;//index of the non-single-values sub-intv, and marker offset\n if (isSplit()) //the class is partitioned in subclasses\n for (int j =0; j < this.constraints.length; j++) //we seek the non-single-values sub-intv\n if (this.constraints[j].singleValue()) \n offset += this.constraints[j].lb();\n else \n subcl = j;\n \n return split2(delim - offset, subcl + 1);\n }", "com.google.protobuf.ByteString\n getNestedBytes();", "Object[] getChildArray();", "@Override\n\tpublic String toString() {\n\t\treturn level+\":\"+title + \":\"+refId+\"::\"+childElems;\n\t}", "Object deserialize(Writable blob) throws SerDeException;", "@Override\n public JsonElement serialize(MultiPageImageData src, Type typeOfSrc, JsonSerializationContext context) {\n JsonObject obj = new JsonObject();\n obj.addProperty(\"type\", \"page\");\n\n obj.addProperty(\"id\", src.getImageDigest());\n\n //obj.addProperty(\"oldestSurtDate\", src.getOldestSurtDate().toString());\n if (!src.getImgTitle().isEmpty())\n obj.add(\"imgTitle\", context.serialize(src.getImgTitle()));\n\n if (!src.getImgAlt().isEmpty())\n obj.add(\"imgAlt\", context.serialize(src.getImgAlt()));\n\n if (!src.getImgCaption().isEmpty())\n obj.add(\"imgCaption\", context.serialize(src.getImgCaption()));\n\n obj.addProperty(\"imgUrl\", src.getImgURL());\n obj.addProperty(\"imgUrlTokens\", src.getImgURLTokens());\n\n obj.addProperty(\"pageTitle\", src.getPageTitle());\n obj.addProperty(\"pageUrlTokens\", src.getPageURLTokens());\n\n //obj.addProperty(\"imgId\", src.getImgId());\n obj.addProperty(\"imgHeight\", src.getImgHeight());\n obj.addProperty(\"imgWidth\", src.getImgWidth());\n obj.addProperty(\"imgMimeType\", src.getImgMimeType());\n obj.addProperty(\"imgCrawlTimestampLatest\", src.getLatastTimestamp().toString());\n obj.addProperty(\"imgCrawlTimestamp\", src.getImgTimestamp().toString());\n\n obj.addProperty(\"pageHost\", src.getPageHost());\n\n obj.addProperty(\"pageCrawlTimestamp\", src.getPageTimestamp().toString());\n obj.addProperty(\"pageUrl\", src.getPageURL());\n\n obj.addProperty(\"isInline\", src.getInline());\n obj.add(\"tagFoundIn\", context.serialize(src.getTagFoundIn()));\n\n obj.addProperty(\"imagesInOriginalPage\", src.getImagesInPage());\n obj.addProperty(\"imageMetadataChanges\", src.getImageMetadataChanges());\n obj.addProperty(\"pageMetadataChanges\", src.getPageMetadataChanges());\n obj.addProperty(\"matchingImages\", src.getMatchingImages());\n obj.addProperty(\"matchingPages\", src.getMatchingPages());\n\n obj.add(\"collection\", context.serialize(new String[]{src.getCollection()}));\n\n obj.addProperty(\"safe\", 0);\n obj.addProperty(\"spam\", 0);\n obj.addProperty(\"blocked\", 0);\n\n return obj;\n }", "@Override\n void onValueWrite(SerializerElem e, Object o) {\n\n }", "public HopcroftTarjanSplitComponent() {\n\t\tsuper();\n\t\tvirtualEdges = new ArrayList<E>();\n\t}", "private void writeObject(java.io.ObjectOutputStream s)\r\n throws java.io.IOException {\r\n // Write out any hidden serialization magic\r\n s.defaultWriteObject();\r\n\r\n // Write out size\r\n s.writeInt(size);\r\n\r\n // Write out all elements in the proper order.\r\n for (Entry e = header.next; e != header; e = e.next)\r\n s.writeObject(e.element);\r\n }", "public FileDicomBaseInner() {}", "protected String binaryClassify(JSONObject instance, TreeNode relativeRoot){\n\t\tArrayList<TreeNode> subtree = relativeRoot.children;\n\t\tint treeSize = subtree.size();\n\t\tTreeNode subroot;\n\t\tfor(int node = 0; node < treeSize; node++){\n\t\t\tsubroot = subtree.get(node);\n\t\t\tif(subroot.isNode()){\n\t\t\t\treturn subroot.nom_value;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tObject comparator = instance.get(subroot.attribute);\n\t\t\t\tString compare = comparator.toString();\n\t\t\t\tif(subroot.match(compare)){\n\t\t\t\t\treturn binaryClassify(instance, subroot);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "public byte[] serializeForSR(ServiceInstanceInner instance)\n/* */ {\n/* 109 */ return new byte[0];\n/* */ }", "public void printStructure() {\n printStructure(mRoot);\n }", "public void buildSubClassInfo() {\n\t\twriter.writeSubClassInfo();\n\t}", "DataTree getMetricsHierarchy();", "private Node constructInternal(List<Node> children){\r\n\r\n // Base case: root found\r\n if(children.size() == 1){\r\n return children.get(0);\r\n }\r\n\r\n // Generate parents\r\n boolean odd = children.size() % 2 != 0;\r\n for(int i = 1; i < children.size(); i += 2){\r\n Node left = children.get(i-1);\r\n Node right = children.get(i);\r\n Node parent = new Node(Utility.SHA512(left.hash + right.hash), left, right);\r\n children.add(parent);\r\n }\r\n\r\n // If the number of nodes is odd, \"inherit\" the remaining child node (no hash needed)\r\n if(odd){\r\n children.add(children.get(children.size() - 1));\r\n }\r\n return constructInternal(children);\r\n }", "private Descriptor parseRootDescriptorLine(String line) {\n\t\tString [] tokens = line.split(\"\\\\s+\");\n\t\tif (tokens.length == 5){\n\t\t\tline = tokens[0] + \" \" + tokens[1] + \" \" + tokens[2] + \" \" + tokens[3] + \" 0_0:0_0 0.0\";\n\t\t} else {\n\t\t\tline = line + \" 0_0:0_0 0.0\";\n\t\t}\n\t\treturn this.parseDescriptorLine(line);\n\t}", "static Struct buscaT(Struct t){\r\n\tif(lt.id.equals(t.id)==true){\r\n\t\treturn(lt);\r\n\t}else{\r\n\t\tStruct aux=lt;\r\n\t\twhile((aux!=null)&&(!aux.id.equals(t.id))){\r\n\t\t\taux=aux.sig;\r\n\t\t}\r\n\t\treturn(aux);\r\n\t}\r\n }", "public Diccionario(){\r\n rz=new BinaryTree<Association<String,String>>(null, null, null, null);\r\n llenDic();\r\n tradOra();\r\n }", "@Override\n void pack() {\n }", "@Override\n\tpublic String serialize() {\n\t\treturn null;\n\t}", "private void writeObject (ObjectOutputStream out) throws IOException {\n\t\tout.writeInt (CURRENT_SERIAL_VERSION);\n\t\tout.writeObject(inputPipe);\n\t\tout.writeObject(outputPipe);\n\t\tout.writeObject(sumLatticeFactory);\n\t\tout.writeObject(maxLatticeFactory);\n\t}", "public void deserialize() {\n\t\t\n\t}", "Node split() {\r\n\r\n // to do the split operation\r\n // to get the correct child to promote to the internal node\r\n int from = key_num() / 2 + 1, to = key_num();\r\n InternalNode sibling = new InternalNode();\r\n sibling.keys.addAll(keys.subList(from, to));\r\n sibling.children.addAll(children.subList(from, to + 1));\r\n\r\n keys.subList(from - 1, to).clear();\r\n children.subList(from, to + 1).clear();\r\n\r\n return sibling;\r\n }", "RtfCompoundObjectStack() {\r\n _top = null;\r\n }", "public SubSectionDetail() {\r\n\t}", "public void write(final Instance inst, final StringBuilder sb) throws NullPointerException {\n \n try\n {\n if ((Boolean)inst.getFeature((_fds.get(_fds.size()-1))))\n sb.append(\"+1\");\n else\n sb.append(\"-1\");\n }\n catch (NullPointerException e)\n {\n if (_testingMode)\n sb.append(\"0\");\n else\n throw e;\n }\n \n //write the trees\n int nTrees=writeTree(sb,inst);\n if (nTrees>0) writeET(sb);\n \n //write the feature vector\n writeVector(sb,inst);\n }", "@Override\n public int getDepth() {\n return 680;\n }", "StructureType createStructureType();", "public String serialize(Node15 root) {\n\t if(root == null) return \"\";\n\t serializeT(root);\n\t return sb.toString();\n\t }", "@Test\n public void testMultipleSerialisation() throws IOException {\n Map<InstanceGroupType, String> userData = new EnumMap<>(InstanceGroupType.class);\n userData.put(InstanceGroupType.CORE, \"CORE\");\n Image image = new Image(\"cb-centos66-amb200-2015-05-25\", userData, \"redhat6\", \"redhat6\", \"\", \"default\", \"default-id\", new HashMap<>());\n Json json = new Json(image);\n String expected = json.getValue();\n Image covertedAgain = json.get(Image.class);\n json = new Json(covertedAgain);\n Assert.assertEquals(expected, json.getValue());\n }", "@Override\r\n public String serializeLifeCycleDefinition(LifeCycleDefinition lcd) {\n return null;\r\n }" ]
[ "0.5460533", "0.5217154", "0.50672907", "0.49652794", "0.49295375", "0.49140453", "0.4898232", "0.488284", "0.4877978", "0.48752633", "0.48587504", "0.48576176", "0.48512146", "0.47832942", "0.47821936", "0.47288492", "0.4727921", "0.4701613", "0.46769136", "0.46642825", "0.46470475", "0.46470153", "0.4646203", "0.4635708", "0.4624677", "0.46025282", "0.46024638", "0.4593518", "0.45922783", "0.45849052", "0.45741904", "0.45737964", "0.45668823", "0.456438", "0.45606133", "0.45545703", "0.4546527", "0.4540017", "0.4535205", "0.4532586", "0.45259526", "0.45255214", "0.4520842", "0.45199883", "0.45179054", "0.45113793", "0.4510758", "0.4510581", "0.45103097", "0.45094693", "0.45078748", "0.4504546", "0.4496325", "0.4478495", "0.4475232", "0.44722247", "0.4468858", "0.4468858", "0.4468858", "0.4467311", "0.44662523", "0.44645107", "0.44437486", "0.4442078", "0.44400564", "0.44369155", "0.4433036", "0.44223613", "0.4422292", "0.44199237", "0.4417105", "0.44105554", "0.44073656", "0.4405089", "0.4398911", "0.439584", "0.43927202", "0.43856436", "0.4381747", "0.4378493", "0.43756902", "0.43754733", "0.43635595", "0.43619952", "0.43609384", "0.4341065", "0.43399778", "0.43387774", "0.43350703", "0.43348455", "0.43264386", "0.43250087", "0.43129823", "0.43117535", "0.42998448", "0.429831", "0.429597", "0.42959195", "0.4295346", "0.42950502" ]
0.4839565
13
calculate average char width and height.
public double[] calcAvgCharMetrics() { double[] darrayMetrics = new double[TOTAL_IDX_CNT]; if (!isChildListType()) { darrayMetrics[AVG_CHAR_WIDTH_IDX] = mnWidth; darrayMetrics[AVG_CHAR_HEIGHT_IDX] = mnHeight; darrayMetrics[CHAR_CNT_IDX] = 1.0; // weight. if (mType != UnitProtoType.Type.TYPE_UNKNOWN && mType != UnitProtoType.Type.TYPE_DOT && mType != UnitProtoType.Type.TYPE_ROUND_BRACKET && mType != UnitProtoType.Type.TYPE_SQUARE_BRACKET && mType != UnitProtoType.Type.TYPE_BRACE && mType != UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET && mType != UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET && mType != UnitProtoType.Type.TYPE_CLOSE_BRACE && mType != UnitProtoType.Type.TYPE_VERTICAL_LINE && mType != UnitProtoType.Type.TYPE_SUBTRACT && mType != UnitProtoType.Type.TYPE_SQRT_LEFT && mType != UnitProtoType.Type.TYPE_SQRT_SHORT && mType != UnitProtoType.Type.TYPE_SQRT_MEDIUM && mType != UnitProtoType.Type.TYPE_SQRT_LONG && mType != UnitProtoType.Type.TYPE_SQRT_TALL && mType != UnitProtoType.Type.TYPE_SQRT_VERY_TALL) { darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = mnWidth; darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = mnHeight; darrayMetrics[NORMAL_CHAR_CNT_IDX] = 1.0; // weight. } else { darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = mnWidth; darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = mnHeight; darrayMetrics[NORMAL_CHAR_CNT_IDX] = 0.0; // weight. } darrayMetrics[AVG_VGAP_IDX] = mnWidth; darrayMetrics[VGAP_CNT_IDX] = 0.0; // weight } else { double dSumWidth = 0, dSumNormalCharWidth = 0; double dSumHeight = 0, dSumNormalCharHeight = 0; double dTotalWeight = 0, dTotalNormalCharWeight = 0; double dVGap = 0, dTotalVGapWeight = 0; for (int idx = 0; idx < mlistChildren.size(); idx ++) { double[] darrayThisMetrics = mlistChildren.get(idx).calcAvgCharMetrics(); dSumWidth += darrayThisMetrics[AVG_CHAR_WIDTH_IDX] * darrayThisMetrics[CHAR_CNT_IDX]; dSumNormalCharWidth += darrayThisMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] * darrayThisMetrics[NORMAL_CHAR_CNT_IDX]; dSumHeight += darrayThisMetrics[AVG_CHAR_HEIGHT_IDX] * darrayThisMetrics[CHAR_CNT_IDX]; dSumNormalCharHeight += darrayThisMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] * darrayThisMetrics[NORMAL_CHAR_CNT_IDX]; dTotalWeight += darrayThisMetrics[CHAR_CNT_IDX]; dTotalNormalCharWeight += darrayThisMetrics[NORMAL_CHAR_CNT_IDX]; dVGap += darrayThisMetrics[AVG_VGAP_IDX] * darrayThisMetrics[VGAP_CNT_IDX]; dTotalVGapWeight += darrayThisMetrics[VGAP_CNT_IDX]; if (idx > 0 && (mnExprRecogType == EXPRRECOGTYPE_VBLANKCUT || mnExprRecogType == EXPRRECOGTYPE_VCUTMATRIX)) { double dThisVGap = mlistChildren.get(idx).mnLeft - mlistChildren.get(idx - 1).getRightPlus1(); dVGap += (dThisVGap > 0)?dThisVGap:0; dTotalVGapWeight += (dThisVGap > 0)?1.0:0; } } darrayMetrics[AVG_CHAR_WIDTH_IDX] = Math.max(ConstantsMgr.msnMinCharWidthInUnit, dSumWidth / dTotalWeight); darrayMetrics[AVG_CHAR_HEIGHT_IDX] = Math.max(ConstantsMgr.msnMinCharHeightInUnit, dSumHeight / dTotalWeight); darrayMetrics[CHAR_CNT_IDX] = dTotalWeight; if (dTotalNormalCharWeight == 0) { darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = darrayMetrics[AVG_CHAR_WIDTH_IDX]; darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = darrayMetrics[AVG_CHAR_HEIGHT_IDX]; } else { darrayMetrics[AVG_NORMAL_CHAR_WIDTH_IDX] = Math.max(ConstantsMgr.msnMinCharWidthInUnit, dSumNormalCharWidth / dTotalNormalCharWeight); darrayMetrics[AVG_NORMAL_CHAR_HEIGHT_IDX] = Math.max(ConstantsMgr.msnMinCharHeightInUnit, dSumNormalCharHeight / dTotalNormalCharWeight); } darrayMetrics[NORMAL_CHAR_CNT_IDX] = dTotalNormalCharWeight; if (dTotalVGapWeight == 0) { darrayMetrics[AVG_VGAP_IDX] = darrayMetrics[AVG_CHAR_WIDTH_IDX]; } else { darrayMetrics[AVG_VGAP_IDX] = Math.max(ConstantsMgr.msnMinVGapWidthInUnit, dVGap / dTotalVGapWeight); } darrayMetrics[VGAP_CNT_IDX] = dTotalVGapWeight; } return darrayMetrics; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calcAvgSeperatedCharHeight(double dAvgStrokeWidth) {\n return calcAvgSeperatedCharHeight(getLeftInOriginalImg(), getTopInOriginalImg(), getRightP1InOriginalImg(), getBottomP1InOriginalImg(), dAvgStrokeWidth);\n }", "private void getWidthandHeight(char[] imagenaux) {\n for (iterator = 3; imagenaux[iterator] != '\\n'; ++iterator) {\n if (imagenaux[iterator] == ' ') anchura = false;\n else {\n if (anchura) {\n int aux = Character.getNumericValue(imagenaux[iterator]);\n width *= 10;\n width += aux;\n } else {\n int aux = Character.getNumericValue(imagenaux[iterator]);\n height *= 10;\n height += aux;\n }\n }\n }\n ++iterator;\n while (imagenaux[iterator] != '\\n') { ++iterator; }\n ++iterator;\n }", "public double calcAvgSeperatedCharHeight(int nLeftThresh, int nTopThresh, int nRightP1Thresh, int nBottomP1Thresh, double dAvgStrokeWidth) {\n ImageChops imgChops = ExprSeperator.extractConnectedPieces(this);\n double dAvgHeight = 0;\n int nNumOfCntedChars = 0;\n for (int idx = 0; idx < imgChops.mlistChops.size(); idx ++) {\n byte[][] barrayThis = imgChops.mlistChops.get(idx).mbarrayImg;\n int nThisLeft = imgChops.mlistChops.get(idx).mnLeft;\n int nThisTop = imgChops.mlistChops.get(idx).mnTop;\n int nThisWidth = imgChops.mlistChops.get(idx).mnWidth;\n int nThisHeight = imgChops.mlistChops.get(idx).mnHeight;\n double dThisCharHeight = nThisHeight;\n if (nThisWidth != 0 && nThisHeight != 0\n && (imgChops.mlistChops.get(idx).mnLeft < mapOriginalXIdx2This(nRightP1Thresh)\n || imgChops.mlistChops.get(idx).getRightPlus1() > mapOriginalXIdx2This(nLeftThresh))\n && (imgChops.mlistChops.get(idx).mnTop < mapOriginalXIdx2This(nBottomP1Thresh)\n || imgChops.mlistChops.get(idx).getBottomPlus1() > mapOriginalXIdx2This(nTopThresh))) {\n double dMaxCutHeight = 0;\n int nLastAllThroughDivIdx = nThisTop - 1;\n int idx2 = nThisTop;\n for (; idx2 < imgChops.mlistChops.get(idx).getBottomPlus1(); idx2 ++) {\n boolean bIsAllThroughLn = true;\n for (int idx1 = nThisLeft; idx1 < imgChops.mlistChops.get(idx).getRightPlus1(); idx1 ++) {\n if (barrayThis[idx1][idx2] == 0) {\n bIsAllThroughLn = false;\n break;\n }\n }\n if (bIsAllThroughLn && (idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n }\n if ((idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n dThisCharHeight = dMaxCutHeight;\n }\n if (dThisCharHeight >= ConstantsMgr.msnMinCharHeightInUnit && dThisCharHeight > dAvgStrokeWidth) {\n // a seperated point or a disconnected stroke may significantly drag down dAvgHeight value.\n dAvgHeight += dThisCharHeight;\n nNumOfCntedChars ++;\n }\n }\n if (nNumOfCntedChars != 0) {\n dAvgHeight /= nNumOfCntedChars;\n\n }\n return Math.max(dAvgHeight, Math.max(ConstantsMgr.msnMinCharHeightInUnit, dAvgStrokeWidth));\n }", "public double calcAvgHOverlapCharHeight(ImageChop chopOverlap, double dAvgStrokeWidth) {\n ImageChops imgChops = ExprSeperator.extractConnectedPieces(this);\n ImageChops imgChopsOverlap = ExprSeperator.extractConnectedPieces(chopOverlap);\n \n double dAvgHeight = 0;\n int nNumOfCntedChars = 0;\n for (int idx = 0; idx < imgChops.mlistChops.size(); idx ++) {\n byte[][] barrayThis = imgChops.mlistChops.get(idx).mbarrayImg;\n int nThisLeft = imgChops.mlistChops.get(idx).mnLeft;\n int nThisTop = imgChops.mlistChops.get(idx).mnTop;\n int nThisWidth = imgChops.mlistChops.get(idx).mnWidth;\n int nThisHeight = imgChops.mlistChops.get(idx).mnHeight;\n double dThisCharHeight = nThisHeight;\n if (nThisWidth != 0 && nThisHeight != 0) {\n boolean bOverlapped = false;\n for (int idx3 = 0; idx3 < imgChopsOverlap.mlistChops.size(); idx3 ++) {\n int nLeftThresh = imgChopsOverlap.mlistChops.get(idx3).getLeftInOriginalImg();\n int nRightP1Thresh = imgChopsOverlap.mlistChops.get(idx3).getRightP1InOriginalImg();\n if (imgChops.mlistChops.get(idx).mnLeft < mapOriginalXIdx2This(nRightP1Thresh)\n || imgChops.mlistChops.get(idx).getRightPlus1() > mapOriginalXIdx2This(nLeftThresh)) {\n bOverlapped = true;\n break;\n }\n }\n if (!bOverlapped) { // not overlap, go to see the next one.\n continue;\n }\n \n double dMaxCutHeight = 0;\n int nLastAllThroughDivIdx = nThisTop - 1;\n int idx2 = nThisTop;\n for (; idx2 < imgChops.mlistChops.get(idx).getBottomPlus1(); idx2 ++) {\n boolean bIsAllThroughLn = true;\n for (int idx1 = nThisLeft; idx1 < imgChops.mlistChops.get(idx).getRightPlus1(); idx1 ++) {\n if (barrayThis[idx1][idx2] == 0) {\n bIsAllThroughLn = false;\n break;\n }\n }\n if (bIsAllThroughLn && (idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n }\n if ((idx2 - nLastAllThroughDivIdx - 1) > dMaxCutHeight) {\n dMaxCutHeight = idx2 - nLastAllThroughDivIdx - 1;\n }\n dThisCharHeight = dMaxCutHeight;\n }\n if (dThisCharHeight >= ConstantsMgr.msnMinCharHeightInUnit && dThisCharHeight > dAvgStrokeWidth) {\n // a seperated point or a disconnected stroke may significantly drag down dAvgHeight value.\n dAvgHeight += dThisCharHeight;\n nNumOfCntedChars ++;\n }\n }\n if (nNumOfCntedChars != 0) {\n dAvgHeight /= nNumOfCntedChars;\n\n }\n return Math.max(dAvgHeight, Math.max(ConstantsMgr.msnMinCharHeightInUnit, dAvgStrokeWidth));\n }", "private void calculateCharSize() {\n int charMaxAscent;\n int charLeading;\n FontMetrics fm = getFontMetrics(getFont());\n charWidth = -1; // !!! Does not seem to work: fm.getMaxAdvance();\n charHeight = fm.getHeight() + lineSpaceDelta;\n charMaxAscent = fm.getMaxAscent();\n fm.getMaxDescent();\n charLeading = fm.getLeading();\n baselineIndex = charMaxAscent + charLeading - 1;\n\n if (charWidth == -1) {\n int widths[] = fm.getWidths();\n for (int i=32; i<127; i++) {\n if (widths[i] > charWidth) {\n charWidth = widths[i];\n }\n }\n }\n }", "String getWidth();", "String getWidth();", "Length getWidth();", "public float getAverageHeight() {\n\t\treturn (texture.getHeight() / 16) * size;\n\t}", "public double getAverageEdgeLength() {\n\t\tdouble x = this.maxX - this.minX;\n\t\tdouble y = this.maxY - this.minY;\n\t\tdouble z = this.maxZ - this.minZ;\n\t\treturn (x + y + z) / 3.0D;\n\t}", "double getWidth();", "double getWidth();", "public byte getWidth();", "private int[] getWidths(ArrayList<ArrayList<String>> e){\n final int PIXEL_PER_CHAR = 75;\n\n int[][] nChar = new int[e.size()][e.get(0).size()];\n int[] lengths = new int[e.get(0).size()];\n for(int i = 0; i < e.get(0).size(); i++){\n lengths[i] = 300;\n }\n\n for(int i = 0; i < e.size(); i++){\n for (int j = 0; j < e.get(i).size(); j++){\n nChar[i][j] = e.get(i).get(j).length();\n }\n }\n\n for(int i = 0; i < e.size(); i++){\n for (int j = 0; j < e.get(i).size(); j++){\n if(lengths[j] < (nChar[i][j]*PIXEL_PER_CHAR)){\n lengths[j] = (nChar[i][j]*PIXEL_PER_CHAR);\n }\n }\n }\n\n return lengths;\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}", "public float getAverageWidth() {\n Object value = library.getObject(entries, AVG_WIDTH);\n if (value instanceof Number) {\n return ((Number) value).floatValue();\n }\n return 0.0f;\n }", "String getHeight();", "String getHeight();", "public double getWidth();", "public double getWidth();", "long getWidth();", "public int getWidth() {\n return bala.getWidth();\n }", "public double getAverageEncoderDistance() {\n return (m_leftEncoder.getPosition() + m_rightEncoder.getPosition()) / 2.0;\n }", "private void calculateWidthRatio() {\n\tif (texWidth != 0) {\n\t widthRatio = ((float) width) / texWidth;\n\t}\n }", "BigInteger getWidth();", "@Override\n\tpublic float getWidth() {\n\t\treturn 26;\n\t}", "public abstract int getWidth();", "public double getAverageWordLength() {\n\t\tif (wordList.isEmpty()) {\n\t\t\treturn 0;\n\t\t}\n\t\tdouble avg = 0;\n\t\tfor (int i = 0; i < wordList.size(); i++) {\n\t\t\tavg += wordList.get(i).length();\n\t\t}\n\t\tavg /= wordList.size();\n\t\treturn avg;\n\t\t// TODO Add your code here\n\t}", "public double calcArea() {\r\n\t\tdouble area = length * width;\r\n\t\treturn area;\r\n\t}", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "int getWidth();", "private double getWidth() {\n\t\treturn width;\n\t}", "public double getAverageDistance() {\n return (leftEnc.getDistance() + rightEnc.getDistance()) / 2;\n }", "int getWidth() {return width;}", "public Integer getWidth(){return this.width;}", "int getWidth1();", "public int getWidth() {\n\t\treturn this.f1[0].length;\n\t}", "public native int getWidth() throws MagickException;", "public int getWidth();", "public int getWidth();", "public int getWidth();", "int width();", "private void computeAverageDocumentLength(){\n double corpusSize = documentDetails.size();\n double lengthsSum = 0;\n ArrayList<String> docs = new ArrayList<>(documentDetails.keySet());\n\n for(String doc : docs){\n lengthsSum += Integer.valueOf(documentDetails.get(doc)[3]);\n }\n averageDocumentLength = lengthsSum/corpusSize;\n }", "public int getAvgSpec() {\n return totalSpec/totalMatches;\n }", "@Override\n public int getWidth() {\n colorSpaceType.assertNumElements(buffer.getFlatSize(), height, width);\n return width;\n }", "public double getWidth() {\n return this.getRight(this.tree.getRight(0)) - this.getLeft(this.tree.getLeft(0)); \n }", "public int getWidth(CharSequence text) {\r\n\t\tint width = 0, lineWidth = 0;\r\n\t\t\r\n\t\tfor (int i = 0; i < text.length(); i++) {\r\n\t\t\tchar character = text.charAt(i);\r\n\t\t\t\r\n\t\t\tif (character == '\\n') { // New line\r\n\t\t\t\twidth = Math.max(width, lineWidth);\r\n\t\t\t\tlineWidth = 0;\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Ignore carriage returns\r\n\t\t\tif (character == '\\r') continue;\r\n\t\t\t\r\n\t\t\tGlyph glyph = glyphs.get(character);\r\n\t\t\tif (glyph == null) continue;\r\n\t\t\t\r\n\t\t\tlineWidth += glyph.getWidth();\r\n\t\t}\r\n\t\t\r\n\t\twidth = Math.max(width, lineWidth);\r\n\t\treturn width;\r\n\t}", "public String getWidth() {\n return width;\n }", "public int width();", "public abstract double getBaseWidth();", "public int getWidth() { return width; }", "public int getWidth() { return width; }", "private float getRoughPixelSize() {\n\n\t\tfloat size = 380; // mm\n\t\tfloat pixels = getHeight();\n\t\treturn pixels > 0 ? size / pixels : 0;\n\n\t}", "public int charArea(char ch) {\n\t\tint westPoint = 0;\n\t\tint eastPoint = 0;\n\t\tint northPoint = 0;\n\t\tint southPoint = 0;\n\t\tboolean firstOccur = true;\n\t\t\n\t\tfor(int row = 0; row < grid.length; row++) {\n\t\t\tfor(int col = 0; col < grid[0].length; col++) {\n\t\t\t\tif(grid[row][col] == ch) {\n\t\t\t\t\tif(firstOccur) {\n\t\t\t\t\t\twestPoint = col;\n\t\t\t\t\t\teastPoint = col;\n\t\t\t\t\t\tnorthPoint = row;\n\t\t\t\t\t\tsouthPoint = row;\n\t\t\t\t\t\tfirstOccur = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\twestPoint = Math.min(westPoint, col);\n\t\t\t\t\t\teastPoint = Math.max(eastPoint, col);\n\t\t\t\t\t\tnorthPoint = Math.min(northPoint, row);\n\t\t\t\t\t\tsouthPoint = Math.max(southPoint, row);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tint area = (eastPoint - westPoint + 1) * (southPoint - northPoint + 1);\n\t\tif(firstOccur) return 0;\n\t\treturn area; \n\t}", "public double getWidth() {\n\treturn width;\n }", "public double getWidth() {\n return this.left.getLeft(0) - this.right.getRight(0); \n }", "public float getWidth(String name) throws IOException;", "public float getWidth();", "public double getWidth()\r\n {\r\n return width;\r\n }", "public double getWidth()\n {\n return width;\n }", "@java.lang.Override\n public long getWidth() {\n return width_;\n }", "public int getSize() {\n\t\treturn width + length;\n\t}", "Length getHeight();", "@Override\n public double getWidth() {\n return width;\n }", "@Override\n\tpublic double computeArea()\n\t{\n\t\treturn\n\t\t\t\tthis.length * this.width;\n\t}", "public int getRawWidth(int i, String str) {\n Object[] objArr;\n if (str == null) {\n objArr = (Object[]) this.CharMetrics.get(new Integer(i));\n } else if (str.equals(BaseFont.notdef)) {\n return 0;\n } else {\n objArr = (Object[]) this.CharMetrics.get(str);\n }\n if (objArr != null) {\n return ((Integer) objArr[1]).intValue();\n }\n return 0;\n }", "public static int size_estLength() {\n return (8 / 8);\n }", "public double width() { return _width; }", "public int getWidth()\n {\n\treturn width;\n }", "public double getWidth () {\n return width;\n }", "public int getGraphicsWidth(Graphics g);", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n\t\treturn width;\n\t}", "public double getWidth() {\n return this.size * 2.0; \n }", "public int area()\n\t{\n\t\treturn length*width;\n\t}", "public int getLength ()\r\n {\r\n return glyph.getBounds().width;\r\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public double getWidth() {\n return width;\n }", "public int getWidthvetana() \r\n\t{\r\n\t\treturn widthvetana;\r\n\t}", "public static int getWidth()\r\n\t{\r\n\t\treturn width;\r\n\t}", "public double getWidth() {\r\n\r\n\t\treturn w;\r\n\r\n\t}", "public double findArea(){\n\t\tdouble area= (0.5*(length * width));\n\t\treturn area;\n\t}", "public double getWidth() {\r\n return width;\r\n }" ]
[ "0.6846072", "0.6611755", "0.6339975", "0.63352203", "0.63154787", "0.6240101", "0.6240101", "0.5975866", "0.5837522", "0.5817236", "0.57818085", "0.57818085", "0.57280535", "0.5710388", "0.56972694", "0.5691607", "0.563658", "0.563658", "0.56359166", "0.56359166", "0.5623309", "0.5544928", "0.554333", "0.5498671", "0.54967517", "0.54959965", "0.5489399", "0.5460802", "0.54466623", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.543676", "0.5432277", "0.5414072", "0.5381506", "0.5381251", "0.5381108", "0.5375426", "0.53592885", "0.5345459", "0.5345459", "0.5345459", "0.53418565", "0.53163034", "0.5301339", "0.5296643", "0.52875125", "0.52849346", "0.5271454", "0.5268842", "0.5266881", "0.5236941", "0.5236941", "0.5211955", "0.5210781", "0.52091515", "0.5204815", "0.5198517", "0.51949537", "0.5189676", "0.51801956", "0.51652735", "0.5162877", "0.51560354", "0.5154646", "0.5151868", "0.51465803", "0.5140043", "0.5134678", "0.5127624", "0.5115739", "0.51156205", "0.5114852", "0.5114852", "0.5114852", "0.5114184", "0.51106393", "0.5110512", "0.51087373", "0.51087373", "0.51087373", "0.510343", "0.51030433", "0.51022226", "0.5099711", "0.509708" ]
0.67541033
1
some characters might be misrecognized, so rectify them
public void rectifyMisRecogChars1stRnd(CharLearningMgr clm) { switch (mnExprRecogType) { case EXPRRECOGTYPE_ENUMTYPE: { break; // single char, do nothing. } case EXPRRECOGTYPE_HLINECUT: { StructExprRecog serChildNo = mlistChildren.getFirst(); StructExprRecog serChildDe = mlistChildren.getLast(); rectifyMisRecogNumLetter(clm, serChildNo); rectifyMisRecogNumLetter(clm, serChildDe); break; }case EXPRRECOGTYPE_HBLANKCUT: case EXPRRECOGTYPE_MULTIEXPRS: case EXPRRECOGTYPE_VCUTMATRIX: { for (int idx = 0; idx < mlistChildren.size(); idx ++) { StructExprRecog serThisChild = mlistChildren.get(idx); rectifyMisRecogNumLetter(clm, serThisChild); } break; } case EXPRRECOGTYPE_HCUTCAP: case EXPRRECOGTYPE_HCUTUNDER: case EXPRRECOGTYPE_HCUTCAPUNDER: { StructExprRecog serCap = null, serBase = null, serUnder = null; if (mnExprRecogType == EXPRRECOGTYPE_HCUTCAP) { serCap = mlistChildren.getFirst(); serBase = mlistChildren.getLast(); } else if (mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER) { serBase = mlistChildren.getFirst(); serUnder = mlistChildren.getLast(); } else { serCap = mlistChildren.getFirst(); serBase = mlistChildren.get(1); serUnder = mlistChildren.getLast(); } if (serCap != null) { rectifyMisRecogCapUnderNotesChar(clm, serCap); } rectifyMisRecogCUBaseChar(clm, serBase); if (serUnder != null) { rectifyMisRecogCapUnderNotesChar(clm, serUnder); } break; } case EXPRRECOGTYPE_VBLANKCUT: { for (int idx = 0; idx < mlistChildren.size(); idx ++) { StructExprRecog serThisChild = mlistChildren.get(idx); StructExprRecog serThisChildPrinciple = serThisChild.getPrincipleSER(4); // get principle from upper or lower notes. if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx < (mlistChildren.size() - 1) && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) { // should change { to ( if the following ser is not a mult exprs nor a matrix serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_ROUND_BRACKET, serThisChild.mstrFont); } else if (serThisChildPrinciple.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChildPrinciple.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE && idx > 0 && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) { // should change } to ) if the previous ser is not a mult exprs nor a matrix serThisChildPrinciple.changeSEREnumType(UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET, serThisChildPrinciple.mstrFont); } else if (idx < mlistChildren.size() - 1) { StructExprRecog serThisChildPrincipleCapUnderUL = serThisChild.getPrincipleSER(5); if (serThisChildPrincipleCapUnderUL.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChildPrincipleCapUnderUL.mType == UnitProtoType.Type.TYPE_SMALL_F && serThisChildPrincipleCapUnderUL.mstrFont.equalsIgnoreCase("cambria_italian_48_thinned") // only this font of small f can be misrecognized integrate. && serThisChild.mlistChildren.size() == 3) { // implies that there are upper note and lower note. So it should be integrate. serThisChildPrincipleCapUnderUL.changeSEREnumType(UnitProtoType.Type.TYPE_INTEGRATE, serThisChildPrinciple.mstrFont); } } if (idx == 0) { if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && !serThisChild.isLetterChar() && !serThisChild.isNumericChar() && !serThisChild.isBoundChar() && !serThisChild.isIntegTypeChar() && !serThisChild.isPreUnOptChar() && !serThisChild.isPreUnitChar() && !serThisChild.isSIGMAPITypeChar()) { // this letter might be miss recognized, look for another candidate. LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isLetterChar(listCands.get(idx1).mType) || isNumericChar(listCands.get(idx1).mType) || isBoundChar(listCands.get(idx1).mType) || isIntegTypeChar(listCands.get(idx1).mType) || isPreUnOptChar(listCands.get(idx1).mType) || isPreUnitChar(listCands.get(idx1).mType)) { // ok, change it to the new char serThisChild.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont); break; } } } } else if (idx == mlistChildren.size() - 1) { if (serThisChildPrinciple.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && !serThisChildPrinciple.isLetterChar() && !serThisChildPrinciple.isNumberChar() && !serThisChildPrinciple.isCloseBoundChar() && !serThisChildPrinciple.isPostUnOptChar() && !serThisChildPrinciple.isPostUnitChar()) { // this letter might be miss recognized, look for another candidate. LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChildPrinciple.mType, serThisChildPrinciple.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isLetterChar(listCands.get(idx1).mType) || isNumberChar(listCands.get(idx1).mType) || isCloseBoundChar(listCands.get(idx1).mType) || isPostUnOptChar(listCands.get(idx1).mType) || isPostUnitChar(listCands.get(idx1).mType)) { // ok, change it to the new char serThisChildPrinciple.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serThisChildPrinciple.mstrFont:listCands.get(idx1).mstrFont); break; } } } } else { StructExprRecog serPrevChild = mlistChildren.get(idx - 1); StructExprRecog serNextChild = mlistChildren.get(idx + 1); if (serPrevChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serNextChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) { if (!serPrevChild.isLetterChar() && !serPrevChild.isNumericChar() && !serPrevChild.isCloseBoundChar() && !serPrevChild.isPostUnitChar() && !serNextChild.isLetterChar() && !serNextChild.isNumericChar() && !serNextChild.isBoundChar() && !serNextChild.isPreUnitChar() && !serNextChild.isIntegTypeChar() && !serNextChild.isSIGMAPITypeChar() && (!serPrevChild.isPostUnOptChar() || !serNextChild.isPreUnOptChar()) && !serThisChildPrinciple.isLetterChar() && !serThisChildPrinciple.isNumericChar()) { // this letter might be miss recognized, look for another candidate. LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChildPrinciple.mType, serThisChildPrinciple.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isLetterChar(listCands.get(idx1).mType) || isNumericChar(listCands.get(idx1).mType)) { // ok, change it to the new char serThisChildPrinciple.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serThisChildPrinciple.mstrFont:listCands.get(idx1).mstrFont); break; } } } else if ((serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_X || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_X) && serPrevChild.isPossibleNumberChar() && serNextChild.getPrincipleSER(4).isPossibleNumberChar() && (serNextChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE || serNextChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_VCUTUPPERNOTE) && serPrevChild.getBottomPlus1() - serThisChild.getBottomPlus1() >= 0 && serNextChild.getPrincipleSER(4).getBottomPlus1() - serThisChild.getBottomPlus1() >= 0 && (serThisChild.mnTop - serPrevChild.mnTop) >= serThisChild.mnHeight * ConstantsMgr.msdCrosMultiplyLowerThanNeighbor && (serThisChild.mnTop - serNextChild.getPrincipleSER(4).mnTop) >= serThisChild.mnHeight * ConstantsMgr.msdCrosMultiplyLowerThanNeighbor) { // cross multiply may be misrecognized as x or X. But corss multiply generally is shorter and lower than its left and right neighbours. serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_MULTIPLY, serThisChild.mstrFont); } else if (serPrevChild.isNumericChar() && serThisChild.isLetterChar() && serNextChild.isNumericChar()) { // this letter might be miss recognized, look for another candidate. this is for the case like 3S4 LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isNumberChar(listCands.get(idx1).mType)) { // ok, change it to the new char serThisChild.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont); break; } } } else if (serPrevChild.isBiOptChar() && !serPrevChild.isPossibleNumberChar() && !serPrevChild.isPostUnOptChar() && serNextChild.isNumericChar() && !serThisChild.isNumberChar() && !serThisChild.isLetterChar() && !serThisChild.isBoundChar()) { // this is for the case like +]9 LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isNumberChar(listCands.get(idx1).mType) || isLetterChar(listCands.get(idx1).mType) || isBoundChar(listCands.get(idx1).mType)) { // ok, change it to the new char serThisChild.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont); break; } } } else if (serThisChild.mType == UnitProtoType.Type.TYPE_MULTIPLY && ((serPrevChild.isBiOptChar() && !serPrevChild.isPossibleNumberChar() /* && !serPrevChild.isLetterChar()*/) // | can be misrecognized number 1. || (serNextChild.isBiOptChar() && !serNextChild.isPossibleNumberChar() /* && !serNextChild.isLetterChar()*/))) { // convert like ...\multiply=... to ...x=.... // we specify multiply because this is very special case. No other situation when this child is operator would be like this. // moreover, generally if we see two continous biopts, we don't know which one is misrecognized. But here we know. serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_SMALL_X, serThisChild.mstrFont); } } } } break; } case EXPRRECOGTYPE_VCUTLEFTTOPNOTE: case EXPRRECOGTYPE_VCUTUPPERNOTE: case EXPRRECOGTYPE_VCUTLOWERNOTE: case EXPRRECOGTYPE_VCUTLUNOTES: { StructExprRecog serLeftTopNote = null, serUpperNote = null, serLowerNote = null, serBase = null; if (mnExprRecogType == EXPRRECOGTYPE_VCUTLEFTTOPNOTE) { serLeftTopNote = mlistChildren.getFirst(); serBase = mlistChildren.getLast(); } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE) { serBase = mlistChildren.getFirst(); serUpperNote = mlistChildren.getLast(); } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE) { serBase = mlistChildren.getFirst(); serLowerNote = mlistChildren.getLast(); } else { serBase = mlistChildren.getFirst(); serLowerNote = mlistChildren.get(1); serUpperNote = mlistChildren.getLast(); } if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serLowerNote.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serLowerNote.mType == UnitProtoType.Type.TYPE_DOT && serBase.isLetterChar()) { LinkedList<CharCandidate> listCands = clm.findCharCandidates(serBase.mType, serBase.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isNumberChar(listCands.get(idx1).mType)) { // ok, change it to a number. serBase.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serBase.mstrFont:listCands.get(idx1).mstrFont); break; } } } else if ((mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE) // if it is upper lower note, then it is an integrate && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serBase.isIntegTypeChar()) { // this seems to be a function. LinkedList<CharCandidate> listCands = clm.findCharCandidates(serBase.mType, serBase.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isLetterChar(listCands.get(idx1).mType)) { // ok, change it to a letter. serBase.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serBase.mstrFont:listCands.get(idx1).mstrFont); break; } } } else { if (serLeftTopNote != null) { rectifyMisRecogCapUnderNotesChar(clm, serLeftTopNote); } if (serUpperNote != null) { rectifyMisRecogCapUnderNotesChar(clm, serUpperNote); } if (serLowerNote != null) { rectifyMisRecogCapUnderNotesChar(clm, serLowerNote); } rectifyMisRecogLUNotesBaseChar(clm, serBase); } break; } case EXPRRECOGTYPE_GETROOT: { StructExprRecog serRootLevel = mlistChildren.getFirst(); StructExprRecog serRootedExpr = mlistChildren.getLast(); if (serRootLevel.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && !serRootLevel.isLetterChar() && !serRootLevel.isNumberChar() && !serRootLevel.isSqrtTypeChar()) { // this letter might be miss recognized, look for another candidate. LinkedList<CharCandidate> listCands = clm.findCharCandidates(serRootLevel.mType, serRootLevel.mstrFont); for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) { if (isLetterChar(listCands.get(idx1).mType) || isNumberChar(listCands.get(idx1).mType)) { // ok, change it to the new char serRootLevel.changeSEREnumType(listCands.get(idx1).mType, (listCands.get(idx1).mstrFont.length() == 0)?serRootLevel.mstrFont:listCands.get(idx1).mstrFont); break; } } } rectifyMisRecogNumLetter(clm, serRootedExpr); break; } default: { // EXPRRECOGTYPE_LISTCUT do nothing. } } // rectify its children. if (mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) { for (int idx = 0; idx < mlistChildren.size(); idx ++) { mlistChildren.get(idx).rectifyMisRecogChars1stRnd(clm); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testInvalidTextValueWithBrokenUTF8() throws Exception\n {\n final byte[] input = readResource(\"/data/clusterfuzz-cbor-35979.cbor\");\n try (JsonParser p = MAPPER.createParser(input)) {\n assertToken(JsonToken.VALUE_STRING, p.nextToken());\n p.getText();\n fail(\"Should not pass\");\n } catch (StreamReadException e) {\n verifyException(e, \"Truncated UTF-8 character in Short Unicode Name (36 bytes)\");\n }\n\n }", "private String avoidErrorChar (String original) {\n\t\tStringBuffer modSB = new StringBuffer();\n\t\tfor (int j=0; j < original.length(); j++) {\n\t\t\tchar c = original.charAt(j);\n\t\t\tif (c == '\\n') {\n\t\t\t\tmodSB.append(\"\\\\n\"); // rimpiazzo il ritorno a capo con il simbolo \\n\n\t\t\t} else if (c == '\"') {\n\t\t\t\tmodSB.append(\"''\"); // rimpiazzo le doppie virgolette (\") con due apostofi ('')\n\t\t\t} else if ((int)c > 31 || (int)c !=127){ // non stampo i primi 32 caratteri di controllo\n\t\t\t\tmodSB.append(c);\n\t\t\t}\n\t\t}\n\t\treturn modSB.toString();\n\t}", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "private boolean isNonCharacter(int c) {\n return (c & 0xFFFE) == 0xFFFE;\n }", "private String validateChar(String text) {\n char[] validChars = new char[text.length()];\n int validCount = 0;\n for (int i = 0; i < text.length(); i++) {\n char c = text.charAt(i);\n boolean valid = (c >= 0x20 && c <= 0xd7ff) || (c >= 0xe000 && c <= 0xfffd);\n if (valid) {\n validChars[validCount++] = c;\n } else {\n if (c == 10) // LineBreak\n {\n validChars[validCount++] = c;\n }\n }\n }\n return new String(validChars, 0, validCount);\n }", "private void validCharachter() throws DisallowedCharachter {\n if (!test.equals(\"X\") && !test.equals(\"O\")) {\n throw (new DisallowedCharachter());\n }\n }", "private boolean isOK(char ch) {\n if(String.valueOf(ch).matches(\"[<|\\\\[|\\\\-|\\\\||&|a-z|!]\")){\n return true;\n }\n return false;\n }", "private boolean hasSpecialCharacters(String s) {\r\n\t\t\tif (s != s.replaceAll(\"([^A-Za-z0-9.,!?~`'\\\"% _-]+)\", \"\")) return true;\r\n\t\t\treturn false;\r\n\t}", "public void removeJunkOrUnwantedCharFromString() {\n\t\tString str = \"hello@#4kjk122\";\n\t\tstr = str.replaceAll(\"[^a-zA-z0-9]\", \"\");\n\t\t// if we don't put ^ in above statement it will remove a to z charac and numbers\n\t\tSystem.out.println(str);\n\t}", "static public char replaceInvalid(char in) {\r\n\t\tif(0x20 <= in && in <= 0xd7ff) return in;\r\n\t\tif(in == 0x9 || in == 0xa || in == 0xd) return in;\r\n\t\tif(0xe000 <= in && in <= 0xfffd) return in;\r\n\t\tif(0x10000 <= in && in <= 0x10ffff) return in;\r\n\t\treturn '?';\r\n\t}", "public static String processSpecialCharacter(String owl) {\r\n\t\towl = Normalizer.normalize(owl, Normalizer.Form.NFD);\r\n\t\towl = owl.replaceAll(\"[^\\\\p{ASCII}]\", \"\");\r\n\t\treturn owl;\r\n\t}", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "private static int specialChar(char ch) {\n if ((ch > '\\u0621' && ch < '\\u0626') ||\n (ch == '\\u0627') ||\n (ch > '\\u062E' && ch < '\\u0633') ||\n (ch > '\\u0647' && ch < '\\u064A') ||\n (ch == '\\u0629')) {\n return 1;\n } else if (ch >= '\\u064B' && ch<= '\\u0652') {\n return 2;\n } else if (ch >= 0x0653 && ch <= 0x0655 ||\n ch == 0x0670 ||\n ch >= 0xFE70 && ch <= 0xFE7F) {\n return 3;\n } else {\n return 0;\n }\n }", "private static boolean isUnreservedCharacter(char p_char) {\n return (p_char <= '~' && (fgLookupTable[p_char] & MASK_UNRESERVED_MASK) != 0);\n }", "private String sanitizeSpecialChars(String value) {\n return value.replaceAll(\"[^a-zA-Z0-9_]\", \"_\");\n }", "public static String removeInvalidCharacteres(String string) {\n\t\tString corretString = string;\n\t\tif (containsInvalidCharacterInLogin(string)) {\n\t\t\tString regex = \"[|\\\"&*=+'@#$%\\\\/?{}?:;~<>,\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D8\\u0152\\u00DE\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u0178\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F8\\u0153\\u00DF\\u00FE\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FF]\";\n\t\t\tPattern p = Pattern.compile(regex);\n\t\t\tMatcher m = p.matcher(string);\n\t\t\tcorretString = m.replaceAll(\"\");\n\t\t\t//System.out.println(corretString);\n\t\t}\n\t\t\n\t\tcorretString = corretString.replace(\"\\\\\", \"\");\n\t\t\n\t\treturn corretString;\n\t}", "private String removeSpecialCharacters(String word)\n\t{\n\t\tString newString = \"\";\n\n\t\tfor (int i = 0; i < word.length(); i++)\n\t\t{\n\t\t\tif (word.charAt(i) != '?' && word.charAt(i) != '!' && word.charAt(i) != '\"' && word.charAt(i) != '\\''\n\t\t\t\t\t&& word.charAt(i) != '#' && word.charAt(i) != '(' && word.charAt(i) != ')' && word.charAt(i) != '$'\n\t\t\t\t\t&& word.charAt(i) != '%' && word.charAt(i) != ',' && word.charAt(i) != '&')\n\t\t\t{\n\t\t\t\tnewString += word.charAt(i);\n\t\t\t}\n\t\t}\n\n\t\treturn newString;\n\t}", "private static void testBadChars() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTEST BAD CHARS: BAD CHARS ON LINES 1-5\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inBadChars\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inBadChars not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\tif (token.sym != sym.EOF) {\n\t System.err.println(\"ERROR TESTING BAD CHARS: not at EOF\");\n\t}\n }", "@Override\n public void handleSpecialChar(\n com.globalsight.ling.docproc.extractor.html.HtmlObjects.Text t)\n {\n\n }", "private static boolean m66068b(String str) {\n for (int i = 0; i < str.length(); i++) {\n char charAt = str.charAt(i);\n if (charAt <= 31 || charAt >= 127 || \" #%/:?@[\\\\]\".indexOf(charAt) != -1) {\n return true;\n }\n }\n return false;\n }", "private boolean isChar(char c){\n\t\tif(Character.isISOControl(c))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "final protected String translateSpecialChars(String title)\r\n {\r\n int start;\r\n\tint i;\r\n\t// HTML representation of selected extended chars\r\n\tString rawString[]={\r\n\t\t\t\t\t\t \"&aacute;\",\"&acirc;\",\"&aelig;\",\r\n\t\t\t\t\t\t \"&agrave;\",\"&auml;\",\"&ccedil;\",\r\n\t\t\t\t\t\t \"&eacute;\",\"&ecirc;\",\"&egrave;\",\r\n\t\t\t\t \"&euml;\",\"&icirc;\",\"&iuml;\",\r\n\t\t\t\t \"&ocirc;\",\"&ouml;\",\"&szlig;\",\r\n\t\t\t\t \"&uuml;\",\"&yuml;\",\"&copy;\",\r\n\t\t\t\t \"&pound;\",\"&reg;\",\"&lt;\",\r\n\t\t\t\t \"&gt;\",\"&amp;\",\"&quot;\",\r\n \t\t\t\t\t \"&atilde;\",\"&aring;\",\"&igrave;\",\r\n\t\t\t\t\t \"&iacute;\",\"&eth;\",\"&ntilde;\",\r\n\t\t\t\t\t \"&ograve;\",\"&oacute;\",\"&otilde;\",\r\n\t\t\t\t\t \"&divide;\",\"&oslash;\",\"&ugrave;\",\r\n\t\t\t\t\t \"&uacute;\",\"&ucirc;\",\"&yacute;\",\r\n\t\t\t\t\t \"&thorn;\",\"&times;\",\"&nbsp;\",\r\n\t\t\t\t\t \"&sect;\",\"&cent;\",\"&deg;\"\r\n\t\t\t\t\t };\r\n // Unicode representation of above\r\n\tchar translatedChar[]={\r\n\t\t\t\t\t\t\t'\\u00e1','\\u00e2','\\u00e6',\r\n\t\t\t\t\t\t\t'\\u00e0','\\u00e4','\\u00e7',\r\n\t\t\t\t\t\t\t'\\u00e9','\\u00ea','\\u00e8',\r\n\t\t\t\t\t\t\t'\\u00eb','\\u00ee','\\u00ef',\r\n\t\t\t\t\t\t\t'\\u00f4','\\u00f6','\\u00df',\r\n\t\t\t\t\t\t\t'\\u00fc','\\u00ff','\\u00a9',\r\n\t\t\t\t\t\t\t'\\u00a3','\\u00ae','\\u003c',\r\n\t\t\t\t\t\t\t'\\u003e','\\u0026','\\u0022',\r\n\t\t\t\t\t\t\t'\\u00e3','\\u00e5','\\u00ec',\r\n\t\t\t\t\t\t\t'\\u00ed','\\u00f0','\\u00f1',\r\n\t\t\t\t\t\t\t'\\u00f2','\\u00f3','\\u00f5',\r\n\t\t\t\t\t\t\t'\\u00f7','\\u00f8','\\u00f9',\r\n\t\t\t\t\t\t\t'\\u00fa','\\u00fb','\\u00fd',\r\n\t\t\t\t\t\t\t'\\u00fe','\\u00d7','\\u00a0',\r\n\t\t\t\t\t\t\t'\\u00a7','\\u00a2','\\u00b0'\r\n\t\t\t\t\t\t };\r\n StringBuffer translated=new StringBuffer(\"\");\r\n\tString titleString=title;\r\n\r\n\t//Check the title for each of the above HTML special chars\r\n\tfor(int loop=0;loop<NUMBER_SPECIAL_CHARS;loop++)\r\n\t{\r\n\t if(translated.length()>0)\r\n\t {\r\n\t titleString=translated.toString();\r\n\t\ttranslated=new StringBuffer(\"\");\r\n\t }\r\n\t start=titleString.indexOf(rawString[loop]);\r\n\t if(start!=-1)\r\n\t {\r\n\t //HTML special character found so replace it \r\n\t\t// with the unicode equalent for display.\r\n\t\tfor(i=0;i<start;i++)\r\n\t\t translated.insert(i,titleString.charAt(i));\r\n translated.append(translatedChar[loop]);\r\n\t\tfor(i=start+rawString[loop].length();i<titleString.length();i++)\r\n\t\t translated.append(titleString.charAt(i));\r\n\t }\r\n\t}\r\n\treturn (translated.length()==0) ? titleString : translated.toString();\r\n }", "private String validateWord (String word) {\r\n String chars = \"\";\r\n for (int i = 0; i < word.length (); ++i) {\r\n if (!Character.isLetter (word.charAt (i))) {\r\n chars += \"\\\"\" + word.charAt (i) + \"\\\" \";\r\n }\r\n }\r\n return chars;\r\n }", "private static char unescapeNonASCIIChar(String str) {\n\t\treturn (char) Integer.parseInt(str.substring(2, 4), 16);\n\t}", "public char getBadChar(){\n return badChar;\n }", "@Test\n\tpublic void caseNameWithSpecialChar() {\n\t\tString caseName = \"le@d\";\n\t\ttry {\n\t\t\tCaseManagerValidator.isCharAllowed(caseName);\n\t\t} catch (ValidationException e) {\n\t\t}\n\t}", "@Test\n public void testReplacingFailure()\n {\n String expectedValue=\"datly fry\",actualValue;\n actualValue=replaceingchar.replaceChar(inputString);\n assertNotEquals(expectedValue,actualValue);\n }", "@Test\n public void shouldParseNATIONAL_CHAR() {\n printTest(\"shouldParseNATIONAL_CHAR()\");\n String typeString = getDataTypeString(DataTypes.DTYPE_NATIONAL_CHAR);\n String content = typeString;\n\n DdlTokenStream tokens = getTokens(content);\n\n DataType dType = parser.parse(tokens);\n\n Assert.assertNotNull(\"DataType was NOT found for Type = \" + typeString, dType);\n Assert.assertEquals(\"Wrong DataType found\", typeString, dType.getName());\n\n content = typeString + \" (255)\";\n tokens = getTokens(content);\n\n dType = parser.parse(tokens);\n\n Assert.assertNotNull(\"DataType was NOT found for Type = \" + typeString, dType);\n Assert.assertEquals(\"Wrong DataType found\", typeString, dType.getName());\n Assert.assertEquals(\"DataType length is not correct\", 255, dType.getLength());\n }", "public static String convertText(String s) {\r\n StringCharacterIterator stringcharacteriterator = new StringCharacterIterator(s);\r\n StringBuffer stringbuffer = new StringBuffer();\r\n int ai[] = new int[s.length()];\r\n int i = 0;\r\n int j = 0;\r\n for(char c = stringcharacteriterator.first(); c != '\\uFFFF'; c = stringcharacteriterator.next())\r\n if(c == '%')\r\n {\r\n c = stringcharacteriterator.next();\r\n if(c != '%')\r\n {\r\n stringbuffer.append('%');\r\n c = stringcharacteriterator.previous();\r\n } else\r\n {\r\n c = stringcharacteriterator.next();\r\n switch(c)\r\n {\r\n case 37: // '%'\r\n stringbuffer.append('%');\r\n break;\r\n\r\n case 80: // 'P'\r\n case 112: // 'p'\r\n stringbuffer.append('\\361');\r\n break;\r\n\r\n case 67: // 'C'\r\n case 99: // 'c'\r\n stringbuffer.append('\\355');\r\n break;\r\n\r\n case 68: // 'D'\r\n case 100: // 'd'\r\n stringbuffer.append('\\u00b0');\r\n break;\r\n\r\n case 85: // 'U'\r\n case 117: // 'u'\r\n ai[stringbuffer.length()] ^= 1;\r\n i++;\r\n break;\r\n\r\n case 79: // 'O'\r\n case 111: // 'o'\r\n ai[stringbuffer.length()] ^= 2;\r\n j++;\r\n break;\r\n\r\n default:\r\n if(c >= '0' && c <= '9')\r\n {\r\n int k = 3;\r\n char c1 = (char)(c - 48);\r\n for(c = stringcharacteriterator.next(); c >= '0' && c <= '9' && --k > 0; c = stringcharacteriterator.next())\r\n c1 = (char)(10 * c1 + (c - 48));\r\n\r\n stringbuffer.append(c1);\r\n }\r\n c = stringcharacteriterator.previous();\r\n break;\r\n }\r\n }\r\n } else\r\n if(c == '^')\r\n {\r\n c = stringcharacteriterator.next();\r\n if(c == ' ')\r\n stringbuffer.append('^');\r\n } else\r\n {\r\n stringbuffer.append(c);\r\n }\r\n s = Unicode.char2DOS437(stringbuffer, 2, '?');\r\n\r\n\t\tString ss = s;\r\n\t\treturn ss;\r\n\t}", "public UnknownLabyrinthCharacterException(char c) {\r\n\t\tsuper(\"The unknown character\" + c + \"is not recognized.\");\r\n\t}", "public static String remove(String str){\n\t\tString str2 = str.trim();\n\t\tstr2 = str2.replaceAll(\"à|á|ả|ã|ạ|â|ầ|ấ|ẩ|ẫ|ậ|ằ|ắ|ẳ|ẵ|ặ|ă\", \"a\");\n\t\tstr2 = str2.replaceAll(\"í|ì|ỉ|ĩ|ị\",\"i\");\n\t\tstr2 = str2.replaceAll(\"ư|ứ|ừ|ử|ữ|ự|ú|ù|ủ|ũ|ụ\",\"u\");\n\t\tstr2 = str2.replaceAll(\"ế|ề|ể|ễ|ệ|é|è|ẻ|ẽ|ẹ|ê\",\"e\");\n\t\tstr2 = str2.replaceAll(\"ố|ồ|ổ|ỗ|ộ|ớ|ờ|ở|ỡ|ợ|ó|ò|ỏ|õ|ọ|ô|ơ\",\"o\");\n\t\tstr2= str2.replaceAll(\"ý|ỳ|ỷ|ỹ|ỵ\",\"y\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"Ấ|Ầ|Ẩ|Ẫ|Ậ|Ắ|Ằ|Ẳ|Ẵ|Ặ|Á|À|Ả|Ã|Ạ|Â|Ă\",\"A\");\n\t\tstr2 = str2.replaceAll(\"Í|Ì|Ỉ|Ĩ|Ị\",\"I\");\n\t\tstr2 = str2.replaceAll(\"Ứ|Ừ|Ử|Ữ|Ự|Ú|Ù|Ủ|Ũ|Ụ|Ư\",\"U\");\n\t\tstr2 = str2.replaceAll(\"Ế|Ề|Ể|Ễ|Ệ|É|È|Ẻ|Ẽ|Ẹ|Ê\",\"E\");\n\t\tstr2 = str2.replaceAll(\"Ố|Ồ|Ổ|Ô|Ộ|Ớ|Ờ|Ở|Ỡ|Ợ|Ó|Ò|Ỏ|Õ|Ọ|Ô|Ơ\",\"O\");\n\t\tstr2= str2.replaceAll(\"Ý|Ỳ|Ỷ|Ỹ|Ỵ\",\"Y\");\n\t\tstr2 = str2.replaceAll(\"đ\",\"d\");\n\t\tstr2 = str2.replaceAll(\"Đ\",\"D\");\n\t\t\n\t\tstr2 = str2.replaceAll(\"ò\", \"\");\n\t\treturn str2;\n\t}", "@Override\n public boolean isUnicode()\n {\n return true;\n }", "Alphabet(String chars) {\n _chars = sanitizeChars(chars);\n }", "public static boolean isUTF8MisInterpreted( String input ) {\n\t\treturn isUTF8MisInterpreted( input, \"Windows-1252\" ) ; \n\t}", "@Test\n\tpublic void testSpecialChars() {\n\t\tString ff = XStreamUtils.serialiseToXml(\"Form feed: \\f\");\n\t\tSystem.out.println(ff);\n\t\tObject s = XStreamUtils.serialiseFromXml(\"<S>&#xc;</S>\");\n\t\tSystem.out.println(ff);\n\t}", "@Test\n\tpublic void castNumbersFollowedByMultipleDifferentNonAlphapeticalCharacters() {\n\t\tString input = \"I have one~!@##$%^^&*( new test\";\n\n\t\tStringUtility stringUtility = new StringUtility();\n\t\tString actualCastedString = stringUtility.castWordNumberToNumber(input);\n\n\t\tString correctlyCastedString = \"I have 1~!@##$%^^&*( new test\";\n\n\t\tAssert.assertEquals(actualCastedString, correctlyCastedString);\n\t}", "public void addStrangeCharacter() {\n strangeCharacters++;\n }", "public String sanitizeChars(String chars) {\n String cleanchars = chars.replaceAll(\"\\\\s+\", \"\");\n if (checkDuplicates(chars)) {\n throw new EnigmaException(\"Alpha.sanitizeChars: Duplicate chars.\");\n }\n return cleanchars;\n }", "@Override\n public String postprocess ( String input ) {\n if (input == null || input.length() == 0)\n return input;\n \n \n char[] car = input.toCharArray();\n int maxLen = (allCharFixMaps.size() <= car.length) ? allCharFixMaps.size() : car.length;\n for(int i = 0; i < maxLen; i++) {\n HashMap<Character, Character> fixes = allCharFixMaps.get( i );\n if (fixes.containsKey( car[i] ))\n car[i] = fixes.get( car[i] );\n }\n return String.valueOf( car ).replaceAll( \" \", \"\" );\n }", "@Test\r\n public void testInvalidEncodings() {\r\n assertThatInputIsInvalid(\"NIX\");\r\n assertThatInputIsInvalid(\"UTF-9\");\r\n assertThatInputIsInvalid(\"ISO-8859-42\");\r\n }", "@Override\n public String getCharacterEncoding() {\n return null;\n }", "static boolean containsInvalidCharacters(String topic) {\n Matcher matcher = INVALID_CHARS_PATTERN.matcher(topic);\n return matcher.find();\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tString s = \"平仮�??stringabc片仮�??numbers 123漢字gh%^&*#$1@):\";\n\t\t\n\t\t//Regular Expression: [^a-zA-Z0-9]\n\t\t\n\t\ts = s.replaceAll(\"[^a-zA-Z0-9]\", \"-\"); // ^ symbol is used for not/except\n\t\tSystem.out.println(s);\n\t}", "@Test\n\tpublic void TestR1NonIntegerParseableChars() {\n\t\tString invalid_solution = \"a74132865635897241812645793126489357598713624743526189259378416467251938381964572\";\n\t\tassertEquals(-1, sv.verify(invalid_solution));\n\t}", "void checkCharacterSet(String value) throws TdtTranslationException {\r\n\t\tif (!charSetRegex.matcher(value).matches()) {\r\n\t\t\tthrow new TdtTranslationException(\r\n\t\t\t\t\t\"Invalid charakter in value field \" + getId());\r\n\t\t}\r\n\t}", "private final void m27213c(String str) {\n try {\n dr.m11790a((CharSequence) str, this.f20658c);\n } catch (Throwable e) {\n throw new zzc(e);\n }\n }", "public interface UnicodeConstants {\n\n /** Refers to unnormalized Unicode: */\n static final byte NORM_UNNORMALIZED = 0;\n /** Refers to Normalization Form C: */\n static final byte NORM_NFC = 1;\n /** Refers to Normalization Form KC: */\n static final byte NORM_NFKC = 2;\n /** Refers to Normalization Form D: */\n static final byte NORM_NFD = 3;\n /** Refers to Normalization Form KD: */\n static final byte NORM_NFKD = 4;\n /** Refers to Normalization Form THDL, which is NFD except for\n <code>U+0F77</code> and <code>U+0F79</code>, which are\n normalized according to NFKD. This is the One True\n Normalization Form, as it leaves no precomposed codepoints and\n does not normalize <code>U+0F0C</code>. */\n static final byte NORM_NFTHDL = 5;\n\n\n /** for those times when you need a char to represent a\n non-existent codepoint */\n static final char EW_ABSENT = '\\u0000';\n\n\n //\n // the thirty consonants, in alphabetical order:\n //\n\n /** first letter of the alphabet: */\n static final char EWC_ka = '\\u0F40';\n\n static final char EWC_kha = '\\u0F41';\n static final char EWC_ga = '\\u0F42';\n static final char EWC_nga = '\\u0F44';\n static final char EWC_ca = '\\u0F45';\n static final char EWC_cha = '\\u0F46';\n static final char EWC_ja = '\\u0F47';\n static final char EWC_nya = '\\u0F49';\n static final char EWC_ta = '\\u0F4F';\n static final char EWC_tha = '\\u0F50';\n static final char EWC_da = '\\u0F51';\n static final char EWC_na = '\\u0F53';\n static final char EWC_pa = '\\u0F54';\n static final char EWC_pha = '\\u0F55';\n static final char EWC_ba = '\\u0F56';\n static final char EWC_ma = '\\u0F58';\n static final char EWC_tsa = '\\u0F59';\n static final char EWC_tsha = '\\u0F5A';\n static final char EWC_dza = '\\u0F5B';\n static final char EWC_wa = '\\u0F5D';\n static final char EWC_zha = '\\u0F5E';\n static final char EWC_za = '\\u0F5F';\n /** Note the irregular name. The Extended Wylie representation is\n <code>'a</code>. */\n static final char EWC_achung = '\\u0F60';\n static final char EWC_ya = '\\u0F61';\n static final char EWC_ra = '\\u0F62';\n static final char EWC_la = '\\u0F63';\n static final char EWC_sha = '\\u0F64';\n static final char EWC_sa = '\\u0F66';\n static final char EWC_ha = '\\u0F67';\n /** achen, the 30th consonant (and, some say, the fifth vowel) DLC NOW FIXME: rename to EWC_achen */\n static final char EWC_a = '\\u0F68';\n\n\n /** In the word for father, \"pA lags\", there is an a-chung (i.e.,\n <code>\\u0F71</code>). This is the constant for that little\n guy. */\n static final char EW_achung_vowel = '\\u0F71';\n\n\n /* Four of the five vowels, some say, or, others say, \"the four\n vowels\": */\n /** \"gi gu\", the 'i' sound in the English word keep: */\n static final char EWV_i = '\\u0F72';\n /** \"zhabs kyu\", the 'u' sound in the English word tune: */\n static final char EWV_u = '\\u0F74';\n /** \"'greng bu\" (also known as \"'greng po\", and pronounced <i>dang-bo</i>), the 'a' sound in the English word gate: */\n static final char EWV_e = '\\u0F7A';\n /** \"na ro\", the 'o' sound in the English word bone: */\n static final char EWV_o = '\\u0F7C';\n\n\n /** subscribed form of EWC_wa, also known as wa-btags */\n static final char EWSUB_wa_zur = '\\u0FAD';\n /** subscribed form of EWC_ya */\n static final char EWSUB_ya_btags = '\\u0FB1';\n /** subscribed form of EWC_ra */\n static final char EWSUB_ra_btags = '\\u0FB2';\n /** subscribed form of EWC_la */\n static final char EWSUB_la_btags = '\\u0FB3';\n}", "public static void main(String[] args) {\n\n \tString str = \"123abc你好efc\";\n\n \tString reg = \"[\\u4e00-\\u9fa5]\";\n\n \tPattern pat = Pattern.compile(reg); \n\n \tMatcher mat=pat.matcher(str); \n\n \tString repickStr = mat.replaceAll(\"\");\n\n \tSystem.out.println(\"去中文后:\"+repickStr);\n\n}", "public void setNChar()\n/* */ {\n/* 1168 */ this.isNChar = true;\n/* */ }", "private String composeCharacterString(String string) {\n return null;\r\n }", "private static boolean isLamAlefChar(char ch) {\n return ch >= '\\uFEF5' && ch <= '\\uFEFC';\n }", "private static String RemoveSpecialCharacter (String s1) {\n String tempResult=\"\";\n for (int i=0;i<s1.length();i++) {\n if (s1.charAt(i)>64 && s1.charAt(i)<=122){\n tempResult=tempResult+s1.charAt(i);\n }\n }\n return tempResult;\n }", "@Test\n public void checkCharacterTypesRuleUnknownType() {\n final String[] original = { \"fooBAR\" };\n final String[] pass_types = { \"some_unknown_keyword\" };\n exception.expect(ConfigException.class);\n // TODO(dmikurube): Except \"Caused by\": exception.expectCause(instanceOf(JsonMappingException.class));\n // Needs to import org.hamcrest.Matchers... in addition to org.junit...\n checkCharacterTypesRuleInternal(original, original, pass_types, \"\");\n }", "private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private static String guessAppropriateEncoding(CharSequence contents) {\n\t\tfor (int i = 0; i < contents.length(); i++) {\n\t\t\tif (contents.charAt(i) > 0xFF) {\n\t\t\t\treturn \"UTF-8\";\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private String quitarCaracteresNoImprimibles(String mensaje) {\n String newMensaje = \"\";\n int codigoLetra = 0;\n for (char letra : mensaje.toCharArray()) {\n codigoLetra = (int) letra;\n if (codigoLetra >= 32 && codigoLetra <= 128) {\n newMensaje += letra;\n }\n }\n return newMensaje;\n }", "private boolean isAlfabetico(char unChar) {\r\n\t\tswitch (unChar) {\r\n\t\tcase 'A':\r\n\t\t\treturn true;\r\n\t\tcase 'B':\r\n\t\t\treturn true;\r\n\t\tcase 'C':\r\n\t\t\treturn true;\r\n\t\tcase 'D':\r\n\t\t\treturn true;\r\n\t\tcase 'E':\r\n\t\t\treturn true;\r\n\t\tcase 'F':\r\n\t\t\treturn true;\r\n\t\tcase 'G':\r\n\t\t\treturn true;\r\n\t\tcase 'H':\r\n\t\t\treturn true;\r\n\t\tcase 'I':\r\n\t\t\treturn true;\r\n\t\tcase 'J':\r\n\t\t\treturn true;\r\n\t\tcase 'K':\r\n\t\t\treturn true;\r\n\t\tcase 'L':\r\n\t\t\treturn true;\r\n\t\tcase 'M':\r\n\t\t\treturn true;\r\n\t\tcase 'N':\r\n\t\t\treturn true;\r\n\t\tcase 'Ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'O':\r\n\t\t\treturn true;\r\n\t\tcase 'P':\r\n\t\t\treturn true;\r\n\t\tcase 'Q':\r\n\t\t\treturn true;\r\n\t\tcase 'R':\r\n\t\t\treturn true;\r\n\t\tcase 'S':\r\n\t\t\treturn true;\r\n\t\tcase 'T':\r\n\t\t\treturn true;\r\n\t\tcase 'U':\r\n\t\t\treturn true;\r\n\t\tcase 'V':\r\n\t\t\treturn true;\r\n\t\tcase 'W':\r\n\t\t\treturn true;\r\n\t\tcase 'X':\r\n\t\t\treturn true;\r\n\t\tcase 'Y':\r\n\t\t\treturn true;\r\n\t\tcase 'Z':\r\n\t\t\treturn true;\r\n\t\tcase 'a':\r\n\t\t\treturn true;\r\n\t\tcase 'b':\r\n\t\t\treturn true;\r\n\t\tcase 'c':\r\n\t\t\treturn true;\r\n\t\tcase 'd':\r\n\t\t\treturn true;\r\n\t\tcase 'e':\r\n\t\t\treturn true;\r\n\t\tcase 'f':\r\n\t\t\treturn true;\r\n\t\tcase 'g':\r\n\t\t\treturn true;\r\n\t\tcase 'h':\r\n\t\t\treturn true;\r\n\t\tcase 'i':\r\n\t\t\treturn true;\r\n\t\tcase 'j':\r\n\t\t\treturn true;\r\n\t\tcase 'k':\r\n\t\t\treturn true;\r\n\t\tcase 'l':\r\n\t\t\treturn true;\r\n\t\tcase 'm':\r\n\t\t\treturn true;\r\n\t\tcase 'n':\r\n\t\t\treturn true;\r\n\t\tcase 'ñ':\r\n\t\t\treturn true;\r\n\t\tcase 'o':\r\n\t\t\treturn true;\r\n\t\tcase 'p':\r\n\t\t\treturn true;\r\n\t\tcase 'q':\r\n\t\t\treturn true;\r\n\t\tcase 'r':\r\n\t\t\treturn true;\r\n\t\tcase 's':\r\n\t\t\treturn true;\r\n\t\tcase 't':\r\n\t\t\treturn true;\r\n\t\tcase 'u':\r\n\t\t\treturn true;\r\n\t\tcase 'v':\r\n\t\t\treturn true;\r\n\t\tcase 'w':\r\n\t\t\treturn true;\r\n\t\tcase 'x':\r\n\t\t\treturn true;\r\n\t\tcase 'y':\r\n\t\t\treturn true;\r\n\t\tcase 'z':\r\n\t\t\treturn true;\r\n\t\tcase ' ':\r\n\t\t\treturn true;\r\n\t\tcase '*':\r\n\t\t\treturn true;// debido a búsquedas\r\n\t\tdefault:\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private String stripNoneWordChars(String uncleanString) {\n return uncleanString.replace(\".\", \" \").replace(\":\", \" \").replace(\"@\", \" \").replace(\"-\", \" \").replace(\"_\", \" \").replace(\"<\", \" \").replace(\">\", \" \");\n\n }", "private String getSpecialToken(char[] characters) \n\t{\n\t\tString currentToken = \"\";\n\t\t//pos of current character\n\t\tint i;\n\t\t//look at each character\n\t\tfor (i=0; i<characters.length; i++)\n\t\t{\n\t\t\t//working with char ch\n\t\t\tchar ch = characters[i];\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\t\t\t//check if token is in core\n\t\t\tboolean isCore = core.containsKey(currentToken+ch);\n\t\t\t\n\t\t\t//not whitespace and new ch is an integer.\n\t\t\tif (!ws && Objects.equals(type, \"special\"))\n\t\t\t{\n\t\t\t\t//check if next character makes currentToken also special\n\t\t\t\tif ( i+1 < characters.length && core.containsKey(currentToken+ch+characters[i+1]) )\n\t\t\t\t{\n\t\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t\t}\n\t\t\t\telse if ( isCore ) //token is in core but token.concant(ch) is not!\n\t\t\t\t{\n\t\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t\t\treturn currentToken;\n\t\t\t\t}\n\t\t\t\telse //not a real special character\n\t\t\t\t{\n\t\t\t\t\t//shouldn't ever see this.\n\t\t\t\t\tSystem.out.println(\"\\n\"+ch+\" is not a valid symbol\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//not whitespace and special ch\n\t\t\telse if ( ws )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse //not whitespace, not special token, not valid special\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n\"+currentToken+ch+\" is not a valid token!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process\n\t\treturn currentToken;\n\t}", "public void correctStrings() {\n this.content = StringUtils.correctWhiteSpaces(content);\n }", "private String prepare(String originStr)\r\n {\r\n String result=originStr.toLowerCase();\r\n result = result.replace('ä','a');\r\n result = result.replace('ö','o');\r\n result = result.replace('ü','u');\r\n// result = result.replace(':',' ');\r\n// result = result.replace(';',' ');\r\n// result = result.replace('<',' ');\r\n// result = result.replace('>',' ');\r\n// result = result.replace('=',' ');\r\n// result = result.replace('?',' ');\r\n// result = result.replace('[',' ');\r\n// result = result.replace(']',' ');\r\n// result = result.replace('/',' ');\r\n return result;\r\n }", "private static boolean isHangulWithoutJamoT(char paramChar)\n/* */ {\n/* 324 */ paramChar = (char)(paramChar - 44032);\n/* 325 */ return (paramChar < '⮤') && (paramChar % '\\034' == 0);\n/* */ }", "@Test(expected = Inputfault.class)\r\n public void classCrashInvalidChar() throws Inputfault {\r\n LocationServiceImpl lSI = new LocationServiceImpl();\r\n\r\n lSI.locationService(\"3731@X\"); // this postcode has a @ which is an illegal character\r\n }", "@Test\n public void Test4216006() throws Exception {\n boolean caughtException = false;\n try {\n new RuleBasedCollator(\"\\u00e0<a\\u0300\");\n }\n catch (ParseException e) {\n caughtException = true;\n }\n if (!caughtException) {\n throw new Exception(\"\\\"a<a\\\" collation sequence didn't cause parse error!\");\n }\n\n RuleBasedCollator collator = new RuleBasedCollator(\"&a<\\u00e0=a\\u0300\");\n //commented by Kevin 2003/10/21 \n //for \"FULL_DECOMPOSITION is not supported here.\" in ICU4J DOC\n //collator.setDecomposition(Collator.FULL_DECOMPOSITION);\n collator.setStrength(Collator.IDENTICAL);\n\n String[] tests = {\n \"a\\u0300\", \"=\", \"\\u00e0\",\n \"\\u00e0\", \"=\", \"a\\u0300\"\n };\n\n compareArray(collator, tests);\n }", "@BeforeEach\n\tvoid setUpInvalidRE(){\n\t\tinvalidRE= new String[lengthInvalid];\n\t\t// (ab\n\t\tinvalidRE[0] = \"(ab\";\n\t\t// ab)\n\t\tinvalidRE[1] = \"ab)\";\n\t\t// *\n\t\tinvalidRE[2] = \"*\";\n\t\t// ?\n\t\tinvalidRE[3] = \"?\";\n\t\t// +\n\t\tinvalidRE[4] = \"+\";\n\t\t// a | b | +c\n\t\tinvalidRE[5] = \"a | b | +c\";\n\t\t// a | b | *c\n\t\tinvalidRE[6] = \"a | b | *c\";\n\t\t// a | b | ?c\n\t\tinvalidRE[7] = \"a | b | ?c\";\n\t\t// a | b | | c\n\t\tinvalidRE[8] = \"a | b | | c\";\n\t\t// uneven parenthesis\n\t\tinvalidRE[9] = \"(a(b(c(d)*)+)*\";\n\t\t// a | b |\n\t\tinvalidRE[10] = \"a | b | \";\n\t\t// invalid symbols\n\t\tinvalidRE[11] = \"a | b | $ | -\";\n\t\t// (*)\n\t\tinvalidRE[12] = \"(*)\";\n\t\t// (|a)\n\t\tinvalidRE[13] = \"(|a)\";\n\t\t// (.b)\n\t\tinvalidRE[14] = \"(.b)\";\n\t}", "private boolean validWord(String word) {\n\t\tPattern p = Pattern.compile(\"[!@#$%&*()_+=|<>?{}\\\\[\\\\]~,;:/§.£/{}¨\\\"]\");\n\t\tMatcher m = p.matcher(word);\n\t\treturn !m.find();\n\t}", "public static String sanitizeForMRS(String in) {\r\n\t\treturn in.replaceAll(\"[\\\"\\u2018\\u2019\\u201c\\u201d]\", \"'\").replaceAll(\"[\\u2026\\u22ef]\", \"...\").replaceAll(\"[\\u2010\\u2011\\u2012\\u2013\\u2014\\u2015]\", \"-\").replaceAll(\"[&+]\", \"and\");\r\n\t}", "@org.junit.Test\n public static final void testSupplementaryCodepointEncoding() {\n junit.framework.TestCase.assertEquals(\"&#x2f81a; | &#x2f81a; | &#x2f81a;\", eu.stamp_project.reneri.instrumentation.StateObserver.observe(\"org.owasp.html.HtmlSanitizerTest|testSupplementaryCodepointEncoding()|0\", org.owasp.html.HtmlSanitizerTest.sanitize(\"&#x2F81A; | \\ud87e\\udc1a | &#xd87e;&#xdc1a;\")));\n }", "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "private String RemoveCharacter(String strName) {\r\n String strRemover = \"( - )|( · )\";\r\n String[] strTemp = strName.split(strRemover);\r\n if (strTemp.length >= 2) {\r\n strName = strTemp[0].trim() + \" - \" + strTemp[1].trim();\r\n }\r\n\r\n strName = strName.replace(\"–\", \"-\");\r\n strName = strName.replace(\"’\", \"'\");\r\n strName = strName.replace(\":\", \",\");\r\n\r\n strName = strName.replace(\"VA - \", \"\");\r\n strName = strName.replace(\"FLAC\", \"\");\r\n return strName;\r\n }", "@Test(timeout = 4000)\n public void test086() throws Throwable {\n String string0 = SQLUtil.normalize(\"aT:7W`oI)N(jLl^oF<HQ\", false);\n assertEquals(\"aT : 7W ` oI) N (jLl ^ oF < HQ\", string0);\n }", "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "@Test(timeout = 4000)\n public void test068() throws Throwable {\n StringReader stringReader0 = new StringReader(\"%Jo{\\\"m8'0fuS\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 77, 77);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"%\", token0.toString());\n }", "protected static String sanitise(final String name) {\n // Replace illegal chars with\n return name.replaceAll(\"[^\\\\w\\\\.\\\\s\\\\-#&_]\", \"_\");\n }", "private static boolean isReservedCharacter(char p_char) {\n return (p_char <= ']' && (fgLookupTable[p_char] & RESERVED_CHARACTERS) != 0);\n }", "private boolean checkInputContent(String contents){\n try {\n char[] temC = contents.toCharArray();\n for (int i=0;i<temC.length;i++) {\n char mid = temC[i];\n if(mid>=48&&mid<=57){//数字\n continue;\n }\n if(mid>=65&&mid<=90){//大写字母\n continue ;\n }\n if(mid>=97&&mid<=122){//小写字母\n continue ;\n }\n// temp.replace(i, i+1, \" \");\n return false;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return true;\n }", "@Test\n public void test039() throws Throwable {\n ErrorPage errorPage0 = new ErrorPage();\n Any any0 = (Any)errorPage0.base((CharSequence) \"Esp3eO'v(-`fg\\\"S\");\n }", "private Token scanIllegalCharacter() {\n buffer.add(c);\n Token tok = new Token(buffer.toString(), TokenType.ILLEGAL, new Pair<>(in.line(), in.pos()));\n buffer.flush();\n c = in.read();\n return tok;\n }", "@Test(timeout = 4000)\n public void test126() throws Throwable {\n StringReader stringReader0 = new StringReader(\"9F}n S'~C\");\n stringReader0.read();\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(74, token0.kind);\n assertEquals(\"F\", token0.toString());\n }", "private void skipBadChar() throws IOException {\n while (!isValid()) {\n if (c == -1 || isSpace() || shouldStop()) {\n return;\n }\n c = r.read();\n }\n }", "private String filterValue(String value) {\n try {\n // First, filter out any non-ASCII characters.\n byte[] raw = value.getBytes(\"US-ASCII\");\n String ascii = new String(raw, \"US-ASCII\");\n \n // Make sure there's no newlines\n ascii = ascii.replace('\\n', ' ');\n \n return ascii;\n } catch(UnsupportedEncodingException e) {\n // should never happen\n throw new RuntimeException(\"Missing ASCII encoding\", e);\n }\n }", "@Test(timeout = 4000)\n public void test136() throws Throwable {\n StringReader stringReader0 = new StringReader(\"~:}LC@A$L'2q+~$ja\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n stringReader0.read();\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\":\", token0.toString());\n }", "public Character decodeCharacter(PushbackString input) {\n\t\tinput.mark();\n\t\tCharacter first = input.next();\n\t\tif (first == null || first != '\\\\') {\n\t\t\tinput.reset();\n\t\t\treturn null;\n\t\t}\n\n\t\tCharacter second = input.next();\n\t\tif (second == null) {\n\t\t\tinput.reset();\n\t\t\treturn null;\n\t\t}\n\n\t\t/*\n\t\t * From css 2.1 spec: http://www.w3.org/TR/CSS21/syndata.html#characters\n\t\t * \n\t\t * First, inside a string, a backslash followed by a newline is ignored\n\t\t * (i.e., the string is deemed not to contain either the backslash or\n\t\t * the newline).\n\t\t * \n\t\t * Second, it cancels the meaning of special CSS characters. Except\n\t\t * within CSS comments, any character (except a hexadecimal digit,\n\t\t * linefeed, carriage return, or form feed) can be escaped with a\n\t\t * backslash to remove its special meaning. For example, \"\\\"\" is a\n\t\t * string consisting of one double quote. Style sheet preprocessors must\n\t\t * not remove these backslashes from a style sheet since that would\n\t\t * change the style sheet's meaning.\n\t\t * \n\t\t * Third, backslash escapes allow authors to refer to characters they\n\t\t * cannot easily put in a document. In this case, the backslash is\n\t\t * followed by at most six hexadecimal digits (0..9A..F), which stand\n\t\t * for the ISO 10646 ([ISO10646]) character with that number, which must\n\t\t * not be zero. (It is undefined in CSS 2.1 what happens if a style\n\t\t * sheet does contain a character with Unicode codepoint zero.) If a\n\t\t * character in the range [0-9a-fA-F] follows the hexadecimal number,\n\t\t * the end of the number needs to be made clear. There are two ways to\n\t\t * do that:\n\t\t * \n\t\t * 1. with a space (or other white space character): \"\\26 B\" (\"&B\"). In\n\t\t * this case, user agents should treat a \"CR/LF\" pair (U+000D/U+000A) as\n\t\t * a single white space character.\n\t\t * \n\t\t * 2. by providing exactly 6 hexadecimal digits: \"\\000026B\" (\"&B\")\n\t\t * \n\t\t * In fact, these two methods may be combined. Only one white space\n\t\t * character is ignored after a hexadecimal escape. Note that this means\n\t\t * that a \"real\" space after the escape sequence must itself either be\n\t\t * escaped or doubled.\n\t\t * \n\t\t * If the number is outside the range allowed by Unicode (e.g.,\n\t\t * \"\\110000\" is above the maximum 10FFFF allowed in current Unicode),\n\t\t * the UA may replace the escape with the \"replacement character\"\n\t\t * (U+FFFD). If the character is to be displayed, the UA should show a\n\t\t * visible symbol, such as a \"missing character\" glyph (cf. 15.2, point\n\t\t * 5).\n\t\t */\n\n\t\tswitch (second) { // special whitespace cases. I assume they mean\n\t\t\t\t\t\t\t// for all of these to qualify as a \"new\n\t\t\t\t\t\t\t// line.\" Otherwise there is no specification\n\t\t\t\t\t\t\t// of what to do for \\f\n\t\tcase '\\r':\n\t\t\tif (input.peek('\\n'))\n\t\t\t\tinput.next();\n\t\t\t// fall through\n\t\tcase '\\n':\n\t\tcase '\\f':\n\t\t\t// bs follwed by new line replaced by nothing\n\t\tcase '\\u0000': // skip NUL for now too\n\t\t\treturn decodeCharacter(input);\n\t\t}\n\n\t\tif (!PushbackString.isHexDigit(second)) { // non hex digit\n\t\t\treturn second;\n\t\t}\n\n\t\t// Search for up to 6 hex digits following until a space\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(second);\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tCharacter c = input.next();\n\t\t\tif (c == null || Character.isWhitespace(c))\n\t\t\t\tbreak;\n\t\t\tif (PushbackString.isHexDigit(c))\n\t\t\t\tsb.append(c);\n\t\t\telse {\n\t\t\t\tinput.pushback(c);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\ttry {\n\t\t\t// parse the hex digit and create a character\n\t\t\tint i = Integer.parseInt(sb.toString(), 16);\n\n\t\t\tif (Character.isValidCodePoint(i))\n\t\t\t\treturn (char) i;\n\t\t\treturn REPLACEMENT;\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"Received a NumberFormateException parsing a string verified to be hex\",\n\t\t\t\t\te);\n\t\t}\n\t}", "public SpecialChar insertSpecialChar() {\n SpecialChar specialChar = new SpecialChar();\n specialChar.setId(4491);\n specialChar.setSpecialCharA(\"! ' , . / : ; ? ^ _ ` | \"\n + \" ̄ 、 。 · ‥ … ¨ 〃 ­ ― ∥ \ ∼ ´ ~ ˇ \" + \"˘ ˝ ˚ ˙ ¸ ˛ ¡ ¿ ː\");\n specialChar.setSpecialCharB(\"" ( ) [ ] { } ‘ ’ “ ” \"\n + \" 〔 〕 〈 〉 《 》 「 」 『 』\" + \" 【 】\");\n specialChar.setSpecialCharC(\"+ - < = > ± × ÷ ≠ ≤ ≥ ∞ ∴\"\n + \" ♂ ♀ ∠ ⊥ ⌒ ∂ ∇ ≡ ≒ ≪ ≫ √ ∽ ∝ \"\n + \"∵ ∫ ∬ ∈ ∋ ⊆ ⊇ ⊂ ⊃ ∪ ∩ ∧ ∨ ¬ ⇒ \" + \"⇔ ∀ ∃ ∮ ∑ ∏\");\n specialChar\n .setSpecialCharD(\"$ % ₩ F ′ ″ ℃ Å ¢ £ ¥ ¤ ℉ ‰ \"\n + \"€ ㎕ ㎖ ㎗ ℓ ㎘ ㏄ ㎣ ㎤ ㎥ ㎦ ㎙ ㎚ ㎛ \"\n + \"㎜ ㎝ ㎞ ㎟ ㎠ ㎡ ㎢ ㏊ ㎍ ㎎ ㎏ ㏏ ㎈ ㎉ \"\n + \"㏈ ㎧ ㎨ ㎰ ㎱ ㎲ ㎳ ㎴ ㎵ ㎶ ㎷ ㎸ ㎹ ㎀ ㎁ ㎂ ㎃ ㎄ ㎺ ㎻ ㎼ ㎽ ㎾ ㎿ ㎐ ㎑ ㎒ ㎓ ㎔ Ω ㏀ ㏁ ㎊ ㎋ ㎌ ㏖ ㏅ ㎭ ㎮ ㎯ ㏛ ㎩ ㎪ ㎫ ㎬ ㏝ ㏐ ㏓ ㏃ ㏉ ㏜ ㏆\");\n specialChar.setSpecialCharE(\"# & * @ § ※ ☆ ★ ○ ● ◎ ◇ ◆ □ ■ △ ▲\"\n + \" ▽ ▼ → ← ↑ ↓ ↔ 〓 ◁ ◀ ▷ ▶ ♤ ♠ ♡ ♥ ♧ ♣ ⊙ ◈ ▣ ◐\"\n + \" ◑ ▒ ▤ ▥ ▨ ▧ ▦ ▩ ♨ ☏ ☎ ☜ ☞ ¶ † \"\n + \"‡ ↕ ↗ ↙ ↖ ↘♭ ♩ ♪ ♬ ㉿ ㈜ № ㏇ ™ ㏂ ㏘ ℡ ® ª º\");\n\n session.save(specialChar);\n\n return specialChar;\n }", "public abstract void mo2157b(CharSequence charSequence);", "@Test\n\tpublic void test_ReadUtf8String_bad_data() throws IOException {\n\t\tBinaryReader br = br(true, -22, -87, 'A', 0);\n\t\tassertEquals(\"\\ufffdA\" /* unicode replacement char, 'A'*/, br.readUtf8String(0));\n\t}", "private static boolean isTashkeelChar(char ch) {\n return ( ch >='\\u064B' && ch <= '\\u0652' );\n }", "public boolean isSpecialCharacter(String enteredCmd) {\n Pattern regex = Pattern.compile(\"[%@#€]+\");\n Matcher m = regex.matcher(enteredCmd);\n return m.matches();\n }", "public static void convertIllegalToUnicode(Reader r, Writer w)\r\n\t throws IOException\r\n\t {\r\n\t\t \r\n\t\t BufferedReader in = new BufferedReader(r);\r\n\t\t PrintWriter out = new PrintWriter(new BufferedWriter(w));\r\n\t\t \r\n\t\t int c;\r\n\t\t while((c = in.read()) != -1) {\r\n\t\t if(!isValidXMLChar(c)) {\r\n\t\t \tString illegalCharacter = EFGProperties.getProperty(ILLEGALCHARACTER_TEXT);\r\n\t\t out.print(illegalCharacter);\r\n\t\t \t/*String hex = Integer.toHexString(c);\r\n\t\t switch (hex.length()) { \r\n\t\t case 1: out.print(\"\\\\u000\" + hex); break;\r\n\t\t case 2: out.print(\"\\\\u00\" + hex); break;\r\n\t\t case 3: out.print(\"\\\\u0\" + hex); break;\r\n\t\t default: out.print(\"\\\\u\" + hex); break;\r\n\t\t }*/\r\n\t\t }\r\n\t\t else {\r\n\t\t \t out.write(c);\r\n\t\t }\r\n\t\t }\r\n\t\t out.flush(); // flush the output buffer we create\r\n\r\n\t }", "private boolean validate(String s)\r\n\t{\r\n\t\tint i=0;\r\n\t\tchar[] s1=s.toLowerCase().toCharArray();\r\n\t\twhile(i<s1.length)\r\n\t\t{\r\n\t\t\tif(s1[i]=='*' || s1[i]=='?')\r\n\t\t\t\tbreak;\r\n\t\t\tif(s1[i]<'a' || s1[i]>'z') return false;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private static boolean isPNCharsBase(int ch) {\n return\n r(ch, 'a', 'z') || r(ch, 'A', 'Z') || r(ch, 0x00C0, 0x00D6) || r(ch, 0x00D8, 0x00F6) || r(ch, 0x00F8, 0x02FF) ||\n r(ch, 0x0370, 0x037D) || r(ch, 0x037F, 0x1FFF) || r(ch, 0x200C, 0x200D) || r(ch, 0x2070, 0x218F) ||\n r(ch, 0x2C00, 0x2FEF) || r(ch, 0x3001, 0xD7FF) ||\n // Surrogate pairs\n r(ch, 0xD800, 0xDFFF) ||\n r(ch, 0xF900, 0xFDCF) || r(ch, 0xFDF0, 0xFFFD) ||\n r(ch, 0x10000, 0xEFFFF) ; // Outside the basic plane.\n }", "private static void testBadStrLiterals() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTEST BAD STRING LITERALS: BAD ESCAPED CHARS ON LINES 2-5; UNTERM ON LINES 6-11, BOTH ON LINES 12-14\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inBadStrLiterals\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inBadStrLiterals not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\twhile (token.sym != sym.EOF) {\n\t if (token.sym != sym.STRINGLITERAL) {\n\t\tSystem.err.println(\"ERROR TESTING BAD STRING LITERALS: bad token: \" +\n\t\t\t\t token.sym);\n\t }\n\t token = scanner.next_token();\n\t}\n }", "protected static String removeBannedCharacters(String st) {\n return st.replaceAll(\"[^A-Za-z]\", \"\");\n }", "public static boolean isAscii(char ch) {\n/* 403 */ return (ch < '€');\n/* */ }", "@Test\n public void checkUniqueCharacter() {\n int numberOfChars = compressor.getCodes().size();\n assertTrue(numberOfChars == 86 || numberOfChars == 87, \"You appear to have some very strange end-of-line configuration on your machine!\");\n }", "public boolean isUrgentLetter() {\n\t\treturn false;\n\t}", "private boolean validDefinition(String definition) {\n\t\tPattern p = Pattern.compile(\"[@#$%&*_+=|<>{}\\\\[\\\\]~¨§£{}]\");\n\t\tMatcher m = p.matcher(definition);\n\t\treturn !m.find();\n\t}", "public void method1() {\n String s = \"\\uFE64\" + \"script\" + \"\\uFE65\";\n // Validate\n Pattern pattern = Pattern.compile(\"[<>]\"); // Check for angle brackets\n Matcher matcher = pattern.matcher(s);\n if (matcher.find()) {\n // Found black listed tag\n throw new IllegalStateException();\n } else {\n // ...\n }\n // Normalize\n s = Normalizer.normalize(s, Form.NFKC);\n }", "private static boolean hasUnsafeChars(String s) {\n for (int i = 0; i < s.length(); ++i) {\n char c = s.charAt(i);\n if (Character.isLetter(c) || c == '.')\n continue;\n else\n return true;\n }\n return false;\n }", "@Test(timeout = 4000)\n public void test087() throws Throwable {\n String string0 = SQLUtil.normalize(\"Wk-M{)u04i&=ml]M\", false);\n assertEquals(\"Wk - M {) u04i & = ml ] M\", string0);\n }", "@Test\n public void Test8484()\n {\n String s = \"\\u9FE1\\uCEF3\\u2798\\uAAB6\\uDA7C\";\n Collator coll = Collator.getInstance();\n CollationKey collKey = coll.getCollationKey(s); \n logln(\"Pass: \" + collKey.toString() + \" generated OK.\");\n }" ]
[ "0.6648641", "0.65119815", "0.6498547", "0.64666146", "0.6452236", "0.6448624", "0.636827", "0.63669217", "0.6357663", "0.6316839", "0.6290393", "0.62472016", "0.62106425", "0.6201179", "0.61911386", "0.6183416", "0.6167677", "0.6157569", "0.61567414", "0.6151393", "0.6072405", "0.6035522", "0.60286057", "0.6025092", "0.5995406", "0.5981838", "0.5980642", "0.5979875", "0.5955748", "0.59503496", "0.594346", "0.5942856", "0.5931345", "0.5911604", "0.5885399", "0.5866631", "0.5866283", "0.58512056", "0.5846909", "0.58341736", "0.5831474", "0.58112663", "0.57996255", "0.57817334", "0.57639146", "0.5760088", "0.5758121", "0.5753331", "0.57293737", "0.5729159", "0.5727611", "0.57256395", "0.5718501", "0.5715087", "0.5715087", "0.57133085", "0.57064265", "0.57022953", "0.5684251", "0.5684127", "0.56796324", "0.5677378", "0.5675293", "0.5658557", "0.5657241", "0.565278", "0.56495017", "0.5644005", "0.564155", "0.5637977", "0.5631673", "0.56303144", "0.5629783", "0.5618301", "0.56169343", "0.5610625", "0.5608359", "0.56066793", "0.5594791", "0.5592568", "0.5592109", "0.55912995", "0.55904984", "0.55862725", "0.5582984", "0.55803645", "0.5570481", "0.5569472", "0.55686617", "0.55677634", "0.55666363", "0.55615294", "0.5559898", "0.55564374", "0.5552649", "0.5552309", "0.553843", "0.5535587", "0.5534903", "0.55341727", "0.55287546" ]
0.0
-1
rectify missrecognized chars in the begnning or end, process the brackets and braces.
public void rectifyMisRecogChars2ndRnd() { if (mnExprRecogType == EXPRRECOGTYPE_VBLANKCUT) { LinkedList<StructExprRecog> listBoundingChars = new LinkedList<StructExprRecog>(); LinkedList<Integer> listBoundingCharIndices = new LinkedList<Integer>(); LinkedList<StructExprRecog> listVLnChars = new LinkedList<StructExprRecog>(); LinkedList<Integer> listVLnCharIndices = new LinkedList<Integer>(); for (int idx = 0; idx < mlistChildren.size(); idx ++) { StructExprRecog serThisChild = mlistChildren.get(idx).getPrincipleSER(4); // now deal with the brackets, square brackets and braces. if (serThisChild.isBoundChar()) { if (serThisChild.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE) { if (idx > 0 && idx < mlistChildren.size() - 1 && (mlistChildren.get(idx - 1).isNumericChar() || mlistChildren.get(idx - 1).isLetterChar()) // dot is allowed here because it must be decimal point not times (times has been converted to *) && (mlistChildren.get(idx + 1).isNumericChar() || mlistChildren.get(idx + 1).isLetterChar() // dot is allowed here. || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES)) { // this must be a 1 if the left and right are both letter or numeric char serThisChild.mType = UnitProtoType.Type.TYPE_ONE; } else if (idx > 0 && !mlistChildren.get(idx - 1).isChildListType() && !mlistChildren.get(idx - 1).isNumberChar() && !mlistChildren.get(idx - 1).isLetterChar() && !mlistChildren.get(idx - 1).isPostUnOptChar() && !mlistChildren.get(idx - 1).isBiOptChar() && !mlistChildren.get(idx - 1).isCloseBoundChar()) { serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // left char is not left char of v-line } else if (idx < mlistChildren.size() - 1 && !mlistChildren.get(idx + 1).isChildListType() && !mlistChildren.get(idx + 1).isNumberChar() && !mlistChildren.get(idx + 1).isLetterChar() && !mlistChildren.get(idx + 1).isPreUnOptChar() && !mlistChildren.get(idx + 1).isBiOptChar() && !mlistChildren.get(idx + 1).isBoundChar()) { serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // left char is not left char of v-line } else { listVLnChars.add(serThisChild); listVLnCharIndices.add(idx); } } else if (serThisChild.mType != UnitProtoType.Type.TYPE_BRACE || (serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx == mlistChildren.size() - 1) || (serThisChild.mType == UnitProtoType.Type.TYPE_BRACE && idx < mlistChildren.size() - 1 && mlistChildren.getLast().mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS)) { listBoundingChars.add(serThisChild); listBoundingCharIndices.add(idx); } } else if (serThisChild.isCloseBoundChar()) { if (serThisChild.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE) { boolean bFoundOpenBounding = false; for (int idx1 = listBoundingChars.size() - 1; idx1 >= 0; idx1 --) { if ((serThisChild.getBottomPlus1() - listBoundingChars.get(idx1).mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serThisChild.mnHeight && (listBoundingChars.get(idx1).getBottomPlus1() - serThisChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serThisChild.mnHeight && serThisChild.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * listBoundingChars.get(idx1).mnHeight // must have similar height as the start character && serThisChild.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * listBoundingChars.get(idx1).mnHeight) { for (int idx2 = listBoundingChars.size() - 1; idx2 > idx1; idx2 --) { // allow to change all the ( or [ between () or [] pairs coz here ( and [ must not have pair and must be misrecognized. //StructExprRecog serB4BndChar = listBoundingCharIndices.get(idx2) > 0?mlistChildren.get(listBoundingCharIndices.get(idx2) - 1):null; //StructExprRecog serAfterBndChar = listBoundingCharIndices.get(idx2) < mlistChildren.size() - 1?mlistChildren.get(listBoundingCharIndices.get(idx2) + 1):null; if (listBoundingChars.get(idx2).mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET && (double)listBoundingChars.get(idx2).mnWidth/(double)listBoundingChars.get(idx2).mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) { listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_ONE; // change to 1, do not use b4 and after char to adjust because not accurate. } else if (listBoundingChars.get(idx2).mType == UnitProtoType.Type.TYPE_ROUND_BRACKET && (double)listBoundingChars.get(idx2).mnWidth/(double)listBoundingChars.get(idx2).mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) { listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_ONE; // change to 1, do not use b4 and after char to adjust because not accurate. } else { listBoundingChars.get(idx2).mType = UnitProtoType.Type.TYPE_SMALL_T; // all the no-close-bounding chars are changed to small t. } listBoundingChars.removeLast(); listBoundingCharIndices.removeLast(); } listBoundingChars.get(idx1).mType = UnitProtoType.Type.TYPE_ROUND_BRACKET; serThisChild.mType = UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET; listBoundingChars.remove(idx1); listBoundingCharIndices.remove(idx1); bFoundOpenBounding = true; break; } } if (!bFoundOpenBounding) { // cannot find open bounding character, change the close bounding character to 1. //StructExprRecog serB4BndChar = idx > 0?mlistChildren.get(idx - 1):null; //StructExprRecog serAfterBndChar = idx < mlistChildren.size() - 1?mlistChildren.get(idx + 1):null; if (serThisChild.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET && (double)serThisChild.mnWidth/(double)serThisChild.mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) { serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after char to adjust because not accurate (considering - or [1/2]...) } else if (serThisChild.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET && (double)serThisChild.mnWidth/(double)serThisChild.mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) { serThisChild.mType = UnitProtoType.Type.TYPE_ONE; } } } } else if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_O || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_O)) { // now deal with all o or Os. do not put this in the first round because the condition to change o or O to 0 is more relax. if (mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE || mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mlistChildren.get(idx).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) { // if it has upper or lower note. serThisChild.mType = UnitProtoType.Type.TYPE_ZERO; } else if (idx > 0 && (!mlistChildren.get(idx - 1).isLetterChar() || (mlistChildren.get(idx - 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (mlistChildren.get(idx - 1).mType == UnitProtoType.Type.TYPE_SMALL_O || mlistChildren.get(idx - 1).mType == UnitProtoType.Type.TYPE_BIG_O)))) { // if left character is not a letter char or is o or O serThisChild.mType = UnitProtoType.Type.TYPE_ZERO; } else if (idx < (mlistChildren.size() - 1) && (!mlistChildren.get(idx + 1).isLetterChar() || (mlistChildren.get(idx + 1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && (mlistChildren.get(idx + 1).mType == UnitProtoType.Type.TYPE_SMALL_O || mlistChildren.get(idx + 1).mType == UnitProtoType.Type.TYPE_BIG_O)))) { // if right character is not a letter char or is o or O serThisChild.mType = UnitProtoType.Type.TYPE_ZERO; } } } if (listVLnChars.size() == 1) { listVLnChars.getFirst().mType = UnitProtoType.Type.TYPE_ONE; // all the no-paired vline chars are changed to 1. } else { while (listVLnChars.size() > 0) { int nIdx1st = listVLnCharIndices.getFirst(); if (mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE || mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mlistChildren.get(nIdx1st).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) { listVLnChars.getFirst().mType = UnitProtoType.Type.TYPE_ONE; // 1st | cannot have upper note or low note . listVLnCharIndices.removeFirst(); listVLnChars.removeFirst(); } else { break; } } for (int idx = listVLnChars.size() - 1; idx >= 0 ; idx --) { StructExprRecog serOneChild = listVLnChars.get(idx); int idx1 = listVLnChars.size() - 1; for (; idx1 >= 0; idx1 --) { if (idx1 == idx) { continue; } StructExprRecog serTheOtherChild = listVLnChars.get(idx1); if ((serOneChild.getBottomPlus1() - serTheOtherChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serOneChild.mnHeight && (serTheOtherChild.getBottomPlus1() - serOneChild.mnTop) > ConstantsMgr.msdOpenCloseBracketHeightRatio * serOneChild.mnHeight && serOneChild.mnHeight > ConstantsMgr.msdOpenCloseBracketHeightRatio * serTheOtherChild.mnHeight // must have similar height as the start character && serOneChild.mnHeight < 1/ConstantsMgr.msdOpenCloseBracketHeightRatio * serTheOtherChild.mnHeight) { // has corresponding v-line. break; } } if (idx1 == -1) { // doesn't have corresponding v-line.. serOneChild.mType = UnitProtoType.Type.TYPE_ONE; // all the no-paired vline chars are changed to 1. } } // recheck the new first VLnChars. for (int idx = 0; idx < listVLnChars.size(); idx ++) { int nIdxInList = listVLnCharIndices.get(idx); if (listVLnChars.get(idx).mType == UnitProtoType.Type.TYPE_ONE) { continue; } else if (mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE || mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mlistChildren.get(nIdxInList).mnExprRecogType == EXPRRECOGTYPE_VCUTLUNOTES) { listVLnChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // 1st | cannot have upper note or low note . } else { break; } } } if (listBoundingChars.size() > 0 && listBoundingChars.getLast() == mlistChildren.getLast()) { // change the last unpaired ( or [ to t or 1 if necessary. //StructExprRecog serB4BndChar = mlistChildren.size() > 1?mlistChildren.get(mlistChildren.size() - 2):null; if (listBoundingChars.getLast().mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET && (double)listBoundingChars.getLast().mnWidth/(double)listBoundingChars.getLast().mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) { listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after chars to adjust [ coz not accurate. } else if (listBoundingChars.getLast().mType == UnitProtoType.Type.TYPE_ROUND_BRACKET && (double)listBoundingChars.getLast().mnWidth/(double)listBoundingChars.getLast().mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) { listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_ONE; // change to 1. Do not use b4 after chars to adjust [ coz not accurate. } else { listBoundingChars.getLast().mType = UnitProtoType.Type.TYPE_SMALL_T; // if the last unpaired ( or [ is the last char, very likely it is a t. } } for (int idx = 0; idx < listBoundingChars.size(); idx ++) { //StructExprRecog serB4BndChar = listBoundingCharIndices.get(idx) > 0?mlistChildren.get(listBoundingCharIndices.get(idx) - 1):null; //StructExprRecog serAfterBndChar = listBoundingCharIndices.get(idx) < mlistChildren.size() - 1?mlistChildren.get(listBoundingCharIndices.get(idx) + 1):null; if (listBoundingChars.get(idx).mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET && (double)listBoundingChars.get(idx).mnWidth/(double)listBoundingChars.get(idx).mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) { listBoundingChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // change to 1. do not use pre or next char height to adjust coz not accurate. }else if (listBoundingChars.get(idx).mType == UnitProtoType.Type.TYPE_ROUND_BRACKET && (double)listBoundingChars.get(idx).mnWidth/(double)listBoundingChars.get(idx).mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) { listBoundingChars.get(idx).mType = UnitProtoType.Type.TYPE_ONE; // change to 1. do not use pre or next char height to adjust coz not accurate. } // do not change other unmatched ( or [ to t or 1 because this makes things worse. } for (int idx = 0; idx < mlistChildren.size(); idx ++) { StructExprRecog serThisChild = mlistChildren.get(idx); serThisChild.rectifyMisRecogChars2ndRnd(); } } else if (isChildListType()) { for (int idx = 0; idx < mlistChildren.size(); idx ++) { StructExprRecog serThisChild = mlistChildren.get(idx); if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) { if (serThisChild.isBoundChar()) { if (serThisChild.mType == UnitProtoType.Type.TYPE_VERTICAL_LINE && (idx != 0 || mnExprRecogType != EXPRRECOGTYPE_VCUTUPPERNOTE)) { serThisChild.mType = UnitProtoType.Type.TYPE_ONE; // if it is |**(something), it could still be valid for |...|**(something). But shouldn't have foot notes. } else if (serThisChild.mType == UnitProtoType.Type.TYPE_SQUARE_BRACKET && serThisChild.mnWidth/serThisChild.mnHeight <= ConstantsMgr.msdSquareBracketTo1WOverHThresh) { // if it is [ and it is very thing, very likely it is a 1. serThisChild.mType = UnitProtoType.Type.TYPE_ONE; } else if (serThisChild.mType == UnitProtoType.Type.TYPE_ROUND_BRACKET && serThisChild.mnWidth/serThisChild.mnHeight <= ConstantsMgr.msdRoundBracketTo1WOverHThresh) { // if it is ( and it is very thing, very likely it is a 1. serThisChild.mType = UnitProtoType.Type.TYPE_ONE; } else if (serThisChild.mType != UnitProtoType.Type.TYPE_VERTICAL_LINE) { // if child is single char, very likely it is not a ( or [ but a t. serThisChild.mType = UnitProtoType.Type.TYPE_SMALL_T; } } else if (serThisChild.isCloseBoundChar() && (idx != 0 || (mnExprRecogType != EXPRRECOGTYPE_VCUTUPPERNOTE && mnExprRecogType != EXPRRECOGTYPE_VCUTLOWERNOTE && mnExprRecogType != EXPRRECOGTYPE_VCUTLUNOTES))) { // a close bound char can have upper and/or lower notes. but if the upper note or lower note is close bound char, still need to convert it to 1. // here still convert to 1 because upper lower note can be mis-recognized. serThisChild.mType = UnitProtoType.Type.TYPE_ONE; } else if (serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_O || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_O) { // still convert to 0 even if it has lower or upper notes. serThisChild.mType = UnitProtoType.Type.TYPE_ZERO; } } else { serThisChild.rectifyMisRecogChars2ndRnd(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void skipBrackets(char openingChar, char closingChar) {\r\n int nestedLevel = 0;\r\n int length = sourceCode.length();\r\n char stringType = 0;\r\n do {\r\n char character = sourceCode.charAt(index);\r\n if (stringType != 0) {\r\n // Currently in string skipping mode.\r\n if (character == stringType) {\r\n // Exit string skipping mode.\r\n stringType = 0;\r\n } else if (character == '\\\\') {\r\n // Skip escaped character.\r\n ++index;\r\n }\r\n } else if (character == '/') {\r\n // Skip the comment if there is any.\r\n skipComment();\r\n // skipComment skips to the first character after the comment but\r\n // the index is already incremented by this loop, so decrement it\r\n // to compensate.\r\n --index;\r\n } else if (character == openingChar) {\r\n // Entering brackets.\r\n ++nestedLevel;\r\n } else if (character == closingChar) {\r\n // Exiting brackets.\r\n --nestedLevel;\r\n } else if (character == '\\'' || character == '\"') {\r\n // Enter string skipping mode.\r\n stringType = character;\r\n }\r\n // Keep going until the end of the string or if all brackets are matched.\r\n } while (++index < length && nestedLevel > 0);\r\n }", "private boolean syntaxOkay(String in){\n\t\tint numOpenBraces = 0;\n\t\tint numCloseBraces = 0;\n\t\tint countQuote = 0;\n\t\tfor(int i = 0; i < in.length(); i++){\n\t\t\tchar currentChar = in.charAt(i);\n\t\t\tif(currentChar == '{'){\n\t\t\t\tint open = i;\n\t\t\t\tnumOpenBraces++;\n\t\t\t}else if(currentChar == '}'){\n\t\t\t\tint close = i;\n\t\t\t\tnumCloseBraces++;\n\t\t\t}else if(currentChar == '\"'){\n\t\t\t\tcountQuote++;\n\t\t\t}\n\t\t}\n\t\treturn numOpenBraces == numCloseBraces && countQuote % 2 == 0;\n\t}", "static boolean validBrackets(String s){\n ArrayList<Character> arr = new ArrayList<Character>();\n for(int i = 0; i < s.length(); i++){\n if(s.charAt(i) == '{' || s.charAt(i) == '[' || s.charAt(i) == '('){\n arr.add(s.charAt(i));\n }else if(s.charAt(i) == '}'){\n if(arr.get(arr.size()-1) != '{'){\n return false;\n }\n arr.remove(arr.size()-1);\n }else if(s.charAt(i) == ']'){\n if(arr.get(arr.size()-1) != '['){\n return false;\n }\n arr.remove(arr.size()-1);\n }else if(s.charAt(i) == ')'){\n if(arr.get(arr.size()-1) != '('){\n return false;\n }\n arr.remove(arr.size()-1);\n }\n }\n return arr.isEmpty();\n }", "private static final int skipBrackets(StringBuffer b) {\n\t\tint len1 = b.length()-1;\n\t\tint ini1 = 0;\n\t\tif (len1 <= 0) return(0);\n\t\twhile ((b.charAt(ini1) == '(') && (b.charAt(len1) == ')')) {\n\t\t\twhile (b.charAt(--len1) == ' ');\n\t\t\twhile (b.charAt(++ini1) == ' ');\n\t\t\tb.setLength(++len1);\n\t\t}\n\t\treturn(ini1);\n\t}", "@Override\n\tprotected void handleCloseBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "private void processBracket() {\r\n\t\tif (expression[currentIndex] == '(') {\r\n\t\t\ttoken = new Token(TokenType.OPEN_BRACKET, expression[currentIndex]);\r\n\t\t} else {\r\n\t\t\ttoken = new Token(TokenType.CLOSED_BRACKET, expression[currentIndex]);\r\n\t\t}\r\n\r\n\t\tcurrentIndex++;\r\n\t}", "private void emptyBracket() {\n\n\t\twhile (!stack.peek().matches(\"[(]\")) {\n\t\t\tqueue.add(stack.pop());\n\t\t}\n\t\t// Remove opening bracket from the stack.\n\t\tstack.pop();\n\t}", "@Override\n\tprotected void handleOpenBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "public static void main(String[] args) {\n String s=\"[()]{}{[()()]()}\";\n char s1[]=s.toCharArray();\n Stack<Character> a=new Stack<>();\n \n for (int i = 0; i < s.length(); i++) {\n \t char x=s.charAt(i);\n// \t if(a.isEmpty()) {\n// \t\t a.push(x);\n// \t }\n \t \n\t\tif(x=='{'||x=='['||x=='('){\n\t\t\ta.push(x);\n\t\t}\n\t\telse if(x=='}'||x==']'||x==')'&& !a.isEmpty()) {\n//\t\t\tif(a.peek()=='}'||a.peek()==']'||a.peek()==')')\n\t\t\ta.pop();\n\t\t}\n\t}\n System.out.println(a.toString());\n if(a.isEmpty()) {\n \t System.out.println(\"balanced\");\n }\n else\n {\n \t System.out.println(\"Unbalanced\"); \t \n }\n\t}", "private static String fixBrackets(String reg) {\n while (reg.contains(\"()*\"))\n reg = removeChars(reg, reg.indexOf(\"()*\"), \"()*\".length());\n\n int i = reg.indexOf(\"(\");\n do {\n if (reg.charAt(i) == '(') {\n int j = 1;\n boolean leave = false;\n boolean removeBracket = true;\n do {\n if (reg.charAt(i + j) == '(') {\n bracketStack.push(i);\n bracketRemove.push(removeBracket);\n i = i + j;\n j = 1;\n removeBracket = true;\n } else if (reg.charAt(i + j) == ')') {\n if (removeBracket) {\n if (j == 2 && reg.contains(String.valueOf(QUOTE)))\n leave = false;\n else if (j > 2 && i + j + 1 < reg.length()\n && reg.charAt(i + j + 1) == '*') {\n i = i + j + 1;\n leave = true;\n }\n if (!leave) {\n reg = removeChars(reg, i + j, 1);\n reg = removeChars(reg, i, 1);\n if (bracketStack.size() > 0) {\n i = bracketStack.pop();\n removeBracket = bracketRemove.pop();\n j = 1;\n } else\n leave = true;\n }\n } else {\n if (bracketStack.size() > 0) {\n j = i + j + 1;\n i = bracketStack.pop();\n j = j - i;\n removeBracket = bracketRemove.pop();\n } else {\n i = i + j;\n leave = true;\n }\n }\n } else if (reg.charAt(i + j) == '|' && reg.charAt(i + j - 1) != QUOTE) {\n removeBracket = false;\n j++;\n } else\n j++;\n } while (!leave);\n }\n i++;\n } while (i < reg.length());\n\n return reg;\n }", "private static boolean wrongClosingScope(char top, char val) {\n return (top == '{' || top == '[' || top == '(') &&\n (val == '}' || val == ']' || val == ')');\n }", "private void scanToken() {\n char c = advance();\n switch (c) {\n case '(':\n addToken(LEFT_PAREN);\n break;\n case ')':\n addToken(RIGHT_PAREN);\n break;\n case '{':\n addToken(LEFT_BRACE);\n break;\n case '}':\n addToken(RIGHT_BRACE);\n break;\n case ',':\n addToken(COMMA);\n break;\n case '.':\n addToken(DOT);\n break;\n case '-':\n addToken(MINUS);\n break;\n case '+':\n addToken(PLUS);\n break;\n case ';':\n addToken(SEMICOLON);\n break;\n case '*':\n addToken(STAR);\n break;\n case '?':\n addToken(QUERY);\n break;\n case ':':\n addToken(COLON);\n break;\n\n case '!': // These characters could be part of a 2-char lexeme, so must check the second char.\n addToken(secondCharIs('=') ? BANG_EQUAL : BANG);\n break;\n case '=':\n addToken(secondCharIs('=') ? EQUAL_EQUAL : EQUAL);\n break;\n case '<':\n addToken(secondCharIs('=') ? LESS_EQUAL : LESS);\n break;\n case '>':\n addToken(secondCharIs('=') ? GREATER_EQUAL : GREATER);\n break;\n\n case '/': // The / char could be the beginning of a comment\n handleSlash();\n break;\n\n case ' ': // Ignore whitespace\n case '\\r':\n case '\\t':\n break;\n\n case '\\n': // Ignore newline but increase line count\n line++;\n break;\n\n case '\"': // Beginning of a string\n handleString();\n break;\n\n default:\n if (isDigit(c)) {\n handleNumber();\n } else if (isAlpha(c)) {\n handleIdentifier();\n } else {\n Rune.error(line, \"Unexpected character.\");\n }\n break;\n }\n }", "private static String removeInvalid(String str){\n char[] chrArr = str.toCharArray();\n int val = 0;\n for(int i = 0; i < chrArr.length; i++){\n if(chrArr[i] == '(') val ++;\n else if(chrArr[i] == ')') val --;\n if(val < 0) {\n chrArr[i] = '#';\n val = 0;\n }\n }\n val = 0;\n for(int i = chrArr.length - 1; i >= 0; i--){\n if(chrArr[i] == ')') val ++;\n else if(chrArr[i] == '(') val --;\n if(val < 0){\n chrArr[i] = '#';\n val = 0;\n }\n }\n StringBuilder sb = new StringBuilder();\n for(int i = 0; i < chrArr.length; i++){\n if(chrArr[i] != '#') sb.append(chrArr[i]);\n }\n return sb.toString();\n}", "protected void\ttryToFix() { Command.insertList(crAndBrace); }", "public static void assignCompoundTokens(ArrayList<String>scan){\n\nfor(int i=0;i<scan.size();i++){\n if( isUnaryPostOperator( scan.get(i) ) ){\n \n if(isNumber(scan.get(i-1))||isVariableString(scan.get(i-1))){ \n int index=i-1;\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\ni=j+1;\n }//end if\n\n else if(isClosingBracket(scan.get(i-1))){\n int index=MBracket.getComplementIndex(false, i-1, scan);\n int j=i;\n while(isUnaryPostOperator(scan.get(j))){\n ++j;\n }\n scan.add(j, \")\");\n scan.add(index,\"(\");\n i=j+1;\n }\n \n \n \n }\n \n \n \n}\n\n\n\n}", "public static String chopBraces(String s) {\n\t\tif(s.startsWith(STRSQBRACKETSTART) && s.endsWith(STRSQBRACKETEND))\n\t\t\treturn s.substring(1,s.length()-1);\n//\t\tboolean changed;\n//\t\tdo {\n//\t\t\tchanged=true;\n//\t\t\tif(s.startsWith(STRSQBRACKETSTART)) s=s.substring(1);\n//\t\t\telse if(s.startsWith(STRCURLYSTART)) s=s.substring(1);\n//\t\t\telse if(s.startsWith(STRLT)) s=s.substring(1);\n//\t\t\telse if(s.endsWith(STRSQBRACKETEND)) s=s.substring(0,s.length()-1);\n//\t\t\telse if(s.endsWith(STRCURLYEND)) s=s.substring(0,s.length()-1);\n//\t\t\telse if(s.endsWith(STRGT)) s=s.substring(0,s.length()-1);\n//\t\t\telse changed=false;\n//\t\t} while(changed);\n\t\t\n\t\treturn s;\n//\t\t\n//\t\tif(s==null || (s.indexOf('[')<0 && s.indexOf('{')<0)) return s;\n//\t\treturn s.substring(1,s.length()-1);\t\t\n\t}", "@Override\n\t\tprotected String[] handleIrregulars(String s) {\n\t\t\treturn null;\n\t\t}", "private boolean isBracketAhead() {\r\n\t\treturn expression[currentIndex] == '(' || expression[currentIndex] == ')';\r\n\t}", "void gobble() {\n while( level > 0 &&\n !is(TK.LPAREN) &&\n !is(TK.ID) &&\n !is(TK.NUM) &&\n !is(TK.EOF) ) {\n scan();\n }\n }", "private static void testBadChars() throws IOException {\n\t// say what output is expected\n\tSystem.err.println(\"\\nTEST BAD CHARS: BAD CHARS ON LINES 1-5\");\n\n\t// open input file\n\tFileReader inFile = null;\n\ttry {\n\t inFile = new FileReader(\"inBadChars\");\n\t} catch (FileNotFoundException ex) {\n\t System.err.println(\"File inBadChars not found.\");\n\t System.exit(-1);\n\t}\n\n\t// create and call the scanner\n\tYylex scanner = new Yylex(inFile);\n\tSymbol token = scanner.next_token();\n\tif (token.sym != sym.EOF) {\n\t System.err.println(\"ERROR TESTING BAD CHARS: not at EOF\");\n\t}\n }", "public void rectifyMisRecogChars1stRnd(CharLearningMgr clm) {\n switch (mnExprRecogType) {\n case EXPRRECOGTYPE_ENUMTYPE: {\n break; // single char, do nothing.\n } case EXPRRECOGTYPE_HLINECUT: {\n StructExprRecog serChildNo = mlistChildren.getFirst();\n StructExprRecog serChildDe = mlistChildren.getLast(); \n rectifyMisRecogNumLetter(clm, serChildNo);\n rectifyMisRecogNumLetter(clm, serChildDe);\n break;\n }case EXPRRECOGTYPE_HBLANKCUT:\n case EXPRRECOGTYPE_MULTIEXPRS:\n case EXPRRECOGTYPE_VCUTMATRIX: {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n rectifyMisRecogNumLetter(clm, serThisChild);\n }\n break;\n } case EXPRRECOGTYPE_HCUTCAP:\n case EXPRRECOGTYPE_HCUTUNDER:\n case EXPRRECOGTYPE_HCUTCAPUNDER: {\n StructExprRecog serCap = null, serBase = null, serUnder = null;\n if (mnExprRecogType == EXPRRECOGTYPE_HCUTCAP) {\n serCap = mlistChildren.getFirst();\n serBase = mlistChildren.getLast();\n } else if (mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER) {\n serBase = mlistChildren.getFirst();\n serUnder = mlistChildren.getLast();\n } else {\n serCap = mlistChildren.getFirst();\n serBase = mlistChildren.get(1);\n serUnder = mlistChildren.getLast();\n }\n \n if (serCap != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serCap);\n }\n rectifyMisRecogCUBaseChar(clm, serBase);\n if (serUnder != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serUnder);\n }\n break;\n } case EXPRRECOGTYPE_VBLANKCUT: {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n StructExprRecog serThisChild = mlistChildren.get(idx);\n StructExprRecog serThisChildPrinciple = serThisChild.getPrincipleSER(4); // get principle from upper or lower notes.\n if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChild.mType == UnitProtoType.Type.TYPE_BRACE\n && idx < (mlistChildren.size() - 1) && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT\n && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS\n && mlistChildren.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) {\n // should change { to ( if the following ser is not a mult exprs nor a matrix\n serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_ROUND_BRACKET, serThisChild.mstrFont);\n } else if (serThisChildPrinciple.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChildPrinciple.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE\n && idx > 0 && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_HBLANKCUT\n && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_MULTIEXPRS\n && mlistChildren.get(idx - 1).mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) {\n // should change } to ) if the previous ser is not a mult exprs nor a matrix\n serThisChildPrinciple.changeSEREnumType(UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET, serThisChildPrinciple.mstrFont);\n } else if (idx < mlistChildren.size() - 1) {\n StructExprRecog serThisChildPrincipleCapUnderUL = serThisChild.getPrincipleSER(5);\n if (serThisChildPrincipleCapUnderUL.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serThisChildPrincipleCapUnderUL.mType == UnitProtoType.Type.TYPE_SMALL_F\n && serThisChildPrincipleCapUnderUL.mstrFont.equalsIgnoreCase(\"cambria_italian_48_thinned\") // only this font of small f can be misrecognized integrate.\n && serThisChild.mlistChildren.size() == 3) {\n // implies that there are upper note and lower note. So it should be integrate.\n serThisChildPrincipleCapUnderUL.changeSEREnumType(UnitProtoType.Type.TYPE_INTEGRATE, serThisChildPrinciple.mstrFont);\n }\n }\n \n if (idx == 0) {\n if (serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && !serThisChild.isLetterChar() && !serThisChild.isNumericChar() && !serThisChild.isBoundChar()\n && !serThisChild.isIntegTypeChar() && !serThisChild.isPreUnOptChar() && !serThisChild.isPreUnitChar()\n && !serThisChild.isSIGMAPITypeChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumericChar(listCands.get(idx1).mType)\n || isBoundChar(listCands.get(idx1).mType) || isIntegTypeChar(listCands.get(idx1).mType)\n || isPreUnOptChar(listCands.get(idx1).mType) || isPreUnitChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChild.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n }\n } else if (idx == mlistChildren.size() - 1) {\n if (serThisChildPrinciple.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && !serThisChildPrinciple.isLetterChar() && !serThisChildPrinciple.isNumberChar() && !serThisChildPrinciple.isCloseBoundChar()\n && !serThisChildPrinciple.isPostUnOptChar() && !serThisChildPrinciple.isPostUnitChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChildPrinciple.mType, serThisChildPrinciple.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumberChar(listCands.get(idx1).mType)\n || isCloseBoundChar(listCands.get(idx1).mType) || isPostUnOptChar(listCands.get(idx1).mType)\n || isPostUnitChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChildPrinciple.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChildPrinciple.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n }\n } else {\n StructExprRecog serPrevChild = mlistChildren.get(idx - 1);\n StructExprRecog serNextChild = mlistChildren.get(idx + 1);\n if (serPrevChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serThisChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serNextChild.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) {\n if (!serPrevChild.isLetterChar() && !serPrevChild.isNumericChar()\n && !serPrevChild.isCloseBoundChar() && !serPrevChild.isPostUnitChar()\n && !serNextChild.isLetterChar() && !serNextChild.isNumericChar()\n && !serNextChild.isBoundChar() && !serNextChild.isPreUnitChar()\n && !serNextChild.isIntegTypeChar() && !serNextChild.isSIGMAPITypeChar()\n && (!serPrevChild.isPostUnOptChar() || !serNextChild.isPreUnOptChar())\n && !serThisChildPrinciple.isLetterChar() && !serThisChildPrinciple.isNumericChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChildPrinciple.mType, serThisChildPrinciple.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumericChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChildPrinciple.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChildPrinciple.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if ((serThisChild.mType == UnitProtoType.Type.TYPE_SMALL_X || serThisChild.mType == UnitProtoType.Type.TYPE_BIG_X)\n && serPrevChild.isPossibleNumberChar() && serNextChild.getPrincipleSER(4).isPossibleNumberChar()\n && (serNextChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n || serNextChild.mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_VCUTUPPERNOTE)\n && serPrevChild.getBottomPlus1() - serThisChild.getBottomPlus1() >= 0\n && serNextChild.getPrincipleSER(4).getBottomPlus1() - serThisChild.getBottomPlus1() >= 0\n && (serThisChild.mnTop - serPrevChild.mnTop) >= serThisChild.mnHeight * ConstantsMgr.msdCrosMultiplyLowerThanNeighbor\n && (serThisChild.mnTop - serNextChild.getPrincipleSER(4).mnTop) >= serThisChild.mnHeight * ConstantsMgr.msdCrosMultiplyLowerThanNeighbor) {\n // cross multiply may be misrecognized as x or X. But corss multiply generally is shorter and lower than its left and right neighbours.\n serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_MULTIPLY, serThisChild.mstrFont);\n } else if (serPrevChild.isNumericChar() && serThisChild.isLetterChar() && serNextChild.isNumericChar()) {\n // this letter might be miss recognized, look for another candidate. this is for the case like 3S4\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isNumberChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChild.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if (serPrevChild.isBiOptChar() && !serPrevChild.isPossibleNumberChar() && !serPrevChild.isPostUnOptChar() && serNextChild.isNumericChar()\n && !serThisChild.isNumberChar() && !serThisChild.isLetterChar() && !serThisChild.isBoundChar()) {\n // this is for the case like +]9\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serThisChild.mType, serThisChild.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isNumberChar(listCands.get(idx1).mType) || isLetterChar(listCands.get(idx1).mType) || isBoundChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serThisChild.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serThisChild.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if (serThisChild.mType == UnitProtoType.Type.TYPE_MULTIPLY\n && ((serPrevChild.isBiOptChar() && !serPrevChild.isPossibleNumberChar() /* && !serPrevChild.isLetterChar()*/) // | can be misrecognized number 1.\n || (serNextChild.isBiOptChar() && !serNextChild.isPossibleNumberChar() /* && !serNextChild.isLetterChar()*/))) {\n // convert like ...\\multiply=... to ...x=....\n // we specify multiply because this is very special case. No other situation when this child is operator would be like this.\n // moreover, generally if we see two continous biopts, we don't know which one is misrecognized. But here we know.\n serThisChild.changeSEREnumType(UnitProtoType.Type.TYPE_SMALL_X, serThisChild.mstrFont);\n }\n }\n }\n }\n break;\n } case EXPRRECOGTYPE_VCUTLEFTTOPNOTE:\n case EXPRRECOGTYPE_VCUTUPPERNOTE:\n case EXPRRECOGTYPE_VCUTLOWERNOTE:\n case EXPRRECOGTYPE_VCUTLUNOTES: {\n StructExprRecog serLeftTopNote = null, serUpperNote = null, serLowerNote = null, serBase = null;\n if (mnExprRecogType == EXPRRECOGTYPE_VCUTLEFTTOPNOTE) {\n serLeftTopNote = mlistChildren.getFirst();\n serBase = mlistChildren.getLast();\n } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE) {\n serBase = mlistChildren.getFirst();\n serUpperNote = mlistChildren.getLast();\n } else if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE) {\n serBase = mlistChildren.getFirst();\n serLowerNote = mlistChildren.getLast();\n } else {\n serBase = mlistChildren.getFirst();\n serLowerNote = mlistChildren.get(1);\n serUpperNote = mlistChildren.getLast();\n }\n if (mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serLowerNote.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serLowerNote.mType == UnitProtoType.Type.TYPE_DOT\n && serBase.isLetterChar()) {\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serBase.mType, serBase.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isNumberChar(listCands.get(idx1).mType)) {\n // ok, change it to a number.\n serBase.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serBase.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else if ((mnExprRecogType == EXPRRECOGTYPE_VCUTLOWERNOTE || mnExprRecogType == EXPRRECOGTYPE_VCUTUPPERNOTE) // if it is upper lower note, then it is an integrate\n && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && serBase.isIntegTypeChar()) { // this seems to be a function.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serBase.mType, serBase.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType)) {\n // ok, change it to a letter.\n serBase.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serBase.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n } else {\n if (serLeftTopNote != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serLeftTopNote);\n }\n if (serUpperNote != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serUpperNote);\n }\n if (serLowerNote != null) {\n rectifyMisRecogCapUnderNotesChar(clm, serLowerNote);\n }\n rectifyMisRecogLUNotesBaseChar(clm, serBase);\n }\n break;\n } case EXPRRECOGTYPE_GETROOT: {\n StructExprRecog serRootLevel = mlistChildren.getFirst();\n StructExprRecog serRootedExpr = mlistChildren.getLast();\n if (serRootLevel.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && !serRootLevel.isLetterChar() && !serRootLevel.isNumberChar()\n && !serRootLevel.isSqrtTypeChar()) {\n // this letter might be miss recognized, look for another candidate.\n LinkedList<CharCandidate> listCands = clm.findCharCandidates(serRootLevel.mType, serRootLevel.mstrFont);\n for (int idx1 = 0; idx1 < listCands.size(); idx1 ++) {\n if (isLetterChar(listCands.get(idx1).mType) || isNumberChar(listCands.get(idx1).mType)) {\n // ok, change it to the new char\n serRootLevel.changeSEREnumType(listCands.get(idx1).mType,\n (listCands.get(idx1).mstrFont.length() == 0)?serRootLevel.mstrFont:listCands.get(idx1).mstrFont);\n break;\n }\n }\n }\n rectifyMisRecogNumLetter(clm, serRootedExpr);\n break;\n } default: {\n // EXPRRECOGTYPE_LISTCUT do nothing.\n }\n }\n // rectify its children.\n if (mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) {\n for (int idx = 0; idx < mlistChildren.size(); idx ++) {\n mlistChildren.get(idx).rectifyMisRecogChars1stRnd(clm);\n }\n }\n }", "static boolean checkingBalanceBrackets(String brac) {\r\n\t\t\r\n\t\tStack <Character> inputString = new Stack<Character>();\r\n\t\t\r\n\t\tfor(int i=0;i<brac.length();i++) {\r\n\t\t\tchar bracChar = brac.charAt(i);\r\n\t\t\tif(bracChar == '(' || bracChar == '{' || bracChar == '[') {\r\n\t\t\t\tinputString.push(bracChar);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\t\r\n\t\t\tif(inputString.isEmpty()) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t//Check if we had inputed closing braces and start check for matching Open braces\r\n\t\t\tchar localChar;\r\n\t\t\tswitch(bracChar) \r\n\t\t\t{\r\n\t\t\t\tcase')' :\r\n\t\t\t\t{\r\n\t\t\t\t\tlocalChar = inputString.pop();\r\n\t\t\t\t\tif(localChar == '{' || localChar == '[') {\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t\t}\r\n\t\t\t\tcase '}' :\r\n\t\t\t\t{\r\n\t\t\t\t\tlocalChar = inputString.pop();\r\n\t\t\t\t\tif(localChar == '(' || localChar == '[') \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak; \r\n\t\t\t\t}\r\n\t\t\t\tcase ']' :\r\n\t\t\t\t{\r\n\t\t\t\t\tlocalChar = inputString.pop();\r\n\t\t\t\t\tif(localChar == '(' || localChar == '{') \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak; \r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t\r\n\t\treturn (inputString.isEmpty());\r\n\t}", "@Test\n\tpublic void testLookaheadBoundary() {\n\t\t\n\t\t\n\t\tString lookaheads[] = {\"[true, f\", \"{\\\"boo\\\": nu\", \"[false, tr\", \"[false, t\", \"[false, tru\"};\n\t\t\n\t\tfor (String lookahead: lookaheads) {\n\t\t\tJSONParser jp = new JSONParser();\n\t\t\tList<ParsedElement> elements = jp.parse(lookahead);\n\t\t\tassertTrue(String.format(\"lookahead <%s> doesn't crash the parser\", lookahead),elements.size() == 3);\n\t\t}\n\t\t\n\t\tJSONParser jp = new JSONParser();\n\t\tList<ParsedElement> elements = jp.parse(\"{\\\"foo\\\": true\");\n\t\tassertTrue(\"Barewords are parsed at the right lookahead length\", elements.size() == 4);\n\t\t\n\t\telements = jp.parse(\"{\\\"foo\\\": false\");\n\t\tassertTrue(\"Barewords are parsed at the right lookahead length\", elements.size() == 4);\n\t\t\n\t\telements = jp.parse(\"[1, 2, 3, nul\");\n\t\tassertTrue(\"Barewords are parsed at the right lookahead length\", elements.size() == 7);\n\t}", "@Test\n\tpublic void testLookaheadBeyondEnd()\n\t{\n\t\tth.addError(1, 7, \"Unmatched '{'.\");\n\t\tth.addError(1, 7, \"Unrecoverable syntax error. (100% scanned).\");\n\t\tth.test(\"({ a: {\");\n\t}", "@Override\n protected void paintAbsolute(Rectangle r, Graphics g, boolean inverted){\n int lry = r.height + r.y;\n int lrx = r.width + r.x - 1;\n // draw the bracket according to the OrientationType provided\n switch (this.getOrientation()) {\n case east:\n case west:\n if (! useCharacters) {\n // doesn't look better if enabled\n if (false && r.height <= this.fontHeight) {\n if (this.getOrientation() == Orientation.west) {\n g.drawString(\"[\", r.x, r.y + r.height);\n } else {\n g.drawString(\"]\", lrx - fontWidth, r.y + r.height);\n }\n } else {\n g.drawLine(r.x, r.y, lrx, r.y);\n g.drawLine(r.x, lry, lrx, lry);\n if (this.getOrientation() == Orientation.west) lrx = r.x;\n g.drawLine(lrx, r.y, lrx, lry);\n }\n } else {\n // This would be the preferred way of painting Brackets and Braces,\n // but the fonts are rendered strangely, and support seems incomplete?\n int bc = (this.getOrientation() == Orientation.west) ? 6 : 9;\n if (r.height <= this.fontHeight) {\n g.drawString(bc == 6 ? \"[\" : \"]\", r.x, r.y - this.fontOffset);\n } else {\n int y = r.y - this.fontOffset;\n int x = r.x;\n g.drawString(BRACKET_CHARS.substring(bc,bc+1), x , y );\n int yLast = r.y + r.height - this.fontHeight - this.fontOffset;\n g.drawString(BRACKET_CHARS.substring(bc+2,bc+3), x , yLast);\n yLast -= this.fontHeight;\n while (y < yLast) {\n y += this.fontHeight;\n g.drawString(BRACKET_CHARS.substring(bc+1,bc+2), x, y);\n }\n }\n }\n break;\n case north:\n case south:\n g.drawLine(r.x, lry, r.x, r.y);\n g.drawLine(lrx, r.y, lrx, lry);\n if (this.getOrientation() == Orientation.north) lry = r.y;\n g.drawLine(r.x, lry, lrx, lry);\n break;\n } // end switch\n }", "private void find(char[] cArr, int idx, List<String> result, int left, int right){\n\t\tif(left == 0 && right == 0){\n\t\t\tresult.add(String.valueOf(cArr));\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\t//this is the invalid case so terminate the execution\n\t\tif(left > right){\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t//try the left brace\n\t\tif(left > 0){\n\t\t\tcArr[idx] = '(';\n\t\t\tfind(cArr, idx + 1, result, left - 1, right);\n\t\t}\n\t\t\n\t\t//then try right brace\n\t\tif(right > 0){\n\t\t\tcArr[idx] = ')';\n\t\t\tfind(cArr, idx + 1, result, left, right - 1);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\twhile(sc.hasNext()){\r\n\t\t\tString str = sc.nextLine();\r\n\t\t\tStack<String> digit = new Stack<>();\r\n\t\t\tStringBuffer buffer = new StringBuffer();\r\n\t\t\tchar ch;\r\n\t\t\tboolean isHasOperator = false;\r\n\t\t\tboolean isLegal = true;\r\n\t\t\tint len = str.length();\r\n\t\t\tint i = 0;\r\n\t\t\twhile(i<len){\r\n\t\t\t\tch = str.charAt(i);\r\n\t\t\t\tswitch (ch) {\r\n\t\t\t\tcase '[':\r\n\t\t\t\tcase '{':\r\n\t\t\t\tcase '(':\r\n\t\t\t\tcase '+':\r\n\t\t\t\tcase '-':\r\n\t\t\t\tcase '*':\r\n\t\t\t\tcase '/':\r\n\t\t\t\t\tdigit.push(ch+\"\");\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase ']':\r\n\t\t\t\tcase '}':\r\n\t\t\t\tcase ')':\r\n\t\t\t\t\tString second = null;\r\n\t\t\t\t\twhile(digit.size()>1){\r\n\t\t\t\t\t\t//!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")\r\n\t\t\t\t\t\tif(!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")&&!digit.peek().equals(\")\")\r\n\t\t\t\t\t\t\t\t&&!digit.peek().equals(\"]\")&&!digit.peek().equals(\"}\")&&!digit.peek().equals(\"+\")&&!digit.peek().equals(\"-\")&&!digit.peek().equals(\"*\")&&!digit.peek().equals(\"/\")){\r\n\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\tif (digit.size()>0&&(digit.peek().equals(\"+\")||digit.peek().equals(\"-\")||digit.peek().equals(\"*\")||digit.peek().equals(\"/\"))) {\r\n\t\t\t\t\t\t\t\tisHasOperator = true;\r\n\t\t\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\t\t\tif (digit.size()>0) {\r\n\t\t\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tString first = digit.pop();\r\n\t\t\t\t\t\tif (digit.size()>0&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")) {\r\n\t\t\t\t\t\t\tif (digit.peek().equals(\"+\")||digit.peek().equals(\"-\")||digit.peek().equals(\"*\")||digit.peek().equals(\"/\")) {\r\n\t\t\t\t\t\t\t\tisHasOperator = true;\r\n\t\t\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\t\t\tif (isHasOperator&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")&&!digit.peek().equals(\")\")\r\n\t\t\t\t\t\t\t\t\t\t&&!digit.peek().equals(\"]\")&&!digit.peek().equals(\"}\")&&!digit.peek().equals(\"+\")&&!digit.peek().equals(\"-\")&&!digit.peek().equals(\"*\")&&!digit.peek().equals(\"/\")) {\r\n\t\t\t\t\t\t\t\t\tsecond = digit.pop();\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (second==null) {\r\n\t\t\t\t\t\tisLegal = false;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tdigit.pop();\r\n\t\t\t\t\t\tdigit.push(second);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tbuffer.append(ch);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\twhile(i<len&&ch!='+'&&ch!='-'&&ch!='*'&&ch!='/'&&ch!='['&&ch!='{'&&ch!='('&&ch!=')'&&ch!=']'&&ch!='}'){\r\n\t\t\t\t\t\tch = str.charAt(i);\r\n\t\t\t\t\t\tbuffer.append(ch);\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tdigit.push(buffer.toString());\r\n\t\t\t\t\tbuffer.setLength(0);\r\n\t\t\t\t\ti++;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif (!isLegal) {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (digit.size()==1&&!digit.peek().equals(\"{\")&&!digit.peek().equals(\"[\")&&!digit.peek().equals(\"(\")) {\r\n\t\t\t\t\r\n\t\t\t}else {\r\n\t\t\t\tisLegal = false;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(isLegal);\r\n\t\t}\r\n\t}", "private static void removeBrackets(Element currentElement) {\r\n\t\tfor (Element removeBraces : currentElement.select(\":matchesOwn(\\\\((.*?)\\\\))\")) { // Removes characters in brackets\r\n\t\t\tremoveBraces.html(removeBraces.html().replaceAll(\"\\\\([^()]*\\\\)\", \"\"));\r\n\t\t}\r\n\t}", "public static boolean isValidSymbolPattern(String s) throws Exception{\n Stack<Character> stack = new Stack<Character>();\n if(s == null || s.length() == 0){\n return true;\n }\n for(int i = 0; i < s.length(); i++){\n if(s.charAt(i) == ')'){\n if(!stack.isEmpty() && stack.peek() == '('){\n stack.pop();\n }else{\n return false;\n }\n }else if(s.charAt(i) == ']'){\n if(!stack.isEmpty() && stack.peek() == '['){\n stack.pop();\n }else{\n return false;\n }\n }else if(s.charAt(i) == '}'){\n if(!stack.isEmpty() && stack.peek() == '{'){\n stack.pop();\n }else{\n return false;\n }\n }else{\n stack.push(s.charAt(i));\n }\n }\n if(stack.isEmpty()){\n return true;\n }else{\n return false;\n }\n }", "@Test\n public void nonBracket(){\n assertTrue(BalancedBrackets.hasBalancedBrackets(\"\"));\n }", "private static String fixLeadingBracketSugar( String dotNotaton ) {\n\n if ( dotNotaton == null || dotNotaton.length() == 0 ) {\n return \"\";\n }\n\n char prev = dotNotaton.charAt( 0 );\n StringBuilder sb = new StringBuilder();\n sb.append( prev );\n\n for ( int index = 1; index < dotNotaton.length(); index++ ) {\n char curr = dotNotaton.charAt( index );\n\n if ( curr == '[' && prev != '\\\\') {\n if ( prev == '@' || prev == '.' ) {\n // no need to add an extra '.'\n }\n else {\n sb.append( '.' );\n }\n }\n\n sb.append( curr );\n prev = curr;\n }\n\n return sb.toString();\n }", "@Override\n\tprotected void handleCloseParenthesis() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "private void checkChar(String s) {\n\n\t\t// When it is any digit, just add to queue\n\t\tif (s.matches(\"\\\\d\")) {\n\t\t\tqueue.add(s);\n\n\t\t} else if (s.matches(\"[(]\")) {\n\t\t\tstack.add(s);\n\n\t\t} else if (s.matches(\"[)]\")) {\n\t\t\temptyBracket();\n\n\t\t} else if (s.matches(\"[+-]\")) {\n\t\t\tif (stack.empty()) {\n\t\t\t\tstack.add(s);\n\n\t\t\t} else {\n\t\t\t\tplusMinus(s);\n\t\t\t}\n\n\t\t} else if (s.matches(\"[*/]\")) {\n\t\t\tif (stack.empty()) {\n\t\t\t\tstack.add(s);\n\n\t\t\t} else {\n\t\t\t\tmultiDiv(s);\n\t\t\t}\n\t\t} else if (s.matches(\"[\\\\^]\")) {\n\t\t\tpower(s);\n\t\t}\n\t}", "@Override\n\tprotected void highlightText(int start, int length) {\n\n\t\tsuper.highlightText(start, length);\n\n\t\ttry {\n\t\t\tint end = this.getLength();\n\n\t\t\tString content = this.getText(0, end);\n\n\t\t\t// TODO :: actually use the start and length passed in as arguments!\n\t\t\t// (currently, they are just being ignored...)\n\t\t\tstart = 0;\n\t\t\tend -= 1;\n\n\t\t\tchar lastDelimiter = ' ';\n\n\t\t\twhile (start <= end) {\n\n\t\t\t\t// while we have a delimiter...\n\t\t\t\tchar curChar = content.charAt(start);\n\t\t\t\twhile (isDelimiter(curChar)) {\n\n\t\t\t\t\tlastDelimiter = curChar;\n\n\t\t\t\t\t// ... check for the start of an object\n\t\t\t\t\tif (curChar == '{') {\n\t\t\t\t\t\tstart = highlightObject(content, start, end);\n\n\t\t\t\t\t// ... check for a comment (which starts with a delimiter)\n\t\t\t\t\t} else if (isCommentStart(content, start, end)) {\n\t\t\t\t\t\tstart = highlightComment(content, start, end);\n\n\t\t\t\t\t// ... and check for a quoted string\n\t\t\t\t\t} else if (isStringDelimiter(content.charAt(start))) {\n\n\t\t\t\t\t\t// then let's get that string!\n\t\t\t\t\t\tboolean singleForMultiline = false;\n\t\t\t\t\t\tboolean threeForMultiline = false;\n\t\t\t\t\t\tstart = highlightString(content, start, end, singleForMultiline, threeForMultiline);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// please highlight the delimiter in the process ;)\n\t\t\t\t\t\tif (!Character.isWhitespace(curChar)) {\n\t\t\t\t\t\t\tthis.setCharacterAttributes(start, 1, attrReservedChar, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (start < end) {\n\n\t\t\t\t\t\t// jump forward and try again!\n\t\t\t\t\t\tstart++;\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tcurChar = content.charAt(start);\n\t\t\t\t}\n\n\t\t\t\t// or any other token instead?\n\t\t\t\tstart = highlightOther(content, start, end, lastDelimiter);\n\t\t\t}\n\n\t\t} catch (BadLocationException e) {\n\t\t\t// oops!\n\t\t}\n\t}", "private boolean parseOpeningBracket() {\n if (index < end && source.charAt(index) == '[') {\n index++;\n return true;\n }\n return false;\n }", "private boolean isSpaceOrBracket(char c) {\n\t\t\treturn (c == '\\t' || c == '\\n' || c == ' ' || c == '(' || c == ')');\n\t\t}", "protected void errorSyntaxis(){\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint pos = fun.length;\n\t\tfor(int i = pos; i > 0;i--)\n\t\t\tvalidSyntaxis(Arrays.copyOfRange(fun,0,i));\n\t}", "@Override\n\t\tprotected boolean handleIrregulars(String s) {\n\t\t\treturn false;\n\t\t}", "public void analyzer(){\n i = 0;\n while (i<temp.length()){\n if(temp.charAt(i)=='p' || temp.charAt(i)=='q' || temp.charAt(i)=='r' || temp.charAt(i)=='s'){\n i++;\n if(i !=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(1);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(1);\n }\n } else if (temp.charAt(i)=='n') {\n i++;\n if(temp.charAt(i)=='o'){\n i++;\n if(temp.charAt(i)=='t'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(2);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(2); i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if (temp.charAt(i)=='a'){\n i++;\n if(temp.charAt(i)=='n'){\n i++;\n if(temp.charAt(i)=='d'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(3);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(3);\n break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(temp.charAt(i)=='x' && i!=temp.length()){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='o'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='r'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(5);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(3); i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(temp.charAt(i)=='o' & i!=temp.length()){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='r'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(4);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(4);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(i!=temp.length()&&temp.charAt(i)=='i'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='f'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)=='f'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(8);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(8);\n i++;\n }\n } else if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(6);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(6);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(i!=temp.length()&&temp.charAt(i)=='t'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='h'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='e'){\n i++;\n if(i!=temp.length()&&temp.charAt(i)=='n'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(7);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(7);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n } else if(i!=temp.length()&&temp.charAt(i)=='('){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i)==' '){\n token.add(9);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(9);\n i++;\n }\n } else if(i!=temp.length()&&temp.charAt(i)==')'){\n i++;\n if(i!=temp.length()){\n if(temp.charAt(i) == ' '){\n token.add(10);\n i++;\n } else {\n System.out.println(\"error\"); break;\n }\n } else {\n token.add(10);\n i++;\n }\n } else {\n System.out.println(\"error\"); break;\n }\n }\n \n //menyimpan data input dan array token kedalam class biasa\n Tahap1 a = new Tahap1(temp,token);\n lex.add(a);\n \n //reset untuk next use\n a = null;\n temp = \"\";\n }", "private String getSpecialToken(char[] characters) \n\t{\n\t\tString currentToken = \"\";\n\t\t//pos of current character\n\t\tint i;\n\t\t//look at each character\n\t\tfor (i=0; i<characters.length; i++)\n\t\t{\n\t\t\t//working with char ch\n\t\t\tchar ch = characters[i];\n\t\t\t//check if whitespace\n\t\t\tboolean ws = Character.isWhitespace(ch);\n\t\t\t//check type\n\t\t\tString type = getType(ch);\n\t\t\t//check if token is in core\n\t\t\tboolean isCore = core.containsKey(currentToken+ch);\n\t\t\t\n\t\t\t//not whitespace and new ch is an integer.\n\t\t\tif (!ws && Objects.equals(type, \"special\"))\n\t\t\t{\n\t\t\t\t//check if next character makes currentToken also special\n\t\t\t\tif ( i+1 < characters.length && core.containsKey(currentToken+ch+characters[i+1]) )\n\t\t\t\t{\n\t\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t\t}\n\t\t\t\telse if ( isCore ) //token is in core but token.concant(ch) is not!\n\t\t\t\t{\n\t\t\t\t\tcurrentToken = currentToken.concat(String.valueOf(ch));\n\t\t\t\t\treturn currentToken;\n\t\t\t\t}\n\t\t\t\telse //not a real special character\n\t\t\t\t{\n\t\t\t\t\t//shouldn't ever see this.\n\t\t\t\t\tSystem.out.println(\"\\n\"+ch+\" is not a valid symbol\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//not whitespace and special ch\n\t\t\telse if ( ws )\n\t\t\t{\n\t\t\t\treturn currentToken;\n\t\t\t}\n\t\t\telse //not whitespace, not special token, not valid special\n\t\t\t{\n\t\t\t\tSystem.out.println(\"\\n\"+currentToken+ch+\" is not a valid token!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\t//ran out of tokens to process\n\t\treturn currentToken;\n\t}", "public static boolean validateCharacters(String s) {\n if(s.length() % 2 != 0) {\n return false;\n }\n Stack<Character> stack = new Stack();\n for(char c : s.toCharArray()) {\n if(c == '(' || c == '[' || c == '{') {\n stack.push(c);\n } else if (c == ')' && !stack.isEmpty() && stack.peek() == '(') {\n stack.pop();\n } else if (c == ']' && !stack.isEmpty() && stack.peek() == '[') {\n stack.pop();\n } else if (c == '}' && !stack.isEmpty() && stack.peek() == '{') {\n stack.pop();\n } else {\n return false;\n }\n }\n\n return stack.isEmpty();\n }", "private void extendedNext() {\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t\tcontinue;\n\t\t} // we arw now on first non wmpty space\n\t\tif (data.length <= currentIndex) {\n\t\t\ttoken = new Token(TokenType.EOF, null); // null reference\n\t\t\treturn;\n\t\t}\n\t\tstart = currentIndex;\n\t\t// System.out.print(data);\n\t\t// System.out.println(\" \"+data[start]);;\n\t\tswitch (data[currentIndex]) {\n\t\tcase '@':\n\t\t\tcurrentIndex++;\n\t\t\tcreateFunctName();\n\t\t\treturn;\n\t\tcase '\"':// string\n\t\t\tcreateString();// \"\" are left\n\t\t\treturn;\n\t\tcase '*':\n\t\tcase '+':\n\t\tcase '/':\n\t\tcase '^':\n\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\tbreak;\n\t\tcase '$':\n\t\t\tString value = \"\";\n\t\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\ttoken = new Token(TokenType.Name,\n\t\t\t\t\tString.valueOf(data[currentIndex++]));\n\t\t\treturn;\n\t\tcase '-':\n\t\t\tif (currentIndex + 1 >= data.length\n\t\t\t\t\t|| !Character.isDigit(data[currentIndex + 1])) {\n\t\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\t// if we get here,after - is definitely a number\n\t\t\tif (data[currentIndex] == '-'\n\t\t\t\t\t|| Character.isDigit(data[currentIndex])) {\n\t\t\t\t// if its decimal number ,it must starts with 0\n\t\t\t\tcreateNumber();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Character.isLetter(data[currentIndex])) {\n\t\t\t\tvalue = name();\n\t\t\t\ttoken = new Token(TokenType.Name, value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrow new LexerException(\n\t\t\t\t\t\"No miningful tag starts with \" + data[currentIndex]);\n\t\t\t// createWord();\n\n\t\t}\n\t}", "private static void render(String s)\n {\n if (s.equals(\"{\"))\n {\n buf_.append(\"\\n\");\n indent();\n buf_.append(s);\n _n_ = _n_ + INDENT_WIDTH;\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"(\") || s.equals(\"[\"))\n buf_.append(s);\n else if (s.equals(\")\") || s.equals(\"]\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\"}\"))\n {\n int t;\n _n_ = _n_ - INDENT_WIDTH;\n for(t=0; t<INDENT_WIDTH; t++) {\n backup();\n }\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\",\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\" \");\n }\n else if (s.equals(\";\"))\n {\n backup();\n buf_.append(s);\n buf_.append(\"\\n\");\n indent();\n }\n else if (s.equals(\"\")) return;\n else\n {\n buf_.append(s);\n buf_.append(\" \");\n }\n }", "protected Bracket() {\n _obj = null;\n _index = null;\n }", "public boolean isValid(String s) {\n if (s.isEmpty()) {\n return true;\n }\n\n HashMap<Character, Character> p = new HashMap<>();\n p.put('{', '}');\n p.put('(', ')');\n p.put('[', ']');\n\n Stack<Character> st = new Stack<>();\n\n for (char c : s.toCharArray()) {\n if (p.containsKey(c)) { // open\n st.push(p.get(c)); // lest push closed bracket to the stack\n } else { // close\n // we've got unexpected bracket\n if (st.empty() || !st.pop().equals(c)) {\n return false;\n }\n }\n }\n\n return st.empty();\n }", "private int scanContent(char[] input,\n int offset,\n int end,\n int[] contentOffset,\n int[] contentSize,\n int[] lineNr)\n throws XMLParseException {\n if (input[offset] == '/') {\n contentSize[0] = 0;\n\n if (input[offset + 1] != '>') {\n throw this.expectedInput(\"'>'\", lineNr[0]);\n }\n\n return offset + 2;\n }\n\n if (input[offset] != '>') {\n throw this.expectedInput(\"'>'\", lineNr[0]);\n }\n\n if (this.skipLeadingWhitespace) {\n offset = this.skipWhitespace(input, offset + 1, end, lineNr);\n }\n else {\n offset++;\n }\n\n // int begin = offset;\n contentOffset[0] = offset;\n int level = 0;\n char[] tag = this.tagName.toCharArray();\n end -= (tag.length + 2);\n\n while ((offset < end) && (level >= 0)) {\n if (input[offset] == '<') {\n boolean ok = true;\n\n if ((offset < (end - 1)) && (input[offset + 1] == '!')\n && (input[offset + 2] == '[')) {\n offset++;\n continue;\n }\n\n for (int i = 0; ok && (i < tag.length); i++) {\n ok &= (input[offset + (i + 1)] == tag[i]);\n }\n\n ok &= !this.isIdentifierChar(input[offset + tag.length + 1]);\n\n if (ok) {\n while ((offset < end) && (input[offset] != '>')) {\n offset++;\n }\n\n if (input[offset - 1] != '/') {\n level++;\n }\n\n continue;\n }\n else if (input[offset + 1] == '/') {\n ok = true;\n\n for (int i = 0; ok && (i < tag.length); i++) {\n ok &= (input[offset + (i + 2)] == tag[i]);\n }\n\n if (ok) {\n contentSize[0] = offset - contentOffset[0];\n offset += tag.length + 2;\n\n try {\n offset = this.skipWhitespace(input, offset,\n end + tag.length\n + 2,\n lineNr);\n } catch (XMLParseException e) {\n // ignore\n }\n\n if (input[offset] == '>') {\n level--;\n offset++;\n }\n\n continue;\n }\n }\n }\n\n if (input[offset] == '\\r') {\n lineNr[0]++;\n\n if ((offset != end) && (input[offset + 1] == '\\n')) {\n offset++;\n }\n }\n else if (input[offset] == '\\n') {\n lineNr[0]++;\n }\n\n offset++;\n }\n\n if (level >= 0) {\n throw this.unexpectedEndOfData(lineNr[0]);\n }\n\n if (this.skipLeadingWhitespace) {\n int i = contentOffset[0] + contentSize[0] - 1;\n\n while ((contentSize[0] >= 0) && (input[i] <= ' ')) {\n i--;\n contentSize[0]--;\n }\n }\n\n return offset;\n }", "@Override\n public String postprocess ( String input ) {\n if (input == null || input.length() == 0)\n return input;\n \n \n char[] car = input.toCharArray();\n int maxLen = (allCharFixMaps.size() <= car.length) ? allCharFixMaps.size() : car.length;\n for(int i = 0; i < maxLen; i++) {\n HashMap<Character, Character> fixes = allCharFixMaps.get( i );\n if (fixes.containsKey( car[i] ))\n car[i] = fixes.get( car[i] );\n }\n return String.valueOf( car ).replaceAll( \" \", \"\" );\n }", "public boolean parseBracket(String s) {\n return false;\n }", "@Override\n protected boolean isValidChar(char character) {\n return character == SQ_BRACKET.getRuleStartChar() || character == BRACES.getRuleStartChar()\n || character == PARENTHESES.getRuleStartChar();\n }", "public char nextClean() throws JSONException {\n for(;;) {\n char c = this.next();\n if(c == 0 || c > ' ') {\n return c;\n }\n }\n }", "@Test\n\tpublic void testBadTokens() {\n\t\tassertEquals( SectionHeaderToken.fromIdentifier( \"&\" ), SectionHeaderToken.UNKNOWN );\n\t\tassertEquals( SectionHeaderToken.fromIdentifier( \"*\" ), SectionHeaderToken.UNKNOWN );\n\t\tassertEquals( SectionHeaderToken.fromIdentifier( \"%\" ), SectionHeaderToken.UNKNOWN );\n\t}", "public boolean isWellFormed(String inputPattern) {\n //empty or zero length patterns results in not well-form\n \tif (inputPattern == null || inputPattern.length() == 0) {\n return false;\n }\n // odd number of alphabets in the pattern would always result in false\n if ((inputPattern.length() % 2) != 0) {\n return false;\n }\n\n final Stack<Character> stack = new Stack<Character>();\n \n //process each alphabet in the input pattern until its get finished or \n //some decision is made \n \n for (int i = 0; i < inputPattern.length(); i++) {\n \t//tests if selected character is starting bracket or any other character\n if (brackets.containsKey(inputPattern.charAt(i))) {\n \t//testing case where inside parenthesis () only braces {} are allowed \n \tif(!stack.empty() && stack.peek() == '('){\n \t\tif(inputPattern.charAt(i) == '{'){\n \t\t\tstack.push(inputPattern.charAt(i));\n \t\t}else {\n \t\t\treturn false;\n \t\t}\n \t//testing case where inside braces {} only square brackets [] are allowed\n \t}else if(!stack.empty() && stack.peek() == '{'){\n \t\tif(inputPattern.charAt(i) == '['){\n \t\t\tstack.push(inputPattern.charAt(i));\n \t\t}else {\n \t\t\treturn false;\n \t\t}\n \t}else {\n \t\tstack.push(inputPattern.charAt(i));\n \t}\n //tests unexpectedly stack is empty or the closing bracket(unexpected character) unmatched\n } else if (stack.empty() || (inputPattern.charAt(i) != brackets.get(stack.pop()))) {\n return false;\n } \n }\n return true;\n }", "private void SolveCondition() {\n Pattern pt = Pattern.compile(\"(?<!\\\")\\\\[(.*?)\\\\](?<!\\\")\");\n //another greedy matching will be \\[([^}]+)\\]\n Matcher ma = pt.matcher(Input);\n while(ma.find()) {\n if(ma.groupCount()>0){\n System.out.println(ma.group(1));\n }\n }\n\n }", "private boolean performRearrange(List<CommonToken> tokens) throws BadLocationException\n\t{\n\t\tList<TagHolder> topLevelTags=new ArrayList<MXMLRearranger.TagHolder>();\n\t\tint tagLevel=0;\n\t\tfor (int tokenIndex=0;tokenIndex<tokens.size();tokenIndex++)\n\t\t{\n\t\t\tCommonToken token=tokens.get(tokenIndex);\n\t\t\tSystem.out.println(token.getText());\n\t\t\tswitch (token.getType())\n\t\t\t{\n\t\t\t\tcase MXMLLexer.TAG_OPEN:\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//capture tag\n\t\t\t\t\t\tint previousWSIndex=findPreviousWhitespaceIndex(tokens, tokenIndex-1);\n\t\t\t\t\t\tTagHolder holder=new TagHolder(tokens.get(previousWSIndex), previousWSIndex);\n\t\t\t\t\t\taddTagName(holder, tokens, tokenIndex);\n\t\t\t\t\t\tupdateCommentTagNames(topLevelTags, holder.mTagName);\n\t\t\t\t\t\ttopLevelTags.add(holder);\n\t\t\t\t\t}\n\t\t\t\t\ttagLevel++;\n\t\t\t\t\ttokenIndex=findToken(tokenIndex, tokens, MXMLLexer.TAG_CLOSE);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MXMLLexer.END_TAG_OPEN:\n\t\t\t\t\ttagLevel--;\n\t\t\t\t\ttokenIndex=findToken(tokenIndex, tokens, MXMLLexer.TAG_CLOSE);\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tmarkTopLevelTagEnd(tokenIndex, topLevelTags);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase MXMLLexer.EMPTY_TAG_OPEN:\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\t//capture tag\n\t\t\t\t\t\tint previousWSIndex=findPreviousWhitespaceIndex(tokens, tokenIndex-1);\n\t\t\t\t\t\tTagHolder holder=new TagHolder(tokens.get(previousWSIndex), previousWSIndex);\n\t\t\t\t\t\taddTagName(holder, tokens, tokenIndex);\n\t\t\t\t\t\tupdateCommentTagNames(topLevelTags, holder.mTagName);\n\t\t\t\t\t\ttopLevelTags.add(holder);\n\t\t\t\t\t}\n\t\t\t\t\ttokenIndex=findToken(tokenIndex, tokens, MXMLLexer.EMPTYTAG_CLOSE);\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t\tmarkTopLevelTagEnd(tokenIndex, topLevelTags);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MXMLLexer.COMMENT:\n\t\t\t\t\tif (tagLevel==1)\n\t\t\t\t\t{\n\t\t\t\t\t\tint previousWSIndex=findPreviousWhitespaceIndex(tokens, tokenIndex-1);\n\t\t\t\t\t\tTagHolder holder=new TagHolder(tokens.get(previousWSIndex), previousWSIndex);\n\t\t\t\t\t\ttopLevelTags.add(holder);\n\t\t\t\t\t\tmarkTopLevelTagEnd(tokenIndex, topLevelTags);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n//\t\t\t\tcase MXMLLexer.DECL_START:\n//\t\t\t\tcase MXMLLexer.CDATA:\n//\t\t\t\tcase MXMLLexer.PCDATA:\n//\t\t\t\tcase MXMLLexer.EOL:\n//\t\t\t\tcase MXMLLexer.WS:\n\t\t\t}\n\t\t}\n\t\t\n\t\tList<TagHolder> unsortedList=new ArrayList<MXMLRearranger.TagHolder>();\n\t\tunsortedList.addAll(topLevelTags);\n\t\t\n\t\t//sort the elements in the tag list based on the supplied ordering\n\t\tString ordering=mPrefs.getString(PreferenceConstants.MXMLRearr_RearrangeTagOrdering);\n\t\tString[] tagNames=ordering.split(PreferenceConstants.AS_Pref_Line_Separator);\n\t\tSet<String> usedTags=new HashSet<String>();\n\t\tfor (String tagName : tagNames) {\n\t\t\tif (!tagName.equals(PreferenceConstants.MXMLUnmatchedTagsConstant))\n\t\t\t\tusedTags.add(tagName);\n\t\t}\n\t\tList<TagHolder> sortedList=new ArrayList<MXMLRearranger.TagHolder>();\n\t\tfor (String tagName : tagNames) \n\t\t{\n\t\t\tboolean isSpecOther=tagName.equals(PreferenceConstants.MXMLUnmatchedTagsConstant);\n\t\t\t//find all the items that match\n\t\t\tfor (int i=0;i<topLevelTags.size();i++)\n\t\t\t{\n\t\t\t\tTagHolder tagHolder=topLevelTags.get(i);\n\t\t\t\t\n\t\t\t\t//if the tagname matches the current specification \n\t\t\t\t//OR if the current spec is the \"other\" and the current tag doesn't match any in the list\n\t\t\t\tboolean tagMatches=false;\n\t\t\t\tif (!isSpecOther)\n\t\t\t\t{\n\t\t\t\t\tSet<String> testTag=new HashSet<String>();\n\t\t\t\t\ttestTag.add(tagName);\n\t\t\t\t\ttagMatches=matchesRegEx(tagHolder.mTagName, testTag);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttagMatches=(!matchesRegEx(tagHolder.mTagName, usedTags));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (tagMatches)\n\t\t\t\t{\n\t\t\t\t\ttopLevelTags.remove(i);\n\t\t\t\t\tsortedList.add(tagHolder);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsortedList.addAll(topLevelTags);\n\t\t\n\t\t//check for changes: if no changes, do nothing\n\t\tif (sortedList.size()!=unsortedList.size())\n\t\t{\n\t\t\t//error, just kick out\n\t\t\tSystem.out.println(\"Error performing mxml rearrange; tag count doesn't match\");\n\t\t\tmInternalError=\"Internal error replacing text: tag count doesn't match\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tboolean differences=false;\n\t\tfor (int i=0;i<sortedList.size();i++)\n\t\t{\n\t\t\tif (sortedList.get(i)!=unsortedList.get(i))\n\t\t\t{\n\t\t\t\tdifferences=true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!differences)\n\t\t\treturn true; //succeeded, just nothing done\n\t\t\n\t\t//reconstruct document in the sorted order\n\t\tString source=mSourceDocument.get();\n\t\tStringBuffer newText=new StringBuffer();\n\t\tfor (TagHolder tagHolder : sortedList) \n\t\t{\n\t\t\tCommonToken startToken=tokens.get(tagHolder.mStartTokenIndex);\n\t\t\tCommonToken endToken=tokens.get(tagHolder.mEndTokenIndex);\n\t\t\tString data=source.substring(startToken.getStartIndex(), endToken.getStopIndex()+1);\n\t\t\tnewText.append(data);\n\t\t}\n\t\t\n\t\tint startOffset=tokens.get(unsortedList.get(0).mStartTokenIndex).getStartIndex();\n\t\tint endOffset=tokens.get(unsortedList.get(unsortedList.size()-1).mEndTokenIndex).getStopIndex()+1;\n\t\tString oldData=mSourceDocument.get(startOffset, endOffset-startOffset);\n\t\tif (!ActionScriptFormatter.validateNonWhitespaceCharCounts(oldData, newText.toString()))\n\t\t{\n\t\t\tmInternalError=\"Internal error replacing text: new text doesn't match replaced text(\"+oldData+\")!=(\"+newText.toString()+\")\";\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tmSourceDocument.replace(startOffset, endOffset-startOffset, newText.toString());\n\t\t\n\t\treturn true;\n\t}", "protected void addTextTokens(IScriptToken token, String text, ILocation location)\n {\n char[] buffer = text.toCharArray();\n int state = STATE_START;\n int blockStart = 0;\n int blockLength = 0;\n int expressionStart = -1;\n int expressionLength = 0;\n int i = 0;\n int braceDepth = 0;\n \n while (i < buffer.length)\n {\n char ch = buffer[i];\n \n switch (state)\n {\n case STATE_START :\n \n if (ch == '$')\n {\n state = STATE_DOLLAR;\n i++;\n continue;\n }\n \n blockLength++;\n i++;\n continue;\n \n case STATE_DOLLAR :\n \n if (ch == '{')\n {\n state = STATE_COLLECT_EXPRESSION;\n i++;\n \n expressionStart = i;\n expressionLength = 0;\n braceDepth = 1;\n \n continue;\n }\n \n state = STATE_START;\n continue;\n \n case STATE_COLLECT_EXPRESSION :\n \n if (ch != '}')\n {\n if (ch == '{')\n braceDepth++;\n \n i++;\n expressionLength++;\n continue;\n }\n \n braceDepth--;\n \n if (braceDepth > 0)\n {\n i++;\n expressionLength++;\n continue;\n }\n \n // Hit the closing brace of an expression.\n \n // Degenerate case: the string \"${}\".\n \n if (expressionLength == 0)\n blockLength += 3;\n \n if (blockLength > 0)\n token.addToken(constructStatic(text, blockStart, blockLength, location));\n \n if (expressionLength > 0)\n {\n String expression =\n text.substring(expressionStart, expressionStart + expressionLength);\n \n token.addToken(new InsertToken(expression, location));\n }\n \n i++;\n blockStart = i;\n blockLength = 0;\n \n // And drop into state start\n \n state = STATE_START;\n \n continue;\n }\n \n }\n \n // OK, to handle the end. Couple of degenerate cases where\n // a ${...} was incomplete, so we adust the block length.\n \n if (state == STATE_DOLLAR)\n blockLength++;\n \n if (state == STATE_COLLECT_EXPRESSION)\n blockLength += expressionLength + 2;\n \n if (blockLength > 0)\n token.addToken(constructStatic(text, blockStart, blockLength, location));\n }", "private static boolean Question5(String s) {\n\t\t// take a empty stack of characters\n\t\tStack<Character> st = new Stack<Character>();\n\t\t\n\t\t// traverse the input expression\n\t\tfor(int i=0, n = s.length(); i<n ; i++) {\n\t\t\t\n\t\t\tchar curr = s.charAt(i);\n\t\t\t\n\t\t\t// if current char in the expression is a opening brace,\n\t\t\t// push it to the stack\n\t\t\tif(curr == '(' || curr == '{' || curr == '[' ) {\n\t\t\t\tst.push(curr);\n\t\t\t}\t\t\t\n\t\t\telse { // Its } or ) or ]\n\t\t\t\t\n\t\t\t\t// return false if mismatch is found (i.e. if stack is\n\t\t\t\t// empty, the number of opening braces is less than number\n\t\t\t\t// of closing brace, so expression cannot be balanced)\n\t\t\t\tif(st.isEmpty())\n\t\t\t\t\treturn false;\n\t\t\t\t\n\t\t\t\t// pop character from the stack\n\t\t\t\tchar top = st.pop();\n\t\t\t\tif( top == '(' && curr != ')' ||\n\t\t\t\t\ttop == '[' && curr != ']' ||\n\t\t\t\t\ttop == '{' && curr != '}' )\n\t\t\t\t\treturn false;\t\t\t\n\t\t\t}\n\t\t}\n\t\t// expression is balanced only if stack is empty at this point\n\t\treturn st.isEmpty();\n\t}", "public Object[] invalidParams() {\n\t\treturn new Object[] {\n\t\t\t// backslash\n\t\t\tnew Object[] {\"abc\\\\\", \"missing character after '\\\\'\"},\n\t\t\t// \\Q...\\E\n\t\t\tnew Object[] {\"a\\\\\\\\Q\\\\E\", \"missing '\\\\Q' before '\\\\E'\"},\n\t\t\tnew Object[] {\"\\\\Qab\\\\Q*\\\\E*\\\\E\", \"missing '\\\\Q' before '\\\\E'\"},\n\t\t\t// octal and hexadecimal escapes\n\t\t\tnew Object[] {\"\\\\0\", \"invalid octal value\"},\n\t\t\tnew Object[] {\"\\\\0a\", \"invalid octal value\"},\n\t\t\tnew Object[] {\"\\\\0\\\\\", \"invalid octal value\"},\n\t\t\tnew Object[] {\"\\\\08\", \"invalid octal value\"},\n\t\t\tnew Object[] {\"\\\\xfg\", \"invalid hexadecimal value\"},\n\t\t\tnew Object[] {\"\\\\ufffg\", \"invalid hexadecimal value\"},\n\t\t\tnew Object[] {\"\\\\u\\\\1111\", \"invalid hexadecimal value\"},\n\t\t\tnew Object[] {\"\\\\x{}\", \"invalid hexadecimal value\"},\n\t\t\tnew Object[] {\"\\\\x{g}\", \"invalid hexadecimal value\"},\n\t\t\tnew Object[] {\"\\\\x{10ffffg}\", \"invalid hexadecimal value\"},\n\t\t\tnew Object[] {\"\\\\x{10ffff\", \"missing '}' after hexadecimal value\"},\n\t\t\t// control characters\n\t\t\tnew Object[] {\"\\\\c\", \"missing control character\"},\n\t\t\tnew Object[] {\"\\\\c0\", \"invalid control character\"},\n\t\t\tnew Object[] {\"\\\\c\\\\0010\", \"invalid control character\"},\n\t\t\tnew Object[] {\"\\\\c\\\\0101\", \"invalid control character\"},\n\t\t\tnew Object[] {\"\\\\c@\", \"invalid control character\"},\n\t\t\tnew Object[] {\"\\\\c[\", \"invalid control character\"},\n\t\t\tnew Object[] {\"\\\\c`\", \"invalid control character\"},\n\t\t\tnew Object[] {\"\\\\c{\", \"invalid control character\"},\n\t\t\t// character classes\n\t\t\tnew Object[] {\"\\\\[[abc\\\\]\\\\)}\", \"character class not closed\"},\n\t\t\tnew Object[] {\"[abc\\\\Q]\\\\E\\\\[[x])}\", \"character class not closed\"},\n\t\t\tnew Object[] {\"[]\", \"character class not closed\"},\n\t\t\tnew Object[] {\"asdf[\", \"character class not closed\"},\n\t\t\tnew Object[] {\"[^]\", \"character class not closed\"}\n\t\t};\n\t}", "@BeforeEach\n\tvoid setUpInvalidRE(){\n\t\tinvalidRE= new String[lengthInvalid];\n\t\t// (ab\n\t\tinvalidRE[0] = \"(ab\";\n\t\t// ab)\n\t\tinvalidRE[1] = \"ab)\";\n\t\t// *\n\t\tinvalidRE[2] = \"*\";\n\t\t// ?\n\t\tinvalidRE[3] = \"?\";\n\t\t// +\n\t\tinvalidRE[4] = \"+\";\n\t\t// a | b | +c\n\t\tinvalidRE[5] = \"a | b | +c\";\n\t\t// a | b | *c\n\t\tinvalidRE[6] = \"a | b | *c\";\n\t\t// a | b | ?c\n\t\tinvalidRE[7] = \"a | b | ?c\";\n\t\t// a | b | | c\n\t\tinvalidRE[8] = \"a | b | | c\";\n\t\t// uneven parenthesis\n\t\tinvalidRE[9] = \"(a(b(c(d)*)+)*\";\n\t\t// a | b |\n\t\tinvalidRE[10] = \"a | b | \";\n\t\t// invalid symbols\n\t\tinvalidRE[11] = \"a | b | $ | -\";\n\t\t// (*)\n\t\tinvalidRE[12] = \"(*)\";\n\t\t// (|a)\n\t\tinvalidRE[13] = \"(|a)\";\n\t\t// (.b)\n\t\tinvalidRE[14] = \"(.b)\";\n\t}", "@Override\n\tpublic void closeReader() throws IOException, BracketsParseException {\n\t\ttry {\n\t\t\treader.close();\n\t\t\tif (!marks.isEmpty())\n\t\t\t\tthrow new BracketsParseException(\"]\");\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\t}", "private static boolean isPaired(char open, char closed)\r\n {\r\n return(open == '(' && closed == ')' ||\r\n open == '[' && closed == ']' ||\r\n open == '{' && closed == '}');\r\n }", "private boolean mapTokensToEDUUnitsRecursive(RSTTreeNode node, List<Token> tokens,\n AtomicInteger currentTokenIndex)\n {\n if (node instanceof EDU) {\n EDU edu = (EDU) node;\n String originalText = edu.getOriginalText();\n\n String trimmedText = originalText.replaceAll(\"^_!\", \"\").replaceAll(\"\\\\)+$\", \"\")\n .replaceAll(\"!_$\", \"\").replaceAll(\"<[sP]>$\", \"\");\n\n // some other WTFs :(\n trimmedText = trimmedText.replaceAll(\"etc\\\\.\", \"etc\");\n // we have to do some normalization\n trimmedText = trimmedText.replaceAll(\"’\", \"'\");\n trimmedText = trimmedText.replaceAll(\"”\", \"\\\"\");\n trimmedText = trimmedText.replaceAll(\"“\", \"\\\"\");\n trimmedText = trimmedText.replaceAll(\"´\", \"'\");\n\n String noSpaceText = trimmedText.replaceAll(\" \", \"\");\n\n // the first token of the span\n if (currentTokenIndex.get() >= tokens.size()) {\n // something is wrong here...\n return false;\n }\n\n Token begin = tokens.get(currentTokenIndex.get());\n\n // now find the last token of the span\n StringBuilder buffer = new StringBuilder();\n while (!buffer.toString().equals(noSpaceText)) {\n // get the current token's content\n int index = currentTokenIndex.get();\n if (index >= tokens.size()) {\n // we ran out of the buffer, something went wrong\n System.err.println(\"Mapping went wrong!\");\n System.err.println(\"noSpaceText:\\n\" + noSpaceText + \"\\nBuffer:\\n\" + buffer);\n\n for (int i = 0; i < tokens.size(); i++) {\n System.err.printf(\"%d:%s \", i, tokens.get(i).getCoveredText());\n }\n System.err.println();\n\n return false;\n }\n\n String tokenText = tokens.get(index).getCoveredText();\n\n // we have to do some normalization\n tokenText = tokenText.replaceAll(\"’\", \"'\");\n tokenText = tokenText.replaceAll(\"”\", \"\\\"\");\n tokenText = tokenText.replaceAll(\"“\", \"\\\"\");\n tokenText = tokenText.replaceAll(\"´\", \"'\");\n tokenText = tokenText.replaceAll(\"‘\", \"'\");\n tokenText = tokenText.replaceAll(\"—\", \"--\");\n tokenText = tokenText.replaceAll(\"–\", \"--\");\n tokenText = tokenText.replaceAll(\"\\\\.\\\\.\\\\.\\\\.+\", \"...\");\n tokenText = tokenText.replaceAll(\"…\", \"...\");\n tokenText = tokenText.replaceAll(\"£\", \"#\");\n\n buffer.append(tokenText);\n // and increase\n currentTokenIndex.incrementAndGet();\n }\n\n // the previous one was the last token of the EDU\n Token end = tokens.get(currentTokenIndex.get() - 1);\n\n // and now set the proper begin/end for the EDU\n edu.setBegin(begin.getBegin());\n edu.setEnd(end.getEnd());\n }\n\n boolean result = true;\n\n // recursive call for children (if applicable)\n if (node instanceof DiscourseRelation) {\n result &= mapTokensToEDUUnitsRecursive(((DiscourseRelation) node).getArg1(), tokens,\n currentTokenIndex);\n result &= mapTokensToEDUUnitsRecursive(((DiscourseRelation) node).getArg2(), tokens,\n currentTokenIndex);\n }\n\n return result;\n }", "private static Map collectReplacedTokens(String encodedSource, boolean escapeUnicode, TokenMapper tm) {\n \tint length = encodedSource.length();\n \t\n\t\tint i = 0;\n\t\tint prevToken = 0;\n\t\tint braceNesting = 0;\n\t\t\n\t\tboolean inArgsList = false;\n boolean primeFunctionNesting = false;\n boolean primeInArgsList = false;\n\t\t\n if (encodedSource.charAt(i) == Token.SCRIPT) {\n ++i;\n }\n\n Stack positionStack = new Stack();\n Stack functionPositionStack = new Stack();\n Map tokenLookup = new HashMap();\n \n\t\twhile (i < length) {\n\t\t\tif (i > 0) {\n\t\t\t\tprevToken = encodedSource.charAt(i - 1);\n\t\t\t}\n\t\t\tswitch (encodedSource.charAt(i)) {\n\t\t\t\tcase Token.NAME:\n\t\t\t\tcase Token.REGEXP: {\n\t\t\t\t\tint jumpPos = getSourceStringEnd(encodedSource, i + 1, escapeUnicode);\n\t\t\t\t\tif (Token.OBJECTLIT == encodedSource.charAt(jumpPos)) {\n\t\t\t\t\t\ti = printSourceString(encodedSource, i + 1, false, null, escapeUnicode);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ti = tm.sourceCompress(encodedSource, i + 1, false, null, prevToken, inArgsList, braceNesting, null);\n\t\t\t\t\t}\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase Token.STRING: {\n\t\t\t\t\ti = printSourceString(encodedSource, i + 1, true, null, escapeUnicode);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase Token.NUMBER: {\n\t\t\t\t\ti = printSourceNumber(encodedSource, i + 1, null);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tcase Token.FUNCTION: {\n\t\t\t\t\t++i; // skip function type\n\t\t\t\t\ttm.incrementFunctionNumber();\n\t\t\t\t\tprimeInArgsList = true;\n\t\t\t\t\tprimeFunctionNesting = true;\n\t\t\t\t\tfunctionPositionStack.push(new Integer(i-1));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.LC: {\n\t\t\t\t\t++braceNesting;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.RC: {\n\t\t\t\t\tMap m = tm.getCurrentTokens();\n\t\t\t\t\tif (tm.leaveNestingLevel(braceNesting)) {\n\t\t\t\t\t\tInteger pos = (Integer)positionStack.pop();\n\t\t\t\t\t\tInteger functionPos = (Integer)functionPositionStack.pop();\n\t\t\t\t\t\tint[] parents = new int[positionStack.size()];\n\t\t\t\t\t\tint idx = 0;\n\t\t\t\t\t\tfor (Iterator itr = positionStack.iterator(); itr.hasNext();) {\n\t\t\t\t\t\t\tparents[idx++] = ((Integer)itr.next()).intValue();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDebugData debugData = tm.getDebugData(functionPos);\n\t\t\t\t\t\tReplacedTokens replacedTokens = new ReplacedTokens(m, parents, tokenLookup, debugData); \n\t\t\t\t\t\ttokenLookup.put(pos, replacedTokens);\n\t\t\t\t\t}\n\t\t\t\t\t--braceNesting;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.LP: {\n\t\t\t\t\tif (primeInArgsList) {\n\t\t\t\t\t\tinArgsList = true;\n\t\t\t\t\t\tprimeInArgsList = false;\n\t\t\t\t\t}\n\t\t\t\t\tif (primeFunctionNesting) {\n\t\t\t\t\t\tpositionStack.push(new Integer(i));\n\t\t\t\t\t\ttm.enterNestingLevel(braceNesting);\n\t\t\t\t\t\tprimeFunctionNesting = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase Token.RP: {\n\t\t\t\t\tif (inArgsList) {\n\t\t\t\t\t\tinArgsList = false;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t++i;\n\t\t}\n\t\treturn tokenLookup;\n\t}", "static void lookUp() throws IOException {\n switch (curr_char) {\n case 124:\n curr_type = TokenType.VERT;\n break;\n case 42:\n curr_type = TokenType.STAR;\n break;\n case 43:\n curr_type = TokenType.PLUS;\n break;\n case 63:\n curr_type = TokenType.QMARK;\n break;\n case 40:\n curr_type = TokenType.LPAREN;\n break;\n case 41:\n curr_type = TokenType.RPAREN;\n break;\n case 46:\n curr_type = TokenType.PERIOD;\n break;\n case 92:\n curr_type = TokenType.BSLASH;\n break;\n case 91:\n int temp = 0;\n temp = pbIn.read();\n if(temp == 94) {\n curr_type = TokenType.LNEGSET;\n }\n else {\n pbIn.unread(temp);\n curr_type = TokenType.LPOSSET;\n }\n break;\n case 93:\n curr_type = TokenType.RSET;\n break;\n case 60:\n curr_type = TokenType.LANGLE;\n break;\n case 62:\n curr_type = TokenType.RANGLE;\n break;\n case 13:\n int checkCRLF;\n curr_type = TokenType.EOL;\n checkCRLF = pbIn.read();\n if(checkCRLF != 10)\n {\n pbIn.unread(checkCRLF);\n }\n break;\n default:\n if(Character.isDigit((char)curr_char) || Character.isLetter((char)curr_char) || curr_char == 94 || curr_char == 47)\n {\n curr_type = TokenType.CHAR;\n }\n else {\n curr_type = TokenType.ERROR;\n }\n }\n }", "@Override\n public Token recoverInline(Parser recognizer) {\n super.recoverInline(recognizer);\n recognizer.exitRule();\n System.exit(SYNTAX_ERROR_CODE);\n return null;\n }", "@Override\n protected void reportUnwantedToken(Parser recognizer) {\n super.reportUnwantedToken(recognizer);\n System.exit(SYNTAX_ERROR_CODE);\n }", "void cannotRecognize(Term token);", "private void Spacing() {\n\n try {\n while (true) {\n try {\n Space();\n } catch (SyntaxError e) {\n Comment();\n }\n }\n } catch (SyntaxError e) {\n }\n }", "public void method1() {\n String s = \"\\uFE64\" + \"script\" + \"\\uFE65\";\n // Validate\n Pattern pattern = Pattern.compile(\"[<>]\"); // Check for angle brackets\n Matcher matcher = pattern.matcher(s);\n if (matcher.find()) {\n // Found black listed tag\n throw new IllegalStateException();\n } else {\n // ...\n }\n // Normalize\n s = Normalizer.normalize(s, Form.NFKC);\n }", "void rest() throws IOException {\n\t\twhile(true) {\n\t\t\tif (lookahead == '+') {\n\t\t\t\tif(wrongState == false) \n\t\t\t\t\terrorPos = errorPos+(char)' ';\n\t\t\t\telse \n\t\t\t\t\twrongState = false;\n\t\t\t\tmatch('+');\n\t\t\t\tterm();\n\t\t\t\tif(errorNum == 0) {\n\t\t\t\t\toutput = output + (char)'+';\n\t\t\t\t}\n\t\t\t} else if (lookahead == '-') {\n\t\t\t\tif(wrongState == false) \n\t\t\t\t\terrorPos = errorPos+(char)' ';\n\t\t\t\telse \n\t\t\t\t\twrongState = false;\n\t\t\t\tmatch('-');\n\t\t\t\tterm();\n\t\t\t\tif(errorNum == 0) {\n\t\t\t\t\toutput = output + (char)'-';\n\t\t\t\t}\n\t\t\t} else if(lookahead == 13){\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\terrorNum++;\n\t\t\t\tif(Character.isDigit((char)lookahead)) {\n errorList.add(\"Miss a operator!!\");\n errorPos = errorPos + (char)'^';\n wrongState = true;\n\t\t\t\t} else {\n\t\t\t\t\terrorList.add(\"Operator don't exist!!\");\n errorPos = errorPos + (char)'^';\n match(lookahead);\n\t\t\t\t}\n\t\t\t\tterm();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void eatEscaped(int esc) {\n position++;\n while (position < length) {\n int c = data.charAt(position);\n\n if (c == esc) {\n // check for end of file\n if (position + 1 >= length) {\n tokenStart++;\n tokenEnd = position;\n isEscaped = true;\n position++;\n return;\n\n }\n\n int next = data.charAt(position + 1);\n if (next == '\\t' || next == '\\n' || next == '\\r' || next == ' ') {\n // get rid of the quotes\n tokenStart++;\n tokenEnd = position;\n isEscaped = true;\n position++;\n return;\n }\n\n } else {\n // handle 'xxxNEWLINE => 'xxx\n if (c == '\\r' || c == '\\n') {\n tokenEnd = position;\n return;\n }\n }\n position++;\n }\n\n tokenEnd = position;\n }", "@Test\n void shouldRenderValidTags() throws Exception {\n MatcherAssert.assertThat(\n new Variable(\n new SquareIndicate()\n ).render(\n \"[[ aA0._ ]] \",\n new MapOf<>(\"aA0._\", \"XX\")\n ),\n Matchers.is(\"XX \")\n );\n }", "public void ignorableWhitespace(char[] ch, int start, int length) { }", "private void validExpresion(){\n\t\tString valores =\"+/*-^sinbqrcotah.\";\n\t\tchar[] fun = (this.getText()).toCharArray();\n\t\tint tam = fun.length-1;\n\t\tif(tam > 0){\n\t\t\tif(valores.indexOf(fun[tam]) != -1){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t\t}\n\t\t}\n\n\t\tif(this.getText().equals(\"+\") || this.getText().equals(\"-\") || this.getText().equals(\".\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\n\t\telse if(this.getText().equals(\"s\") || this.getText().equals(\"c\") || this.getText().equals(\"t\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\n\t\telse if(this.getText().equals(\"(\") || this.getText().equals(\"a\") || this.getText().equals(\"i\")){\n\t\t\t\tcont++;\n\t\t\t\tthis.setBackground(Color.RED);\n\t\t}\n\t}", "public boolean eos()\n \t{\n \t\tMatcherContext ctx = (MatcherContext) getContext();\n \t\tif (ctx == null)\n \t\t{\n \t\t\treturn false;\n \t\t}\n \t\t// geting after potential spacing first\n \t\tOptionalMatcher opt=new OptionalMatcher(spacing());\n \t\topt.match(ctx);\n \n \t\t// First check if we just passed a '\\n' (in spacing)\n \t\t//System.out.println(\"EOS> checking afterNL\");\n \t\tif (isAfterNL())\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> checking '}'\");\n \t\t// '}' is eos too, but we should not consume it, so using a test\n \t\tSequenceMatcher seq = (SequenceMatcher) sequence(OPT_SP, test(eoi()));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// test foe end of input, that qualifies too\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, test('}'));\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t// Otherwise look for upcoming statement ending chars: ';' or '}'\n \t\t//System.out.println(\"EOS> checking ';'\");\n \t\tseq = (SequenceMatcher) sequence(OPT_SP, ';');\n \t\tif (seq.match(ctx))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t\t//System.out.println(\"EOS> False\");\n \t\treturn false;\n \t}", "private void validSyntaxis(char[] fun){\n\t\tString valores = \"(a+/*-^\";\n\t\tString valores1 =\"(+/*-^\";\n\t\tString operadores =\"+/*-^\";\n\t\tString valores2 =\"(+-yzxuvwlmnjkpstc123456789e0ai\";\n\t\t//String valores2 =\"(+-xyzstc123456789e0ai\";\n\t\t//String valores3 =\"x1234567890\";\n\t\tString valores3 =\"x1234567890\";\n\t\tString valores4 =\"1234567890\";\n\t\tint pos = fun.length-1;\n\n\t\tif(pos == 0){\n\t\t\tif(valores2.indexOf(fun[pos]) == -1)\n\t\t\t\tcont++;\n\t\t\telse\n\t\t\t\tif(valores2.indexOf(fun[pos]) == 0)\n\t\t\t\t\tcont2++;\n\n\t\t}\n\n\t\telse if(pos >= 1){\n\t\t\tchar aux = fun[pos];\n\t\t\tchar aux2 = fun[pos-1];\n\n\t\t\t//Caracter 'a','A'\n\t\t\tif(aux == 'a'){\n\t\t\t\tif(valores1.indexOf(aux2) == -1 && aux2 != 't')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'i' || aux == 'e'){\n\t\t\t\tif(aux2 != 's' && valores1.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 's'){\n\t\t\t\tif(aux2 != 'c' && valores.indexOf(aux2) == -1 && aux2 != 'b' && aux2 != 'o')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'c'){\n\t\t\t\tif(aux2 != 's' && valores.indexOf(aux2) == -1 && aux2 != 'e')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 't'){\n\t\t\t\tif(aux2 != 'r' && valores.indexOf(aux2) == -1 && aux2 != 'o')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'o'){\n\t\t\t\tif(aux2 != 'c')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'b'){\n\t\t\t\tif(aux2 != 'a')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'n'){\n\t\t\t\tif(aux2 != 'i' && aux2 != 'a')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'x'){\n\t\t\t\tif(valores4.indexOf(aux2) != -1)\n\t\t\t\t\tcont++;\n\n\t\t\t}\n\n\n\t\t\telse if(aux == 'h'){\n\t\t\t\tif(aux2 != 'n' && aux2 != 's' && aux2 != 'c' && aux2 != 't')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'r'){\n\t\t\t\tif(aux2 != 'q')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '.'){\n\t\t\t\t\n\t\t\t\tif(valores4.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\n\t\t\t\tboolean existe = false;\n\t\t\t\tint i = pos;\n\t\t\t\twhile(operadores.indexOf(fun[i]) == -1 && i > 0){\n\t\t\t\t\tif(existe && fun[i] == '.'){\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(fun[i] == '.')\n\t\t\t\t\t\texiste = true;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(aux == 'q'){\n\t\t\t\tif(aux2 != 's')\n\t\t\t\t\tcont++;\n\t\t\t\tif(pos > 1)\n\t\t\t\t\tif(fun[pos-2] == 'o' || fun[pos-2] == 'b' || fun[pos-2] == 'c' || fun[pos-2] == 'a')\n\t\t\t\t\t\tcont++;\n\t\t\t}\n\t\t\n\t\t\telse if(valores3.indexOf(aux) != -1){\n\t\t\t\tif(valores1.indexOf(aux2) == -1 && aux2 != '(' && valores4.indexOf(aux2) == -1 && aux2 != '.')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '('){\n\t\t\t\tcont2++;\n\t\t\t\tif(aux2 != 'n' && aux2 != 's' && aux2 != 'c' && aux2 != 't' && aux2 != 'h' && valores1.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == ')'){\n\t\t\t\tcont2--;\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '+' || aux == '-'){\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')' && aux2 != '(' && aux2 != '^')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '/' || aux == '*' || aux == '^'){\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\tif((aux2 == '/' || aux2 == '*' || aux2 == '^') && pos == 1)\n\t\t\t\tcont++;\n\t\t}\n\n\t\tif(cont > 0 || cont2 != 0)\n\t\t\tthis.setBackground(Color.RED);\n\t\telse\n\t\t\tthis.setBackground(Color.GREEN);\n\t}", "@Test\n public void testHangingWildcards() throws Exception {\n // Test hanging wildcards on the end anchored to BOF (should be stripped):\n String input = \"AABB????????\";\n String expected = \"AABB\";\n String spaced = \"AA BB\";\n\n String expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n // Test hanging wildcards on the end anchored to EOF (should remain):\n input = \"AABB{4}\";\n expected = \"AABB{4}\";\n spaced = \"AA BB {4}\";\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n\n // Test hanging wildcards at the start anchored to BOF (should remain):\n input = \"????????AABB\";\n expected = \"{4}AABB\";\n spaced = \"{4} AA BB\";\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.BOFOffset, true);\n assertEquals(spaced, expression);\n\n // Test hanging wildcards at the start anchored to EOF (should be stripped):\n input = \"????????AABB\";\n expected = \"AABB\";\n spaced = \"AA BB\";\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, false);\n assertEquals(expected, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, BINARY, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n\n expression = ByteSequenceSerializer.SERIALIZER.toPRONOMExpression(input, CONTAINER, ByteSequenceAnchor.EOFOffset, true);\n assertEquals(spaced, expression);\n }", "@Test\n\tvoid runRegEx_IllegalCharacters() throws Exception {\n\t\tmaxScore += 10;\n\t\tRegEx.regEx = \"|*\";\n\t\ttry {\n\t\t\tRegExTree ret = RegEx.parse();\n\t\t\tAutomaton a = RegEx.RegExTreeToAutomaton(ret);\n\t\t\ta.toTable();\n\t\t\ta.eliminateEpsilonTransitions();\n\t\t\ta.minimize();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\tactualScore += 10;\n\t\t}\n\t}", "private int doCheckBrackets(String text) {\n int countLeftBracket = 0;\n int countRightBracket = 0;\n\n String[] members = text.split(\"\");\n for (int i = 0; i < members.length; i++){\n if (members[i].equals(\"(\")){\n countLeftBracket++;\n }else if (members[i].equals(\")\")){\n countRightBracket++;\n }\n }\n\n return countLeftBracket - countRightBracket;\n }", "@Test(timeout = 4000)\n public void test109() throws Throwable {\n StringReader stringReader0 = new StringReader(\"]\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(82, token0.kind);\n }", "private void cleanupRawTags(ArrayList p_tags)\n {\n // Find the paired tags that belong together.\n // !!! DO NOT RELY ON PAIRING STATUS. Some prop changes start\n // after <seg> but close after </seg> and even after </tu>!!!\n assignPairingStatus(p_tags);\n\n // Basic cleanup: remove surrounding <p> and inner <o:p>\n removeParagraphTags(p_tags);\n\n // Remove revision markers when they were ON accidentally\n // before translating documents or during an alignment task\n // (WinAlign).\n removePropRevisionMarkers(p_tags);\n\n // Cleanup INS/DEL revisions similarly.\n removeDelRevisions(p_tags);\n applyInsRevisions(p_tags);\n\n // WinAligned files can contain endnotes (and footnotes, but I\n // think in Word-HTML they're both endnotes).\n removeEndNotes(p_tags);\n\n // Remove empty spans that are created from superfluous\n // original formatting in Word (<span color=blue></span>)\n removeEmptyFormatting(p_tags);\n\n // Leave the rest to the Word-HTML Extractor.\n }", "private void analyzeLiterals() {\n\t\t\n\t\tint lastLength = 0;\n\t\tfor(int i = 0; i < literalsList.size(); ++i) {\n\t\t\t// Update lengths of literals array with indexes\n\t\t\tif(lastLength != literalsList.get(i).length() - 5) {\n\t\t\t\tindexes.add(i);\n\t\t\t\tlengths.add(literalsList.get(i).length() - 5); // -5 for \"\"@en\n\t\t\t}\n\t\t\tlastLength = literalsList.get(i).length() - 5;\n\t\t\t\n\t\t}\n\t\t\n\t}", "private Token scanIllegalCharacter() {\n buffer.add(c);\n Token tok = new Token(buffer.toString(), TokenType.ILLEGAL, new Pair<>(in.line(), in.pos()));\n buffer.flush();\n c = in.read();\n return tok;\n }", "private void eatRangeEnd() {\n\n Token token = tokens.get(currentTokenPointer++);\n\n if (token.kind == TokenKind.ENDINCLUSIVE) {\n\n endInclusive = true;\n\n } else if (token.kind == TokenKind.ENDEXCLUSIVE) {\n\n endInclusive = false;\n\n } else {\n\n raiseParseProblem(\"expected a version end character ']' or ')' but found '\" + string(token) + \"' at position \" + token.start, token.start);\n\n }\n\n }", "private void skipBadChar() throws IOException {\n while (!isValid()) {\n if (c == -1 || isSpace() || shouldStop()) {\n return;\n }\n c = r.read();\n }\n }", "@Override\n\tprotected void handleOpenParenthesis() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }", "@Test\n\tpublic void testBracketsWithoutOperators() throws BcException, IOException {\n\t\tString[] params = { \"((5)0)\" };\n\t\tbcApp.run(params, inStream, outStream);\n\t\tfail(\"Should have thrown exception but did not!\");\n\n\t}", "public void treat()\n\t{\n\t\tstroked();\n\t}", "private int scanBrace(String s, int startIndex, char braceTypeOpen,\n char braceTypeClose){\n int numL = 1;\n for (int i = startIndex; i < s.length(); i++){\n char c = s.charAt(i);\n numL += c == braceTypeOpen ? 1 : c == braceTypeClose ? -1 : 0;\n if (numL == 0) return i;\n }\n return -1;\n }", "@Test\r\n\tpublic void testDec0() throws LexicalException, SyntaxException {\r\n\t\tString input = \"b{int c;}\";\r\n\t\tParser parser = makeParser(input);\r\n\t\tparser.parse();\r\n\t}", "private static boolean balancedBrackets(String str) {\n String openingBrackets = \"({[\";\n String closingBrackets = \")}]\";\n HashMap<Character, Character> matchingBrackets = new HashMap<>();\n matchingBrackets.put(')', '(');\n matchingBrackets.put('}', '{');\n matchingBrackets.put(']', '[');\n Stack<Character> stack = new Stack<>();\n for (int i = 0; i < str.length(); i++) {\n char c = str.charAt(i);\n if (openingBrackets.indexOf(c) != -1) {\n stack.push(c);\n } else if (closingBrackets.indexOf(c) != -1) {\n if (stack.isEmpty()) return false;\n if (stack.pop() != matchingBrackets.get(c)) return false;\n }\n }\n return stack.isEmpty();\n }", "static int match(char[] s, int length) {\n\tint count=0;\r\n\tboolean flag=true;\r\n\tStack<Character> stack=new Stack<Character>();\r\n\tfor(int i=0;i<length;i++)\r\n\t{\r\n\t\tif(s[i]=='(' || s[i]=='[' || s[i]=='{')\r\n\t\t{\r\n\t\t stack.push(s[i]);\r\n\t\t count++;\r\n\t\t continue;\r\n\t\t}\r\n\t\t\r\n\t\telse\tif(s[i]=='}' && stack.peek()=='{')\r\n\t\t{\r\n\t\t\tstack.pop();\r\n\t\t}\r\n\t\t\r\n\t\telse\tif(s[i]==')' && stack.peek()=='(')\r\n\t\t{\r\n\t\t\tstack.pop();\r\n\t\t}\r\n\t\telse\tif(s[i]==']' && stack.peek()=='[')\r\n\t\t{\r\n\t\t\tstack.pop();\r\n\t\t}\r\n\t\t\t\t\t\t\r\n\t\telse\r\n\t\t\tflag=false;\r\n\t\t\r\n\t}\r\n\t\t \r\n\t\t if(flag && stack.empty()) return count;\r\n\t\t else return -1;\r\n\t}", "private boolean isOK(char ch) {\n if(String.valueOf(ch).matches(\"[<|\\\\[|\\\\-|\\\\||&|a-z|!]\")){\n return true;\n }\n return false;\n }", "@org.junit.Test\n public void tokenize()\n {\n List<String> tokens = Encodings.tokenize(\"\", \"(\\\\$|#|%)\\\\{(.*?)\\\\}\");\n\n assertEquals(\"empty\", 0, tokens.size());\n\n tokens = Encodings.tokenize(\"just a simple string\",\n \"(\\\\$|#|%)(?:\\\\{(.*?)\\\\}|(\\\\w+))\");\n\n assertEquals(\"string only\", \"just a simple string\", tokens.get(0));\n assertEquals(\"string only\", 1, tokens.size());\n\n tokens = Encodings.tokenize\n (\"a $first template with some %{real values} to parse\",\n \"(\\\\$|#|%)(?:\\\\{(.*?)\\\\}|(\\\\w+))\");\n\n assertEquals(\"real\", \"a \", tokens.get(0));\n assertEquals(\"real\", \"$first\", tokens.get(1));\n assertEquals(\"real\", \" template with some \", tokens.get(2));\n assertEquals(\"real\", \"%real values\", tokens.get(3));\n assertEquals(\"real\", \" to parse\", tokens.get(4));\n assertEquals(\"real\", 5, tokens.size());\n\n tokens = Encodings.tokenize(\"${test}\", \"(\\\\$|#|%)\\\\{(.*?)\\\\}\");\n\n assertEquals(\"value only\", \"$test\", tokens.get(0));\n assertEquals(\"value only\", 1, tokens.size());\n }", "private void handleNonFrameShiftCaseStartsWithNoStopCodon() {\n\t\t\tif (aaChange.getPos() == 0) {\n\t\t\t\t// The mutation affects the start codon, is start loss (in the case of keeping the start codon\n\t\t\t\t// intact, we would have jumped into a shifted duplication case earlier.\n\t\t\t\tproteinChange = ProteinMiscChange.build(true, ProteinMiscChangeType.NO_PROTEIN);\n\t\t\t\tvarTypes.add(VariantEffect.START_LOST);\n\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t} else {\n\t\t\t\t// The start codon is not affected. Since it is a non-FS insertion, the stop codon cannot be\n\t\t\t\t// affected.\n\t\t\t\tif (varAAStopPos == varAAInsertPos) {\n\t\t\t\t\t// The insertion directly starts with a stop codon, is stop gain.\n\t\t\t\t\tproteinChange = ProteinSubstitution.build(true, toString(wtAASeq.charAt(varAAInsertPos)),\n\t\t\t\t\t\tvarAAInsertPos, \"*\");\n\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t// Differentiate the case of disruptive and non-disruptive insertions.\n\t\t\t\t\tif (insertPos.getPos() % 3 == 0)\n\t\t\t\t\t\tvarTypes.add(VariantEffect.INFRAME_INSERTION);\n\t\t\t\t\telse\n\t\t\t\t\t\tvarTypes.add(VariantEffect.DISRUPTIVE_INFRAME_INSERTION);\n\t\t\t\t} else {\n\t\t\t\t\tif (varAAStopPos != -1 && wtAAStopPos != -1\n\t\t\t\t\t\t&& varAASeq.length() - varAAStopPos != wtAASeq.length() - wtAAStopPos) {\n\t\t\t\t\t\t// The insertion does not directly start with a stop codon but the insertion leads to a stop\n\t\t\t\t\t\t// codon in the affected amino acids. This leads to an \"delins\" protein annotation.\n\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos,\n\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos + 1)), varAAInsertPos + 1,\n\t\t\t\t\t\t\tnew ProteinSeqDescription(),\n\t\t\t\t\t\t\tnew ProteinSeqDescription(varAASeq.substring(varAAInsertPos, varAAStopPos)));\n\t\t\t\t\t\tvarTypes.add(VariantEffect.STOP_GAINED);\n\n\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// The changes on the amino acid level do not lead to a new stop codon, is non-FS insertion.\n\n\t\t\t\t\t\t// Differentiate the ins and the delins case.\n\t\t\t\t\t\tif (aaChange.getRef().equals(\"\")) {\n\t\t\t\t\t\t\t// Clean insertion.\n\t\t\t\t\t\t\tif (DuplicationChecker.isDuplication(wtAASeq, aaChange.getAlt(), varAAInsertPos)) {\n\t\t\t\t\t\t\t\t// We have a duplication, can only be duplication of AAs to the left because of\n\t\t\t\t\t\t\t\t// normalization in CDSExonicAnnotationBuilder constructor.\n\t\t\t\t\t\t\t\tif (aaChange.getAlt().length() == 1) {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tproteinChange = ProteinDuplication.buildWithSeqDescription(true,\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - aaChange.getAlt().length())),\n\t\t\t\t\t\t\t\t\t\tvarAAInsertPos - aaChange.getAlt().length(),\n\t\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\t\tnew ProteinSeqDescription());\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t\tvarTypes.add(VariantEffect.DIRECT_TANDEM_DUPLICATION);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// We have a simple insertion.\n\t\t\t\t\t\t\t\tproteinChange = ProteinInsertion.buildWithSequence(true,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos - 1)), varAAInsertPos - 1,\n\t\t\t\t\t\t\t\t\ttoString(wtAASeq.charAt(varAAInsertPos)), varAAInsertPos, aaChange.getAlt());\n\n\t\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// The delins/substitution case.\n\t\t\t\t\t\t\tproteinChange = ProteinIndel.buildWithSeqDescription(true, aaChange.getRef(),\n\t\t\t\t\t\t\t\tvarAAInsertPos, aaChange.getRef(), varAAInsertPos, new ProteinSeqDescription(),\n\t\t\t\t\t\t\t\tnew ProteinSeqDescription(aaChange.getAlt()));\n\t\t\t\t\t\t\taddNonFrameshiftInsertionEffect();\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}", "private void handleCharacterData() {\n\t\tif (!buffer.isEmpty()) {\n\t\t\tbyte[] data = buffer.toArray();\n\t\t\tbuffer.clear();\n\t\t\thandler.handleString(new String(data));\n\t\t}\n\t}", "static boolean areParanthesisBalanced(String str) \r\n\t\t{ \r\n\t\t\t// Using ArrayDeque is faster than using Stack class \r\n\t\t\tDeque<Character> stack = new ArrayDeque<Character>(); \r\n\t\t\tfor (int i = 0; i < str.length(); i++) {\r\n\t\t\tchar ch = str.charAt(i);\r\n\t\t\tif (ch == '[' || ch == '(' || ch == '{') {\r\n\t\t\t\tstack.push(ch);\r\n\t\t\t} else if ((ch == ']' || ch == '}' || ch == ')')\r\n\t\t\t\t\t&& (!stack.isEmpty())) {\r\n\t\t\t\tif (((char) stack.peek() == '(' && ch == ')')\r\n\t\t\t\t\t\t|| ((char) stack.peek() == '{' && ch == '}')\r\n\t\t\t\t\t\t|| ((char) stack.peek() == '[' && ch == ']')) {\r\n\t\t\t\t\tstack.pop();\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif ((ch == ']' || ch == '}' || ch == ')')) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\r\n\t\t\t}\r\n\t\t\treturn (stack.isEmpty());\r\n\t\t\t}", "public T caseBracketExpCS(BracketExpCS object) {\r\n return null;\r\n }", "private static int missedCommaBehind(AnalyzedTokenReadings[] tokens, int inFront, int start, int end) {\n for (int i = start; i < end; i++) {\n if(isPronoun(tokens, i)) {\n List<Integer> verbs = verbPos(tokens, i, end);\n if(verbs.size() > 0) {\n String gender = getGender(tokens[i]);\n if(gender != null && !isAnyVerb(tokens, i + 1)\n && matchesGender(gender, tokens, inFront, i - 1) && !isArticle(gender, tokens, i, verbs.get(verbs.size() - 1))) {\n return getCommaBehind(tokens, verbs, i, end);\n }\n }\n }\n }\n return -1;\n }", "@Override\r\n\tpublic void visit(RoundBracketExpression roundBracketExpression) {\n\r\n\t}" ]
[ "0.574011", "0.5709843", "0.5698557", "0.5606336", "0.5539691", "0.5486372", "0.5484955", "0.5468862", "0.54557705", "0.5395277", "0.53639144", "0.53619874", "0.5289481", "0.5266604", "0.5260407", "0.5255171", "0.5214126", "0.5149526", "0.5113797", "0.51059335", "0.51025516", "0.50943893", "0.50803876", "0.50778127", "0.505129", "0.50333786", "0.5031954", "0.5029001", "0.5023054", "0.5018527", "0.5003118", "0.5000522", "0.49784198", "0.49729776", "0.49626327", "0.4925299", "0.49159545", "0.49149475", "0.49057436", "0.49025726", "0.48878598", "0.48787117", "0.48555624", "0.48484793", "0.48370486", "0.48297995", "0.4828826", "0.48256126", "0.48233512", "0.4819775", "0.48115948", "0.48065856", "0.47957954", "0.47949457", "0.47938508", "0.47904408", "0.47882834", "0.4780027", "0.4770539", "0.4770213", "0.4761337", "0.4760798", "0.47591123", "0.47571096", "0.47489992", "0.47486657", "0.47344032", "0.4727726", "0.47241887", "0.47225425", "0.4718514", "0.47099245", "0.46985766", "0.46947908", "0.46897173", "0.46708545", "0.4670125", "0.46677846", "0.46613145", "0.46610892", "0.46593708", "0.46547002", "0.46525574", "0.46494114", "0.46476573", "0.4647524", "0.46468994", "0.46457118", "0.46447703", "0.46425068", "0.46321866", "0.46246263", "0.4623879", "0.4613576", "0.4610477", "0.46087494", "0.4608699", "0.46077308", "0.46029148", "0.4595702" ]
0.5949816
0
TODO Autogenerated method stub
@Override public int selectDocumenCount(Documen documen) { return indexMapper.selectDocumenCount(documen); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Returns the line number (0based where the first line is line 0)
public abstract int getLine();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getLineNum() {\n\t\treturn (parser == null) ? 0 : parser.getCurrentLocation().getLineNr();\n\t}", "private int getLineNumber() {\n int line = 0;\n if (_locator != null)\n line = _locator.getLineNumber();\n return line;\n }", "public final int getLineNumber()\n {\n return _lineNumber + 1;\n }", "public int getLineNum() {\n\t\treturn lineNum;\n\t}", "public int getLineNumber();", "public int getLineNumber()\n {\n // LineNumberReader counts lines from 0. So add 1\n\n return lineNumberReader.getLineNumber() + 1;\n }", "int getLineNumber();", "public int lineNum() {\n return myLineNum;\n }", "public int getLine() {\n return lineNum;\n }", "public int getLine() { \n\t// * JFlex starts in zero\n\treturn yyline+1;\n}", "public int getLineNo()\n\t{\n\t\treturn getIntColumn(OFF_LINE_NO, LEN_LINE_NO);\n\t}", "public String getLineNumber() \n\t{\n\t\treturn getNumber().substring(9,13);\n\t}", "int getStartLineNumber();", "public int getLineNumber()\r\n {\r\n return lineNum;\r\n }", "public int getLineNumber()\n {\n return parser.getLineNumber();\n }", "public int getLineNumber() {\n\t\treturn _parser.getLineNumber();\n\t}", "public int getLine() {\n\t\treturn line;\n\t}", "public int getLine() {\r\n\t\treturn line;\r\n\t}", "public int getLineNumber() {\n return line;\n }", "public static int getLineNumber() {\n return Thread.currentThread().getStackTrace()[2].getLineNumber();\n }", "public static int getLine() {\r\n\t\treturn rline;\r\n\t}", "public int getLineNumber() {\n\t\treturn _tokenizer.getLineNumber();\n\t}", "public int getLineNumber() {\n return line;\n }", "public int lineNum() {\n return myId.lineNum();\n }", "public int getLineNo();", "public int getLineNumber(){\n\t\treturn lineNumber;\n\t}", "public int getLineNr() {\n return this.lineNr;\n }", "public Number getLineNumber() {\n return (Number)getAttributeInternal(LINENUMBER);\n }", "public int getCurrentLine() {\n return buffer.lineNumber();\n }", "public int getLineNumber() {\n\t\treturn lineNumber;\n\t}", "public int getLineNumber() {\n\t\treturn lineNumber;\n\t}", "public Integer getLineNumber() {\r\n return this.lineNumber;\r\n }", "public int getLine() {\n return line;\n }", "public int getLineNumber() {\n\t\t\treturn startLineNumber;\n\t\t}", "public int getLine() {\r\n return line;\r\n }", "public int getRecordLineNumber();", "public int getLineNumber() {\n return lineNumber;\n }", "public int getLine() {\n return line;\n }", "public int getLineNumber() {\n return lineNumber; \n }", "public int getLineNumber() {\n return lineNumber;\n }", "public int line() {\r\n return line;\r\n }", "public int getLineNumber() {\n return lineNumber;\n }", "public int getLinePosition() {\n return linePosition;\n }", "public Integer getLineNumber() {\n return lineNumber;\n }", "public int getCurrentLineNumber () {\n if (SwingUtilities.isEventDispatchThread()) {\n return getCurrentLineNumber_();\n } else {\n final int[] ln = new int[1];\n try {\n SwingUtilities.invokeAndWait(new Runnable() {\n public void run() {\n ln[0] = getCurrentLineNumber_();\n }\n });\n } catch (InvocationTargetException ex) {\n ErrorManager.getDefault().notify(ex.getTargetException());\n } catch (InterruptedException ex) {\n // interrupted, ignored.\n }\n return ln[0];\n }\n }", "public int getLineID()\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(LINEID$2, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "@Override\n public int getLine() {\n return mySourcePosition.getLineNumber() - 1;\n }", "int getAfterLineNumber();", "public int getStartLineNumber() {\n return startLineNumber_;\n }", "public int getSourceLine(int pos) {\n unpack();\n int l = 0, r = line_number_table_length - 1;\n if (// array is empty\n r < 0)\n return -1;\n int min_index = -1, min = -1;\n /* Do a binary search since the array is ordered.\n */\n do {\n int i = (l + r) / 2;\n int j = line_number_table[i].getStartPC();\n if (j == pos)\n return line_number_table[i].getLineNumber();\n else if (// else constrain search area\n pos < j)\n r = i - 1;\n else\n // pos > j\n l = i + 1;\n /* If exact match can't be found (which is the most common case)\n * return the line number that corresponds to the greatest index less\n * than pos.\n */\n if (j < pos && j > min) {\n min = j;\n min_index = i;\n }\n } while (l <= r);\n /* It's possible that we did not find any valid entry for the bytecode\n * offset we were looking for.\n */\n if (min_index < 0)\n return -1;\n return line_number_table[min_index].getLineNumber();\n }", "public static int findLineNumber(AbstractInsnNode node) {\n AbstractInsnNode curr = node;\n\n // First search backwards\n while (curr != null) {\n if (curr.getType() == AbstractInsnNode.LINE) {\n return ((LineNumberNode) curr).line;\n }\n curr = curr.getPrevious();\n }\n\n // Then search forwards\n curr = node;\n while (curr != null) {\n if (curr.getType() == AbstractInsnNode.LINE) {\n return ((LineNumberNode) curr).line;\n }\n curr = curr.getNext();\n }\n\n return -1;\n }", "public int getLineNumber(String key) {\n\t\t\treturn lineNumbers.get(key);\n\t\t}", "private int getLineNumber(@NonNull String contents, int offset) {\n String preContents = contents.substring(0, offset);\n String remContents = preContents.replaceAll(\"\\n\", \"\");\n return preContents.length() - remContents.length();\n }", "private int getLastLine() {\n return lastSourcePosition.line;\n }", "public int getStartLineNumber() {\n return startLineNumber_;\n }", "public int getFirstVisibleLine(){\n int j = Math.min(getOffsetY() / getLineHeight(), getLineCount() - 1);\n if(j < 0){\n return 0;\n }else{\n return j;\n }\n }", "public int getLinePos() {\n return linePos;\n }", "public int getLineCount() {\n\t\treturn lineCount;\n\t}", "public int getLine() {return _line;}", "public final int getLine() {\n/* 377 */ return this.bufline[this.bufpos];\n/* */ }", "protected static int computeLineNo(Node node) {\n\t\tfinal int offset = node.getStartOffset();\n\t\tfinal BasedSequence seq = node.getDocument().getChars();\n\t\tint tmpOffset = seq.endOfLine(0);\n\t\tint lineno = 1;\n\t\twhile (tmpOffset < offset) {\n\t\t\t++lineno;\n\t\t\ttmpOffset = seq.endOfLineAnyEOL(tmpOffset + seq.eolStartLength(tmpOffset));\n\t\t}\n\t\treturn lineno;\n\t}", "public int getBeginLineNumber() {\n return this.beginLine;\n }", "public int getLineNumber (\n Object annotation,\n Object timeStamp\n ) {\n if (annotation instanceof LineBreakpoint) {\n // A sort of hack to be able to retrieve the original line.\n LineBreakpoint lb = (LineBreakpoint) annotation;\n return LineTranslations.getTranslations().getOriginalLineNumber(lb, timeStamp);\n }\n /*if (annotation instanceof Object[]) {\n // A sort of hack to be able to retrieve the original line.\n Object[] urlLine = (Object[]) annotation;\n String url = (String) urlLine[0];\n int line = ((Integer) urlLine[1]).intValue();\n return LineTranslations.getTranslations().getOriginalLineNumber(url, line, timeStamp);\n }*/\n DebuggerAnnotation a = (DebuggerAnnotation) annotation;\n if (timeStamp == null) \n return a.getLine ().getLineNumber () + 1;\n String url = (String) annotationToURL.get (a);\n Line.Set lineSet = LineTranslations.getTranslations().getLineSet (url, timeStamp);\n return lineSet.getOriginalLineNumber (a.getLine ()) + 1;\n }", "public int getStartLine() {\r\n \r\n return startLine;\r\n }", "int getLineOffset(int line) throws BadLocationException;", "public static String getTestCaseMethodLineNumber() {\n\t\tString caseLineString = getTestCaseClassName();\n\t\tList<String> matches = JavaHelpers.getRegexMatches(\".+\\\\:(\\\\d+)\\\\)\", caseLineString);\n\t\treturn matches.isEmpty() ? \"\" : matches.get(0);\n\n\t}", "protected final int getLineNumber(HttpServletRequest request) {\n int lineNumber = 0;\n String lineStr = request.getParameter(LINE_NUMBER);\n if (lineStr == null) {\n lineNumber = getSelectedLine(request);\n } else {\n try {\n lineNumber = Integer.parseInt(lineStr);\n } catch (Exception ex) {\n // do nothing; 0 will be returned\n }\n }\n return lineNumber;\n }", "public int getPositionWithinLine() {\n\t\treturn positionWithinLine;\n\t}", "public int getLineToStart() {\r\n\t\treturn this.lineToStart;\r\n\t}", "public final int getLine()\n\t{\n\t\treturn address >>> 8 & 0x0F;\n\t}", "public int cursorLineNum() {\n return cursor;\n }", "private int findLineOffset(int line) {\n if (line == 1) {\n return 0;\n }\n if (line > 1 && line <= lineOffsets.size()) {\n return lineOffsets.get(line - 2);\n }\n return -1;\n }", "public static int getLineNumber( String text, int posChar ) {\r\n \r\n int len = Math.min( posChar, text.length() );\r\n int result = 1;\r\n \r\n for ( int i=0; i<len; i++ ) {\r\n \r\n if ( text.charAt( i ) == '\\n' )\r\n result++;\r\n }\r\n \r\n return result;\r\n }", "public int getStartLine() {\r\n return this.startLine;\r\n }", "public int number_of_lines() {\r\n\t\treturn line_index.size() - 1;\r\n\t}", "@Pure\n public int getStartLine() {\n return this.startLine;\n }", "public int getLinePosition(int line) {\n\t\treturn linePositions.get(line);\n\t}", "public Integer getLineNumberInSourceFile(Node componentNode) {\n if (componentNode instanceof XMLElement) {\n XMLElement xmlComponentNode = (XMLElement)componentNode;\n Integer lineNum = xmlComponentNode.getLineNumber();\n return lineNum;\n }\n\n return 0;\n }", "public int line_of(int index) throws Exception {\r\n\t\tif (index < 0 || index >= text.length()) {\r\n\t\t\tthrow new IndexOutOfBoundsException(\"Invalid index: \" + index);\r\n\t\t} else {\r\n\t\t\t// binary-search\r\n\t\t\tint s = 0, e = line_index.size();\r\n\t\t\twhile (s < e) {\r\n\t\t\t\tint m = (s + e) / 2;\r\n\t\t\t\tint head = line_index.get(m);\r\n\t\t\t\tint tail;\r\n\t\t\t\ttail = line_index.get(m + 1);\r\n\r\n\t\t\t\tif (index >= tail)\r\n\t\t\t\t\ts = m + 1;\r\n\t\t\t\telse if (index < head)\r\n\t\t\t\t\te = m;\r\n\t\t\t\telse\r\n\t\t\t\t\treturn m + 1;\r\n\t\t\t}\r\n\r\n\t\t\t// No target is found, this is impossible.\r\n\t\t\tthrow new RuntimeException(\"Internal error: no line is found for \" + index);\r\n\t\t}\r\n\t}", "private float measureLineNumber(){\n mPaint.setTypeface(mTypefaceLineNumber);\n int count = 0;\n int lineCount = getLineCount();\n while(lineCount > 0){\n count++;\n lineCount /= 10;\n }\n float single = mPaint.measureText(\"0\");\n return single * count * 1.01f;\n }", "public String getSourceLine (int line);", "public int getLine()\n/* */ {\n/* 1312 */ return this.line;\n/* */ }", "private int getLineIndexAtLocation(Point point) {\n final int maxLineIndex = splitLines.size() - 1;\n int lineIndex = (point.y - getInsets().top) / getLineHeight();\n if (lineIndex > maxLineIndex) {\n point.x = Integer.MAX_VALUE;\n }\n lineIndex = Math.max(0, Math.min(maxLineIndex, lineIndex));\n return lineIndex;\n }", "public int getDecoratedLine (Node node);", "public static int getLineNumber(String s, int charPos) { \n if (s == null || charPos <0 || charPos >= s.length()) return -1;\n int line = 0;\n for (int i=1; i<=charPos; i++) {\n if (s.charAt(i-1) == '\\n') line++; \n }\n return line; \n }", "private int lineNumber() throws IOException {\n int count = 0;\n File answers = new File(this.settings.getValue(\"botAnswerFile\"));\n try (RandomAccessFile raf = new RandomAccessFile(answers, \"r\")) {\n while (raf.getFilePointer() != raf.length()) {\n raf.readLine();\n count++;\n }\n }\n return count;\n }", "private int getNextLine() {\n return peekToken().location.start.line;\n }", "private static int findLineOffset(StyledDocument doc, int lineNumber) {\n int offset;\n try {\n offset = NbDocument.findLineOffset (doc, lineNumber - 1);\n int offset2 = NbDocument.findLineOffset (doc, lineNumber);\n try {\n String lineStr = doc.getText(offset, offset2 - offset);\n for (int i = 0; i < lineStr.length(); i++) {\n if (!Character.isWhitespace(lineStr.charAt(i))) {\n offset += i;\n break;\n }\n }\n } catch (BadLocationException ex) {\n // ignore\n }\n } catch (IndexOutOfBoundsException ioobex) {\n return -1;\n }\n return offset;\n }", "int findStringLineno(String[] lines, String str, int startLine) {\n int i = startLine;\n while (i < lines.length) {\n if (lines[i].contains(str))\n return i;\n ++i;\n }\n return i;\n }", "public int getLineIndex(int offset) throws BadLocationException {\n if(offset < 0 || offset > text.length()) {\n throw new BadLocationException(\"The given offset \" + offset + \" is out of bounds <0, \" + text.length() + \">\" , offset); //NOI18N\n }\n \n// //linear\n// for(int i = 0; i < lines.length; i++) {\n// int loffset = lines[i];\n// if(loffset > offset) {\n// return i - 1;\n// }\n// }\n// return lines.length - 1; //last line\n// \n //logarithmical\n int index = Arrays.binarySearch(lines, offset);\n if(index >= 0) {\n //hit\n return index;\n } else {\n //missed (between)\n return -(index + 2);\n }\n \n }", "public static int findLineNumber(MethodNode node) {\n if (node.instructions != null && node.instructions.size() > 0) {\n return findLineNumber(node.instructions.get(0));\n }\n\n return -1;\n }", "public int getRowNo() {\n return rowIndex+1;\n }", "public int getLastVisibleLine(){\n int l = Math.min((getOffsetY() + getHeight()) / getLineHeight(), getLineCount() - 1);\n if(l < 0){\n return 0;\n }else{\n return l;\n }\n }", "public int getStepLineNumber()\n\t{\n\t\treturn this.stepLineNumber;\n\t}", "public int getStepLineNumber()\n\t{\n\t\treturn this.stepLineNumber;\n\t}", "public int getNumLines ();", "public static Integer getLine(String line){\n\t\ttry{\n\t\t\tScanner scanner = new Scanner(new File(ramProgram));\n\t\t\tInteger numberLine = 1;\n\t\t\twhile (scanner.hasNext()){\n\t\t\t\tif (scanner.nextLine().trim().equals(line)){\n\t\t\t\t\tscanner.close();\n\t\t\t\t\treturn numberLine;\n\t\t\t\t}\n\t\t\t\tnumberLine++;\n\t\t\t}\n\t\t\tscanner.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t\n\t\t}\n\t\t\n\t\treturn -1;\n\t}", "public Integer getRowNumber() {\n\t\tif (isRowNumber) {\n\t\t\treturn (int) lineId;\n\t\t}\n\t\treturn null;\n\t}", "int getLineOfOffset(int offset) throws BadLocationException;", "private static int getErrorLine(String errmsg){\n\t\treturn Integer.parseInt(errmsg.substring(0,errmsg.indexOf(\":\")).substring(errmsg.substring(0,errmsg.indexOf(\":\")).lastIndexOf(\" \")+1));\n\t}", "public int getLine() { return cl; }" ]
[ "0.85880125", "0.8353768", "0.82849497", "0.82841915", "0.82697576", "0.82484025", "0.82037467", "0.8134923", "0.80883825", "0.8085647", "0.80373645", "0.8034458", "0.8030049", "0.801244", "0.7943567", "0.7923022", "0.7912253", "0.7906902", "0.78696316", "0.7862139", "0.7849641", "0.784031", "0.78162247", "0.77940303", "0.77141255", "0.7655026", "0.76394683", "0.76145786", "0.7613276", "0.76107824", "0.76107824", "0.75769913", "0.75701725", "0.7567364", "0.75615156", "0.7559392", "0.7557687", "0.754053", "0.75347835", "0.7532919", "0.7495691", "0.74722236", "0.74558544", "0.7437753", "0.74051034", "0.73912805", "0.73812103", "0.7357312", "0.7317908", "0.72913855", "0.7288945", "0.72464985", "0.72102535", "0.71968275", "0.7194135", "0.7191264", "0.71608573", "0.71537566", "0.7147132", "0.7132548", "0.7128038", "0.71080285", "0.7103329", "0.70690566", "0.70637226", "0.7058763", "0.70417917", "0.7039688", "0.70341456", "0.7024768", "0.7011403", "0.70055616", "0.697839", "0.69545126", "0.6899895", "0.6880852", "0.6874439", "0.68624234", "0.68601495", "0.6846109", "0.6821693", "0.68175775", "0.6798114", "0.67551327", "0.6748125", "0.6747365", "0.67455477", "0.674541", "0.6729313", "0.66792643", "0.6669739", "0.6647071", "0.66456926", "0.6644476", "0.6644476", "0.6618433", "0.66137916", "0.65932196", "0.6591223", "0.6572771", "0.65618974" ]
0.0
-1
Returns the column number (where the first character on the line is 0), or 1 if unknown
public abstract int getColumn();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getColumnPosition(String path);", "private static int getColumn(String s) {\n int i = -1;\n try {\n i = Integer.parseInt(s);\n } catch (Exception e) {\n return -1;\n }\n if (i>GameBoardMainArea.NUMCOLS) {\n return -1;\n }\n if (i<1) {\n return -1;\n }\n return i;\n }", "public int getColumn() { \n\t// * JFlex starts in zero\n\treturn yycolumn+1;\n}", "int getColumnIndex();", "int getColumnIndex();", "int getColumnIndex();", "private int getColumnNumber(@NonNull String contents, int offset) {\n String preContents = contents.substring(0, offset);\n String[] preLines = preContents.split(\"\\n\");\n int lastIndex = preLines.length -1;\n return preContents.endsWith(\"\\n\") ? 0 : preLines[lastIndex].length();\n }", "public final int getColumn() {\n/* 368 */ return this.bufcolumn[this.bufpos];\n/* */ }", "private int getCharacterColumnNumber(char character) { \t\n if(Character.isUpperCase(character))\n return 1;\n else if(Character.isLowerCase(character))\n return 2;\n else if(Character.isDigit(character))\n return 3;\n else if(Character.isWhitespace(character))\n return 0;\n else if (this.columnHashTable.get(character) != null)\n return this.columnHashTable.get(character);\n else\n return 24;\t\n }", "public static void countRowCol(){\n\t String line=\"\";\n\t row=0;\n\t col=0;\n try{\n Scanner reader = new Scanner(file);\n while(reader.hasNextLine()){\n row++;\n line=reader.nextLine();\n }\n reader.close();\n }catch (FileNotFoundException e) {\n \t e.printStackTrace();\n }\n String[] seperatedRow = line.split(\"\\t\");\n col=seperatedRow.length;\n\t}", "private int checkColumn() {\n for (int i = 0; i < 3; i++) {\n if ((this.board[i][0] == this.board[i][1]) && (this.board[i][0] == this.board[i][2])) {\n return this.board[i][0];\n }\n }\n return 0;\n }", "static int col(String sq) {\n return ((int) (sq.charAt(0) - 'a')) + 1;\n }", "public int getColumnNumber()\n {\n return parser.getColumnNumber();\n }", "int getColumn();", "public int getPointColumn(int line, float x){\n if(x < 0){\n return 0;\n }\n if(line >= getLineCount()) {\n line = getLineCount() - 1;\n }\n float w = 0;\n int i = 0;\n prepareLine(line);\n while(w < x && i < mText.getColumnCount(line)){\n w += measureText(mChars, i, 1);\n i++;\n }\n if(w < x){\n i = mText.getColumnCount(line);\n }\n return i;\n }", "private static int findIndex(String line) {\n\n int index = -1;\n\n if (line == null) {\n return index;\n }\n\n line = line.trim();\n int spaceIndex = line.indexOf(\" \");\n int tabIndex = line.indexOf(\"\\t\");\n\n if (spaceIndex != -1) {\n if (tabIndex != -1) {\n if (spaceIndex < tabIndex) {\n index = spaceIndex;\n } else {\n index = tabIndex;\n }\n } else {\n index = spaceIndex;\n }\n } else {\n index = tabIndex;\n }\n return index;\n }", "private int getColumn(char columnName) {\r\n\t\tint result = -1;\r\n\t\tif (columnName > 64 && columnName < 91) {\r\n\t\t\tresult = columnName - 65;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "protected Integer getColumnIndex(String header){\n for (Map.Entry<String, Integer> entry: headerMap.entrySet()){\n if (header.toLowerCase().equals(entry.getKey().toLowerCase())) return entry.getValue();\n }\n return -1;\n }", "public static int locationCol() {\n System.out.println(\"Enter a Column Letter: \");\n in.nextLine();\n String guessColumn = in.nextLine();\n char c = guessColumn.charAt(0);\n int colLocation = (c - 'A') + 1;\n return colLocation;\n }", "int atColumn();", "public int getColumn();", "int indexOf(String column);", "int indexOf(String column);", "public int getLineNo()\n\t{\n\t\treturn getIntColumn(OFF_LINE_NO, LEN_LINE_NO);\n\t}", "private int indiceColMin(String tabla[][]){\n int indice=1;\n float aux=-10000;\n for (int j = 1; j <= nVariables; j++) {\n if(Float.parseFloat(tabla[0][j])<0 && Float.parseFloat(tabla[0][j])>aux ){\n aux=Float.parseFloat(tabla[0][j]);\n indice=j;\n }\n }\n return indice;\n }", "public int getColumnNumber() {\n return column;\n }", "public static int getColNumFromTxt(String headerName, ArrayList<ArrayList<String>> datas) {\n\r\n int i = 0;\r\n for (i = 0; i < datas.get(0).size(); i++) {\r\n //System.out.println(datas.get(0).get(i));\r\n if (datas.get(0).get(i).toLowerCase().equals(headerName.toLowerCase())) {\r\n return i;\r\n }\r\n }\r\n return 9999;\r\n }", "int colCount();", "private int getColumn() {\n return binaryPartition(column);\n }", "int getCol();", "public int getLine() { \n\t// * JFlex starts in zero\n\treturn yyline+1;\n}", "public static int lookForCell(char[] characters) {\r\n\t\tint n = 0;//before counting, the number of the space is 0\r\n\t\tfor(int i=0; i<characters.length; i++) {\r\n\t\t\tif(characters[i]==' ') {\r\n\t\t\t\tn = i;//let n equals to the number of position of empty space\r\n\t\t\t\treturn n;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(n);\r\n\t\treturn n;\r\n\t}", "public static int columnCheck(String guessColumn) {\n char c=' ';\n do{\n c = guessColumn.charAt(0);\n switch (c) {\n case 'A':\n \n break;\n case 'B':\n \n break;\n case 'C':\n \n break;\n case 'D':\n \n break;\n case 'E':\n \n break;\n default:\n System.out.println(\"Invalid Option\");\n \n }\n }while (c != 'A' && c != 'B' && c != 'C' && c != 'D' && c != 'E');\n \n int colLocation = (c - 'A') + 1;\n return colLocation;\n }", "public int getColumnAmount(BufferedReader br) {\n\n String rowStr;\n\n try {\n //Get into string\n rowStr = br.readLine();\n\n //Split into 1D array\n columns = rowStr.split(\"\\t\");\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n //Return number of elements -1 for id column\n return columns.length - 1;\n }", "public int getBeginColumnNumber() {\n return this.beginColumn;\n }", "private void processFirstLine(String line) {\r\n\t\tString[] numsAsStr = line.split(\" \");\r\n\t\tnumRows = Integer.parseInt(numsAsStr[0]);\r\n\t\tnumCols = Integer.parseInt(numsAsStr[1]);\r\n\t\t/**\r\n\t\t * Taken out for time testing\r\n\t\t */\r\n//\t\tSystem.out.println(\"Rows: \" + numRows + \" Cols: \" + numCols);\r\n\t}", "public abstract int getNumColumns();", "int getColumnIndex(String name);", "public int getFirstVisibleLine(){\n int j = Math.min(getOffsetY() / getLineHeight(), getLineCount() - 1);\n if(j < 0){\n return 0;\n }else{\n return j;\n }\n }", "public static int colCount() {\n\treturn sheet.getRow(0).getLastCellNum();\n\t}", "public int getColumn() { return cc; }", "public int leftMostColumnWithOne(BinaryMatrix binaryMatrix) {\n\n int rows = binaryMatrix.dimensions().get(0);\n int cols = binaryMatrix.dimensions().get(1);\n\n // Set pointers to the top-right corner.\n int currentRow = 0;\n int currentCol = cols - 1;\n\n // Repeat the search until it goes off the grid.\n while (currentRow < rows && currentCol >= 0) {\n if (binaryMatrix.get(currentRow, currentCol) == 0) {\n currentRow++;\n } else {\n currentCol--;\n }\n }\n\n // If we never left the last column, this is because it was all 0's.\n return (currentCol == cols - 1) ? -1 : currentCol + 1;\n }", "private int getLifeFormCol(LifeForm lf)\r\n\t{\r\n\t\tfor(int i = 0; i < rows; i++)\r\n\t\t\tfor(int j = 0; j < columns; j++)\r\n\t\t\t\tif(cells[i][j].getLifeForm() == lf)\r\n\t\t\t\t\treturn j;\r\n\t\treturn -1;\r\n\t}", "int getColumnIndex (String columnName);", "private int indiceColMax(String tabla[][]){\n int indice=1;\n float aux=Float.parseFloat(tabla[0][1]);\n for (int j = 1; j <= nVariables; j++) {\n if(Float.parseFloat(tabla[0][j])<0 && Float.parseFloat(tabla[0][j])<aux){\n aux=Float.parseFloat(tabla[0][j]);\n indice=j;\n }\n }\n return indice;\n }", "public static int getColNumber(String seatNumber){\n\n //String is the character representing a alphabet from A-D\n char colChar =seatNumber.charAt(1);\n \n //Using switch-case to check which number return\n //Index of column must return, so subtract each of the\n // column numbers by 1.\n switch (colChar) {\n case 'A':\n return 0;\n case 'B':\n return 1;\n case 'C':\n return 2;\n case 'D':\n return 3;\n default:\n return -1;\n }\n }", "public int getNoOfCols(ArrayList<String[]> records){\n\t\tString[] firstLine=records.get(0);\n\t\treturn Integer.parseInt(firstLine[1]);\n\t}", "private int getNIdx() {\n return this.colStartOffset + 7;\n }", "public int getColumn(){ return (Integer)args[1]; }", "public int columns( )\n {\n int col = 0;\n\n if( table != null )\n {\n col = table[0].length;\n } //end\n return (col);\n }", "public int getColumnIndex() {\n/* 2979 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public abstract int getNumberOfColumnsInCurrentRow();", "public Integer getColumnNumberInSourceFile(Node componentNode) {\n if (componentNode instanceof XMLElement) {\n XMLElement xmlComponentNode = (XMLElement)componentNode;\n Integer columnNumber = xmlComponentNode.getColumnNumber();\n return columnNumber;\n }\n\n return 0;\n }", "public int getColumnNumber() {\n return rows;\n }", "public int getColumn()\t \t\t{ return column; \t}", "public int getLineNum() {\n\t\treturn (parser == null) ? 0 : parser.getCurrentLocation().getLineNr();\n\t}", "private int findLine(int row, String[][] serverCells) {\n\t\tfor (int i = 1; i < serverCells.length; i++) {\n\t\t\tif (Integer.parseInt(serverCells[i][0]) == row) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public int getCurrentColumn() {\n return buffer.columnNumber();\n }", "private static int ColumnNumber(int x, short puzzleValue) {\r\n\t\tint retVal = 81+x*9+puzzleValue;\r\n\t\treturn retVal;\r\n\t}", "private int getCodigoVistoBueno(int columna){\n int intCodVisBue=0;\n int w=0;\n int intCol=columna;\n int intVecCol=0;\n try{\n do{\n intVecCol=Integer.parseInt(strVecDat[w][2]);\n if(intCol==intVecCol){\n intCodVisBue=Integer.parseInt(strVecDat[w][0]);\n break;\n }\n else{\n w++;\n }\n }while(strVecDat[w][2]!=null);\n }\n catch(Exception e){\n objUti.mostrarMsgErr_F1(this, e);\n \n }\n return intCodVisBue;\n }", "public static int getLineNumber( String text, int posChar ) {\r\n \r\n int len = Math.min( posChar, text.length() );\r\n int result = 1;\r\n \r\n for ( int i=0; i<len; i++ ) {\r\n \r\n if ( text.charAt( i ) == '\\n' )\r\n result++;\r\n }\r\n \r\n return result;\r\n }", "public int leftmostColumn(int[][] matrix) {\n if (matrix == null || matrix.length == 0) {\n return -1;\n }\n\n int rows = matrix.length;\n int cols = matrix[0].length;\n int column = -1;\n\n // start from top right\n for (int r = 0, c = cols - 1; r < rows && c >= 0; ) {\n if (matrix[r][c] == 1) {\n column = c;\n c--;\n } else {\n r++;\n }\n }\n\n return column;\n }", "public int getColumnIndex() {\n return 57;\n }", "String getColumn();", "public int getColumn()\n\t{\n\t\treturn col;\n\t}", "public int getLine() {\r\n\t\treturn line;\r\n\t}", "public int getProbeColumn(int column, int row);", "public static int countCol(char[][] a, int col, char c){\r\n int count = 0;\r\n int rowNumber = a.length;\r\n for (int i = 0; i< rowNumber; i++){\r\n if (a[i][col] == c){\r\n count = count + 1;\r\n }\r\n }\r\n return count;\r\n }", "private boolean lineIsNumberAboveZero(final String line) {\n try {\n return Integer.parseInt(line) > 1;\n } catch(final NumberFormatException nfe) {\n return false;\n }\n }", "public int getLine() {\n\t\treturn line;\n\t}", "private int getCol(int[][] ints) {\n if (ints.length == 0) {\n return 0;\n }\n return ints[0].length;\n }", "int getLineOffset(int line) throws BadLocationException;", "public int getNumLines ();", "int getColumnCount();", "int getColumnCount();", "public int getColumn()\r\n\t{\r\n\t\treturn this.column;\r\n\t}", "public int getDecoratedColumn (Node node);", "public int getColumn() {\r\n\t\treturn column;\r\n\t}", "public int getColumn()\n\t\t{\n\t\t\treturn m_col;\n\t\t}", "public int getRowPosition(int col) {\n int rowPosition = -1;\n for (int row=0; row<6; row++) {\n if (board[row][col] == 0) {\n rowPosition = row;\n }\n }\n return rowPosition;\n }", "@Test(timeout = 4000)\n public void test057() throws Throwable {\n JavaCharStream javaCharStream0 = new JavaCharStream((Reader) null, 122, 122, 122);\n javaCharStream0.adjustBeginLineColumn(122, 122);\n int int0 = javaCharStream0.getBeginColumn();\n assertEquals(122, int0);\n }", "private int findFirstNotWhitespace(char[] characters) \n\t{\n\t\t//find starting position of token\n\t\tfor(int i=0; i<characters.length; i++)\n\t\t{\n\t\t\t//check if character is not whitespace.\n\t\t\tif(!Character.isWhitespace( characters[i]))\n\t\t\t{\n\t\t\t\t//non-whitespace found, return position \n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\t//no non-whitespace in char[].\n\t\treturn -1;\n\t}", "public abstract int getLastCageCol(int row, int col);", "public int getSourceLine(int pos) {\n unpack();\n int l = 0, r = line_number_table_length - 1;\n if (// array is empty\n r < 0)\n return -1;\n int min_index = -1, min = -1;\n /* Do a binary search since the array is ordered.\n */\n do {\n int i = (l + r) / 2;\n int j = line_number_table[i].getStartPC();\n if (j == pos)\n return line_number_table[i].getLineNumber();\n else if (// else constrain search area\n pos < j)\n r = i - 1;\n else\n // pos > j\n l = i + 1;\n /* If exact match can't be found (which is the most common case)\n * return the line number that corresponds to the greatest index less\n * than pos.\n */\n if (j < pos && j > min) {\n min = j;\n min_index = i;\n }\n } while (l <= r);\n /* It's possible that we did not find any valid entry for the bytecode\n * offset we were looking for.\n */\n if (min_index < 0)\n return -1;\n return line_number_table[min_index].getLineNumber();\n }", "public int getColumn() {\n\t\treturn column;\n\t}", "private int getColumn( int position ) {\n if ( columns == 1 ) {\n return 0;\n }\n //Log.d(TAG, \"getColumn returning some shit: \" + position + \" % \" + columns + \" = \" + (position % columns));\n return position % columns;\n }", "public int getMinColumn();", "private float measureLineNumber(){\n mPaint.setTypeface(mTypefaceLineNumber);\n int count = 0;\n int lineCount = getLineCount();\n while(lineCount > 0){\n count++;\n lineCount /= 10;\n }\n float single = mPaint.measureText(\"0\");\n return single * count * 1.01f;\n }", "public char getColumn() {\n\t\treturn column;\n\t}", "@Override\n public int contentColumn(\n @NotNull CharSequence lineChars,\n int indentColumn,\n @NotNull PsiEditContext editContext\n ) {\n // default 4 leading spaces removed\n int column = indentColumn;\n int leadingSpaces = myLeadingSpaces;\n int i = 0;\n\n while (leadingSpaces > 0 && i < lineChars.length()) {\n switch (lineChars.charAt(i++)) {\n case '\\t':\n int spaces = min(columnsToNextTabStop(column), leadingSpaces);\n leadingSpaces -= spaces;\n column += spaces;\n break;\n\n case ' ':\n leadingSpaces--;\n column++;\n break;\n\n default:\n return column;\n }\n }\n return column;\n }", "public int getColumn() {\n return col;\n }", "public int getColumnIndex (String columnName)\n\t{\n\t\tif (columnName == null || columnName.length() == 0)\n\t\t\treturn -1;\n\t\t//\n\t\tfor (int i = 0; i < m_data.cols.size(); i++)\n\t\t{\n\t\t\tRColumn rc = (RColumn)m_data.cols.get(i);\n\t\t//\tlog.fine( \"Column \" + i + \" \" + rc.getColSQL() + \" ? \" + columnName);\n\t\t\tif (rc.getColSQL().startsWith(columnName))\n\t\t\t{\n\t\t\t\tlog.fine( \"Column \" + i + \" \" + rc.getColSQL() + \" = \" + columnName);\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "public int getColumn() {\r\n return column;\r\n }", "public int getColumn() {\r\n return column;\r\n }", "static int row(String sq) {\n String s = sq.substring(1,2);\n return 9 - Integer.parseInt(s);\n }", "public int getColumn()\n {\n return column;\n }", "public int col() {\r\n\t\treturn col;\r\n\t}", "private static boolean doesFirstColumnContainZero(int[][] matrix,MatrixSize matrixSize){\n boolean columnFlag=false;\n for(int i=0;i<matrixSize.numberOfRows;i++){\n if(matrix[i][0]==0){\n columnFlag=true;\n break;\n }\n }\n return columnFlag;\n }", "public int getIntialSortedColumn()\n { \n return 0; \n }", "public static int getColumnNumber(Configuration conf) {\n\t\treturn conf.getInt(RCFile.COLUMN_NUMBER_CONF_STR, 0);\n\t}" ]
[ "0.6899116", "0.6820886", "0.67979187", "0.67036325", "0.67036325", "0.67036325", "0.6663562", "0.660148", "0.6580374", "0.65789855", "0.6545895", "0.65431225", "0.6411985", "0.63810366", "0.63376796", "0.6270005", "0.6252626", "0.62399405", "0.6238557", "0.6227915", "0.61777544", "0.6168796", "0.6168796", "0.6157349", "0.6093578", "0.6078403", "0.60590196", "0.6058911", "0.6012584", "0.6003782", "0.5993142", "0.59905136", "0.5989762", "0.59704554", "0.5937772", "0.5933536", "0.593151", "0.5924936", "0.5924442", "0.5917288", "0.58914196", "0.5871907", "0.5859239", "0.5857122", "0.58540726", "0.58433926", "0.58374155", "0.5836291", "0.58093417", "0.58050966", "0.58029526", "0.58002794", "0.57938045", "0.57622063", "0.57593477", "0.5744613", "0.57242036", "0.5718573", "0.5714793", "0.57135135", "0.5710995", "0.56901926", "0.5678311", "0.56694084", "0.56674457", "0.564154", "0.5639606", "0.5630506", "0.56235075", "0.5622288", "0.56214744", "0.5619246", "0.56048983", "0.5600844", "0.5600844", "0.5583769", "0.55762583", "0.5575515", "0.5573359", "0.5564004", "0.5563625", "0.5554161", "0.55518836", "0.55481714", "0.55424917", "0.55424625", "0.5538037", "0.5537558", "0.5530142", "0.5520874", "0.55154383", "0.5500311", "0.5497764", "0.5497764", "0.5497148", "0.5496521", "0.5494696", "0.5492926", "0.54899615", "0.54890627" ]
0.56483907
65
TODO Autogenerated method stub
@Override public BankAccount checkAccount(int accountNo) { for (BankAccount acc : bankAccount) { if (acc.getAccNum() == accountNo) return acc; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Creates the base ending conditions with a specified maximum number of steps.
public BaseEndingConditions(double maximumSeconds) { this.maximumSeconds = maximumSeconds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void init(int maxSteps) {\n }", "int getMaximalIterationCount();", "public void buildMaxHeap(){\n\t\tfor(int i = (n-2)/2 ; i >= 0; i--){\n\t\t\tmaxHeapfy(i);\n\t\t}\n\t}", "public void setMaxCloseStatements(int max)\n {\n _maxCloseStatements = max;\n }", "public RandomWalk(int max, int size)\n {\n maxSteps = max;\n absAreaMax = size;\n x = 0;\n y = 0;\n stepsTaken = 0;\n }", "public void setMaxGenerations(int value) { maxGenerations = value; }", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "private BDD buildEndGame(){\n\t\tBDD res = factory.makeOne();\n\n\t\tfor(int i = 0; i < this.dimension; i++){\n\t\t\tfor(int j = 0; j < this.dimension; j++){\n\t\t\t\tres.andWith(board[i][j].not());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn res;\n\t}", "public QuantificationDefinition setMaxIndex(int maxIndex) {\n assert maxIndex >= 0;\n this.maxIndex = maxIndex;\n return this;}", "@Override\r\n\tpublic void setMaxEvaluations(int maxEvaluations) {\n\t\t\r\n\t}", "@SuppressWarnings({\"UnusedDeclaration\"})\n public DefinedEnvironmentForMaximumLengthWithAdditiveFunction() {\n this(DEFAULT_LED_ACTIVATION_DURATION,\n new PositionalVariableFunction(),\n 0.0,\n false,\n DEFAULT_ORIENTATION_DERIVATION_DURATION,\n DEFAULT_CENTROID_DISTANCE_FROM_CENTER,\n DEFAULT_ORIENTATION_OFFSET,\n new BehaviorLimitedKinematicVariableFunctionList(),\n 90.0,\n new IntensityValue(),\n new SingleVariableFunction());\n }", "@Override\n\tpublic int max() {\n\t\treturn 4;\n\t}", "BaseCondition createBaseCondition();", "@Value(\"${PhoneticPracticeG2.MaxHistory}\") public void setMaxHistory(int max) {this.MAX_HISTORY = max; }", "public NormExpression(int minimum, int maximum, int numSteps){\n \n // Set caching values\n this.minimum = minimum;\n this.maximum = maximum;\n this.numSteps = numSteps;\n \n // Allocate space for caching\n values = new double[numSteps];\n }", "@Override\n\tprotected void setUpperBound() {\n\t\t\n\t}", "public void setMAX_ITERACOES(int MAX_ITERACOES) \r\n {\r\n if(MAX_ITERACOES > 0)\r\n this.MAX_ITERACOES = MAX_ITERACOES;\r\n }", "public void setMaxValue(int maxValue) {\n this.maxValue = maxValue;\n }", "public DynamicPart max(float max) {\n this.max = max;\n return this;\n }", "protected abstract boolean nbrToursMax();", "public int getMaxGenerations() { return maxGenerations; }", "public int getMaxCloseStatements()\n {\n return _maxCloseStatements;\n }", "public void setMax(int max) {\n this.max = max;\n }", "public void setMax(int max) {\n this.max = max;\n }", "float getXStepMax();", "public abstract int getMaxQlength();", "public void setMaxIterations(int number) {\r\n if (number < CurrentIteration) {\r\n throw new Error(\"Cannot be lower than the current iteration.\");\r\n }\r\n MaxIteration = number;\r\n Candidates.ensureCapacity(MaxIteration);\r\n }", "public void setVarimaxMaximumIterations(int max){\n this.nVarimaxMax = max;\n }", "protected int get_max_iter() {\n\t\treturn iterationsMaximum;\n\t}", "int getMaxTicksLimit();", "public abstract int getMaxIntermediateSize();", "public int getMaxRange() {\n\t\treturn max_range;\n\t}", "@Override\n public void setMaxRange(int maxRange) {\n this.maxRange = maxRange;\n }", "public double generate(double finalVal, long totalSteps, long currentStep) {\r\n double nextVal = 0.0;\r\n double slope = 0.0; \r\n \r\n // Initial step for ramp\r\n if (currentStep == 1)\r\n \t// Store the current value to adjust the starting point of the ramp\r\n \tinitVal = finalVal; \r\n \r\n // Linear\r\n // Determine the slope of the equation\r\n slope = (0 - initVal)/totalSteps;\r\n\r\n // Generate the next value\r\n nextVal = slope * currentStep + initVal;\r\n \r\n // At the end of the ramp so set the isDone flag true\r\n if (currentStep >= totalSteps)\r\n isDone = true;\r\n \r\n return nextVal; \r\n }", "@Override\n\tpublic TxtRecordFactory maxTargetValue(int max) {\n\t\tmaxTargetValue = max;\n\t\treturn this;\n\t}", "Integer getMaxSuccessiveDeltaCycles();", "private void generateIntervalArray(){\n BigDecimal maximumValue = this.getTfMaximumInterval();\n BigDecimal minimumValue = this.getTfMinimumInterval();\n BigDecimal stepValue = this.getTfStepInterval();\n \n intervalArray = new ArrayList<BigDecimal>();\n BigDecimal step = maximumValue;\n \n //Adiciona os valores \"inteiros\"\n while(step.doubleValue() >= minimumValue.doubleValue()){\n intervalArray.add(step);\n step = step.subtract(stepValue);\n }\n }", "public int getMaxCombinationsInRegion();", "public void setEndBayGroup(int num)\n\t{\n\t\tsetGroup(_Prefix + HardZone.ENDBAY.toString(), num);\n\t}", "public abstract int getMaximumArguments();", "private static void loopWithCheck(int upperLimit, QuitObject q) {\r\n\t\t\tint i;\r\n\t\t\tdouble temp;\r\n\t\t\t\r\n\t\t\tfor (i=0; i<upperLimit; i++) {\r\n\t\t\t\tif(q.getGreaterThan()==q.getLessThan()){\r\n\t\t\t\t\tq.setFinalCount(i+10000);\r\n\t\t\t\t\tq.setStatus(1);\r\n\t\t\t\t\tquitProgram(q);\r\n\t\t\t\t}\r\n\t\t\t\ttemp = Math.random();\r\n\t\t\t\tif (temp > 0.5) {\r\n\t\t\t\t\tq.addOneGreaterThan();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tq.addOneLessThan();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tq.setFinalCount(i+10000);\r\n\t\t\tq.setStatus(2);\r\n\t\t\tquitProgram(q);\r\n\t\t\t\r\n\t\t}", "public void setMaximum(int n) {\r\n int newMin = Math.min(n, min);\r\n int newValue = Math.min(n, getValue());\r\n int newExtent = Math.min(n - newValue, getExtent());\r\n setRangeProperties(newValue, newExtent, newMin, n, isAdjusting);\r\n }", "void setMaxAreaAddresses(int maxAreaAddresses);", "void setMaxAreaAddresses(int maxAreaAddresses);", "@Test public void findPentagonalPyramidWithLongestBaseEdgeNTest()\n {\n PentagonalPyramid[] pArray = new PentagonalPyramid[100];\n PentagonalPyramidList2 pList = new PentagonalPyramidList2(\"ListName\", \n pArray, 0);\n Assert.assertEquals(null, \n pList.findPentagonalPyramidWithLongestBaseEdge());\n }", "public void setMaxpower(int maxpower) {\n\t\t\r\n\t}", "public void setMaxNumOfStages(int s) {\n maxNumOfStages = s;\n }", "public void setMaximumPoints(int maximum);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void setMaxRows(int maxRows);", "public void InitializeMaxNumInstances(int num) {\n }", "public void setUpperBound(final int upperBound) {\r\n this.upperBound = upperBound;\r\n }", "protected SlidingWindowLog(int maxReqPerUnitTime) {\n\t\tsuper(maxReqPerUnitTime);\n\t}", "static boolean WindowEndCondition(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"WindowEndCondition\")) return false;\n if (!nextTokenIs(b, \"\", K_END, K_ONLY)) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = WindowEndCondition_0(b, l + 1);\n r = r && consumeToken(b, K_END);\n r = r && WindowVars(b, l + 1);\n r = r && consumeToken(b, K_WHEN);\n r = r && ExprSingle(b, l + 1);\n exit_section_(b, m, null, r);\n return r;\n }", "public BinomialModelSimulator(double initialValue, double increaseIfUp, double decreaseIfDown, int lastTime,\n\t\t\tint numberOfSimulations) {\n\t\tthis(initialValue, increaseIfUp, decreaseIfDown, 0, 1897, lastTime, numberOfSimulations);\n\t}", "public TimedChallengeExample(int max) {\n\t\tsuper(\n\t\t\t\tMenuType.SETTINGS, // The menu were your setting will be shown in\n\t\t\t\tmax // Maximum value of challenge\n\t\t);\n\t}", "public ResourceRange withMax(Integer max) {\n this.max = max;\n return this;\n }", "public void setMaximumNumberOfLightsToTurnOn(int maximumNumberOfLightsToTurnOn) {\n\t\tthis.maxLightsToTurnOnPerRoom = maximumNumberOfLightsToTurnOn;\n\t}", "public int getMaxChainLength(){\r\n return maxChainLength;\r\n }", "public void setLimitEnd(int limitEnd) {\n this.limitEnd=limitEnd;\n }", "public void setLimitEnd(int limitEnd) {\n this.limitEnd=limitEnd;\n }", "@JSProperty(\"maxRange\")\n void setMaxRange(double value);", "public int generateNewCRN(int min, int max)\n\t{\n\t\tif (max <= min)\n\t\t{\n\t\t\tthrow new IllegalArgumentException(\"max must be greater than min\");\n\t\t}\n\n\t\tint rVal = min;\n\n\t\twhile (containsCourse(rVal) && (rVal <= max))\n\t\t{\n\t\t\trVal += 1;\n\t\t}\n\n\t\treturn rVal;\n\t}", "public static void setRange(int max) {\r\n\t\tColors.max = max;\r\n\t}", "public void setMaximumPatternLength(int length) {\n\t\tthis.maxItemsetSize = length;\n\t}", "public Builder keepLast(int n){\n if(n <= 0){\n throw new IllegalArgumentException(\"Number of model files to keep should be > 0 (got: \" + n + \")\");\n }\n this.keepMode = KeepMode.LAST;\n this.keepLast = n;\n return this;\n }", "public int upperBound() {\n\t\tif(step > 0)\n\t\t\treturn last;\n\t\telse\n\t\t\treturn first;\n\t}", "Limit createLimit();", "public Builder setMaxCount(int value) {\n bitField0_ |= 0x00000002;\n maxCount_ = value;\n onChanged();\n return this;\n }", "public GameSettingBuilder setMaxRound(int maxRound) {\n this.maxRound = maxRound;\n return this;\n }", "void setMaxValue();", "public void setMaxRange(int max_range) {\n\t\t// Do not allow negative numbers\n\t\tthis.max_range = Math.max(0, max_range);\n\t}", "void setMaximum(int max);", "public int getMaxNumOfStages() {\n return maxNumOfStages;\n }", "public ExecutorTestSuiteBuilder<E> withMaxCapacity(int maxCapacity) {\n checkArgument(maxCapacity == ExecutorTestSubjectGenerator.UNASSIGNED || maxCapacity >= 3, \"A couple of tests assume capacity larger than 3. Please pick a larger value.\");\n getSubjectGenerator().withMaxCapicity(maxCapacity);\n return this;\n }", "public void setnbMaxJR(int n) {\n // TODO Remove\n //System.err.println(\"MAX PLAYER R \"+n);\n this.maxRealPlayer = n;\n }", "MinmaxEntity getEnd();", "public void setLimitEnd(Integer limitEnd) {\r\n this.limitEnd=limitEnd;\r\n }", "public void setMaxBitDepth(int maxValue) {\n/* 460 */ this.maxSample = maxValue;\n/* */ \n/* 462 */ this.maxSampleSize = 0;\n/* 463 */ while (maxValue > 0) {\n/* 464 */ maxValue >>>= 1;\n/* 465 */ this.maxSampleSize++;\n/* */ } \n/* */ }", "@Override\r\n\tpublic int randOfMax(int max) {\n\t\tRandom r = new Random();\r\n\t\t\r\n\t\tint i = r.nextInt(max);\r\n\t\twhile(0==i){//the restriction of the Random Number\r\n\t\t\ti = r.nextInt(max);\r\n\t\t}\r\n\t\treturn i;\r\n\t}", "@Override\n\tpublic int getMaxSpawnedInChunk() {\n\t\treturn EntityAttributes.CHUNK_LIMIT_1;\n\t}", "int getMaxCount();", "int getMaxCount();", "@SuppressWarnings(\"unchecked\")\n\t\tprivate State<T> createWaitingStateForZeroOrMore(final State<T> loopingState, final State<T> lastSink) {\n\t\t\tfinal IterativeCondition<T> currentFunction = (IterativeCondition<T>)currentPattern.getCondition();\n\n\t\t\tfinal State<T> followByState = createNormalState();\n\t\t\tfollowByState.addProceed(lastSink, BooleanConditions.<T>trueFunction());\n\t\t\tfollowByState.addTake(loopingState, currentFunction);\n\n\t\t\tfinal IterativeCondition<T> ignoreFunction = getIgnoreCondition(currentPattern);\n\t\t\tif (ignoreFunction != null) {\n\t\t\t\tfinal State<T> followByStateWithoutProceed = createNormalState();\n\t\t\t\tfollowByState.addIgnore(followByStateWithoutProceed, ignoreFunction);\n\t\t\t\tfollowByStateWithoutProceed.addIgnore(ignoreFunction);\n\t\t\t\tfollowByStateWithoutProceed.addTake(loopingState, currentFunction);\n\t\t\t}\n\n\t\t\treturn followByState;\n\t\t}" ]
[ "0.55684537", "0.512515", "0.5061386", "0.5007397", "0.50021714", "0.49967602", "0.49405462", "0.48453873", "0.48392177", "0.48255542", "0.48093858", "0.48067003", "0.47704378", "0.47154877", "0.47077775", "0.46999046", "0.4690502", "0.46898663", "0.46875897", "0.46534926", "0.46473506", "0.46370766", "0.46276656", "0.46276656", "0.46122438", "0.46112812", "0.46066824", "0.46051833", "0.45980746", "0.45947647", "0.45791322", "0.45544705", "0.45490983", "0.45428038", "0.453974", "0.4538409", "0.4531326", "0.45284176", "0.45250311", "0.4516617", "0.45149773", "0.4493679", "0.4488122", "0.4488122", "0.4483172", "0.44814074", "0.44773227", "0.4467699", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.44671553", "0.4460291", "0.44589326", "0.44565445", "0.44555676", "0.44478023", "0.44468638", "0.44440728", "0.44380516", "0.4437991", "0.4436881", "0.4436881", "0.44309914", "0.44275472", "0.44231158", "0.4422114", "0.44155246", "0.44138387", "0.44135997", "0.44093856", "0.44092205", "0.44086024", "0.439903", "0.43966943", "0.4383456", "0.4362465", "0.43571144", "0.43542248", "0.43542218", "0.43509296", "0.43496528", "0.43470666", "0.4345517", "0.4345517", "0.43373072" ]
0.58007425
0
Created by work on 28/02/15.
public interface Duck { public void quack(); public void fly(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "protected boolean func_70814_o() { return true; }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void method_4270() {}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "private void kk12() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void poetries() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@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\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "public void gored() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n public void init() {\n\n }", "public abstract void mo70713b();", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void init() {\n }", "@Override\n protected void init() {\n }", "public abstract void mo56925d();", "@Override\r\n\tpublic void init() {}", "@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}", "private void strin() {\n\n\t}", "public void mo21877s() {\n }", "@Override\n public void init() {}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\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\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\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n void init() {\n }", "private void m50367F() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public abstract void mo6549b();", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void m23075a() {\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override public int describeContents() { return 0; }", "public final void mo91715d() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "public void mo21779D() {\n }", "public void mo21878t() {\n }", "public void mo21825b() {\n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public abstract void mo27386d();", "@Override\n\t\tpublic void init() {\n\t\t}", "private void init() {\n\n\n\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "private void initialize() {\n\t\t\n\t}", "static void feladat4() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}" ]
[ "0.55919105", "0.5504925", "0.5502281", "0.5496403", "0.5470002", "0.54588974", "0.54438925", "0.5438061", "0.5431518", "0.54255337", "0.5414931", "0.53985274", "0.53582567", "0.5354109", "0.5343325", "0.5343325", "0.5343325", "0.5343325", "0.5343325", "0.53112954", "0.5295926", "0.5291276", "0.5291276", "0.52809", "0.5280838", "0.5279286", "0.5274948", "0.5272115", "0.5251047", "0.5250108", "0.5250108", "0.5249941", "0.5241959", "0.5240868", "0.5218896", "0.52062804", "0.5204085", "0.51942885", "0.51907504", "0.5190554", "0.51741636", "0.51741636", "0.51741636", "0.51670545", "0.51666194", "0.51574224", "0.51549244", "0.51518947", "0.51518947", "0.51518947", "0.5150598", "0.5150598", "0.5150598", "0.5147456", "0.51402766", "0.51390433", "0.51339203", "0.5130728", "0.5127764", "0.5127764", "0.5127764", "0.5127764", "0.5127764", "0.5127764", "0.51237285", "0.51197916", "0.51159203", "0.51156294", "0.511453", "0.5112581", "0.5112417", "0.5112417", "0.5109306", "0.5105639", "0.51056147", "0.5102884", "0.5100748", "0.50909203", "0.50898105", "0.50852543", "0.5082529", "0.5082529", "0.5082529", "0.5082529", "0.5082529", "0.5082529", "0.5082529", "0.50755733", "0.507122", "0.5069506", "0.50636595", "0.5052505", "0.5051436", "0.5048707", "0.50457525", "0.50405437", "0.5030895", "0.50305897", "0.50281656", "0.5027403", "0.5024863" ]
0.0
-1
SET FONT AND COLOR OF SELECTED ITEM
@RequiresApi(api = Build.VERSION_CODES.M) @Override public void onItemSelected(AdapterView<?> parent, View view, int position, long id) { TextView selectedItemTV = (TextView) parent.getSelectedView(); if(selectedItemTV != null) selectedItemTV.setTextAppearance(R.style.SpinnerSelectedItem); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "@Override\r\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tString color = chc.getSelectedItem();\r\n\t\tif (color == \"Yellow\") {\r\n\t\t\tfrm.setBackground(Color.yellow);\r\n\t\t} else if (color == \"Orange\") {\r\n\t\t\tfrm.setBackground(Color.orange);\r\n\t\t} else if (color == \"Pink\") {\r\n\t\t\tfrm.setBackground(Color.pink);\r\n\t\t} else if (color == \"Cyan\") {\r\n\t\t\tfrm.setBackground(Color.cyan);\r\n\t\t}\r\n\t\tfrm.setTitle(\"you selected \" + color);\r\n\t}", "@Override\n protected final void setGraphics() {\n super.setGraphics();\n Graphics g = toDraw.getGraphics();\n g.setColor(Color.BLACK); \n \n for (int i = 0; i < choices.size(); i++) { \n g.drawString(choices.get(i).getValue(), wGap, (i + 1) * hItemBox);\n }\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 }", "public void processFontColorSelection(Color selection) {\n dataManager.setFontColor(selection);\n }", "public void familiesActionPerformed(java.awt.event.ActionEvent evt) {\n myFont.font = (String) families.getSelectedItem(); /*FAULT:: myFont.font = \"xyz\"; */\n }", "public void itemStateChanged(ItemEvent event){\n\t\t\t// Instantiate font\n\t\t\tFont font = null;\n\t\t\tif(boldCheckBox.isSelected() && italicCheckBox.isSelected())\n\t\t\t\tfont = new Font(\"Serif\", Font.BOLD + Font.ITALIC, 14);\n\t\t\telse if(boldCheckBox.isSelected())\n\t\t\t\tfont = new Font(\"Serif\", Font.BOLD, 14);\n\t\t\telse if(italicCheckBox.isSelected())\n\t\t\t\tfont = new Font(\"Serif\", Font.ITALIC, 14);\n\t\t\telse \n\t\t\t\tfont = new Font(\"Serif\", Font.PLAIN, 14);\n\t\t\ttextField.setFont(font);\n\t\t}", "@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View paramView, int arg2, long arg3) {\n\t\t\t\tmItemListCurPosition = arg2;\n\t\t\t\tif (isFirstInit) {\n\t\t\t\t\tfocusView.initFocusView(paramView, false, 0);\n\t\t\t\t}\n\t\t\t\tfocusView.moveTo(paramView);\n\t\t\t\tif (mTextView != null) {\n\t\t\t\t\tmTextView.setTextColor(mContext.getResources().getColor(R.color.grey5_color));\n\t\t\t\t}\n\t\t\t\tif (mTextViewSetting != null) {\n\t\t\t\t\tmTextViewSetting.setTextColor(mContext.getResources().getColor(\n\t\t\t\t\t\t\tR.color.grey5_color));\n\t\t\t\t}\n\t\t\t\tmTextView = (TextView) paramView.findViewById(R.id.item_name);\n\t\t\t\tmTextViewSetting = (TextView) paramView.findViewById(R.id.item_setting);\n\t\t\t\tif (isFirstInit) {\n\t\t\t\t\tisFirstInit = false;\n\t\t\t\t\tmTextColorChangeFlag = true;\n\t\t\t\t\tlistTextColorSet();\n\t\t\t\t}\n\t\t\t}", "public void setTextColor(String textColor);", "private void setViewpagerTitleTextColor(int item){\n\t\tif(item == 0){\n\t\t\tmain_viewpager_title_tv_hot.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_active_color));\n\t\t\tmain_viewpager_title_tv_character.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_inactive_color));\n\t\t\tmain_viewpager_title_tv_picture.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_inactive_color));\n\t\t} else if(item == 1){\n\t\t\tmain_viewpager_title_tv_hot.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_inactive_color));\n\t\t\tmain_viewpager_title_tv_character.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_active_color));\n\t\t\tmain_viewpager_title_tv_picture.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_inactive_color));\n\t\t} else if(item == 2){\n\t\t\tmain_viewpager_title_tv_hot.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_inactive_color));\n\t\t\tmain_viewpager_title_tv_character.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_inactive_color));\n\t\t\tmain_viewpager_title_tv_picture.setTextColor(getResources().getColor(R.color.main_viewpager_title_tv_active_color));\n\t\t}\n\t}", "@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\ttexto.setFont(new Font((String) miCombo.getSelectedItem(), Font.PLAIN,miSlider.getValue()));\n\t\t\t}", "@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n switch (item.toLowerCase()){\n case \"red\":\n tdate.setTextColor(Color.parseColor(\"#FF5722\"));\n break;\n case \"blue\":\n tdate.setTextColor(Color.parseColor(\"#82B1FF\"));\n break;\n case \"green\":\n tdate.setTextColor(Color.parseColor(\"#A5D6A7\"));\n break;\n case \"yellow\":\n tdate.setTextColor(Color.parseColor(\"#FFEB3B\"));\n break;\n case \"orange\":\n tdate.setTextColor(Color.parseColor(\"#FFB74D\"));\n break;\n }\n }", "public void setTextColor(RMColor aColor) { }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tswitch ((int)id) {\n\t\t\t\tcase 0:{\n\t\t\t\t\tCharSequence[] a={\"白\",\"红\",\"黑\",\"蓝\",\"黄\",\"绿\"};\n\t\t\t\t\tnew AlertDialog.Builder(Setting.this)\n\t\t\t\t\t.setTitle(\"设置颜色\")\n\t\t\t\t\t.setItems(a, new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\tswitch (which) {\n\t\t\t\t\t\t\tcase 0:cz1.setcolor(0);break;\n\t\t\t\t\t\t\tcase 1:cz1.setcolor(1);break;\n case 2:cz1.setcolor(2);break;\n case 3:cz1.setcolor(3);break;\n case 4:cz1.setcolor(4);break;\n case 5:cz1.setcolor(5);break;\n default:\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t)\n\t\t\t\t\t.setNegativeButton(\"取消\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}).show();\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n case 1:\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "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 }", "@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 }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\ttexto.setFont(new Font((String) miCombo.getSelectedItem(), Font.PLAIN,miSlider.getValue()));\n\t\t}", "public void linkColor(String str) { setSelected(link_colors, str); }", "@Override\n\tpublic void itemStateChanged(ItemEvent ie) {\n\t\tif (ie.getSource() == liColor) {\n\t\t\tString color = liColor.getSelectedItem();\n\t\t\tSystem.out.println(color);\n\t\t\tif (color == \"Red\") {\n\t\t\t\tpLeft.setBackground(Color.RED);\n\t\t\t\tsetBackground(Color.RED);\n\t\t\t\tpButton.setBackground(Color.RED);\n\t\t\t}\n\t\t\telse if (color == \"Green\") {\n\t\t\t\tpLeft.setBackground(Color.GREEN);\n\t\t\t\tsetBackground(Color.GREEN);\n\t\t\t\tpButton.setBackground(Color.GREEN);\n\t\t\t}\n\t\t\telse if (color == \"Gray\") {\n\t\t\t\tpLeft.setBackground(Color.gray);\n\t\t\t\tsetBackground(Color.gray);\n\t\t\t\tpButton.setBackground(Color.gray);\n\t\t\t}\n\t\t\telse if (color == \"Black\") {\n\t\t\t\tpLeft.setBackground(Color.black);\n\t\t\t\tsetBackground(Color.black);\n\t\t\t\tpButton.setBackground(Color.black);\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "@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 }", "@Override\n\tpublic void widgetSelected(SelectionEvent e) {\n\t\tint i = typecombo.getSelectionIndex();\n\t\tif(i == 0){\n\t\t\tcosttext.setText(\"3元\");\n\t\t}\n\t\telse if(i == 1){\n\t\t\tcosttext.setText(\"5元\");\n\t\t}\n\t}", "public void setSelectorColor(int i, int currentOffset, int initOffset, int index, int height, Paint paint) {\n int offset = currentOffset + ((i - index) * height);\n if (offset <= initOffset - this.mSelectorOffset || offset >= this.mSelectorOffset + initOffset) {\n paint.setTextSize(this.mNormalTextSize);\n paint.setColor(this.mSmallTextColor);\n paint.setTypeface(this.mDefaultTypeface);\n return;\n }\n paint.setTextSize(this.mSelectorTextSize);\n paint.setColor(this.mSelectorTextColor);\n paint.setTypeface(this.mHwChineseMediumTypeface);\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 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 itemStateChanged(ItemEvent event) {\n\t\t\t if (event.getStateChange() == ItemEvent.SELECTED) {\n\t\t Object item = event.getItem(); // daragdsan object turliig awna \n\t\t System.out.println(\"daragdsan :\"+item);\n\t\t String s=(String)item;\n\t\t \n\t\t if(item.equals(\"gray\")){\n\t\t \t p1.setBackground(Color.GRAY);\n\t\t }\n\t\t if(item.equals(\"white\")){\n\t\t \t p1.setBackground(Color.white);\n\t\t }\n\t\t if(item.equals(\"green\")){\n\t\t \t p1.setBackground(Color.green);\n\t\t }\n\t\t if(item.equals(\"black\")){\n\t\t \t p1.setBackground(Color.BLACK);\n\t\t }\n\t\t if(item.equals(\"blue\")){\n\t\t \t p1.setBackground(Color.blue);\n\t\t }\n\t\t if(item.equals(\"cyan\")){\n\t\t \t p1.setBackground(Color.cyan);\n\t\t }\n\t\t \n\t\t if(item.equals(\"orange\")){\n\t\t \t p1.setBackground(Color.ORANGE);\n\t\t }\n\t\t if(item.equals(\"pink\")){\n\t\t \t p1.setBackground(Color.PINK);\n\t\t }\n\t\t if(item.equals(\"red\")){\n\t\t \t p1.setBackground(Color.red);\n\t\t }\n\t\t\t } \n\t\t\t\n\t\t}", "public native final EditorBaseEvent fontColor(String val) /*-{\n\t\tthis.fontColor = val;\n\t\treturn this;\n\t}-*/;", "public void setFont(Font value) {\r\n this.font = value;\r\n }", "private void setFont() {\n\t}", "public void styleIngredientListCell(ListView<Ingredient> lv){\n Callback<ListView<Ingredient>, ListCell<Ingredient>> ingredientsBasicFormat =\n new Callback<ListView<Ingredient>, ListCell<Ingredient>>() {\n @Override\n public ListCell<Ingredient> call(ListView<Ingredient> ingredientListView) {\n ListCell<Ingredient> cell = new ListCell<>(){\n @Override\n protected void updateItem(Ingredient ingredient, boolean empty) {\n super.updateItem(ingredient, empty);\n if (empty){\n setText(null);\n } else {\n setText(ingredient.getName());\n }\n setFont(InterfaceStyling.textFieldFont);\n }\n };\n return cell;\n }\n };\n lv.setCellFactory(ingredientsBasicFormat);\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tsetFontClickedState(SetActivity.this, j);\n\t\t\t\t\tfont = j;\n\t\t\t\t}", "public void setTextColor( Color txtColor ) {\r\n textColor = txtColor;\r\n }", "void setFontFamily(ReaderFontSelection f);", "@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 void setTextColorAndFont(GraphicsContext graphicsContext) {\r\n\t\tgraphicsContext.setFill(Color.WHITE);\r\n\t\tgraphicsContext.setFont(Font.font(25));\r\n\t}", "@Override\n public void onItemPicked(int index, String item) {\n buttonselect3.setText(item);\n buttonselect3.setTextColor(Color.YELLOW);\n ((TextView)findViewById(R.id.confitstate3)).setText(\"待配置\");\n }", "public static void SetFontNormale(Context cx, TextView item)\r\n {\r\n }", "private void applyFontToMenuItem(MenuItem subMenuItem) {\n\t\tString s = subMenuItem.getTitle().toString();\n\t\t\n\t\t\n\t\tswitch (syth) {\n\t\tcase 1:\n\t\t\tif(FontUtili.defaultFont==2)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ts = (String) ZawGyiToUni(s, false);\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 1), subMenuItem);\n\t\t\t} else {\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 1), subMenuItem);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2:\n\t\t\tif(FontUtili.defaultFont==1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ts =(String) ZawGyiToUni(s, true);\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 2), subMenuItem);\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 2), subMenuItem);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tif(FontUtili.defaultFont ==1)\n\t\t\t{\n\t\t\t\ts = (String) XtremeZawGyi(s, true);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\ts = (String) XtremeUni(s, true);\n\t\t\t}\n\t\t\tsetStringTypeFace(s, FontUtili.font(ac,3), subMenuItem);\n\t\t\tbreak;\n\t\t\t\n\t\t\n\t\t}\n\t}", "@Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n TextView tv = (TextView) super.getDropDownView(position, convertView, parent);\n\n // Set the text color of drop down items\n tv.setTextColor(Color.BLACK);\n tv.setText(list.get(position).getGroupName());\n\n /*// If this item is selected item\n if(position == mSelectedIndex){\n // Set spinner selected popup item's text color\n tv.setTextColor(Color.BLUE);\n }*/\n\n // Return the modified view\n return tv;\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 render(Graphics g){\n\t\tg.setColor(Color.WHITE);\n\t\tg.setFont(JudokaComponent.bigFont);\n\t\tfor (int i = 0; i < items.length; i++) {\n\t\t\tif(i == selectedItem && items[i] != null)\n\t\t\t\tg.drawString(\"> \" + items[i] + \" <\" , JudokaComponent.WIDTH / 2 - (items[i].length() + 4) * 10 + 200, 50 + JudokaComponent.HEIGHT / 2 + i * 40);\n\t\t\telse if(items[i] != null)\n\t\t\t\tg.drawString(items[i] , JudokaComponent.WIDTH / 2 - items[i].length() * 10 + 200, 50 + JudokaComponent.HEIGHT / 2 + i * 40);\n\t\t}\n\t}", "@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 }", "@Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n TextView tv = (TextView) super.getDropDownView(position, convertView, parent);\n\n // Set the text color of drop down items\n tv.setTextColor(Color.BLACK);\n tv.setText(groupBuildingDetailsClasses.get(position).getGroupBuildingName());\n /*// If this item is selected item\n if(position == mSelectedIndex){\n // Set spinner selected popup item's text color\n tv.setTextColor(Color.BLUE);\n }*/\n\n // Return the modified view\n return tv;\n }", "void setFontSpacingSlider(Font font);", "@Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n TextView tv = (TextView) super.getDropDownView(position, convertView, parent);\n\n // Set the text color of drop down items\n tv.setTextColor(Color.BLACK);\n tv.setText(groupSiteDetailsClasses.get(position).getGroupSiteName());\n /*// If this item is selected item\n if(position == mSelectedIndex){\n // Set spinner selected popup item's text color\n tv.setTextColor(Color.BLUE);\n }*/\n\n // Return the modified view\n return tv;\n }", "@Override\n public void choiced(String result) {\n target.setText(result);\n target.setTextColor(getResources().getColor(R.color.app_color));\n }", "public void onItemSelected(AdapterView<?> adapterView, \n\t\t View view, int i, long l) {\n\t\t \tString selected = spinner.getSelectedItem().toString();\n\t\t\t Toast.makeText(PainActivity.this,\"You Selected : \"\n\t\t\t + selected +\" brush \",Toast.LENGTH_SHORT).show(); \n\t\t \n\t\t \tif (selected.equals(\"Small\")) {\n\t\t \t\tdrawPaint.setStrokeWidth(20);\n\t\t \t} else if (selected.equals(\"Medium\")){\n\t\t \t\tdrawPaint.setStrokeWidth(40);\n\t\t \t} else {\n\t\t \t\tdrawPaint.setStrokeWidth(60);\n\t\t \t}\n\t\t }", "public void setSelectionForeground( final Color color ) {\n checkWidget();\n selectionForeground = color;\n }", "public void setTextFont(Font font);", "public void styleIngredientAddedListCell(ListView<Ingredient> lv){\n Callback<ListView<Ingredient>, ListCell<Ingredient>> ingredientsQuantityFormat = new Callback<ListView<Ingredient>, ListCell<Ingredient>>() {\n @Override\n public ListCell<Ingredient> call(ListView<Ingredient> ingredientListView) {\n ListCell<Ingredient> cell = new ListCell<>(){\n @Override\n protected void updateItem(Ingredient ingredient, boolean empty) {\n super.updateItem(ingredient, empty);\n if (empty){\n setText(null);\n } else {\n String quantityName = ingredient.getQuantityName();\n double quantityInGrams = ingredient.getQuantityInGrams();\n double quantityRatio = (quantityInGrams / ingredient.getSingleQuantityInGrams());\n\n //for formating. quantity in grams is to have no decimal places and the quantity\n //ratio is to have a maximum of one decimal place\n DecimalFormat df = new DecimalFormat(\"#.#\");\n DecimalFormat df2 = new DecimalFormat(\"#\");\n\n //eg if more than one egg, it should read eggs\n if (quantityRatio > 1){\n quantityName = quantityName + \"s\";\n }\n\n setText( ingredient.getName() + \" ( \" + df2.format(quantityInGrams) + \" grams / \" +\n df.format(quantityRatio) + \" \" + quantityName + \")\");\n }\n setFont(InterfaceStyling.textFieldFont);\n }\n };\n return cell;\n }\n };\n lv.setCellFactory(ingredientsQuantityFormat);\n }", "private void formatNavDrawerItem(boolean selected,ViewHolder holder) {\n holder.txtViewTitle.setTextColor(selected ?\n context.getResources().getColor(R.color.dark_dvs) :\n context.getResources().getColor(R.color.navdrawer_text_color));\n if(false){\n holder.imgViewLogo.setColorFilter(selected ?\n context.getResources().getColor(R.color.purple_500) :\n context.getResources().getColor(R.color.transparent));\n }\n }", "@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 getDropDownView(int position, View convertView, ViewGroup parent) {\n TextView tv = (TextView) super.getDropDownView(position, convertView, parent);\n\n // Set the text color of drop down items\n tv.setTextColor(Color.BLACK);\n tv.setText(groupRoomDetailsClasses.get(position).getGroupRoomName());\n /*// If this item is selected item\n if(position == mSelectedIndex){\n // Set spinner selected popup item's text color\n tv.setTextColor(Color.BLUE);\n }*/\n\n // Return the modified view\n return tv;\n }", "private void applyFontStyle() {\r\n\t\tfinal Font font = SWTGraphicUtil.buildFontFrom(this.control, PromptSupport.getFontStyle(this.control));\r\n\t\tthis.control.setFont(font);\r\n\t\tSWTGraphicUtil.addDisposer(this.control, font);\r\n\t}", "public void setTextColor(int color) {\n mTextColor = color;\n }", "public void setColored() {\n\t\tmenuItemViewColored.setFillColor(new MTColor(255, 255, 255, 255));\n\t\tthis.arrow.setBright();\n\t\tcolored = true;\n\t}", "private void updateDecorationViewer(ListItem item, boolean changed) {\n \t\tfinal boolean enabled= fShowInTextCheckBox.getSelection() && !(item.highlightKey == null && item.textStyleKey == null);\n \t\tfDecorationViewer.getControl().setEnabled(enabled);\n \n \t\tif (changed) {\n \t\t\tString[] selection= null;\n \t\t\tArrayList list= new ArrayList();\n \n \t\t\t// highlighting\n \t\t\tif (item.highlightKey != null) {\n \t\t\t\tlist.add(HIGHLIGHT);\n \t\t\t\tif (fStore.getBoolean(item.highlightKey))\n \t\t\t\t\tselection= HIGHLIGHT;\n \t\t\t}\n \n \t\t\t// legacy default= squiggly lines\n \t\t\tlist.add(SQUIGGLES);\n \n \t\t\t// advanced styles\n \t\t\tif (item.textStyleKey != null) {\n \t\t\t\tlist.add(UNDERLINE);\n \t\t\t\tlist.add(PROBLEM_UNDERLINE);\n \t\t\t\tlist.add(BOX);\n \t\t\t\tlist.add(DASHED_BOX);\n \t\t\t\tlist.add(IBEAM);\n \t\t\t}\n \n \t\t\t// set selection\n \t\t\tif (selection == null) {\n \t\t\t\tString val= item.textStyleKey == null ? SQUIGGLES[1] : fStore.getString(item.textStyleKey);\n \t\t\t\tfor (Iterator iter= list.iterator(); iter.hasNext();) {\n \t\t\t\t\tString[] elem= (String[]) iter.next();\n \t\t\t\t\tif (elem[1].equals(val)) {\n \t\t\t\t\t\tselection= elem;\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tfDecorationViewer.setInput(list.toArray(new Object[list.size()]));\n \t\t\tif (selection != null)\n \t\t\t\tfDecorationViewer.setSelection(new StructuredSelection((Object) selection), true);\n \t\t}\n \t}", "@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.WHITE);\n // Generate ListView Item using TextView\n return view;\n }", "void itemSelected(OutlineItem item);", "@Override\n public View getDropDownView(int position, View convertView, ViewGroup parent) {\n TextView tv = (TextView) super.getDropDownView(position, convertView, parent);\n\n // Set the text color of drop down items\n tv.setTextColor(Color.BLACK);\n tv.setText(groupLevelDetailsClasses.get(position).getGroupLevelName());\n\n /*// If this item is selected item\n if(position == mSelectedIndex){\n // Set spinner selected popup item's text color\n tv.setTextColor(Color.BLUE);\n }*/\n\n // Return the modified view\n return tv;\n }", "protected Choice createFontChoice() {\n CommandChoice choice = new CommandChoice();\n String fonts[] = Toolkit.getDefaultToolkit().getFontList();\n for (int i = 0; i < fonts.length; i++)\n choice.addItem(new ChangeAttributeCommand(fonts[i], \"FontName\", fonts[i], fView));\n return choice;\n }", "public void setTextColor(int textColor) {\n this.textColor = textColor;\n }", "private View modifyView(TextView view, int position) {\n MeshId item = this.getItem(position);\n if (item != null) {\n String text; // Text for the item in the list.\n int colour; // Colour for the text in the list.\n\n if (item.equals(deviceId)) {\n // Change text colour if is the current device's Id.\n text = \"This Device\";\n colour = R.color.blue;\n } else {\n // Otherwise, simply make the MeshId more readable and use the theme default colour.\n text = MeshHelper.getInstance().shortenMeshId(item);\n colour = android.R.color.primary_text_light;\n }\n view.setText(text);\n view.setTextColor(ContextCompat.getColor(getContext(), colour));\n }\n return view;\n }", "public void nodeColor(String str) { setSelected(node_colors, str); }", "private void setDefaultTextColor(Context context) {\n\n }", "public void chooseColor() {\n Color c = JColorChooser.showDialog(_parent, \"Choose '\" + getLabelText() + \"'\", _color);\n if (c != null) {\n _color = c;\n notifyChangeListeners();\n _updateField(_color);\n } \n }", "@Override\n public void onBindViewHolder(@NonNull MyHolder myHolder, final int i) {\n myHolder.txtGrid.setText(questionObject.getQuestions().getQuestions().get(ques).getOptions().get(i).getText());\n myHolder.txtGrid.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n mSelectedItem = i;\n notifyDataSetChanged();\n onClickView.onClickView(questionObject.getQuestions().getQuestions().get(ques).getOptions().get(mSelectedItem).getAnswerId(), true);\n }\n });\n\n if (mSelectedItem == i) {\n myHolder.txtGrid.setBackgroundResource(R.drawable.orange_shape);\n// myHolder.txtGrid.setTextColor(R.color.colorWhite);\n } else {\n myHolder.txtGrid.setBackgroundResource(R.drawable.border_shape_white);\n// myHolder.txtGrid.setTextColor(R.color.colorBlack);\n }\n\n }", "public void setLabelFont(Font f);", "public void onChange(Widget sender) {\n /** if there was a change in opacity, we update the currentFillColor and the selected object if there's any. */\n if (sender.equals(this.fillOpacity)) {\n\t\t\tint value = this.fillOpacity.getValue();\n\t\t\tif (this.curr_obj != null) {\n\t\t\t\tfinal Color color = this.curr_obj.getFillColor();\n\t\t\t\tColor newColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), value);\n\t\t\t\tthis.curr_obj.uSetFillColor(newColor);\n\n } else {\n this.currentFillColor.setAlpha(value);\n\t\t\t}\n\n\n }else if(sender.equals(this.strokeOpacity)) {\n int value = this.strokeOpacity.getValue();\n\n if(this.curr_obj != null) {\n\t\t\t\tfinal Color color = this.curr_obj.getStrokeColor();\n\t\t\t\tColor newColor = new Color(color.getRed(), color.getGreen(), color.getBlue(), value);\n\t\t\t\tthis.curr_obj.uSetStroke(newColor, this.curr_obj.getStrokeWidth());\n\n } else {\n this.currentStrokeColor.setAlpha(value);\n\t\t\t}\n /** If there was any change in the ListBoxes we update the current font. */\n } else if(sender.equals(this.currentFontFamily) || sender.equals(this.currentFontSize) || sender.equals(this.currentFontStyle) || sender.equals(this.currentFontWeight)) {\n this.updateFont();\n } else if(sender.equals(this.currentStrokeSize) && this.curr_obj != null) {\n this.curr_obj.uSetStroke(this.currentStrokeColor, this.currentStrokeSize.getValue());\n }\n\t}", "public Color getTextColor(){\r\n return textColor;\r\n }", "public void setSelectedFontName( String fontName )\r\n\t{\r\n\t\t// set the currently selected font name as per the string 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\tfontNamesList.setSelectedValue( fontName, true );\r\n\t}", "@FXML\r\n void fontAction() {\r\n // default css code for each characteristics of the text\r\n String textFont = \"-fx-font-family: \";\r\n String textSize = \"-fx-font-size: \";\r\n String textStyle = \"\";\r\n\r\n // Create and take the input from the Font dialog\r\n Dialog<Font> fontSelector = new FontSelectorDialog(null);\r\n Optional<Font> result = fontSelector.showAndWait();\r\n\r\n // add changes to the default CSS code above based on the users\r\n if (result.isPresent()) {\r\n Font newFont = result.get();\r\n textFont += \"\\\"\" + newFont.getFamily() + \"\\\";\";\r\n textSize += newFont.getSize() + \"px;\";\r\n\r\n // some basics CSS font characteristics\r\n String style = newFont.getStyle();\r\n String style_italic = \"-fx-font-style: italic;\";\r\n String style_regular = \"-fx-font-weight: normal ;\";\r\n String style_bold = \"-fx-font-weight: bold;\";\r\n switch (style) {\r\n case \"Bold Italic\":\r\n textStyle += style_bold + \"\\n\" + style_italic;\r\n case \"Italic\":\r\n textStyle += style_italic;\r\n case \"Regular\":\r\n textStyle += style_regular;\r\n case \"Regular Italic\":\r\n textStyle += style_italic;\r\n default:\r\n textStyle += style_bold;\r\n }\r\n\r\n // Add all characteristic to a single string\r\n String finalText = textFont + \"\\n\" + textSize;\r\n finalText += \"\\n\" + textStyle;\r\n // Display options and set that options to the text\r\n defOutput.setStyle(finalText);\r\n }\r\n }", "public void setTextColor(Color textColor) {\r\n this.textColor = textColor;\r\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 }", "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 init() {\n mSelectedColor = new Paint(Paint.ANTI_ALIAS_FLAG);\n mSelectedColor.setColor(getResources().getColor(R.color.colorPrimary));\n mSelectedColor.setStyle(Paint.Style.FILL);\n\n mUnselectedColor = new Paint(Paint.ANTI_ALIAS_FLAG);\n mUnselectedColor.setColor(getResources().getColor(R.color.textColorSecondaryInverse));\n\n mSelectedColor.setStyle(Paint.Style.FILL);\n mPosition = new RectF();\n\n mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);\n mTextPaint.setColor(getResources().getColor(R.color.textColorSecondary));\n mTextPaint.setTextSize(48);\n }", "public void chooseColor() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t\r\n\t}", "private void setSelectedWord() {\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n if (backColor == rowSelectColor) {\n final TextView descriptionView = (TextView) row.findViewById(R.id.wordDescription);\n final TextView glossView1 = (TextView) row.findViewById(R.id.wordGloss1);\n if (descriptionView != null) selectedWords = descriptionView.getText().toString();\n if (glossView1 != null) selectedSynset = glossView1.getText().toString();\n }\n }\n }\n }", "public Handler(Font f)\n {\n font_var=f; //sets font as font button selected\n }", "@FXML\n\tpublic void setSelectedItem(MouseEvent event) {\n\t\ttry {\n\t\t\tString s=inventoryList.getSelectionModel().getSelectedItem();\t// Get selected item\n\t\t\tItem i=Item.getItem(ItemList, s);\n\t\t\titemselect.setText(s);\t// Set selected item information\n\t\t\tif(i.getStat().equals(\"HP\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Health\");\n\t\t\telse if(i.getStat().equals(\"DMG\"))\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Damage\");\n\t\t\telse\n\t\t\t\titemStats.setText(\"+\"+i.getChange()+\" Evasion\");\n\t\t} catch(Exception e) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t}", "public String getTextColor();", "private void setToNormalStateTextItemView(){\n\t\t\n\t\tmCurrentSelect = -1;\n\t\tfor (int i = 0; i < mTotalTexts.size(); i++) {\n\t\t\tInnerTextView contactView = mTotalTexts.get(i);\n\t\t\tif (contactView != null) {\n\t\t\t\tcontactView.setBackground(false);\n\t\t\t}\n\t\t}\n\t}", "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 updateGrepStyle()\n\t{\n\t\tgrepStyle.setName(textName.getText());\n\t\tgrepStyle.setBold(cbBold.getSelection());\n\t\tgrepStyle.setItalic(cbItalic.getSelection());\n\t\tgrepStyle.setForeground(cpForeground.getEffectiveColor());\n\t\tgrepStyle.setBackground(cpBackground.getEffectiveColor());\n\t\tgrepStyle.setUnderline(cpUnderline.isChecked());\n\t\tgrepStyle.setUnderlineColor(cpUnderline.getColor()); \n\t\tgrepStyle.setStrikeout(cpStrikethrough.isChecked());\n\t\tgrepStyle.setStrikeoutColor(cpStrikethrough.getColor());\n\t\tgrepStyle.setBorder(cpBorder.isChecked());\n\t\tgrepStyle.setBorderColor(cpBorder.getColor());\n\t}", "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 }", "void set(String group, String name, String style);", "@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) {\n if (dialog.isShowing()) {\n\n dialog.dismiss();\n }\n res_gender.setText(str_gender[position]);\n res_gender.setTextColor(Color.parseColor(\"#000000\"));\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 makeSwitcherBall(TPaintDropListItem paintSelectedItem);", "public void onItemClick(AdapterView<?> parent, View v, int position, long id) \n\t\t\t\t {\n\t\t\t\t \t String selectedSize = (String) listView.getItemAtPosition(position);\n\n\t\t\t\t \t //Create default\n\t\t\t\t \t int textTitleSize = 18;\n\t\t\t\t \t int textSize = 12;\n\n\t\t\t\t \t //creating preferences\n\t\t\t\t \t SharedPreferences prefs = getSharedPreferences(\"MyPrefs\", 0);\n\t\t\t\t \t\tEditor editor = prefs.edit();\n\n //Parse the integers from the strings\n Pattern p = Pattern.compile(\"\\\\d+\");\n Matcher m = p.matcher(selectedSize);\n List<String> matches = new ArrayList<String>();\n while(m.find()) {\n matches.add(m.group());\n }\n\n textTitleSize = Integer.parseInt(matches.get(0));\n textSize = Integer.parseInt(matches.get(1));\n\n\t\t\t\t \t\t//put into prefs\n\t\t\t\t \t\teditor.putInt(\"TEXTTITLESIZE\", textTitleSize);\n\t\t\t\t \t\teditor.putInt(\"TEXTSIZE\", textSize);\n\t\t\t\t \t\teditor.commit();\n\t\t\t\t \t\tfinish();\n\t\t\t\t \t\t\n\t\t\t\t }", "public void selectProductColor(String color){\n Select select = new Select(colorSelect);\n select.selectByVisibleText(color);\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 void setPriorityTextColor(String textColor) {\n btnPrioritySet.setTextColor(Color.parseColor(textColor));\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 testSelectItemCustomRenderer() {\n \n box.setRenderer(new ListCellRenderer() {\n\n @Override\n public Component getListCellRendererComponent(JList list, final Object value, int index, boolean isSelected,\n boolean cellHasFocus) {\n \n JPanel p = new JPanel()\n {\n public String getText() {\n return value!=null ? value.toString() : \"[Null]\";\n }\n };\n p.setBackground(index % 2 == 0 ? Color.RED : Color.BLUE);\n return p;\n }\n });\n \n showFrame(box);\n for (int i=0;i < MAX_ENTRIES;i += MAX_ENTRIES / 10) {\n selectedItem = null;\n String item = \"item \" + i;\n tester.actionSelectItem(box, item);\n assertEquals(\"Wrong item selected\", item, selectedItem);\n }\n }", "@Override\n\tpublic void visit(TextHElement ele) {\n\t\tgetElementStyle(ele);\n\t}", "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 select(T item) {\n getElement().select(SerDes.mirror(item));\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 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 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}" ]
[ "0.6715075", "0.66598237", "0.6586415", "0.6526239", "0.638774", "0.62529963", "0.62388027", "0.6226735", "0.62036854", "0.6176928", "0.6140664", "0.6060008", "0.6059654", "0.6021309", "0.60208744", "0.6018666", "0.6014883", "0.60065544", "0.59652394", "0.5946481", "0.59339345", "0.59290487", "0.59128016", "0.58777505", "0.5861972", "0.58413255", "0.58319694", "0.5831275", "0.5815335", "0.57848305", "0.57781845", "0.5774616", "0.576885", "0.57656074", "0.5759012", "0.57342863", "0.56916964", "0.56864166", "0.56529427", "0.5649808", "0.5642066", "0.563476", "0.56290185", "0.5627204", "0.56093854", "0.5595035", "0.55751294", "0.5574484", "0.5573461", "0.55649483", "0.5560472", "0.5540443", "0.5536954", "0.5535217", "0.5533243", "0.5532404", "0.5526557", "0.5524755", "0.55239", "0.551281", "0.54987967", "0.5496839", "0.54798675", "0.5478838", "0.5444283", "0.5442407", "0.5439596", "0.54350954", "0.5433601", "0.5427001", "0.54129004", "0.54022515", "0.53997654", "0.53934395", "0.5377049", "0.5376684", "0.5374964", "0.5372589", "0.5372402", "0.5372064", "0.53631234", "0.53613", "0.53586835", "0.5357367", "0.53502554", "0.5340801", "0.5331107", "0.53304315", "0.5327928", "0.5320202", "0.5315228", "0.5314549", "0.5311829", "0.53113663", "0.53097737", "0.53058106", "0.530073", "0.53002053", "0.5294573", "0.5288636" ]
0.5350982
84
Get XML String of utf8
public static String getUTF8String(String xml) { // A StringBuffer Object StringBuffer sb = new StringBuffer(); sb.append(xml); String str = ""; String strUTF8=""; try { str = new String(sb.toString().getBytes("utf-8")); strUTF8 = URLEncoder.encode(str, "utf-8"); } catch (UnsupportedEncodingException e) { // TODO Auto-generated catch block e.printStackTrace(); } // return to String Formed return strUTF8; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getUTF8XMLString(String xml) {\r\n\t\tString xmlUTF8 = \"\";\r\n\t\ttry {\r\n\t\t\txmlUTF8 = URLEncoder.encode(xml, \"utf-8\");\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn xmlUTF8;\r\n\t}", "String toXmlString() throws IOException;", "public abstract String toXML();", "public abstract String toXML();", "public abstract String toXML();", "public java.lang.String getXml();", "public String toXml( String inEncoding )\n\t{\n\t\tDocument doc = DocumentHelper.createDocument();\n\t\tElement root = doc.addElement(getName());\n\t\tappendXml(this,root);\n\t\tStringWriter text = new StringWriter();\n\t\tOutputFormat format = OutputFormat.createPrettyPrint();\n\t\tformat.setEncoding(inEncoding);\n\t\tXMLWriter out = new XMLWriter(text, format);\n\t\ttry\n\t\t{\n\t\t\tout.write(doc);\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t\tthrow new OpenEditRuntimeException(ex);\n\t\t}\n\t\treturn text.toString();\n\t}", "String toXML() throws RemoteException;", "public abstract StringBuffer toXML();", "public abstract StringBuffer toXML ();", "public String toXML() {\n StringWriter stringWriter = new StringWriter();\n PrintWriter printWriter = new PrintWriter(stringWriter, true);\n toXML(printWriter);\n return stringWriter.toString();\n }", "@DOMSupport(DomLevel.THREE)\r\n\t@BrowserSupport({BrowserType.FIREFOX_2P})\r\n\t@Property String getXmlEncoding();", "public String toXMLTag() {\n\t\tfinal StringBuffer buffer = new StringBuffer();\n\t\ttoXMLTag(buffer,0);\n\t\treturn buffer.toString();\n\t}", "private String escapeXML(String string) {\n if (string == null)\n return \"null\";\n StringBuffer sb = new StringBuffer();\n int length = string.length();\n for (int i = 0; i < length; ++i) {\n char c = string.charAt(i);\n switch (c) {\n case '&':\n sb.append(\"&amp;\");\n break;\n case '<':\n sb.append(\"&lt;\");\n break;\n case '>':\n sb.append(\"&gt;\");\n break;\n case '\\'':\n sb.append(\"&#039;\");\n break;\n case '\"':\n sb.append(\"&quot;\");\n break;\n default:\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public static String unescapeXml(String str)\n\t{\n\t\tif (str == null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\treturn Entities.XML.unescape(str);\n\t}", "private String escapeXML(String string) {\n StringBuffer sb = new StringBuffer();\n int length = string.length();\n for (int i = 0; i < length; ++i) {\n char c = string.charAt(i);\n switch (c) {\n case '&':\n sb.append(\"&amp;\");\n break;\n case '<':\n sb.append(\"&lt;\");\n break;\n case '>':\n sb.append(\"&gt;\");\n break;\n case '\\'':\n sb.append(\"&#039;\");\n break;\n case '\"':\n sb.append(\"&quot;\");\n break;\n default:\n sb.append(c);\n }\n }\n return sb.toString();\n }", "public static String encodeXmlValue(String inString) {\n String retString = inString;\n\n retString = StringUtil.replaceString(retString, \"&\", \"&amp;\");\n retString = StringUtil.replaceString(retString, \"<\", \"&lt;\");\n retString = StringUtil.replaceString(retString, \">\", \"&gt;\");\n retString = StringUtil.replaceString(retString, \"\\\"\", \"&quot;\");\n retString = StringUtil.replaceString(retString, \"'\", \"&apos;\");\n return retString;\n }", "public static String escapeXML(String val)\n {\n if (val == null) {\n return \"\";\n } else {\n StringBuffer sb = new StringBuffer();\n for (int i = 0; i < val.length(); i++) {\n char ch = val.charAt(i);\n switch (ch) {\n // -- TODO: must also handle unicode escaping\n case '\\\"':\n sb.append(\"&quot;\");\n break;\n case '\\'':\n sb.append(\"&apos;\");\n break;\n case '<':\n sb.append(\"&lt;\");\n break;\n case '>':\n sb.append(\"&gt;\");\n break;\n case '&':\n sb.append(\"&amp;\");\n break;\n default:\n sb.append(ch);\n break;\n }\n }\n return sb.toString();\n }\n }", "public String formatXml(String str) throws UnsupportedEncodingException, IOException, DocumentException {\n\t\tSAXReader reader = new SAXReader();\r\n\t\t// System.out.println(reader);\r\n\t\t// 注释:创建一个串的字符输入流\r\n\t\tStringReader in = new StringReader(str);\r\n\t\tDocument doc = reader.read(in);\r\n\t\t// System.out.println(doc.getRootElement());\r\n\t\t// 注释:创建输出格式\r\n\t\tOutputFormat formater = OutputFormat.createPrettyPrint();\r\n\t\t// 注释:设置xml的输出编码\r\n\t\tformater.setEncoding(\"utf-8\");\r\n\t\t// 注释:创建输出(目标)\r\n\t\tStringWriter out = new StringWriter();\r\n\t\t// 注释:创建输出流\r\n\t\tXMLWriter writer = new XMLWriter(out, formater);\r\n\t\t// 注释:输出格式化的串到目标中,执行后。格式化后的串保存在out中。\r\n\t\twriter.write(doc);\r\n\r\n\t\tString destXML = out.toString();\r\n\t\twriter.close();\r\n\t\tout.close();\r\n\t\tin.close();\r\n\t\t// 注释:返回我们格式化后的结果\r\n\t\treturn destXML;\r\n\t}", "public static String escapeXML(String value){\r\n\t\treturn FuzzyXMLUtil.escape(value, false);\r\n\t}", "public String toXMLString() {\n\t\treturn toXMLString(XML_TAB, XML_NEW_LINE);\n\t}", "public final String toString() {\n StringBuffer sb = new StringBuffer();\n sb.append(\"<?xml version=\\\"1.0\\\"?>\").append(br());\n toXML(sb, 0);\n return sb.toString();\n }", "@SneakyThrows(value = {JAXBException.class, IOException.class})\n\tpublic static <T> String java2Xml(T t, String encoding) {\n\t\tMarshaller marshaller = createMarshaller(t, encoding);\n\n\t\tStringWriter stringWriter = new StringWriter();\n\t\tmarshaller.marshal(t, stringWriter);\n\t\tString result = stringWriter.toString();\n\t\tstringWriter.close();\n\n\t\treturn result;\n\t}", "public String toXml() {\n StringWriter outputStream = new StringWriter();\n try {\n PrintWriter output = new PrintWriter(outputStream);\n try {\n output.write(\"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\");\n toXml(output);\n return outputStream.toString();\n }\n catch (Exception ex) {\n Logger logger = Logger.getLogger(this.getClass());\n logger.error(ex);\n throw new EJBException(ex);\n }\n finally {\n output.close();\n }\n }\n finally {\n try {\n outputStream.close();\n }\n catch (IOException ex) {\n Logger logger = Logger.getLogger(this.getClass());\n logger.error(ex);\n throw new EJBException(ex);\n }\n }\n }", "public static String getStringFromXml( Document doc ){\n\t\tFormat format = Format.getPrettyFormat();\n\t\tXMLOutputter fmt = new XMLOutputter( format );\n\t\treturn fmt.outputString(doc);\n\t}", "public static void encodeXML(StringBuilder out, String str) {\n int n = str.length();\n for (int i = 0; i < n; i++) {\n char c = str.charAt(i);\n if (c == '<') {\n out.append(\"&lt;\");\n continue;\n }\n if (c == '>') {\n out.append(\"&gt;\");\n continue;\n }\n if (c == '&') {\n out.append(\"&amp;\");\n continue;\n }\n if (c == '\\'') {\n out.append(\"&apos;\");\n continue;\n }\n if (c == '\\\"') {\n out.append(\"&quot;\");\n continue;\n }\n if (c >= 32 && c <= 126) {\n out.append(c);\n continue;\n }\n out.append(\"&#x\");\n String v = Integer.toString(c, 16);\n for (int j = v.length(); j < 4; j++)\n out.append('0');\n out.append(v).append(';');\n }\n }", "Element toXML();", "public static void encodeXML(PrintWriter out, String str) {\n int n = str.length();\n for (int i = 0; i < n; i++) {\n char c = str.charAt(i);\n if (c == '<') {\n out.write(\"&lt;\");\n continue;\n }\n if (c == '>') {\n out.write(\"&gt;\");\n continue;\n }\n if (c == '&') {\n out.write(\"&amp;\");\n continue;\n }\n if (c == '\\'') {\n out.write(\"&apos;\");\n continue;\n }\n if (c == '\\\"') {\n out.write(\"&quot;\");\n continue;\n }\n if (c >= 32 && c <= 126) {\n out.write(c);\n continue;\n }\n out.write(\"&#x\");\n String v = Integer.toString(c, 16);\n for (int j = v.length(); j < 4; j++)\n out.write('0');\n out.write(v);\n out.write(';');\n }\n }", "public String toXml() {\n\t\treturn(toString());\n\t}", "public String toXmlString() {\r\n String norma = name().toLowerCase();\r\n return norma.replace('_', '-');\r\n }", "public String getXML() //Perhaps make a version of this where the header DTD can be manually specified\n { //Also allow changing of generated tags to user specified values\n \n String xml = new String();\n xml= \"<?xml version = \\\"1.0\\\"?>\\n\";\n xml = xml + generateXML();\n return xml;\n }", "public static String XmlFormalize(String sTemp)\r\n {\r\n StringBuffer sb = new StringBuffer();\r\n\r\n if (sTemp == null || sTemp.equals(\"\"))\r\n {\r\n return \"\";\r\n }\r\n String s = tranEncodeToGB(sTemp);\r\n for (int i = 0; i < s.length(); i++)\r\n {\r\n char cChar = s.charAt(i);\r\n if (isGB2312(cChar))\r\n {\r\n sb.append(PRE_FIX_UTF);\r\n sb.append(Integer.toHexString(cChar));\r\n sb.append(POS_FIX_UTF);\r\n }\r\n else\r\n {\r\n switch ((int) cChar)\r\n {\r\n case 32:\r\n sb.append(\"&#32;\");\r\n break;\r\n case 34:\r\n sb.append(\"&quot;\");\r\n break;\r\n case 38:\r\n sb.append(\"&amp;\");\r\n break;\r\n case 60:\r\n sb.append(\"&lt;\");\r\n break;\r\n case 62:\r\n sb.append(\"&gt;\");\r\n break;\r\n default:\r\n sb.append(cChar);\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }", "public static String isoToUTF8(String value) throws Exception{\n \treturn value;\n\t}", "public String getUtf(){\n return utf;\n }", "public String getXML() {\n\t\treturn getXML(false);\n\t}", "public String\ttoXML()\t{\n\t\treturn toXML(0);\n\t}", "private String toXML(){\n\tString buffer = \"<xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\">\\n\";\n\tfor(Room[] r : rooms)\n\t for(Room s : r)\n\t\tif(s != null)\n\t\t buffer += s.toXML();\n\tbuffer += \"</xml>\";\n\treturn buffer;\n }", "public String toXML() {\n return null;\n }", "@Export\n static DOMString constant() {\n String constant = \"1234567890 äöüäöüß \" // umlaute\n + \"𝟘𝟙𝟚𝟛𝟜𝟝𝟞𝟟𝟠𝟡 𝒥𝒶𝓋𝒶𝓈𝒸𝓇𝒾𝓅𝓉 \" // surrogate chars\n + \"abcdefghijklmnopqrstuvwxyz\";\n return JSObject.domString( constant );\n }", "public String toXml()\n\t{\n\t\ttry {\n\t\t\tTransformer transformer = TransformerFactory.newInstance().newTransformer();\n\t\t\tStringWriter buffer = new StringWriter();\n\t\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"yes\");\n\t\t\ttransformer.transform(new DOMSource(conferenceInfo), new StreamResult(buffer));\n\t\t\treturn buffer.toString();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "public String toXML()\n\t{\n\t\treturn toXML(0);\n\t}", "private String convertXmlToString(Document xmlDoc) {\r\n\r\n\t\tString xmlAsString = \"\";\r\n\t\ttry {\r\n\r\n\t\t\tTransformer transformer;\r\n\t\t\ttransformer = TransformerFactory.newInstance().newTransformer();\r\n\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.STANDALONE, \"yes\");\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\ttransformer.setOutputProperty(\r\n\t\t\t\t\t\"{http://xml.apache.org/xslt}indent-amount\", \"5\");\r\n\r\n\t\t\tStreamResult result = new StreamResult(new StringWriter());\r\n\r\n\t\t\tDOMSource source = new DOMSource(xmlDoc);\r\n\r\n\t\t\ttransformer.transform(source, result);\r\n\r\n\t\t\txmlAsString = result.getWriter().toString();\r\n\r\n\t\t} catch (TransformerConfigurationException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerFactoryConfigurationError e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} catch (TransformerException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn xmlAsString;\r\n\r\n\t}", "public String getXML() {\n\t\tString xml = \"\";\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance( VolumeRs.class );\n\t\t\tMarshaller m = jc.createMarshaller();\n\t\t\tStringWriter stringWriter = new StringWriter();\n\t\t\tm.marshal(this, stringWriter);\n\t\t\txml = stringWriter.toString();\n\t\t} catch (JAXBException ex) {}\n\t\treturn xml;\n\t}", "public String toXML() {\n return null;\n }", "public static String convertCharacterToXml(Character character) {\r\n XStream xstream = new XStream(new DomDriver());\r\n return xstream.toXML(character);\r\n }", "public String getStringEncoding()\n\t{\n\t\treturn \"utf-8\";\n\t}", "@Test\n\tpublic void testSpecialChars() {\n\t\tString ff = XStreamUtils.serialiseToXml(\"Form feed: \\f\");\n\t\tSystem.out.println(ff);\n\t\tObject s = XStreamUtils.serialiseFromXml(\"<S>&#xc;</S>\");\n\t\tSystem.out.println(ff);\n\t}", "public String exportXML() {\n\n\t\tXStream xstream = new XStream();\n\t\txstream.setMode(XStream.NO_REFERENCES);\n\n\t\treturn xstream.toXML(this);\n\t}", "public static String toXml(Object root, String encoding) {\n Class clazz = Reflections.getUserClass(root);\n return toXml(root, clazz, encoding, true);\n }", "@Override\n\tpublic CharSequence toXML() {\n\t\treturn null;\n\t}", "public String toXML()\n {\n /* this is the kind of string that we will be generating here:\n *\n * <presence from='[email protected]/globe'>\n * <c xmlns='http://jabber.org/protocol/caps'\n * hash='sha-1'\n * node='http://jitsi.org'\n * ver='zHyEOgxTrkpSdGcQKH8EFPLsriY='/>\n * </presence>\n */\n\n StringBuilder bldr\n = new StringBuilder(\"<c xmlns='\" + getNamespace() + \"' \");\n\n if(getExtensions() != null)\n bldr.append(\"ext='\" + getExtensions() + \"' \");\n\n bldr.append(\"hash='\" + getHash() + \"' \");\n bldr.append(\"node='\" + getNode() + \"' \");\n bldr.append(\"ver='\" + getVersion() + \"'/>\");\n\n return bldr.toString();\n }", "protected String getXML() {\n\n StringBuffer b = new StringBuffer(\"title =\\\"\");\n b.append(title);\n b.append(\"\\\" xAxisTitle=\\\"\");\n b.append(xAxisTitle);\n b.append(\"\\\" yAxisTitle=\\\"\");\n b.append(yAxisTitle);\n b.append(\"\\\" xRangeMin=\\\"\");\n b.append(xRangeMin);\n b.append(\"\\\" xRangeMax=\\\"\");\n b.append(xRangeMax);\n b.append(\"\\\" xRangeIncr=\\\"\");\n b.append(xRangeIncr);\n b.append(\"\\\" yRangeMin=\\\"\");\n b.append(yRangeMin);\n b.append(\"\\\" yRangeMax=\\\"\");\n b.append(yRangeMax);\n b.append(\"\\\" yRangeIncr=\\\"\");\n b.append(yRangeIncr);\n b.append(\"\\\" >\\n\");\n\n for (int i = 0, n = dataSources.size(); i < n; i++) {\n GuiChartDataSource ds = (GuiChartDataSource)dataSources.get(i);\n b.append(ds.toXML());\n b.append(\"\\n\");\n }\n\n return b.toString();\n }", "public static String getXmlCode(String city) throws UnsupportedEncodingException {\n String requestUrl = \"http://api.map.baidu.com/weather/v1/?district_id=222405&data_type=all&ak=WCvM0jwmAi5N3ZmWmTadIUWjSCBzX4vb\"; //GET请求\n StringBuffer buffer = null;\n try {\n // 建立连接\n URL url = new URL(requestUrl);\n HttpURLConnection httpUrlConn = (HttpURLConnection) url.openConnection();\n httpUrlConn.setDoInput(true);\n httpUrlConn.setRequestMethod(\"GET\");\n // 获取输入流\n InputStream inputStream = httpUrlConn.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, \"utf-8\");\n BufferedReader bufferedReader = new BufferedReader(inputStreamReader);\n // 读取返回结果\n buffer = new StringBuffer();\n String str = null;\n while ((str = bufferedReader.readLine()) != null) {\n buffer.append(str);\n }\n\n // 释放资源\n bufferedReader.close();\n inputStreamReader.close();\n inputStream.close();\n httpUrlConn.disconnect();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return buffer.toString();\n }", "@Override\n public String getContentType() {\n return \"text/xml; charset=UTF-8\";\n }", "private String base64Encode(String xmlAsString, String xmlEncoding) throws UnsupportedEncodingException {\r\n String xmlencodingDeclaration = \"<?xml version=\\\"1.0\\\" encoding=\\\"\" + xmlEncoding + \"\\\"?>\";\r\n byte[] xmlAsBytes = (xmlencodingDeclaration + xmlAsString).getBytes(xmlEncoding);\r\n\r\n byte[] xmlAsBase64 = Base64.encodeBase64(xmlAsBytes);\r\n\r\n // base64 is pure ascii\r\n String xmlAsBase64String = new String(xmlAsBase64, \"ascii\");\r\n\r\n return xmlAsBase64String;\r\n }", "String getContentEncoding();", "public String toString() {\r\n\r\n StructuredTextDocument doc = (StructuredTextDocument) getDocument(MimeMediaType.XMLUTF8);\r\n return doc.toString();\r\n }", "public String toXML(int indent) {\n StringBuffer xmlBuf = new StringBuffer();\n //String xml = \"\";\n \n synchronized(xmlBuf) {\n\t\tfor (int i=0;i<indent;i++)\n xmlBuf.append(\"\\t\");\n //xml += \"\\t\";\n\n\t\tString synopsisLengthAsString;\n\n\t\tswitch(length)\n\t\t{\n\t\t\tcase UNDEFINED:\n\t\t\t\tsynopsisLengthAsString = \"undefined\";\n\t\t\t\tbreak;\n\t\t\tcase SHORT:\n\t\t\t\tsynopsisLengthAsString = \"short\";\n\t\t\t\tbreak;\n\t\t\tcase MEDIUM:\n\t\t\t\tsynopsisLengthAsString = \"medium\";\n\t\t\t\tbreak;\n\t\t\tcase LONG:\n\t\t\t\tsynopsisLengthAsString = \"long\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tsynopsisLengthAsString = \"undefined\";\n\t\t\t\tbreak;\n\t\t}\n\n\t\txmlBuf.append(\"<Synopsis\");\n //xml += \"<Synopsis\";\n if (length!=UNDEFINED) {\n xmlBuf.append(\" length=\\\"\");\n xmlBuf.append(synopsisLengthAsString);\n xmlBuf.append(\"\\\"\");\n //xml = xml + \" length=\\\"\"+ synopsisLengthAsString + \"\\\"\";\n }\n if (language!=null) {\n xmlBuf.append(\" xml:lang=\\\"\");\n xmlBuf.append(language);\n xmlBuf.append(\"\\\"\");\n //xml = xml + \" xml:lang=\\\"\" + language + \"\\\"\";\n }\n xmlBuf.append(\">\");\n //xml += \">\";\n\t\txmlBuf.append(\"<![CDATA[\");\n xmlBuf.append(text);\n xmlBuf.append(\"]]>\");\n //xml = xml + \"<![CDATA[\" + text + \"]]>\";\n xmlBuf.append(\"</Synopsis>\");\n //xml += \"</Synopsis>\";\n\n\t\treturn xmlBuf.toString();\n }\n\t}", "protected String getUTF8Str(String str) throws UnsupportedEncodingException {\n return new String(str.getBytes(\"iso-8859-1\"), \"utf-8\");\r\n }", "public String toString() {\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\n\t\tDocument document = XMLUtils.newDocument();\n\t\tdocument.appendChild(toXML(document));\n\t\tXMLUtils.write(bos, document);\n\n\t\treturn bos.toString();\n\t}", "public String generarMuestraDatosXML() {\r\n\r\n\t\tDocument doc = new Document();\r\n\t\tElement datosClearQuest = new Element(\"datosClearQuest\");\r\n\t\tdoc.setRootElement(datosClearQuest);\r\n\t\t\r\n\t\tgenerarConexion(datosClearQuest);\r\n\t\tgenerarLote(datosClearQuest);\r\n\r\n\t\treturn convertXMLToString(doc);\r\n\t}", "public String generarPasajeReglaXML() {\r\n\r\n\t\tDocument doc = new Document();\r\n\t\tElement datosClearQuest = new Element(\"datosClearQuest\");\r\n\t\tdoc.setRootElement(datosClearQuest);\r\n\t\t\r\n\t\tgenerarConexion(datosClearQuest);\r\n\t\tgenerarPasaje(datosClearQuest);\r\n\r\n\t\treturn convertXMLToString(doc);\r\n\t}", "public static String encode(String str) {\n if (str.length() == 0)\n return str;\n StringBuilder sb = new StringBuilder();\n encodeXML(sb, str);\n return sb.toString();\n }", "abstract void toXML(StringBuilder xml, int level);", "public String generatedXmlFile(Document doc){\n\t\tStringWriter sw = new StringWriter();\r\n\t\t\t\ttry {\r\n\t\t\t\t\t\r\n\t\t\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\r\n\t\t\t\t\tTransformer transformer = tf.newTransformer();\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, \"no\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\r\n\t\t\t\t\ttransformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\r\n\r\n\t\t\t\t\ttransformer.transform(new DOMSource(doc), new StreamResult(sw));\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} catch (Exception ex) {\r\n\t\t\t\t\tthrow new RuntimeException(\"Error converting to String\", ex);\r\n\t\t\t\t}\r\n\t\t\t\treturn sw.toString();\r\n\t}", "public String getXML() {\n\t\tString xml = \"\";\n\t\ttry {\n\t\t\tJAXBContext jc = JAXBContext.newInstance( QuotaUserRs.class );\n\t\t\tMarshaller m = jc.createMarshaller();\n\t\t\tStringWriter stringWriter = new StringWriter();\n\t\t\tm.marshal(this, stringWriter);\n\t\t\txml = stringWriter.toString();\n\t\t} catch (JAXBException ex) {}\n\t\treturn xml;\n\t}", "public interface IUtlXml {\n\n /**\n * <p>Escape XML for given string.</p>\n * @param pSource source\n * @return escaped string\n * @throws Exception - an exception\n **/\n String escStr(String pSource) throws Exception;\n\n /**\n * <p>Escape XML for given char.</p>\n * @param pChar char\n * @return escaped string\n * @throws Exception - an exception\n **/\n String escChr(char pChar) throws Exception;\n\n /**\n * <p>Unescape XML for given string.</p>\n * @param pSource source\n * @return unescaped string\n * @throws Exception - an exception\n **/\n String unescStr(String pSource) throws Exception;\n\n /**\n * <p>\n * Unescape XML for given string.\n * </p>\n * @param pEscaped Escaped\n * @return unescaped char\n * @throws Exception - an exception\n **/\n char unescChr(String pEscaped) throws Exception;\n\n /**\n * <p>Read attributes from stream. Start the XML element\n * must be read out.</p>\n * @param pReader reader.\n * @param pRqVs request scoped vars\n * @return attributes map\n * @throws Exception - an exception\n **/\n Map<String, String> readAttrs(Map<String, Object> pRqVs,\n Reader pReader) throws Exception;\n\n\n /**\n * <p>Read stream until start given element e.g. &lt;message.</p>\n * @param pReader reader.\n * @param pElement element\n * @return true if start element is happen, false if end of stream\n * @throws Exception - an exception\n **/\n boolean readUntilStart(Reader pReader,\n String pElement) throws Exception;\n}", "org.apache.xmlbeans.XmlString xgetContent();", "public String toXML(String indent, String namespace) {\n // if ( m_content != null && m_content.length() > 0 ) {\n // StringBuffer result = new StringBuffer( m_content.length() + 16 );\n // result.append( \"<text>\"). append( quote(this.m_content,false) ).append(\"</text>\");\n // return result.toString();\n // } else {\n // return empty_element;\n // }\n if (this.m_content != null) {\n return new String(quote(this.m_content, false));\n } else {\n return new String();\n }\n }", "org.apache.xmlbeans.XmlString xgetDomicilio();", "public static final String XML(final int level,\n final String tag, final String value)\n {\n final StringBuilder buffer = new StringBuilder();\n XML(buffer, level, tag, value);\n return buffer.toString();\n }", "public String writeXML(InvCatalogImpl catalog) throws IOException {\n ByteArrayOutputStream os = new ByteArrayOutputStream(10000);\n writeXML(catalog, os, false);\n return new String(os.toByteArray(), StandardCharsets.UTF_8);\n }", "XmlStringTester(File in) throws Exception {\n\t\txml = Files.readFile(in).toString();\n\t\txml = SchemEditUtils.expandAmpersands(xml);\n\t\tdoc = Dom4jUtils.getXmlDocument(xml);\n\t\tstringWriter = getStringWriter();\n\t}", "abstract protected String getOtherXml();", "public static String xmlCharacters(char[] ch, int start, int length) {\n StringBuffer desc = new StringBuffer(length);\n boolean space = false;\n\n for (int i = start; i < start+length; i++) {\n char a = ch[i];\n\n if (a == '\\n' && i > 0 && ch[i-1] == '\\n') {\n a = '\\n';\n }\n else if (a == '\\n' || a == ' ' || a == '\\t') {\n if (space)\n continue;\n a = ' ';\n space = true;\n }\n else {\n space = false;\n }\n desc.append(a);\n }\n\n if (desc.toString() == null)\n return \"\";\n\n String str = desc.toString().trim();\n\n if (str.equals(\"\") || str == null || str.length() == 0)\n return \"\";\n\n str = \" \" + str;\n\n return str;\n }", "public String printToXml()\n {\n XMLOutputter outputter = new XMLOutputter();\n outputter.setFormat(org.jdom.output.Format.getPrettyFormat());\n return outputter.outputString(this.toXml());\n }", "protected static String guessXMLEncoding(String document){\r\n\t\tString encoding = \"UTF-8\";\r\n\t\t\r\n\t\tClassLoader saved = Thread.currentThread().getContextClassLoader();\r\n\t\ttry {\r\n\t\t\tlog.println(\"GUESSING ENCODING...\");\r\n\t\t\tString parts[] = document.split(\"\\\"\");\r\n\t\t\tfor(int i = 0; i < parts.length; i++){\r\n\t\t\t\tif(parts[i].equalsIgnoreCase(\" encoding=\")){\r\n\t\t\t\t\tencoding = parts[i + 1];\r\n\t\t\t\t\tlog.println(\"ENCODING FOUND TO BE: \" + encoding);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Throwable t){\r\n\t\t\tif (log != null) t.printStackTrace(log);\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tThread.currentThread().setContextClassLoader(saved);\r\n\t\t}\r\n\t\treturn encoding;\r\n\t}", "public org.apache.xmlbeans.XmlString xgetCharacterString()\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(CHARACTERSTRING$1, 0);\n return target;\n }\n }", "public static String convertFromUTF8(String s) {\n String out = null;\n try {\n out = new String(s.getBytes(\"ISO-8859-1\"), \"UTF-8\");\n } catch (Exception e) {\n\n return null;\n }\n return out;\n }", "public static String encode(String unencoded) {\r\n StringBuilder buffer = null;\r\n for (int i = 0; i < unencoded.length(); ++i) {\r\n String encS = XmlWriter.encoding.get(unencoded.charAt(i));\r\n if (encS != null) {\r\n if (buffer == null)\r\n buffer = new StringBuilder(unencoded.substring(0,i));\r\n buffer.append(encS);\r\n } else if (buffer != null)\r\n buffer.append(unencoded.charAt(i));\r\n }\r\n return (buffer == null) ? unencoded : buffer.toString();\r\n }", "org.apache.xmlbeans.XmlString xgetCurp();", "public java.lang.String toString() {\n // call toString() with includeNS true by default and declareNS false\n String xml = this.toString(true, false);\n return xml;\n }", "public String getSysMenuXML(SysMenu sysMenu, String IdPrefix) {\n\t\tStringBuffer sb = new StringBuffer(\"\");\n\t\tsb.append(\"<?xml version=\\\"1.0\\\"?>\");\n\t\tsb.append(\"<tree id=\\\"0\\\">\");\n\t\tsb.append(\"<item text=\\\"²¥³öÐÅÏ¢\\\" id=\\\"root\\\" open=\\\"1\\\" im0=\\\"books_close.gif\\\" im1=\\\"tombs.gif\\\" im2=\\\"tombs.gif\\\" call=\\\"1\\\" select=\\\"1\\\">\");\n\t\tsb.append(\"<userdata name=\\\"id\\\">0</userdata>\");\n\t\tsb.append(\"<userdata name=\\\"type\\\">0</userdata>\");\n\t\tgetSysMenuIdsByParent(sysMenu.getParentId(),sb,IdPrefix);\n\t\tsb.append(\"</item>\");\n\t\tsb.append(\"</tree>\");\n\t\treturn sb.toString();\n\t}", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public org.apache.axis2.databinding.types.soapencoding.String getRequestXml(){\n return localRequestXml;\n }", "public String toString() {\n String text = xmlNode.getText();\n\n return (text != null) ? text.trim() : \"\";\n }", "@GET\n @Produces(MediaType.TEXT_XML)\n public String sayXMLHello() {\n return \"<?xml version=\\\"1.0\\\"?>\" + \"<hello> Hello Jersey\" + \"</hello>\";\n }", "private static String covertDocumentToString(Document document) throws Exception {\n\t\tjava.io.StringWriter sw = new java.io.StringWriter();\n\t\ttry {\n\t\t\tDOMSource domSource = new DOMSource(document);\n\t\t\tTransformerFactory tf = TransformerFactory.newInstance();\n\t\t\tTransformer transformer = tf.newTransformer();\n\n\t\t\ttransformer.setOutputProperty(OutputKeys.METHOD, \"xml\");\n\t\t\t// transformer.setOutputProperty(OutputKeys.ENCODING,\"ISO-8859-1\");\n\t\t\t// transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"4\");\n\t\t\t// transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n\n\t\t\tStreamResult sr = new StreamResult(sw);\n\t\t\ttransformer.transform(domSource, sr);\n\t\t} catch (TransformerException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn sw.toString();\n\t}", "public static String getXMLInteger(Integer integer) {\n\t\t return DatatypeConverter.printInt(integer);\n\t }", "public static String escapeInvalidXMLCharacters(String str) {\n StringBuffer out = new StringBuffer();\n final int strlen = str.length();\n final String substitute = \"\\uFFFD\";\n int idx = 0;\n while (idx < strlen) {\n final int cpt = str.codePointAt(idx);\n idx += Character.isSupplementaryCodePoint(cpt) ? 2 : 1;\n if ((cpt == 0x9) ||\n (cpt == 0xA) ||\n (cpt == 0xD) ||\n ((cpt >= 0x20) && (cpt <= 0xD7FF)) ||\n ((cpt >= 0xE000) && (cpt <= 0xFFFD)) ||\n ((cpt >= 0x10000) && (cpt <= 0x10FFFF))) {\n out.append(Character.toChars(cpt));\n } else {\n out.append(substitute);\n }\n }\n return out.toString();\n }" ]
[ "0.7316788", "0.7130234", "0.6730626", "0.6730626", "0.6730626", "0.66738105", "0.6342383", "0.62936217", "0.6272805", "0.62514746", "0.61403996", "0.6121174", "0.6120478", "0.6086277", "0.59802204", "0.59732157", "0.5967471", "0.59564734", "0.5944295", "0.5936722", "0.5925462", "0.5921931", "0.59007406", "0.58670473", "0.5865272", "0.5834385", "0.5828519", "0.58135015", "0.5800679", "0.5796543", "0.5783349", "0.57676685", "0.5765868", "0.57415843", "0.5722918", "0.57105464", "0.570582", "0.5678665", "0.5660504", "0.56573266", "0.5655364", "0.5655364", "0.56522775", "0.56490064", "0.5632124", "0.562189", "0.56107056", "0.55869144", "0.5573918", "0.5569825", "0.5568031", "0.5486225", "0.5483497", "0.54802024", "0.54756844", "0.5468432", "0.5460357", "0.544348", "0.540588", "0.5387789", "0.5372875", "0.5370508", "0.5355902", "0.5343102", "0.531237", "0.53109485", "0.5309639", "0.5297605", "0.52952", "0.5292449", "0.5283663", "0.5278631", "0.5276224", "0.5273095", "0.52713335", "0.52711546", "0.5262535", "0.5260954", "0.52605325", "0.5251875", "0.5233523", "0.52265775", "0.5224052", "0.5222326", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.52013856", "0.5190381", "0.5185741", "0.5178888", "0.51776594", "0.5174001" ]
0.7178064
1
/ Beam Direction, mirror position> direction right / > up right \ > down left / > down left \ > up up / > right up \ > left down \ > right down / > left
public static void main(String[] args) { Scanner input; try { input = new Scanner(new File("mirror.in")); PrintWriter output = new PrintWriter("mirror.out"); //Read the input n = input.nextInt(); m = input.nextInt(); mirrors = new char[n][m]; //Read Mirror Positions nxm matrix for (int i = 0; i < n; i++) { String temp = input.next(); for (int j = 0; j < m; j++) { mirrors[i][j] = temp.charAt(j); } } //Get Target Directions //Left & Right boundaries for (int i = 0; i < n; i++) { getReflection(i,0,RIGHT); getReflection(i,m-1,LEFT); } //Top & bottom boundaries for (int i = 0; i < m; i++) { getReflection(0,i,DOWN); getReflection(n-1,i,UP); } //Write output to file output.println(maxReflections); output.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "public static void waltz() {\n //test code written by bokun: self rotation\n leftMotor.setSpeed(ROTATE_SPEED);\n rightMotor.setSpeed(ROTATE_SPEED);\n leftMotor.forward();\n rightMotor.backward();\n }", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "void reverseDirection();", "protected int mirrorDirection(int direction) {\n\t\tif (direction < 4) {\n\t\t\treturn (direction + 2)%4;\n\t\t} else {\n\t\t\treturn (direction + 2)%4 + 4;\n\t\t}\n\t}", "void changeDirection();", "public void changeDirection(){\n\t\tthis.toRight ^= true;\n\t\t\n\t\tif(this.toRight)\n\t\t\tthis.nextElem = (this.currElem + 1) % players.size();\n\t\telse\n\t\t\tthis.nextElem = (this.currElem - 1 + players.size()) % players.size();\n\t}", "public void go_to_reverse_position() {\n stop_hold_arm();\n Pneumatics.get_instance().set_solenoids(false);\n Dispatcher.get_instance().add_job(new JMoveArm(RobotMap.Arm.pot_value_reverse, 0.9, 0.7, 0.7, 0.2, 0.8, false, false));\n hold_arm();\n }", "public void stepForwad() {\n\t\t\t\n\t\t\tswitch(this.direction) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tthis.x = (this.worldWidth + this.x)%this.worldWidth;\n\t\t\tthis.y = (this.worldHeight + this.y)%this.worldHeight;\n\t\t}", "public void mirror() {\n this.mirrored = !this.mirrored;\n }", "public void setDirection(){\n\n if (gameStatus != demoPlay)\n client_sb.i_Button = direct;\n\n TankMoveDelay++;\n StarGun_GSR loc=(StarGun_GSR)client_sb.getGameStateRecord();\n\n if (TankMoveDelay >= 1 &&\n loc.getPlayerX() < StarGun_SB.PLAYER_RIGHT_BORDER &&\n\t loc.getPlayerX() > 0) {\n TankMoveDelay = 0;\n switch (direct) {\n\tcase StarGun_SB.DIRECT_LEFT:\n\t if (TankPos==0)TankPos=iTankAmount-1;\n\t else TankPos--;\n\t\t\t\t break;\n case StarGun_SB.DIRECT_RIGHT:\n\t if (TankPos==iTankAmount-1)TankPos=0;\n\t else TankPos++;\n\t\t\t\t break;\n }\n }\n }", "protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "public void reverseDirection() {\n\t\tdirection *= -1;\n\t\ty += 10;\n\t}", "static void changeDirectionBackwards() {\n\n if(--direction == -1)\n direction = 3;\n }", "public void updateDirectionFace();", "public void fly() {\n double x = getPosition().getX();\n double y = getPosition().getY();\n\n // for turning around\n if (x >= 19 || x == 1) {\n xDirection = xDirection * (-1);\n }\n\n // switcher\n x = x + xDirection;\n y = y + yDirection;\n\n // change position call\n changePosition(x, y);\n\n // for inversing\n if (yDirection == 1) {\n yDirection = -1;\n } else if (yDirection == -1) {\n yDirection = 1;\n }\n }", "public void turnRight() {\r\n setDirection( modulo( myDirection+1, 4 ) );\r\n }", "public void moveForward()\r\n\t{\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading-90))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading-90))*distance;\r\n\t\t}\r\n\t}", "void moveForward();", "public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }", "private void turnAround() {\r\n this.setCurrentDirection(-getCurrentDirection());\r\n }", "public void setDirection() {\n frontLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n backLeft.setDirection(DcMotorSimple.Direction.REVERSE);\n frontRight.setDirection(DcMotorSimple.Direction.FORWARD);\n backRight.setDirection(DcMotorSimple.Direction.FORWARD);\n }", "public void flip() {\n float tx = x1;\n float ty = y1;\n x1 = x2;\n y1 = y2;\n x2 = tx;\n y2 = ty;\n nx = -nx;\n ny = -ny;\n }", "private void wanderingBehavior() {\n\t\tif (moving) {\n\t\t\tupdatePixels(action);\n\t\t\tremainingSteps -= speed;\n\t\t\tif (remainingSteps == 0) {\n\t\t\t\tmoving = false;\n\t\t\t\tcurrentImage = stopAnimation(action);\n\t\t\t\tupdateCoordinate(facing, false);\n\t\t\t}\n\t\t} else if (remainingSteps > 0) {\n\t\t\tremainingSteps -= speed;\n\t\t} else {\n\t\t\trandom = rand.nextInt(100);\n\t\t\tif (Math.abs(random) < 2) {\n\t\t\t\trandom = rand.nextInt(4);\n\t\t\t\t{\n\t\t\t\t\tswitch (random) {\n\t\t\t\t\t\tcase 0:\n\t\t\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\trandom = rand.nextInt(3);\n\t\t\t\t\tremainingSteps = STEP_SIZE * 2;\n\t\t\t\t\tif (random != 0 && validMoveEh(facing) && validWanderEh(facing)) {\n\t\t\t\t\t\tremainingSteps -= STEP_SIZE;\n\t\t\t\t\t\taction = facing;\n\t\t\t\t\t\tcurrentImage = startAnimation(action);\n\t\t\t\t\t\tmoving = true;\n\t\t\t\t\t\tupdateCoordinate(facing, true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public boolean moveForward(){\n \n int[] last = (int[]) this.snake.elementAt(this.snake.size() -1);\n int[] sLast = (int[]) this.snake.elementAt(this.snake.size() -2);\n int[] diff = new int[2];\n int[] diff2 = new int[2];\n \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n \n //left\n if( direction == 1){\n diff2[0]--;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff = diff2; \n }\n \n //down\n }else if(direction == 2){\n \n diff2[1]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n //System.out.println(\"first one: \" + diff[0] + \", \" + diff[1]);\n }\n \n //right\n }else if(direction == 3){\n diff2[0]++;\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n \n //up\n }else if(direction == 4){\n \n diff2[1]--;\n //System.out.println(\"\" + diff[0] + \", \" + diff[1]);\n if(diff2[0] == -1*diff[0] &&diff2[1] == -1*diff[1]){\n diff = new int[]{0,0}; \n }else{\n diff=diff2; \n }\n }else{ \n diff[0] = last[0] - sLast[0];\n diff[1] = last[1] - sLast[1];\n }\n \n int[] newPoint = new int[2];\n newPoint[0] = last[0] + diff[0];\n newPoint[1] = last[1] + diff[1];\n \n //if it hits the snake itself\n boolean hits = false;\n Enumeration enu = this.snake.elements();\n int[] temp = new int[2];\n while(enu.hasMoreElements()){\n temp = (int[]) enu.nextElement();\n if(temp[0] == newPoint[0] && temp[1] == newPoint[1]){\n hits = true; \n }\n }\n if(hits){\n return false; \n }\n //if it hits the wall\n if( newPoint[0] >50 || newPoint[0] <0 || newPoint[1] >50 || newPoint[1] <0){\n return false; \n }else{\n if(newPoint [0] == this.apple[0] && newPoint[1] == this.apple[1]){\n this.snake.add(newPoint);\n this.ateApple();\n }else{\n this.snake.add(newPoint);\n this.snake.remove(0);\n \n \n }\n return true;\n }\n }", "private void moveFaceClockwise(RubiksCube initialState, RubiksFace.RubiksFacePosition position) {\n moveSquare(initialState, position, 1, 1, position, 3, 1);\n moveSquare(initialState, position, 2, 1, position, 3, 2);\n moveSquare(initialState, position, 3, 1, position, 3, 3);\n moveSquare(initialState, position, 3, 2, position, 2, 3);\n moveSquare(initialState, position, 3, 3, position, 1, 3);\n moveSquare(initialState, position, 2, 3, position, 1, 2);\n moveSquare(initialState, position, 1, 3, position, 1, 1);\n moveSquare(initialState, position, 1, 2, position, 2, 1);\n\n // Relative faces to the selected position\n RubiksFace.RubiksFacePosition upEdgeFace;\n RubiksFace.RubiksFacePosition downEdgeFace;\n RubiksFace.RubiksFacePosition leftEdgeFace;\n RubiksFace.RubiksFacePosition rightEdgeFace;\n\n // Registry to store color outside of cube when turning\n RubiksColorReference registry1;\n RubiksColorReference registry2;\n RubiksColorReference registry3;\n\n switch (position) {\n case FRONT:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the up edge\n swapColors(upEdgeFace, 1,3, registry1);\n swapColors(upEdgeFace, 2,3, registry2);\n swapColors(upEdgeFace, 3,3, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,1, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,3, registry3);\n\n // Change the down edge\n swapColors(downEdgeFace, 3,1, registry1);\n swapColors(downEdgeFace, 2,1, registry2);\n swapColors(downEdgeFace, 1,1, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,3, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,1, registry3);\n\n break;\n case LEFT:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n rightEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the up edge\n swapColors(upEdgeFace, 1,3, registry1);\n swapColors(upEdgeFace, 1,2, registry2);\n swapColors(upEdgeFace, 1,1, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,1, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,3, registry3);\n\n // Change the down edge\n swapColors(downEdgeFace, 1,1, registry1);\n swapColors(downEdgeFace, 1,2, registry2);\n swapColors(downEdgeFace, 1,3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,3, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,1, registry3);\n\n break;\n case RIGHT:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the up edge\n swapColors(upEdgeFace, 3,1, registry1);\n swapColors(upEdgeFace, 3,2, registry2);\n swapColors(upEdgeFace, 3,3, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,1, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,3, registry3);\n\n // Change the down edge\n swapColors(downEdgeFace, 3,3, registry1);\n swapColors(downEdgeFace, 3,2, registry2);\n swapColors(downEdgeFace, 3,1, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,1, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,3, registry3);\n\n break;\n case BACK:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the up edge\n swapColors(upEdgeFace, 1,1, registry1);\n swapColors(upEdgeFace, 2,1, registry2);\n swapColors(upEdgeFace, 3,1, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,3, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,1, registry3);\n\n // Change the down edge\n swapColors(downEdgeFace, 3,3, registry1);\n swapColors(downEdgeFace, 2,3, registry2);\n swapColors(downEdgeFace, 1,3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,1, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,3, registry3);\n\n break;\n case UP:\n upEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n downEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n leftEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(1,1));\n registry2 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(2,1));\n registry3 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(3,1));\n\n // Change the down edge\n swapColors(downEdgeFace, 1, 1, registry1);\n swapColors(downEdgeFace, 2, 1, registry2);\n swapColors(downEdgeFace, 3, 1, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 1, 1, registry1);\n swapColors(leftEdgeFace, 2, 1, registry2);\n swapColors(leftEdgeFace, 3, 1, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 1, 1, registry1);\n swapColors(upEdgeFace, 2, 1, registry2);\n swapColors(upEdgeFace, 3, 1, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1, 1, registry1);\n swapColors(rightEdgeFace, 2, 1, registry2);\n swapColors(rightEdgeFace, 3, 1, registry3);\n\n break;\n case DOWN:\n upEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n downEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n leftEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(1,3));\n registry2 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(2,3));\n registry3 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(3,3));\n\n // Change the down edge\n swapColors(downEdgeFace, 1, 3, registry1);\n swapColors(downEdgeFace, 2, 3, registry2);\n swapColors(downEdgeFace, 3, 3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 1, 3, registry1);\n swapColors(leftEdgeFace, 2, 3, registry2);\n swapColors(leftEdgeFace, 3, 3, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 1, 3, registry1);\n swapColors(upEdgeFace, 2, 3, registry2);\n swapColors(upEdgeFace, 3, 3, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1, 3, registry1);\n swapColors(rightEdgeFace, 2, 3, registry2);\n swapColors(rightEdgeFace, 3, 3, registry3);\n\n break;\n }\n }", "public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }", "private void rotate() {\n byte tmp = topEdge;\n topEdge = leftEdge;\n leftEdge = botEdge;\n botEdge = rightEdge;\n rightEdge = tmp;\n tmp = reversedTopEdge;\n reversedTopEdge = reversedLeftEdge;\n reversedLeftEdge = reversedBotEdge;\n reversedBotEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n tmp = ltCorner;\n ltCorner = lbCorner;\n lbCorner = rbCorner;\n rbCorner = rtCorner;\n rtCorner = tmp;\n\n }", "private void rotateRight() {\n robot.leftBack.setPower(TURN_POWER);\n robot.leftFront.setPower(TURN_POWER);\n robot.rightBack.setPower(-TURN_POWER);\n robot.rightFront.setPower(-TURN_POWER);\n }", "public void turnRight()\r\n\t{\r\n\t\theading += 2; //JW\r\n\t\t//Following the camera\r\n\t\t//heading += Math.sin(Math.toRadians(15)); \r\n\t\t//heading += Math.cos(Math.toRadians(15));\r\n\t}", "private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}", "public void flip(){\n this.faceDown = !this.faceDown;\n }", "private void turnClockwise(){\n\t\tswitch(this.facingDirection){\n\t\tcase NORTH:\n\t\t\tfacingDirection = Direction.EAST;\n\t\t\tbreak;\n\t\tcase SOUTH:\n\t\t\tfacingDirection = Direction.WEST;\n\t\t\tbreak;\n\t\tcase WEST:\n\t\t\tfacingDirection = Direction.NORTH;\n\t\t\tbreak;\n\t\tcase EAST:\n\t\t\tfacingDirection = Direction.SOUTH;\n\t\t}\n\t}", "public abstract void setDirection(int dir);", "public void walkDownWall() {\r\n\t\tthis.move();\r\n\t\tthis.turnRight();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.move();\r\n\t\tthis.turnLeft();\r\n\t}", "public void turnLeft() {\r\n setDirection( modulo( myDirection-1, 4 ) );\r\n }", "private void faceBackwards(){\n\t\tturnLeft();\n\t\tturnLeft();\n\t}", "public static void testMirrorVertical()\n {\n Picture caterpillar = new Picture(\"caterpillar.jpg\");\n caterpillar.explore();\n caterpillar.mirrorVertical();\n caterpillar.explore();\n }", "public static void changePosition() {\n int direction;\n int speed;\n int newTopX;\n int newTopY;\n\n for (int i = 0; i < numShapes; ++i) {\n direction = moveDirection[i];\n speed = moveSpeed[i];\n newTopX = xTopLeft[i];\n newTopY = yTopLeft[i];\n\n //the switch uses the direction the speed should be applied to in order to find the new positions\n switch (direction) {\n case 0 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n }\n //upper left 135 degrees\n case 1 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 2 -> {\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n //upper right 45 degrees\n case 3 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 4 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n }\n //bottom right 315 degrees\n case 5 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n case 6 -> {\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n //bottom left 225 degrees\n case 7 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n }\n }\n }", "private void LeftRightRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n\t\t\n\t}", "public void perturbDirection(\r\n\t) {\r\n\t\tmDirection.x += 1e-5*Math.random();\t\t\t\r\n\t\tmDirection.y += 1e-5*Math.random();\r\n\t\tmDirection.z += 1e-5*Math.random();\r\n\t}", "@NotNull\n private Coordinate flipV() {\n angle = -angle;\n Coordinate nextCenterPointCoordinate = new Coordinate(this.centerPointCoordinate.getXCoordinate(),\n this.centerPointCoordinate.getYCoordinate() + (Constants.BULLET_SPEED * Math.sin(Math.toRadians(90 - angle))));\n return nextCenterPointCoordinate;\n }", "private float reverseDirection(float dir) {\n if (dir < Math.PI) return (float) (dir+Math.PI);\n else return (float) (dir-Math.PI);\n }", "private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}", "public void reverseDirection(Position ep) throws InvalidPositionException;", "private void lookAt(Bot bot) {\n\t\t// http://www.gamefromscratch.com/post/2012/11/18/GameDev-math-recipes-Rotating-to-face-a-point.aspx\n\t\tdesiredDirection = Math.atan2(bot.getY() - sens.getYPos(), bot.getX() - sens.getXPos()) * (180 / Math.PI);\n\t\tfixDirections();\n\t}", "@Override\n public void loop() {\n\n //double armRot = robot.Pivot.getPosition();\n\n double deadzone = 0.2;\n\n double trnSpdMod = 0.5;\n\n float xValueRight = gamepad1.right_stick_x;\n float yValueLeft = -gamepad1.left_stick_y;\n\n xValueRight = Range.clip(xValueRight, -1, 1);\n yValueLeft = Range.clip(yValueLeft, -1, 1);\n\n // Pressing \"A\" opens and closes the claw\n if (gamepad1.a) {\n\n if (robot.Claw.getPosition() < 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(1);}\n else if (robot.Claw.getPosition() > 0.7)\n while(gamepad1.a){\n robot.Claw.setPosition(0.4);}\n else\n while(gamepad1.a)\n robot.Claw.setPosition(1);\n }\n\n // Pressing \"B\" changes the wrist position\n if (gamepad1.b) {\n\n if (robot.Wrist.getPosition() == 1)\n while(gamepad1.b)\n robot.Wrist.setPosition(0.5);\n else if (robot.Wrist.getPosition() == 0.5)\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n else\n while(gamepad1.b)\n robot.Wrist.setPosition(1);\n }\n\n // Turn left/right, overrides forward/back\n if (Math.abs(xValueRight) > deadzone) {\n\n robot.FL.setPower(xValueRight * trnSpdMod);\n robot.FR.setPower(-xValueRight * trnSpdMod);\n robot.BL.setPower(xValueRight * trnSpdMod);\n robot.BR.setPower(-xValueRight * trnSpdMod);\n\n\n } else {//Forward/Back On Solely Left Stick\n if (Math.abs(yValueLeft) > deadzone) {\n robot.FL.setPower(yValueLeft);\n robot.FR.setPower(yValueLeft);\n robot.BL.setPower(yValueLeft);\n robot.BR.setPower(yValueLeft);\n }\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n\n telemetry.addData(\"Drive Encoder Ticks\", robot.FL.getCurrentPosition());\n telemetry.addData(\"Winch Encoder Ticks\", robot.Winch.getCurrentPosition());\n telemetry.addData(\"ColorArm Position\", robot.ColorArm.getPosition());\n telemetry.addData(\"Wrist Position\", robot.Wrist.getPosition());\n telemetry.addData(\"Claw Position\", robot.Claw.getPosition());\n telemetry.addData(\"Grip Position\", robot.Grip.getPosition());\n telemetry.addData(\"Color Sensor Data Red\", robot.Color.red());\n telemetry.addData(\"Color Sensor Data Blue\", robot.Color.blue());\n\n /*\n\n // This is used for an Omniwheel base\n\n // Group a is Front Left and Rear Right, Group b is Front Right and Rear Left\n float a;\n float b;\n float turnPower;\n if(!gamepad1.x) {\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n\n a = Range.clip(yValueLeft + xValueLeft, -1, 1);\n b = Range.clip(yValueLeft - xValueLeft, -1, 1);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n\n } else {\n\n if (Math.abs(xValueRight) <= deadzone && Math.abs(yValueRight) <= deadzone) {\n\n // And is used here because both the y and x values of the right stick should be less than the deadzone\n a = Range.clip(yValueLeft + xValueLeft, -0.6f, 0.6f);\n b = Range.clip(yValueLeft - xValueLeft, -0.6f, 0.6f);\n\n\n robot.FL.setPower(a);\n robot.FR.setPower(b);\n robot.BL.setPower(b);\n robot.BR.setPower(a);\n\n telemetry.addData(\"a\", \"%.2f\", a);\n telemetry.addData(\"b\", \"%.2f\", b);\n\n } else if (Math.abs(xValueRight) > deadzone || Math.abs(yValueRight) > deadzone) {\n\n // Or is used here because only one of the y and x values of the right stick needs to be greater than the deadzone\n turnPower = Range.clip(xValueRight, -1, 1);\n\n robot.FL.setPower(-turnPower);\n robot.FR.setPower(turnPower);\n robot.BL.setPower(-turnPower);\n robot.BR.setPower(turnPower);\n\n } else {\n\n robot.FL.setPower(0);\n robot.FR.setPower(0);\n robot.BL.setPower(0);\n robot.BR.setPower(0);\n }\n }\n\n\n if (gamepad1.dpad_up) {\n\n robot.Swing.setPower(.6);\n\n } else if (gamepad1.dpad_down) {\n\n robot.Swing.setPower(-.6);\n\n } else {\n\n robot.Swing.setPower(0);\n }\n\n if(gamepad1.a){\n\n robot.Claw.setPosition(.4);\n\n } else if(gamepad1.b){\n\n robot.Claw.setPosition(0);\n }\n\n if(gamepad1.left_bumper) {\n\n robot.Pivot.setPosition(armRot+0.0005);\n\n } else if(gamepad1.right_bumper) {\n\n robot.Pivot.setPosition(armRot-0.0005);\n\n } else{\n\n robot.Pivot.setPosition(armRot);\n }\n\n telemetry.addData(\"position\", position);\n\n */\n\n /*\n * Code to run ONCE after the driver hits STOP\n */\n }", "public Drivetrain(){\r\n LeftSlave.follow(LeftMaster);\r\n RightSlave.follow(RightMaster);\r\n\r\n RightMaster.setInverted(true);\r\n LeftMaster.setInverted(true);\r\n\r\n gyro.reset();\r\n}", "private void mirror() {\n if (mirrorPanel.isDirectionVertical()) {\n drawingPad.getSelectedItems().onMirrorVertical();\n } else if (mirrorPanel.isDirectionHorizontal()) {\n drawingPad.getSelectedItems().onMirrorHorizontal();\n } else if (mirrorPanel.isDirectionDegree()) {\n drawingPad.getSelectedItems().onMirrorRadian(mirrorPanel.getRadian());\n } else\n throw new IllegalStateException(\"ToolMirror::mirror() Unknown mirror method.\");\n \n // Finalize the mirror and recalculate.\n drawingPad.getSelectedItems().finalizeMovement();\n drawingPad.getSelectedItems().calculate(fptUserCalculated);\n drawingPad.repaint();\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public void loopThroughEdge()\n {\n int margin = 2;\n\n if (getX() < margin) //left side\n { \n setLocation(getWorld().getWidth()+ margin, getY());\n }\n else if (getX() > getWorld().getWidth() - margin) //right side\n {\n setLocation(margin, getY());\n }\n\n if (getY() < margin) //top side\n { \n setLocation(getX(), getWorld().getHeight() - margin);\n }\n else if(getY() > getWorld().getHeight() - margin) //bottom side\n { \n setLocation(getX(), margin);\n }\n }", "private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }", "private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }", "public void grip(){\n\t\tthis.motor.backward();\n\t}", "private void think()\n\t{\n\t\tboolean bChange=false;\n\t\tif ((mMoveY+Height)<0)\n\t\t\tbChange=true;\n\t\tif ((mMoveX+Width)<0)\n\t\t\tbChange=true;\n\t\tif ((mMoveY+Height)>500)\n\t\t\tbChange=true;\n\t\tif ((mMoveX+Width)>500)\n\t\t\tbChange=true;\n\t\tif (bChange)\n\t\t{\n\t\t\t//Go in opposite direction\n\t\t\tDirection = Direction+4;\n\t\t\tif (Direction>7)\n\t\t\t\tDirection-=8;\n\t\t\tif (Direction<0)\n\t\t\t\tDirection=0;\n\t\t}\t\t\n\t}", "public static void turnRight() {\n LEFT_MOTOR.forward();\n RIGHT_MOTOR.backward();\n }", "public void turnRight() {\n\t\tthis.setSteeringDirection(getSteeringDirection()+5);\n\t}", "private void moveFaceAntiClockwise(RubiksCube initialState, RubiksFace.RubiksFacePosition position) {\n moveSquare(initialState, position, 1, 1, position, 1, 3);\n moveSquare(initialState, position, 2, 1, position, 1, 2);\n moveSquare(initialState, position, 3, 1, position, 1, 1);\n moveSquare(initialState, position, 3, 2, position, 2, 1);\n moveSquare(initialState, position, 3, 3, position, 3, 1);\n moveSquare(initialState, position, 2, 3, position, 3, 2);\n moveSquare(initialState, position, 1, 3, position, 3, 3);\n moveSquare(initialState, position, 1, 2, position, 2, 3);\n\n // Relative faces to the selected position\n RubiksFace.RubiksFacePosition upEdgeFace;\n RubiksFace.RubiksFacePosition downEdgeFace;\n RubiksFace.RubiksFacePosition leftEdgeFace;\n RubiksFace.RubiksFacePosition rightEdgeFace;\n\n // Registry to store color outside of cube when turning\n RubiksColorReference registry1;\n RubiksColorReference registry2;\n RubiksColorReference registry3;\n\n switch (position) {\n case FRONT:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(1,1));\n registry2 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(1,2));\n registry3 = new RubiksColorReference(getRubiksFace(rightEdgeFace).getSquare(1,3));\n\n // Change the up edge\n swapColors(upEdgeFace, 1,3, registry1);\n swapColors(upEdgeFace, 2,3, registry2);\n swapColors(upEdgeFace, 3,3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,1, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,3, registry3);\n\n // Change the down edge\n swapColors(downEdgeFace, 1,1, registry1);\n swapColors(downEdgeFace, 2,1, registry2);\n swapColors(downEdgeFace, 3,1, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,3, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,1, registry3);\n\n break;\n case LEFT:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n rightEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the down edge\n swapColors(downEdgeFace, 1,3, registry1);\n swapColors(downEdgeFace, 1,2, registry2);\n swapColors(downEdgeFace, 1,1, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,3, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,1, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 1,1, registry1);\n swapColors(upEdgeFace, 1,2, registry2);\n swapColors(upEdgeFace, 1,3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,3, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,1, registry3);\n\n break;\n case RIGHT:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the down edge\n swapColors(downEdgeFace, 3,1, registry1);\n swapColors(downEdgeFace, 3,2, registry2);\n swapColors(downEdgeFace, 3,3, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,3, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,1, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 3,1, registry1);\n swapColors(upEdgeFace, 3,2, registry2);\n swapColors(upEdgeFace, 3,3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,1, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,3, registry3);\n\n break;\n case BACK:\n upEdgeFace = RubiksFace.RubiksFacePosition.UP;\n downEdgeFace = RubiksFace.RubiksFacePosition.DOWN;\n leftEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,2));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the down edge\n swapColors(downEdgeFace, 3,3, registry1);\n swapColors(downEdgeFace, 2,3, registry2);\n swapColors(downEdgeFace, 1,3, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1,3, registry1);\n swapColors(rightEdgeFace, 1,2, registry2);\n swapColors(rightEdgeFace, 1,1, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 1,1, registry1);\n swapColors(upEdgeFace, 2,1, registry2);\n swapColors(upEdgeFace, 3,1, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 3,1, registry1);\n swapColors(leftEdgeFace, 3,2, registry2);\n swapColors(leftEdgeFace, 3,3, registry3);\n\n break;\n case UP:\n upEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n downEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n leftEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(1,1));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(2,1));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,1));\n\n // Change the down edge\n swapColors(downEdgeFace, 1, 1, registry1);\n swapColors(downEdgeFace, 2, 1, registry2);\n swapColors(downEdgeFace, 3, 1, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1, 1, registry1);\n swapColors(rightEdgeFace, 2, 1, registry2);\n swapColors(rightEdgeFace, 3, 1, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 1, 1, registry1);\n swapColors(upEdgeFace, 2, 1, registry2);\n swapColors(upEdgeFace, 3, 1, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 1, 1, registry1);\n swapColors(leftEdgeFace, 2, 1, registry2);\n swapColors(leftEdgeFace, 3, 1, registry3);\n\n break;\n case DOWN:\n upEdgeFace = RubiksFace.RubiksFacePosition.FRONT;\n downEdgeFace = RubiksFace.RubiksFacePosition.BACK;\n leftEdgeFace = RubiksFace.RubiksFacePosition.LEFT;\n rightEdgeFace = RubiksFace.RubiksFacePosition.RIGHT;\n\n // Registry is used to store rows so they don't get overwritten\n registry1 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(1,3));\n registry2 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(2,3));\n registry3 = new RubiksColorReference(getRubiksFace(leftEdgeFace).getSquare(3,3));\n\n // Change the down edge\n swapColors(downEdgeFace, 1, 3, registry1);\n swapColors(downEdgeFace, 2, 3, registry2);\n swapColors(downEdgeFace, 3, 3, registry3);\n\n // Change the right edge\n swapColors(rightEdgeFace, 1, 3, registry1);\n swapColors(rightEdgeFace, 2, 3, registry2);\n swapColors(rightEdgeFace, 3, 3, registry3);\n\n // Change the up edge\n swapColors(upEdgeFace, 1, 3, registry1);\n swapColors(upEdgeFace, 2, 3, registry2);\n swapColors(upEdgeFace, 3, 3, registry3);\n\n // Change the left edge\n swapColors(leftEdgeFace, 1, 3, registry1);\n swapColors(leftEdgeFace, 2, 3, registry2);\n swapColors(leftEdgeFace, 3, 3, registry3);\n\n break;\n }\n }", "abstract void setDirection(double x, double y, double z);", "public float getDirection();", "@Override\npublic void processDirection() {\n\t\n}", "@Override\r\n\tpublic void rotateRight() {\n\t\tsetDirection((this.getDirection() + 1) % 4);\r\n\t}", "abstract public void moveForward();", "public double getDirectionMove();", "public void turnLeft()\r\n\t{\r\n\t\t\r\n\t\theading -= 2; //JW\r\n\t\t//Following the camera:\r\n\t\t\t//heading -= Math.sin(Math.toRadians(15))*distance; \r\n\t\t\t//heading -= Math.cos(Math.toRadians(15))*distance;\r\n\t}", "@SuppressWarnings(\"incomplete-switch\")\n\tprivate void rotatingBehavior() {\n\t\tif (remainingSteps > 0) {\n\t\t\tremainingSteps--;\n\t\t} else {\n\t\t\tswitch (facing) {\n\t\t\t\tcase LEFT:\n\t\t\t\t\tchangeFacing(ACTION.UP);\n\t\t\t\t\tbreak;\n\t\t\t\tcase UP:\n\t\t\t\t\tchangeFacing(ACTION.RIGHT);\n\t\t\t\t\tbreak;\n\t\t\t\tcase RIGHT:\n\t\t\t\t\tchangeFacing(ACTION.DOWN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOWN:\n\t\t\t\t\tchangeFacing(ACTION.LEFT);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tremainingSteps = STEP_SIZE;\n\t\t}\n\t}", "public void up() {dy = -SPEED;}", "private void moveClawDown() {\n\t\tMotor.A.setSpeed(45);\n\t\tMotor.A.rotate(-90);\n\t}", "public void updateDirectionView();", "private void moveOrTurn() {\n\t\t// TEMP: look at center of canvas if out of bounds\n\t\tif (!isInCanvas()) {\n\t\t\tlookAt(sens.getXMax() / 2, sens.getYMax() / 2);\n\t\t}\n\n\t\t// if we're not looking at our desired direction, turn towards. Else, move forward\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t} else {\n\t\t\tmoveForward(2.0);\n\t\t}\n\n\t\t// move in a random direction every 50 roaming ticks\n\t\tif (tickCount % 100 == 0) {\n\t\t\tgoRandomDirection();\n\t\t}\n\t\ttickCount++;\n\t}", "private void turnRight() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n switch (direction) {\n case EAST:\n direction = Position.Direction.SOUTH;\n break;\n case WEST:\n direction = Position.Direction.NORTH;\n break;\n case NORTH:\n direction = Position.Direction.EAST;\n break;\n case SOUTH:\n direction = Position.Direction.WEST;\n break;\n }\n\n currentPosition.setDirection(direction);\n }", "private void turnToDesiredDirection() {\n\n\t\tdouble dir = sens.getDirection();\n\n\t\tif (dir < desiredDirection) {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t}\n\t\t} else {\n\t\t\tif (Math.abs(dir - desiredDirection) < 180) {\n\t\t\t\tdir -= TURNSPEED;\n\t\t\t} else {\n\t\t\t\tdir += TURNSPEED;\n\t\t\t}\n\t\t}\n\t\t\n\t\tsens.setDirection(dir);\n\t\t\n\t}", "public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}", "private void turnOverItself() {\n byte tmp = leftEdge;\n leftEdge = reversedRightEdge;\n reversedRightEdge = tmp;\n\n tmp = rightEdge;\n rightEdge = reversedLeftEdge;\n reversedLeftEdge = tmp;\n\n tmp = topEdge;\n topEdge = reversedTopEdge;\n reversedTopEdge = tmp;\n\n tmp = botEdge;\n botEdge = reversedBotEdge;\n reversedBotEdge = tmp;\n\n tmp = ltCorner;\n ltCorner = rtCorner;\n rtCorner = tmp;\n\n tmp = lbCorner;\n lbCorner = rbCorner;\n rbCorner = tmp;\n }", "public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}", "public void setDirectionMove(double direction);", "private void checkFlipDirection()\n\t{\n\t\tif (currentFloor == 0) //Are we at the bottom?\n\t\t\tcurrentDirection = Direction.UP; //Then we must go up\n\t\tif (currentFloor == (ElevatorSystem.getNumberOfFloors() - 1)) //Are we at the top?\n\t\t\tcurrentDirection = Direction.DOWN; //Then we must go down\n\t}", "public void flipDirection(Direction flip){\n \tswitch (direction){\n\t\t\tcase NORTH: \n\t\t\t\tdirection = Direction.SOUTH;\n\t\t\t\tbreak;\n\t\t\tcase NORTHEAST:\n\t\t\t\tif (flip == Direction.EAST) direction = Direction.NORTHWEST;\n\t\t\t\telse direction = Direction.SOUTHEAST;\n\t\t\t\tbreak;\n\t\t\tcase EAST:\n\t\t\t\tdirection = Direction.WEST;\n\t\t\t\tbreak;\n\t\t\tcase SOUTHEAST:\n\t\t\t\tif (flip == Direction.EAST) direction = Direction.SOUTHWEST;\n\t\t\t\telse direction = Direction.NORTHEAST;\n\t\t\t\tbreak;\n\t\t\tcase SOUTH:\n\t\t\t\tdirection = Direction.NORTH;\n\t\t\t\tbreak;\n\t\t\tcase SOUTHWEST:\n\t\t\t\tif (flip == Direction.WEST) direction = Direction.SOUTHEAST;\n\t\t\t\telse direction = Direction.NORTHWEST;\n\t\t\t\tbreak;\n\t\t\tcase WEST:\n\t\t\t\tdirection = Direction.EAST;\n\t\t\t\tbreak;\n\t\t\tdefault: //NORTHWEST\n\t\t\t\tif (flip == Direction.WEST) direction = Direction.NORTHEAST;\n\t\t\t\telse direction = Direction.SOUTHWEST;\n\t\t\t\tbreak;\n \t\t}\n }", "private void RightLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n \t\t}}\n \t\t\n\t\t\n\t}", "public abstract Vector3 directionFrom(Point3 point);", "private void fly() {\n\t\tint xTarget = 12 *Board.TILE_D;\r\n\t\tint yTarget = 12 * Board.TILE_D;\r\n\t\tif(centerX - xTarget >0) {\r\n\t\t\tcenterX--;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterX++;\r\n\t\t}\r\n\t\tif(centerY - yTarget > 0) {\r\n\t\t\tcenterY --;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcenterY ++;\r\n\t\t}\r\n\t}", "private void updateDesiredDirection() {\n\t\t/* http://www.cs.mcgill.ca/~hsafad/robotics/, accessed 28/02/16 */\n\n\t\t// First, set all seen bots' charge to -VE, all on LEDs to +VE, all off LEDs to 0.0D\n\t\tpopulateCharges();\n\t\t\n\t\t// VARIABLES\n\t\tdouble dirX = 0.0D; // relative dirX and dirY that the bot will need to face\n\t\tdouble dirY = 0.0D; \n\t\tdouble dx = 0.0D;\t// used to calculate each push/pull force, added to dirX, dirY\n\t\tdouble dy = 0.0D;\n\t\tdouble targetCharge = 0.0D;\t// charge of current target bot / led\n\t\tdouble minS = 50;\n\t\tdouble distSq = 0.0D;\t// distance^2 to bot/led\n\t\tdouble safety = 0.0D;\n\t\tdouble norm = 0.0D;\n\t\t\n\t\tfor (int i = 0; i < seenCharges.size(); i++) {\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t// now, update direction depending on charges\n\t\t\t\tif (seenCharges.get(i) instanceof Bot) {\n\t\t\t\t\t\t\n\t\t\t\t\ttargetCharge = ((Bot) seenCharges.get(i)).getCharge();\n\t\t\t\t\tdistSq = sens.getDistanceTo((Bot) seenCharges.get(i));\n\t\t\t\t\tdistSq = distSq * distSq;\n\t\t\t\t\t\n\t\t\t\t\t// calculated forces\n\t\t\t\t\tdx = targetCharge * (((Bot) seenCharges.get(i)).getX() - this.getX()) / distSq;\n\t\t\t\t\tdy = targetCharge * (((Bot) seenCharges.get(i)).getY() - this.getY()) / distSq;\n\n\t\t\t\t\t// add calculated forces to overall direction so far\n\t\t\t\t\tdirX += dx;\n\t\t\t\t\tdirY += dy;\n\t\t\t\t\t\n\t\t\t\t\tsafety = distSq / ((dx*dirX + dy*dirY));\n\t\t\t\t\tif ((safety > 0) && (safety < minS)) { minS = safety; }\n\t\t\t\t\t\t\n\t\t\t\t} else if ((seenCharges.get(i) instanceof LED)) {\n\t\t\t\t\n\t\t\t\t\ttargetCharge = ((LED) seenCharges.get(i)).getCharge();\n\t\t\t\t\t\n\t\t\t\t\tif (targetCharge != 0.0D) { \n\t\t\t\t\t\t\n\t\t\t\t\t\tdistSq = sens.getDistanceTo((LED) seenCharges.get(i));\n\t\t\t\t\t\tdistSq = distSq * distSq;\n\n\t\t\t\t\t\t// calculated forces\n\t\t\t\t\t\tdx = targetCharge * (((LED) seenCharges.get(i)).getTargetX() - this.getX()) / distSq;\n\t\t\t\t\t\tdy = targetCharge * (((LED) seenCharges.get(i)).getTargetY() - this.getY()) / distSq;\n\t\t\t\t\t\t\n\t\t\t\t\t\t// add calculated forces to overall direction so far\n\t\t\t\t\t\tdirX += dx;\n\t\t\t\t\t\tdirY += dy;\n\t\t\t\t\t\t\n\t\t\t\t\t\tsafety = distSq / ((dx*dirX + dy*dirY));\n\t\t\t\t\t\tif ((safety > 0) && (safety < minS)) { minS = safety; }\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (minS < 5) {\n\t\t\t\t\t\t\ttargetCharge *= minS/5;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t\t\t\t\tif (minS > 50) {\n\t\t\t\t\t\t\ttargetCharge *= minS/50;\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\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"ERROR: unknown seenCharges item \"+i);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t// calculate vector normal, apply to dirX, dirY\n\t\tnorm = Math.sqrt(dirX*dirX + dirY*dirY);\n\t\tdirX = dirX / norm;\n\t\tdirY = dirY / norm;\n\t\t\n\t\t// set desired direction if it calculates a number\n\t\tif (dirX == (double) dirX && dirY == (double) dirY) {\n\t\t\tthis.setDesiredDirection(sens.getDirectionTo(dirX + sens.getXPos(), dirY + sens.getYPos()));\n\t\t}\n\t}", "private void goRandomDirection() {\n\t\tdesiredDirection = Math.random() * 360.0;\n\t}", "@Override\r\n\tpublic void turn(float delta) {\n\t\t\r\n\t}", "void flipUp( ) {\n\t\t\t\t\t\tUpCommand . execute ( ) ;\n\n\n\t\t}", "private void RightRightLeft() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<.5) {\n\t\t\t\tRobot.cubebase.clickdown();//pay attention: maybe this is clickup()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\tif (Robot.autotime.get()>=.5&&Robot.autotime.get()<2.5) {\n \t\t\tRobot.cubebase.clickstop();\n\t\t\t\tRobot.cubebase.liftdown();//pay attention: maybe this is liftdown()!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\t\t\t}\n \t\t //about 300cm note: 0.08*2->90*2=180cm 0.08*3->90*3=270cm 270+45=315cm->0.08*3+0.08/2=0.28s\n \t\tif (Robot.autotime.get()>=2.5&&Robot.autotime.get()<3.9) {\n\t\t\t\tRobot.cubebase.stoplift();\n\t\t\t\tRobot.drivebase.run(.53, -.53 );\n\t\t\t}\n \t\tif (Robot.autotime.get()>=3.9&&Robot.autotime.get()<5.9) {\n\t\t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t}\n \t\tif (Robot.autotime.get()>5.9&&Robot.autotime.get()<6.2) {\n\t\t\t\tRobot.pneumatics_drive.close1();\n\t\t\t}\n \t\tif (Robot.autotime.get()>6.2) {\n \t\t\tRobot.cubebase.stopall();\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t}\n\t}", "protected void up() {\n move(positionX, positionY - 1);\n orientation = BattleGrid.RIGHT_ANGLE * 3;\n }", "public void setDirection() {\n\t\tdouble randomDirection = randGen.nextDouble();\n\t\tif (randomDirection < .25) {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .5) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = -1;\n\t\t} else if (randomDirection < .75) {\n\t\t\tthis.xDirection = -1;\n\t\t\tthis.yDirection = 1;\n\t\t} else {\n\t\t\tthis.xDirection = 1;\n\t\t\tthis.yDirection = 1;\n\t\t}\n\t}", "void rotatePiece() {\n boolean temp = this.left;\n boolean temp2 = this.up;\n boolean temp3 = this.right;\n boolean temp4 = this.down;\n this.left = temp4;\n this.up = temp;\n this.right = temp2;\n this.down = temp3;\n }", "@Override\n\tpublic void goForward() {\n\t\t// check side and move the according room and side\n\t\tif (side.equals(\"hRight\")) {\n\t\t\tthis.side = \"bFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"hFront\")) {\n\t\t\tthis.side = \"mFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"bLeft\")) {\n\t\t\tthis.side = \"rLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(4);\n\n\t\t} else if (side.equals(\"rBack\")) {\n\t\t\tthis.side = \"bBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"bBack\")) {\n\t\t\tthis.side = \"hLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else if (side.equals(\"kBack\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"lLeft\")) {\n\t\t\tthis.side = \"kRight\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(6);\n\n\t\t} else if (side.equals(\"lBack\")) {\n\t\t\tthis.side = \"mBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"mFront\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"mBack\")) {\n\t\t\tthis.side = \"hBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else {\n\t\t\trandomRoom();\n\t\t\tSystem.out.println(\"Entered Wormhole!\");\n\t\t\tSystem.out.println(\"Location was chosen at random\");\n\t\t\tSystem.out.println(\"New location is: \" + room + \" room and \" + side.substring(1) + \" side\");\n\n\t\t}\n\t}", "public static void testMirrorHorizontal()\n {\n Picture caterpillar = new Picture(\"caterpillar.jpg\");\n caterpillar.explore();\n caterpillar.mirrorHorizontal();\n caterpillar.explore();\n }", "@Override\r\n\tpublic void rotateLeft() {\n\t\tsetDirection((this.getDirection() + 3) % 4);\r\n\t}", "private void LeftLeftRight() {\n \tRobot.cubebase.stopall();\n \twhile (true) \n \t{\n \t\t//first.take cube down and lift to high\n \t\tif (Robot.autotime.get()<1) {\n\t\t\t\tRobot.drivebase.run(.53, -.53);\n\t\t\t}\n \t\tif (Robot.autotime.get()>=1) {\n\t\t\t\tRobot.drivebase.Stop();\n\t\t\t\tbreak;\n\t\t\t}\n \t\t\n \t\n \t}\n \t}", "@Override\n public void move(){\n setDirectionSpeed(180, 7);\n this.moveTowardsAPoint(target.getCenterX(), target.getCenterY());\n }", "public Direction getCorrectRobotDirection();", "public void reverseSpeeds() {\n\t\txSpeed = -xSpeed;\n\t\tySpeed = -ySpeed;\n\t}", "public void move(TrackerState state) {\n\t\t\n\t\tcurrentPosition[0] = state.devicePos[0];\n\t\tcurrentPosition[1] = state.devicePos[1];\n\t\tcurrentPosition[2] = state.devicePos[2];\n\t\t\n\t\tboolean processMove = false;\n\t\t\n\t\tboolean isWheel = (state.actionType == TrackerState.TYPE_WHEEL);\n\t\tboolean isZoom = (isWheel || state.ctrlModifier);\n\t\t\n\t\tif (isZoom) {\n\t\t\t\n\t\t\tdirection[0] = 0;\n\t\t\tdirection[1] = 0;\n\t\t\t\n\t\t\tif (isWheel) {\n\t\t\t\tdirection[2] = state.wheelClicks * 0.1f;\n\t\t\t\t\n\t\t\t} else if (state.ctrlModifier) {\n\t\t\t\tdirection[2] = (currentPosition[1] - startPosition[1]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdirection[2] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction[2] != 0) {\n\t\t\t\t\n\t\t\t\tdirection[2] *= 16;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tinVector.x = startViewMatrix.m02;\n\t\t\t\tinVector.y = startViewMatrix.m12;\n\t\t\t\tinVector.z = startViewMatrix.m22;\n\t\t\t\tinVector.normalize();\n\t\t\t\tinVector.scale(direction[2]);\n\t\t\t\t\n\t\t\t\tpositionVector.add(inVector);\n\t\t\t\t\n\t\t\t\t// stay above the floor\n\t\t\t\tif (positionVector.y > 0) {\n\t\t\t\t\tdestViewMatrix.set(startViewMatrix);\n\t\t\t\t\tdestViewMatrix.setTranslation(positionVector);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tdirection[0] = -(startPosition[0] - currentPosition[0]);\n\t\t\tdirection[1] = -(currentPosition[1] - startPosition[1]);\n\t\t\tdirection[2] = 0;\n\t\t\t\n\t\t\tfloat Y_Rotation = direction[0];\n\t\t\tfloat X_Rotation = direction[1];\n\t\t\t\n\t\t\tif( ( Y_Rotation != 0 ) || ( X_Rotation != 0 ) ) {\n\t\t\t\t\n\t\t\t\tdouble theta_Y = -Y_Rotation * Math.PI;\n\t\t\t\tdouble theta_X = -X_Rotation * Math.PI;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tpositionVector.x -= centerOfRotation.x;\n\t\t\t\tpositionVector.y -= centerOfRotation.y;\n\t\t\t\tpositionVector.z -= centerOfRotation.z;\n\t\t\t\t\n\t\t\t\tif (theta_Y != 0) {\n\n\t\t\t\t\trot.set(0, 1, 0, (float)theta_Y);\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (theta_X != 0) {\n\t\t\t\t\t\n\t\t\t\t\tvec.set(positionVector);\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tfloat angle = vec.angle(Y_AXIS);\n\t\t\t\t\t\n\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\tif (theta_X > 0) {\n\t\t\t\t\t\t\trightVector.x = startViewMatrix.m00;\n\t\t\t\t\t\t\trightVector.y = startViewMatrix.m10;\n\t\t\t\t\t\t\trightVector.z = startViewMatrix.m20;\n\t\t\t\t\t\t\trightVector.normalize();\n\t\t\t\t\t\t\trot.set(rightVector.x, 0, rightVector.z, (float)theta_X);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trot.set(0, 0, 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((theta_X + angle) < 0) {\n\t\t\t\t\t\t\ttheta_X = -(angle - 0.0001f);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvec.y = 0;\n\t\t\t\t\t\tvec.normalize();\n\t\t\t\t\t\trot.set(vec.z, 0, -vec.x, (float)theta_X);\n\t\t\t\t\t}\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpositionPoint.x = positionVector.x + centerOfRotation.x;\n\t\t\t\tpositionPoint.y = positionVector.y + centerOfRotation.y;\n\t\t\t\tpositionPoint.z = positionVector.z + centerOfRotation.z;\n\t\t\t\t\n\t\t\t\t// don't go below the floor\n\t\t\t\tif (positionPoint.y > 0) {\n\t\t\t\t\t\n\t\t\t\t\tmatrixUtils.lookAt(positionPoint, centerOfRotation, Y_AXIS, destViewMatrix);\n\t\t\t\t\tmatrixUtils.inverse(destViewMatrix, destViewMatrix);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (processMove) {\n\t\t\t\n\t\t\tboolean collisionDetected = \n\t\t\t\tcollisionManager.checkCollision(startViewMatrix, destViewMatrix);\n\t\t\t\n\t\t\tif (!collisionDetected) {\n\t\t\t\tAV3DUtils.toArray(destViewMatrix, array);\n\t\t\t\tChangePropertyTransientCommand cptc = new ChangePropertyTransientCommand(\n\t\t\t\t\tve, \n\t\t\t\t\tEntity.DEFAULT_ENTITY_PROPERTIES, \n\t\t\t\t\tViewpointEntity.VIEW_MATRIX_PROP,\n\t\t\t\t\tarray,\n\t\t\t\t\tnull);\n\t\t\t\tcmdCntl.execute(cptc);\n\t\t\t\tif (statusManager != null) {\n\t\t\t\t\tstatusManager.fireViewMatrixChanged(destViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartPosition[0] = currentPosition[0];\n\t\tstartPosition[1] = currentPosition[1];\n\t\tstartPosition[2] = currentPosition[2];\n\t}", "@Test\n public void shouldPredictByRotatingPreviousMoveInReverseDirection() {\n ReverseRotationStrategy strategy = new ReverseRotationStrategy();\n\n strategy.addHistory(Shape.ROCK, Shape.PAPER);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.ROCK.defeatedBy()));\n\n strategy.addHistory(Shape.ROCK, Shape.ROCK);\n assertTrue(Arrays.equals(strategy.getNextMoves(), Shape.SPOCK.defeatedBy()));\n }", "public void setMirror() {\n\t\tmirror = true;\n\t}", "private void rngDirection() {\r\n Random direction = new Random();\r\n float rngX = (direction.nextFloat() -0.5f) *2;\r\n float rngY = (direction.nextFloat() -0.5f) *2;\r\n\r\n rngX = Float.parseFloat(String.format(java.util.Locale.US, \"%.1f\", rngX));\r\n rngY = Float.parseFloat(String.format(java.util.Locale.US, \"%.1f\", rngY));\r\n\r\n\r\n while(rngX == 0) {\r\n rngX = (direction.nextFloat() -0.5f) *2;\r\n }\r\n\r\n while(rngY == 0) {\r\n rngY = (direction.nextFloat() -0.5f) *2;\r\n }\r\n\r\n setSpeedX(rngX);\r\n setSpeedY(rngY);\r\n }" ]
[ "0.64409256", "0.6379833", "0.6372996", "0.63677144", "0.63238", "0.63182414", "0.62849236", "0.62222195", "0.6190476", "0.6149713", "0.61367494", "0.61102825", "0.6083461", "0.607268", "0.60677046", "0.606335", "0.6061246", "0.6039129", "0.6004498", "0.59818965", "0.5978647", "0.5978147", "0.59766215", "0.5965588", "0.5957806", "0.5944883", "0.59400594", "0.593375", "0.5923814", "0.5912273", "0.5886229", "0.5870758", "0.585986", "0.5853323", "0.58327264", "0.58301663", "0.58238924", "0.5820355", "0.58203375", "0.5803222", "0.57979506", "0.57935905", "0.5789514", "0.57819396", "0.57695323", "0.5748819", "0.5744337", "0.57354707", "0.57295394", "0.5728492", "0.5721586", "0.5719858", "0.5716939", "0.57046986", "0.57032555", "0.56903946", "0.5679485", "0.56787694", "0.56740993", "0.5669883", "0.5665611", "0.56551486", "0.5652273", "0.5649708", "0.564522", "0.5642844", "0.5636017", "0.5633883", "0.56315637", "0.56308997", "0.562947", "0.5628037", "0.5622172", "0.5621241", "0.56137216", "0.5611756", "0.56098807", "0.55908805", "0.5589031", "0.55817693", "0.55731237", "0.557215", "0.5571253", "0.5569157", "0.5569105", "0.55681014", "0.5558672", "0.55572957", "0.5554605", "0.5547222", "0.55469054", "0.55432427", "0.55334556", "0.5529366", "0.552057", "0.5515468", "0.5513396", "0.5509659", "0.5507844", "0.5505194", "0.55048305" ]
0.0
-1
/ Method to compute maximum possible reflections
private static void getReflection(int r, int c, int dir) { int localCount=0; //While Within Bounds while(!(r < 0 || c < 0 || r>=n || c >=m)) { //The Logic to count Reflections localCount ++; //Get the Mirror index int mirrorInd = (mirrors[r][c] == '\\' ? 0 : 1); //Update the reflection direction //for next iteration dir = target[dir][mirrorInd]; //Adjust the Mirror Iteration Index if(dir == RIGHT) c++; else if(dir == LEFT) c--; else if(dir == UP) r--; else r++; } //Update Global Max if(maxReflections < localCount) { maxReflections =localCount; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "final int calculateTypeConstraintMaxDiff(){\n int result=0;\n for(int i=0;i<MaximumNumberOfVerticesOfTypeZ.length;i++){\n result+=MaximumNumberOfVerticesOfTypeZ[i];\n }\n return result;\n }", "public Factura getMaxNumeroFactura();", "@objid (\"7bba25c1-4310-45fa-b2ce-d6cdc992be70\")\n String getMultiplicityMax();", "public long getPropertyBalanceMax();", "private String getMajorityClass(List<Instance> instances) {\r\n\r\n\t\tint[] counters = countClasses(instances);\r\n\r\n\t\tint max = 0;\r\n\t\tint index = 0;\r\n\t\tfor(int i = 0;i<counters.length;++i){\r\n\t\t\tif(max<counters[i]){\r\n\t\t\t\tmax=counters[i];\r\n\t\t\t\tindex = i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn classes.get(index);\r\n\t}", "int getValueMaxRessource(TypeRessource type);", "private int computeMaxDependencyCount (Grid grid)\n {\n int maxDependencyCount = 0;\n for (int y = 0; y < grid.getHeight (); y++)\n {\n for (int x = 0; x < grid.getWidth (); x++)\n {\n Cell cell = grid.getCell (x, y);\n if (cell != null)\n {\n int dependencyCount = cell.getDependencyCount ();\n maxDependencyCount = Math.max (maxDependencyCount, dependencyCount);\n }\n }\n }\n return maxDependencyCount;\n }", "public static native int OpenMM_AmoebaMultipoleForce_getMutualInducedMaxIterations(PointerByReference target);", "public M csmiCertifyTypeMax(Object max){this.put(\"csmiCertifyTypeMax\", max);return this;}", "private Set<StableControlConfiguration> getMaximumWRT(int N, int type, Set<StableControlConfiguration> CEi, Set<CArgument> subTarget) {\n\t\t Controlling_Power_Solver cpSolver = new Controlling_Power_Solver(this.PCAF);\n\t\t Set<StableControlConfiguration> result = new HashSet<StableControlConfiguration>();\n\t\t double max = -1;\n\t\t for(StableControlConfiguration ce : CEi) {\n\t\t\t double current = -1;\n\t\t\t if(type == ControllabilityEncoder.CREDULOUS) {\n\t\t\t\t current = cpSolver.getCredulousControllingPower(N, ce, subTarget);\n\t\t\t } else {\n\t\t\t\t current = cpSolver.getSkepticalControllingPower(N, ce, subTarget);\n\t\t\t }\n\t\t\t if(current > max) {\n\t\t\t\t result.clear();\n\t\t\t\t result.add(ce);\n\t\t\t\t max = current;\n\t\t\t } else if(current == max) {\n\t\t\t\t result.add(ce);\n\t\t\t }\n\t\t }\n\t\t return result;\n\t }", "public float getMaxAlturaCM();", "public abstract double[] getMaximumValues(List<AbstractObjective> objectives, List<? extends Solution<?>> solutions) ;", "private static <T extends RealType<T>> double typeMax(\n\t\tfinal RandomAccessibleInterval<T> image)\n\t{\n\t\treturn image.randomAccess().get().getMaxValue();\n\t}", "int maxDepth();", "int getMaximalIterationCount();", "public double calcularAlvoMaximo() {\r\n\t\treturn calcularFrequenciaMaxima()*0.85;\r\n\t}", "private static final EvaluationAccessor max(EvaluationAccessor operand, EvaluationAccessor[] arguments) {\r\n EvaluationAccessor result = null;\r\n Value oVal = operand.getValue();\r\n if (oVal instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) oVal;\r\n IDatatype contType = ((Container) cont.getType()).getContainedType();\r\n int contSize = cont.getElementSize();\r\n \r\n if (contSize > 0) {\r\n Value rValue = null;\r\n \r\n // Determine max for number containers \r\n if (contType.isAssignableFrom(RealType.TYPE)) {\r\n // Handle max for Reals\r\n double max = (Double) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n double tmp = (Double) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n } else if (contType.isAssignableFrom(IntegerType.TYPE)) {\r\n // Handle max for Reals\r\n int max = (Integer) cont.getElement(0).getValue();\r\n for (int i = 1; i < contSize; i++) {\r\n int tmp = (Integer) cont.getElement(i).getValue();\r\n if (tmp > max) {\r\n max = tmp;\r\n }\r\n }\r\n \r\n // Create max value\r\n try {\r\n rValue = ValueFactory.createValue(contType, max);\r\n } catch (ValueDoesNotMatchTypeException e) {\r\n EASyLoggerFactory.INSTANCE.getLogger(GenericNumberOperations.class, Bundle.ID)\r\n .debug(e.getMessage());\r\n }\r\n }\r\n \r\n if (null != rValue) {\r\n result = ConstantAccessor.POOL.getInstance().bind(rValue, operand.getContext());\r\n }\r\n }\r\n }\r\n return result;\r\n }", "@Override\n\tpublic int getMaxIterations() {\n\t\treturn maxIterations;\n\t}", "public void test1_3Reflections() throws Exception {\n getReverb(0);\n try {\n// FIXME:uncomment actual test when early reflections are implemented in the reverb\n// short level = mReverb.getReflectionsLevel();\n// level = (short)((level == 0) ? -1000 : 0);\n// mReverb.setReflectionsLevel(level);\n// short level2 = mReverb.getReflectionsLevel();\n// assertTrue(\"got incorrect reflections level\",\n// (level2 > (level - MILLIBEL_TOLERANCE)) &&\n// (level2 < (level + MILLIBEL_TOLERANCE)));\n//\n// int time = mReverb.getReflectionsDelay();\n// time = (time == 20) ? 0 : 20;\n// mReverb.setReflectionsDelay(time);\n// int time2 = mReverb.getReflectionsDelay();\n// assertTrue(\"got incorrect reflections delay\",\n// ((float)time2 > (float)(time / DELAY_TOLERANCE)) &&\n// ((float)time2 < (float)(time * DELAY_TOLERANCE)));\n mReverb.setReflectionsLevel((short) 0);\n assertEquals(\"got incorrect reverb delay\",\n mReverb.getReflectionsLevel(), (short) 0);\n mReverb.setReflectionsDelay(0);\n assertEquals(\"got incorrect reverb delay\",\n mReverb.getReflectionsDelay(), 0);\n\n } catch (IllegalArgumentException e) {\n fail(\"Bad parameter value\");\n } catch (UnsupportedOperationException e) {\n fail(\"get parameter() rejected\");\n } catch (IllegalStateException e) {\n fail(\"get parameter() called in wrong state\");\n } finally {\n releaseReverb();\n }\n }", "Integer getMaxSuccessiveDeltaCycles();", "int getMax_depth();", "int getMaxInstances();", "public abstract int getMaxIntermediateSize();", "public double[] getMax(){\n double[] max = new double[3];\n for (Triangle i : triangles) {\n double[] tempmax = i.maxCor();\n max[0] = Math.max( max[0], tempmax[0]);\n max[1] = Math.max( max[1], tempmax[1]);\n max[2] = Math.max( max[2], tempmax[2]);\n }\n return max;\n }", "public double max() {\n/* 323 */ Preconditions.checkState((this.count != 0L));\n/* 324 */ return this.max;\n/* */ }", "@Override\r\n\tpublic int getMaxDepth() {\r\n\t\tint profundidad = 1;// Profundidad inicial, como es la raiz es 1\r\n\t\treturn getMaxDepthRec(raiz, profundidad, profundidad);\r\n\t}", "public float maxSpeed();", "public int maxDistinction() {\n\n int distinctTiles = this.distincts().size(); // # of unique Scrabble tiles\n int maxDistinction = distinctTiles; // maximum # of distinct possibilities\n\n // If there are wildcards...\n int wilds = this.count(WILDCARD);\n if (wilds > 0) {\n int uniqueHardLetters = distinctTiles - 1; // # of unique letters (w/o wildcards)\n maxDistinction = uniqueHardLetters + wilds; // REVISED MAXIMUM DISTINCTION\n }\n\n return maxDistinction;\n }", "public Contenedor getContenedorMaximo()\n {\n Contenedor maxCont = null;\n int maxPeso ;\n\n maxPeso = 0;\n\n for (Contenedor c : this.losContenedores){\n if (c.peso > maxPeso)\n {\n maxPeso = c.peso;\n maxCont = c;\n }\n }\n\n return maxCont;\n }", "public double getMaximumDouble() {\n/* 255 */ return this.max;\n/* */ }", "protected void computeOWLOntologyObjectPropertyUsage(){\n\t\tfor(OWLOntology ont : super.getOntologies()){\n\t\t\tfor(OWLObjectProperty prop : ont.getObjectPropertiesInSignature()){\n\t\t\t\t\n\t\t\t\tint objectPropUsageInt = getOWLObjectPropertyUsage(prop);\n\t\t\t\t\n\t\t\t\tobjectPropertyUsageMap.put(prop, objectPropUsageInt);\n\t\t\n\t\t\t\t//find the class with the maximum usage \n\t\t\t\t//In these exclude the owl:thing class because\n\t\t\t\t//this information is redundant \n\t\t\t\tif (!prop.isTopEntity()) {\n\t\t\t\t\tif(max < objectPropUsageInt){\n\t\t\t\t\t\tmax = objectPropUsageInt;\n\t\t\t\t\t\tpropertyWithMaxUsage = prop;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public float maxTorque();", "E maxVal();", "double match(CodeBlock elemento,MatchingProfile perfil) {\n double max = 0,diff = 0,uno,dos,val;\n int i;\n for (i = 43;--i >= 0;) {\n //for (i = 0;i < 43;++i) {\n val = perfil.atributos[i];\n uno = atributos[i]*val;\n dos = elemento.atributos[i]*val;\n if (uno>dos) {\n max += uno;\n diff += (uno-dos);\n }\n else {\n max += dos;\n diff += (dos-uno);\n }\n //System.out.println(campos[i]+\" \"+(maxact-diffact)+\"/\"+maxact);\n \n }\n if (max != 0)\n max = (max-diff)/max;\n //System.out.println(\"EMPAREJADO CON VALOR \"+match);\n //ArrayList<SCoincidencia> a = new ArrayList<SCoincidencia>();\n //a.add(new SCoincidencia(this,elemento,max,0));\n //return a;\n return max;\n //System.out.println(\"BLOQUE!\");\n }", "private double[] getMaxAnnotations() {\n \n double[] maxAnnoNo = new double[]{0, 0, 0};\n for (int i = 0; i < 3; ++i) {\n for (String term : annotations.getColumnIdentifiers()) {\n if (this.ontologyFromGOTerm.containsKey(term) && this.ontologyFromGOTerm.get(term) == i) {\n maxAnnoNo[i] = Math.max(maxAnnoNo[i], annotations.countNumberOfGenesForGOTerm(term));\n }\n }\n }\n return maxAnnoNo;\n }", "float zMax();", "public K max();", "int getMaxConcurrent();", "@Test\n public void getMaxReach() {\n assertEquals(\"Max reach for G should be 3\",\n 3,\n Shape.G.getMaxReach());\n assertEquals(\"Max reach for J should be 4\",\n 4,\n Shape.J.getMaxReach());\n assertEquals(\"Max reach for I should be 2\",\n 2,\n Shape.I.getMaxReach());\n\n // check different rotations\n assertEquals(\"Max vert reach for G facing south should be 2\",\n 2,\n Shape.G.getMaxReach(Direction.SOUTH, true));\n assertEquals(\"Max hori reach for J facing north should be 4\",\n 4,\n Shape.J.getMaxReach(Direction.NORTH, false));\n assertEquals(\"Max vert reach for I facing west should be 2\",\n 2,\n Shape.I.getMaxReach(Direction.WEST, true));\n }", "Integer getMaximumResults();", "public E calculateMaximum() {\n return FindMaximum.calculateMaximum(x , y , z);\n }", "@Override\n public Object build() {\n MaxAggregationBuilder max = AggregationBuilders.max(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n max.field((String)param.getValue());\n }\n }\n\n return max;\n }", "public void setMaxAlturaCM(float max);", "String getMax_res();", "private Submodel recursiveMaxProduct() throws AlgorithmException\n {\n _submodels.clear();\n\n _runMaxProduct();\n Submodel invariant = fixUniqueVars();\n invariant.setInvariant(true);\n invariant.setNumExplainedKO(countKO(invariant));\n \n logger.info(\"added invariant submodel with \"\n + invariant.size() + \" vars\");\n \n // annotate invariant edges in the interaction graph\n _fg.updateEdgeAnnotation();\n \n // first fix degenerate sign variables\n int x=0;\n x += recursivelyFixVars(_fg.getSigns());\n \n // now fix any other non-sign variables that are degenerate\n x += recursivelyFixVars(_fg.getDirs());\n\n logger.info(\"Called max product method \" + x + \" times\");\n\n logger.info(\"### Generated \" + _submodels.size()\n + \" submodels + 1 invariant model\");\n \n // update the edge annotations now that all variables are fixed.\n _fg.updateEdgeAnnotation();\n\n return invariant;\n }", "abstract int calculateMaximumSize(int axis);", "int getMaximum();", "static int maxSum()\n {\n // Find array sum and i*arr[i] with no rotation\n int arrSum = 0; // Stores sum of arr[i]\n int currVal = 0; // Stores sum of i*arr[i]\n for (int i=0; i<arr.length; i++)\n {\n arrSum = arrSum + arr[i];\n currVal = currVal+(i*arr[i]);\n }\n\n // Initialize result as 0 rotation sum\n int maxVal = currVal;\n\n // Try all rotations one by one and find\n // the maximum rotation sum.\n for (int j=1; j<arr.length; j++)\n {\n currVal = currVal + arrSum-arr.length*arr[arr.length-j];\n if (currVal > maxVal)\n maxVal = currVal;\n }\n\n // Return result\n return maxVal;\n }", "ReadOnlyDoubleProperty maximumProperty();", "double getMax();", "double getMax();", "public static void main(String[] args) {\n int maxSolutions = 0;\r\n int bestPerimeter = 0;\r\n int[] perimeters = new int[1000];\r\n for (int a = 1; a <= 1000; a++) {\r\n for (int b = 1; b <= a; b++) {\r\n double c = Math.sqrt(a*a + b*b);\r\n if (c != (int)c) continue;\r\n int perimeter = a + b + (int)c;\r\n if (perimeter > 1000) break;\r\n perimeters[perimeter - 1]++;\r\n if (perimeters[perimeter - 1] > maxSolutions) {\r\n maxSolutions++;\r\n bestPerimeter = perimeter;\r\n }\r\n }\r\n }\r\n System.out.println(\"Best perimeter: \" + bestPerimeter);\r\n System.out.println(\"Solutions: \" + maxSolutions);\r\n }", "public static void main(String[] args) {\n\t\tSolution s = new Solution();\n\t\t// System.out.println(s.maxRecSize(new int[][] { { 1, 0, 1, 1 },\n\t\t// { 1, 1, 1, 1 }, { 1, 1, 1, 0 } }));\n\t\tSystem.out.println(s.maxRecSize(new int[][] { { 1, 1, 1, 1 },\n\t\t\t\t{ 1, 0, 1, 1 }, { 1, 1, 1, 1 }, { 0, 0, 0, 0 } }));\n\t}", "int getTemporaryMaxDepth();", "public int calcMaxLife() {\n\t\treturn 10;\r\n\t}", "int max();", "public abstract int getMaxChildren();", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner input;\r\n\t\ttry {\r\n\t\t\tinput = new Scanner(new File(\"mirror.in\"));\r\n\t\t\tPrintWriter output = new PrintWriter(\"mirror.out\");\r\n\t\t\t//Read the input\r\n\t\t\tn = input.nextInt();\r\n\t\t\tm = input.nextInt();\r\n\t\t\tmirrors = new char[n][m];\r\n\t\t\t//Read Mirror Positions nxm matrix\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tString temp = input.next();\r\n\t\t\t\tfor (int j = 0; j < m; j++) {\r\n\t\t\t\t\tmirrors[i][j] = temp.charAt(j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//Get Target Directions\r\n\t\t\t//Left & Right boundaries\r\n\t\t\tfor (int i = 0; i < n; i++) {\r\n\t\t\t\tgetReflection(i,0,RIGHT);\r\n\t\t\t\tgetReflection(i,m-1,LEFT);\r\n\t\t\t}\r\n\t\t\t//Top & bottom boundaries\r\n\t\t\tfor (int i = 0; i < m; i++) {\r\n\t\t\t\tgetReflection(0,i,DOWN);\r\n\t\t\t\tgetReflection(n-1,i,UP);\r\n\t\t\t}\r\n\t\t\t//Write output to file\r\n\t\t\toutput.println(maxReflections);\r\n\t\t\toutput.close();\r\n\t\t\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public int maxLocals();", "public static Bitmap applyReflection(Bitmap originalImage) {\n final int reflectionGap = 4;\n // get image size\n int width = originalImage.getWidth();\n int height = originalImage.getHeight();\n\n // this will not scale but will flip on the Y axis\n\n Matrix matrix = new Matrix();\n matrix.preScale(1, -1);\n\n // create a Bitmap with the flip matrix applied to it.\n // we only want the bottom half of the image\n Bitmap reflectionImage = Bitmap.createBitmap(originalImage, 0, height/2, width, height/2, matrix, false);\n\n // create a new bitmap with same width but taller to fit reflection\n Bitmap bitmapWithReflection = Bitmap.createBitmap(width, (height + height/2), Bitmap.Config.ARGB_8888);\n\n // create a new Canvas with the bitmap that's big enough for\n // the image plus gap plus reflection\n Canvas canvas = new Canvas(bitmapWithReflection);\n // draw in the original image\n canvas.drawBitmap(originalImage, 0, 0, null);\n // draw in the gap\n Paint defaultPaint = new Paint();\n canvas.drawRect(0, height, width, height + reflectionGap, defaultPaint);\n // draw in the reflection\n canvas.drawBitmap(reflectionImage,0, height + reflectionGap, null);\n\n // create a shader that is a linear gradient that covers the reflection\n Paint paint = new Paint();\n LinearGradient shader = new LinearGradient(0, originalImage.getHeight(), 0,\n bitmapWithReflection.getHeight() + reflectionGap, 0x70ffffff, 0x00ffffff,\n Shader.TileMode.CLAMP);\n // set the paint to use this shader (linear gradient)\n paint.setShader(shader);\n // set the Transfer mode to be porter duff and destination in\n paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));\n // draw a rectangle using the paint with our linear gradient\n canvas.drawRect(0, height, width, bitmapWithReflection.getHeight() + reflectionGap, paint);\n\n return bitmapWithReflection;\n }", "int maxargs()\n {\n\t return Math.max(head.maxargs(),tail.maxargs());\n }", "public int getMaxGenerations() { return maxGenerations; }", "private double getMaxNumber(ArrayList<Double> provinceValues)\n {\n Double max = 0.0;\n\n for (Double type : provinceValues)\n {\n if (type > max)\n {\n max = type;\n }\n }\n return max;\n }", "@JSProperty(\"softMax\")\n double getSoftMax();", "public int donnePoidsMax() { return this.poidsMax; }", "@In Integer max();", "@In Integer max();", "@Override public short getComplexity() {\n return 0;\n }", "double getMaxTfCapacity();", "public abstract int getMaximumValue();", "public static void gh_compute_ref_max( Int32Vect2 ref_vector) {\n\t\t if (ref_vector.x == 0 && ref_vector.y == 0) {\n\t\t\t gh_max_accel_ref.x = gh_max_accel_ref.y = (int) (gh_max_accel * 0.707);\n\t\t\t gh_max_speed_ref.x = gh_max_speed_ref.y = (int) (gh_max_speed_int * 0.707);\n\t\t }\n\t\t else {\n\t\t\t gh_compute_route_ref(ref_vector);\n\t\t\t /* Compute maximum acceleration*/\n\t\t\t gh_max_accel_ref.x = INT_MULT_RSHIFT(gh_max_accel, c_route_ref, INT32_TRIG_FRAC);\n\t\t\t gh_max_accel_ref.y = INT_MULT_RSHIFT(gh_max_accel, s_route_ref, INT32_TRIG_FRAC);\n\t\t\t /* Compute maximum reference x/y velocity from absolute max_speed */\n\t\t\t gh_max_speed_ref.x = INT_MULT_RSHIFT(gh_max_speed_int, c_route_ref, INT32_TRIG_FRAC);\n\t\t\t gh_max_speed_ref.y = INT_MULT_RSHIFT(gh_max_speed_int, s_route_ref, INT32_TRIG_FRAC);\n\t\t }\n\t\t /* restore gh_speed_ref range (Q14.17) */\n\t\t INT32_VECT2_LSHIFT(gh_max_speed_ref, gh_max_speed_ref, (GH_SPEED_REF_FRAC - GH_MAX_SPEED_REF_FRAC));\n\t }", "public double MaxfieldValues() {\n\t\t//System.out.println(\"PULSE: \" + this.beat.pulse());\n\t\tif(this.beat.pulse() > 3.0 && this.beat.pulse() < 4.0 && this.type == \"theta\")\n\t\t\treturn 1.002 + (0.01* Math.random() - 0.005);\n\t\telse if(this.beat.pulse() > 4.5 && this.beat.pulse() < 5.5 && this.type == \"theta\")\n\t\t\treturn 0.999 + (0.01* Math.random() - 0.005);\n\t\telse if(this.beat.pulse() > 4.0 && this.beat.pulse() < 4.5 && this.type == \"theta\")\n\t\t\treturn 1.101 + (0.01* Math.random() - 0.005);\n\t\telse if(this.beat.pulse() > 4.0 && this.beat.pulse() < 4.5 && this.type == \"alpha\")\n\t\t\treturn 1.222 + (0.01* Math.random() - 0.005);\n\t\telse if(this.beat.pulse() > 4.0 && this.beat.pulse() < 4.5 && this.type == \"beta\")\n\t\t\treturn 0.991 + (0.01* Math.random() - 0.005);\n\t\telse\n\t\t\treturn 0.878 + (0.4* Math.random() - 0.005);\n\t}", "Expression getMax();", "private RolapCalculation getAbsoluteMaxSolveOrder() {\n // Find member with the highest solve order.\n RolapCalculation maxSolveMember = calculations[0];\n for (int i = 1; i < calculationCount; i++) {\n RolapCalculation member = calculations[i];\n if (expandsBefore(member, maxSolveMember)) {\n maxSolveMember = member;\n }\n }\n return maxSolveMember;\n }", "int getMaxCount();", "int getMaxCount();", "public int GetMaxVal();", "abstract AbstractTree<T> maximize(int maxOperationsCount);", "public int mirrorReflection(int p, int q) {\n int k = 1;\n while (q * k % p != 0)\n k++;\n if (q * k / p % 2 != 0)\n return k % 2 == 0 ? 2 : 1;\n return k % 2 ==0 ? -1 : 0;\n }", "public int getCustomerMaxTargetFloor();", "public Number getMaximumNumber() {\n/* 221 */ if (this.maxObject == null) {\n/* 222 */ this.maxObject = new Long(this.max);\n/* */ }\n/* 224 */ return this.maxObject;\n/* */ }", "public float getMaxCY5();", "public T max();", "public float getMaxRatio();", "public int findMaxDegree() {\n\t\tint gradoMax = 0;\n\t\t\n\t\tfor(String s : grafo.vertexSet()) {\n\t\t\tint grado = grafo.degreeOf(s);\n\t\t\t\n\t\t\tif(grado > gradoMax) {\n\t\t\t\tgradoMax = grado;\n\t\t\t\tverticeGradoMax = s;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\treturn gradoMax;\n\t}", "public void applyReflection(final int reflection)\n\t{\n\t\tif (reflection == 1)\n\t\t{\n\t\t\t// guess we're doing nothing at all\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (final FeatureElement element : featureElements)\n\t\t{\n\t\t\tif (element instanceof RelativeFeatureElement)\n\t\t\t{\n\t\t\t\tfinal RelativeFeatureElement rel = (RelativeFeatureElement) element;\n\t\t\t\tfinal TFloatArrayList steps = rel.walk().steps();\n\t\t\t\tfor (int i = 0; i < steps.size(); ++i)\n\t\t\t\t{\n\t\t\t\t\tsteps.setQuick(i, steps.getQuick(i) * reflection);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public abstract int getMaximumArguments();", "@Override\n\tpublic int max() {\n\t\treturn 4;\n\t}", "int getMaxRawImages();", "public static void main(String[] args) {\nSystem.out.println(Math.PI); // pi es un atributo estatico de la clase math por lo que no requiere ser instanciado\nSystem.out.println(Math.max(200, 500)); // el metodo math.max retorna el valor mas alto de entre dos valores\n\n// paquetes \n// un paquete nos permite organizar un frupo de clases que se relacionan entre si\n// resuelven la problematica de conflicto de nombres\n// nos permiten establecer privilegios de acceso\n\n// paquetes\n// para nombrar paquetes seguiremos estas reglas\n// utilizaremos unicamente letras minusculas\n// separar con puntos\n// utilizaremos nuestro dominio o nombre al reves ex. duranalejandro\n// pondremos al final el contexto del paquete, bajo el cual agruparemos las clases\n// cada punto definira una carpeta, por eso es que es al reves\n// duran.alejandro.notasvarias\n// para hacer una carpeta en alejandro lo hariamos de esta manera\n// duran.alejandro.notasvarias2(nueva carpeta) y estaria en la misma carpeta que notasvarias \n\n// ejemplo del uso de import para la instancia de un objeto de la clase importada y el uso de sus metodos\nJava java = new Java ();\nSystem.out.println(java.getTitulo());\n\n// java lang\ndouble resultado = Math.sqrt(25);\nString mensaje = \"Resultado \" + resultado;\nSystem.out.println(mensaje);\n// las clases en el paquete java lang podran usarse sin el metodo import\n\n// protected\nJava java2 = new Java ();\nSystem.out.println(java.getTitulo());\n// nuestro metodo .getTitulo es publico actualmente, si lo cambiamos a default o protected\n// clases de otros paquetes no podran hacer uso de esos metodos, a pesar de que se utilice import\n// default o protected limitaran el acceso a clases que sean unicamente del mismo paquete\n\n\n\n\n\n\n\n\n\n\n\n }", "private static final double maxDecel(double speed) {\n return limit(1, speed * 0.5 + 1, 2);\n }", "private void finish_marginal () {\n\n\t\t// Calculate the modes\n\n\t\tfor (int n = 0; n < n_vars; ++n) {\n\t\t\tint[] j = new int[1];\n\t\t\tOEArraysCalc.find_array_max (marginal_probability[n], j);\n\t\t\tmarginal_mode_index[n] = j[0];\n\t\t}\n\n\t\t// Calculate the 2D modes\n\n\t\tfor (int n1 = 0; n1 < n_vars; ++n1) {\n\t\t\tfor (int n2 = 0; n2 < n_vars; ++n2) {\n\t\t\t\tif (n1 < n2) {\n\t\t\t\t\tOEArraysCalc.find_array_max (marginal_2d_probability[n1][n2], marginal_2d_mode_index[n1][n2]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Apply min probability to marginal\n\n\t\tfor (int n = 0; n < n_vars; ++n) {\n\t\t\tfor (int i = 1; i < n_values[n]; ++i) {\n\t\t\t\tif (marginal_probability[n][i] < min_probability) {\n\t\t\t\t\tmarginal_probability[n][i] = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Apply min probability to marginal peak\n\n\t\tfor (int n = 0; n < n_vars; ++n) {\n\t\t\tfor (int i = 1; i < n_values[n]; ++i) {\n\t\t\t\tif (marginal_peak_probability[n][i] < min_probability) {\n\t\t\t\t\tmarginal_peak_probability[n][i] = 0.0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Apply min probability to 2D marginal\n\n\t\tfor (int n1 = 0; n1 < n_vars; ++n1) {\n\t\t\tfor (int n2 = 0; n2 < n_vars; ++n2) {\n\t\t\t\tif (n1 < n2) {\n\t\t\t\t\tfor (int i1 = 0; i1 < n_values[n1]; ++i1) {\n\t\t\t\t\t\tfor (int i2 = 0; i2 < n_values[n2]; ++i2) {\n\t\t\t\t\t\t\tif (marginal_2d_probability[n1][n2][i1][i2] < min_probability) {\n\t\t\t\t\t\t\t\tmarginal_2d_probability[n1][n2][i1][i2] = 0.0;\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\n\t\treturn;\n\t}", "static long maximumPeople(long[] p, long[] x, long[] y, long[] r) {\n city[] allCity = new city[n];\n for(int i = 0; i < n; i++)\n allCity[i] = new city(p[i], x[i]);\n Arrays.sort(allCity);\n for(int i = 0; i < m; i++){\n long start = y[i] - r[i];\n long end = y[i] + r[i];\n int startindex = Arrays.binarySearch(allCity, new city(0, start));\n if(startindex < 0)\n startindex = - startindex - 1;\n else{\n long value = allCity[startindex].loc;\n while(true){\n startindex--;\n if(startindex < 0)\n break;\n if(allCity[startindex].loc != value)\n break;\n }\n startindex++;\n }\n int endindex = Arrays.binarySearch(allCity, new city(0, end));\n if(endindex < 0)\n endindex = -endindex - 2;\n else{\n long value = allCity[endindex].loc;\n while(true){\n endindex++;\n if(endindex >= n)\n break;\n if(allCity[endindex].loc != value)\n break;\n }\n endindex--;\n }\n for(int j = startindex; j <= endindex; j++){\n if(j >= n)\n break;\n allCity[j].clouds.add(i);\n }\n }\n int prev = -1;\n long sunny = 0;\n long max = 0;\n long accu = 0;\n for(int i = 0; i < n; i++){\n if(allCity[i].clouds.size() == 0)\n sunny += allCity[i].population;\n if(allCity[i].clouds.size() == 1){\n if(allCity[i].clouds.get(0) == prev){\n accu += allCity[i].population;\n if(accu > max)\n max = accu;\n }\n else {\n accu = allCity[i].population;\n prev = allCity[i].clouds.get(0);\n if(accu > max)\n max = accu;\n }\n }\n }\n return max + sunny;\n }", "@Basic @Immutable\n\tpublic static int getMaxProtection() {\n\t\treturn MAX_PROTECTION;\n\t}", "public long getPropertyFadeMax();", "public static void main(String[] args) {\n int[] nums = initializeNums();\n\n THRESHOLD = nums.length / Runtime.getRuntime().availableProcessors();\n\n SequentialMaxFinding sequentialMaxFinding = new SequentialMaxFinding();\n\n long start = System.currentTimeMillis();\n System.out.println(\"Max: \"+sequentialMaxFinding.SequentialMaxFind(nums, nums.length));\n long end = System.currentTimeMillis();\n System.out.println(\"Time taken for Sequential maxFinding: \"+ (end - start) + \" ms\");\n\n System.out.println();\n\n ForkJoinPool pool = new ForkJoinPool(Runtime.getRuntime().availableProcessors());\n ParallelMaxFinding parallelMaxFinding = new ParallelMaxFinding(nums, 0, nums.length);\n\n start = System.currentTimeMillis();\n System.out.println(\"Max: \"+pool.invoke(parallelMaxFinding));\n end = System.currentTimeMillis();\n System.out.println(\"Time taken for Parallel maxFinding: \"+ (end - start) + \" ms\");\n\n }", "public Ray calculateReflectionRay() {\n Vec3 directN = mInRay.getDirection();\n\n if(mShape.getReflection().blurryness != 0){\n CoordinateSystem coordSys = this.calculateCoordinateSystem(directN);\n\n Vec3 directNB = coordSys.vecB;\n Vec3 directNC = coordSys.vecC;\n\n directN = this.calculateTransformedRandomEndDirection(directN, directNB, directNC, true);\n }\n\n return calculateReflectionRay(directN);\n }", "int getMaxMP();", "int getMaxMP();", "int getMaxMP();" ]
[ "0.63776535", "0.54862756", "0.54199564", "0.5395377", "0.53826755", "0.53302044", "0.5326964", "0.5311566", "0.52913094", "0.5224967", "0.51969576", "0.51821285", "0.5155885", "0.51518303", "0.5145523", "0.51365215", "0.51354665", "0.51327145", "0.5128773", "0.5124939", "0.51198906", "0.5117773", "0.5094841", "0.5091657", "0.50833803", "0.507872", "0.50657004", "0.50324345", "0.50086814", "0.5004244", "0.49914777", "0.4980044", "0.49777594", "0.49692008", "0.49460003", "0.49282005", "0.49212983", "0.491768", "0.49088833", "0.4908049", "0.4906766", "0.4904954", "0.4904593", "0.49006042", "0.48977646", "0.48906693", "0.488224", "0.48779622", "0.48751268", "0.4872795", "0.4872795", "0.48700035", "0.48694378", "0.4862408", "0.48560038", "0.48536655", "0.4852838", "0.4849678", "0.48466069", "0.48428366", "0.4834412", "0.4831619", "0.48313013", "0.48214015", "0.48150238", "0.48140758", "0.48140758", "0.4806766", "0.4805893", "0.48037657", "0.48032886", "0.48030278", "0.480124", "0.47949398", "0.47921857", "0.47921857", "0.47852576", "0.47840098", "0.47814718", "0.477581", "0.47745538", "0.47723892", "0.47676507", "0.47614652", "0.47602585", "0.47589374", "0.47584936", "0.4758366", "0.47507274", "0.47447702", "0.47434437", "0.47431338", "0.47412175", "0.47385207", "0.4735237", "0.4734403", "0.4730704", "0.47290078", "0.47290078", "0.47290078" ]
0.58038336
1
Constructor for creating an instance that will parse a set of String arguments with respect to a set of command line options. Option switches are required to be a single character. By default switches are assumed to be boolean unless followed by a colon. example : &nbsp;&nbsp;&nbsp "cvf:" In this example "c" and "v" are boolean while "f" is nonboolean and thus assumed to take an argument.
public GetOpt(String [] sargs, String flags) throws BadOptException { int size = sargs.length; try { StringReader sreader = new StringReader(flags); for (int i = 0; i < flags.length(); i++) { int opt = sreader.read(); if (opt == ':') ((OptPair) optlist.elementAt(optlist.size() - 1)).bool = false; else optlist.add(new OptPair((char) opt, true)); } sreader.close(); } catch (IOException e) { System.err.println("Bizarre error situation!"); throw new BadOptException("I/O problem encountered manipulating strings with a StringReader!"); } // for (int i = 0; i < optlist.size(); i++) // System.out.println(optlist.elementAt(i)); for (int i = 0; i < sargs.length; i++) { if (sargs[i].startsWith("-")) { try { StringReader sreader = new StringReader(sargs[i].substring(1)); int opt = -1; while ((opt = sreader.read()) != -1) { boolean found = false; boolean bool = true; for (int j = 0; j < optlist.size(); j++) { OptPair temp = (OptPair) optlist.elementAt(j); if (temp.option == (char) opt) { found = true; bool = temp.bool; break; } } if (found) { opts.add(new Character((char) opt)); if (!bool) { args.add(sargs[++i]); break; } } else { throw new BadOptException((char) opt + ": is an invalid switch option."); } } } catch (IOException e) { System.err.println("Bizarre error situation!"); throw new BadOptException("I/O problem encountered manipulating strings with a StringReader!"); } } else { params.add(sargs[i]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected P parse(String options, String[] args){\n HashMap cmdFlags = new HashMap();\n String flag;\n String nextFlag=null;\n StringBuffer errors=new StringBuffer();\n /**\n First go through options to see what should be in args\n */\n for(int which=0;which<options.length();which++){\n flag = \"-\"+options.substring(which,which+1);\n if(which+1<options.length()){\n nextFlag=options.substring(which+1,which+2);\n if (nextFlag.equals(\"-\")){\n cmdFlags.put(flag,nextFlag);\n } else\n if (nextFlag.equals(\"+\")){\n cmdFlags.put(flag,nextFlag);\n /*\n mark that it is required\n if found this will be overwritten by -\n */\n this.put(flag,nextFlag);\n } else\n //JDH changed to \"_\" from \";\" because too many cmdlines mess up ;\n if (nextFlag.equals(\"_\")){\n cmdFlags.put(flag,nextFlag);\n } else\n //JDH changed to \".\" from \":\" because too many cmdlines mess up ;\n if (nextFlag.equals(\".\")){\n cmdFlags.put(flag,\" \"); //JDH changed this from \":\"\n /*\n mark that it is required\n if found this will be overwritten by value\n JDH should use \" \" so it cannot be the same as a value\n */\n this.put(flag,\" \"); // mark that it is required\n } else {\n System.out.println(\"Bad symbol \"+nextFlag+\"in option string\");\n }\n which++;\n } else {\n System.out.println(\"Missing symbol in option string at \"+which);\n }\n }\n\n int arg=0;\n for(;arg<args.length;arg++){\n if (!args[arg].startsWith(\"-\")){\n break;\n }\n flag = args[arg];\n /*\n This should tell it to quit looking for flags or options\n */\n if (flag.equals(\"--\")){\n arg++;\n break;\n }\n if (!(cmdFlags.containsKey(flag))){\n errors.append(\"\\nbad flag \"+flag);\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"-\")){\n this.put(flag,\"-\");\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"+\")){\n this.put(flag,\"-\");// turns off the + because it was found\n continue;\n }\n if (!(arg+1<args.length)){\n errors.append(\"\\nMissing value for \"+flag);\n continue;\n }\n arg++;\n this.put(flag,args[arg]);\n }\n String[] params=null;\n params = new String[args.length - arg];\n\n int n=0;\n // reverse these so they come back in the right order!\n for(;arg<args.length;arg++){\n params[n++] = args[arg];\n }\n Iterator k = null;\n Map.Entry e = null;\n if (this.containsValue(\"+\")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\"+\".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required flag \"+(String)e.getKey()+\" was not supplied.\");\n };\n }\n } \n /*\n Should change this to \" \" in accordance with remark above\n */\n //JDH changed to \" \" from \":\" in both spots below\n if (this.containsValue(\" \")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\" \".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required option \"+(String)e.getKey()+\" was not supplied.\");\n }\n }\n }\n this.put(\" \",params);\n this.put(\"*\",errors.toString());\n return this;\n }", "public CopsOptionParser() {\n\t\tsuper();\n\t\taddOption(HELP);\n\t\taddOption(SCENARIO);\n\t\taddOption(VALIDATE_ONLY);\n\t\taddOption(CONF);\n\n\t}", "@Override\r\n public boolean isValidCommandLine(String inputLine) {\r\n String strippedLine = inputLine.strip();\r\n String[] tokens = strippedLine.split(\" \", -1);\r\n int flagIndex = findFlagIndex(tokens);\r\n\r\n if (flagIndex == NOT_FOUND) {\r\n return false;\r\n }\r\n\r\n String[] argumentTokens = Arrays.copyOfRange(tokens, 1, flagIndex);\r\n String[] flagTokens = Arrays.copyOfRange(tokens, flagIndex + 1, tokens.length);\r\n\r\n String argumentValue = String.join(\" \", argumentTokens);\r\n String flagValue = String.join(\" \", flagTokens);\r\n\r\n boolean isStartWithCommand = strippedLine.startsWith(super.getCommand() + \" \");\r\n boolean isNonEmptyArgument = argumentValue.length() > 0;\r\n boolean isNonEmptyFlag = flagValue.length() > 0;\r\n\r\n return isStartWithCommand && isNonEmptyArgument && isNonEmptyFlag;\r\n }", "private static CommandLine parseCommandLine(String[] args) {\n Option config = new Option(CONFIG, true, \"operator config\");\n Option brokerStatsZookeeper =\n new Option(BROKERSTATS_ZOOKEEPER, true, \"zookeeper for brokerstats topic\");\n Option brokerStatsTopic = new Option(BROKERSTATS_TOPIC, true, \"topic for brokerstats\");\n Option clusterZookeeper = new Option(CLUSTER_ZOOKEEPER, true, \"cluster zookeeper\");\n Option seconds = new Option(SECONDS, true, \"examined time window in seconds\");\n options.addOption(config).addOption(brokerStatsZookeeper).addOption(brokerStatsTopic)\n .addOption(clusterZookeeper).addOption(seconds);\n\n if (args.length < 6) {\n printUsageAndExit();\n }\n\n CommandLineParser parser = new DefaultParser();\n CommandLine cmd = null;\n try {\n cmd = parser.parse(options, args);\n } catch (ParseException | NumberFormatException e) {\n printUsageAndExit();\n }\n return cmd;\n }", "public CommandLine parse(String[] args ) throws ParseException\n {\n String[] cleanArgs = CleanArgument.cleanArgs( args );\n CommandLineParser parser = new DefaultParser();\n return parser.parse( options, cleanArgs );\n }", "public boolean parseArgs(String argv[]) {\n if (argv != null) {\n for (int argc = 0; argc < argv.length; argc += 2)\n if (argv[argc].equals(\"-f\"))\n mPathname = argv[argc + 1];\n else if (argv[argc].equals(\"-d\"))\n mDiagnosticsEnabled = argv[argc + 1].equals(\"true\");\n else if (argv[argc].equals(\"-s\"))\n \tmSeparator = argv[argc + 1];\n else {\n printUsage();\n return false;\n }\n return true;\n } else\n return false;\n }", "public interface Option {\n\n /**\n * Processes String arguments into a CommandLine.\n *\n * The iterator will initially point at the first argument to be processed\n * and at the end of the method should point to the first argument not\n * processed. This method MUST process at least one argument from the\n * ListIterator.\n *\n * @param commandLine\n * The CommandLine object to store results in\n * @param args\n * The arguments to process\n * @throws OptionException\n * if any problems occur\n */\n void process(\n final WriteableCommandLine commandLine,\n final ListIterator args)\n throws OptionException;\n\n /**\n * Adds defaults to a CommandLine.\n *\n * Any defaults for this option are applied as well as the defaults for\n * any contained options\n *\n * @param commandLine\n * The CommandLine object to store defaults in\n */\n void defaults(final WriteableCommandLine commandLine);\n\n /**\n * Indicates whether this Option will be able to process the particular\n * argument.\n *\n * @param argument\n * The argument to be tested\n * @return true if the argument can be processed by this Option\n */\n boolean canProcess(final WriteableCommandLine commandLine, final String argument);\n\n /**\n * Indicates whether this Option will be able to process the particular\n * argument. The ListIterator must be restored to the initial state before\n * returning the boolean.\n *\n * @see #canProcess(WriteableCommandLine,String)\n * @param arguments\n * the ListIterator over String arguments\n * @return true if the argument can be processed by this Option\n */\n boolean canProcess(final WriteableCommandLine commandLine, final ListIterator arguments);\n\n /**\n * Identifies the argument prefixes that should trigger this option. This\n * is used to decide which of many Options should be tried when processing\n * a given argument string.\n *\n * The returned Set must not be null.\n *\n * @return The set of triggers for this Option\n */\n Set getTriggers();\n\n /**\n * Identifies the argument prefixes that should be considered options. This\n * is used to identify whether a given string looks like an option or an\n * argument value. Typically an option would return the set [--,-] while\n * switches might offer [-,+].\n *\n * The returned Set must not be null.\n *\n * @return The set of prefixes for this Option\n */\n Set getPrefixes();\n\n /**\n * Checks that the supplied CommandLine is valid with respect to this\n * option.\n *\n * @param commandLine\n * The CommandLine to check.\n * @throws OptionException\n * if the CommandLine is not valid.\n */\n void validate(final WriteableCommandLine commandLine)\n throws OptionException;\n\n /**\n * Builds up a list of HelpLineImpl instances to be presented by HelpFormatter.\n *\n * @see HelpLine\n * @see org.apache.commons.cli2.util.HelpFormatter\n * @param depth\n * the initial indent depth\n * @param helpSettings\n * the HelpSettings that should be applied\n * @param comp\n * a comparator used to sort options when applicable.\n * @return a List of HelpLineImpl objects\n */\n List helpLines(\n final int depth,\n final Set helpSettings,\n final Comparator comp);\n\n /**\n * Appends usage information to the specified StringBuffer\n *\n * @param buffer the buffer to append to\n * @param helpSettings a set of display settings @see DisplaySetting\n * @param comp a comparator used to sort the Options\n */\n void appendUsage(\n final StringBuffer buffer,\n final Set helpSettings,\n final Comparator comp);\n\n /**\n * The preferred name of an option is used for generating help and usage\n * information.\n *\n * @return The preferred name of the option\n */\n String getPreferredName();\n\n /**\n * Returns a description of the option. This string is used to build help\n * messages as in the HelpFormatter.\n *\n * @see org.apache.commons.cli2.util.HelpFormatter\n * @return a description of the option.\n */\n String getDescription();\n\n /**\n * Returns the id of the option. This can be used in a loop and switch\n * construct:\n *\n * <code>\n * for(Option o : cmd.getOptions()){\n * switch(o.getId()){\n * case POTENTIAL_OPTION:\n * ...\n * }\n * }\n * </code>\n *\n * The returned value is not guarenteed to be unique.\n *\n * @return the id of the option.\n */\n int getId();\n\n /**\n * Recursively searches for an option with the supplied trigger.\n *\n * @param trigger the trigger to search for.\n * @return the matching option or null.\n */\n Option findOption(final String trigger);\n\n /**\n * Indicates whether this option is required to be present.\n * @return true iff the CommandLine will be invalid without this Option\n */\n boolean isRequired();\n\n /**\n * Returns the parent of this option. Options can be organized in a\n * hierarchical manner if they are added to groups. This method can be used\n * for obtaining the parent option of this option. The result may be\n * <b>null</b> if this option does not have a parent.\n *\n * @return the parent of this option\n */\n\n /**\n * Sets the parent of this option. This method is called when the option is\n * added to a group. Storing the parent of an option makes it possible to\n * keep track of hierarchical relations between options. For instance, if an\n * option is identified while parsing a command line, the group this option\n * belongs to can also be added to the command line.\n *\n * @param parent the parent option\n */\n}", "public interface CommandLineParser {\n\n CommandLine parse(Options options, String[] arguments) throws ParseException;\n CommandLine parse(Options options, String[] arguments, boolean stopAtNonOption) throws ParseException;\n\n}", "@Override\n protected String[] ParseCmdLine(final String[] args) {\n\n final CmdLineParser clp = new CmdLineParser();\n final OptionalFlag optHelp = new OptionalFlag(\n clp, \"h?\", \"help\", \"help mode\\nprint this usage information and exit\");\n optHelp.forHelpUsage();\n final OptionalFlag optForce =\n new OptionalFlag(clp, \"f\", \"force\", \"force overwrite\");\n final OptionalFlag optDelete =\n new OptionalFlag(clp, \"d\", \"delete\", \"delete the table content first\");\n final OptionalFlag optAll = new OptionalFlag(\n clp, \"a\", \"all\",\n \"import all and synchronize changes in the document back to the datasource\");\n final OptionalFlag optSync = new OptionalFlag(\n clp, \"\", \"sync\",\n \"synchronize changes in the document back to the datasource\");\n final OptionalArgumentInteger optCommitCount =\n new OptionalArgumentInteger(clp, \"n\", \"commitcount\", \"commit count\");\n\n clp.setArgumentDescription(\n \"[[sourcefile [destinationfile]]\\n[sourcefile... targetdirectory]]\", -1,\n -1, null);\n final String[] argv = clp.getOptions(args);\n\n force = optForce.getValue(false);\n doDelete = optDelete.getValue(false);\n doSync = optAll.getValue(false) || optSync.getValue(false);\n doImport = optAll.getValue(false) || !optSync.getValue(false);\n commitCount = optCommitCount.getValue(0);\n\n return argv;\n }", "@Override\n protected boolean parseArguments(String argumentInput) {\n Objects.requireNonNull(argumentInput, LegalityCheck.INPUT_ARGUMENT_NULL_MESSAGE);\n\n switch (argumentInput) {\n\n case LIST_COMMAND_OPTION_EMPTY:\n case LIST_COMMAND_OPTION_SHORT:\n this.savedOption = ListCommandOptions.SHORT;\n return true;\n\n case LIST_COMMAND_OPTION_LONG:\n this.savedOption = ListCommandOptions.LONG;\n return true;\n\n default:\n return false;\n }\n }", "public GoRun flags(String... args) {\n if (args.length % 2 != 0) {\n throw new InvalidParameterException(\"given args are not even\");\n }\n\n for (int i = 0; i < args.length; i += 2) {\n shortOption(args[i], args[i + 1]);\n }\n return this;\n }", "private static void parseCommandLine(String[] args) throws WorkbenchException {\n commandLine = new CommandLine('-');\r\n commandLine.addOptionSpec(new OptionSpec(PROPERTIES_OPTION, 1));\r\n commandLine.addOptionSpec(new OptionSpec(DEFAULT_PLUGINS, 1));\r\n commandLine.addOptionSpec(new OptionSpec(PLUG_IN_DIRECTORY_OPTION, 1));\r\n commandLine.addOptionSpec(new OptionSpec(I18N_FILE, 1));\r\n //[UT] 17.08.2005 \r\n commandLine.addOptionSpec(new OptionSpec(INITIAL_PROJECT_FILE, 1));\r\n commandLine.addOptionSpec(new OptionSpec(STATE_OPTION, 1));\r\n try {\r\n commandLine.parse(args);\r\n } catch (ParseException e) {\r\n throw new WorkbenchException(\"A problem occurred parsing the command line: \" + e.toString());\r\n }\r\n }", "public int setOptionFlag(String[] args, int i)\n/* */ {\n/* 393 */ boolean didSomething = true;\n/* 394 */ while ((i < args.length) && (didSomething)) {\n/* 395 */ didSomething = false;\n/* 396 */ if (this.annotationPatterns.keySet().contains(args[i])) {\n/* 397 */ Pair<TregexPattern, Function<TregexMatcher, String>> p = (Pair)this.annotationPatterns.get(args[i]);\n/* 398 */ this.activeAnnotations.put(p.first(), p.second());\n/* 399 */ didSomething = true;\n/* 400 */ this.optionsString = (this.optionsString + \"Option \" + args[i] + \" added annotation pattern \" + p.first() + \" with annotation \" + p.second() + \"\\n\");\n/* 401 */ } else if (args[i].equals(\"-retainNPTmp\")) {\n/* 402 */ this.optionsString += \"Retaining NP-TMP marking.\\n\";\n/* 403 */ this.retainNPTmp = true;\n/* 404 */ didSomething = true;\n/* 405 */ } else if (args[i].equals(\"-discardX\")) {\n/* 406 */ this.optionsString += \"Discarding X trees.\\n\";\n/* 407 */ this.discardX = true;\n/* 408 */ didSomething = true;\n/* 409 */ } else if (args[i].equals(\"-changeNoLabels\")) {\n/* 410 */ this.optionsString += \"Change no labels.\\n\";\n/* 411 */ this.changeNoLabels = true;\n/* 412 */ didSomething = true;\n/* 413 */ } else if (args[i].equals(\"-markPRDverbs\")) {\n/* 414 */ this.optionsString += \"Mark PRD.\\n\";\n/* 415 */ this.retainPRD = true;\n/* 416 */ didSomething = true;\n/* 417 */ } else if (args[i].equals(\"-collinizerRetainsPunctuation\")) {\n/* 418 */ this.optionsString += \"Collinizer retains punctuation.\\n\";\n/* 419 */ this.collinizerRetainsPunctuation = true;\n/* 420 */ didSomething = true;\n/* 421 */ } else if (args[i].equals(\"-collinizerPruneRegex\")) {\n/* 422 */ this.optionsString = (this.optionsString + \"Collinizer prune regex: \" + args[(i + 1)] + \"\\n\");\n/* 423 */ this.collinizerPruneRegex = Pattern.compile(args[(i + 1)]);\n/* 424 */ i++;\n/* 425 */ didSomething = true;\n/* 426 */ } else if (args[i].equals(\"-hf\")) {\n/* */ try {\n/* 428 */ this.headFinderClass = Class.forName(args[(i + 1)]).asSubclass(HeadFinder.class);\n/* 429 */ this.optionsString = (this.optionsString + \"HeadFinder class: \" + args[(i + 1)] + \"\\n\");\n/* */ }\n/* */ catch (ClassNotFoundException e) {\n/* 432 */ System.err.println(\"Error -- can't find HeadFinder class\" + args[(i + 1)]);\n/* */ }\n/* 434 */ i++;\n/* 435 */ didSomething = true;\n/* 436 */ } else if (args[i].equals(\"-arabicFactored\"))\n/* */ {\n/* 438 */ String[] opts = { \"-discardX\", \"-markNounNPargTakers\", \"-genitiveMark\", \"-splitPUNC\", \"-markContainsVerb\", \"-splitCC\", \"-markContainsSBAR\" };\n/* */ \n/* 440 */ setOptionFlag(opts, 0);\n/* 441 */ didSomething = true;\n/* 442 */ } else if (args[i].equals(\"-arabicTokenizerModel\")) {\n/* 443 */ String modelFile = args[(i + 1)];\n/* */ try {\n/* 445 */ WordSegmenter aSeg = (WordSegmenter)Class.forName(\"edu.stanford.nlp.wordseg.ArabicSegmenter\").newInstance();\n/* 446 */ aSeg.loadSegmenter(modelFile);\n/* 447 */ TokenizerFactory aTF = WordSegmentingTokenizer.factory(aSeg);\n/* 448 */ ((ArabicTreebankLanguagePack)treebankLanguagePack()).setTokenizerFactory(aTF);\n/* */ } catch (RuntimeIOException ex) {\n/* 450 */ System.err.println(\"Couldn't load ArabicSegmenter \" + modelFile);\n/* 451 */ ex.printStackTrace();\n/* */ } catch (Exception e) {\n/* 453 */ System.err.println(\"Couldn't instantiate segmenter: edu.stanford.nlp.wordseg.ArabicSegmenter\");\n/* 454 */ e.printStackTrace();\n/* */ }\n/* 456 */ i++;\n/* 457 */ didSomething = true;\n/* */ }\n/* 459 */ if (didSomething) {\n/* 460 */ i++;\n/* */ }\n/* */ }\n/* 463 */ return i;\n/* */ }", "public boolean parseCommand(String [] clargs){\n\t\tif (clargs.length < 1 || !this.command_name.equals(clargs[0])){\n\t\t\treturn false;\n\t\t}\n\t\t// Otherwise we can parse the remainder of the flags and arguments\n\t\tint index = 1;\n\t\targuments = new LinkedList<String>();\n\t\tflags = new LinkedList<String[]>();\n\t\terrors = new LinkedList<String>();\n\t\twhile (index < clargs.length){\n\t\t\tif (is_flag(clargs[index])){\n\t\t\t boolean recognised = false;\n\t\t\t for (CLOption clopt : options){\n\t\t\t\t // Should check that the arguments are not flags.\n\t\t\t\t if (clopt.is_matching_flag(clargs[index]) &&\n\t\t\t\t\t \tindex + clopt.getNumberOfArgs() < clargs.length){\n\t\t\t\t\t String[] flag = new String[1 + clopt.getNumberOfArgs()];\n\t\t\t\t\t flag[0] = clopt.getName();\n\t\t\t\t\t index++;\n\t\t\t\t\t for (int i = 1; i < clopt.getNumberOfArgs(); i++){\n\t\t\t\t\t\t flag[i] = clargs[index];\n\t\t\t\t\t\t index++;\n\t\t\t\t\t }\n\t\t\t\t\t flags.addLast(flag);\n\t\t\t\t\t recognised = true;\n\t\t\t\t\t break;\n\t\t\t\t }\n\t\t\t }\n\t\t\t if (!recognised){\n\t\t\t\t errors.addLast(\"Unrecognised flag: \" + clargs[index]);\n\t\t\t }\n\t\t\t} else {\n\t\t\t\targuments.addLast(clargs[index]);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t}\n\t\t// Eventually if we get to here and we haven't reported an\n\t\t// error then we are good to go\n\t\treturn true;\n\t}", "public static void main(String[] ignored) {\n\t\tfinal String[] argv = new String[] {\n\n\t\t\t\t/* short options */\n\t\t\t\t\"-ab\",\n\t\t\t\t\"dd-argument\",\n\t\t\t\t\"-0\",\n\t\t\t\t\"-1\",\n\t\t\t\t\"-2\",\n\n\t\t\t\t/* long options */\n\t\t\t\t\"--add=123\",\n\t\t\t\t\"--append\",\n\t\t\t\t\"--delete-float=3.141952\",\n\t\t\t\t\"--delete-double=3.141952\",\n\t\t\t\t\"--verbose\",\n\t\t\t\t\"--create=789\",\n\t\t\t\t\"-c987\",\n\t\t\t\t\"--file=filename1\",\n\n\t\t\t\t/* non-option arguments */\n\t\t\t\t\"--\",\n\t\t\t\t\"hello\",\n\t\t\t\t\"there\",\n\t\t};\n\n\t\ttry {\n\n\t\t\t/* Two ways to build options, via create() method or using() */\n\t\t\tfinal Options options = new Options.Builder()\n\n\t\t\t\t\t/* Short options */\n\t\t\t\t\t.create(\"a\")\n\t\t\t\t\t.create(\"b\")\n\t\t\t\t\t.create(\"c\", int.class)\n\t\t\t\t\t.create(\"d\", String.class)\n\t\t\t\t\t.create(\"0\")\n\t\t\t\t\t.create(\"1\")\n\t\t\t\t\t.create(\"2\")\n\n\t\t\t\t\t.group('o', suboptions -> suboptions\n\t\t\t\t\t\t\t.create(\"ro\")\n\t\t\t\t\t\t\t.create(\"rw\")\n\t\t\t\t\t\t\t.create(\"name\", String.class))\n\n\t\t\t\t\t/* Long options */\n\t\t\t\t\t.using(Option.of(\"add\", int.class))\n\t\t\t\t\t.using(Option.of(\"append\"))\n\t\t\t\t\t.using(Option.of(\"delete-float\", float.class))\n\t\t\t\t\t.using(Option.of(\"delete-double\", double.class))\n\t\t\t\t\t.using(Option.of(\"verbose\"))\n\t\t\t\t\t.using(Option.of(\"create\", int.class))\n\t\t\t\t\t.using(Option.of(\"file\", String.class))\n\t\t\t\t\t.build();\n\n\t\t\t/* Handler be notified when option is matched */\n\t\t\tfinal Option<Integer> create = options.get(\"create\", int.class);\n\t\t\tcreate.onMatch(n -> System.out.printf(\"Creating new entry %d%n\", n));\n\n\t\t\t/* Setup and parse the command line arguments */\n\t\t\tfinal Args args = Args.of(argv, options);\n\n\t\t\t/* All matched options */\n\t\t\tSystem.out.println(\"-- Example 3:\");\n\t\t\tSystem.out.println(\"Matched options:\");\n\t\t\tfinal List<Option<?>> matched = options.getAllMatched();\n\t\t\tmatched.forEach(System.out::println);\n\n\t\t\t/* Anything that was unmatched by the parser is stored here */\n\t\t\tSystem.out.println(\"Unmatched args:\");\n\t\t\tfinal List<String> unmatched = args.getUnmatchedArgs();\n\t\t\tunmatched.forEach(System.out::println);\n\n\t\t\t/* 2 ways to work with user options: getOption or findMatched */\n\n\t\t\t/*\n\t\t\t * Find methods always return a java Optional. Unmatched option with no command\n\t\t\t * line match, the returned optional will be empty, otherwise the Optional will\n\t\t\t * have the option with the commanline arg/value.\n\t\t\t */\n\t\t\tfinal Optional<Option<Boolean>> a = options.findMatched(\"a\", boolean.class);\n\t\t\ta.ifPresent(opt -> System.out.println(\"Option A is found!\"));\n\n\t\t\t/* Get method will throw unchecked OptionNotFoundException if not found */\n\t\t\tfinal Option<Integer> add = options.get(\"add\", int.class);\n\t\t\tif (add.isMatched()) {\n\t\t\t\tSystem.out.printf(\"add this amount %d%n\", add.getValue());\n\t\t\t}\n\n\t\t} catch (UnrecognizedArgException | InvalidArgException e) {\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t\tSystem.err.printf(\"Usage: %s [-a|-b|-0|-1|-2] [-c arg] [-d arg]%n\", \"Example3\");\n\t\t\tSystem.err.printf(\" \"\n\t\t\t\t\t+ \" [--add element]\"\n\t\t\t\t\t+ \" [--append]\"\n\t\t\t\t\t+ \" [--delete-float arg]\"\n\t\t\t\t\t+ \" [--delete-double arg]\"\n\t\t\t\t\t+ \" [--verbose]\"\n\t\t\t\t\t+ \" [--create arg]\"\n\t\t\t\t\t+ \" [--file arg]\"\n\t\t\t\t\t+ \"%n\");\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t/*\n\t\t * Next step: Example 4 - working with beans\n\t\t * \n\t\t * A much easiest way to deal with many options is using the BeanOption API.\n\t\t * Example 4 demostrates its usage.\n\t\t */\n\t}", "public static void main(String[] args) {\n OptionParser parser = new OptionParser();\n parser.accepts(\"myProp\").withRequiredArg();\n OptionSet options = parser.parse(args);\n\n boolean myProp = options.hasArgument(\"myProp\");\n System.out.println(myProp);\n Object myProp1 = options.valueOf(\"myProp\");\n System.out.println(myProp1);\n }", "public void processArgs(final String args[]) throws OptionsException {\n\t\tOptionContainer option = null;\n\t\tint quant = -1;\n\t\tint qcount = 0;\n\t\tboolean moreData = false;\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (option == null) {\n\t\t\t\tif (args[i].charAt(0) != '-')\n\t\t\t\t\tthrow new OptionsException(\"Unexpected value: \" + args[i]);\n\n\t\t\t\t// see what kind of argument we have\n\t\t\t\tif (args[i].length() == 1)\n\t\t\t\t\tthrow new OptionsException(\"Illegal argument: '-'\");\n\n\t\t\t\tif (args[i].charAt(1) == '-') {\n\t\t\t\t\t// we have a long argument\n\t\t\t\t\t// since we don't accept inline values we can take\n\t\t\t\t\t// everything left in the string as argument, unless\n\t\t\t\t\t// there is a = in there...\n\t\t\t\t\tfinal String tmp = args[i].substring(2);\n\t\t\t\t\tfinal int pos = tmp.indexOf('=');\n\t\t\t\t\tif (pos == -1) {\n\t\t\t\t\t\toption = opts.get(tmp);\n\t\t\t\t\t\tmoreData = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption = opts.get(tmp.substring(0, pos));\n\t\t\t\t\t\t// modify the option a bit so the code below\n\t\t\t\t\t\t// handles the moreData correctly\n\t\t\t\t\t\targs[i] = \"-?\" + tmp.substring(pos + 1);\n\t\t\t\t\t\tmoreData = true;\n\t\t\t\t\t}\n\t\t\t\t} else if (args[i].charAt(1) == 'X') {\n\t\t\t\t\t// extra argument, same as long argument\n\t\t\t\t\tfinal String tmp = args[i].substring(1);\n\t\t\t\t\tfinal int pos = tmp.indexOf('=');\n\t\t\t\t\tif (pos == -1) {\n\t\t\t\t\t\toption = opts.get(tmp);\n\t\t\t\t\t\tmoreData = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\toption = opts.get(tmp.substring(0, pos));\n\t\t\t\t\t\t// modify the option a bit so the code below\n\t\t\t\t\t\t// handles the moreData correctly\n\t\t\t\t\t\targs[i] = \"-?\" + tmp.substring(pos + 1);\n\t\t\t\t\t\tmoreData = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// single char argument\n\t\t\t\t\toption = opts.get(\"\" + args[i].charAt(1));\n\t\t\t\t\t// is there more data left in the argument?\n\t\t\t\t\tmoreData = args[i].length() > 2 ? true : false;\n\t\t\t\t}\n\n\t\t\t\tif (option != null) {\n\t\t\t\t\t// make sure we overwrite previously set arguments\n\t\t\t\t\toption.resetArguments();\n\t\t\t\t\tfinal int card = option.getCardinality();\n\t\t\t\t\tif (card == CAR_ONE) {\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\toption = null;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tquant = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO_ONE) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\tqcount = 1;\n\t\t\t\t\t\tquant = 2;\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\toption = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO_MANY) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\tqcount = 1;\n\t\t\t\t\t\tquant = -1;\n\t\t\t\t\t\tif (moreData) {\n\t\t\t\t\t\t\toption.addArgument(args[i].substring(2));\n\t\t\t\t\t\t\tqcount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (card == CAR_ZERO) {\n\t\t\t\t\t\toption.setPresent();\n\t\t\t\t\t\toption = null;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tthrow new OptionsException(\"Unknown argument: \" + args[i]);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// store the `value'\n\t\t\t\toption.addArgument(args[i]);\n\t\t\t\tif (++qcount == quant) {\n\t\t\t\t\tquant = 0;\n\t\t\t\t\tqcount = 0;\n\t\t\t\t\toption = null;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void parseCommandLineArgs(String[] args) {\r\n // parse username/password;\r\n for(int i = 0; i < args.length; i++) {\r\n if(args[i].equals(\"-u\")) {\r\n username = args[i+1];\r\n }\r\n if(args[i].equals(\"-p\")) {\r\n password = args[i+1];\r\n }\r\n }\r\n \r\n }", "public CharStringOptionInspector() {\n this((CharTypeInfo) TypeInfoFactory.charTypeInfo);\n }", "@OverridingMethodsMustInvokeSuper\n protected Tool parseArguments(String[] args) throws Exception {\n for (String arg : options(args)) {\n if (arg.equals(\"--debug\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.DEBUG);\n } else if (arg.equals(\"--verbose\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.VERBOSE);\n } else if (arg.equals(\"--quiet\")) {\n checkArgument(verbosity == Level.DEFAULT, \"Specify one of: --quiet --verbose --debug\");\n setVerbosity(Level.QUIET);\n } else if (arg.equals(\"--pretty\")) {\n setPretty(true);\n } else {\n return unknownOption(arg);\n }\n }\n return this;\n }", "static ParsedCommand parseCommand(String cmdline) {\n ParsedCommand res = new ParsedCommand();\n cmdline = cmdline.trim();\n String[] split = cmdline.split(\"\\\\/([-]?[a-zA-Z]*)\");\n List<String> args = new ArrayList<>();\n for (int i = 0; i < split.length; i++) {\n String[] tmp = split[i].split(\" \");\n for (int j = 0; j < tmp.length; j++) {\n if (tmp[j].length() > 0) {\n args.add(tmp[j]);\n }\n }\n }\n if (args.size() == 0) return null;\n res.argv.addAll(args);\n Pattern p = Pattern.compile(\"\\\\/([-]?[a-zA-Z]*)\");\n Matcher m = p.matcher(cmdline);\n while (m.find()) {\n String cur = m.group(1);\n if (cur.startsWith(\"-\")) {\n for (int i = 1; i < cur.length(); i++) {\n res.switches.remove(String.valueOf(cur.charAt(i)).toUpperCase());\n }\n } else {\n for (int i = 0; i < cur.length(); i++) {\n res.switches.add(String.valueOf(cur.charAt(i)).toUpperCase());\n }\n }\n }\n\n return res;\n }", "public static Arguments parseArgs(String args[]) {\n // Set defaults\n ArgumentBuilder builder = new ArgumentBuilder();\n builder.setFileName(args[0]);\n builder.setMode(RunMode.LOCAL);\n builder.setExampleSize(2);\n builder.setFileTemplate(FileTemplate.JAVA_DEFAUlT);\n\n for (int i = 1; i < args.length; i++) {\n switch (args[i]) {\n case \"-h\":\n case \"-help\":\n help();\n break;\n case \"-size\":\n case \"-s\":\n builder.setExampleSize(Integer.parseInt(args[i + 1]));\n i++;\n break;\n case \"-kattis\":\n builder.setMode(RunMode.KATTIS);\n break;\n case \"-local\":\n builder.setMode(RunMode.LOCAL);\n break;\n case \"-template\":\n case \"-t\":\n builder.setFileTemplate(FileTemplate.valueOf(args[i + 1].toUpperCase()));\n i++;\n break;\n }\n }\n if (builder.getMode() == RunMode.LOCAL && builder.isExampleSizeSetManual()) {\n System.out.println(\"No example size set, using default of 2.\");\n }\n return builder.build();\n }", "public void parseCommandLine(String[] args) {\r\n\t\t// define command line options\r\n\t\tOptions options = new Options();\r\n\t\t// refresh:\r\n\t\toptions.addOption(new Option(\r\n\t\t \"refresh\", \r\n\t\t \"Tell Argus to start refreshing all files after Minstrel startup.\"));\r\n\t\t// port:\r\n\t\tOptionBuilder.withArgName(\"port\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription( \"Run NanoHTTPD on this port instead of default 8000.\" );\r\n\t\toptions.addOption(OptionBuilder.create(\"port\"));\r\n\t\t// argus:\r\n\t\tOptionBuilder.withArgName(\"url\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription( \"Use Argus at <url> instead of default localhost:8008.\" );\r\n\t\toptions.addOption(OptionBuilder.create(\"argus\"));\r\n\t\t// vlc:\r\n\t\tOptionBuilder.withArgName(\"url\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription(\"Use VLC at <url> instead of default localhost:8080.\");\r\n\t\toptions.addOption(OptionBuilder.create(\"vlc\"));\r\n\t\t// wwwroot:\r\n\t\tOptionBuilder.withArgName(\"path\");\r\n\t\tOptionBuilder.hasArg();\r\n\t\tOptionBuilder.withDescription(\"Have NanoHTTPD serve files from <path> instead of default ./wwwroot.\");\r\n\t\toptions.addOption(OptionBuilder.create(\"wwwroot\"));\r\n\t\t\r\n\t\t// parse command line options and adjust accordingly\r\n\t\tCommandLineParser parser = new GnuParser();\r\n\t\ttry {\r\n\t\t\tCommandLine line = parser.parse(options, args);\r\n\r\n\t\t\tif (line.hasOption(\"refresh\")) {\r\n\t\t\t\trefresh = new Date();\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"port\")) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tport = Integer.parseInt( line.getOptionValue(\"port\"));\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tSystem.err.println(\"Badly formatted port number, defaulting to 8000. Reason: \" + e.getMessage());\r\n\t\t\t\t\tport = 8000;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"argus\")) {\r\n\t\t\t\targusURL = line.getOptionValue(\"argus\");\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"vlc\")) {\r\n\t\t\t\tvlcURL = line.getOptionValue(\"vlc\");\r\n\t\t\t}\r\n\t\t\tif (line.hasOption(\"wwwroot\")) {\r\n\t\t\t\twwwroot = line.getOptionValue(\"wwwroot\");\r\n\t\t\t}\r\n\t\t} catch (ParseException e) {\r\n\t\t\tSystem.err.println(\"Command line parsing failed. Reason: \" + e.getMessage());\r\n\t\t}\r\n\t}", "private static JSAP prepCmdLineParser()\n throws Exception {\n final JSAP jsap = new JSAP();\n\n final FlaggedOption site_xml = new FlaggedOption(\"hbase_site\")\n .setStringParser(JSAP.STRING_PARSER)\n .setDefault(\"/etc/hbase/conf/hbase-site.xml\")\n .setRequired(true)\n .setShortFlag('c')\n .setLongFlag(JSAP.NO_LONGFLAG);\n site_xml.setHelp(\"Path to hbase-site.xml\");\n jsap.registerParameter(site_xml);\n\n final FlaggedOption jmxremote_password = new FlaggedOption(\"jmxremote_password\")\n .setStringParser(JSAP.STRING_PARSER)\n .setDefault(\"/etc/hbase/conf/jmxremote.password\")\n .setRequired(true)\n .setShortFlag('j')\n .setLongFlag(JSAP.NO_LONGFLAG);\n jmxremote_password.setHelp(\"Path to jmxremote.password.\");\n jsap.registerParameter(jmxremote_password);\n\n final FlaggedOption throttleFactor = new FlaggedOption(\"throttleFactor\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"1\")\n .setRequired(false)\n .setShortFlag('t')\n .setLongFlag(JSAP.NO_LONGFLAG);\n throttleFactor.setHelp(\"Throttle factor to limit the compaction queue. The default (1) limits it to num threads / 1\");\n jsap.registerParameter(throttleFactor);\n\n final FlaggedOption num_cycles = new FlaggedOption(\"numCycles\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"1\")\n .setRequired(false)\n .setShortFlag('n')\n .setLongFlag(JSAP.NO_LONGFLAG);\n num_cycles.setHelp(\"Number of iterations to run. The default is 1. Set to 0 to run forever.\");\n jsap.registerParameter(num_cycles);\n\n final FlaggedOption pauseInterval = new FlaggedOption(\"pauseInterval\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"30000\")\n .setRequired(false)\n .setShortFlag('p')\n .setLongFlag(JSAP.NO_LONGFLAG);\n pauseInterval.setHelp(\"Time (in milliseconds) to pause between compactions.\");\n jsap.registerParameter(pauseInterval);\n\n final FlaggedOption waitInterval = new FlaggedOption(\"waitInterval\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setDefault(\"60000\")\n .setRequired(false)\n .setShortFlag('w')\n .setLongFlag(JSAP.NO_LONGFLAG);\n waitInterval.setHelp(\"Time (in milliseconds) to wait between \" +\n \"time (are we there yet?) checks.\");\n jsap.registerParameter(waitInterval);\n\n DateStringParser date_parser = DateStringParser.getParser();\n date_parser.setProperty(\"format\", \"HH:mm\");\n\n final FlaggedOption startTime = new FlaggedOption(\"startTime\")\n .setStringParser(date_parser)\n .setDefault(\"01:00\")\n .setRequired(true)\n .setShortFlag('s')\n .setLongFlag(JSAP.NO_LONGFLAG);\n startTime.setHelp(\"Time to start compactions.\");\n jsap.registerParameter(startTime);\n\n final FlaggedOption endTime = new FlaggedOption(\"endTime\")\n .setStringParser(date_parser)\n .setDefault(\"07:00\")\n .setRequired(true)\n .setShortFlag('e')\n .setLongFlag(JSAP.NO_LONGFLAG);\n endTime.setHelp(\"Time to stop compactions.\");\n jsap.registerParameter(endTime);\n\n final FlaggedOption dryRun = new FlaggedOption(\"dryRun\")\n .setStringParser(JSAP.BOOLEAN_PARSER)\n .setDefault(\"false\")\n .setRequired(false)\n .setShortFlag('d')\n .setLongFlag(JSAP.NO_LONGFLAG);\n dryRun.setHelp(\"Don't actually do any compactions or splits.\");\n jsap.registerParameter(dryRun);\n\n final FlaggedOption maxSplitSize = new FlaggedOption(\"maxSplitSize_in_MB\")\n .setStringParser(JSAP.LONG_PARSER)\n .setDefault(\"4096\")\n .setRequired(false)\n .setShortFlag('m')\n .setLongFlag(JSAP.NO_LONGFLAG);\n maxSplitSize.setHelp(\"Maximum size for store files (in MB) at which a region is split.\");\n jsap.registerParameter(maxSplitSize);\n\n final FlaggedOption splitsEnabled = new FlaggedOption(\"splitsEnabled\")\n .setStringParser(JSAP.BOOLEAN_PARSER)\n .setDefault(\"false\")\n .setRequired(false)\n .setShortFlag('h')\n .setLongFlag(JSAP.NO_LONGFLAG);\n splitsEnabled.setHelp(\"Do splits (default split size will be 256MB unless specified).\");\n jsap.registerParameter(splitsEnabled);\n\n final FlaggedOption table_names = new FlaggedOption(\"tableNames\")\n .setStringParser(JSAP.STRING_PARSER)\n .setRequired(false)\n .setShortFlag(JSAP.NO_SHORTFLAG)\n .setLongFlag(\"tableNames\")\n .setList(true)\n .setListSeparator(',');\n table_names.setHelp(\"Specific table names to check against (default is all)\");\n jsap.registerParameter(table_names);\n\n final FlaggedOption files_keep = new FlaggedOption(\"filesKeep\")\n .setStringParser(JSAP.INTEGER_PARSER)\n .setRequired(false)\n .setShortFlag('f')\n .setLongFlag(\"filesKeep\")\n .setDefault(\"5\");\n files_keep.setHelp(\"Number of storefiles to look for before compacting (default is 5)\");\n jsap.registerParameter(files_keep);\n\n\n return jsap;\n }", "private static Options readArguments(String[] args) {\n\t\tOptions result = new Options();\n\t\ttry {\n\t\t\tresult.numberClients = Integer.parseInt(args[0]);\n\t\t\tresult.trafficTime = Integer.parseInt(args[args.length - 1]);\n\t\t} catch (java.lang.NumberFormatException e) {\n\t\t\tSystem.err.println(\"Error while converting to integer. Did you run the program correctly?\");\n\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\tSystem.exit(0);\n\t\t} catch (ArrayIndexOutOfBoundsException e) {\n\t\t\tSystem.err.println(\"Program requires at least TWO arguments, number of clients and active seconds.\");\n\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\tString argsString = String.join(\" \", args);\n\n\t\tif (argsString.contains(\"-w\")) {\n\t\t\tresult.writeMode = true;\n\t\t}\n\n\t\tPattern p = Pattern.compile(\"-s ([0-9]+)\");\n\t\tMatcher m = p.matcher(argsString);\n\t\tif (m.find()) {\n\t\t\tif (args.length > 3) {\n\t\t\t\tresult.storeID = Integer.parseInt(m.group(1));\n\t\t\t} else {\n\t\t\t\tSystem.err.println(\"When single store mode is enabled, the program requires AT LEAST 4 arguments.\");\n\t\t\t\tSystem.err.println(\"$ tgpm <c> [-w] [-s <sid>] <s>\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Args(String ... args) {\n CommandLineParser parser = new DefaultParser();\n Options options = new Options();\n options.addOption(\"d\", true, \"search directory\");\n Option maskOption = new Option(\"n\", true, \"list of filename masks\");\n maskOption.setArgs(Option.UNLIMITED_VALUES);\n options.addOption(maskOption);\n OptionGroup maskModeOptionGroup = new OptionGroup();\n maskModeOptionGroup.addOption(new Option(\"m\", false,\n \"maximum coincidence of file name and search key\"));\n maskModeOptionGroup.addOption(new Option(\"f\", false,\n \"full coincidence of file name and search key\"));\n maskModeOptionGroup.addOption(new Option(\"r\", false,\n \"search key - is a regular expression\"));\n options.addOptionGroup(maskModeOptionGroup);\n ArrayList<Option> maskModeOptions = new ArrayList<>(maskModeOptionGroup.getOptions());\n boolean maskModeOptionsIsGiven = false;\n options.addOption(\"o\", true, \"full output log-file path\");\n options.addOption(\"help\", false, \"Print help\");\n try {\n CommandLine line = parser.parse(options, args);\n if (line.hasOption(\"help\")) {\n new HelpFormatter().printHelp(\"Find\", options);\n System.exit(0);\n } else {\n if (line.hasOption(\"d\")) {\n this.directory = line.getOptionValue(\"d\");\n }\n if (line.hasOption(\"o\")) {\n this.output = line.getOptionValue(\"o\");\n }\n if (line.hasOption(\"n\")) {\n String[] masks = line.getOptionValues(\"n\");\n for (String mask : masks) {\n this.maskList.add(mask);\n }\n }\n for (Option option : maskModeOptions) {\n if (line.hasOption(option.getOpt())) {\n this.maskMode = option.getOpt();\n maskModeOptionsIsGiven = true;\n break;\n }\n }\n if (!line.hasOption(\"d\") || !line.hasOption(\"n\") || !line.hasOption(\"o\") || !maskModeOptionsIsGiven) {\n throw new ParseException(\"Missing option\");\n }\n }\n } catch (ParseException exp) {\n System.out.println(\"Unexpected exception during command line parsing occured: \" + exp.getMessage());\n new HelpFormatter().printHelp(\"Find\", options);\n System.exit(0);\n }\n }", "public interface CmdLineOption {\n \n /**\n * Checks if this option parser recognizes the specified\n * option name.\n */\n boolean accepts(String optionName);\n\n /**\n * Called if the option that this parser recognizes is found.\n * \n * @param parser\n * The parser that's using this option object.\n * \n * For example, if the option \"-quiet\" is simply an alias to\n * \"-verbose 5\", then the implementation can just call the\n * {@link CmdLineParser#parse(String[])} method recursively. \n * \n * @param params\n * The rest of the arguments. This method can use this\n * object to access the arguments of the option if necessary.\n * \n * @return\n * The number of arguments consumed. For example, return 0\n * if this option doesn't take any parameter.\n */\n int parseArguments( CmdLineParser parser, Parameters params ) throws CmdLineException;\n \n// /**\n// * Adds the usage message for this option. \n// * <p>\n// * This method is used to build usage message for the parser.\n// * \n// * @param buf\n// * Messages should be appended to this buffer.\n// * If you add something, make sure you add '\\n' at the end. \n// */\n// void appendUsage( StringBuffer buf );\n \n \n /**\n * SPI for {@link CmdLineOption}.\n * \n * Object of this interface is passed to\n * {@link CmdLineOption}s to make it easy/safe to parse\n * additional parameters for options.\n */\n public interface Parameters {\n /**\n * Gets the recognized option name.\n * \n * @return\n * This option name has been passed to the\n * {@link CmdLineOption#accepts(String)} method and\n * the method has returned <code>true</code>.\n */\n String getOptionName();\n \n /**\n * Gets the additional parameter to this option.\n * \n * @param idx\n * specifying 0 will retrieve the token next to the option.\n * For example, if the command line looks like \"-o abc -d x\",\n * then <code>getParameter(0)</code> for \"-o\" returns \"abc\"\n * and <code>getParameter(1)</code> will return \"-d\".\n * \n * @return\n * Always return non-null valid String. If an attempt is\n * made to access a non-existent index, this method throws\n * appropriate {@link CmdLineException}.\n */\n String getParameter( int idx ) throws CmdLineException;\n \n /**\n * The convenience method of\n * <code>Integer.parseInt(getParameter(idx))</code>\n * with proper error handling.\n * \n * @exception CmdLineException\n * If the parameter is not an integer, it throws an\n * approrpiate {@link CmdLineException}.\n */\n int getIntParameter( int idx ) throws CmdLineException;\n }\n \n}", "private static void parseCommandLine(String[] args) {\r\n\t\tif (args.length != 3)\r\n\t\t\terror(\"usage: Tester server port url-file\");\r\n\t\t\t\r\n\t\tserverName = args[0];\r\n\t\tserverPort = Integer.parseInt(args[1]);\r\n\t\turlFileName = args[2];\r\n\t}", "private static Map<String, String> getOptions(String[] args)\n {\n Map<String, String> options = new HashMap<>();\n\n for (int i = 0; i < args.length; i++) {\n if (args[i].charAt(0) == '-') {\n if (args[i].charAt(1) == '-') {\n if (args[i].length() < 3) {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n\n String arg = args[i].substring(2, args[i].length());\n String[] keyVal = arg.split(\"=\");\n if (keyVal.length != 2) {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n\n String optionKey = keyVal[0];\n String optionVal = keyVal[1];\n\n if (!Arrays.asList(validOptions).contains(optionKey)) {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n\n options.put(optionKey, optionVal);\n } else {\n throw new IllegalArgumentException(\"Not a valid argument: \" + args[i]);\n }\n }\n }\n\n return options;\n }", "public static void getInput(String[] commandOptions){\n\t \n\t if(commandOptions.length != 10) {\n\t System.out.println(\"You did not supply the correct number of arguments.\");\n\t System.exit(0);\n\t }\n\t \n\t int countD=0, countT=0, countB=0, countL=0, countR=0;\n\t for (int i=0; i<commandOptions.length; i++) {\n\t // Classify the argument as an option with the dash character\n\t if (commandOptions[i].startsWith(\"-\")) {\n\t // Testing for the the -d argument\n\t if (commandOptions[i].equals(\"-d\") && commandOptions.length > i) {\n\t // Make sure no duplicate command line options\n\t if(countD==1){\n\t System.out.println(\"Duplicate -d entries, try again\");\n\t System.exit(0);\n\t }\n\t // assign what the user has specified to d\n\t // We increment i by 1 more to skip over the value\n\t try {\n\t dimension = Integer.parseInt(commandOptions[++i]);\n\t if(dimension <= 0 || dimension > 25) {\n\t System.out.println(\"The parameter for -d must be greater than 0 and less than or equal to 25.\");\n\t System.exit(0);\n\t }\n\t } catch(NumberFormatException e) {\n\t System.out.println(\"The value supplied for -d is \"+commandOptions[i]+\" and is not an integer.\");\n\t System.exit(0);\n\t }\n\t countD++;\n\t \n\t }\n\t // Testing for the the -t argument\n\t else if (commandOptions[i].equals(\"-t\") && commandOptions.length > i){\n\t // Make sure no duplicate command line options\n\t if(countT==1){\n\t System.out.println(\"Duplicate -t entries, try again\");\n\t System.exit(0);\n\t }\n\t // assign what the user has specified to t\n\t // We increment i by 1 more to skip over the value\n\t try {\n\t topEdgeTemp = Double.parseDouble(commandOptions[++i]);\n\t if(topEdgeTemp < 0.0 || topEdgeTemp > 100.0) {\n\t System.out.println(\"The value for -t must be in the range [0.0,100.0].\");\n\t System.exit(0);\n\t }\n\t } catch(NumberFormatException e) {\n\t System.out.println(\"The value of -t is \"+commandOptions[i]+\" and is not a number.\");\n\t System.exit(0);\n\t }\n\t countT++;\n\t \n\t }\n\t // Testing for the the -l argument\n\t else if (commandOptions[i].equals(\"-l\") && commandOptions.length > i){\n\t // Make sure no duplicate command line options\n\t if(countL==1){\n\t System.out.println(\"Duplicate -l entries, try again\");\n\t System.exit(0);\n\t }\n\t // assign what the user has specified to l\n\t // We increment i by 1 more to skip over the value\n\t try {\n\t leftEdgeTemp = Double.parseDouble(commandOptions[++i]);\n\t if(leftEdgeTemp < 0.0 || leftEdgeTemp > 100.0) {\n\t System.out.println(\"The value for -l must be in the range [0.0,100.0].\");\n\t System.exit(0);\n\t }\n\t } catch(NumberFormatException e) {\n\t System.out.println(\"The value of -l is \"+commandOptions[i]+\" and is not a number.\");\n\t System.exit(0);\n\t }\n\t countL++;\n\t \n\t }\n\t // Testing for the the -r argument\n\t else if (commandOptions[i].equals(\"-r\") && commandOptions.length > i){\n\t // Make sure no duplicate command line options\n\t if(countR==1){\n\t System.out.println(\"Duplicate -r entries, try again\");\n\t System.exit(0);\n\t }\n\t // assign what the user has specified to r\n\t // We increment i by 1 more to skip over the value\n\t try {\n\t rightEdgeTemp = Double.parseDouble(commandOptions[++i]);\n\t if(rightEdgeTemp < 0.0 || rightEdgeTemp > 100.0) {\n\t System.out.println(\"The value for -r must be in the range [0.0,100.0].\");\n\t System.exit(0);\n\t }\n\t } catch(NumberFormatException e) {\n\t System.out.println(\"The value of -r is \"+commandOptions[i]+\" and is not a number.\");\n\t System.exit(0);\n\t }\n\t countR++;\n\t \n\t }\n\t // Testing for the the -b argument\n\t else if (commandOptions[i].equals(\"-b\") && commandOptions.length > i){\n\t // Make sure no duplicate command line options\n\t if(countB==1){\n\t System.out.println(\"Duplicate -b entries, try again\");\n\t System.exit(0);\n\t }\n\t // assign what the user has specified to b\n\t // We increment i by 1 more to skip over the value\n\t try {\n\t bottomEdgeTemp = Double.parseDouble(commandOptions[++i]);\n\t if(bottomEdgeTemp < 0.0 || bottomEdgeTemp > 100.0) {\n\t System.out.println(\"The value for -b must be in the range [0.0,100.0].\");\n\t System.exit(0);\n\t }\n\t } catch(NumberFormatException e) {\n\t System.out.println(\"The value of -b is \"+commandOptions[i]+\" and is not a number.\");\n\t System.exit(0);\n\t }\n\t countB++;\n\t \n\t }\n\t }\n\t }\n\t \n\t if(!(countD==1 && countT==1 && countB==1 && countL==1 && countR==1)){\n\t System.out.println(\"Invalid arguments supplied\");\n\t System.exit(0);\n\t }\n\t}", "protected void parse(CommandLine cli)\n {\n // Application ID option\n if(hasOption(cli, Opt.APPLICATION_ID, false))\n {\n applicationId = Long.parseLong(getOptionValue(cli, Opt.APPLICATION_ID));\n logOptionValue(Opt.APPLICATION_ID, applicationId);\n }\n\n // Server ID option\n if(hasOption(cli, Opt.SERVER_ID, false))\n {\n serverId = Long.parseLong(getOptionValue(cli, Opt.SERVER_ID));\n logOptionValue(Opt.SERVER_ID, serverId);\n }\n\n // Category option\n if(hasOption(cli, Opt.CATEGORY, true))\n {\n category = getOptionValue(cli, Opt.CATEGORY);\n logOptionValue(Opt.CATEGORY, category);\n }\n\n // Name option\n if(hasOption(cli, Opt.NAME, true))\n {\n name = getOptionValue(cli, Opt.NAME);\n logOptionValue(Opt.NAME, name);\n }\n }", "public ArgumentsParser() {\n this(new String[0]);\n }", "public static CommandLine parseCommandLine(String[] args) {\n Options options = getOptions();\n CommandLineParser cmdLineParser = new DefaultParser();\n\n CommandLine cmdLine = null;\n try {\n cmdLine = cmdLineParser.parse(options, args);\n } catch (ParseException pe) {\n printHelp(options);\n System.exit(1);\n }\n\n if (cmdLine == null) {\n printHelp(options);\n System.exit(1);\n }\n\n if (cmdLine.hasOption(\"help\")) {\n printHelp(options);\n System.exit(0);\n }\n\n return cmdLine;\n }", "private void _init(String[] _args, String[] _optList, OptionHandler _optHandler, \n HashMap _customOpts,\n boolean _wantOutput, int _numDtds, String _cmdLineSyntax, \n String _usageHeader) \n {\n args = _args;\n optList = _optList;\n optHandler = _optHandler;\n customOpts = _customOpts;\n wantOutput = _wantOutput;\n numDtds = _numDtds;\n cmdLineSyntax = _cmdLineSyntax;\n usageHeader = _usageHeader;\n }", "private static Params parseCLI(String[] args) {\n Params params = new Params();\n\n if(args.length>1) {\n int paramIndex = 0;\n for(int i=0; i<args.length; i++) {\n String arg = args[i];\n OutputType type = OutputType.getOutputType(arg);\n if(type!=null) {\n params.outputType = type;\n paramIndex = i;\n break;\n } else if(\"-help\".equals(arg)) {\n usage();\n System.exit(0);\n }\n }\n\n params.inputFile = args[paramIndex+1];\n if(args.length>paramIndex+2) {\n params.outputFile = args[paramIndex+2];\n }\n\n } else if(args.length == 1 && \"-help\".equals(args[0])) {\n usage();\n System.exit(0);\n\n } else {\n \n System.err.println(\"Error, incorrect usage\");\n usage();\n System.exit(-1);\n\n }\n\n return params;\n }", "public BwaOptions(String[] args) {\n\n\t\t//Parse arguments\n\t\tfor (String argument : args) {\n\t\t\tLOG.info(\"[\"+this.getClass().getName()+\"] :: Received argument: \" + argument);\n\t\t}\n\n\t\t//Algorithm options\n\t\tthis.options = this.initOptions();\n\n\t\t//To print the help\n\t\tHelpFormatter formatter = new HelpFormatter();\n\t\t//formatter.setWidth(500);\n\t\t//formatter.printHelp( correctUse,header, options,footer , true);\n\n\t\t//Parse the given arguments\n\t\tCommandLineParser parser = new BasicParser();\n\t\tCommandLine cmd;\n\n\t\ttry {\n\t\t\tcmd = parser.parse(this.options, args);\n\n\t\t\t//We look for the algorithm\n\t\t\tif (cmd.hasOption('m') || cmd.hasOption(\"mem\")){\n\t\t\t\t//Case of the mem algorithm\n\t\t\t\tmemAlgorithm = true;\n\t\t\t\talnAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\t\t\telse if(cmd.hasOption('a') || cmd.hasOption(\"aln\")){\n\t\t\t\t// Case of aln algorithm\n\t\t\t\talnAlgorithm = true;\n\t\t\t\tmemAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\t\t\telse if(cmd.hasOption('b') || cmd.hasOption(\"bwasw\")){\n\t\t\t\t// Case of bwasw algorithm\n\t\t\t\tbwaswAlgorithm = true;\n\t\t\t\tmemAlgorithm = false;\n\t\t\t\talnAlgorithm = false;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t// Default case. Mem algorithm\n\t\t\t\tLOG.warn(\"[\"+this.getClass().getName()+\"] :: The algorithm \"\n\t\t\t\t\t\t+ cmd.getOptionValue(\"algorithm\")\n\t\t\t\t\t\t+ \" could not be found\\nSetting to default mem algorithm\\n\");\n\n\t\t\t\tmemAlgorithm = true;\n\t\t\t\talnAlgorithm = false;\n\t\t\t\tbwaswAlgorithm = false;\n\t\t\t}\n\n\t\t\t//We look for the index\n\t\t\tif (cmd.hasOption(\"index\") || cmd.hasOption('i')) {\n\t\t\t\tindexPath = cmd.getOptionValue(\"index\");\n\t\t\t}\n\t\t/* There is no need of this, as the index option is mandatory\n\t\telse {\n\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] :: No index has been found. Aborting.\");\n\t\t\tformatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tSystem.exit(1);\n\t\t}*/\n\n\t\t\t//Partition number\n\t\t\tif (cmd.hasOption(\"partitions\") || cmd.hasOption('n')) {\n\t\t\t\tpartitionNumber = Integer.parseInt(cmd.getOptionValue(\"partitions\"));\n\t\t\t}\n\n\t\t\t// BWA arguments\n\t\t\tif (cmd.hasOption(\"bwa\") || cmd.hasOption('w')) {\n\t\t\t\tbwaArgs = cmd.getOptionValue(\"bwa\");\n\t\t\t}\n\n\t\t\t// Paired or single reads\n\t\t\tif (cmd.hasOption(\"paired\") || cmd.hasOption('p')) {\n\t\t\t\tpairedReads = true;\n\t\t\t\tsingleReads = false;\n\t\t\t}\n\t\t\telse if (cmd.hasOption(\"single\") || cmd.hasOption('s')) {\n\t\t\t\tpairedReads = false;\n\t\t\t\tsingleReads = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tLOG.warn(\"[\"+this.getClass().getName()+\"] :: Reads argument could not be found\\nSetting it to default paired reads\\n\");\n\t\t\t\tpairedReads = true;\n\t\t\t\tsingleReads = false;\n\t\t\t}\n\n\t\t\t// Sorting\n\t\t\tif (cmd.hasOption('f') || cmd.hasOption(\"hdfs\")) {\n\t\t\t\tthis.sortFastqReadsHdfs = true;\n\t\t\t\tthis.sortFastqReads = false;\n\t\t\t}\n\t\t\telse if (cmd.hasOption('k') || cmd.hasOption(\"spark\")) {\n\t\t\t\tthis.sortFastqReadsHdfs = false;\n\t\t\t\tthis.sortFastqReads = true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthis.sortFastqReadsHdfs = false;\n\t\t\t\tthis.sortFastqReads = false;\n\t\t\t}\n\n\t\t\t// Use reducer\n\t\t\tif (cmd.hasOption('r') || cmd.hasOption(\"reducer\")) {\n\t\t\t\tthis.useReducer = true;\n\t\t\t}\n\n\t\t\t// Help\n\t\t\tif (cmd.hasOption('h') || cmd.hasOption(\"help\")) {\n\t\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\t\tthis.printHelp();\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\t//Input and output paths\n\t\t\tString otherArguments[] = cmd.getArgs(); //With this we get the rest of the arguments\n\n\t\t\tif ((otherArguments.length != 2) && (otherArguments.length != 3)) {\n\t\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] No input and output has been found. Aborting.\");\n\n\t\t\t\tfor (String tmpString : otherArguments) {\n\t\t\t\t\tLOG.error(\"[\"+this.getClass().getName()+\"] Other args:: \" + tmpString);\n\t\t\t\t}\n\n\t\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\telse if (otherArguments.length == 2) {\n\t\t\t\tinputPath = otherArguments[0];\n\t\t\t\toutputPath = otherArguments[1];\n\t\t\t}\n\t\t\telse if (otherArguments.length == 3) {\n\t\t\t\tinputPath = otherArguments[0];\n\t\t\t\tinputPath2 = otherArguments[1];\n\t\t\t\toutputPath = otherArguments[2];\n\t\t\t}\n\n\t\t} catch (UnrecognizedOptionException e) {\n\t\t\te.printStackTrace();\n\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tthis.printHelp();\n\t\t\tSystem.exit(1);\n\t\t} catch (MissingOptionException e) {\n\t\t\t//formatter.printHelp(correctUse, header, options, footer, true);\n\t\t\tthis.printHelp();\n\t\t\tSystem.exit(1);\n\t\t} catch (ParseException e) {\n\t\t\t//formatter.printHelp( correctUse,header, options,footer , true);\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t}", "HashMap<String, String> cliParser(String[] args){\n CmdLineParser parser = new CmdLineParser(this);\n try {\n // parse the arguments.\n parser.parseArgument(args);\n\n if (this.printHelp) {\n System.err.println(\"Usage:\");\n parser.printUsage(System.err);\n System.err.println();\n System.exit(0);\n }\n } catch( CmdLineException e ) {\n System.err.println(e.getMessage());\n System.err.println(\"java BGPCommunitiesParser.jar [options...] arguments...\");\n // print the list of available options\n parser.printUsage(System.err);\n System.err.println();\n\n // print option sample. This is useful some time\n System.err.println(\" Example: java BGPCommunitiesParser.jar\"+parser.printExample(ALL));\n System.exit(0);\n }\n\n HashMap<String, String> cliArgs = new HashMap<>();\n String[] period;\n long startTs = 0;\n long endTs = 0;\n // parse the period argument\n try{\n period = this.period.split(\",\");\n startTs = this.dateToEpoch(period[0]);\n endTs = this.dateToEpoch(period[1]);\n if (startTs >= endTs){\n System.err.println(\"The period argument is invalid. \" +\n \"The start datetime should be before the end datetime.\");\n System.exit(-1);\n }\n }\n catch (java.lang.ArrayIndexOutOfBoundsException e) {\n System.err.println(\"The period argument is invalid. \" +\n \"Please provide two comma-separated datetimes in the format YYYMMMDD.hhmm \" +\n \"(e.g. 20180124.0127,20180125.1010).\");\n System.exit(-1);\n }\n\n cliArgs.put(\"communities\", this.communities);\n cliArgs.put(\"start\", Long.toString(startTs));\n cliArgs.put(\"end\", Long.toString(endTs));\n cliArgs.put(\"collectors\", this.collectors);\n cliArgs.put(\"outdir\", this.outdir);\n cliArgs.put(\"facilities\", this.facilities);\n cliArgs.put(\"overlap\", Long.toString(this.overlap));\n return cliArgs;\n }", "public static Options prepCliParser()\n\t{\n\t\tOptions knowsCliDtd = new Options();\n\t\tfinal boolean needsEmbelishment = true;\n\t\tknowsCliDtd.addOption( configFlagS, configFlagLong, needsEmbelishment,\n\t\t\t\t\"path to config (ex C:\\\\Program Files\\\\apache\\\\tomcat.txt)\" );\n\t\tknowsCliDtd.addOption( verboseFlagS, verboseFlagLong,\n\t\t\t\t! needsEmbelishment, \"show debug information\" );\n\t\tknowsCliDtd.addOption( helpFlagS, helpFlagLong,\n\t\t\t\t! needsEmbelishment, \"show arg flags\" );\n\t\treturn knowsCliDtd;\n\t}", "private void initOptions() {\n\t\t// TODO: ???\n\t\t// additional input docs via --dir --includes --excludes --recursive\n\t\t// --loglevel=debug\n\t\t// --optionally validate output as well?\n\t\t\n\t\tthis.sb = new StringBuffer();\n\t\tArrayList options = new ArrayList();\n\t\toptions.add( new LongOpt(\"help\", LongOpt.NO_ARGUMENT, null, 'h') );\n\t\toptions.add( new LongOpt(\"version\", LongOpt.NO_ARGUMENT, null, 'v') );\t\t\n\t\toptions.add( new LongOpt(\"query\", LongOpt.REQUIRED_ARGUMENT, sb, 'q') );\n\t\toptions.add( new LongOpt(\"base\", LongOpt.REQUIRED_ARGUMENT, sb, 'b') );\n\t\toptions.add( new LongOpt(\"var\", LongOpt.REQUIRED_ARGUMENT, sb, 'P') );\n\t\toptions.add( new LongOpt(\"out\", LongOpt.REQUIRED_ARGUMENT, sb, 'o') );\n\t\toptions.add( new LongOpt(\"algo\", LongOpt.REQUIRED_ARGUMENT, sb, 'S') );\n\t\toptions.add( new LongOpt(\"encoding\", LongOpt.REQUIRED_ARGUMENT, sb, 'E') );\n\t\toptions.add( new LongOpt(\"indent\", LongOpt.REQUIRED_ARGUMENT, sb, 'I') );\t\n\t\toptions.add( new LongOpt(\"strip\", LongOpt.NO_ARGUMENT, null, 's') );\t\t\n\t\toptions.add( new LongOpt(\"update\", LongOpt.REQUIRED_ARGUMENT, sb, 'u') );\t\n\t\toptions.add( new LongOpt(\"xinclude\", LongOpt.NO_ARGUMENT, null, 'x') );\t\t\n\t\toptions.add( new LongOpt(\"explain\", LongOpt.NO_ARGUMENT, null, 'e') );\n\t\toptions.add( new LongOpt(\"noexternal\", LongOpt.NO_ARGUMENT, null, 'n') );\t\t\n\t\toptions.add( new LongOpt(\"runs\", LongOpt.REQUIRED_ARGUMENT, sb, 'r') );\n\t\toptions.add( new LongOpt(\"iterations\", LongOpt.REQUIRED_ARGUMENT, sb, 'i') );\n\t\toptions.add( new LongOpt(\"docpoolcapacity\", LongOpt.REQUIRED_ARGUMENT, sb, 'C') );\n\t\toptions.add( new LongOpt(\"docpoolcompression\", LongOpt.REQUIRED_ARGUMENT, sb, 'D') );\n\t\toptions.add( new LongOpt(\"nobuilderpool\", LongOpt.NO_ARGUMENT, null, 'p') );\n\t\toptions.add( new LongOpt(\"debug\", LongOpt.NO_ARGUMENT, null, 'd') );\t\t\n\t\toptions.add( new LongOpt(\"validate\", LongOpt.REQUIRED_ARGUMENT, sb, 'V') ); \n\t\toptions.add( new LongOpt(\"namespace\", LongOpt.REQUIRED_ARGUMENT, sb, 'W') ); \n\t\toptions.add( new LongOpt(\"schema\", LongOpt.REQUIRED_ARGUMENT, sb, 'w') );\n\t\toptions.add( new LongOpt(\"filterpath\", LongOpt.REQUIRED_ARGUMENT, sb, 'f') );\n\t\toptions.add( new LongOpt(\"filterquery\", LongOpt.REQUIRED_ARGUMENT, sb, 'F') );\n\t\toptions.add( new LongOpt(\"xomxpath\", LongOpt.NO_ARGUMENT, null, 'N') );\t\t\n\t\t\n////\t\toptions.add( new LongOpt(\"loglevel\", LongOpt.REQUIRED_ARGUMENT, sb, 'l') ); setLogLevels(Level.INFO);\n\t\t\t\n\t\tthis.longOpts = new LongOpt[options.size()];\n\t\toptions.toArray(this.longOpts);\t\t\n\t}", "private void parseArgs(String[] args) throws ParseException\n {\n CommandLineParser parser = new PosixParser();\n cmd = parser.parse(options, args);\n }", "public OptionParser() {\n\n\t}", "public CommandArguments parse(String[] args) {\n ErrorSupport command = new ErrorSupport();\n command.checkLength(args);\n\n //parsing arguments\n CommandArguments arguments = new CommandArguments();\n for (int i = 0; i < args.length; i++) {\n if ((i == args.length - 1) && !args[i].equals(\"--help\")) {\n throw new IllegalArgumentException(\"Incorrect argument, --help for more information about app syntax\");\n }\n switch (args[i]) {\n case (\"--help\"):\n System.out.println(\"\\nHELP MENU \\nAvailable options and arguments: \\n \\t--latitude x \\t-enter latitude coordinate \\n \\t--longitude x\\t-enter longitude coordinate \\n \\t--sensorid x \\t-enter sensor's Id \\n \\t--apikey x \\t\\t-enter API key \\n \\t--history x \\t-enter number of hours to display from history data\\n\");\n System.exit(0);\n case (\"--latitude\"):\n i++;\n arguments.setLatitude(command.checkIsDouble(args[i]));\n break;\n case (\"--longitude\"):\n i++;\n arguments.setLongitude(command.checkIsDouble(args[i]));\n break;\n case (\"--sensorid\"):\n i++;\n arguments.setSensorId(command.checkIsInt(args[i]));\n break;\n case (\"--apikey\"):\n i++;\n arguments.setApiKey(command.checkApiKey(args[i]));\n break;\n case (\"--history\"):\n i++;\n arguments.setHistory(command.checkIsInt(args[i]));\n break;\n default:\n throw new IllegalArgumentException(\"Incorrect option, --help for more information about app syntax\");\n }\n }\n\n //checking environment API_KEY if there was no apikey in command line entered\n if (!arguments.hasApiKey() && System.getenv(\"API_KEY\") == null) {\n throw new IllegalArgumentException(\"No API Key found, check if you have entered the correct key or if there is a suitable environment variable ( API_KEY ), --help for more information about app syntax\");\n } else if (!arguments.hasApiKey()) {\n arguments.setApiKey(command.checkApiKey(System.getenv(\"API_KEY\")));\n }\n return arguments;\n }", "private static void parseCommandLine(String[] command) {\r\n\t\tint i = 0;\r\n\t\t\r\n\t\twhile (i < command.length) {\r\n\t\t\tif (command[i].equals(\"-f\")) { // input file\r\n\t\t\t\tdataFileName = command[i+1];\r\n\t\t\t\ti += 2;\r\n\t\t\t}\r\n\t\t\telse if (command[i].equals(\"-s\")) { // data split\r\n\t\t\t\tif (command[i+1].equals(\"simple\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.SIMPLE_SPLIT;\r\n\t\t\t\t\ttestRatio = Double.parseDouble(command[i+2]);\r\n\t\t\t\t}\r\n\t\t\t\telse if (command[i+1].equals(\"pred\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.PREDEFINED_SPLIT;\r\n\t\t\t\t\tsplitFileName = command[i+2].trim();\r\n\t\t\t\t}\r\n\t\t\t\telse if (command[i+1].equals(\"kcv\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.K_FOLD_CROSS_VALIDATION;\r\n\t\t\t\t\tfoldCount = Integer.parseInt(command[i+2]);\r\n\t\t\t\t}\r\n\t\t\t\telse if (command[i+1].equals(\"rank\")) {\r\n\t\t\t\t\tevaluationMode = DataSplitManager.RANK_EXP_SPLIT;\r\n\t\t\t\t\tuserTrainCount = Integer.parseInt(command[i+2]);\r\n\t\t\t\t\tminTestCount = 10;\r\n\t\t\t\t}\r\n\t\t\t\ti += 3;\r\n\t\t\t}\r\n\t\t\telse if (command[i].equals(\"-a\")) { // algorithm\r\n\t\t\t\trunAllAlgorithms = false;\r\n\t\t\t\talgorithmCode = command[i+1];\r\n\t\t\t\t\r\n\t\t\t\t// parameters for the algorithm:\r\n\t\t\t\tint j = 0;\r\n\t\t\t\twhile (command.length > i+2+j && !command[i+2+j].startsWith(\"-\")) {\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\talgorithmParameters = new String[j];\r\n\t\t\t\tSystem.arraycopy(command, i+2, algorithmParameters, 0, j);\r\n\t\t\t\t\r\n\t\t\t\ti += (j + 2);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void parseArguments(String[] args, MiParaPipeLine p) throws IOException{\n options.addOption(\"i\", \"input-file\", true, \"FASTA input file for query sequences\");\n options.addOption(\"o\", \"output-folder\", true, \"output folder for prediction results\");\n options.addOption(\"t\", \"test\", true, \"run test example \");\n options.addOption(\"c\", \"config\", true, \"configuration file for miRPara\");\n options.addOption(\"a\", \"action\", true, \"action to perform\");\n options.addOption(\"h\", \"help \", false, \"print help\");\n\n logger.trace(\"parsing args\");\n CommandLineParser parser = new BasicParser();\n CommandLine cmd = null;\n\n \n try {\n cmd = parser.parse(options, args);\n if (cmd.hasOption(\"h\")){\n print_help();\n System.out.print(p.reportAvailableActions());\n }\n\n if (cmd.hasOption(\"t\")){ \n logger.info(\"test set to \" + cmd.getOptionValue(\"l\"));\n test = cmd.getOptionValue(\"t\").toLowerCase();\n }\n \n if (cmd.hasOption(\"i\")) {\n logger.info(\"input file set to \" + cmd.getOptionValue(\"i\"));\n p.setInputFilename(cmd.getOptionValue(\"i\"));\t\n } \n\n if (cmd.hasOption(\"o\")){\n logger.info(\"output folder is\" + cmd.getOptionValue(\"o\"));\n p.setOutputFolder(cmd.getOptionValue(\"o\"));\n }\n \n if (cmd.hasOption(\"a\")){\n logger.info(\"requested action is \" + cmd.getOptionValue(\"a\"));\n p.setAction(cmd.getOptionValue(\"a\"));\n }\n \n if (cmd.hasOption(\"c\")){\n configFile = cmd.getOptionValue(\"c\");\n logger.info(\"Configuration file is \" + configFile);\n p.setConfigFilename(configFile);\n }\n\n\n \n if(p.getConfigFilename()==null){\n throw new ParseException(\"no configuration file was specified\") ; \n }\n \n if(new File(p.getConfigFilename()).exists() == false){\n throw new IOException(\"configuration file <\" + p.getConfigFilename() + \"> does not exist\");\n } \n \n if(new File(p.getInputFilename()).exists()== false)\n {\n throw new IOException(\"input file <\" + p.getInputFilename() + \"> does not exist\");\n }\n \n if(new File(p.getOutputFolder()).exists() == false)\n {\n if (new File(p.getOutputFolder()).getParentFile().exists() == false)\n throw new IOException(\"parent file <\" + new File(p.getOutputFolder()).getParentFile() + \"> does not exist\");\n \n new File(p.getOutputFolder()).mkdir();\n logger.info(\"create results folder <\" + p.getOutputFolder() + \">\");\n }\n\n } catch (ParseException e) {\n\n logger.fatal(\"Failed to parse command line properties\", e);\n print_help();\n\n }\n\n \n }", "private static Options createOptions() {\n \n \t\tOptions options = new Options();\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the input file / directory\");\n \t\tOptionBuilder.isRequired(true);\n \t\toptions.addOption(OptionBuilder.create(\"input\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"int\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"minimum size of file in MB to split (Default: \" + MIN_FILE_SIZE + \" MB)\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"minsize\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the ignore list file\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"ignore\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the output directory\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"output\"));\n \t\t\n \t\tOptionBuilder.withArgName(\"path\");\n \t\tOptionBuilder.hasArg(true);\n \t\tOptionBuilder.withDescription(\"path to the osmosis script template\");\n \t\tOptionBuilder.isRequired(false);\n \t\toptions.addOption(OptionBuilder.create(\"template\"));\n \t\t\n \t\treturn options;\n \t\t\n \t}", "public boolean parse() {\n \n // create the version option\n Option optVersion = new Option(\"V\", \"version\", false, localization.getMessage(\"Help_Version\"));\n \n // create the help option\n Option optHelp = new Option(\"h\", \"help\", false, localization.getMessage(\"Help_Help\"));\n \n // create the log option\n Option optLog = new Option(\"l\", \"log\", false, localization.getMessage(\"Help_Log\"));\n \n // create the verbose option\n Option optVerbose = new Option(\"v\", \"verbose\", false, localization.getMessage(\"Help_Verbose\"));\n \n // create the timeout option\n Option optTimeout = new Option(\"t\", \"timeout\", true, localization.getMessage(\"Help_Timeout\"));\n \n // create the language option\n Option optLanguage = new Option(\"L\", \"language\", true, localization.getMessage(\"Help_Language\"));\n \n // add version\n commandLineOptions.addOption(optVersion);\n \n // add help\n commandLineOptions.addOption(optHelp);\n \n // add log\n commandLineOptions.addOption(optLog);\n \n // add verbose\n commandLineOptions.addOption(optVerbose);\n \n // add timeout\n commandLineOptions.addOption(optTimeout);\n \n // add language\n commandLineOptions.addOption(optLanguage);\n \n // create a new basic parser\n CommandLineParser parser = new BasicParser();\n \n // lets try to parse everthing\n try {\n \n // parse the arguments\n CommandLine line = parser.parse(commandLineOptions, theArgs);\n \n // if -L or --language found\n if (line.hasOption(\"language\")) {\n \n // create a new language controler\n LanguageController language = new LanguageController();\n \n // if the attempt to set the language according to the command\n // line has failed\n if (!language.setLanguage(line.getOptionValue(\"language\"))) {\n \n // print the list of available languages\n language.printLanguageHelp();\n \n // print the usage\n printUsage();\n \n // and simply return\n return false;\n }\n }\n \n // if -h or --help found\n if (line.hasOption(\"help\")) {\n \n // print version\n printVersion();\n \n // and usage\n printUsage();\n \n // return\n return false;\n \n } else {\n \n // if -v or --version found\n if (line.hasOption(\"version\")) {\n \n // print version\n printVersion();\n \n printSpecialThanks();\n \n // and return\n return false;\n \n } else {\n \n // get the list of files\n String[] files = line.getArgs();\n \n // we only expect one file\n if (files.length != 1) {\n \n // print version\n printVersion();\n \n // usage\n printUsage();\n \n // and return\n return false;\n \n } else {\n \n // if -t or --timeout found\n if (line.hasOption(\"timeout\")) {\n \n // try to convert the argument to a number\n try {\n \n // parse the long value\n executionTimeout = Long.parseLong(line.getOptionValue(\"timeout\"));\n \n // if it's not a valid number\n if (executionTimeout <= 0) {\n \n // print version\n printVersion();\n \n // usage\n printUsage();\n \n // and return\n return false;\n \n }\n } catch (NumberFormatException numberFormatException) {\n \n // we have a bad conversion\n \n // print version\n printVersion();\n \n // usage\n printUsage();\n \n // and return\n return false;\n }\n } else {\n \n // fallback to the default value, that is,\n // timeout is disabled\n executionTimeout = 0;\n }\n \n // active logging\n AraraLogging.enableLogging(line.hasOption(\"log\"));\n \n // set verbose flag\n showVerboseOutput = line.hasOption(\"verbose\");\n \n // everything is fine, set\n // the file\n theFile = files[0];\n \n // check if file exists\n if (!checkFile(theFile, configuration.getValidExtensions())) {\n \n // file not found, return false\n return false;\n \n }\n \n // and return\n return true;\n }\n }\n }\n \n } catch (ParseException parseException) {\n \n // something happened, in the last case print version\n printVersion();\n \n // and usage\n printUsage();\n \n // and simply return\n return false;\n \n }\n }", "public void processArgs(String[] args){\n\t\t//look for a config file \n\t\targs = appendConfigArgs(args,\"-c\");\n\t\t\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tFile forExtraction = null;\n\t\tFile configFile = null;\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'f': forExtraction = new File(args[++i]); break;\n\t\t\t\t\tcase 'v': vcfFileFilter = args[++i]; break;\n\t\t\t\t\tcase 'b': bedFileFilter = args[++i]; break;\n\t\t\t\t\tcase 'x': appendFilter = false; break;\n\t\t\t\t\tcase 'c': configFile = new File(args[++i]); break;\n\t\t\t\t\tcase 'd': dataDir = new File(args[++i]); break;\n\t\t\t\t\tcase 'm': maxCallFreq = Double.parseDouble(args[++i]); break;\n\t\t\t\t\tcase 'o': minBedCount = Integer.parseInt(args[++i]); break;\n\t\t\t\t\tcase 's': saveDirectory = new File(args[++i]); break;\n\t\t\t\t\tcase 'e': debug = true; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printErrAndExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//config file? or local\n\t\tif (configLines != null && configFile != null){\n\t\t\tif (configLines[0].startsWith(\"-\") == false ) {\n\t\t\t\tHashMap<String, String> config = IO.loadFileIntoHashMapLowerCaseKey(configFile);\n\t\t\t\tif (config.containsKey(\"queryurl\")) queryURL = config.get(\"queryurl\");\n\t\t\t\tif (config.containsKey(\"host\")) host = config.get(\"host\");\n\t\t\t\tif (config.containsKey(\"realm\")) realm = config.get(\"realm\");\n\t\t\t\tif (config.containsKey(\"username\")) userName = config.get(\"username\");\n\t\t\t\tif (config.containsKey(\"password\")) password = config.get(\"password\");\n\t\t\t\tif (config.containsKey(\"maxcallfreq\")) maxCallFreq = Double.parseDouble(config.get(\"maxcallfreq\"));\n\t\t\t\tif (config.containsKey(\"vcffilefilter\")) vcfFileFilter = config.get(\"vcffilefilter\");\n\t\t\t\tif (config.containsKey(\"bedfilefilter\")) bedFileFilter = config.get(\"bedfilefilter\");\n\t\t\t}\n\t\t}\n\t\t//local search?\n\t\tif (queryURL == null){\n\t\t\tif (dataDir == null || dataDir.isDirectory()== false) {\n\t\t\t\tMisc.printErrAndExit(\"\\nProvide either a configuration file for remotely accessing a genomic query service or \"\n\t\t\t\t\t\t+ \"set the -d option to the Data directory created by the GQueryIndexer app.\\n\");;\n\t\t\t}\n\t\t}\n\n\t\tIO.pl(\"\\n\"+IO.fetchUSeqVersion()+\" Arguments:\");\n\t\tIO.pl(\"\\t-f Vcfs \"+forExtraction);\n\t\tIO.pl(\"\\t-s SaveDir \"+saveDirectory);\n\t\tIO.pl(\"\\t-v Vcf File Filter \"+vcfFileFilter);\n\t\tIO.pl(\"\\t-b Bed File Filter \"+bedFileFilter);\n\t\tIO.pl(\"\\t-m MaxCallFreq \"+maxCallFreq);\n\t\tIO.pl(\"\\t-o MinBedCount \"+minBedCount);\n\t\tIO.pl(\"\\t-x Remove failing \"+(appendFilter==false));\n\t\tIO.pl(\"\\t-e Verbose \"+debug);\n\t\tif (queryURL != null){\n\t\t\tIO.pl(\"\\tQueryUrl \"+queryURL);\n\t\t\tIO.pl(\"\\tHost \"+host);\n\t\t\tIO.pl(\"\\tRealm \"+realm);\n\t\t\tIO.pl(\"\\tUserName \"+userName);\n\t\t\t//check config params\n\t\t\tif (queryURL == null) Misc.printErrAndExit(\"\\nError: failed to find a queryUrl in the config file, e.g. queryUrl http://hci-clingen1.hci.utah.edu:8080/GQuery/\");\n\t\t\tif (queryURL.endsWith(\"/\") == false) queryURL = queryURL+\"/\";\n\t\t\tif (host == null) Misc.printErrAndExit(\"\\nError: failed to find a host in the config file, e.g. host hci-clingen1.hci.utah.edu\");\n\t\t\tif (realm == null) Misc.printErrAndExit(\"\\nError: failed to find a realm in the config file, e.g. realm QueryAPI\");\n\t\t\tif (userName == null) Misc.printErrAndExit(\"\\nError: failed to find a userName in the config file, e.g. userName FCollins\");\n\t\t\tif (password == null) Misc.printErrAndExit(\"\\nError: failed to find a password in the config file, e.g. password g0QueryAP1\");\n\n\t\t}\n\t\telse IO.pl(\"\\t-d DataDir \"+dataDir);\n\t\tIO.pl();\n\n\t\t//pull vcf files\n\t\tif (forExtraction == null || forExtraction.exists() == false) Misc.printErrAndExit(\"\\nError: please enter a path to a vcf file or directory containing such.\\n\");\n\t\tFile[][] tot = new File[3][];\n\t\ttot[0] = IO.extractFiles(forExtraction, \".vcf\");\n\t\ttot[1] = IO.extractFiles(forExtraction,\".vcf.gz\");\n\t\ttot[2] = IO.extractFiles(forExtraction,\".vcf.zip\");\n\t\tvcfFiles = IO.collapseFileArray(tot);\n\t\tif (vcfFiles == null || vcfFiles.length ==0 || vcfFiles[0].canRead() == false) Misc.printExit(\"\\nError: cannot find your xxx.vcf(.zip/.gz OK) file(s)!\\n\");\n\n\t\t//check params\n\t\tif (vcfFileFilter == null) Misc.printErrAndExit(\"\\nError: provide a vcf file filter, e.g. Hg38/Somatic/Avatar/Vcf \");\n\t\tif (bedFileFilter == null) Misc.printErrAndExit(\"\\nError: provide a bed file filter, e.g. Hg38/Somatic/Avatar/Bed \");\n\t\tif (saveDirectory == null) Misc.printErrAndExit(\"\\nError: provide a directory to save the annotated vcf files.\");\n\t\telse saveDirectory.mkdirs();\n\t\tif (saveDirectory.exists() == false) Misc.printErrAndExit(\"\\nError: could not find your save directory? \"+saveDirectory);\n\n\t\tuserQueryVcf = new UserQuery().addRegExFileName(\".vcf.gz\").addRegExDirPath(vcfFileFilter).matchVcf();\n\t\tuserQueryBed = new UserQuery().addRegExFileName(\".bed.gz\").addRegExDirPath(bedFileFilter);\n\t}", "protected int parseOptions(final String[] args) {\n\t\tOptions options = new Options();\n\t\toptions.addOption(\"a\", \"start\", true, \"Start an asynchronous task\");\n\t\toptions.addOption(\"h\", \"hostname\", true, \"Specify the hostname to connect to\");\n\t\toptions.addOption(\"l\", \"list\", false, \"List the available asynchronous tasks\");\n\t\toptions.addOption(\"o\", \"stop\", true, \"Stop an asynchronous task\");\n\t\toptions.addOption(\"p\", \"port\", true, \"Specify the port to connect to\");\n\t\toptions.addOption(\"i\", \"identifier\", true, \"Specify the identifier to synchronize\");\n\t\toptions.addOption(\"t\", \"attributes\", true, \"Specify the attributes pivot to synchronize (comma separated, identifier parameter required)\");\n\t\toptions.addOption(\"s\", \"status\", true, \"Get a task status\");\n\n\t\tCommandLineParser parser = new GnuParser();\n\n\t\ttry {\n\t\t\tCommandLine cmdLine = parser.parse(options, args);\n\t\t\tif ( cmdLine.hasOption(\"a\") ) {\n\t\t\t\toperation = OperationType.START;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"a\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"l\") ) {\n\t\t\t\toperation = OperationType.TASKS_LIST;\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"o\") ) {\n\t\t\t\toperation = OperationType.STOP;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"o\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"s\") ) {\n\t\t\t\toperation = OperationType.STATUS;\n\t\t\t\ttaskName = cmdLine.getOptionValue(\"s\");\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"i\") ) {\n\t\t\t\tidToSync = cmdLine.getOptionValue(\"i\");\n\t\t\t\tif(cmdLine.hasOption(\"t\")) {\n\t\t\t\t\tStringTokenizer attrsStr = new StringTokenizer(cmdLine.getOptionValue(\"t\"),\",\");\n\t\t\t\t\twhile(attrsStr.hasMoreTokens()) {\n\t\t\t\t\t\tString token = attrsStr.nextToken();\n\t\t\t\t\t\tif(token.contains(\"=\")) {\n\t\t\t\t\t\t\tattrsToSync.put(token.substring(0, token.indexOf(\"=\")), token.substring(token.indexOf(\"=\")+1));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLOGGER.error(\"Unknown attribute name=value couple in \\\"{}\\\". Please check your parameters !\", token);\n\t\t\t\t\t\t\tprintHelp(options);\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (cmdLine.hasOption(\"t\") ) {\n\t\t\t\tLOGGER.error(\"Attributes specified, but missing identifier !\");\n\t\t\t\tprintHelp(options);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"h\") ) {\n\t\t\t\thostname = cmdLine.getOptionValue(\"h\");\n\t\t\t} else {\n\t\t\t\thostname = \"localhost\";\n\t\t\t\tLOGGER.info(\"Hostname parameter not specified, using {} as default value.\", hostname);\n\t\t\t}\n\t\t\tif ( cmdLine.hasOption(\"p\") ) {\n\t\t\t\tport = cmdLine.getOptionValue(\"p\");\n\t\t\t} else {\n\t\t\t\tport = \"1099\";\n\t\t\t\tLOGGER.info(\"TCP Port parameter not specified, using {} as default value.\", port);\n\t\t\t}\n\t\t\tif (operation == OperationType.UNKNOWN ) {\n\t\t\t\tprintHelp(options);\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} catch (ParseException e) {\n\t\t\tLOGGER.error(\"Unable to parse the options ({})\", e.toString());\n\t\t\tLOGGER.debug(e.toString(), e);\n\t\t\treturn 1;\n\t\t}\n\t\treturn 0;\n\t}", "public ServerInterpreterImpl(String[] args){\n\n /* Expected inputs */\n Map<String, String> arg_values = new HashMap<>();\n arg_values.put(\"-v\", null);\n arg_values.put(\"-i\", null);\n arg_values.put(\"ip\", null);\n arg_values.put(\"-p\", null);\n arg_values.put(\"port\", null);\n arg_values.put(\"-h\", null);\n\n /* (Bonus check) Max length 6, to avoid server latencies for nothing if\n someone try to enter a large number of arguments. */\n if (args.length > 6){\n error_message = usage;\n return;\n }\n\n /*\n Checks:\n (1) Each inputs is one of -v, -i, -p, -h, int (port range), [0.255].[0-255].[0-255].[0-255]\n (2) Only one input for each kind (see (1) for the list)\n (3) Option -i must be followed by the ip address. Same for -p and the port\n (4) Check if the -i option is present if and only if an ip address is present. Same for -p and the port\n */\n for (int i=0; i<args.length; i++){\n\n /* (1) */\n if ( !valid(args[i]) ){\n error_message = usage;\n return;\n }\n\n /* (2) */\n String type_arg = type(args[i]);\n if ( arg_values.get(type_arg) != null ){\n error_message = usage;\n return;\n }\n arg_values.put(type_arg, args[i]);\n\n /* (3) */\n if ( type_arg.equals(\"-i\") && ( (i==(args.length-1)) || !(type(args[i+1]).equals(\"ip\")) ) ){\n error_message = usage;\n return;\n }\n else if ( type_arg.equals(\"-p\") && ( (i==(args.length-1)) || !(type(args[i+1]).equals(\"port\")) ) ){\n error_message = usage;\n return;\n }\n }\n\n /* (4) */\n if ( ((arg_values.get(\"ip\") != null) && (arg_values.get(\"-i\") == null))\n || ((arg_values.get(\"ip\") == null) && (arg_values.get(\"-i\") != null))\n || ((arg_values.get(\"port\") != null) && (arg_values.get(\"-p\") == null))\n || ((arg_values.get(\"port\") == null) && (arg_values.get(\"-p\") != null))){\n error_message = usage;\n return;\n }\n\n set_inputs(arg_values);\n }", "@Before public void initParser() {\n\t\tparser = new CliParserImpl(\"-\", \"--\");\n\t}", "protected void parseArgs(String[] args) {\n // Arguments are pretty simple, so we go with a basic switch instead of having\n // yet another dependency (e.g. commons-cli).\n for (int i = 0; i < args.length; i++) {\n int nextIdx = (i + 1);\n String arg = args[i];\n switch (arg) {\n case \"--prop-file\":\n if (++i < args.length) {\n loadPropertyFile(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--schema-name\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case to avoid tricky-to-catch errors related to quoting names\n this.schemaName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--grant-to\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n\n // Force upper-case because user names are case-insensitive\n this.grantTo = args[i].toUpperCase();\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--target\":\n if (++i < args.length) {\n DataDefinitionUtil.assertValidName(args[i]);\n List<String> targets = Arrays.asList(args[i].split(\",\"));\n for (String target : targets) {\n String tmp = target.toUpperCase();\n nextIdx++;\n if (tmp.startsWith(\"BATCH\")) {\n this.grantJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"OAUTH\")){\n this.grantOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else if (tmp.startsWith(\"DATA\")){\n this.grantFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n }\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--add-tenant-key\":\n if (++i < args.length) {\n this.addKeyForTenant = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--update-proc\":\n this.updateProc = true;\n break;\n case \"--check-compatibility\":\n this.checkCompatibility = true;\n break;\n case \"--drop-admin\":\n this.dropAdmin = true;\n break;\n case \"--test-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.testTenant = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key\":\n if (++i < args.length) {\n this.tenantKey = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--tenant-key-file\":\n if (++i < args.length) {\n tenantKeyFileName = args[i];\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--list-tenants\":\n this.listTenants = true;\n break;\n case \"--update-schema\":\n this.updateFhirSchema = true;\n this.updateOauthSchema = true;\n this.updateJavaBatchSchema = true;\n this.dropSchema = false;\n break;\n case \"--update-schema-fhir\":\n this.updateFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n } else {\n this.schemaName = DATA_SCHEMANAME;\n }\n break;\n case \"--update-schema-batch\":\n this.updateJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--update-schema-oauth\":\n this.updateOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schemas\":\n this.createFhirSchema = true;\n this.createOauthSchema = true;\n this.createJavaBatchSchema = true;\n break;\n case \"--create-schema-fhir\":\n this.createFhirSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.schemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-batch\":\n this.createJavaBatchSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.javaBatchSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--create-schema-oauth\":\n this.createOauthSchema = true;\n if (nextIdx < args.length && !args[nextIdx].startsWith(\"--\")) {\n this.oauthSchemaName = args[nextIdx];\n i++;\n }\n break;\n case \"--drop-schema\":\n this.updateFhirSchema = false;\n this.dropSchema = true;\n break;\n case \"--drop-schema-fhir\":\n this.dropFhirSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-batch\":\n this.dropJavaBatchSchema = Boolean.TRUE;\n break;\n case \"--drop-schema-oauth\":\n this.dropOauthSchema = Boolean.TRUE;\n break;\n case \"--pool-size\":\n if (++i < args.length) {\n this.maxConnectionPoolSize = Integer.parseInt(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--prop\":\n if (++i < args.length) {\n // properties are given as name=value\n addProperty(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--confirm-drop\":\n this.confirmDrop = true;\n break;\n case \"--allocate-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.allocateTenant = true;\n this.dropTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropTenant = true;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--freeze-tenant\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.freezeTenant = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--drop-detached\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.dropDetached = true;\n this.dropTenant = false;\n this.allocateTenant = false;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--delete-tenant-meta\":\n if (++i < args.length) {\n this.tenantName = args[i];\n this.deleteTenantMeta = true;\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n break;\n case \"--dry-run\":\n this.dryRun = Boolean.TRUE;\n break;\n case \"--db-type\":\n if (++i < args.length) {\n this.dbType = DbType.from(args[i]);\n } else {\n throw new IllegalArgumentException(\"Missing value for argument at posn: \" + i);\n }\n switch (dbType) {\n case DERBY:\n translator = new DerbyTranslator();\n // For some reason, embedded derby deadlocks if we use multiple threads\n maxConnectionPoolSize = 1;\n break;\n case POSTGRESQL:\n translator = new PostgreSqlTranslator();\n break;\n case DB2:\n default:\n break;\n }\n break;\n default:\n throw new IllegalArgumentException(\"Invalid argument: \" + arg);\n }\n }\n }", "public ArgumentsParser(String... args) {\n this.arguments = new HashMap<>(args.length);\n this.args = Arrays.copyOf(args, args.length);\n }", "private int handleOptions(String[] args) {\r\n\r\n int status = 0;\r\n\r\n if ((args == null) || (args.length == 0)) { return status; }\r\n\r\n for (int i = 0; i < args.length; i++) {\r\n if (status != 0) { return status; }\r\n\r\n if (args[i].equals(\"-h\")) {\r\n displayUsage();\r\n status = 1;\r\n } else if (args[i].equals(\"-d\") || args[i].equals(\"-discourse\")) {\r\n if (++i < args.length) {\r\n try {\r\n this.discourseId = Long.parseLong(args[i]);\r\n if (discourseId < 0) {\r\n logger.error(\"Invalid discourse id specified: \" + args[i]);\r\n status = -1;\r\n }\r\n } catch (Exception exception) {\r\n logger.error(\"Error while trying to parse discourse id. \"\r\n + \"Please check the parameter for accuracy.\");\r\n throw new IllegalArgumentException(\"Invalid discourse id specified.\");\r\n }\r\n } else {\r\n logger.error(\"A discourse id must be specified with the -discourse argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } else if (args[i].equals(\"-e\") || args[i].equals(\"-email\")) {\r\n setSendEmailFlag(true);\r\n if (++i < args.length) {\r\n setEmailAddress(args[i]);\r\n } else {\r\n logger.error(\"An email address must be specified with this argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } else if (args[i].equals(\"-b\") || args[i].equals(\"-batchSize\")) {\r\n if (++i < args.length) {\r\n try {\r\n this.batchSize = Integer.parseInt(args[i]);\r\n if (batchSize <= 0) {\r\n logger.error(\"The batch size must be greater than zero.\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } catch (NumberFormatException exception) {\r\n logger.error(\"Error while trying to parse batch size: \" + args[i]);\r\n throw new IllegalArgumentException(\"Invalid batch size specified.\");\r\n }\r\n } else {\r\n logger.error(\"A batch size must be specified with the -batchSize argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n } else if (args[i].equals(\"-p\") || args[i].equals(\"-project\")) {\r\n if (++i < args.length) {\r\n try {\r\n this.projectId = Integer.parseInt(args[i]);\r\n if (projectId < 0) {\r\n logger.error(\"Invalid project id specified: \" + args[i]);\r\n status = -1;\r\n }\r\n } catch (Exception exception) {\r\n logger.error(\"Error while trying to parse project id. \"\r\n + \"Please check the parameter for accuracy.\");\r\n throw new IllegalArgumentException(\"Invalid project id specified.\");\r\n }\r\n } else {\r\n logger.error(\"A project id must be specified with the -project argument\");\r\n displayUsage();\r\n status = -1;\r\n }\r\n }\r\n }\r\n\r\n return status;\r\n }", "private boolean parseArguments(final String[] args) {\r\n final Args arg = new Args(args);\r\n boolean ok = true;\r\n try {\r\n while(arg.more() && ok) {\r\n if(arg.dash()) {\r\n final char ca = arg.next();\r\n if(ca == 'u') {\r\n final String[] s = new String[args.length - 1];\r\n System.arraycopy(args, 1, s, 0, s.length);\r\n updateTimes(s);\r\n return false;\r\n } else if(ca == 'x') {\r\n convertTopics();\r\n return false;\r\n }\r\n\r\n ok = false;\r\n }\r\n }\r\n session = new ClientSession(ctx);\r\n session.execute(new Set(Prop.INFO, true));\r\n } catch(final Exception ex) {\r\n ok = false;\r\n Main.errln(\"Please run BaseXServer for using server mode.\");\r\n ex.printStackTrace();\r\n }\r\n \r\n if(!ok) {\r\n Main.outln(\"Usage: \" + Main.name(this) + \" [options]\" + NL +\r\n \" -u[...] update submission times\" + NL +\r\n \" -x convert queries\");\r\n }\r\n return ok;\r\n }", "public Builder(Set<String> optionSwitches, SwitchType switchType) {\n this.shortSwitches = new HashSet<String>();\n longSwitches = new HashSet<String>();\n switch (switchType) {\n case SHORT_SWITCH:\n shortSwitches.addAll(optionSwitches);\n break;\n case LONG_SWITCH:\n longSwitches.addAll(optionSwitches);\n break;\n default:\n throw new IllegalArgumentException(\"Unknown switchType: \" + switchType);\n }\n }", "private static boolean parseOptions(String[] args) {\n\t\ttry {\n\t\t\tCommandLineParser parser = new DefaultParser();\n\t\t\tCommandLine cmd = parser.parse(createOptions(), args);\n\t\t\tif (cmd.hasOption(\"source\")) {\n\t\t\t\tfileName = cmd.getOptionValue(\"source\");\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"r\")) {\n\t\t\t\ttry {\n\t\t\t\t\tmaxRank = ((Number) cmd.getParsedOptionValue(\"r\")).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"Illegal value provided for -r option.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"t\")) {\n\t\t\t\ttry {\n\t\t\t\t\ttimeOut = ((Number) cmd.getParsedOptionValue(\"t\")).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"Illegal value provided for -t option.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"c\")) {\n\t\t\t\ttry {\n\t\t\t\t\trankCutOff = ((Number) cmd.getParsedOptionValue(\"c\")).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"Illegal value provided for -c option.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"d\")) {\n\t\t\t\titerativeDeepening = true;\n\t\t\t\tif (maxRank > 0) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Warning: ignoring max_rank setting (must be 0 when iterative deepening is enabled).\");\n\t\t\t\t\tmaxRank = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"f\")) {\n\t\t\t\tterminateAfterFirst = true;\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"ns\")) {\n\t\t\t\tnoExecStats = true;\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"nr\")) {\n\t\t\t\tnoRanks = true;\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"help\")) {\n\t\t\t\tprintUsage();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tSystem.out.println(pe.getMessage());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "private void setOptions() {\n cliOptions = new Options();\n cliOptions.addOption(Option.builder(\"p\")\n .required(false)\n .hasArg()\n .desc(\"Paramaters file\")\n .type(String.class)\n .build());\n cliOptions.addOption(Option.builder(\"P\")\n .required(false)\n .hasArg()\n .desc(\"Overwrite of one or more parameters provided by file.\")\n .type(String.class)\n .hasArgs()\n .build());\n cliOptions.addOption(Option.builder(\"H\")\n .required(false)\n .desc(\"Create a parameter file model on the classpath.\")\n .type(String.class)\n .build());\n }", "private void parseOptions(DataStore args) {\r\n\r\n // System.out.println(\"IN JavaWeaver.parseOptions\\n\" + args);\r\n if (args.hasValue(JavaWeaverKeys.CLEAR_OUTPUT_FOLDER)) {\r\n clearOutputFolder = args.get(JavaWeaverKeys.CLEAR_OUTPUT_FOLDER);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.NO_CLASSPATH)) {\r\n noClassPath = args.get(JavaWeaverKeys.NO_CLASSPATH);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.INCLUDE_DIRS)) {\r\n classPath = args.get(JavaWeaverKeys.INCLUDE_DIRS).getFiles();\r\n }\r\n if (args.hasValue(JavaWeaverKeys.OUTPUT_TYPE)) {\r\n outType = args.get(JavaWeaverKeys.OUTPUT_TYPE);\r\n }\r\n if (args.hasValue(JavaWeaverKeys.SHOW_LOG_INFO)) {\r\n loggingGear.setActive(args.get(JavaWeaverKeys.SHOW_LOG_INFO));\r\n }\r\n if (args.hasValue(JavaWeaverKeys.FORMAT)) {\r\n prettyPrint = args.get(JavaWeaverKeys.FORMAT);\r\n }\r\n\r\n if (args.hasValue(JavaWeaverKeys.REPORT)) {\r\n\r\n reportGear.setActive(args.get(JavaWeaverKeys.REPORT));\r\n }\r\n\r\n }", "public ArgumentList(boolean quoteStringsWSpaces)\n\t{\n\t\tm_quoteStringsWSpaces = quoteStringsWSpaces;\n\t}", "private static void validateInputArguments(String args[]) {\n\n\t\tif (args == null || args.length != 2) {\n\t\t\tthrow new InvalidParameterException(\"invalid Parameters\");\n\t\t}\n\n\t\tString dfaFileName = args[DFA_FILE_ARGS_INDEX];\n\t\tif (dfaFileName == null || dfaFileName.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid file name\");\n\t\t}\n\n\t\tString delimiter = args[DELIMITER_SYMBOL_ARGS_INDEX];\n\t\tif (delimiter == null || delimiter.trim().isEmpty()) {\n\t\t\tthrow new InvalidParameterException(\"Invalid delimiter symbol\");\n\t\t}\n\t}", "@Override\n\tpublic Command parse(String[] s) {\n\t\tif (s.length==1 && s[0].equalsIgnoreCase(\"HELP\"))\n\t\t\treturn new Help(); \n\t\telse return null;\n\t}", "@Override\n @SuppressWarnings(\"static-access\")\n public void setJCLIOptions() {\n Option Help = new Option(\"h\", \"help\", false, \"Show Help.\");\n this.jcOptions.addOption(Help);\n this.jcOptions.addOption(OptionBuilder.withLongOpt(\"file\").withDescription(\"File to Convert\").isRequired(false).hasArg().create(\"f\"));\n //this.jcOptions.addOption(OptionBuilder.withLongOpt(\"outputfile\").withDescription(\"Output File\").isRequired(false).hasArg().create(\"of\"));\n OptionGroup jcGroup = new OptionGroup();\n jcGroup.addOption(OptionBuilder.withLongOpt(\"texttobinary\").withDescription(\"Convert text to Binary\").create(\"ttb\"));\n jcGroup.addOption(OptionBuilder.withLongOpt(\"binarytotext\").withDescription(\"Convert binary to text\").create(\"btt\"));\n this.jcOptions.addOptionGroup(jcGroup);\n }", "private static void handleArguments(String[] args) {\n\t\t\n\t\tif ( args.length > 0 && args[0].contains(\"--help\")) {\n\t\t\tSystem.err.println (menuString);\n\t\t\tSystem.err.println(\"Example queue name are: *\");\n\t\t\tSystem.exit(0);\n\t\t} else {\n\n\t\t\tint i = 0;\n\t\t\tString arg;\n\n\t\t\twhile (i < args.length && args[i].startsWith(\"--\")) {\n\t\t\t\targ = args[i++];\n\n\t\t\t\tif (arg.contains(ECS_HOSTS_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsHosts = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_HOSTS_CONFIG_ARGUMENT + \" requires hosts value(s)\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.contains(ECS_MGMT_ACCESS_KEY_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsMgmtAccessKey = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_MGMT_ACCESS_KEY_CONFIG_ARGUMENT + \" requires an access-key value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_MGMT_SECRET_KEY_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsMgmtSecretKey = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_MGMT_SECRET_KEY_CONFIG_ARGUMENT + \" requires a secret-key value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_MGMT_PORT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsMgmtPort = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_MGMT_PORT_CONFIG_ARGUMENT + \" requires a mgmt port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_ALT_MGMT_PORT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tecsAlternativeMgmtPort = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_ALT_MGMT_PORT_CONFIG_ARGUMENT + \" requires an alternative mgmt port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_MODIFIED_OBJECT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\trelativeObjectModifiedSinceOption = true;\n\t\t\t\t\t\tobjectModifiedSinceNoOfDays = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_MODIFIED_OBJECT_CONFIG_ARGUMENT + \" requires a specified number of days value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_DATA_CONFIG_ARGUMENT)) {\n\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tcollectData = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_DATA_CONFIG_ARGUMENT + \" requires a collect data value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.contains(ELASTIC_HOSTS_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\telasticHosts = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ELASTIC_HOSTS_CONFIG_ARGUMENT + \" requires hosts value(s)\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ELASTIC_PORT_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\telasticPort = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ELASTIC_PORT_CONFIG_ARGUMENT + \" requires a port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ELASTIC_CLUSTER_CONFIG_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\telasticCluster = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( ELASTIC_CLUSTER_CONFIG_ARGUMENT + \" requires a cluster value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECTION_DAY_SHIFT_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\trelativeDayShift = Integer.valueOf(args[i++]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECTION_DAY_SHIFT_ARGUMENT + \" requires a day shift value port value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( ECS_INIT_INDEXES_ONLY_CONFIG_ARGUMENT)) { \n\t\t\t\t\tinitIndexesOnlyOption = true;\n\t\t\t\t} else if (arg.equals( XPACK_SECURITY_USER_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackUser = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SECURITY_USER_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SECURITY_USER_PASSWORD_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackPassword = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SECURITY_USER_PASSWORD_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SSL_KEY_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackSslKey = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SSL_KEY_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SSL_CERTIFICATE_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackSslCertificate = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SSL_CERTIFICATE_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals( XPACK_SSL_CERTIFICATE_AUTH_ARG)) { \n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\txpackSsslCertificateAuth = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println( XPACK_SSL_CERTIFICATE_AUTH_ARG + \" requires a value\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_OBJECT_DATA_NAMESPACE_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tobjectNamespace = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_OBJECT_DATA_NAMESPACE_ARGUMENT + \" requires namespace\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else if (arg.equals(ECS_COLLECT_OBJECT_DATA_NAME_ARGUMENT)) {\n\t\t\t\t\tif (i < args.length) {\n\t\t\t\t\t\tbucketName = args[i++];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tSystem.err.println(ECS_COLLECT_OBJECT_DATA_NAME_ARGUMENT + \" requires bucket\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.err.println(\"Unrecognized option: \" + arg); \n\t\t\t\t\tSystem.err.println(menuString);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} \n\t\t\t}\n\t\t\tif (bucketName!=null) {\n\t\t\t\tif (objectNamespace==null || \"\".equals(objectNamespace)) {\n\t\t\t\t\tSystem.err.println(ECS_COLLECT_OBJECT_DATA_NAMESPACE_ARGUMENT + \" requires namespace, \" + ECS_COLLECT_OBJECT_DATA_NAME_ARGUMENT + \" requires bucket\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif(initIndexesOnlyOption) {\n\t\t\t// Check hosts\n\t\t\tif(elasticHosts.isEmpty()) {\t\n\t\t\t\tSystem.err.println(\"Missing Elastic hostname use \" + ELASTIC_HOSTS_CONFIG_ARGUMENT + \n\t\t\t\t\t\t\t\t\"<host1, host2> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\t\n\t\t} else {\n\n\t\t\t// Check hosts\n\t\t\tif(ecsHosts.isEmpty()) {\t\n\t\t\t\tSystem.err.println(\"Missing ECS hostname use \" + ECS_HOSTS_CONFIG_ARGUMENT + \n\t\t\t\t\t\t\"<host1, host2> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// management access/user key\n\t\t\tif(ecsMgmtAccessKey.isEmpty()) {\n\t\t\t\tSystem.err.println(\"Missing managment access key use\" + ECS_MGMT_ACCESS_KEY_CONFIG_ARGUMENT +\n\t\t\t\t\t\t\"<admin-username> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// management access/user key\n\t\t\tif(ecsMgmtSecretKey.isEmpty()) {\n\t\t\t\tSystem.err.println(\"Missing management secret key use \" + ECS_MGMT_SECRET_KEY_CONFIG_ARGUMENT +\n\t\t\t\t\t\t\"<admin-password> to specify a value\" );\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public LaunchKey parse(String[] args) {\n if (ArrayUtils.isEmpty(args) || StringUtils.isBlank(args[0])) {\n throw new RuntimeException(\"Missing path argument to Git project.\");\n }\n String target = args[0];\n boolean mergedOnly = true;\n Set<String> exclusions = new HashSet<>();\n\n String options = String.join(\" \", args).substring(target.length());\n\n if (options.contains(\"--mergedOnly\")) {\n Matcher matcher = MERGED_ONLY_REGEX.matcher(options);\n if (!matcher.matches()) {\n throw new RuntimeException(\"ERROR: Invalid 'mergedOnly' usage. Usage: --mergedOnly=<true|false>\");\n }\n mergedOnly = Boolean.parseBoolean(matcher.group(2));\n // Remove this from options\n options = options.replace(matcher.group(1), \"\");\n }\n\n if (options.contains(\"--exclude\")) {\n Matcher matcher = EXCLUDE_REGEX.matcher(options);\n if (!matcher.matches()) {\n throw new RuntimeException(\n \"ERROR: Invalid 'exclude' usage. Usage: --exclude=[<branch1>, <branch2>, ...]\");\n }\n exclusions = Arrays.stream(matcher.group(2).split(\",\"))\n .map(String::trim)\n .collect(Collectors.toSet());\n // Remove this from options\n options = options.replace(matcher.group(1), \"\");\n }\n\n if (StringUtils.isNotBlank(options)) {\n throw new RuntimeException(\"ERROR: Invalid arguments.\", new IllegalArgumentException(options.trim()));\n }\n return new LaunchKey(new Nuke(target, exclusions, mergedOnly), new BranchNuker());\n }", "@Test\n public void parse_validArgs_returnsFindActivityTagCommand() {\n FindActivityTagCommand expectedFindActivityTagCommand =\n new FindActivityTagCommand(new ActivityTagContainsPredicate(Arrays.asList(\"Cheese\", \"Japan\")));\n assertParseSuccess(parser, \"Cheese Japan\", expectedFindActivityTagCommand);\n\n // multiple whitespaces between keywords\n assertParseSuccess(parser, \" \\n Cheese \\n \\t Japan \\t\", expectedFindActivityTagCommand);\n }", "public static CommandLine prepCli( Options knowsCliDtd,\n\t\t\tString[] args, ResourceBundle rbm )\n\t{\n\t\tCommandLineParser cliRegex = new DefaultParser();\n\t\tCommandLine userInput = null;\n\t\ttry\n\t\t{\n\t\t\tuserInput = cliRegex.parse( knowsCliDtd, args );\n\t\t\tif ( userInput.hasOption( helpFlagS )\n\t\t\t\t\t|| userInput.hasOption( helpFlagLong ) )\n\t\t\t{\n\t\t\t\tnew HelpFormatter().printHelp( \"Note Enojes\", knowsCliDtd );\n\t\t\t}\n\t\t}\n\t\tcatch ( ParseException pe )\n\t\t{\n\t\t\tMessageFormat problem = new MessageFormat( rbm.getString( rbKeyCliParse ) );\n\t\t\tSystem.err.println( problem.format( new Object[]{ cl +\"pc\", pe } ) );\n\t\t}\n\t\treturn userInput;\n\t}", "public static void main( String[] args )\n {\n CommandLineParser parser = new DefaultParser();\n\n // create the Options\n OptionGroup optgrp = new OptionGroup();\n optgrp.addOption(Option.builder(\"l\")\n .longOpt(\"list\")\n .hasArg().argName(\"keyword\").optionalArg(true)\n .type(String.class)\n .desc(\"List documents scraped for keyword\")\n .build());\n optgrp.addOption( Option.builder(\"r\")\n .longOpt(\"read\")\n .hasArg().argName(\"doc_id\")\n .type(String.class)\n .desc(\"Display a specific scraped document.\")\n .build());\n optgrp.addOption( Option.builder(\"a\")\n .longOpt(\"add\")\n .type(String.class)\n .desc(\"Add keywords to scrape\")\n .build());\n optgrp.addOption( Option.builder(\"s\")\n .longOpt(\"scraper\")\n .type(String.class)\n .desc(\"Start the scraper watcher\")\n .build());\n\n\n\n Options options = new Options();\n options.addOptionGroup(optgrp);\n\n options.addOption( Option.builder(\"n\")\n .longOpt(\"search-name\").hasArg()\n .type(String.class)\n .desc(\"Name of the search task for a set of keywords\")\n .build());\n\n options.addOption( Option.builder(\"k\")\n .longOpt(\"keywords\")\n .type(String.class).hasArgs()\n .desc(\"keywords to scrape. \")\n .build());\n\n options.addOption( Option.builder(\"t\")\n .longOpt(\"scraper-threads\")\n .type(Integer.class).valueSeparator().hasArg()\n .desc(\"Number of scraper threads to use.\")\n .build());\n\n //String[] args2 = new String[]{ \"--add --search-name=\\\"some thing\\\" --keywords=kw1, kw2\" };\n // String[] args2 = new String[]{ \"--add\", \"--search-name\", \"some thing new\", \"--keywords\", \"kw3\", \"kw4\"};\n // String[] args2 = new String[]{ \"--scraper\"};\n// String[] args2 = new String[]{ \"--list\"};\n\n int exitCode = 0;\n CommandLine line;\n try {\n // parse the command line arguments\n line = parser.parse( options, args );\n }\n catch( ParseException exp ) {\n System.out.println( \"Unexpected exception:\" + exp.getMessage() );\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"searchscraper \\n\" +\n \" [--add --search-name=<SearchTask> --keywords=<keyword1> <keyword2> ...]\\n\" +\n \" [--list [<keyword>] ]\\n\" +\n \" [--read <doc_id>]\\n\", options , true);\n System.exit(2);\n return;\n }\n\n if( line.hasOption( \"add\" ) ) {\n // Add Search Task mode\n if(!line.hasOption( \"search-name\" ) || !line.hasOption(\"keywords\")) {\n System.out.println(\"must have search name and keywords when adding\");\n System.exit(2);\n }\n String name = line.getOptionValue( \"search-name\" );\n String[] keywords = line.getOptionValues(\"keywords\");\n System.out.println(\"Got keywords: \" + Arrays.toString(keywords) );\n\n exitCode = add(name, Arrays.asList(keywords));\n\n } else if( line.hasOption( \"list\" ) ) {\n // List Keyword mode\n DataStore ds = new DataStore();\n String keyword = line.getOptionValue( \"list\" );\n System.out.println(\"Listing with keyword = `\" + keyword + \"`\");\n if(keyword == null) {\n List<String > keywords = ds.listKeywords();\n for(String kw : keywords) {\n System.out.println(kw);\n }\n exitCode=0;\n } else {\n List<SearchResult > results = ds.listDocsForKeyword(keyword);\n for(SearchResult kw : results) {\n System.out.println(kw);\n }\n }\n ds.close();\n\n } else if( line.hasOption( \"read\" ) ) {\n // Show a specific document\n String docId = line.getOptionValue( \"read\" );\n if(docId == null) {\n System.err.println(\"read option missing doc_id parameter\");\n exitCode = 2;\n } else {\n\n DataStore ds = new DataStore();\n String result = ds.read(docId);\n\n if (result == null) {\n System.err.println(\"NOT FOUND\");\n exitCode = 1;\n } else {\n System.out.println(result);\n }\n ds.close();\n }\n }\n else if( line.hasOption( \"scraper\" ) ) {\n int numThreads = 1;\n if(line.hasOption( \"scraper-threads\")) {\n String threadString = line.getOptionValue(\"scraper-threads\");\n try {\n numThreads = Integer.parseInt(threadString);\n } catch (NumberFormatException e) {\n System.out.println(\n \"unable to parse number of threads from `\" +\n threadString + \"`\");\n }\n\n }\n // Start scraper mode\n Daemon daemon = new Daemon(numThreads);\n daemon.start();\n } else {\n // generate the help statement\n HelpFormatter formatter = new HelpFormatter();\n formatter.printHelp( \"searchscraper \\n\" +\n \" [--add --search-name <SearchTask> --keywords <keyword1> <keyword2> ...]\\n\" +\n \" [--list [<keyword>] ]\\n\" +\n \" [--read <doc_id>]\\n\", options , true);\n exitCode = 2;\n }\n\n\n System.exit(exitCode);\n }", "public StringParser() {\n this(ParserOptions.DEFAULT);\n }", "public ParserResult parseArguments(String[] args, boolean allowUnknown) {\n\n\t\tMap<Option, Object> result = new HashMap<Option, Object>();\n\n\t\tfor (String arg : args) {\n\t\t\tOption option;\n\n\t\t\t// Search the option by its long name if the argument starts with two \"-\".\n\t\t\tif (arg.startsWith(\"--\")) {\n\t\t\t\toption = getOptionByLongName(arg.substring(2).split(\"=\", 2)[0]);\n\n\t\t\t// Search the option by its short name if the argument starts with one \"-\".\n\t\t\t} else if (arg.startsWith(\"-\")) {\n\t\t\t\toption = getOptionByShortName(arg.substring(1).split(\"=\", 2)[0]);\n\n\t\t\t// Fail if an argument does not start with a \"-\".\n\t\t\t} else {\n\t\t\t\treturn new ParserResult(options, null, \"Cannot parse option.\");\n\t\t\t}\n\n\t\t\t// Ignore an option that is not supported.\n\t\t\tif (allowUnknown && option == null)\n\t\t\t\tcontinue;\n\t\t\t// Fail if no unknown options are allowed.\n\t\t\telse if (!allowUnknown && option == null)\n\t\t\t\treturn new ParserResult(options, null, \"Unknwon option: \" + arg.split(\"=\", 2)[0]);\n\n\t\t\t// Fail if a option cannot be parsed.\n\t\t\tString parse = parseOption(result, option, arg);\n\t\t\tif (parse != null)\n\t\t\t\treturn new ParserResult(options, null, parse);\n\t\t}\n\n\t\t// Check if all required options are given.\n\t\tfor (Option option : options) {\n\t\t\tif (option.isRequired() && !result.containsKey(option))\n\t\t\t\treturn new ParserResult(options, null, \"Missing option: --\" + option.getLongName());\n\t\t}\n\n\n\t\treturn new ParserResult(options, result, null);\n\t}", "@Override\n protected void prepare()\n throws CommandException, CommandValidationException {\n Set<ValidOption> opts = new LinkedHashSet<ValidOption>();\n addOption(opts, \"file\", 'f', \"FILE\", false, null);\n printPromptOption =\n addOption(opts, \"printprompt\", '\\0', \"BOOLEAN\", false, null);\n addOption(opts, \"encoding\", '\\0', \"STRING\", false, null);\n addOption(opts, \"help\", '?', \"BOOLEAN\", false, \"false\");\n commandOpts = Collections.unmodifiableSet(opts);\n operandType = \"STRING\";\n operandMin = 0;\n operandMax = 0;\n\n processProgramOptions();\n }", "public CuratorClientArgParser( String[] commandLineArgs ) {\n confirmArgsAreGood( commandLineArgs );\n\n testing = false;\n for( int crntArg = 0; crntArg < commandLineArgs.length; crntArg++ ) {\n if( commandLineArgs[crntArg].equals(\"-host\") ) {\n host = commandLineArgs[++crntArg];\n }\n else if( commandLineArgs[crntArg].equals(\"-port\") ) {\n port = Integer.parseInt( commandLineArgs[++crntArg] );\n }\n else if( commandLineArgs[crntArg].equals(\"-in\") ) {\n inputDir = new File( commandLineArgs[++crntArg] );\n }\n else if( commandLineArgs[crntArg].equals(\"-out\") ) {\n outputDir = new File( commandLineArgs[++crntArg] );\n }\n else if( commandLineArgs[crntArg].equals(\"-mode\") ) {\n try {\n mode = CuratorClient.CuratorClientMode.fromString( commandLineArgs[++crntArg] );\n } catch ( IllegalArgumentException e ) {\n System.out.println( \"Please specify either 'PRE' or 'POST' \"\n + \"(pre-Hadoop and post-Hadoop, \"\n + \"respectively) as the mode.\");\n }\n }\n else if( commandLineArgs[crntArg].equals(\"-test\") ) {\n testing = true;\n }\n }\n\n if( outputDir == null ) {\n outputDir = new File( inputDir, \"output\" );\n }\n }", "public static Options getCmdLineOptions(){\n\t\tOptions options = new Options();\n\t\t//\t\toptions.addOption(OptionBuilder.withArgName(\"outputPath\").hasArg().withDescription(\"output sequence lengths to a file [if not specified, lengths are printed to stdout]\").create(Thunder.OPT_PATH_OUTPUT));\n\t\t//\t\toptions.addOption(OptionBuilder.withArgName(\"maxExpectedLength\").hasArg().withDescription(\"print sequences exceeding this maximum expected size (for debugging + QC)\").create(\"m\"));\n\t\treturn options;\n\t}", "private static void parseCommandLine(String[] args) throws Exception {\n int i;\n // iterate over all options (arguments starting with '-')\n for (i = 0; i < args.length && args[i].charAt(0) == '-'; i++) {\n switch (args[i].charAt(1)) {\n // -a type = write out annotations of type a.\n case 'a':\n if (annotTypesToWrite == null)\n annotTypesToWrite = new ArrayList();\n annotTypesToWrite.add(args[++i]);\n break;\n\n // -g gappFile = path to the saved application\n case 'g':\n gappFile = new File(args[++i]);\n break;\n\n // -e encoding = character encoding for documents\n case 'e':\n encoding = args[++i];\n break;\n\n default:\n System.err.println(\"Unrecognised option \" + args[i]);\n usage();\n }\n }\n\n // set index of the first non-option argument, which we take as the first\n // file to process\n firstFile = i;\n\n // sanity check other arguments\n if (gappFile == null) {\n System.err.println(\"No .gapp file specified\");\n usage();\n }\n }", "public void testJvmOptionsPassedInOnCommandLine() {\n String options = \"MGM was here!\";\n GcManager gcManager = new GcManager();\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(options, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n jvmRun.doAnalysis();\n Assert.assertTrue(\"JVM options passed in are missing or have changed.\",\n jvmRun.getJvm().getOptions().equals(options));\n }", "public App(String[] _args, String[] _optList, OptionHandler _optHandler, \n HashMap _customOpts,\n boolean _wantOutput, String _cmdLineSyntax, String _usageHeader) \n {\n _init(_args, _optList, _optHandler, _customOpts, _wantOutput, 1, _cmdLineSyntax, _usageHeader);\n }", "public App(String[] _args, String[] _optList, OptionHandler _optHandler, \n HashMap _customOpts,\n boolean _wantOutput, int _numDtds, String _cmdLineSyntax, String _usageHeader) \n {\n _init(_args, _optList, _optHandler, _customOpts, _wantOutput, _numDtds, _cmdLineSyntax, _usageHeader);\n }", "private SimpleCLI(Options options) {\n this.options = options;\n }", "private HashMap initCommonOpts() {\n HashMap _opts = new HashMap();\n \n _opts.put(\"help\", \n new Option(\"h\", \"help\", false, \"Get help.\")\n );\n _opts.put(\"version\",\n new Option(\"v\", \"version\", false, \"Print version number and exit.\")\n );\n _opts.put(\"system\",\n OptionBuilder\n .withLongOpt( \"system\" )\n .withDescription(\"Use the given filename or system identifier to find the DTD. \" +\n \"This could be a relative \" +\n \"pathname, if the DTD exists in a file on your system, or an HTTP URL. \" +\n \"The '-s' switch is optional. \" +\n \"Note that if a catalog is in use, what looks like a filename might \" +\n \"resolve to something else entirely.\")\n .hasArg()\n .withArgName(\"system-id\")\n .create('s')\n );\n _opts.put(\"doc\",\n OptionBuilder\n .withLongOpt( \"doc\" )\n .withDescription(\"Specify an XML document used to find the DTD. This could be just a \\\"stub\\\" \" +\n \"file, that contains nothing other than the doctype declaration and a root element. \" +\n \"This file doesn't need to be valid according to the DTD.\")\n .hasArg()\n .withArgName(\"xml-file\")\n .create('d')\n );\n _opts.put(\"public\",\n OptionBuilder\n .withLongOpt( \"public\" )\n .withDescription(\"Use the given public identifier to find the DTD. This would be used in \" +\n \"conjunction with an OASIS catalog file.\")\n .hasArg()\n .withArgName(\"public-id\")\n .create('p')\n );\n _opts.put(\"catalog\",\n OptionBuilder\n .withLongOpt( \"catalog\" )\n .withDescription(\"Specify a file to use as the OASIS catalog, to resolve system and \" +\n \"public identifiers.\")\n .hasArg()\n .withArgName(\"catalog-file\")\n .create('c')\n );\n _opts.put(\"title\",\n OptionBuilder\n .withLongOpt( \"title\" )\n .withDescription(\"Specify the title of this DTD.\")\n .hasArg()\n .withArgName(\"dtd-title\")\n .create('t')\n );\n _opts.put(\"roots\",\n OptionBuilder\n .withLongOpt(\"roots\")\n .withDescription(\"Specify the set of possible root elements for documents conforming \" +\n \"to this DTD.\")\n .hasArg()\n .withArgName(\"roots\")\n .create('r')\n );\n _opts.put(\"docproc\",\n OptionBuilder\n .withLongOpt(\"docproc\")\n .withDescription(\"Command to use to process structured comments. This command should \" +\n \"take its input on stdin, and produce valid XHTML on stdout.\")\n .hasArg()\n .withArgName(\"cmd\")\n .create()\n );\n _opts.put(\"markdown\",\n OptionBuilder\n .withLongOpt(\"markdown\")\n .withDescription(\"Causes structured comments to be processed as Markdown. \" +\n \"Requires pandoc to be installed on the system, and accessible to this process. \" +\n \"Same as \\\"--docproc pandoc\\\". If you want to supply your own Markdown \" +\n \"processor, or any other processor, use the --docproc option.\")\n .create('m')\n );\n _opts.put(\"param\",\n OptionBuilder\n .withLongOpt(\"param\")\n .hasArgs(2)\n .withValueSeparator()\n .withDescription(\"Parameter name & value to pass to the XSLT. You can use multiple \" +\n \"instances of this option.\")\n .withArgName( \"param=value\" )\n .create('P')\n );\n\n /* \n The 'q' here is a hack to get around some weird behavior that I can't figure out.\n If the 'q' is omitted, this option just doesn't work.\n */\n _opts.put(\"debug\",\n OptionBuilder\n .withLongOpt(\"debug\")\n .withDescription(\"Turns on debugging.\")\n .create('q')\n );\n\n return _opts;\n }", "public static void initDefaultOptions()\r\n\t{\n\r\n\t\taddOption(HELP, true, \"show Arguments\");\r\n\t}", "public FindBugsCommandLine() {\n super();\n project = new Project();\n startOptionGroup(\"General FindBugs options:\");\n addOption(\"-project\", \"project\", \"analyze given project\");\n addOption(\"-home\", \"home directory\", \"specify FindBugs home directory\");\n addOption(\"-pluginList\", \"jar1[\" + File.pathSeparator + \"jar2...]\", \"specify list of plugin Jar files to load\");\n addSwitchWithOptionalExtraPart(\"-effort\", \"min|less|default|more|max\", \"set analysis effort level\");\n addSwitch(\"-adjustExperimental\", \"lower priority of experimental Bug Patterns\");\n addSwitch(\"-workHard\", \"ensure analysis effort is at least 'default'\");\n addSwitch(\"-conserveSpace\", \"same as -effort:min (for backward compatibility)\");\n }", "private String parseArgs(String args[])\n {\n String fpath = null;\n \n for (String arg : args)\n {\n if (arg.startsWith(\"-\"))\n {\n // TODO: maybe add something here.\n }\n else // expect a filename.\n {\n fpath = arg;\n }\n }\n \n return fpath;\n }", "private boolean parseArguments(String input) {\r\n\t\tString arguments[] = input.split(\" \");\r\n\t\tif (arguments.length == TWO_ARGUMENTS) {\r\n\t\t\tmailbox = arguments[ARRAY_SECOND_ELEMENT].trim();\r\n\t\t\tpassword = arguments[ARRAY_THIRD_ELEMENT].trim();\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\t\t\r\n\t}", "public InputMode parseInputMode(String arg) {\r\n\t\tif (arg.equals(\"-console\")) {\r\n\t\t\treturn INPUT_MODE_CONSOLE;\r\n\t\t}\r\n\t\tif (arg.equals(\"-csv\")) {\r\n\t\t\treturn INPUT_MODE_CSV;\r\n\t\t}\r\n\t\tif (arg.equals(\"-db\")) {\r\n\t\t\treturn INPUT_MODE_DB;\r\n\t\t}\r\n\t\treturn INPUT_MODE_NONE;\r\n\t}", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'a': ucscGeneTableFileAll = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'g': ucscGeneTableFileSelect = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'b': barDirectory = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 'r': rApp = new File(args[i+1]); i++; break;\n\t\t\t\t\tcase 's': threshold = Float.parseFloat(args[i+1]); i++; break;\n\t\t\t\t\tcase 'e': extension = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'f': extensionToSegment = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'x': bpPositionOffSetBar = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'y': bpPositionOffSetRegion = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: Misc.printExit(\"\\nError: unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//parse text\n\t\tselectName = Misc.removeExtension(ucscGeneTableFileSelect.getName());\n\n\t}", "void\t\tsetCommandOptions(String command, Strings options);", "public void processArgs(String[] args){\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\n\t\tSystem.out.println(\"\\n\"+IO.fetchUSeqVersion()+\" Arguments: \"+Misc.stringArrayToString(args, \" \")+\"\\n\");\n\t\tfor (int i = 0; i<args.length; i++){\n\t\t\tString lcArg = args[i].toLowerCase();\n\t\t\tMatcher mat = pat.matcher(lcArg);\n\t\t\tif (mat.matches()){\n\t\t\t\tchar test = args[i].charAt(1);\n\t\t\t\ttry{\n\t\t\t\t\tswitch (test){\n\t\t\t\t\tcase 'b': bedFile = new File (args[i+1]); i++; break;\n\t\t\t\t\tcase 'm': minNumExons = Integer.parseInt(args[i+1]); i++; break;\n\t\t\t\t\tcase 'a': requiredAnnoType = args[i+1]; i++; break;\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\n\t\t\t\t\tdefault: System.out.println(\"\\nProblem, unknown option! \" + mat.group());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (Exception e){\n\t\t\t\t\tMisc.printExit(\"\\nSorry, something doesn't look right with this parameter: -\"+test+\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (bedFile == null || bedFile.canRead() == false) Misc.printExit(\"\\nError: cannot find your bed file!\\n\");\t\n\t}", "public void setCommandLinePattern(String pattern);", "public void doCommandLine(){\n\t\t//parse arguments\n\t\tString help = System.getProperty(\"help\");\n\t\tif (help!=null){\n\t\t\tdoHelp();\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tboolean doAutomation = false;\n\t\tString numRuns = System.getProperty(\"runs\");\n\t\tString outputDir = System.getProperty(\"out\");\n\t\tString filePref = System.getProperty(\"prefix\");\n\t\tString numIters = System.getProperty(\"iters\");\n\t\tString params = System.getProperty(\"params\");\n\t\tString inFasta = System.getProperty(\"in\");\n\t\tString inCustomMatrix = System.getProperty(\"inCustom\");\n\t\tString distanceName = System.getProperty(\"distanceName\");\n\t\tString doPdf = System.getProperty(\"pdf\");\n\t\tString zoom = System.getProperty(\"zoom\");\n\t\tString UIScaling = System.getProperty(\"UIScaling\");\n\t\tString width = System.getProperty(\"width\");\n\t\tString height = System.getProperty(\"height\");\n\t\tString reference = System.getProperty(\"reference\");\n\t\tdoAutomation |= numRuns!=null;\n\t\tdoAutomation |= outputDir!=null;\n\t\tdoAutomation |= filePref!=null;\n\t\tdoAutomation |= numIters!=null;\n\t\tdoAutomation |= inFasta!=null;\n\t\tdoAutomation |= inCustomMatrix!=null;\n\t\tif (doAutomation){\n\t\t\t//Necessary params:\n\t\t\tif (outputDir==null){\n\t\t\t\tbatchError(\"-Dout must be specified.\");\n\t\t\t}\n\t\t\tif (inFasta==null){\n\t\t\t\tbatchError(\"-Din must be specified.\");\n\t\t\t}\n\t\t\t//Necessary, if not doing PDF\n\t\t\tif (doPdf==null){ //Pdf render doesn't require all this stuff.\n\t\t\t\tif (numRuns==null){\n\t\t\t\t\tbatchError(\"-Druns must be specified.\");\n\t\t\t\t}\n\t\t\t\tif (params==null){\n\t\t\t\t\tbatchError(\"-Dparams must be specified.\");\n\t\t\t\t}\n\t\t\t\tif (numIters==null){\n\t\t\t\t\tbatchError(\"-Diters must be specified.\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnumRuns = \"0\";\n\t\t\t\tnumIters = \"0\";\n\t\t\t\tparams = null; //Use defaults\n\t\t\t}\n\t\t\t//Has a default / Optional:\n\t\t\tif (filePref==null){\n\t\t\t\tfilePref=\"dGbatch\";\n\t\t\t}\n\t\t\tif (zoom!=null){\n\t\t\t\tVIEW_SCALE_USER=max(1,new Float(zoom));\n\t\t\t}\n\t\t\tif (UIScaling != null) {\n\t\t\t\tthis.UIScaling = max(1, new Float(UIScaling));\n\t\t\t}\n\t\t\tif (width != null) {\n\t\t\t\tVIEW_WIDTH = max(1,new Integer(width));\n\t\t\t}\n\t\t\tif (height != null) {\n\t\t\t\tVIEW_HEIGHT = max(1,new Integer(height));\n\t\t\t}\n\t\t\tif (inCustomMatrix != null) {\n\t\t\t\tif (distanceName == null) {\n\t\t\t\t\tbatchError(\"-DdistanceName must be specified if -DinCustom used.\");\n\t\t\t\t}\n\t\t\t\tthis.distanceName = distanceName;\n\t\t\t}\n\t\t\t//Ok, do it.\n\t\t\trunScript(new Integer(numRuns),new Integer(numIters),params,outputDir,filePref,inFasta,inCustomMatrix,doPdf!=null,reference);\n\t\t} else {\n\t\t\t//If we get here, we didn't input any command line arguments.\n\t\t\tSystem.out.println(\"Dgraph can be automated: try adding -Dhelp to the arguments when running the program.\");\n\t\t}\n\t}", "public void processArgs(String[] args){\r\n\t\tPattern pat = Pattern.compile(\"-[a-z]\");\r\n\t\tfor (int i = 0; i<args.length; i++){\r\n\t\t\tString lcArg = args[i].toLowerCase();\r\n\t\t\tMatcher mat = pat.matcher(lcArg);\r\n\t\t\tif (mat.matches()){\r\n\t\t\t\tchar test = args[i].charAt(1);\r\n\t\t\t\ttry{\r\n\t\t\t\t\tswitch (test){\r\n\t\t\t\t\tcase 'f': directory = new File(args[i+1]); i++; break;\r\n\t\t\t\t\tcase 'o': orderedFileNames = args[++i].split(\",\"); break;\r\n\t\t\t\t\tcase 'c': output = new File(args[++i]); break;\r\n\t\t\t\t\tcase 'h': printDocs(); System.exit(0);\r\n\t\t\t\t\tdefault: Misc.printErrAndExit(\"\\nProblem, unknown option! \" + mat.group());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e){\r\n\t\t\t\t\tSystem.out.print(\"\\nSorry, something doesn't look right with this parameter request: -\"+test);\r\n\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\tSystem.exit(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//check to see if they entered required params\r\n\t\tif (directory==null || directory.isDirectory() == false){\r\n\t\t\tSystem.out.println(\"\\nCannot find your directory!\\n\");\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public static Options prepareOptions() {\n Options options = new Options();\n\n options.addOption(\"f\", \"forceDeleteIndex\", false,\n \"Force delete index if index already exists.\");\n options.addOption(\"h\", \"help\", false, \"Show this help information and exit.\");\n options.addOption(\"r\", \"realTime\", false, \"Keep for backwards compabitlity. No Effect.\");\n options.addOption(\"t\", \"terminology\", true, \"The terminology (ex: ncit_20.02d) to load.\");\n options.addOption(\"d\", \"directory\", true, \"Load concepts from the given directory\");\n options.addOption(\"xc\", \"skipConcepts\", false,\n \"Skip loading concepts, just clean stale terminologies, metadata, and update latest flags\");\n options.addOption(\"xm\", \"skipMetadata\", false,\n \"Skip loading metadata, just clean stale terminologies concepts, and update latest flags\");\n options.addOption(\"xl\", \"skipLoad\", false,\n \"Skip loading data, just clean stale terminologies and update latest flags\");\n options.addOption(\"xr\", \"report\", false, \"Compute and return a report instead of loading data\");\n\n return options;\n }", "@Override\n public AddCommand parse(String args) throws ParseException {\n ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args,\n PREFIX_QUESTION, PREFIX_CHOICE, PREFIX_DEFINITION, PREFIX_TAG, PREFIX_ANSWER);\n if (!arePrefixesPresent(argMultimap,\n PREFIX_QUESTION, PREFIX_DEFINITION, PREFIX_ANSWER)\n || !argMultimap.getPreamble().isEmpty()) {\n throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT + AddCommand.MESSAGE_USAGE));\n }\n\n Question question = ParserUtil.parseWord(argMultimap.getValue(PREFIX_QUESTION).get());\n List<Choice> choices = ParserUtil.parseChoices(argMultimap.getAllValues(PREFIX_CHOICE));\n Definition definition = ParserUtil.parseDefinition(argMultimap.getValue(PREFIX_DEFINITION).get());\n Set<Tag> tagList = ParserUtil.parseTags(argMultimap.getAllValues(PREFIX_TAG));\n Answer answer = ParserUtil.parseAnswer(argMultimap.getValue(PREFIX_ANSWER).get());\n\n Flashcard flashcard;\n if (arePrefixesPresent(argMultimap, PREFIX_CHOICE)) {\n if (!choices.contains(new Choice(answer.getAnswer()))) {\n throw new ParseException(ANSWER_CHOICE_MISMATCH);\n } else {\n flashcard = new McqFlashcard(question, choices, definition, tagList, answer);\n }\n } else {\n flashcard = new ShortAnswerFlashcard(question, definition, tagList, answer);\n }\n\n return new AddCommand(flashcard);\n }", "public Parser(String[] userInput) {\n this.command = userInput[0];\n if (userInput.length > 1) {\n this.description = userInput[1];\n }\n }", "void start(String option);", "public boolean parse(String input) {\n\t\tif (input.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tString[] sp = input.split(\" \");\n\t\tthis.command = sp[0];\n\t\tif (sp.length > 1) {\n\t\t\tthis.arguments = Arrays.copyOfRange(sp, 1, sp.length);\n\t\t}\n\t\treturn true;\n\t}", "private static boolean validOptionalArgs (String[] args){\n boolean validChar;\n // Iterate over args\n for (int i = 0; i < args.length; i++){\n if (args[i].charAt(0)!='-')\n \treturn false;\n // Iterate over characters (to read combined arguments)\n for (int charPos = 1; charPos < args[i].length(); charPos++){\n \tvalidChar = false;\n \tfor (int j = 0; j < VALID_OPTIONAL_ARGS.length; j++){\n\t if (args[i].charAt(charPos) == VALID_OPTIONAL_ARGS[j]){\n\t validChar = true;\n\t break;\n\t }\n \t}\n \tif (!validChar)\n \t\treturn false;\n \t}\n }\n return true;\n }", "public void parse(String argscall) throws ParseException{\n Commons.log.finest(toString()+\" Parsing '\"+argscall+\"'\");\n argscall = argscall.trim();\n \n LinkedList<String> args = new LinkedList<String>();\n HashMap<String, String> kwargs = new HashMap<String, String>();\n \n if(!argscall.isEmpty()){\n int pointer=0, nextStringStart=0, nextStringEnd=0, nextSpace=0;\n String token, key, val;\n\n while(nextSpace >= 0){ \n //Find next token end point\n nextSpace = argscall.indexOf(' ', pointer);\n nextStringStart = indexOfNextUnescapedChar(argscall, '\"', pointer);\n \n if(nextStringStart < nextSpace && nextStringStart != -1){\n nextStringEnd = indexOfNextUnescapedChar(argscall, '\"', nextStringStart+1);\n if(nextStringEnd == -1)\n throw new ParseException(\"Expected \\\" but reached end of string.\");\n nextSpace = argscall.indexOf(' ', nextStringEnd+1);\n }\n\n //Extract token\n if(nextSpace == -1)token = argscall.substring(pointer);\n else token = argscall.substring(pointer, nextSpace); \n token = token.trim();\n\n //See if it's a keyword match or not\n if(KEYWORD.matcher(token).find()){\n key = token.substring(0, token.indexOf('='));\n val = token.substring(token.indexOf('=')+1);\n }else{\n key = null;\n val = token;\n }\n\n //Remove string indicators\n if(val.startsWith(\"\\\"\") && val.endsWith(\"\\\"\")){\n val = val.substring(1, val.length()-1).replaceAll(\"\\\\\\\\\\\"\", \"\\\"\");\n }\n\n //Save to queue or dict\n if(key == null) args.add(val);\n else kwargs.put(key, val);\n\n //Advance pointer\n pointer = nextSpace+1;\n }\n }\n \n for(Argument arg : chain){\n arg.parse(args, kwargs);\n }\n \n apargs = args.toArray(new String[args.size()]);\n akargs.putAll(kwargs);\n }", "protected void DefineFlag()\n {\n String flagStr = \"-ci -d -h -hs -i:STR -n -o:STR -p -s:STR -t:INT -ti -v -x:STR\";\n \n // init the system option\n systemOption_ = new Option(flagStr);\n // Add the full name for flags\n systemOption_.SetFlagFullName(\"-ci\", \"Print_Config_Info\");\n systemOption_.SetFlagFullName(\"-d\", \"Print_Operation_Details\");\n systemOption_.SetFlagFullName(\"-h\", \"Help\");\n systemOption_.SetFlagFullName(\"-hs\", \"Hierarchy_Struture\");\n systemOption_.SetFlagFullName(\"-i\", \"Input_File\");\n systemOption_.SetFlagFullName(\"-n\", \"No_Output\");\n systemOption_.SetFlagFullName(\"-o\", \"Output_File\");\n systemOption_.SetFlagFullName(\"-p\", \"Show_Prompt\");\n systemOption_.SetFlagFullName(\"-s\", \"Field_Separator\");\n systemOption_.SetFlagFullName(\"-t\", \"Term_Field\");\n systemOption_.SetFlagFullName(\"-ti\", \"Display_Filtered_Input\");\n systemOption_.SetFlagFullName(\"-v\", \"Version\");\n systemOption_.SetFlagFullName(\"-x\", \"Load_Configuration_file\");\n }", "public void testParams() {\n String line = \"-Xmx256m org.milos.Main arg1\";\n assertEquals(\"-Xmx256m\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"org.milos.Main\", RunJarPanel.splitMainClass(line));\n assertEquals(\"arg1\", RunJarPanel.splitParams(line));\n \n line = \"-Xdebug -Djava.compiler=none -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath ${packageClassName}\";\n assertEquals(\"-Xdebug -Djava.compiler=none -Xnoagent -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address} -classpath %classpath\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"${packageClassName}\", RunJarPanel.splitMainClass(line));\n assertEquals(\"\", RunJarPanel.splitParams(line));\n \n line = \"-classpath %classpath ${packageClassName} %classpath ${packageClassName}\";\n assertEquals(\"-classpath %classpath\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"${packageClassName}\", RunJarPanel.splitMainClass(line));\n assertEquals(\"%classpath ${packageClassName}\", RunJarPanel.splitParams(line));\n \n line = \"Main arg1 arg2.xsjs.xjsj.MainParam\";\n assertEquals(\"\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"Main\", RunJarPanel.splitMainClass(line));\n assertEquals(\"arg1 arg2.xsjs.xjsj.MainParam\", RunJarPanel.splitParams(line));\n \n //non trimmed line\n line = \" -classpath %classpath ${packageClassName} %classpath ${packageClassName} \";\n assertEquals(\"-classpath %classpath\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"${packageClassName}\", RunJarPanel.splitMainClass(line));\n assertEquals(\"%classpath ${packageClassName}\", RunJarPanel.splitParams(line));\n\n //param with quotes and spaces..\n line = \"-Dparam1=\\\"one two three\\\" -classpath %classpath ${packageClassName} %classpath ${packageClassName} \";\n assertEquals(\"-Dparam1=\\\"one two three\\\" -classpath %classpath\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"${packageClassName}\", RunJarPanel.splitMainClass(line));\n assertEquals(\"%classpath ${packageClassName}\", RunJarPanel.splitParams(line));\n line = \"-D\\\"foo bar=baz quux\\\" -classpath %classpath my.App\";\n assertEquals(\"-D\\\"foo bar=baz quux\\\" -classpath %classpath\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"my.App\", RunJarPanel.splitMainClass(line));\n assertEquals(\"\", RunJarPanel.splitParams(line));\n line = \"\\\"-Dfoo bar=baz quux\\\" -classpath %classpath my.App\"; // #199411\n assertEquals(\"\\\"-Dfoo bar=baz quux\\\" -classpath %classpath\", RunJarPanel.splitJVMParams(line));\n assertEquals(\"my.App\", RunJarPanel.splitMainClass(line));\n assertEquals(\"\", RunJarPanel.splitParams(line));\n }", "public static Options createOptions() {\n Options options = new Options();\n options.addOption(Option.builder(\"i\").required(true).longOpt(\"inputFile\").hasArg(true)\n .argName(\"PATH\").desc(\"this command specifies the path to the file \"\n + \"containing queries to be inputted into the tool. It is therefore mandatory\")\n .build());\n options.addOption(Option.builder(\"o\").longOpt(\"outputFile\").hasArg(true).argName(\"PATH\")\n .desc(\"this command specifies the path to the file that the tool can write \"\n + \"its results to. If not specified, the tool will simply print results\"\n + \"on the console. It is therefore optional\").build());\n options.addOption(Option.builder(\"l\").longOpt(\"limit\").hasArg(true).argName(\"INTEGER\")\n .desc(\"this command specifies the path to an integer that the tools takes \"\n + \"as a limit for the number of errors to be explored, thereby controlling\"\n + \"the runtime. It is therefore optional\").build());\n return options;\n }", "private CommandLine() {\n\t}" ]
[ "0.67060745", "0.62072396", "0.60881686", "0.60657954", "0.6015606", "0.59667736", "0.5927574", "0.59195507", "0.58658755", "0.5774331", "0.57738876", "0.5769933", "0.5671289", "0.5663504", "0.55977076", "0.55948114", "0.5582215", "0.55779684", "0.55583954", "0.55446154", "0.55263877", "0.55239475", "0.5520624", "0.5520382", "0.5476713", "0.54742444", "0.5448203", "0.5428559", "0.54228115", "0.5406567", "0.5401364", "0.5396986", "0.53879744", "0.53791213", "0.5358939", "0.5342802", "0.5312997", "0.5312677", "0.53089726", "0.53081346", "0.53079265", "0.52974147", "0.5294494", "0.5290485", "0.528966", "0.5273978", "0.5271939", "0.52707225", "0.5267294", "0.52441686", "0.5242548", "0.52173483", "0.521524", "0.5202267", "0.5201027", "0.51924855", "0.5167389", "0.51552236", "0.5146516", "0.5138879", "0.5137141", "0.5134442", "0.51315826", "0.5125773", "0.5117908", "0.51162887", "0.51161116", "0.5112758", "0.5104635", "0.5099643", "0.50989556", "0.5098697", "0.50878674", "0.50859547", "0.5084567", "0.50845176", "0.5071809", "0.5071427", "0.5055254", "0.50398505", "0.5038498", "0.5031754", "0.5024422", "0.50237244", "0.50221646", "0.50212675", "0.50203097", "0.5003568", "0.5001251", "0.49906608", "0.49861938", "0.4984102", "0.49819416", "0.4970978", "0.49653447", "0.49562728", "0.4955126", "0.49516112", "0.4951192", "0.4945018" ]
0.66562784
1
Returns the next command line option. In the event that no more options are left the OPT_EOF value is returned.
public char getopt() { if (opt_count >= opts.size()) return OPT_EOF; return ((Character) (opts.elementAt(opt_count++))).charValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public char getOption() {\r\n\t\treturn scanner.nextLine().charAt(0);\r\n\t}", "public String optarg() {\n\tif (arg_count >= args.size())\n\t return null;\n\treturn (String) args.elementAt(arg_count++);\n }", "public int getIntValue(String opt) {\n return Integer.parseInt((String)m_commandLine.getValue(opt));\n }", "private int correctOption(final String options, final int lastOption) {\n\n// Take int value by user thorough command line\n int option;\n\n// Count the iterations of while loop and show the options again to the user if user has chosen wrong option.\n int loop = 0;\n\n while (true) {\n\n System.out.println(options);\n option = scanner.nextInt();\n\n// If the input is in between the range specified, just break the loop and return the value\n if (option <= lastOption && option > 0)\n break;\n\n// If the attempts exceed close the resources and return -1 value which will close the program\n if (loop >= 2) {\n option = -1;\n break;\n } else\n System.err.println(\"\\nPlease select correct option\");\n\n loop++;\n }\n return option;\n }", "public String getValue(String opt) {\n return (String)m_commandLine.getValue(opt);\n }", "public CliOptStruct getOption(String _arg){\r\n\t\tboolean shortArg;\r\n\r\n\t\tif(_arg.length() == 1){shortArg=true;}else{shortArg=false;}\r\n\t\tfor(int a=0;a<opts.size();a++){\r\n\t\t\tif(shortArg){\r\n\t\t\t\tif(opts.get(a).getArgument() == _arg.charAt(0)){\r\n\t\t\t\t\treturn opts.get(a);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(opts.get(a).getLongArgument().equals(_arg)){\r\n\t\t\t\t\treturn opts.get(a);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String getNextCommand() {\n System.out.println(\"Left, Right, Advance <n>, Quit , Help: \");\n return scanner.nextLine();\n }", "private static int getUserOption()\n {\n\t// Reads the users input.\n\tBufferedReader optionReader = new BufferedReader(new InputStreamReader(System.in));\n\n\ttry\n\t {\n\t\treturn(Integer.parseInt(optionReader.readLine()));\n\t }\n\tcatch(Exception ex)\n\t {\n\t\treturn(-1);\n\t }\n }", "String getOption();", "static String getOptionValue(String args[], String optionName, String defaultVal) {\n String argValue = \"\";\n try {\n int i = 0;\n String arg = \"\";\n boolean found = false;\n\n while (i < args.length) {\n arg = args[i++];\n\n if (arg.equals(optionName)) {\n if (i < args.length)\n argValue = args[i++];\n if (argValue.startsWith(\"-\") || argValue.equals(\"\")) {\n argValue = defaultVal;\n }\n found = true;\n }\n }\n\n if (!found) {\n argValue = defaultVal;\n }\n } catch (Exception e) {\n showError(\"getOptionValue\", e);\n }\n\n return argValue;\n }", "public static int inputOptions() {\n\t\tSystem.out.println(PROMPT);\n\t\tint responseNum = -1;\n\t\tin = new Scanner(System.in);\n\t\t// Ensure that response is 0 or 1\n\t\twhile (in.hasNext()) {\n\t\t\tString rawResponse = in.nextLine();\n\t\t\tString response = rawResponse.trim();\n\t\t\tresponseNum = Integer.parseInt(response);\n\t\t\tif (responseNum == 0 || responseNum == 1) {\n\t\t\t\treturn responseNum;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(INVALID_ENTRY_MSG);\n\t\t\t}\n\t\t}\n\t\treturn responseNum;\n\t}", "private static char isOption(String opt) {\r\n\r\n\t\tif(opt.matches(\"^-?\\\\d+$\"))\r\n\t\t\treturn 0; /* It's a number */\r\n\t\t\r\n\t\tif(opt.indexOf(\"--\") == 0) {\r\n\t\t\t/* It's a string flag */\r\n\t\t\tif(opt.length() == 2 || opt.charAt(2) == '=') {\r\n\t\t\t\t/* This string flag is not long enough. It's only made of '--'. It's invalid. */\r\n\t\t\t\treturn 4;\r\n\t\t\t}\r\n\t\t\treturn 2;\r\n\t\t} else if(opt.indexOf(\"-\") == 0) {\r\n\t\t\t/* It's a single character flag */\r\n\t\t\tif(opt.length() != 2) {\r\n\t\t\t\tif(opt.contains(\"=\") && opt.length() > 2) {\r\n\t\t\t\t\t/* It's a single character flag with an equals in front of it. It's VALID. */\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\t/* This single character flag is longer/shorter than 1 character. It's invalid. */\r\n\t\t\t\treturn 3;\r\n\t\t\t}\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\t/* It's a pure value */\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public int getOption() {\n return option;\n }", "public int getOption() {\n return option;\n }", "public interface NextTokenOptions {\n\n\t/**\n\t * Returns the abstract options.\n\t * \n\t * @return The set of abstract options.\n\t */\n\tpublic Set<? extends AbstractOption> getAbstractOptions();\n\n\t/**\n\t * Returns the concrete options.\n\t * \n\t * @return The set of concrete options.\n\t */\n\tpublic Set<? extends ConcreteOption> getConcreteOptions();\n\t\n\t/**\n\t * Returns true if the specified token is a possible next token.\n\t * \n\t * @param token The token text.\n\t * @return true if it is a possible next token.\n\t */\n\tpublic boolean containsToken(String token);\n\t\n\t/**\n\t * Returns true if the specifed category represents a possible next token.\n\t * \n\t * @param categoryName The name of the category.\n\t * @return true if it represents a possible next token.\n\t */\n\tpublic boolean containsCategory(String categoryName);\n\n}", "private @Nullable Token eatOpt(TokenType expectedTokenType) {\n if (peek(expectedTokenType)) {\n return eat(expectedTokenType);\n }\n return null;\n }", "public String nextArgument() {\n\t\tif (tok == null || !tok.hasMoreElements())\n\t\t\treturn null;\n\n\t\tString arg = tok.nextToken();\n\t\tif (arg.startsWith(\"\\\"\")) { //$NON-NLS-1$\n\t\t\tif (arg.endsWith(\"\\\"\")) { //$NON-NLS-1$\n\t\t\t\tif (arg.length() >= 2)\n\t\t\t\t\t// strip the beginning and ending quotes\n\t\t\t\t\treturn arg.substring(1, arg.length() - 1);\n\t\t\t}\n\t\t\tString remainingArg = tok.nextToken(\"\\\"\"); //$NON-NLS-1$\n\t\t\targ = arg.substring(1) + remainingArg;\n\t\t\t// skip to next whitespace separated token\n\t\t\ttok.nextToken(WS_DELIM);\n\t\t}\n\t\telse if (arg.startsWith(\"'\")) { //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\tif (arg.endsWith(\"'\")) { //$NON-NLS-1$\n\t\t\t\tif (arg.length() >= 2)\n\t\t\t\t\t// strip the beginning and ending quotes\n\t\t\t\t\treturn arg.substring(1, arg.length() - 1);\n\t\t\t}\n\t\t\tString remainingArg = tok.nextToken(\"'\"); //$NON-NLS-1$\n\t\t\targ = arg.substring(1) + remainingArg;\n\t\t\t// skip to next whitespace separated token\n\t\t\ttok.nextToken(WS_DELIM);\n\t\t}\n\t\treturn arg;\n\t}", "private void nextOption() {\n\t\tif (!running)\t//User may have already made selection \n\t\t\treturn;\n\t\t\n\t\tmenuTimer.cancel();\n\t\tcurrSelection++;\n\t\tif (currSelection >= menuOptions.size()) {\n\t\t\tcurrSelection = 0;\n\t\t\tcallback.menuTimeout();\n\t\t} else {\n\t\t\tString message = menuOptions.get(currSelection);\n\t\t\toutputProc.sayText(message, menuTimerListener, objID);\n\t\t}\n\t}", "public String getOption()\r\n {\r\n return ((COSString)option.getObject( 0 ) ).getString();\r\n }", "protected P parse(String options, String[] args){\n HashMap cmdFlags = new HashMap();\n String flag;\n String nextFlag=null;\n StringBuffer errors=new StringBuffer();\n /**\n First go through options to see what should be in args\n */\n for(int which=0;which<options.length();which++){\n flag = \"-\"+options.substring(which,which+1);\n if(which+1<options.length()){\n nextFlag=options.substring(which+1,which+2);\n if (nextFlag.equals(\"-\")){\n cmdFlags.put(flag,nextFlag);\n } else\n if (nextFlag.equals(\"+\")){\n cmdFlags.put(flag,nextFlag);\n /*\n mark that it is required\n if found this will be overwritten by -\n */\n this.put(flag,nextFlag);\n } else\n //JDH changed to \"_\" from \";\" because too many cmdlines mess up ;\n if (nextFlag.equals(\"_\")){\n cmdFlags.put(flag,nextFlag);\n } else\n //JDH changed to \".\" from \":\" because too many cmdlines mess up ;\n if (nextFlag.equals(\".\")){\n cmdFlags.put(flag,\" \"); //JDH changed this from \":\"\n /*\n mark that it is required\n if found this will be overwritten by value\n JDH should use \" \" so it cannot be the same as a value\n */\n this.put(flag,\" \"); // mark that it is required\n } else {\n System.out.println(\"Bad symbol \"+nextFlag+\"in option string\");\n }\n which++;\n } else {\n System.out.println(\"Missing symbol in option string at \"+which);\n }\n }\n\n int arg=0;\n for(;arg<args.length;arg++){\n if (!args[arg].startsWith(\"-\")){\n break;\n }\n flag = args[arg];\n /*\n This should tell it to quit looking for flags or options\n */\n if (flag.equals(\"--\")){\n arg++;\n break;\n }\n if (!(cmdFlags.containsKey(flag))){\n errors.append(\"\\nbad flag \"+flag);\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"-\")){\n this.put(flag,\"-\");\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"+\")){\n this.put(flag,\"-\");// turns off the + because it was found\n continue;\n }\n if (!(arg+1<args.length)){\n errors.append(\"\\nMissing value for \"+flag);\n continue;\n }\n arg++;\n this.put(flag,args[arg]);\n }\n String[] params=null;\n params = new String[args.length - arg];\n\n int n=0;\n // reverse these so they come back in the right order!\n for(;arg<args.length;arg++){\n params[n++] = args[arg];\n }\n Iterator k = null;\n Map.Entry e = null;\n if (this.containsValue(\"+\")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\"+\".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required flag \"+(String)e.getKey()+\" was not supplied.\");\n };\n }\n } \n /*\n Should change this to \" \" in accordance with remark above\n */\n //JDH changed to \" \" from \":\" in both spots below\n if (this.containsValue(\" \")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\" \".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required option \"+(String)e.getKey()+\" was not supplied.\");\n }\n }\n }\n this.put(\" \",params);\n this.put(\"*\",errors.toString());\n return this;\n }", "private String getLongInstruction(int nextVal) throws java.io.IOException {\n\t\treadUntilEndOfLine(nextVal);\n\t\treturn next;\n\t}", "public int getIntOption(String name) {\n return options.getIntOption(name);\n }", "public Opt getOption(String name) {\n\t\tfor (Opt op : options) {\n\t\t\tif (name.equals(op.getName())) {\n\t\t\t\treturn op;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "protected static Optional<String> optionValue(String arg) {\n checkArgument(arg.startsWith(\"-\"), \"expected option string: %s\", arg);\n List<String> option = Splitter.on('=').limit(2).splitToList(arg);\n return option.size() > 1 ? Optional.of(option.get(1)) : Optional.empty();\n }", "public Iterator getOptions() {\n synchronized (options) {\n return Collections.unmodifiableList(new ArrayList(options)).iterator();\n }\n }", "public static int getMenuOption() {\n Scanner input = new Scanner(System.in);\n\n menuOption = input.next().toLowerCase().charAt(0);\n\n while (menuOption != 'a' && menuOption != 'r' && menuOption != 'f' && menuOption != 'i' && menuOption != 'n' && menuOption != 'q') {\n System.out.print(\"Enter a valid choice: \");\n menuOption = input.next().toLowerCase().charAt(0);\n }\n\n if (menuOption == 'a') {\n return 1;\n } else if (menuOption == 'r') {\n return 2;\n } else if (menuOption == 'f') {\n return 3;\n } else if (menuOption == 'i') {\n return 4;\n } else if (menuOption == 'n') {\n return 5;\n } else {\n return 6;\n }\n }", "public static int getMenuChoice() {\n String line;\n int option = -1;\n\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n\n try {\n option = Integer.parseInt(line);\n } catch (NumberFormatException e) {\n option = -1;\n }\n }\n\n return option;\n }", "public static Options getCmdLineOptions(){\n\t\tOptions options = new Options();\n\t\t//\t\toptions.addOption(OptionBuilder.withArgName(\"outputPath\").hasArg().withDescription(\"output sequence lengths to a file [if not specified, lengths are printed to stdout]\").create(Thunder.OPT_PATH_OUTPUT));\n\t\t//\t\toptions.addOption(OptionBuilder.withArgName(\"maxExpectedLength\").hasArg().withDescription(\"print sequences exceeding this maximum expected size (for debugging + QC)\").create(\"m\"));\n\t\treturn options;\n\t}", "public Object getOption(String key) {\n\t\tint index = propertyKeys.indexOf(key);\n\t\tif (index == -1)\n throw new IllegalArgumentException(\"Unknown option \" + key);\n\t\treturn currentOption.get(index);\n\t}", "public String[] getOptions() {\n return argv;\n }", "public EncapsulatedIRCCommand getNextCommand();", "public interface CmdLineOption {\n \n /**\n * Checks if this option parser recognizes the specified\n * option name.\n */\n boolean accepts(String optionName);\n\n /**\n * Called if the option that this parser recognizes is found.\n * \n * @param parser\n * The parser that's using this option object.\n * \n * For example, if the option \"-quiet\" is simply an alias to\n * \"-verbose 5\", then the implementation can just call the\n * {@link CmdLineParser#parse(String[])} method recursively. \n * \n * @param params\n * The rest of the arguments. This method can use this\n * object to access the arguments of the option if necessary.\n * \n * @return\n * The number of arguments consumed. For example, return 0\n * if this option doesn't take any parameter.\n */\n int parseArguments( CmdLineParser parser, Parameters params ) throws CmdLineException;\n \n// /**\n// * Adds the usage message for this option. \n// * <p>\n// * This method is used to build usage message for the parser.\n// * \n// * @param buf\n// * Messages should be appended to this buffer.\n// * If you add something, make sure you add '\\n' at the end. \n// */\n// void appendUsage( StringBuffer buf );\n \n \n /**\n * SPI for {@link CmdLineOption}.\n * \n * Object of this interface is passed to\n * {@link CmdLineOption}s to make it easy/safe to parse\n * additional parameters for options.\n */\n public interface Parameters {\n /**\n * Gets the recognized option name.\n * \n * @return\n * This option name has been passed to the\n * {@link CmdLineOption#accepts(String)} method and\n * the method has returned <code>true</code>.\n */\n String getOptionName();\n \n /**\n * Gets the additional parameter to this option.\n * \n * @param idx\n * specifying 0 will retrieve the token next to the option.\n * For example, if the command line looks like \"-o abc -d x\",\n * then <code>getParameter(0)</code> for \"-o\" returns \"abc\"\n * and <code>getParameter(1)</code> will return \"-d\".\n * \n * @return\n * Always return non-null valid String. If an attempt is\n * made to access a non-existent index, this method throws\n * appropriate {@link CmdLineException}.\n */\n String getParameter( int idx ) throws CmdLineException;\n \n /**\n * The convenience method of\n * <code>Integer.parseInt(getParameter(idx))</code>\n * with proper error handling.\n * \n * @exception CmdLineException\n * If the parameter is not an integer, it throws an\n * approrpiate {@link CmdLineException}.\n */\n int getIntParameter( int idx ) throws CmdLineException;\n }\n \n}", "public Integer ValidateOption(String option){\n try {\n return Integer.parseInt(option.trim());\n }\n catch (NumberFormatException ex){\n return -1;\n }\n }", "public static int optionLength(String option) {\n\t\tif (option.equals(\"-version\")) {\n\t\t\treturn 2;\n\t\t}\n\t\treturn Doclet.optionLength(option);\n\t}", "@Override\n\tpublic IKeyword option() { return option; }", "public List getOptions() {\n\t\treturn currentOption;\n\t}", "protected Option getOption(String optionName) {\n\t\tfor (Option op : options) {\n\t\t\tif (op.getOptionName().equals(optionName)) {\n\t\t\t\treturn op;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "int getOptLevelValue();", "OptionalInt peek();", "public int getOptions() {\n\t\treturn this.options;\n\t}", "@Test public void unknownOptionStopsProcessing() {\n\t\tfinal String[] args = new String[]{\"-unknown\"};\n\t\tfinal CliActuators actuators = parser.parse(args, OPTIONS);\n\t\tAssert.assertEquals(\"-unknown\", actuators.getRests().get(0));\n\t}", "public static int getOption() {\n\t\t\n\t\tSystem.out.println(\"*** Temperature Conversion ***\");\n\t\tSystem.out.println(\"1. Celsius to Farhenheit\");\n\t\tSystem.out.println(\"2. Farhenheit to Celsius\");\n\t\tSystem.out.println(\"Enter conversion option\");\n\t\tint optionValue = sc.nextInt();\n\t\treturn optionValue;\n\t}", "public static int getMenu() {\n\t\tSystem.out.println(\"Choose Options from menu:\");\n\t\tint option = scanner.nextInt();\n\n\t\treturn option;\n\t}", "public void testGetOpt() throws Exception {\n String str;\n while ((str = this._getOpt.nextArg()) != null) {\n // it's so happened that all the test arguments begin with different\n // letter, so we can just check by that. In general, we can also\n // use String.equals() method to do the comparison.\n switch (str.charAt(0)) {\n case 'h' :\n break;\n case 'u' :\n assertEquals(\"tux\", this._getOpt.getArgValue());\n break;\n case 'p' :\n assertEquals(\"v2.4\", this._getOpt.getArgValue());\n break;\n case 's' :\n assertEquals(\"dbServer\", this._getOpt.getArgValue());\n break;\n case 'd' :\n assertEquals(\"mydb\", this._getOpt.getArgValue());\n break;\n default :\n MDMS.ERROR(\"Invalue input argument\");\n }\n }\n }", "public String getOptionText() {\n return option;\n }", "public String getOption(String name) {\n return options.getOption(name);\n }", "static String nextArg(int currentIndex, String[] allArgs) {\n final int nextIndex = currentIndex + 1;\n if (nextIndex < allArgs.length) {\n return allArgs[nextIndex];\n } else {\n throw new IllegalArgumentException(allArgs[currentIndex] + \": missing required argument\");\n }\n }", "public OptionEntry getSelectedOption() {\n for (Iterator it=getEntries().iterator();it.hasNext();) {\n OptionEntry o=(OptionEntry)it.next();\n if (o.getValue().getBoolean()==true) {\n return o;\n }\n }\n return null;\n\n }", "protected boolean readOptionHeader() throws java.io.IOException {\n char c = readCharWord();\n if (c=='~') {\n next();\n return false;\n }\n if (c=='(') {\n next();\n return true;\n }\n throw error();\n }", "public static int selectMenuOption(String... options) {\n\n for (int i = 0; i < options.length; ++i) {\n c.writer().printf(\"%d. %s%n\", i + 1, options[i]);\n }\n \n for (;;) {\n final int choice;\n\n try {\n choice = Integer.parseInt(\n c.readLine(\"\\nSelect an option and press Enter: \\n\"\n + \">>\"));\n\n if (choice > 0 && choice < options.length + 1) {\n return choice;\n } else {\n c.printf(\"Your choice is not available! choose another.%n\");\n }\n } catch (NumberFormatException e) {\n c.printf(\n \"Enter a number that corresponds with a menu choice!%n\");\n }\n }\n }", "go.micro.runtime.RuntimeOuterClass.ReadOptions getOptions();", "private static int determineResultLimit(CommandLine optionLine)\n {\n String limit = optionLine.getOptionValue(Environment.LIMIT);\n if (StringUtils.isEmpty(limit)) {\n return -1;\n }\n return Integer.parseInt(limit);\n }", "public static int getNextChar()\r\n\r\n\t// Returns the next character on the input stream. If the end of file is reached, -1 is returned.\r\n\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn inStream.read();\r\n\t\t}\r\n\t\tcatch(IOException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}", "@Override\n\tpublic String nextCommand() {\n\t\treturn null;\n\t}", "public boolean possibleNextInput() {\n return _index < _input.length();\n }", "public GetOpt(String [] sargs, String flags) throws BadOptException {\n\tint size = sargs.length;\n\n\ttry {\n\t StringReader sreader = new StringReader(flags);\n\t for (int i = 0; i < flags.length(); i++) {\n\t\tint opt = sreader.read();\n\t\t\n\t\tif (opt == ':')\n\t\t ((OptPair) optlist.elementAt(optlist.size() - 1)).bool = false;\n\t\telse\n\t\t optlist.add(new OptPair((char) opt, true));\n\t }\n\t \n\t sreader.close();\n\t} catch (IOException e) {\n\t System.err.println(\"Bizarre error situation!\");\n\t throw new BadOptException(\"I/O problem encountered manipulating strings with a StringReader!\");\n\t}\n\n\t//\tfor (int i = 0; i < optlist.size(); i++)\n\t//\t System.out.println(optlist.elementAt(i));\n\n\tfor (int i = 0; i < sargs.length; i++) {\n\t if (sargs[i].startsWith(\"-\")) {\n\t\ttry {\n\t\t StringReader sreader = new StringReader(sargs[i].substring(1));\n\n\t\t int opt = -1;\n\t\t while ((opt = sreader.read()) != -1) {\n\t\t\tboolean found = false;\n\t\t\tboolean bool = true;\n\t\t\tfor (int j = 0; j < optlist.size(); j++) {\n\t\t\t OptPair temp = (OptPair) optlist.elementAt(j);\n\t\t\t if (temp.option == (char) opt) {\n\t\t\t\tfound = true;\n\t\t\t\tbool = temp.bool;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\n\t\t\tif (found) {\n\t\t\t opts.add(new Character((char) opt));\n\t\t\t if (!bool) {\n\t\t\t\targs.add(sargs[++i]);\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t} else {\n\t\t\t throw new BadOptException((char) opt + \": is an invalid switch option.\");\n\t\t\t}\n\t\t }\n\t\t} catch (IOException e) {\n\t\t System.err.println(\"Bizarre error situation!\");\n\t\t throw new BadOptException(\"I/O problem encountered manipulating strings with a StringReader!\");\n\t\t}\n\t } else {\n\t\tparams.add(sargs[i]);\n\t }\n\t}\n }", "public int getNbrOptions() {\n\t\treturn optGroup.getOptions().size();\n\t}", "public VCFLine getNextLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn reader.getCurrentLine();\n\t}", "private static boolean parseOptions(String[] args) {\n\t\ttry {\n\t\t\tCommandLineParser parser = new DefaultParser();\n\t\t\tCommandLine cmd = parser.parse(createOptions(), args);\n\t\t\tif (cmd.hasOption(\"source\")) {\n\t\t\t\tfileName = cmd.getOptionValue(\"source\");\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"r\")) {\n\t\t\t\ttry {\n\t\t\t\t\tmaxRank = ((Number) cmd.getParsedOptionValue(\"r\")).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"Illegal value provided for -r option.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"t\")) {\n\t\t\t\ttry {\n\t\t\t\t\ttimeOut = ((Number) cmd.getParsedOptionValue(\"t\")).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"Illegal value provided for -t option.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"c\")) {\n\t\t\t\ttry {\n\t\t\t\t\trankCutOff = ((Number) cmd.getParsedOptionValue(\"c\")).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.err.println(\"Illegal value provided for -c option.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"d\")) {\n\t\t\t\titerativeDeepening = true;\n\t\t\t\tif (maxRank > 0) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"Warning: ignoring max_rank setting (must be 0 when iterative deepening is enabled).\");\n\t\t\t\t\tmaxRank = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"f\")) {\n\t\t\t\tterminateAfterFirst = true;\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"ns\")) {\n\t\t\t\tnoExecStats = true;\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"nr\")) {\n\t\t\t\tnoRanks = true;\n\t\t\t}\n\t\t\tif (cmd.hasOption(\"help\")) {\n\t\t\t\tprintUsage();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tSystem.out.println(pe.getMessage());\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public static int getUserOption(){\n\n String numberAsString;\n int userOption;\n java.util.Scanner scanner = new java.util.Scanner(System.in);\n\n listMenuOptions();\n numberAsString = scanner.nextLine();\n userOption = Integer.parseInt(numberAsString); // Convert string to a integer\n while ( ( userOption < 0 )|| (userOption > 4 ) ) { // check if input is valid\n System.out.println(\"You did not enter a valid option. Try again.\");\n listMenuOptions();\n numberAsString = scanner.nextLine();\n userOption = Integer.parseInt(numberAsString); // Convert string to a integer\n }\n return userOption;\n }", "public Long next() {\n\t\t\treturn Long.valueOf(nextLong());\n\t\t}", "public long nextLong()\r\n\t{\r\n\t\tif(st == null || !st.hasMoreTokens())\r\n\t\t\tnewst();\r\n\t\treturn Long.parseLong(st.nextToken());\r\n\t}", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String next() {\n try {\n String result = fNextLine;\n if (fNextLine != null) {\n fNextLine = fIn.readLine();\n if (fNextLine == null) {\n fIn.close();\n }\n }\n\n return result;\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public interface Option {\n\n /**\n * Processes String arguments into a CommandLine.\n *\n * The iterator will initially point at the first argument to be processed\n * and at the end of the method should point to the first argument not\n * processed. This method MUST process at least one argument from the\n * ListIterator.\n *\n * @param commandLine\n * The CommandLine object to store results in\n * @param args\n * The arguments to process\n * @throws OptionException\n * if any problems occur\n */\n void process(\n final WriteableCommandLine commandLine,\n final ListIterator args)\n throws OptionException;\n\n /**\n * Adds defaults to a CommandLine.\n *\n * Any defaults for this option are applied as well as the defaults for\n * any contained options\n *\n * @param commandLine\n * The CommandLine object to store defaults in\n */\n void defaults(final WriteableCommandLine commandLine);\n\n /**\n * Indicates whether this Option will be able to process the particular\n * argument.\n *\n * @param argument\n * The argument to be tested\n * @return true if the argument can be processed by this Option\n */\n boolean canProcess(final WriteableCommandLine commandLine, final String argument);\n\n /**\n * Indicates whether this Option will be able to process the particular\n * argument. The ListIterator must be restored to the initial state before\n * returning the boolean.\n *\n * @see #canProcess(WriteableCommandLine,String)\n * @param arguments\n * the ListIterator over String arguments\n * @return true if the argument can be processed by this Option\n */\n boolean canProcess(final WriteableCommandLine commandLine, final ListIterator arguments);\n\n /**\n * Identifies the argument prefixes that should trigger this option. This\n * is used to decide which of many Options should be tried when processing\n * a given argument string.\n *\n * The returned Set must not be null.\n *\n * @return The set of triggers for this Option\n */\n Set getTriggers();\n\n /**\n * Identifies the argument prefixes that should be considered options. This\n * is used to identify whether a given string looks like an option or an\n * argument value. Typically an option would return the set [--,-] while\n * switches might offer [-,+].\n *\n * The returned Set must not be null.\n *\n * @return The set of prefixes for this Option\n */\n Set getPrefixes();\n\n /**\n * Checks that the supplied CommandLine is valid with respect to this\n * option.\n *\n * @param commandLine\n * The CommandLine to check.\n * @throws OptionException\n * if the CommandLine is not valid.\n */\n void validate(final WriteableCommandLine commandLine)\n throws OptionException;\n\n /**\n * Builds up a list of HelpLineImpl instances to be presented by HelpFormatter.\n *\n * @see HelpLine\n * @see org.apache.commons.cli2.util.HelpFormatter\n * @param depth\n * the initial indent depth\n * @param helpSettings\n * the HelpSettings that should be applied\n * @param comp\n * a comparator used to sort options when applicable.\n * @return a List of HelpLineImpl objects\n */\n List helpLines(\n final int depth,\n final Set helpSettings,\n final Comparator comp);\n\n /**\n * Appends usage information to the specified StringBuffer\n *\n * @param buffer the buffer to append to\n * @param helpSettings a set of display settings @see DisplaySetting\n * @param comp a comparator used to sort the Options\n */\n void appendUsage(\n final StringBuffer buffer,\n final Set helpSettings,\n final Comparator comp);\n\n /**\n * The preferred name of an option is used for generating help and usage\n * information.\n *\n * @return The preferred name of the option\n */\n String getPreferredName();\n\n /**\n * Returns a description of the option. This string is used to build help\n * messages as in the HelpFormatter.\n *\n * @see org.apache.commons.cli2.util.HelpFormatter\n * @return a description of the option.\n */\n String getDescription();\n\n /**\n * Returns the id of the option. This can be used in a loop and switch\n * construct:\n *\n * <code>\n * for(Option o : cmd.getOptions()){\n * switch(o.getId()){\n * case POTENTIAL_OPTION:\n * ...\n * }\n * }\n * </code>\n *\n * The returned value is not guarenteed to be unique.\n *\n * @return the id of the option.\n */\n int getId();\n\n /**\n * Recursively searches for an option with the supplied trigger.\n *\n * @param trigger the trigger to search for.\n * @return the matching option or null.\n */\n Option findOption(final String trigger);\n\n /**\n * Indicates whether this option is required to be present.\n * @return true iff the CommandLine will be invalid without this Option\n */\n boolean isRequired();\n\n /**\n * Returns the parent of this option. Options can be organized in a\n * hierarchical manner if they are added to groups. This method can be used\n * for obtaining the parent option of this option. The result may be\n * <b>null</b> if this option does not have a parent.\n *\n * @return the parent of this option\n */\n\n /**\n * Sets the parent of this option. This method is called when the option is\n * added to a group. Storing the parent of an option makes it possible to\n * keep track of hierarchical relations between options. For instance, if an\n * option is identified while parsing a command line, the group this option\n * belongs to can also be added to the command line.\n *\n * @param parent the parent option\n */\n}", "protected Word getNext()\n/* */ {\n/* 63 */ Word token = null;\n/* 64 */ if (this.lexer == null) {\n/* 65 */ return token;\n/* */ }\n/* */ try {\n/* 68 */ token = this.lexer.next();\n/* 69 */ while (token == WhitespaceLexer.crValue) {\n/* 70 */ if (this.eolIsSignificant) {\n/* 71 */ return token;\n/* */ }\n/* 73 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 79 */ return token;\n/* */ }", "private static int getUserOption () {\n\t\tBufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint input;\n\t\t\n\t\tdo {\n\t\t\tlistMainMenuOptions();\n\n\t\t\ttry {\n\t\t\t\tinput = Integer.parseInt(myReader.readLine());\n\n\t\t\t\tif ((input < 1) || (input>9)) {\n\t\t\t\t\tSystem.out.println(\"Please type in a number between 1-9 according to your choice\");\n\t\t\t\t}\n\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Character invalid. Please enter a number from 1-9 according to your choice\");\n\t\t\t\tinput = 0;\n\t\t\t}\n\t\t\t\n\t\t}while ((input < 1) || (input>9));\n\n\t\treturn input;\n\t\t\n\t}", "public VCFLine getNextValidLine () throws IOException {\n\t\tgoNextLine();\n\t\treturn getCurrentValidLine();\n\t}", "int getNextStep() {\n if (!includedInLastStep()) {\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter;\n } else {\n start = end + 1;\n if (knuthIter.hasNext()) {\n goToNextLegalBreak();\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter; \n } else {\n return -1;\n }\n }\n }", "Optional<String> commandLine();", "public short getOptions()\n {\n return field_1_options;\n }", "public final gUnitParser.option_return option() throws RecognitionException {\n\t\tgUnitParser.option_return retval = new gUnitParser.option_return();\n\t\tretval.start = input.LT(1);\n\n\t\tParserRuleReturnScope id1 =null;\n\t\tParserRuleReturnScope treeAdaptor2 =null;\n\n\t\ttry {\n\t\t\t// org/antlr/gunit/gUnit.g:69:8: ( id '=' treeAdaptor )\n\t\t\t// org/antlr/gunit/gUnit.g:69:10: id '=' treeAdaptor\n\t\t\t{\n\t\t\tpushFollow(FOLLOW_id_in_option124);\n\t\t\tid1=id();\n\t\t\tstate._fsp--;\n\n\t\t\tmatch(input,29,FOLLOW_29_in_option126); \n\t\t\tpushFollow(FOLLOW_treeAdaptor_in_option128);\n\t\t\ttreeAdaptor2=treeAdaptor();\n\t\t\tstate._fsp--;\n\n\n\t\t\t\t\tif ( (id1!=null?input.toString(id1.start,id1.stop):null).equals(\"TreeAdaptor\") ) {\n\t\t\t\t\t grammarInfo.setAdaptor((treeAdaptor2!=null?input.toString(treeAdaptor2.start,treeAdaptor2.stop):null));\n\t\t\t\t\t}\n\t\t\t\t\t// TODO: need a better error logging strategy\n\t\t\t\t\telse System.err.println(\"Invalid option detected: \"+input.toString(retval.start,input.LT(-1)));\n\t\t\t\t\t\n\t\t\t}\n\n\t\t\tretval.stop = input.LT(-1);\n\n\t\t}\n\t\tcatch (RecognitionException re) {\n\t\t\treportError(re);\n\t\t\trecover(input,re);\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t\treturn retval;\n\t}", "private Tool optionRequiresArgument(String option) {\n stderr.format(\"option requires an argument -- %s%n\", CharMatcher.is('-').trimLeadingFrom(option));\n return doNothing();\n }", "public long getOptionId() {\n return optionId;\n }", "public Integer getOptEvent() {\n\t\treturn optEvent;\n\t}", "private String getNext(String current)\n\t{\n\t\tif(!chain.containsKey(current))\n\t\t\treturn null;\n\t\t\n\t\tSet<String> nextOptions = chain.get(current);\n\t\t\n\t\tif(nextOptions == null || nextOptions.size() == 0)\n\t\t\treturn null;\n\t\t\n\t\tObject[] nextArray = nextOptions.toArray();\n\t\t\n\t\treturn (String)(nextArray[(int)(Math.random() * nextArray.length)]); //get one from nextArray randomly\n\t}", "public Option<E> safePeek() {\n return safeIndex(0);\n }", "public abstract Options getOptions();", "public synchronized boolean next() throws IOException {\n\t\treturn next(true);\n\t}", "public String getOptionName()\n {\n return optionName;\n }", "protected Word getNext()\n/* */ {\n/* 58 */ Word token = null;\n/* 59 */ if (this.lexer == null) {\n/* 60 */ return token;\n/* */ }\n/* */ try {\n/* 63 */ token = this.lexer.next();\n/* 64 */ while (token == ArabicLexer.crValue) {\n/* 65 */ if (this.eolIsSignificant) {\n/* 66 */ return token;\n/* */ }\n/* 68 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 74 */ return token;\n/* */ }", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "protected Option getOption(int index){\n\t\treturn options.get(index);\n\t}", "public String getNextAnswer() {\r\n\t\t// Condition for getting the exact possible answers for the current question.\r\n\t\tif (counterAns < possibleAnswers.size()) {\r\n\t\t\tnextAnswer = possibleAnswers.get(counterAns).getPossibleAnswer();\r\n\t\t\t// Incrementing the counter with one, so next time the method is called it will\r\n\t\t\t// get the exact answers for the following question.\r\n\t\t\tcounterAns++;\r\n\t\t}\r\n\t\treturn nextAnswer;\r\n\t}", "public int getChoice(String prompt) {\n System.out.print(prompt);\n try {\n return Integer.valueOf(scanner.nextLine());\n } catch (Exception e) {\n // if user does not enter a valid integer, -1 is returned to indicate invalid input\n return -1;\n }\n }", "public E getNext() {\n\t\tif (!super.isEmpty()) {\n\t\t\tif (index >= this.size() - 1)\n\t\t\t\tindex = -1;\n\t\t\treturn this.get(++index);\n\t\t}\n\t\treturn null;\n\t}", "public boolean hasOption(String opt) {\n return m_commandLine.hasOption(opt);\n }", "public Token getNextToken() {\r\n \r\n // if no next token, abort\r\n if (!this.hasNextToken()) return null;\r\n \r\n // get the current character\r\n char c = this.stream.peek();\r\n \r\n // comment\r\n if (c==this.charComment) {\r\n // read the line and return the token\r\n this.current = new Token(this.getUntilMeetChar('\\n'));\r\n return this.current;\r\n }\r\n \r\n // !\r\n if (c==this.charSize) {\r\n this.stream.next(); // consume the character\r\n this.current = new Token(String.valueOf(this.charSize)); // and build the token\r\n return this.current;\r\n }\r\n \r\n // else\r\n this.current = new Token(this.getUntilMeetChar(this.charSeparator)); // extract until a charSeparator is met\r\n return this.current;\r\n \r\n }", "public abstract boolean finishPipeline(int optArg);", "private void initOptions() {\n\t\t// TODO: ???\n\t\t// additional input docs via --dir --includes --excludes --recursive\n\t\t// --loglevel=debug\n\t\t// --optionally validate output as well?\n\t\t\n\t\tthis.sb = new StringBuffer();\n\t\tArrayList options = new ArrayList();\n\t\toptions.add( new LongOpt(\"help\", LongOpt.NO_ARGUMENT, null, 'h') );\n\t\toptions.add( new LongOpt(\"version\", LongOpt.NO_ARGUMENT, null, 'v') );\t\t\n\t\toptions.add( new LongOpt(\"query\", LongOpt.REQUIRED_ARGUMENT, sb, 'q') );\n\t\toptions.add( new LongOpt(\"base\", LongOpt.REQUIRED_ARGUMENT, sb, 'b') );\n\t\toptions.add( new LongOpt(\"var\", LongOpt.REQUIRED_ARGUMENT, sb, 'P') );\n\t\toptions.add( new LongOpt(\"out\", LongOpt.REQUIRED_ARGUMENT, sb, 'o') );\n\t\toptions.add( new LongOpt(\"algo\", LongOpt.REQUIRED_ARGUMENT, sb, 'S') );\n\t\toptions.add( new LongOpt(\"encoding\", LongOpt.REQUIRED_ARGUMENT, sb, 'E') );\n\t\toptions.add( new LongOpt(\"indent\", LongOpt.REQUIRED_ARGUMENT, sb, 'I') );\t\n\t\toptions.add( new LongOpt(\"strip\", LongOpt.NO_ARGUMENT, null, 's') );\t\t\n\t\toptions.add( new LongOpt(\"update\", LongOpt.REQUIRED_ARGUMENT, sb, 'u') );\t\n\t\toptions.add( new LongOpt(\"xinclude\", LongOpt.NO_ARGUMENT, null, 'x') );\t\t\n\t\toptions.add( new LongOpt(\"explain\", LongOpt.NO_ARGUMENT, null, 'e') );\n\t\toptions.add( new LongOpt(\"noexternal\", LongOpt.NO_ARGUMENT, null, 'n') );\t\t\n\t\toptions.add( new LongOpt(\"runs\", LongOpt.REQUIRED_ARGUMENT, sb, 'r') );\n\t\toptions.add( new LongOpt(\"iterations\", LongOpt.REQUIRED_ARGUMENT, sb, 'i') );\n\t\toptions.add( new LongOpt(\"docpoolcapacity\", LongOpt.REQUIRED_ARGUMENT, sb, 'C') );\n\t\toptions.add( new LongOpt(\"docpoolcompression\", LongOpt.REQUIRED_ARGUMENT, sb, 'D') );\n\t\toptions.add( new LongOpt(\"nobuilderpool\", LongOpt.NO_ARGUMENT, null, 'p') );\n\t\toptions.add( new LongOpt(\"debug\", LongOpt.NO_ARGUMENT, null, 'd') );\t\t\n\t\toptions.add( new LongOpt(\"validate\", LongOpt.REQUIRED_ARGUMENT, sb, 'V') ); \n\t\toptions.add( new LongOpt(\"namespace\", LongOpt.REQUIRED_ARGUMENT, sb, 'W') ); \n\t\toptions.add( new LongOpt(\"schema\", LongOpt.REQUIRED_ARGUMENT, sb, 'w') );\n\t\toptions.add( new LongOpt(\"filterpath\", LongOpt.REQUIRED_ARGUMENT, sb, 'f') );\n\t\toptions.add( new LongOpt(\"filterquery\", LongOpt.REQUIRED_ARGUMENT, sb, 'F') );\n\t\toptions.add( new LongOpt(\"xomxpath\", LongOpt.NO_ARGUMENT, null, 'N') );\t\t\n\t\t\n////\t\toptions.add( new LongOpt(\"loglevel\", LongOpt.REQUIRED_ARGUMENT, sb, 'l') ); setLogLevels(Level.INFO);\n\t\t\t\n\t\tthis.longOpts = new LongOpt[options.size()];\n\t\toptions.toArray(this.longOpts);\t\t\n\t}", "public int nextIndex() {\n\t\t\treturn cursor;\n\t\t}", "String getOptionsOrThrow(\n String key);", "String getOptionsOrThrow(\n String key);", "String getOptionsOrThrow(\n String key);", "public String getOptionArg(String[] names) {\n\t\tString[] args = getOptionArgArray(names);\n\t\tif (args.length > 0) {\n\t\t\treturn args[0];\n\t\t}\n\t\treturn \"\";\n\t}", "String getOptionsOrDefault(\n String key,\n String defaultValue);", "String getOptionsOrDefault(\n String key,\n String defaultValue);" ]
[ "0.6585175", "0.56148946", "0.5531461", "0.52572894", "0.5211704", "0.5181763", "0.51039606", "0.5065869", "0.50555336", "0.5019877", "0.5011934", "0.49459592", "0.4936747", "0.4936747", "0.491304", "0.49094692", "0.48711047", "0.4867291", "0.48156503", "0.4795702", "0.47635144", "0.47377282", "0.47245005", "0.47163698", "0.46836883", "0.46722394", "0.4637462", "0.46118703", "0.4606622", "0.4597191", "0.45653158", "0.45646697", "0.45608488", "0.4559129", "0.4555912", "0.45551857", "0.45515433", "0.45338717", "0.45067042", "0.44878745", "0.44836402", "0.44706064", "0.44655097", "0.44643402", "0.4463036", "0.44595584", "0.445474", "0.442948", "0.44200212", "0.44169965", "0.44115898", "0.44103026", "0.44016278", "0.43975106", "0.43960226", "0.43894652", "0.4387242", "0.43849403", "0.43844974", "0.43654382", "0.43560487", "0.43464223", "0.43451017", "0.43451017", "0.43451017", "0.43451017", "0.43420178", "0.43394312", "0.4334477", "0.43337554", "0.433194", "0.43264586", "0.4317947", "0.43125665", "0.43095103", "0.4309227", "0.43075633", "0.4306829", "0.4302498", "0.4301885", "0.4287242", "0.4277503", "0.42695263", "0.4269426", "0.42603365", "0.42565715", "0.42483217", "0.4247383", "0.42453915", "0.42445964", "0.42405432", "0.4239067", "0.42358246", "0.42349353", "0.42288768", "0.42288768", "0.42288768", "0.42237622", "0.42112705", "0.42112705" ]
0.69263136
0
Returns the next nonboolean command line switch argument.
public String optarg() { if (arg_count >= args.size()) return null; return (String) args.elementAt(arg_count++); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getArg();", "static String nextArg(int currentIndex, String[] allArgs) {\n final int nextIndex = currentIndex + 1;\n if (nextIndex < allArgs.length) {\n return allArgs[nextIndex];\n } else {\n throw new IllegalArgumentException(allArgs[currentIndex] + \": missing required argument\");\n }\n }", "public String nextArgument() {\n\t\tif (tok == null || !tok.hasMoreElements())\n\t\t\treturn null;\n\n\t\tString arg = tok.nextToken();\n\t\tif (arg.startsWith(\"\\\"\")) { //$NON-NLS-1$\n\t\t\tif (arg.endsWith(\"\\\"\")) { //$NON-NLS-1$\n\t\t\t\tif (arg.length() >= 2)\n\t\t\t\t\t// strip the beginning and ending quotes\n\t\t\t\t\treturn arg.substring(1, arg.length() - 1);\n\t\t\t}\n\t\t\tString remainingArg = tok.nextToken(\"\\\"\"); //$NON-NLS-1$\n\t\t\targ = arg.substring(1) + remainingArg;\n\t\t\t// skip to next whitespace separated token\n\t\t\ttok.nextToken(WS_DELIM);\n\t\t}\n\t\telse if (arg.startsWith(\"'\")) { //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\tif (arg.endsWith(\"'\")) { //$NON-NLS-1$\n\t\t\t\tif (arg.length() >= 2)\n\t\t\t\t\t// strip the beginning and ending quotes\n\t\t\t\t\treturn arg.substring(1, arg.length() - 1);\n\t\t\t}\n\t\t\tString remainingArg = tok.nextToken(\"'\"); //$NON-NLS-1$\n\t\t\targ = arg.substring(1) + remainingArg;\n\t\t\t// skip to next whitespace separated token\n\t\t\ttok.nextToken(WS_DELIM);\n\t\t}\n\t\treturn arg;\n\t}", "int getArgIndex();", "public char getOption() {\r\n\t\treturn scanner.nextLine().charAt(0);\r\n\t}", "public char getopt() {\n\tif (opt_count >= opts.size())\n\t return OPT_EOF;\n\treturn ((Character) (opts.elementAt(opt_count++))).charValue();\n }", "public String getArgumentLine() {\n return \"\";\n }", "public String getNextCommand() {\n System.out.println(\"Left, Right, Advance <n>, Quit , Help: \");\n return scanner.nextLine();\n }", "Optional<String> commandLine();", "public String arg1() {\r\n return command.split(\"\\\\s+\")[1];\r\n }", "public String arg1() {\n CommandType type = this.commandType();\n if (type == CommandType.C_ARITHMETIC) {\n return instructionChunks[0];\n }\n return instructionChunks[1];\n }", "@Override\n\tpublic String nextCommand() {\n\t\treturn null;\n\t}", "java.lang.String getNextStep();", "private static String determineOperation(String[] args)\n {\n for (String arg : args) {\n if (!arg.startsWith(\"-\")) { //$NON-NLS-1$\n return arg;\n }\n }\n return null;\n }", "@Override\n public String getInputArg(String argName) {\n Log.w(TAG, \"Test input args is not supported.\");\n return null;\n }", "char parseFlag(String rawFlag) {\n return parseFlags(rawFlag)[0];\n }", "public String getArgumentString() {\n\t\treturn null;\n\t}", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "@Override\r\n\tpublic String getFirstArg() {\n\t\treturn null;\r\n\t}", "public String getOptionArg(String[] names) {\n\t\tString[] args = getOptionArgArray(names);\n\t\tif (args.length > 0) {\n\t\t\treturn args[0];\n\t\t}\n\t\treturn \"\";\n\t}", "public int getIntValue(String opt) {\n return Integer.parseInt((String)m_commandLine.getValue(opt));\n }", "private static int findPreviousStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1550 */ PrevArgs localPrevArgs = new PrevArgs(null);\n/* 1551 */ localPrevArgs.src = paramArrayOfChar;\n/* 1552 */ localPrevArgs.start = paramInt1;\n/* 1553 */ localPrevArgs.current = paramInt2;\n/* */ \n/* 1555 */ while (localPrevArgs.start < localPrevArgs.current) {\n/* 1556 */ long l = getPrevNorm32(localPrevArgs, paramChar, paramInt3 | paramInt4);\n/* 1557 */ if (isTrueStarter(l, paramInt3, paramInt4)) {\n/* */ break;\n/* */ }\n/* */ }\n/* 1561 */ return localPrevArgs.current;\n/* */ }", "private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) return defaultValue;\n return (args != null && args.length >= index+1) ? args[index] : defaultValue;\n }", "public ProgramExp getArgument() {\n return argument;\n }", "private static int getUserOption()\n {\n\t// Reads the users input.\n\tBufferedReader optionReader = new BufferedReader(new InputStreamReader(System.in));\n\n\ttry\n\t {\n\t\treturn(Integer.parseInt(optionReader.readLine()));\n\t }\n\tcatch(Exception ex)\n\t {\n\t\treturn(-1);\n\t }\n }", "static String getOptionValue(String args[], String optionName, String defaultVal) {\n String argValue = \"\";\n try {\n int i = 0;\n String arg = \"\";\n boolean found = false;\n\n while (i < args.length) {\n arg = args[i++];\n\n if (arg.equals(optionName)) {\n if (i < args.length)\n argValue = args[i++];\n if (argValue.startsWith(\"-\") || argValue.equals(\"\")) {\n argValue = defaultVal;\n }\n found = true;\n }\n }\n\n if (!found) {\n argValue = defaultVal;\n }\n } catch (Exception e) {\n showError(\"getOptionValue\", e);\n }\n\n return argValue;\n }", "public CliOptStruct getOption(String _arg){\r\n\t\tboolean shortArg;\r\n\r\n\t\tif(_arg.length() == 1){shortArg=true;}else{shortArg=false;}\r\n\t\tfor(int a=0;a<opts.size();a++){\r\n\t\t\tif(shortArg){\r\n\t\t\t\tif(opts.get(a).getArgument() == _arg.charAt(0)){\r\n\t\t\t\t\treturn opts.get(a);\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\tif(opts.get(a).getLongArgument().equals(_arg)){\r\n\t\t\t\t\treturn opts.get(a);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public boolean chooseArgs(String arg) {\n\t\tSystem.out.println(\"Do you want \" + arg + \"? (y/n)\");\n\t\tString s = Main.sc.next();\n\t\twhile (s.length() != 1 && !(s.contains(\"y\") || s.contains(\"n\"))) {\n\t\t\tMain.wrongEntry();\n\t\t\tSystem.out.print(\"Press 'y' for yes and 'n' for no >\");\n\t\t}\n\t\treturn (s.contains(\"y\"));\n\t}", "public GetOpt(String [] sargs, String flags) throws BadOptException {\n\tint size = sargs.length;\n\n\ttry {\n\t StringReader sreader = new StringReader(flags);\n\t for (int i = 0; i < flags.length(); i++) {\n\t\tint opt = sreader.read();\n\t\t\n\t\tif (opt == ':')\n\t\t ((OptPair) optlist.elementAt(optlist.size() - 1)).bool = false;\n\t\telse\n\t\t optlist.add(new OptPair((char) opt, true));\n\t }\n\t \n\t sreader.close();\n\t} catch (IOException e) {\n\t System.err.println(\"Bizarre error situation!\");\n\t throw new BadOptException(\"I/O problem encountered manipulating strings with a StringReader!\");\n\t}\n\n\t//\tfor (int i = 0; i < optlist.size(); i++)\n\t//\t System.out.println(optlist.elementAt(i));\n\n\tfor (int i = 0; i < sargs.length; i++) {\n\t if (sargs[i].startsWith(\"-\")) {\n\t\ttry {\n\t\t StringReader sreader = new StringReader(sargs[i].substring(1));\n\n\t\t int opt = -1;\n\t\t while ((opt = sreader.read()) != -1) {\n\t\t\tboolean found = false;\n\t\t\tboolean bool = true;\n\t\t\tfor (int j = 0; j < optlist.size(); j++) {\n\t\t\t OptPair temp = (OptPair) optlist.elementAt(j);\n\t\t\t if (temp.option == (char) opt) {\n\t\t\t\tfound = true;\n\t\t\t\tbool = temp.bool;\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t}\n\n\t\t\tif (found) {\n\t\t\t opts.add(new Character((char) opt));\n\t\t\t if (!bool) {\n\t\t\t\targs.add(sargs[++i]);\n\t\t\t\tbreak;\n\t\t\t }\n\t\t\t} else {\n\t\t\t throw new BadOptException((char) opt + \": is an invalid switch option.\");\n\t\t\t}\n\t\t }\n\t\t} catch (IOException e) {\n\t\t System.err.println(\"Bizarre error situation!\");\n\t\t throw new BadOptException(\"I/O problem encountered manipulating strings with a StringReader!\");\n\t\t}\n\t } else {\n\t\tparams.add(sargs[i]);\n\t }\n\t}\n }", "private Tool optionRequiresArgument(String option) {\n stderr.format(\"option requires an argument -- %s%n\", CharMatcher.is('-').trimLeadingFrom(option));\n return doNothing();\n }", "public int getFirstParameterIndexForCallString() {\r\n return 1;\r\n }", "public InputMode parseInputMode(String arg) {\r\n\t\tif (arg.equals(\"-console\")) {\r\n\t\t\treturn INPUT_MODE_CONSOLE;\r\n\t\t}\r\n\t\tif (arg.equals(\"-csv\")) {\r\n\t\t\treturn INPUT_MODE_CSV;\r\n\t\t}\r\n\t\tif (arg.equals(\"-db\")) {\r\n\t\t\treturn INPUT_MODE_DB;\r\n\t\t}\r\n\t\treturn INPUT_MODE_NONE;\r\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "public int arg2() {\n return Integer.parseInt(instructionChunks[2]);\n }", "public String getCommandLinePattern();", "String getOption();", "public boolean nextBoolean() {\n this.inputStr = this.s.nextLine();\n\n if (inputStr.toLowerCase().contains(\"true\")) {\n return true;\n } else if (inputStr.toLowerCase().contains(\"false\")) {\n return false;\n } else if (inputStr.toLowerCase().contains(\"t\") || inputStr.toLowerCase().contains(\"1\")) {\n return true;\n } else if (inputStr.toLowerCase().contains(\"f\") || inputStr.toLowerCase().contains(\"0\")) {\n return false;\n }\n return false;\n }", "public static String getFlag(String flag, String [] args){\n\t\tfor(int i=0;i<args.length;i++){\n\t\t\tif(args[i].equals(flag)){\n\t\t\t\tif(!args[i].contains(\"-\") || args[i].startsWith(\"-h\")){\n\t\t\t\t\treturn \"flag \\\"\"+flag + \"\\\" exists.\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\treturn args[i+1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic int getSecondArg() {\n\t\treturn 0;\r\n\t}", "public String args(int n)\r\n {\r\n if (n >= 0 && n < numArgs)\r\n return args[n];\r\n else\r\n return null;\r\n }", "public BaseNode getArgument()\r\n\t{\r\n\t\treturn _argument;\r\n\t}", "Argument<T> optional(boolean optional);", "public int getCommand() {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tint value = Integer.parseInt(getToken(\"\"));\r\n\t\t\t\tif (value >= EXIT && value <= SAVE) {\r\n\t\t\t\t\treturn value;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthrow new NumberFormatException();\r\n\t\t\t\t}\r\n\t\t\t} catch (NumberFormatException nfe) {\r\n\t\t\t\tSystem.out.print(\"Invalid entry please try again.\");\r\n\t\t\t}\r\n\t\t} while (true);\r\n\t}", "public abstract String whichToMove(boolean[] available, String lastMove, int whoseTurn, Scanner scanner);", "public String arg2() {\r\n return command.split(\"\\\\s+\")[2];\r\n }", "private String parseArgs(String args[])\n {\n String fpath = null;\n \n for (String arg : args)\n {\n if (arg.startsWith(\"-\"))\n {\n // TODO: maybe add something here.\n }\n else // expect a filename.\n {\n fpath = arg;\n }\n }\n \n return fpath;\n }", "@Override\r\n public String getUsage() {\r\n return String.format(\"%s <%s> %s%s <%s>\", super.getCommand(), super.getArgumentName(), FLAG_PREFIX, flagOption,\r\n flagName);\r\n }", "public int getTargetArgIndex() {\n\t\treturn this.targetArgIndex;\n\t}", "public String getValue(String opt) {\n return (String)m_commandLine.getValue(opt);\n }", "public static int inputOptions() {\n\t\tSystem.out.println(PROMPT);\n\t\tint responseNum = -1;\n\t\tin = new Scanner(System.in);\n\t\t// Ensure that response is 0 or 1\n\t\twhile (in.hasNext()) {\n\t\t\tString rawResponse = in.nextLine();\n\t\t\tString response = rawResponse.trim();\n\t\t\tresponseNum = Integer.parseInt(response);\n\t\t\tif (responseNum == 0 || responseNum == 1) {\n\t\t\t\treturn responseNum;\n\t\t\t} else {\n\t\t\t\tSystem.out.println(INVALID_ENTRY_MSG);\n\t\t\t}\n\t\t}\n\t\treturn responseNum;\n\t}", "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "private static char availabilityOrGoBack() {\n Scanner input = new Scanner(System.in);\n\n System.out.print(\"Enter (a)vailability, or \"\n\t + \"(b)ack to go back: \");\n char option = input.next().toLowerCase().charAt(0);\n\n return option;\n }", "@Override\n @Nonnull\n @CheckReturnValue\n public SplitString next() {\n if (offset == array.length) {\n throw new IllegalStateException(\"No more arguments to read\");\n }\n return array[offset++];\n }", "public String readCommand() {\n return scanner.nextLine();\n }", "static String getCommand() {\n\t\tString command;\n\t\twhile (true) {\n\t\t\tScanner sca = new Scanner(System.in);\n\t\t\tSystem.out.print(\"Enter Command: \");\n\t\t\tcommand = sca.next();\n\t\t\tif (command.equals(\"ac\") || command.equals(\"dc\") || command.equals(\"as\") || command.equals(\"ds\") || command.equals(\"p\") || command.equals(\"q\"))\n\t\t\t\tbreak;\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Invalid command: \" + command);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t// System.out.println(command);\n\t\treturn command;\n\t}", "private String initialMenu(String command) {\n System.out.println(\"1: Show Arrays On/Off\");\n System.out.println(\"2: Time comparison\");\n System.out.println(\"x: Stop the program\\n\");\n\n command = scanner.nextLine();\n\n return command;\n }", "public String nextStep();", "public static void GetParam(String [] args){\n if (args.length==0) {\n System.err.println(\"Sintaxis: main -f file [-di] [-do|-t] [-mem|-tab]\");\n System.exit(1);\n }\n for (int i = 0; i < args.length; i++) {\n if(args[i].equals(\"-f\")){\n f_flag=true;\n path=args[i+1];\n }\n if(args[i].equals(\"-t\"))t_flag=true;\n if(args[i].equals(\"-di\"))di_flag=true;\n if(args[i].equals(\"-do\"))do_flag=true;\n if(args[i].equals(\"-tab\"))tab_flag=true;\n if(args[i].equals(\"-mem\"))mem_flag=true;\n }\n if (!f_flag){\n System.err.println(\"Ha de introducir un fichero\");\n System.exit(1);\n }\n if (!tab_flag && !mem_flag){\n System.err.println(\"Error: si se ha escogido -do o -t, se ha de \"\n + \"especificar -tab ('tabulation') o/y -mem ('memoization')\");\n System.exit(1);\n }\n }", "public EncapsulatedIRCCommand getNextCommand();", "private int findFlagIndex(String[] tokens) {\r\n for (int i = 0; i < tokens.length; i++) {\r\n if (tokens[i].equals(FLAG_PREFIX + flagOption)) {\r\n return i;\r\n }\r\n }\r\n return NOT_FOUND;\r\n }", "public static int getMenuOption() {\n Scanner input = new Scanner(System.in);\n\n menuOption = input.next().toLowerCase().charAt(0);\n\n while (menuOption != 'a' && menuOption != 'r' && menuOption != 'f' && menuOption != 'i' && menuOption != 'n' && menuOption != 'q') {\n System.out.print(\"Enter a valid choice: \");\n menuOption = input.next().toLowerCase().charAt(0);\n }\n\n if (menuOption == 'a') {\n return 1;\n } else if (menuOption == 'r') {\n return 2;\n } else if (menuOption == 'f') {\n return 3;\n } else if (menuOption == 'i') {\n return 4;\n } else if (menuOption == 'n') {\n return 5;\n } else {\n return 6;\n }\n }", "Optional<String> command();", "Optional<String[]> arguments();", "protected P parse(String options, String[] args){\n HashMap cmdFlags = new HashMap();\n String flag;\n String nextFlag=null;\n StringBuffer errors=new StringBuffer();\n /**\n First go through options to see what should be in args\n */\n for(int which=0;which<options.length();which++){\n flag = \"-\"+options.substring(which,which+1);\n if(which+1<options.length()){\n nextFlag=options.substring(which+1,which+2);\n if (nextFlag.equals(\"-\")){\n cmdFlags.put(flag,nextFlag);\n } else\n if (nextFlag.equals(\"+\")){\n cmdFlags.put(flag,nextFlag);\n /*\n mark that it is required\n if found this will be overwritten by -\n */\n this.put(flag,nextFlag);\n } else\n //JDH changed to \"_\" from \";\" because too many cmdlines mess up ;\n if (nextFlag.equals(\"_\")){\n cmdFlags.put(flag,nextFlag);\n } else\n //JDH changed to \".\" from \":\" because too many cmdlines mess up ;\n if (nextFlag.equals(\".\")){\n cmdFlags.put(flag,\" \"); //JDH changed this from \":\"\n /*\n mark that it is required\n if found this will be overwritten by value\n JDH should use \" \" so it cannot be the same as a value\n */\n this.put(flag,\" \"); // mark that it is required\n } else {\n System.out.println(\"Bad symbol \"+nextFlag+\"in option string\");\n }\n which++;\n } else {\n System.out.println(\"Missing symbol in option string at \"+which);\n }\n }\n\n int arg=0;\n for(;arg<args.length;arg++){\n if (!args[arg].startsWith(\"-\")){\n break;\n }\n flag = args[arg];\n /*\n This should tell it to quit looking for flags or options\n */\n if (flag.equals(\"--\")){\n arg++;\n break;\n }\n if (!(cmdFlags.containsKey(flag))){\n errors.append(\"\\nbad flag \"+flag);\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"-\")){\n this.put(flag,\"-\");\n continue;\n }\n if (((String)cmdFlags.get(flag)).equals(\"+\")){\n this.put(flag,\"-\");// turns off the + because it was found\n continue;\n }\n if (!(arg+1<args.length)){\n errors.append(\"\\nMissing value for \"+flag);\n continue;\n }\n arg++;\n this.put(flag,args[arg]);\n }\n String[] params=null;\n params = new String[args.length - arg];\n\n int n=0;\n // reverse these so they come back in the right order!\n for(;arg<args.length;arg++){\n params[n++] = args[arg];\n }\n Iterator k = null;\n Map.Entry e = null;\n if (this.containsValue(\"+\")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\"+\".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required flag \"+(String)e.getKey()+\" was not supplied.\");\n };\n }\n } \n /*\n Should change this to \" \" in accordance with remark above\n */\n //JDH changed to \" \" from \":\" in both spots below\n if (this.containsValue(\" \")){\n // can iterate through to see which ones\n k = this.entrySet().iterator();\n while (k.hasNext()){\n if (\" \".equals((String)(e=(Map.Entry)k.next()).getValue())){\n errors.append(\"\\nThe required option \"+(String)e.getKey()+\" was not supplied.\");\n }\n }\n }\n this.put(\" \",params);\n this.put(\"*\",errors.toString());\n return this;\n }", "private static char isOption(String opt) {\r\n\r\n\t\tif(opt.matches(\"^-?\\\\d+$\"))\r\n\t\t\treturn 0; /* It's a number */\r\n\t\t\r\n\t\tif(opt.indexOf(\"--\") == 0) {\r\n\t\t\t/* It's a string flag */\r\n\t\t\tif(opt.length() == 2 || opt.charAt(2) == '=') {\r\n\t\t\t\t/* This string flag is not long enough. It's only made of '--'. It's invalid. */\r\n\t\t\t\treturn 4;\r\n\t\t\t}\r\n\t\t\treturn 2;\r\n\t\t} else if(opt.indexOf(\"-\") == 0) {\r\n\t\t\t/* It's a single character flag */\r\n\t\t\tif(opt.length() != 2) {\r\n\t\t\t\tif(opt.contains(\"=\") && opt.length() > 2) {\r\n\t\t\t\t\t/* It's a single character flag with an equals in front of it. It's VALID. */\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\t/* This single character flag is longer/shorter than 1 character. It's invalid. */\r\n\t\t\t\treturn 3;\r\n\t\t\t}\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\t/* It's a pure value */\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public static int nextSwitch(int next) {\n\t\t// Make an if statement that runs if the next variable is equal to 0.\n\t\tif(next == 0) {\n\t\t\treturn 1;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public static int getMenuChoice() {\n String line;\n int option = -1;\n\n System.out.print(\">\");\n if (Menus.reader.hasNext()) {\n line = Menus.reader.nextLine().strip();\n\n try {\n option = Integer.parseInt(line);\n } catch (NumberFormatException e) {\n option = -1;\n }\n }\n\n return option;\n }", "protected static Optional<String> optionValue(String arg) {\n checkArgument(arg.startsWith(\"-\"), \"expected option string: %s\", arg);\n List<String> option = Splitter.on('=').limit(2).splitToList(arg);\n return option.size() > 1 ? Optional.of(option.get(1)) : Optional.empty();\n }", "@Override\n public int getArgent() {\n return _argent;\n }", "public static boolean inputBoolean()\n\t{\n\t\treturn(sc.nextBoolean());\n\t}", "public String userCommand(){\n return scanner.nextLine();\n }", "int getCommand();", "public java.lang.String getArg() {\n\t\t\tjava.lang.Object ref = arg_;\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 =\n\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\targ_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}", "private String parseParameter(String[] args, int parameterIndex) throws ExceptionMalformedInput\n {\n if (parameterIndex >= args.length)\n throw new ExceptionMalformedInput(\"Missing value for the parameter: \" + args[parameterIndex]);\n return args[parameterIndex];\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getArgumentSource();", "public String readCommand() {\n String input = in.nextLine();\n while (input.trim().isEmpty()) {\n input = in.nextLine();\n }\n return input;\n }", "public java.lang.String getArg() {\n\t\t\t\tjava.lang.Object ref = arg_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs =\n\t\t\t\t\t\t\t(com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\targ_ = 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 int getTypeArgumentIndex() {\n/* 440 */ return this.value & 0xFF;\n/* */ }", "private static int getUserOption () {\n\t\tBufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint input;\n\t\t\n\t\tdo {\n\t\t\tlistMainMenuOptions();\n\n\t\t\ttry {\n\t\t\t\tinput = Integer.parseInt(myReader.readLine());\n\n\t\t\t\tif ((input < 1) || (input>9)) {\n\t\t\t\t\tSystem.out.println(\"Please type in a number between 1-9 according to your choice\");\n\t\t\t\t}\n\n\t\t\t}catch (Exception e) {\n\t\t\t\tSystem.out.println(\"Character invalid. Please enter a number from 1-9 according to your choice\");\n\t\t\t\tinput = 0;\n\t\t\t}\n\t\t\t\n\t\t}while ((input < 1) || (input>9));\n\n\t\treturn input;\n\t\t\n\t}", "protected Integer getCurrentCommandIndex(List<Object> args) {\n int currentCommandIndex = (int) args.get(1);\n return currentCommandIndex;\n }", "private static Optional<CompletableFuture<?>> parseFlagFromArgument(QuerySession session, Query query, String flag) throws ParameterException {\n flag = flag.substring(1);\n\n // Determine the true alias and value\n String value = null;\n if (flag.contains(\"=\")) {\n // Split the parameter: values\n String[] split = flag.split(\"=\");\n flag = split[0];\n if (split.length == 2 && !split[1].trim().isEmpty()) {\n value = split[1];\n }\n }\n\n // Find a handler\n Optional<FlagHandler> optionalHandler = Prism.getInstance().getFlagHandler(flag);\n if (!optionalHandler.isPresent()) {\n throw new ParameterException(\"\\\"\" + flag + \"\\\" is not a valid flag. No handler found.\");\n }\n\n FlagHandler handler = optionalHandler.get();\n\n // Allows this command source?\n if (!handler.acceptsSource(session.getCommandSource())) {\n throw new ParameterException(\"This command source may not use the \\\"\" + flag + \"\\\" flag.\");\n }\n\n // Validate value\n if (value != null && !handler.acceptsValue(value)) {\n throw new ParameterException(\"Invalid value \\\"\" + value + \"\\\" for parameter \\\"\" + flag + \"\\\".\");\n }\n\n return handler.process(session, flag, value, query);\n }", "public int choose(DataBinder binder) {\n int index = 0;\n if (_opts != null) for (int i = 0; i < _opts.length; ++i) {\n String v = binder.get(_opts[i]);\n if (v != null && v.length() > 0) index |= 1 << i;\n }\n return index;\n }", "Argument metavar(String... metavar);", "public Command findTrueCommand (String s)\n\t{\n\t\tCommand c = getCommandOrFunction(s);\n\t\thandleSpecialCases(c);\n\t\tfor(int a = 0; a < c.howManyArguments(); a++) {\n\t\t\ttry {\n\t\t\t\tc.addChild(parseCommand(codeReader.next()));\n\t\t\t}\n\t\t\tcatch(NoSuchElementException e) {\n\t\t\t\tthrow new SLogoException(\"Insufficient arguments for function/command \" + s);\n\t\t\t}\n\t\t}\n\t\treturn c;\n\t}", "private String getUserDirection() {\n System.out.println(\"Which direction do you want to go?\\n>>>\");\n String direction = sc.nextLine().toLowerCase();\n return direction;\n }", "public String getStepParameter(boolean isSelectType)\n\t{\n\t\treturn \"#\" + this.stepLineNumber;\n\t}", "public String getStepParameter(boolean isSelectType)\n\t{\n\t\treturn \"#\" + this.stepLineNumber;\n\t}", "void main(CommandLine cmd);", "boolean nextStep();", "private String getLongInstruction(int nextVal) throws java.io.IOException {\n\t\treadUntilEndOfLine(nextVal);\n\t\treturn next;\n\t}", "public ArgumentPair getByArgumentKey(String argument) {\n return this.stream().filter(a -> a.getArgument().equals(argument)).findFirst().orElse(null);\n }", "public Type getArgumentDirection() {\n return direction;\n }", "int getCmd();", "public IConfigurationElement getCommandLineGeneratorElement();", "public static CommandLineInput getCommandLineInputForInput(char command) {\n\t\treturn null;\n\t}", "public void advance() {\r\n this.command = in.nextLine();\r\n }", "private boolean handleDemoMenuCommands(String command, boolean backCommandIsNotGiven) {\n boolean anAlgorithmWasSelected = command.equals(\"1\") || command.equals(\"2\") || command.equals(\"3\");\n\n if (anAlgorithmWasSelected) {\n intSelect.start();\n } else if (command.equalsIgnoreCase(\"x\")) {\n backCommandIsNotGiven = false;\n }\n return backCommandIsNotGiven;\n }" ]
[ "0.6174105", "0.6146931", "0.60813206", "0.6012503", "0.594149", "0.5828156", "0.54941976", "0.5478937", "0.5345524", "0.53365326", "0.5294894", "0.52893573", "0.5230396", "0.5207295", "0.51851285", "0.5184277", "0.51766586", "0.5157172", "0.5157172", "0.5157172", "0.51169324", "0.509185", "0.5077096", "0.5054132", "0.50526696", "0.5030193", "0.50280297", "0.50252944", "0.50193155", "0.50062186", "0.49923453", "0.49631253", "0.49619055", "0.49301887", "0.49234855", "0.49220023", "0.49148515", "0.4910872", "0.49084568", "0.49040225", "0.48954374", "0.48868087", "0.48765972", "0.48723468", "0.48548615", "0.48373887", "0.48329479", "0.48248377", "0.4820293", "0.48172444", "0.4812121", "0.48108414", "0.48093423", "0.48079503", "0.48067746", "0.48003867", "0.47993848", "0.4785385", "0.47828177", "0.4777213", "0.4771821", "0.4757258", "0.47548229", "0.47487116", "0.47430646", "0.47347525", "0.4733855", "0.47144812", "0.47092482", "0.46998712", "0.46922618", "0.4681904", "0.46775267", "0.46693486", "0.46515158", "0.46479827", "0.46453866", "0.46438444", "0.46263582", "0.46218178", "0.46214238", "0.46152952", "0.4611455", "0.46066704", "0.45988634", "0.45962363", "0.45945844", "0.45939672", "0.45914906", "0.45914906", "0.45893756", "0.45842713", "0.4583745", "0.45829645", "0.45645374", "0.4563301", "0.45628706", "0.4561644", "0.4543742", "0.45402998" ]
0.5999158
4
Returns the next parameter passed on the command line.
public String param() { if (param_count >= params.size()) return null; return (String) params.elementAt(param_count++); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String nextArg(int currentIndex, String[] allArgs) {\n final int nextIndex = currentIndex + 1;\n if (nextIndex < allArgs.length) {\n return allArgs[nextIndex];\n } else {\n throw new IllegalArgumentException(allArgs[currentIndex] + \": missing required argument\");\n }\n }", "java.lang.String getNextStep();", "public String nextArgument() {\n\t\tif (tok == null || !tok.hasMoreElements())\n\t\t\treturn null;\n\n\t\tString arg = tok.nextToken();\n\t\tif (arg.startsWith(\"\\\"\")) { //$NON-NLS-1$\n\t\t\tif (arg.endsWith(\"\\\"\")) { //$NON-NLS-1$\n\t\t\t\tif (arg.length() >= 2)\n\t\t\t\t\t// strip the beginning and ending quotes\n\t\t\t\t\treturn arg.substring(1, arg.length() - 1);\n\t\t\t}\n\t\t\tString remainingArg = tok.nextToken(\"\\\"\"); //$NON-NLS-1$\n\t\t\targ = arg.substring(1) + remainingArg;\n\t\t\t// skip to next whitespace separated token\n\t\t\ttok.nextToken(WS_DELIM);\n\t\t}\n\t\telse if (arg.startsWith(\"'\")) { //$NON-NLS-1$ //$NON-NLS-2$\n\t\t\tif (arg.endsWith(\"'\")) { //$NON-NLS-1$\n\t\t\t\tif (arg.length() >= 2)\n\t\t\t\t\t// strip the beginning and ending quotes\n\t\t\t\t\treturn arg.substring(1, arg.length() - 1);\n\t\t\t}\n\t\t\tString remainingArg = tok.nextToken(\"'\"); //$NON-NLS-1$\n\t\t\targ = arg.substring(1) + remainingArg;\n\t\t\t// skip to next whitespace separated token\n\t\t\ttok.nextToken(WS_DELIM);\n\t\t}\n\t\treturn arg;\n\t}", "String getNext();", "String getNext();", "int getArgIndex();", "java.lang.String getArg();", "public String nextStep();", "public int getParameterOffset();", "public Parameter readFirstParameter(String name) throws IOException {\r\n Parameter param = readNextParameter();\r\n Parameter result = null;\r\n \r\n while ((param != null) && (result == null)) {\r\n if (param.getName().equals(name)) {\r\n result = param;\r\n }\r\n \r\n param = readNextParameter();\r\n }\r\n \r\n this.stream.close();\r\n return result;\r\n }", "public int getFirstParameterIndexForCallString() {\r\n return 1;\r\n }", "void setNext(final UrlArgumentBuilder next);", "Parameter getParameter();", "public String getNextCommand() {\n System.out.println(\"Left, Right, Advance <n>, Quit , Help: \");\n return scanner.nextLine();\n }", "protected int getNextToken(){\n if( currentToken == 1){\n currentToken = -1;\n }else{\n currentToken = 1;\n }\n return currentToken;\n }", "private String getNext(String current)\n\t{\n\t\tif(!chain.containsKey(current))\n\t\t\treturn null;\n\t\t\n\t\tSet<String> nextOptions = chain.get(current);\n\t\t\n\t\tif(nextOptions == null || nextOptions.size() == 0)\n\t\t\treturn null;\n\t\t\n\t\tObject[] nextArray = nextOptions.toArray();\n\t\t\n\t\treturn (String)(nextArray[(int)(Math.random() * nextArray.length)]); //get one from nextArray randomly\n\t}", "private static int findPreviousStarter(char[] paramArrayOfChar, int paramInt1, int paramInt2, int paramInt3, int paramInt4, char paramChar)\n/* */ {\n/* 1550 */ PrevArgs localPrevArgs = new PrevArgs(null);\n/* 1551 */ localPrevArgs.src = paramArrayOfChar;\n/* 1552 */ localPrevArgs.start = paramInt1;\n/* 1553 */ localPrevArgs.current = paramInt2;\n/* */ \n/* 1555 */ while (localPrevArgs.start < localPrevArgs.current) {\n/* 1556 */ long l = getPrevNorm32(localPrevArgs, paramChar, paramInt3 | paramInt4);\n/* 1557 */ if (isTrueStarter(l, paramInt3, paramInt4)) {\n/* */ break;\n/* */ }\n/* */ }\n/* 1561 */ return localPrevArgs.current;\n/* */ }", "String getParam( String paraName );", "public int findNext(Resource resource);", "gen.grpc.hospital.examinations.Parameter getParameter(int index);", "public ParamNode getParamNode(int i) { return params[i]; }", "public void next(Parameters params) {\r\n pui.commitParameters();\r\n }", "public Parameter readNextParameter() throws IOException {\r\n Parameter result = null;\r\n \r\n try {\r\n boolean readingName = true;\r\n boolean readingValue = false;\r\n StringBuilder nameBuffer = new StringBuilder();\r\n StringBuilder valueBuffer = new StringBuilder();\r\n \r\n int nextChar = 0;\r\n while ((result == null) && (nextChar != -1)) {\r\n nextChar = this.stream.read();\r\n \r\n if (readingName) {\r\n if (nextChar == '=') {\r\n if (nameBuffer.length() > 0) {\r\n readingName = false;\r\n readingValue = true;\r\n } else {\r\n throw new IOException(\r\n \"Empty parameter name detected. Please check your form data\");\r\n }\r\n } else if ((nextChar == '&') || (nextChar == -1)) {\r\n if (nameBuffer.length() > 0) {\r\n result = FormUtils.create(nameBuffer, null,\r\n this.decode, characterSet);\r\n } else if (nextChar == -1) {\r\n // Do nothing return null preference\r\n } else {\r\n throw new IOException(\r\n \"Empty parameter name detected. Please check your form data\");\r\n }\r\n } else {\r\n nameBuffer.append((char) nextChar);\r\n }\r\n } else if (readingValue) {\r\n if ((nextChar == '&') || (nextChar == -1)) {\r\n if (valueBuffer.length() > 0) {\r\n result = FormUtils.create(nameBuffer, valueBuffer,\r\n this.decode, characterSet);\r\n } else {\r\n result = FormUtils.create(nameBuffer, null,\r\n this.decode, characterSet);\r\n }\r\n } else {\r\n valueBuffer.append((char) nextChar);\r\n }\r\n }\r\n }\r\n } catch (UnsupportedEncodingException uee) {\r\n throw new IOException(\r\n \"Unsupported encoding. Please contact the administrator\");\r\n }\r\n \r\n return result;\r\n }", "public Variable getNext(){\n\t\treturn this.next;\n\t}", "public Integer getNextSubPageIdx() {\n return getIntValue(args.getFirst(PARAM_NAME_NEXT_SUB_PAGE_IDX), 0);\n }", "@Override\n @Nonnull\n @CheckReturnValue\n public SplitString next() {\n if (offset == array.length) {\n throw new IllegalStateException(\"No more arguments to read\");\n }\n return array[offset++];\n }", "public String retrieveParam(String key) {\n return this.argsDict.get(key);\n }", "public int getCurrentNext() {\n\t\tInteger ii = (Integer) get_Value(\"CurrentNext\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public String optarg() {\n\tif (arg_count >= args.size())\n\t return null;\n\treturn (String) args.elementAt(arg_count++);\n }", "private int getNextLine() {\n return peekToken().location.start.line;\n }", "int getNext(int node_index) {\n\t\treturn m_list_nodes.getField(node_index, 2);\n\t}", "public EncapsulatedIRCCommand getNextCommand();", "private String getLongInstruction(int nextVal) throws java.io.IOException {\n\t\treadUntilEndOfLine(nextVal);\n\t\treturn next;\n\t}", "public int getParamIndex()\n\t{\n\t\treturn paramIndex;\n\t}", "public String getNextToken() {\n return nextToken;\n }", "public static void main (String []argv)\n\t{\n\t int integer = 0;\n\t int []inArr = new int [argv.length];\n\t \n\t for (int i = 0; i< argv.length; i++)\n\t {\n\t \n\t inArr [i] = Integer.parseInt (argv[i]);\n\t \n\t }\n\t \n\t \n\t integer = getN();\n\n\t System.out.println (\"The LAST occurrence of \" + integer + \" is: \" + findVal (inArr, integer));\n\t}", "int getNextStep() {\n if (!includedInLastStep()) {\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter;\n } else {\n start = end + 1;\n if (knuthIter.hasNext()) {\n goToNextLegalBreak();\n return nextStepLength + lastPenaltyLength \n + borderBefore + borderAfter + paddingBefore + paddingAfter; \n } else {\n return -1;\n }\n }\n }", "private void next(String[] arguments) {\n\t\ttry {\n\t int ID = Integer.parseInt(arguments[1]);\n\t successor = null;\n\t findSuccessor(root, ID);\n\t if(successor == null)\n\t \tSystem.out.println(\"0 0\");\n\t else\n\t \tSystem.out.printf(\"%d %d\\n\", successor.ID, successor.count);\n\t } catch(NumberFormatException e) { \n\t System.out.println(\"Argument not an Integer\");; \n\t }\n\t}", "public HIR\n getNextExecutableNode();", "IParameter getParameter();", "int getParamType(String type);", "public String arg1() {\r\n return command.split(\"\\\\s+\")[1];\r\n }", "public int getNext() {\n return value++;\n }", "public Node parameter()\r\n\t{\r\n\t\tint index = lexer.getPosition();\r\n\t\tif(lexer.getToken()==Lexer.Token.IDENTIFIER)\r\n\t\t{\r\n\t\t\tif(lexer.getString().equals(\"p\"))\r\n\t\t\t{\r\n\t\t\t\tif(lexer.getToken()==Lexer.Token.LEFT_BRACKETS)\r\n\t\t\t\t{\r\n\t\t\t\t\tNode var = variable();\r\n\t\t\t\t\tif(var!=null)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tString name = lexer.getString();\r\n\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.NUM\r\n\t\t\t\t\t\t\t&& !lexer.getString().contains(\".\"))\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tint derivative = Integer.parseInt(lexer.getString());\r\n\t\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.COMMA)\r\n\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.NUM\r\n\t\t\t\t\t\t\t\t\t&& !lexer.getString().contains(\".\"))\r\n\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\tint phase = Integer.parseInt(lexer.getString());\r\n\t\t\t\t\t\t\t\t\t\tif(lexer.getToken()==Lexer.Token.RIGHT_BRACKETS)\r\n\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\tParameter parsed = new Parameter(name,derivative,phase,null);\r\n\t\t\t\t\t\t\t\t\t\t\tfor(Parameter pars : parameters)\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\t\tif(pars.equals(parsed))\r\n\t\t\t\t\t\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\t\t\t\t\t\treturn pars;\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\tparameters.add(parsed);\r\n\t\t\t\t\t\t\t\t\t\t\treturn parsed;\r\n\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tlexer.setPosition(index);\r\n\t\treturn null;\r\n\t}", "private final ExprOrOpArgNode getArg(SymbolNode param) {\n AnyDefNode opDef = (AnyDefNode)this.operator;\n FormalParamNode[] formals = opDef.getParams();\n for (int i = 0; i < this.operands.length; i++) {\n if (formals[i] == param) {\n return this.operands[i];\n }\n }\n return null;\n }", "public int getFormalParameterIndex() {\n/* 401 */ return (this.value & 0xFF0000) >> 16;\n/* */ }", "public String getNextToken() {\n return nextToken;\n }", "com.google.protobuf.ByteString\n getNextStepBytes();", "public E nextStep() {\r\n\t\tthis.current = this.values[Math.min(this.current.ordinal() + 1, this.values.length - 1)];\r\n\t\treturn this.current;\r\n\t}", "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 }", "Long getNextSequence(String seqName);", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "public String getNextToken() {\n return this.nextToken;\n }", "int getStep();", "int getStep();", "int getStep();", "public int nextOffset(int curr) {\n return curr + 1;\n }", "public String getNextNodeInput(NextNode node) {\n return node.input;\n }", "public String getParam(int index) {\n\t\treturn params.get(index);\n\t}", "public abstract Tuple getNext();", "private String parseParameter(String[] args, int parameterIndex) throws ExceptionMalformedInput\n {\n if (parameterIndex >= args.length)\n throw new ExceptionMalformedInput(\"Missing value for the parameter: \" + args[parameterIndex]);\n return args[parameterIndex];\n }", "private String getNext() {\n \t\t\n \t\tArrayList<String> reel = game.getType().getReel();\n \t\t\n \t\tRandom generator = new Random();\n \t\tint id = generator.nextInt(reel.size());\n \t\t\n \t\tString nextID = reel.get(id);\n \t\tString[] idSplit = nextID.split(\"\\\\:\");\n \t\t\n \t\tif (idSplit.length == 2) {\n \t\t\treturn nextID;\n \t\t}else {\n \t\t\tString newID;\n \t\t\tnewID = Integer.parseInt(idSplit[0]) + \":0\";\n \t\t\t\n \t\t\treturn newID;\n \t\t}\n \t}", "public int arg2() {\n return Integer.parseInt(instructionChunks[2]);\n }", "@Override\r\n\tpublic String next() {\n\t\tString nx;\r\n\r\n\t\tnx = p.getNext();\r\n\r\n\t\tif (nx != null) {\r\n\t\t\tthisNext = true;\r\n\t\t\tinput(nx);\r\n\t\t}\r\n\t\treturn nx;\r\n\t}", "public String getStepParameter(boolean isSelectType)\n\t{\n\t\treturn \"#\" + this.stepLineNumber;\n\t}", "public String getStepParameter(boolean isSelectType)\n\t{\n\t\treturn \"#\" + this.stepLineNumber;\n\t}", "@NotNull\n @JsonProperty(\"nextValue\")\n public String getNextValue();", "public synchronized int getNext(String key) {\n // Get value from counter map\n Integer nextObject = counters.get(key);\n int next = 0;\n if (nextObject != null) {\n next = nextObject;\n }\n\n // Handle overflows\n int incr = next + 1;\n if (incr < 0) {\n incr = 0;\n }\n\n // Store value for next call\n counters.put(key, incr);\n\n return next;\n }", "public String arg1() {\n CommandType type = this.commandType();\n if (type == CommandType.C_ARITHMETIC) {\n return instructionChunks[0];\n }\n return instructionChunks[1];\n }", "public char getopt() {\n\tif (opt_count >= opts.size())\n\t return OPT_EOF;\n\treturn ((Character) (opts.elementAt(opt_count++))).charValue();\n }", "public void setNext(Variable next){\n\t\tthis.next = next;\n\t}", "@Override\r\n public int getSecondArg() {\n return localsNum;\r\n }", "public TurnHelper next() {\n return values()[ordinal() + 1];\n }", "public String getParam() {\n return param;\n }", "public String getParam() {\n return param;\n }", "public BigInteger getNext() {\n\n\t\t//get the last found\n\t\tBigInteger lastFound;\n\t\tif(primes.size()==0) {\n\t\t\t//initialize last found to 1 if \"primes\" is still empty\n\t\t\tlastFound = new BigInteger(\"1\");\n\t\t\tprimes.add(lastFound);\n\t\t}else {\n\t\t\tlastFound = primes.get(primes.size()-1);\n\t\t}\n\n\n\t\tBigInteger one = new BigInteger(\"1\");\n\t\t//increment last found\n\t\tlastFound = lastFound.add(one);\n\n\t\twhile(!isPrime(lastFound)) {\n\t\t\tlastFound = lastFound.add(one);\n\t\t}\n\n\t\tprimes.add(lastFound);\n\t\treturn lastFound;\n\t}", "String nextLink();", "Split getNext();", "private String readNextCommand(Scanner scanner) {\n // set the current thread\n this.currentThread.set(Thread.currentThread());\n\n String nextCommand;\n try {\n // read next line\n nextCommand = scanner.nextLine().trim();\n } finally {\n // terminate this thread\n this.currentThread.set(null);\n }\n\n return nextCommand;\n }", "int next();", "public char getNextToken(){\n\t\treturn token;\n\t}", "public ListNode<T> getNext();", "public int nextInt() {\n int temp = results.get(index);\n index = index + 1;\n System.out.println(index);\n return temp;\n }", "private Object getArg(Object[] args, int index, Object defaultValue) {\n if (index < 0) return defaultValue;\n return (args != null && args.length >= index+1) ? args[index] : defaultValue;\n }", "@Override\n\tpublic String nextCommand() {\n\t\treturn null;\n\t}", "public void Next();", "ImmutableMap<XconnectKey, Integer> getNext();", "public String getInitParameter(java.lang.String name)\n {\n \treturn config.getInitParameter(name);\n }", "protected Word getNext()\n/* */ {\n/* 63 */ Word token = null;\n/* 64 */ if (this.lexer == null) {\n/* 65 */ return token;\n/* */ }\n/* */ try {\n/* 68 */ token = this.lexer.next();\n/* 69 */ while (token == WhitespaceLexer.crValue) {\n/* 70 */ if (this.eolIsSignificant) {\n/* 71 */ return token;\n/* */ }\n/* 73 */ token = this.lexer.next();\n/* */ }\n/* */ }\n/* */ catch (IOException e) {}\n/* */ \n/* */ \n/* 79 */ return token;\n/* */ }", "ResolvedParameterDeclaration getParam(int i);", "private int nbThread(Integer parameterIndex) throws ExceptionMalformedInput\n {\n this.nbThread = parseParameterInt(args, parameterIndex+1);\n//TODO check that the number is >=1\n return parameterIndex + 1;\n }", "private int next(int index)\n\t{\n\t\tif (index == list.length - 1)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn index + 1;\n\t\t}\n\t}", "abstract protected void parseNextToken();", "java.lang.String getParameterName();", "public String getThisParameter(String parameterName) {\r\n\t\tlog.debug(\"in GeneListAnalysis.getThisParameter\");\r\n\r\n\t\tParameterValue[] myParameterValues = this.getParameterValues();\r\n\t\t//log.debug(\"parmavalues len = \"+myParameterValues.length);\r\n \tString parameterValue= null;\r\n \tfor (int i=0; i<myParameterValues.length; i++) {\r\n\t\t\tif (myParameterValues[i].getParameter().equals(parameterName)) {\r\n \t\tparameterValue = myParameterValues[i].getValue();\r\n\t\t\t\t//log.debug(\"parameter value = \"+parameterValue);\r\n \t}\r\n \t}\r\n\t\treturn parameterValue;\r\n\t}", "@Override\n\tpublic String getNext() throws IOException {\n\t\ttry {\n\t\t\t// Ignore space, tab, newLine, commentary\n\t\t\tint nextVal = reader.read();\n\t\t\tnextVal = this.ignore(nextVal);\n\n\t\t\treturn (!isEndOfFile(nextVal)) ? this.getInstruction(nextVal) : null;\n\t\t} catch (java.io.IOException e) {\n\t\t\tthrow new IOException();\n\t\t}\n\n\t}", "@TestMethod(value=\"testGetParameterType_String\")\n public Object getParameterType(String name) {\n \tif (\"maxIterations\".equals(name)) return Integer.MAX_VALUE;\n return null;\n }", "public ProgramExp getArgument() {\n return argument;\n }" ]
[ "0.6620799", "0.6293617", "0.59576595", "0.5896346", "0.5896346", "0.58318293", "0.57076293", "0.5684765", "0.56451553", "0.56275016", "0.56190866", "0.5610199", "0.55766714", "0.5555441", "0.5522114", "0.55162984", "0.5450053", "0.54421747", "0.5439582", "0.5414522", "0.5408701", "0.53933996", "0.5374131", "0.53655505", "0.53631455", "0.53581405", "0.5354947", "0.53322405", "0.5332156", "0.52892476", "0.52720773", "0.52691346", "0.52687985", "0.52458435", "0.52210456", "0.52079517", "0.52033806", "0.52009183", "0.5198379", "0.5171287", "0.51578236", "0.51515037", "0.5130086", "0.51284766", "0.5127622", "0.512552", "0.51161146", "0.5113436", "0.5112984", "0.51072234", "0.5104818", "0.51021814", "0.51021814", "0.51021814", "0.51021814", "0.5098017", "0.5098017", "0.5098017", "0.50969625", "0.5092823", "0.5090696", "0.5075042", "0.50745857", "0.50702274", "0.5070086", "0.5066198", "0.50615406", "0.50615406", "0.505341", "0.5046789", "0.5032667", "0.50313455", "0.50114584", "0.501117", "0.501104", "0.4988624", "0.4988624", "0.49795368", "0.49785814", "0.49746227", "0.49728617", "0.49721268", "0.4971706", "0.49544954", "0.49506176", "0.49466467", "0.4945255", "0.4944984", "0.4921572", "0.491928", "0.49129954", "0.49087414", "0.49024248", "0.4892393", "0.48868886", "0.48839995", "0.48783398", "0.4877231", "0.48740402", "0.48675722" ]
0.6059492
2
add more describe this constructor
public Restaurant(String _name) { // assign default values reviewCount = 0; reviewScoreTotal = 0; this.name = _name; this.totalCustomers = 0; starRating = 0; location = "Not listed"; numOfMenuItems = 0; numberOfRestraunts = 0; cuisine = "Unknown"; typeOfFood = ""; dishOfTheDay = "Unknown"; typeOfDrink = ""; employees = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Dog ()\n {\n super (\"Dog\", \"Hi! My name is Snoop Dawg\");\n this.x = \"A bone\";\n /*\n * This dog has many features to it\n * Do not provoke it or else it will bite!\n * Otherwise, It's a nice dog so have fun!\n */\n \n \n }", "public Extra(String name) {\n this.name = name;\n }", "private void __sep__Constructors__() {}", "public Overview() {\n\t\t// It will work whenever i create object with using no parameter const\n\t\tSystem.out.println(\"This is constructor\");\n\t}", "public Curstomers_add() {\n\t\tsuper();\n\t}", "WrapInfo() {\n super(2);\n }", "public Method(String name, String desc) {\n/* 82 */ this.name = name;\n/* 83 */ this.desc = desc;\n/* */ }", "public LearnConstructor(int age,String name,String address){\n this.age=age;\n this.address=address;\n this.name=name;\n System.out.println(this.name+\" \"+this.address+\" \"+this.age);\n }", "public CharacterDescription(String name, String description, GenderEnum gender, List<PropertyEnum> features) {\n this.name = name;\n this.description = description;\n this.gender = gender;\n this.features = features;\n }", "public SectionDesc ()\r\n {\r\n }", "public Child() {\n\t\tsuper(20);\n\t}", "public Subassembly(String description) {\r\n\t\tsuper(description);\r\n\t}", "public Synopsis()\n\t{\n\n\t}", "private void addMoreRepletParameters() throws Exception\n {\n addTermbaseParameter();\n addLanguageParameter();\n addRepletParameters(theParameters);\n }", "public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }", "Constructor() {\r\n\t\t \r\n\t }", "public AddItemViewParameters() {\n\t}", "public HtShowDetailedLog() {\n\t}", "public Cat(String name){\n this.name = name;\n this.setDescription();\n }", "public Meat(String description, Money cost, int calorieCount) {\r\n super(description,cost,calorieCount);\r\n }", "public ProAddAttrRecord() {\n super(ProAddAttr.PRO_ADD_ATTR);\n }", "public void introduce() {\n\t\tSystem.out.println(\"[\" + this.className() + \"] \" + this.describeRacer());\n\t}", "protected GeneralInfo(){\r\n \t\tsuper();\r\n \t}", "protected String description() {\r\n\t\treturn \"Exam: duration \" + duration + \" minutes, weight \" + this.getWeight() + \"%\";\r\n\t}", "public Features() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}", "Constructor(int i,String n ,int x){ //taking three parameters which shows that it is constructor overloaded\r\n\t\t id = i; \r\n\t\t name = n; \r\n\t\t marks =x; \r\n\t\t }", "@Override\n\t public void printAdd(int a,int b) { \n\t\t super.printAdd(10,20); \n\t }", "private void addConstructors() {\n\t\tthis.rootBindingClass.getConstructor().body.line(\"super({}.class);\\n\", this.name.getTypeWithoutGenerics());\n\t\tGMethod constructor = this.rootBindingClass.getConstructor(this.name.get() + \" value\");\n\t\tconstructor.body.line(\"super({}.class);\", this.name.getTypeWithoutGenerics());\n\t\tconstructor.body.line(\"this.set(value);\");\n\t}", "public AdvancedCFG(String constructor){\n super(constructor);\n }", "public Perro() {\n// super(\"No define\", \"NN\", 0); en caso el constructor de animal tenga parametros\n this.pelaje = \"corto\";\n }", "public SimpleCitizen(){\n super();\n information = \"let's help to find mafias and take them out\";\n }", "public Troop() //make a overloaded constructor \n\t{\n\t\ttroopType = \"light\"; \n\t\tname = \"Default\";\n\t\thp = 50;\n\t\tatt = 20;\n\t}", "public Dog(String Breed, String PrimaryColor, String Size, String name, int age){\r\n // setting the parent animal name\r\n super(name,age);\r\n // setting the parent animal age\r\n // System.out.println(\"Setting Breed...\");\r\n this.Breed = Breed ;\r\n // System.out.println(\"Setting PrimaryColor...\");\r\n this.PrimaryColor = PrimaryColor;\r\n //System.out.println(\"Setting Size...\");\r\n this.Size = Size;\r\n\r\n\r\n\r\n }", "Vehicle() \n {\n System.out.println(\"Constructor of the Super class called\");\n noOfTyres = 5;\n accessories = true;\n brand = \"X\";\n counter++;\n }", "public Story() {\n\tsuper((StringBuilder)null);\n\tinitHeaders();\n\t}", "public Dog(String name, int size, int weight, int eyes, int legs, int tail, int teeth, String coat) {\n //super means to call a constructor from the class we are extending\n //can set values or call in the above constructor, your choice\n super(name, 1, 1, size, weight);\n //these are for the strictly dog paramters\n this.eyes = eyes;\n this.legs = legs;\n this.tail = tail;\n this.teeth = teeth;\n this.coat = coat;\n }", "public Card() { this(12, 3); }", "@Override\n public void addCondiments() {\n System.out.println(\"添加柠檬\");\n }", "public Init(String key, String desc) {\n super(key, desc);\n }", "public PthTestContentsInfo() {\n }", "private String addExtra() {\n\t\t// One Parameter: ExtraName\n\t\tStringBuilder tag = new StringBuilder();\n\t\ttag.append(\"|extra:\" + parameters[0]);\n\t\treturn tag.toString();\n\t}", "public NewsParamPanel() {\n initComponents();\n titleAnalyzer.setFieldName(\"TITLE\");\n dateAnalyzer.setFieldName(\"DATE\");\n sourceExtractor.setFieldName(\"SOURCENAME\");\n authorExtractor.setFieldName(\"AUTHOR\");\n commentsExtractor.setFieldName(\"COMMENT_COUNT\");\n clicksExtractor.setFieldName(\"CLICK_COUNT\");\n transmitExtractor.setFieldName(\"TRANSMIT_COUNT\");\n summaryExtractor.setFieldName(\"SUMMARY\");\n chnlExtractor.setFieldName(\"CHANNEL\");\n contentExtractor.setFieldName(\"CONTENT\");\n }", "public MoreThanSimple (String player, int cardIndex, boolean addUp, int whichDie){\n\n super(player,cardIndex);\n this.die=whichDie;\n this.decision=addUp;\n }", "public MajorDescription() {\n modules = new ArrayList<>();\n facultyModuleCodePrefixes = new ArrayList<>();\n }", "public void buildClassDescription() {\n\t\twriter.writeClassDescription();\n\t}", "@Override\n public String getDescription() {\n return String.format(\n \"This is a %s car, its top speed is %.2fkm/h and it can hold %d people\",\n this.getBrand(), this.getSpeed(), this.getNumPassengers()\n );\n }", "public f206(String name) {\n super(name);\n }", "public Submarine() {\n\t\tsuper(size);\n\t}", "@Override\n protected void options()\n {\n super.options();\n addOption(Opt.APPLICATION_ID);\n addOption(Opt.SERVER_ID);\n addOption(Opt.CATEGORY);\n addOption(Opt.NAME, \"The name of the label\");\n }", "public void setDescription(String description){this.description=description;}", "@Override\n public void setDescription(String arg0)\n {\n \n }", "public TrolleyDetail() {\n\t\tsuper();\n\t}", "@Override\n public String getDescription() {\n return \"Tagged data extend\";\n }", "@Override\n public String getDescription() {\n return description;\n }", "@Override\r\n public void addAdditionalParams(WeiboParameters des, WeiboParameters src) {\n\r\n }", "public ChaCha()\n\t{\n\t\tsuper();\n\t}", "Builder addDetailedDescription(String value);", "@Override\n public String getDescription() {\n return DESCRIPTION;\n }", "public MdnFeatures()\n {\n }", "public CowMeat(){\n\t\tsuper(\"CowMeat\", 100000);\n\t}", "public Plato(String nombre, String descripcion){\n\t\tthis.nombre=nombre;\n\t\tthis.descripcion=descripcion;\n\t}", "SensorDescription(){\n\n }", "public void constructor() {\n setEdibleAnimals();\n }", "public InfoOptions() {\n\t\tHelpOpt = new ArrayList<String>();\n\t\tDisplayOpt = new ArrayList<String>();\n\t\tNoteOpt = new ArrayList<String>();\n\t\tDelOpt = new ArrayList<String>();\n\t\tChangeNameOpt = new ArrayList<String>();\n\t\tsetDisplay();\n\t\tsetHelp();\n\t\tsetNote();\n\t\tsetDel();\n\t\tsetChangeName();\n\t}", "public InstantGrowPro() {\n\t\tsuper(\"Instant-Grow Pro(R)\", 1000, \"Crop\",\n\t\t\t\t\"Immediately harvest a crop\",\n\t\t\t\t\"Immediately readies a crop for harvest. \" +\n\t\t\t\t\"Infused with patented witchcraft technology\");\n\t}", "private GetMyInfo()\r\n/* 13: */ {\r\n/* 14:13 */ super(new APITag[] { APITag.INFO }, new String[0]);\r\n/* 15: */ }", "public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }", "public Info() {\n super();\n }", "public MendInformation() {\r\n \tinitComponents();\r\n }", "public SubSectionDetail() {\r\n\t}", "private Add() {}", "private Add() {}", "public Informations() {\n initComponents();\n \n Affichage();\n }", "@Override\n\t\t\tpublic void visit(ConstructorDeclaration arg0, Object arg1) {\n\t\t\t\tif((arg0.getModifiers() & Modifier.PUBLIC) > 0)\n\t\t\t\t\tfields.add(\"+\" + arg0.getDeclarationAsString(false, false));\n\t\t\t\tsuper.visit(arg0, arg1);\n\t\t\t}", "private void fillConstructorFields() {\n constructorId.setText(\"\"+ constructorMutator.getConstructor().getConstructorId());\n constructorUrl.setText(\"\"+ constructorMutator.getConstructor().getConstructorUrl());\n constructorName.setText(\"\"+ constructorMutator.getConstructor().getConstructorName());\n constructorNationality.setText(\"\"+ constructorMutator.getConstructor().getNationality());\n teamLogo.setImage(constructorMutator.getConstructor().getTeamLogo().getImage());\n // Display Drivers that were from the JSON File\n constructorMutator.getConstructor().setBuffer(new StringBuffer());\n // Java 8 Streaming\n constructorMutator.getConstructorsList().stream().forEach(constructorList -> constructorMutator.getConstructor().toString(constructorList));\n }", "private BUR(final String name, final String desc, final String acronym)\r\n {\r\n super(name, desc, acronym);\r\n }", "public Constructor(){\n\t\t\n\t}", "protected void setupAdditions(int amount) {\n\n\n for (int i = 1; i != amount; i++) {\n int runTime = ((i * i) + 90);\n MovieList.addMovie(\"title \" + i, i + 1000, runTime, \"Plot \" + i, \"imgUrl \" + i);\n ActorList.addActor(\"name\" + i, i + 10, \"gender\" + i, \"nationality\" + i);\n\n\n }\n\n }", "public LesserDemandDetail() {\n //For serialization.\n }", "public AbstractClassExtend() {\n\t\tsuper(\"hello\");\n\t}", "public Pasien() {\r\n }", "public As21Id27()\n\t{\n\t\tsuper() ;\n\t}", "public Tbdcongvan36() {\n super();\n }", "public EmpName() {\n\t\tsuper(\"Aditi\",\"Tyagi\");\n\t\t//this(10);\n\t\tSystem.out.println(\"Employee name is Vipin\");\n\t\t\n\t}", "public MLetter(Parameters parametersObj) {\r\n\t\tsuper(parametersObj);\r\n\t}", "@Override\n public String getMoreMojor() {\n return moremajor;\n }", "@Override\n protected String getDescription() {\n return DESCRIPTION;\n }", "public Contribuinte()\n {\n this.nif = \"\";\n this.nome = \"\";\n this.morada = \"\"; \n }", "ByCicle(int weight, String name) {\r\n //super keyword can be used to access the instance variables of superclass\r\n //\"super\" can also be used to invoke parent class constructor and method\r\n super(weight);//Accessign Superclass constructor and its variable\r\n //Global Variable=Local variable\r\n this.name = name;\r\n }", "public ExtractionParameters(){\n\t\tif (!subset){\n\t\t\tstartFrame = 1;\n\t\t}\n\t}", "private Disc() {\n super(\"\");\n barcode = \"\";\n director = \"\";\n fsk = 0;\n }", "public CardInformationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public MovieManager(GenesisGetters genesisGetters)\r\n/* 151: */ {\r\n/* 152:150 */ setName(\"Video manager\");\r\n/* 153:151 */ this.gauntlet = genesisGetters;\r\n/* 154: */ }", "private TIPO_REPORTE(String nombre)\r\n/* 55: */ {\r\n/* 56: 58 */ this.nombre = nombre;\r\n/* 57: */ }", "public abstract void description();", "public abstract String description();", "public abstract String description();", "public Coche() {\n super();\n }", "public OpDesc() {\n\n }", "public Summary() {\n initComponents();\n \n }", "public Article() {\n\t\tthis.nom=\"VIDE\";\n\t\tthis.prix=0.0;\n\t\tthis.categorie= null;\n\t}" ]
[ "0.5847378", "0.5749528", "0.57437", "0.5716376", "0.56964856", "0.5690576", "0.56614757", "0.5646767", "0.5620295", "0.56005365", "0.5593548", "0.557693", "0.55754584", "0.5559695", "0.55214405", "0.5486297", "0.547677", "0.54505867", "0.544807", "0.5442693", "0.5435113", "0.54331374", "0.5428883", "0.5421488", "0.5416253", "0.5411948", "0.53872806", "0.5384425", "0.5363153", "0.53369015", "0.5336494", "0.5327524", "0.5310419", "0.5295758", "0.5292762", "0.52866894", "0.5280745", "0.5278803", "0.5275271", "0.52701354", "0.5266047", "0.5261556", "0.52559525", "0.52546525", "0.5251327", "0.5249337", "0.52415156", "0.5235416", "0.5227792", "0.52235967", "0.5223186", "0.5222773", "0.522249", "0.52210677", "0.52146226", "0.521215", "0.52071285", "0.5194756", "0.51900524", "0.51889426", "0.5187682", "0.5175676", "0.51747584", "0.5173495", "0.5170398", "0.51667935", "0.51653546", "0.5160131", "0.51584816", "0.51547015", "0.51504374", "0.51504374", "0.5145965", "0.5144623", "0.5141475", "0.5139793", "0.5133645", "0.5127376", "0.512361", "0.51120895", "0.510763", "0.51068646", "0.5106696", "0.51053", "0.51050365", "0.5103985", "0.5103202", "0.51027304", "0.51021755", "0.51017463", "0.5100079", "0.50968593", "0.5094921", "0.5094325", "0.5093242", "0.5091374", "0.5091374", "0.50897425", "0.5087808", "0.50846505", "0.5084486" ]
0.0
-1
accessors and mutators here Sets the number of items on the resturant's menu
public void setNumOfMenuItems(int _numOfMenuItems){ numOfMenuItems = _numOfMenuItems; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumOfMenuItems(){\n return numOfMenuItems;\n }", "public int size() {\n return menuItems.size();\n }", "@Override\n\t\t\tpublic int getCount(){\n\t\t\t\treturn menus.size();\n\t\t\t}", "@Override\n public int getItemCount() {\n if (menu != null)\n return menu.size();\n else return 0;\n }", "@Override\r\n\tpublic int getMenCount() {\n\t\treturn 5;\r\n\t}", "@Override\n\tpublic int getCount() {\n\t\t return menuItems.size();\n\t}", "int getNumItems();", "int getItemsCount();", "int getItemsCount();", "public int size(){\n return numItems;\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size() {\n return nItems;\n }", "@Override\n public int getRowCount() {\n if (menuItems.size() > 0) {\n return menuItems.size() + 2;\n } else {\n return menuItems.size();\n }\n }", "public int getNumberOfItems() {\r\n return decorItems.size();\r\n }", "public int size() {\n return numItems;\n }", "public int length() {\n return numberOfItems;\n }", "@Override\n\tpublic int numerOfItems() {\n\t\treturn usersDAO.numerOfItems();\n\t}", "public int size() {\n \treturn numItems;\n }", "@Override\n public int getSize() {\n return numItems;\n }", "public abstract int getItemCount();", "public void count() \r\n\t{\r\n\t\tcountItemsLabel.setText(String.valueOf(listView.getSelectionModel().getSelectedItems().size()));\r\n\t}", "@Override\n public int getItemCount() {\n return numItems;\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "@Override\n public int getItemCount() {\n return mNumberItems;\n }", "@Override\n public int getSize() {\n return this.numItems;\n }", "@Override\n public int getItemCount() {\n return super.getItemCount();\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "int getItemCount();", "int getItemCount();", "int getItemCount();", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "@attribute(value = \"\", required = false, defaultValue=\"SWT default\")\r\n\tpublic void setVisibleItemCount(Integer count) {\r\n\t\tcombo.setVisibleItemCount(count);\r\n\t}", "@Test\n public void adding_item_to_menu_should_increase_menu_size_by_1_Failure_Scenario(){\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.addToMenu(\"Sizzling brownie\",319);\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n System.out.println(\"Will decrease Instead of adding\");\n }", "public int size(){ return itemCount;}", "public int getItemsCount() {\n return items_.size();\n }", "public int getItemsCount() {\n return items_.size();\n }", "public void setCount() {\n\t\tLinkedListIterator iter = new LinkedListIterator(this.head);\n\t\tint currentSize = 1;\n\t\twhile (iter.hasNext()) {\n\t\t\titer.next();\n\t\t\tcurrentSize++;\n\t\t}\n\t\tthis.size = currentSize;\n\t}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn ITEM_NUM;\n\t\t}", "@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}", "public int numberOfItems()\n {\n return dessertList.size();\n }", "@Override\n public int getItemCount(){\n if(specialistList.size() > LIMIT) { return LIMIT; }\n else { return specialistList.size(); }\n }", "int getItemSize();", "public int getItemsCount() {\n return items_.size();\n }", "@Override\n public int getItemCount() {\n return mNavTitles.length+1; // the number of items in the list will be +1 the titles including the header view.\n }", "public int size(){\n return items.size();\n }", "public int getCount() {\n return app.getItems().length;\n }", "@Override\n public void onChange(MenuItem item) {\n List<Long> longList = getItemIds(item, new ArrayList<>());\n Long[] arr = longList.toArray(new Long[longList.size()]);\n int totalItems = getItemSize2(arr, realm);\n if (totalItems > 0) {\n counterTV.setVisibility(View.VISIBLE);\n counterTV.setText(totalItems + \"\");\n } else {\n counterTV.setVisibility(View.GONE);\n }\n menuItem.removeChangeListener(this);\n changeListenerHashSet.remove(this);\n }", "public Integer getItemcount() {\n return itemcount;\n }", "@Override\n public int getItemCount() {\n return count;\n }", "public void setItemcount(Integer itemcount) {\n this.itemcount = itemcount;\n }", "public int getItemCount();", "public void setCount(int count)\r\n\t{\r\n\t}", "private void setItemMenu() {\n choices = new ArrayList<>();\n \n choices.add(Command.INFO);\n if (item.isUsable()) {\n choices.add(Command.USE);\n }\n if (item.isEquipped()) {\n choices.add(Command.UNEQUIP);\n } else {\n if (item.isEquipable()) {\n choices.add(Command.EQUIP);\n }\n }\n \n if (item.isActive()) {\n choices.add(Command.UNACTIVE);\n } else {\n if (item.isActivable()) {\n choices.add(Command.ACTIVE);\n }\n }\n if (item.isDropable()) {\n choices.add(Command.DROP);\n }\n if (item.isPlaceable()) {\n choices.add(Command.PLACE);\n }\n choices.add(Command.DESTROY);\n choices.add(Command.CLOSE);\n \n this.height = choices.size() * hItemBox + hGap * 2;\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "@Override\n public int getItemCount() {\n return this.items.size();\n }", "@Override\n public int getItemCount() {\n return mSize;\n }", "@Override\n public int getItemCount() {\n //neste caso 10\n return mList.size();\n }", "public int getSize() {\r\n return list.getItemCount();\r\n }", "@Override\n public int getItemCount() {\n return nimList.size();\n }", "public int getItemCount() {\n if (itemBuilder_ == null) {\n return item_.size();\n } else {\n return itemBuilder_.getCount();\n }\n }", "public int getItems() {\n return items;\n }", "@Override\n public int getSize() {\n return items.size();\n }", "public int getItemCount() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETITEMCOUNT, 0, 0);\n }", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn App.getInstance().getSettlements().size();\n\t\t}", "default int countItems() {\n return countItems(StandardStackFilters.ALL);\n }", "public int showMenu() {\n\t\tSystem.out.print(\"\\n--- 학생 관리 프로그램 ---\\n\");\n\t\tSystem.out.println(\"1. 학생 정보 등록\");\n\t\tSystem.out.println(\"2. 전체 학생 정보\");\n\t\tSystem.out.println(\"3. 학생 정보 출력(1명)\");\n\t\tSystem.out.println(\"4. 학생 정보 수정\");\n\t\tSystem.out.println(\"5. 학생 정보 삭제\");\n\t\tSystem.out.print(\"선택 > \");\n\t\tint itemp = sc.nextInt();\n\t\treturn itemp;\n\t}", "@Test\n public void removing_item_from_menu_should_decrease_menu_size_by_1() throws itemNotFoundException {\n\n int initialMenuSize = restaurant.getMenu().size();\n restaurant.removeFromMenu(\"Vegetable lasagne\");\n assertEquals(initialMenuSize-1,restaurant.getMenu().size());\n }", "@Override\n public int getItemCount() {\n return listItem.size();\n }", "public int getItemsCount() {\n if (itemsBuilder_ == null) {\n return items_.size();\n } else {\n return itemsBuilder_.getCount();\n }\n }", "public int listSize(){\r\n return counter;\r\n }", "@Override\n public int getItemCount() {\n return listOfAttractions.size();\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "@Override\n public int getItemCount() {\n return mShellModels.size();\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public int size() {\n return items.size();\n }", "public int getItemCount() {\n return itemCount(root);\n }", "public void setNbTotalItems(long value) {\n this.nbTotalItems = value;\n }", "public OrganizeItemsPanel() {\n initComponents();\n// lastIndeks = catalogProducts.size();\n }", "public long getNbTotalItems() {\n return nbTotalItems;\n }", "@Override\n public int getItemCount() {\n return listItems.size();\n }", "@Override\r\n public int getItemCount() {\r\n return itemList.size();\r\n }", "@Override\r\n public int getCount() {\r\n return NUM_ITEMS;\r\n }", "@Override\r\n public int getCount() {\r\n return NUM_ITEMS;\r\n }", "public int getItemCount()\n {\n return Math.min(cats.size(), 5);\n }", "@Override\r\n\tpublic int getCount() {\n\t\treturn ac.ProductList.size();\r\n\t}", "@Override\n public int getItemCount() {\n\n if (null == dirItems) return 0;\n\n //Log.d(TAG, \"Besar\" + dirItems.size());\n return dirItems.size();\n }", "@Override\n public int getItemCount() {\n return mAttractions.size();\n }", "@Override\n public int getItemCount() {\n\n return itemList.size();\n }", "@Override\n public int getCount() {\n return NUM_ITEMS;\n }", "public static int getCount(){\n\t\treturn countFor;\n\t}", "int getOptionsCount();", "int getOptionsCount();", "int getOptionsCount();", "@Override\n\tpublic int getCount() {\n\t\treturn NUM_ITEMS;\n\t}", "@Override\n\tpublic int getCount() {\n\t\treturn NUM_ITEMS;\n\t}", "@Override\n public int getItemCount() { //PARA QUE FUNCIONE TIENE QUE TENER CUANTOS ELEMNTOS TIENE\n\n return values.size();\n }" ]
[ "0.7804948", "0.70072174", "0.68257296", "0.6821093", "0.67480314", "0.6675431", "0.6615578", "0.6566545", "0.6566545", "0.65341127", "0.6496422", "0.64692205", "0.64602053", "0.6441619", "0.6417767", "0.6397882", "0.63959193", "0.63585407", "0.6348593", "0.6312882", "0.6296271", "0.6292867", "0.6277651", "0.6274921", "0.6227355", "0.6218979", "0.6196738", "0.6188952", "0.6188952", "0.6188952", "0.6186308", "0.6180315", "0.61771655", "0.6170327", "0.61698455", "0.61698455", "0.6140299", "0.6137579", "0.61359656", "0.61204654", "0.6110093", "0.608658", "0.6075299", "0.6068243", "0.6058588", "0.60531205", "0.6052603", "0.6037967", "0.60308325", "0.6028901", "0.6024516", "0.6020722", "0.60192525", "0.59914327", "0.59801424", "0.59644246", "0.5964034", "0.59562635", "0.59484124", "0.5945741", "0.5942161", "0.59366214", "0.59185034", "0.5896386", "0.5890264", "0.5880482", "0.58756137", "0.58706146", "0.58656687", "0.58631414", "0.58390254", "0.58287185", "0.58287185", "0.5826714", "0.580927", "0.5806077", "0.5806077", "0.5806077", "0.57966787", "0.579417", "0.57923204", "0.5788965", "0.5787624", "0.5780762", "0.5776737", "0.5773874", "0.5773874", "0.5768203", "0.5763986", "0.5758468", "0.5755623", "0.57463795", "0.5743446", "0.5737161", "0.57289726", "0.57289726", "0.57289726", "0.5726752", "0.5726752", "0.5720094" ]
0.8045973
0
Gets the number of items on the resturant's menu
public int getNumOfMenuItems(){ return numOfMenuItems; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size() {\n return menuItems.size();\n }", "int getNumItems();", "int getItemsCount();", "int getItemsCount();", "@Override\n public int getItemCount() {\n if (menu != null)\n return menu.size();\n else return 0;\n }", "public int getItemCount() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETITEMCOUNT, 0, 0);\n }", "public int size()\r\n {\r\n return nItems;\r\n }", "public int size() {\n return nItems;\n }", "default int countItems() {\n return countItems(StandardStackFilters.ALL);\n }", "public int getNumberOfItems() {\r\n return decorItems.size();\r\n }", "public int size() {\n return numItems;\n }", "public int size()\r\n\t{\r\n\t\treturn numItems;\r\n\r\n\t}", "@Override\n\tpublic int numerOfItems() {\n\t\treturn usersDAO.numerOfItems();\n\t}", "public int getCount() {\n return app.getItems().length;\n }", "public int length() {\n return numberOfItems;\n }", "public int size() {\n \treturn numItems;\n }", "@Override\n\t\t\tpublic int getCount(){\n\t\t\t\treturn menus.size();\n\t\t\t}", "public int getItemsCount() {\n return items_.size();\n }", "public int getItemsCount() {\n return items_.size();\n }", "public int size(){\n return numItems;\n }", "public int length() {\n\n\t\treturn numItems;\n\n\t}", "public int getItemsCount() {\n return items_.size();\n }", "@Override\n\tpublic int getCount() {\n\t\t return menuItems.size();\n\t}", "public int size() {\n return items.size();\n }", "public int getItemsCount() {\n if (itemsBuilder_ == null) {\n return items_.size();\n } else {\n return itemsBuilder_.getCount();\n }\n }", "public int size() {\r\n return items.size();\r\n }", "public int size() {\r\n return items.size();\r\n }", "public int numberOfItems()\n {\n return dessertList.size();\n }", "int getItemCount();", "int getItemCount();", "int getItemCount();", "public int size() {\r\n if (NumItems > Integer.MAX_VALUE) {\r\n return Integer.MAX_VALUE;\r\n }\r\n return NumItems;\r\n }", "@Override\n\tpublic int size() {\n\n\t\treturn this.numOfItems;\n\t}", "@Override\n public int getRowCount() {\n if (menuItems.size() > 0) {\n return menuItems.size() + 2;\n } else {\n return menuItems.size();\n }\n }", "@Override\r\n\tpublic int size() {\r\n\t\treturn numItems;\r\n\t}", "public int getTotalItems()\n {\n return totalItems;\n }", "public int numItemInList() {\n return nextindex - startIndex;\n }", "public int getCount() \r\n\t{\r\n\t\tSystem.out.print(\"The number of book in the Array is \");\r\n\t\treturn numItems;\r\n\t\t\r\n\t}", "public int getItemCount() {\n if (itemBuilder_ == null) {\n return item_.size();\n } else {\n return itemBuilder_.getCount();\n }\n }", "public int getItemCount() {\n return itemCount(root);\n }", "public int size(){\n return items.size();\n }", "public void setNumOfMenuItems(int _numOfMenuItems){\n numOfMenuItems = _numOfMenuItems;\n }", "public int getBottomNavigationNbItems() {\n\t\treturn bottomNavigation.getItemsCount();\n\t}", "int getQueryItemsCount();", "public int getItemCount();", "public long getNbTotalItems() {\n return nbTotalItems;\n }", "@Override\n\tpublic int size() {\n\t\treturn numItems;// numItems represents size\n\t}", "public Integer getItemcount() {\n return itemcount;\n }", "public int getSize() {\r\n return list.getItemCount();\r\n }", "public int getNumberOfItems() {\n \t\treturn regions.size();\n \t}", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}", "@Override\n\tpublic Integer getItemCount() {\n\t\t\n\t\tInteger countRows = 0;\n\t\t\n\t\t/*\n\t\t * Count of items will be retrieved from MainQuery.xml\n\t\t */\n\t\ttry {\n\t\t\tconnection = DBConnectionUtil.getDBConnection();\n\t\t\tpreparedStatement = connection.prepareStatement(QueryUtil.queryByID(CommonConstants.QUERY_ID_GET_ITEM_COUNT));\n\t\t\tResultSet resultSet = preparedStatement.executeQuery();\n\t\t\t\n\t\t\twhile(resultSet.next()){\n\t\t\t\tcountRows = resultSet.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t} catch (SQLException | SAXException | IOException | ParserConfigurationException | ClassNotFoundException e) {\n\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t} finally {\n\t\t\t/*\n\t\t\t * Close prepared statement and database connectivity at the end of transaction\n\t\t\t */\n\t\t\ttry {\n\t\t\t\tif (preparedStatement != null) {\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t}\n\t\t\t\tif (connection != null) {\n\t\t\t\t\tconnection.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlog.log(Level.SEVERE, e.getMessage());\n\t\t\t}\n\t\t}\n\t\treturn countRows;\n\t}", "public Integer getInterestedInItemsCount();", "public long getItemCount() {\n\t\treturn this.getSize(data);\n\t}", "@Override\n\tpublic Integer findCount(Tmenu t) throws Exception {\n\t\treturn menuMapper.findCount(t);\n\t}", "public int getCount() {\n\t\t\tcantidadGrupos = extras.getInt(\"cantidadGrupos\");\n\t\t\treturn cantidadGrupos;\n\t\t}", "public abstract int getItemCount();", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public static int getCount() {\r\n\t\treturn count;\r\n\t}", "public Integer getLength(Menu row){\r\n \treturn row.getIdmenu().length();\r\n }", "public int getListSize() {\n return getRootNode().getItems().size();\n }", "public int getCount() {\n return definition.getInteger(COUNT, 1);\n }", "public int getSize() {\n synchronized (itemsList) {\n return itemsList.size();\n }\n }", "@Override\n public int getItemCount() {\n\n if (null == dirItems) return 0;\n\n //Log.d(TAG, \"Besar\" + dirItems.size());\n return dirItems.size();\n }", "int getListCount();", "public int getCount() {\n return listName.length;\n }", "public static int getAutoAnswerItemCount(SIPCommMenu menu)\n {\n int count = 0;\n for(int i = 0; i < menu.getItemCount(); i++)\n {\n if(menu.getItem(i) instanceof AutoAnswerMenuItem)\n count++;\n }\n\n return count;\n }", "@Override\n public int getItemCount() {\n if (itemList == null) {\n App.ShowMessage().ShowToast(Resorse.getString(R.string.error_adapter_item_count), ToastEnum.TOAST_SHORT_TIME);\n return 0;\n }\n return itemList.size();\n }", "public int getInventoryLength() {\n return items.length;\n }", "@Override\r\n\tpublic int getMenCount() {\n\t\treturn 5;\r\n\t}", "public int getItemCount() {\n\t\treturn _items.size();\n\t}", "public int getCount() {\n\t\treturn Dispatch.get(object, \"Count\").getInt();\n\t}", "@Override\n public int getSize() {\n return this.numItems;\n }", "public static int getCount() {\n\t\treturn count;\n\t}", "int getActionsCount();", "int getActionsCount();", "public int getCount() {\n\t\t\treturn list.size();\r\n\t\t}", "@Override\n public int getItemCount() {\n if (itemList != null)\n return itemList.size();\n else return 0;\n }", "int getLinksCount();", "int getOptionsCount();", "int getOptionsCount();", "int getOptionsCount();", "@Override\n public int getSize() {\n return numItems;\n }", "@Nonnegative\n public int getSize()\n {\n return items.size();\n }", "public static int getCount(){\n\t\treturn countFor;\n\t}", "int countByExample(MenuInfoExample example);", "public int size(){ return itemCount;}", "@Override\n\t\tpublic int getCount() {\n\t\t\treturn App.getInstance().getSettlements().size();\n\t\t}", "public Integer getMenuCount(MenuVO menuVO) {\n\t\treturn mapper.getMenuCount(menuVO);\r\n\t}", "@Override\n public int getItemCount() {\n return mNumberItems;\n }", "@Override\n\tpublic int getCount() {\n\t\treturn mMenuFunctionItemList.size();\n\t}", "@Override\n public int getItemCount() {\n if(mItems != null){\n return mItems.size();\n }\n return 0;\n }", "int getContentsCount();", "public Integer getTotalItemCount() {\n return totalItemCount;\n }", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public int getCount() {\r\n\t\treturn count;\r\n\t}", "public void count() \r\n\t{\r\n\t\tcountItemsLabel.setText(String.valueOf(listView.getSelectionModel().getSelectedItems().size()));\r\n\t}", "default int countItems(Predicate<ItemStack> filter) {\n return streamStacks().filter(filter).mapToInt(InvTools::sizeOf).sum();\n }", "public int getNumberOfProducts(){\n return this.products.size();\n }" ]
[ "0.80060685", "0.776759", "0.77624685", "0.77624685", "0.7625525", "0.74941325", "0.73645663", "0.7324633", "0.7322483", "0.72943324", "0.7247362", "0.72341365", "0.72106457", "0.72022945", "0.7179561", "0.7174385", "0.7152138", "0.71342444", "0.71342444", "0.7114471", "0.71002364", "0.70595556", "0.70582926", "0.7037522", "0.7034395", "0.7025939", "0.7025939", "0.69940007", "0.6990185", "0.6990185", "0.6990185", "0.6988695", "0.69778866", "0.69448876", "0.6895191", "0.68904763", "0.6877532", "0.6829041", "0.6822077", "0.6818101", "0.681279", "0.6805238", "0.6783559", "0.6769698", "0.67579794", "0.6754736", "0.6754435", "0.67522496", "0.6737079", "0.6731301", "0.6725191", "0.6725191", "0.67131406", "0.6705263", "0.6703363", "0.6699698", "0.6696039", "0.6683651", "0.6683651", "0.6683651", "0.66781586", "0.6672727", "0.6672031", "0.6671129", "0.6643013", "0.6623317", "0.6622682", "0.6619116", "0.66096306", "0.6603339", "0.66016686", "0.6599769", "0.65980756", "0.65976375", "0.6590188", "0.6582537", "0.6582537", "0.6575359", "0.6571047", "0.65629107", "0.6558001", "0.6558001", "0.6558001", "0.65447986", "0.65377605", "0.6533616", "0.6532585", "0.65219504", "0.65215045", "0.6519019", "0.6515032", "0.65122426", "0.6495154", "0.6490831", "0.64818233", "0.6478995", "0.6478995", "0.6474323", "0.64608693", "0.64572924" ]
0.84348977
0
Sets the number of restraunts in the chain
public void setNumberOfRestraunts(int _numberOfRestraunts){ numberOfRestraunts = _numberOfRestraunts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setNumOfRetrievelRequest(int value) {\n \n numOfRetrievelRequest_ = value;\n onChanged();\n return this;\n }", "public Builder setNumOfRetrievelRequest(int value) {\n \n numOfRetrievelRequest_ = value;\n onChanged();\n return this;\n }", "public abstract void setCntRod(int cntRod);", "public void setCount() {\n\t\tLinkedListIterator iter = new LinkedListIterator(this.head);\n\t\tint currentSize = 1;\n\t\twhile (iter.hasNext()) {\n\t\t\titer.next();\n\t\t\tcurrentSize++;\n\t\t}\n\t\tthis.size = currentSize;\n\t}", "void setNumberOfCavalry(int cavalery);", "public void setOneNewWanted () {\r\n numWanted ++;\r\n }", "public void setCount(int count)\r\n\t{\r\n\t}", "public void setChainLength(int c)\n {\n this.chainLength = c;\n }", "public void set_count(int c);", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public void setCount(int value) {\n this.count = value;\n }", "public Builder setN(int value) {\n \n n_ = value;\n onChanged();\n return this;\n }", "void setNoOfBuckets(int noOfBuckets);", "public void setCirculations()\r\n {\r\n circulations++;\r\n }", "public void setCount(int count)\n {\n this.count = count;\n }", "public void incrementRefusals() {\n\t}", "public void setCount(int count)\r\n {\r\n this.count = count;\r\n }", "public void setCount(int count) {\r\n this.count = count;\r\n }", "public void setTrials(int n){\n\t\tsuper.setTrials(1);\n\t}", "public void setNumOfConnections(int num) {\r\n\t\tnumOfConnections = num;\r\n\t}", "public void setCount(int newCount) {\r\n\t\tcount = newCount;\r\n\t}", "public void setNoOfRentals(int noOfRentals) {\n this.noOfRentals = noOfRentals;\n }", "public final void setRefCount (int n)\n {\n _refCount = n;\n }", "void setNumberOfArtillery(int artillery);", "public void setNumOpens(int n) {\r\n itersOpen = n;\r\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "public void setCount(int count) {\n this.count = count;\n }", "private void setArmCount(int armCount) {\n\n\t}", "public void setNumOfMenuItems(int _numOfMenuItems){\n numOfMenuItems = _numOfMenuItems;\n }", "void setCopies(short copies);", "public void setNumTasks(int n) {\n if (latch != null && latch.getCount() > 0) {\n throw new IllegalStateException(\"Method called during wait period\");\n }\n\n latch = new CountDownLatch(n);\n }", "public void setCount(final int count)\n {\n this.count = count;\n }", "@Override\n\tpublic TaskForUserOngoingRecord setNumRevives(Integer value) {\n\t\tsetValue(6, value);\n\t\treturn this;\n\t}", "public void setPrevCount(double n)\n {\n\n this.prevCount = n;\n }", "public void setCount(int count){\n\t\tthis.count = count;\n\t}", "public Builder setCount(int value) {\n \n count_ = value;\n onChanged();\n return this;\n }", "public void setCount(final int c) {\n\t\tcount = c;\n\t}", "public void setCount(Integer count) {\r\n this.count = count;\r\n }", "public void setSlotCount(int n) {\n mController.setSlotCount(n);\n }", "public final void setN(final int koko) {\r\n this.n = koko;\r\n }", "public void setBalls(int n){\r\n balls = n;\r\n }", "public void setNumDeparting() {\n if (isStopped() && !embarkingPassengersSet){\n \tRandom rand = new Random();\n \tint n = rand.nextInt(this.numPassengers+1);\n \tif (this.numPassengers - n <= 0) {\n \t\tthis.numPassengers = 0;\n n = this.numPassengers;\n \t} else {\n this.numPassengers = this.numPassengers - n;\n }\n trkMdl.passengersUnboarded(trainID, n);\n }\n \t//return 0;\n }", "public static void setCount(int aCount) {\n count = aCount;\n }", "public void resetCount() {\n\t\tresetCount(lineNode);\n\t}", "public void setCount(final int count) {\n this.count = count;\n }", "public void setArrowsInBody ( int count ) {\n\t\texecute ( handle -> handle.setArrowsInBody ( count ) );\n\t}", "public void setCount(Integer count) {\n this.count = count;\n }", "public void setCount(Integer count) {\n this.count = count;\n }", "public void setCount(Integer count) {\n this.count = count;\n }", "public void setCount(Integer count) {\n this.count = count;\n }", "public void setCount(Integer count) {\n this.count = count;\n }", "public void setCount(Integer count) {\n this.count = count;\n }", "void setNumberOfResults(int numberOfResults);", "public void setNumPoints(int np);", "void setChainInfo(String chainId, String chainName, int groupCount);", "private void setNoOfRows(int noOfRows) {\n this.noOfRows = noOfRows;\n }", "public Builder setNumOfChunks(int value) {\n \n numOfChunks_ = value;\n onChanged();\n return this;\n }", "public void setLength(int n){ // Setter method\n \n length = n; // set the class attribute (variable) radius equal to num\n }", "private void addChainLength(int len){\r\n maxChainLength = Math.max(maxChainLength, len);\r\n totalChainLengths += len;\r\n if (len > 0)\r\n totalInsertionsLookups++;\r\n }", "public void setNumConnections(int connections) {\n\t\tnumConnects = connections;\n\t}", "public void setNumsBaby (int count) {\n numsBaby = count;\n }", "public void setNumberOfSimulations(int nSimul){\n this.nMonteCarlo = nSimul;\n }", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "@Test\n public void setterInvocationIncrementsCounter() {\n\n final Knife knife1 = new ButterKnife();\n final Knife knife2 = new ButterKnife();\n final Knife knife3 = new ButterKnife();\n final Knife knife4 = new ButterKnife();\n\n final HairSplitter hairSplitter = new HairSplitter();\n\n assertEquals(0, hairSplitter.getNumberOfTimesSetKnifeCalled());\n\n hairSplitter.setKnife(knife1);\n\n assertEquals(1, hairSplitter.getNumberOfTimesSetKnifeCalled());\n\n hairSplitter.setKnife(knife2);\n hairSplitter.setKnife(knife3);\n\n assertEquals(3, hairSplitter.getNumberOfTimesSetKnifeCalled());\n\n hairSplitter.setKnife(knife4);\n assertEquals(4, hairSplitter.getNumberOfTimesSetKnifeCalled());\n }", "public void setCounter(int number){\n this.counter = number;\n }", "public void setNoOfTicket(String noOfTickets) {\n \r\n }", "public void setUpdateOften(int i){\n countNum = i;\n }", "public void setIterations(int iter) {\n\t\tnumIterations = iter;\n\t}", "public void setNumObjects(int x)\n\t{\n\t\tthis.numObjects = x;\n\t}", "public void SetNPoints(int n_points);", "void setNumberOfInstallments(java.math.BigInteger numberOfInstallments);", "public void setCount(int count) {\n\t\tthis.count = count;\n\t}", "public static void setNumberOfInputs(int _n)\r\n {\r\n numberOfInputs = _n;\r\n }", "public void setNumErode(int n) {\r\n itersErode = n;\r\n }", "public void setCount(final int count) {\n\t\t_count = count;\n\t}", "public abstract void setCntGrnd(int cntGrnd);", "public abstract void setCntOther(int cntOther);", "public void setCount(XPath v)\n {\n m_countMatchPattern = v;\n }", "void setNumberOfInfantry(int infantry);", "public void restoreToCount(int restoreCount) {\n\t\t\n\t}", "public void setDesiredCount(Integer desiredCount) {\n this.desiredCount = desiredCount;\n }", "public void setNRetries(int nRetries) {\n\t\tthis.nRetries = nRetries;\n\t}", "public void setCounter(int value) { \n\t\tthis.count = value;\n\t}", "public void setCounterpart(Node n)\n\t{\n\t\tcounterpart = n;\n\t}", "public void setDependencyCount(int count) {\n dependencyCount = count;\n }", "public void incrementNumAbandonRequests() {\n this.numAbandonRequests.incrementAndGet();\n }", "public int getNbResets()\n {\n return nbResets;\n }", "void setLength(int length);", "public void setSteak(double countNo) {\n steak = countNo;\r\n }", "public void incrementNumModifyRequests() {\n this.numModifyRequests.incrementAndGet();\n }", "public void setNumStochEventSetRealizations(int numRealizations);", "@Override\r\n\tpublic void setSequenceSize(int x) {\n\t\tsizeNum = x;\r\n\t\tupdate();\r\n\t}", "public Builder setRepeatCount(int value) {\n\n repeatCount_ = value;\n bitField0_ |= 0x00000004;\n onChanged();\n return this;\n }", "public void setNumOfCarbons(Integer numOfCarbons) {\n this.numOfCarbons = numOfCarbons;\n }", "public void setCount(int count) {\n\t\t\tthis.count = count;\n\t\t}", "public void setNumRetries(int numRetries) {\n\t\tif(numRetries < 0) {\n\t\t\tthrow new IllegalArgumentException(\"Retries should not be negative\");\n\t\t}\n\t\tthis.numRetries = numRetries;\n\t}" ]
[ "0.65016085", "0.65016085", "0.6478591", "0.64295596", "0.64272344", "0.6408367", "0.63855004", "0.6313875", "0.62949514", "0.6208281", "0.6208281", "0.6208281", "0.62055343", "0.6176179", "0.6081703", "0.6073571", "0.6066062", "0.60638237", "0.6047404", "0.60408545", "0.6038817", "0.6009793", "0.6005915", "0.5991176", "0.5986424", "0.596616", "0.59340805", "0.59340805", "0.59340805", "0.59340805", "0.59340805", "0.5931121", "0.5923812", "0.5916742", "0.59036446", "0.590138", "0.58904225", "0.58727545", "0.5865517", "0.58318937", "0.5826135", "0.58255804", "0.5817832", "0.581577", "0.581262", "0.5786285", "0.5744944", "0.57405484", "0.57386374", "0.57356185", "0.57351077", "0.57351077", "0.57351077", "0.57351077", "0.57351077", "0.57351077", "0.5732336", "0.57308406", "0.57268924", "0.5717615", "0.5707012", "0.5705022", "0.5697511", "0.5692832", "0.5686867", "0.5686019", "0.5670187", "0.56692606", "0.5668292", "0.56677866", "0.5667383", "0.5649599", "0.56478006", "0.56295866", "0.5615675", "0.561073", "0.5575266", "0.5567054", "0.5566809", "0.55649626", "0.55636805", "0.5562185", "0.5559185", "0.5551291", "0.5539099", "0.55361193", "0.5530337", "0.5510702", "0.5510538", "0.5507184", "0.55066025", "0.55037504", "0.5500996", "0.54942334", "0.5491824", "0.5491261", "0.54872066", "0.5486972", "0.54864967", "0.5482348" ]
0.7050017
0
Gets the number of restraunts
public int getNumberOfRestraunts(){ return numberOfRestraunts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getReaultCount();", "public int getReaultCount() {\n return reault_.size();\n }", "public int countRess()\n {\n int nbRess = 0;\n pw.println(13);\n try\n {\n nbRess = Integer.parseInt(bis.readLine()) ;\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n return nbRess ;\n }", "public int getTotRuptures();", "public int getReaultCount() {\n if (reaultBuilder_ == null) {\n return reault_.size();\n } else {\n return reaultBuilder_.getCount();\n }\n }", "public int size(){\n\t\tListUtilities start = this.returnToStart();\n\t\tint count = 1;\n\t\twhile(start.nextNum != null){\n\t\t\tcount++;\n\t\t\tstart = start.nextNum;\n\t\t}\n\t\treturn count;\n\t}", "public int numberOfOccorrence();", "public abstract int getCntRod();", "public int rodCount ();", "public static int getNrReservas() {\r\n\t\tint reservas = 0;\r\n\t\tString sql=\"select count(*) as reservas from reserva;\";\r\n\r\n\t\ttry {\r\n\t\t\tConnection conn=singleton.getConnector().getConnection();\r\n\t\t\tPreparedStatement stat=conn.prepareStatement(sql);\r\n\t\t\tResultSet utils=stat.executeQuery();\r\n\t\t\twhile(utils.next()) {\r\n\t\t\t\treservas = utils.getInt(\"reservas\");\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn reservas;\r\n\t}", "public int getCount()\r\n {\r\n int answer=0;\r\n answer+=recCount(root);\r\n return answer;\r\n }", "public int numberOfTires() {\n int tires = 4;\n return tires;\n }", "int getAoisCount();", "int getCazuriCount();", "public int get_count();", "int getRealtorNumCnt(RealtorDTO realtorDTO);", "public int getNumTimes();", "@Override\r\n\tpublic int getNumberOfNodes() {\r\n\t\tint contador = 0;// Contador para el recursivo\r\n\t\treturn getNumberOfNodesRec(contador, raiz);\r\n\t}", "public int getRecCnt () {\n return (getRecCnt(\"1=1\"));\n }", "public int anzahlRundenziel() {\n // TODO: eine Seite aufsetzen mit Informationen zur Datenbank\n // TODO: Anzahl der Einträge pro Tabelle\n int nReturn = 0;\n final Cursor c = mDb.getReadableDatabase().rawQuery(\n \"select count(*) from \" + RundenZielTbl.TABLE_NAME,\n null);\n if (!c.moveToFirst()) {\n Log.d(TAG, \"anzahlRundenziel(): Kein Rundenziel gespeichert\");\n nReturn = 0;\n } else {\n nReturn = c.getInt(0);\n }\n c.close();\n return nReturn;\n }", "long getRecipesCount();", "int getInCount();", "int getRefundToCount();", "public int count() throws TrippiException {\n try {\n int n = 0;\n while (hasNext()) {\n next();\n n++;\n }\n return n;\n } finally {\n close();\n }\n }", "public int obtenerNumeroFacturas(){\n return historialFacturas.size();\n }", "int getRequestsCount();", "int getRequestsCount();", "int getEntryCount();", "public int lireCount() {\n\t\treturn cpt;\n\t}", "Long getNumberOfElement();", "public int getNumRoads() {\n \t\treturn roads.size();\n \t}", "public int countOfGenerations ();", "int getSnInfoCount();", "int getSnInfoCount();", "int getSnInfoCount();", "int getTotalCount();", "public long count() {\n\t\treturn 0;\n\t}", "public long count() {\n\t\treturn 0;\n\t}", "public int count() {\n\t\treturn count;\n\t}", "int getNumberOfResults();", "long getRequestsCount();", "public int count() {\r\n return count;\r\n }", "private int numeroCuentas() {\r\n\t\tint cuentasCreadas = 0;\r\n\t\tfor (Cuenta cuenta : this.cuentas) {\r\n\t\t\tif (cuenta != null) {\r\n\t\t\t\tcuentasCreadas++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn cuentasCreadas;\r\n\t}", "int getLinksCount();", "public int totalNum(){\n return wp.size();\n }", "public int calculerKgsNourritureParJour(){\r\n\t\treturn noms.size() * 10;\r\n\t}", "int getDataScansCount();", "public int getNumberOfEntries();", "public int getNumGruppoPacchetti();", "int getUniqueNumbersCount();", "public int getNumTrials() \n {\n return cumulativeTrials; \n }", "public int getCount(){\n int c = 0;\n for(String s : this.counts){\n c += Integer.parseInt(s);\n }\n return c;\n }", "int getStatsCount();", "int getStatsCount();", "int getStatsCount();", "public int count() {\n return count;\n }", "public final int count() {\n\t\tCountFunction function = new CountFunction();\n\t\teach(function);\n\t\treturn function.getCount();\n\t}", "int NoOfNodes() {\r\n return noOfNodes;\r\n }", "public Integer count() {\n\t\tif(cache.nTriples != null)\n\t\t\treturn cache.nTriples;\n\t\treturn TripleCount.count(this);\n\t}", "int getRefsCount();", "public int getSubstanceLotNumberReps() {\r\n \treturn this.getReps(15);\r\n }", "int findCount();", "public int getNbResets()\n {\n return nbResets;\n }", "public int countResults() \n {\n return itsResults_size;\n }", "int getBlockNumbersCount();", "int getNumberOfArtillery();", "public int getTotalCount() {\r\n return root.getTotalCount();\r\n }", "public int getNumRecipes()\n {\n return _recipes.size();\n }", "public int getRunCount() {\n return runCount;\n }", "Integer count();", "Integer count();", "public int numRanked() {\n\t\tint count = 0;\n\t\tfor(int index = 0; index < NUM_DECADES; index++) {\n\t\t\tif(rank.get(index) != UNRANKED) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}", "public long getNumberOfPatternOccurrences() {\n if(!hasFinished()) {\n throw new IllegalArgumentException(\"the recompression is not jet ready.\");\n }\n\n S terminal = slp.get(getPattern().getLeft(), 1);\n return getPatternOccurrence(terminal).get(getText());\n }", "protected short getCount() \r\n {\r\n // We could move this to the individual implementing classes\r\n // so they have their own count\r\n synchronized(AbstractUUIDGenerator.class) \r\n {\r\n if (counter < 0)\r\n {\r\n counter = 0;\r\n }\r\n return counter++;\r\n }\r\n }", "public int rent() {\n\t\treturn 0;\n\t}", "int getNumOfRetrievelRequest();", "int getNumOfRetrievelRequest();", "public int getSkoreCount() {\n \tString countQuery = \"SELECT * FROM \" + \"skore\";\n \tSQLiteDatabase db = this.getReadableDatabase();\n \tCursor cursor = db.rawQuery(countQuery, null);\n \tint count = cursor.getCount(); //added line here\n \t\n \tcursor.close(); \t\n \tdb.close();\n \t\n \treturn count;\n }", "@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 size() {\n int counter = 1;\n Lista iter = new Lista(this);\n while (iter.next != null) {\n iter = iter.next;\n counter += 1;\n }\n return counter;\n }", "public int getNumResources() {\n \t\tint count = 0;\n \t\tfor (int i = 0; i < resources.length; i++)\n \t\t\tcount += resources[i];\n \n \t\treturn count;\n \t}", "public int getLength()\n\t{\n\t\tDNode tem=first;\n\t\tint length=0;\n\t\twhile(tem.nextDNode!=null)\n\t\t{\n\t\t\tlength=length+1;\n\t\t\ttem=tem.nextDNode;\n\t\t}\n\t\tif(first!=null)\n\t\t\tlength=length+1;\n\t\treturn length;\n\t}", "int getTrucksCount();", "int getDocumentCount();", "@Override\n\tpublic int religioncount() throws Exception {\n\t\treturn dao.religioncount();\n\t}", "public int getNSteps() {\n //if (mCovered == null) {\n //return 0;\n //}\n return mCovered.length;\n }", "public int size()\n {\n Node n = head.getNext();\n int count = 0;\n while(n != null)\n {\n count++; \n n = n.getNext();\n }\n return count;\n }", "public int getOCCURSNR() {\n return occursnr;\n }", "public int getCount() {\n\t\t\tcantidadGrupos = extras.getInt(\"cantidadGrupos\");\n\t\t\treturn cantidadGrupos;\n\t\t}", "int getReqCount();", "public int getNumberOfEntries()\r\n\t{\r\n\t\treturn tr.size();\r\n\t}", "public int count();", "public int count();", "public int count();", "public int count();", "int getNodesCount();", "int getNodesCount();", "public double getNumberOfPayloadRepetitions() {\n\t\tdouble repetitionDelay = workloadConfiguration.getRepetitionDelay();\n\t\tdouble duration = workloadConfiguration.getDuration();\n\t\tdouble numberOfRepetitions = 1;\n\n\t\tif (numberOfRepetitions < (duration / repetitionDelay)) {\n\t\t\tnumberOfRepetitions = (duration / repetitionDelay);\n\t\t}\n\n\t\treturn numberOfRepetitions;\n\t}", "public int numberOfEntries();", "int getDonatoriCount();" ]
[ "0.8110663", "0.77775323", "0.76689684", "0.7610208", "0.75422704", "0.7289958", "0.7266131", "0.7165154", "0.71020323", "0.70649254", "0.70646566", "0.70305276", "0.699845", "0.6988184", "0.6980387", "0.69728374", "0.6964928", "0.69443756", "0.69440895", "0.6901974", "0.68750906", "0.6840489", "0.6837808", "0.68253475", "0.68251747", "0.679828", "0.679828", "0.67872554", "0.67810255", "0.6769302", "0.67565", "0.6737144", "0.67267114", "0.67267114", "0.67267114", "0.67187774", "0.6696898", "0.6696898", "0.66788673", "0.6674979", "0.66626024", "0.66507083", "0.663784", "0.6634677", "0.66342336", "0.6631017", "0.6626408", "0.66237783", "0.6621465", "0.6608085", "0.66027045", "0.660203", "0.6601179", "0.6601179", "0.6601179", "0.6600627", "0.6576984", "0.6565078", "0.6560028", "0.6557475", "0.6540688", "0.6535221", "0.6524126", "0.6519532", "0.65175086", "0.6515178", "0.65087044", "0.6507163", "0.64999986", "0.6498351", "0.6498351", "0.6498322", "0.64928436", "0.6492079", "0.6490401", "0.64857584", "0.64857584", "0.6481361", "0.6480353", "0.647998", "0.64777887", "0.64771867", "0.6469089", "0.64636093", "0.6458862", "0.6456177", "0.64510316", "0.6449814", "0.6448331", "0.64429396", "0.6441659", "0.64411765", "0.64411765", "0.64411765", "0.64411765", "0.644105", "0.644105", "0.6436992", "0.6435607", "0.6434732" ]
0.74339855
5
sets the resturant's cuisine
public void setCuisine(String _cuisine){ cuisine = _cuisine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCuisine(){\n return cuisine;\n }", "public void setCuota(double cuota) {\n this.cuota = cuota;\n }", "public void setCrust(){\n this.crust = \"Thin\";\n }", "public void setCouleur(int pCouleur) {\t\r\n\t\tif (configuration.getJeu() == 'R') {\r\n\t\t\tthis.couleur = 10;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tthis.couleur = pCouleur;\r\n\t\t}\r\n\t}", "public void setCouleur(int pCouleur) {\r\n\t\tthis.couleur = pCouleur;\r\n\t\twriteSavedFile();\r\n\t}", "public void setCouleur(String couleur) {\n\t\tthis.couleur = couleur;\n\t}", "public int getCuisineID() {\n return cuisineID;\n }", "public void setCostume(int newCostumeNumber) {\n costumeNumber=newCostumeNumber;\n }", "public void setCuerdas(int cuerdas){\n\tthis.cuerdas = cuerdas;\n }", "public void setCuentaContableCierre(CuentaContable cuentaContableCierre)\r\n/* 103: */ {\r\n/* 104:119 */ this.cuentaContableCierre = cuentaContableCierre;\r\n/* 105: */ }", "@Override\n\tpublic void setRestaurant(RestaurantChung restaurant) {\n\t\t\n\t}", "void setOccupier(PRColor color) {\n c = color;\n }", "public void setCuadrícula(Número[][] cuad) {\r\n\t\tthis.cuadrícula=cuad;\r\n\t}", "public void setRuc(String ruc) {\n this.ruc = ruc;\n }", "public void setCorn(String corn) {\n this.corn = corn;\n }", "public void setClanarina(Clanarina clanarina) {\n this.clanarina = clanarina;\n }", "@Override\r\n\tpublic void setRedondez(int redondez) {\n\r\n\t}", "void setCit(java.lang.String cit);", "public void changeCostumeRight(){\n if(costume == 3){\n costume = 0;\n }\n else{\n costume ++;\n }\n Locker.updateCostume(costume);\n PrefLoader.updateFile();\n\n }", "public void niveauSuivant() {\n niveau = niveau.suivant();\n }", "public Cab() {\r\n fare = 50;\r\n }", "public void vlozNaUcet(int ciastka, TerminovanyUcet terminovanyUcet) {\r\n\t\tcislo += ciastka;\r\n\t\tterminovanyUcet.setVklad(ciastka);\r\n\t\tSporiaciUcet.super.setVyber(ciastka);\r\n\t}", "public String getCorn() {\n return corn;\n }", "public Cesta() {\n\t\tthis.cima = null;\n\t}", "public void setCicerone(String username) {\n this.itineraryCicerone.setText(username);\n }", "public String getCouleur() {\n\t\treturn this.couleur;\n\t}", "@Override\n\tpublic void setNewCaloryIntake(String calorie) {\n\t\tcom.fitmi.utils.Constants.homeCaloryIntake.setText(calorie);\n\t\tString calorieTotal = com.fitmi.utils.Constants.foodcalorieText\n\t\t\t\t.getText().toString();\n\t\tint remainCalory = (Integer.parseInt(calorie) - Integer\n\t\t\t\t.parseInt(calorieTotal));\n\t\tcom.fitmi.utils.Constants.remainCaloryBurn.setText(remainCalory + \"\");\n\t}", "public void setColor(final String culoare, final int opacitate,\n final int dont, final int need) {\n this.contur = new ColorLevel(culoare, opacitate);\n }", "public void setCirculations()\r\n {\r\n circulations++;\r\n }", "public char getCouleur(){\t\n\t\treturn couleur;\n\t}", "public void setCuentaContable(CuentaContable cuentaContable)\r\n/* 83: */ {\r\n/* 84:103 */ this.cuentaContable = cuentaContable;\r\n/* 85: */ }", "public void setCxcleunik(int cxcleunik) {\r\r\r\r\r\r\r\n this.cxcleunik = cxcleunik;\r\r\r\r\r\r\r\n }", "public void setCuenta(String cuenta) {\r\n this.cuenta = cuenta;\r\n }", "public void setCoor(Account coor) {\r\n this.coor = coor;\r\n }", "public void riconnetti() {\n\t\tconnesso = true;\n\t}", "void setCor(Color cor);", "public Rainha(Casa casa, CorDaPeca cor)\n {\n // public static final int RAINHA = 3;\n super(casa, TipoDaPeca.RAINHA, cor);\n \n }", "public void azzera() { setEnergia(0.0); }", "public String getCouleur() {\n return this.COULEUR;\n }", "public String getCouleur() {\n return this.COULEUR;\n }", "public Carrot() {\n\t\tadjustHunger = -40.0;\n\t\tadjustThirst = -10.0;\n\t\tcost = 4.55;\n\t\tname = \"Carrot\";\n\t}", "public void setCuentaContable(CuentaContable cuentaContable)\r\n/* 304: */ {\r\n/* 305:371 */ this.cuentaContable = cuentaContable;\r\n/* 306: */ }", "public void substituiCanal(int canal) {\n tv.setCanal(canal);\n }", "public void setRutBeneficiario(int rutBeneficiario) {\n this.rutBeneficiario = rutBeneficiario;\n }", "void set(int c, int r, Piece v) {\n set(c, r, v, null);\n }", "public Casual(Town p, int r, int c) {\n\t\tsuper(p,r,c);\n\t}", "public cajero(cuentaCorriente cuenta, boolean ingresa) {\n this.cuenta = cuenta;\n this.ingresa = ingresa;\n }", "public void setRua(String rua) {// Altera o nome da rua.\r\n\t\tthis.rua = rua;\r\n\t}", "public void setCuenta(String cuenta) {\n\t\tthis.cuenta = cuenta;\n\t}", "public void setEstadoCuadre(es.gob.agenciatributaria.www2.static_files.common.internet.dep.aplicaciones.es.aeat.ssii.fact.ws.SuministroInformacion_xsd.EstadoCuadreType estadoCuadre) {\r\n this.estadoCuadre = estadoCuadre;\r\n }", "public void enfoncerChiffre(int c) {\n\t\tif (raz) {\n\t\t\tthis.valC = 0;\n\t\t}\n\t\tif (this.valC == 0) {\n\t\t\tthis.valC = c;\n\t\t\tthis.raz = false;\n\n\t\t}\n\t\telse {\n\t\t\tthis.valC = (this.valC * 10) + c;\n\t\t\tthis.raz = false;\n\t\t}\n\t}", "public void setRua(String rua) {this.rua = rua;}", "public Stato getStatoCorrente()\r\n\t{\r\n\t\treturn corrente;\r\n\t}", "public Builder setCazuri(\n int index, teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil value) {\n if (cazuriBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureCazuriIsMutable();\n cazuri_.set(index, value);\n onChanged();\n } else {\n cazuriBuilder_.setMessage(index, value);\n }\n return this;\n }", "public void setObstaculo(int avenida, int calle);", "private void setIncognito()\n\t{\n\t\t\teToPower.setBackground (black);\n\t\t\ttwoPower.setBackground (black);\n\t\t\tln.setBackground (black);\n\t\t\txCube.setBackground (black);\n\t\t\txSquare.setBackground (black);\n\t\t\tdel.setBackground (black);\n\t\t\tcubeRoot.setBackground (black);\n\t\t\tC.setBackground (black);\n\t\t\tnegate.setBackground (black);\n\t\t\tsquareRoot.setBackground (black);\n\t\t\tnine.setBackground (black);\n\t\t\teight.setBackground (black);\n\t\t\tseven.setBackground (black);\n\t\t\tsix.setBackground (black);\n\t\t\tfive.setBackground (black);\n\t\t\tfour.setBackground (black);\n\t\t\tthree.setBackground (black);\n\t\t\ttwo.setBackground (black);\n\t\t\tone.setBackground (black);\n\t\t\tzero.setBackground (black);\n\t\t\tdivide.setBackground (black);\n\t\t\tpercent.setBackground (black);\n\t\t\tmultiply.setBackground (black);\n\t\t\treciprocal.setBackground (black);\n\t\t\tadd.setBackground (black);\n\t\t\tsubtract.setBackground (black);\n\t\t\tdecimalPoint.setBackground (black);\n\t\t\tequals.setBackground (black);\n\t\t\te.setBackground (black);\n\t\t\tPI.setBackground (black);\n\t\t\t\n\t\t\teToPower.setForeground (white);\n\t\t\ttwoPower.setForeground (white);\n\t\t\tln.setForeground (white);\n\t\t\txCube.setForeground (white);\n\t\t\txSquare.setForeground (white);\n\t\t\tdel.setForeground (white);\n\t\t\tcubeRoot.setForeground (white);\n\t\t\tC.setForeground (white);\n\t\t\tnegate.setForeground (white);\n\t\t\tsquareRoot.setForeground (white);\n\t\t\tnine.setForeground (white);\n\t\t\teight.setForeground (white);\n\t\t\tseven.setForeground (white);\n\t\t\tsix.setForeground (white);\n\t\t\tfive.setForeground (white);\n\t\t\tfour.setForeground (white);\n\t\t\tthree.setForeground (white);\n\t\t\ttwo.setForeground (white);\n\t\t\tone.setForeground (white);\n\t\t\tzero.setForeground (white);\n\t\t\tdivide.setForeground (white);\n\t\t\tpercent.setForeground (white);\n\t\t\tmultiply.setForeground (white);\n\t\t\treciprocal.setForeground (white);\n\t\t\tadd.setForeground (white);\n\t\t\tsubtract.setForeground (white);\n\t\t\tdecimalPoint.setForeground (white);\n\t\t\tequals.setForeground (white);\n\t\t\te.setForeground (white);\n\t\t\tPI.setForeground (white);\n\t\t\t\t\t\n\t\t\tentry.setBackground (black);\n\t\t\tentry.setForeground(white);\n\n\t\t\tmenuBar.setBackground(black);\n\t\t\tmenuBar.setForeground(white);\n\t\t\tfileMenu.setForeground(white);\n\t\t\thelpMenu.setForeground (white);\n\t\t\ttoolsMenu.setForeground(white);\n\t\t\t\n\t\t\texit.setBackground(black);\n\t\t\tsettings.setBackground(black);\n\t\t\treadme.setBackground(black);\n\t\t\tabout.setBackground(black);\n\t\t\t\t\t\t\n\t\t\texit.setForeground(white);\n\t\t\tsettings.setForeground(white);\n\t\t\treadme.setForeground(white);\n\t\t\tabout.setForeground(white);\n\t}", "public ContaCorrente getContaCorrente() {\r\n return contaCorrente;\r\n }", "private void setChinaColor(int color) {\n //2 for green, 1 for blue, 3 for red\n if(smdtManager != null)\n { smdtManager.smdtSetExtrnalGpioValue (1,false);\n smdtManager.smdtSetExtrnalGpioValue (2,false);\n smdtManager.smdtSetExtrnalGpioValue (3,false);\n\n smdtManager.smdtSetExtrnalGpioValue (color,true);\n }\n }", "public void setClan(final Clan clan) {\n if (_clan != null && _clan != clan) {\n playerVariables.remove(PlayerVariables.CAN_WAREHOUSE_WITHDRAW);\n }\n\n final Clan oldClan = _clan;\n if (oldClan != null && clan == null) {\n getAllSkills().stream().filter(skill -> skill.getEntryType() == SkillEntryType.CLAN).forEach(skill -> {\n removeSkill(skill, false);\n });\n }\n\n _clan = clan;\n\n if (clan == null) {\n _pledgeType = Clan.SUBUNIT_NONE;\n _pledgeClass = 0;\n _powerGrade = 0;\n _apprentice = 0;\n getInventory().validateItems();\n return;\n }\n\n if (!clan.isAnyMember(getObjectId())) {\n setClan(null);\n if (!isNoble()) {\n setTitle(\"\");\n }\n }\n }", "public void setBackgroundColor(Color nuovo_sfondocolore)\n {\n \tboolean bo = informaPreUpdate();\n sfondocolore = nuovo_sfondocolore;\n\t\tinformaPostUpdate(bo);\n }", "public void setRestitution(float restitution) {\n constructionInfo.restitution = restitution;\n rBody.setRestitution(restitution);\n }", "public void setCena(double cena) {\r\n\t\tthis.cena = cena;\r\n\t}", "public void setC(Color c) {\n\t\tthis.c = c;\n\t}", "private void setCC(int CC) {\n\t\tCMN.CC = CC;\n\t}", "public void setCastraveti(int castraveti) {\n\t\tthis.castraveti = castraveti;\n\t}", "public void setCouncil(String council) {\n this.council = council;\n }", "public void setCor(String cor) {\r\n this.cor = cor;\r\n }", "public static void SetCenter(int center) //set the center fret when needed\n\t{\n\t\tif(center==0)\n\t\t\tSfret=Efret=Center=1;\n\t\tif(center==15)\n\t\t\tSfret=Efret=Center=14;\n\t}", "public void setReceveur(int receveur) {\r\n\t\tthis.receveur = receveur;\r\n\t}", "public void setUserC( String userC )\n {\n this.userC = userC;\n }", "public void setCusUid(Integer cusUid) {\r\n this.cusUid = cusUid;\r\n }", "private void soigne(EtreVivant vivants) {\n setVirus(Virus.Rien);\n this.changeEtat(EtatEtreVivant.SAIN);\n }", "public boolean setRacun(Racun racun){ // info da li je racun postavljen uspesno\n if(this.racun!=null){\n System.out.println(\"za osobu \"+this.ime+ \" je vec registrovan racun.\");\n return false;\n }\n this.racun=racun; //this->return\n return true;\n }", "public void enfoncerRaz() {\n\t\tthis.valC = 0;\n\t\tthis.op = null;\n\t}", "public ChessJoueurHumain(Couleur couleur) {\n super(couleur);\n }", "public void setC(String units,float value){\r\n\t\t//this.addChild(new PointingMetadata(\"lat\",\"\"+latitude));\r\n\t\tthis.setFloatField(\"c\", value);\r\n\t\tthis.setUnit(\"c\", units);\r\n\t}", "public void setRestaurant(Restaurant restaurant) {\n this.restaurant = restaurant;\n }", "public CitronellaAnt(){\n\t\tsuper(\"Citronella Ant\", AntCost.CITRONELLA_ANT);\n\t\tsuper.setLife(20);\n\t}", "public void crearClase() {\r\n\t\tsetClase(3);\r\n\t\tsetTipoAtaque(3);\r\n\t\tsetArmadura(15);\r\n\t\tsetModopelea(0);\r\n\t}", "public double getCuota() {\n return cuota;\n }", "public void setColor()\n {\n if(eyeL != null) // only if it's painted already...\n {\n eyeL.changeColor(\"yellow\");\n eyeR.changeColor(\"yellow\");\n nose.changeColor(\"green\");\n mouthM.changeColor(\"red\");\n mouthL.changeColor(\"red\");\n mouthR.changeColor(\"red\");\n }\n }", "@Override\n public void curar(Curandero curandero, Pieza receptor) {\n }", "public void turnoSuccessivo(int lancioCorrente) {\n }", "public void setCR(int cR)\r\n/* 44: */ {\r\n/* 45: 44 */ this.CR = cR;\r\n/* 46: */ }", "private void setCurrSector ()\r\n\t{\r\n\t\tdouble rotTime = config.getRotTime();\r\n\t\tdouble rotPct = (double)(this.simTime % (long)rotTime) / rotTime;\r\n\t\tthis.sector = (int)Math.round(rotPct * config.getSectors());\r\n\t}", "@Override\n public void setTestUnit() {\n sorcererAnima = new Sorcerer(50, 2, field.getCell(0, 0));\n }", "public void setCoordinateur(Coordinateur monCoordinateur) {\n\t\t\n\t}", "@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}", "public void setConc(double c) {\t\t\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) quantity[i][j][k] = c*boxVolume;\r\n\t}", "public void cambiaUfos() {\n cambiaUfos = true;\n }", "private void setCurrentRadius(double r){\n\t\t\n\t\t_currentRadius = r;\n\t\t\n\t}", "public SeaUrchin()\n {\n speed = Greenfoot.getRandomNumber(2) +1;\n setRotation(Greenfoot.getRandomNumber(360)); \n }", "public void setAcideAmine(String codon) {\n switch (codon) {\n \n case \"GCU\" :\n case \"GCC\" :\n case \"GCA\" :\n case \"GCG\" : \n this.acideAmine = \"Alanine\";\n break;\n case \"CGU\" :\n case \"CGC\" :\n case \"CGA\" :\n case \"CGG\" :\n case \"AGA\" :\n case \"AGG\" :\n this.acideAmine = \"Arginine\";\n break;\n case \"AAU\" :\n case \"AAC\" :\n this.acideAmine = \"Asparagine\";\n break;\n case \"GAU\" :\n case \"GAC\" :\n this.acideAmine = \"Aspartate\";\n break;\n case \"UGU\" :\n case \"UGC\" :\n this.acideAmine = \"Cysteine\";\n break;\n case \"GAA\" :\n case \"GAG\" :\n this.acideAmine = \"Glutamate\";\n break;\n case \"CAA\" :\n case \"CAG\" :\n this.acideAmine = \"Glutamine\";\n break;\n case \"GGU\" :\n case \"GGC\" :\n case \"GGA\" :\n case \"GGG\" :\n this.acideAmine = \"Glycine\";\n break;\n case \"CAU\" :\n case \"CAC\" :\n this.acideAmine = \"Histidine\";\n break;\n case \"AUU\" :\n case \"AUC\" :\n case \"AUA\" :\n this.acideAmine = \"Isoleucine\";\n break;\n case \"UUA\" :\n case \"UUG\" :\n case \"CUU\" :\n case \"CUC\" :\n case \"CUA\" :\n case \"CUG\" :\n this.acideAmine = \"Leucine\";\n break;\n case \"AAA\" :\n case \"AAG\" :\n this.acideAmine = \"Lysine\";\n break;\n case \"AUG\" :\n this.acideAmine = \"Methionine\";\n break;\n case \"UUU\" :\n case \"UUC\" :\n this.acideAmine = \"Phenylalanine\";\n break;\n case \"CCU\" :\n case \"CCC\" :\n case \"CCA\" :\n case \"CCG\" :\n this.acideAmine = \"Proline\";\n break;\n case \"UAG\" :\n this.acideAmine = \"Pyrrolysine\";\n break;\n case \"UGA\" :\n this.acideAmine = \"Selenocysteine\";\n break;\n case \"UCU\" :\n case \"UCC\" :\n case \"UCA\" :\n case \"UCG\" :\n case \"AGU\" :\n case \"AGC\" :\n this.acideAmine = \"Serine\";\n break;\n case \"ACU\" :\n case \"ACC\" :\n case \"ACA\" :\n case \"ACG\" :\n this.acideAmine = \"Threonine\";\n break;\n case \"UGG\" :\n this.acideAmine = \"Tryptophane\";\n break;\n case \"UAU\" :\n case \"UAC\" :\n this.acideAmine = \"Tyrosine\";\n break;\n case \"GUU\" :\n case \"GUC\" :\n case \"GUA\" :\n case \"GUG\" :\n this.acideAmine = \"Valine\";\n break;\n case \"UAA\" :\n this.acideAmine = \"Marqueur\";\n break;\n }\n }", "public void setCoste(@NotNull String coste) {\n this.coste = coste;\n }", "public void afficher()\n\t{\n\t\tSystem.out.println(\"Centre du cercle en \" + getPosX() + \", \" + getPosY());\n\t\tSystem.out.println(\"Rayon : \" + getRayon());\n\t}", "private void resetLexeme(){\n\t\tcola = \"\";\n\t}", "public void makeCyan() {\n lastHit = System.currentTimeMillis();\n isCyan = true;\n ((Geometry)model.getChild(\"Sphere\")).getMaterial().setColor(\"Color\", ColorRGBA.Cyan);\n }", "public void setCse(CrossSectionElement cse) {\r\n\t\tthis.crossSectionElement = cse;\r\n\t}", "@Test\n public void testSetPourcentage() {\n \n assertEquals(0.0,soin3.getPourcentage(),0.01);\n soin3.setPourcentage(0.7);\n assertEquals(0.7,soin3.getPourcentage(),0.01);\n }", "public TileTurbineDynamoCoil() {\n\t\tsuper();\n\t}" ]
[ "0.64878434", "0.6302685", "0.62218326", "0.6199986", "0.5987112", "0.58872396", "0.5723605", "0.56754476", "0.56512254", "0.56181157", "0.56042206", "0.5519001", "0.5518196", "0.54831314", "0.54768336", "0.5466855", "0.53695166", "0.534453", "0.5334453", "0.53165114", "0.5311689", "0.530516", "0.52860796", "0.5267275", "0.5246898", "0.52141124", "0.5213331", "0.521262", "0.5198438", "0.51763535", "0.51582605", "0.5143805", "0.51384574", "0.5134671", "0.5128757", "0.51272875", "0.51146704", "0.5108619", "0.5108198", "0.5108198", "0.5102484", "0.5101701", "0.5095286", "0.5090858", "0.50893587", "0.5089138", "0.508221", "0.5079916", "0.5079282", "0.5076016", "0.5061975", "0.5045993", "0.50418234", "0.50346494", "0.5028217", "0.50241846", "0.50186217", "0.5014839", "0.50130606", "0.5007575", "0.5002372", "0.5001298", "0.5001077", "0.49931392", "0.49868757", "0.4984776", "0.4978581", "0.4971238", "0.4962074", "0.49492064", "0.49472427", "0.49472266", "0.49314862", "0.49257305", "0.49187264", "0.49172926", "0.4915389", "0.4914946", "0.49077797", "0.4907428", "0.49007615", "0.48996738", "0.48976275", "0.48966494", "0.48951375", "0.4894557", "0.4891346", "0.48872", "0.48855925", "0.48848784", "0.48828885", "0.4881177", "0.488061", "0.4871377", "0.48703238", "0.48694915", "0.48663813", "0.48661125", "0.4865739", "0.48645437" ]
0.7321246
0
gets the resturant's cuisine
public String getCuisine(){ return cuisine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getCuisineID() {\n return cuisineID;\n }", "public void setCuisine(String _cuisine){\n cuisine = _cuisine;\n }", "public String getCorn() {\n return corn;\n }", "public String getCouleur() {\n\t\treturn this.couleur;\n\t}", "public String getCouleur() {\n return this.COULEUR;\n }", "public String getCouleur() {\n return this.COULEUR;\n }", "public char getCouleur(){\t\n\t\treturn couleur;\n\t}", "public Image getCorazon ( ) {\n\t\tswitch ( vida ) {\n\t\tcase 0 :\n\t\t\treturn sinVida;\n\t\tcase 1:\n\t\t\treturn cuartoDeVida;\n\t\tcase 2:\n\t\t\treturn mitadVida;\n\t\tcase 3:\n\t\t\treturn tresCuartos;\n\t\tcase 4:\n\t\t\treturn fullVida;\n\t\tdefault:\n\t\t\treturn sinVida;\n\t\t}\n\t}", "@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}", "public double getCuota() {\n return cuota;\n }", "java.lang.String getCit();", "public String getCurp(){\r\n return beneficiario[0].toString();\r\n }", "public ContaCorrente getContaCorrente() {\r\n return contaCorrente;\r\n }", "public Cinema getCinema() {\n return this.cinema;\n }", "public BigDecimal getCouid() {\n return couid;\n }", "public Stato getStatoCorrente()\r\n\t{\r\n\t\treturn corrente;\r\n\t}", "public int getCxcleunik() {\r\r\r\r\r\r\r\n return cxcleunik;\r\r\r\r\r\r\r\n }", "public String getCouseName() {\n return couseName;\n }", "int getCoorY();", "int getCoorX();", "public static String getCuenta() {\r\n return cuenta;\r\n }", "public Account getCoor() {\r\n return coor;\r\n }", "public int getCuerdas(){\n\treturn this.cuerdas;\n }", "String getArcrole();", "int getCedula();", "int getC();", "public Couleur obtenirCouleurInverse()\n\t{\n\t\tif (this == BLANC)\n\t\t\treturn NOIR;\n\t\treturn BLANC;\n\t}", "public String getCpe() {\n return cpe;\n }", "public float getCeny() {\n return cen.y;\n }", "public float getCilindradas() {\n return cilindradas;\n }", "private int sumaCen(){\n int kasa = 0;\n for(Restauracja r :zamowioneDania){\n kasa+=r.getCena();\n }\n return kasa;\n }", "public CocheJuego getCoche() {\r\n\t\treturn miCoche;\r\n\t}", "public NiveauCentreDTO getUfr(){\n\t\treturn getNomenclatureDomainService().getNiveauCentreFromLibelle(DonneesStatic.CG_UFR);\n\t}", "public String getCuenta() {\n\t\treturn cuenta;\n\t}", "public BigDecimal getCOVERING_ACC_CY() {\r\n return COVERING_ACC_CY;\r\n }", "public Causa getCausa() {\n return causa.get();\n }", "public String getCitta() {\n return citta;\n }", "String getCidr();", "public double getCena() {\r\n\t\treturn cena;\r\n\t}", "public String getCUSU_CODIGO(){\n\t\treturn this.myCusu_codigo;\n\t}", "public Integer getCedula() {return cedula;}", "public BigDecimal getCOVERING_ACC_SL() {\r\n return COVERING_ACC_SL;\r\n }", "public double getCustoAluguel(){\n return 2 * cilindradas;\n }", "@Override\r\n\tpublic reclamation getreclamatioin(long code_apoger) {\n\t\tfor(int i=0;i<reclamations.size();i++) {\r\n\t\t\t\r\n\t\t\tif(reclamations.get(i).getcodeapoger()==code_apoger)\r\n\t\t return reclamations.get(i);\r\n\t\t\t\r\n\t\t\t}\r\n\t\treturn null;\r\n\t}", "public Integer getCyrs() {\r\n return cyrs;\r\n }", "public int getValeurCourante() {\n\t\treturn this.valC;\n\t}", "public String getCinemaId() {\n return sharedPreferences.getString(CINEMA_ID, \"\");\n }", "public CouleurFeu suivant() {\r\n // on choisit ici un algo très basique (je l'avais d'abord fait\r\n // en utisant la liste des valeurs, mais ça n'est pas très lisible.\r\n switch (this) {\r\n case VERT:\r\n return ORANGE;\r\n case ORANGE:\r\n return ROUGE;\r\n case ROUGE:\r\n return VERT;\r\n default:\r\n throw new RuntimeException(\"couleur inconnue ?? (impossible normalement)\");\r\n }\r\n }", "public void setCouleur(String couleur) {\n\t\tthis.couleur = couleur;\n\t}", "String getCpushares();", "String getCognome();", "public double getCelsius(){\n return ((fahrenheit-32)*(5.0/9));\n }", "public float Superficie() {\n\t\t\n\t\tfloat cuadradob = (float) (Math.pow(puntos[3].getX() - puntos[0].getX(), 2) + Math.pow(puntos[3].getY() - puntos[0].getY(), 2));\n\t\tfloat cuadradoa = (float) (Math.pow(puntos[1].getX() - puntos[0].getX(), 2) + Math.pow(puntos[1].getY() - puntos[0].getY(), 2));\n\t\tfloat raizb = (float) Math.sqrt(cuadradob);\n\t\tfloat raiza = (float) Math.sqrt(cuadradoa);\n\t\treturn raiza * raizb;\n\t\t\n\t\t//return (puntos[3].getX() - puntos[0].getX())*(puntos[1].getY() - puntos[0].getY());\n\t}", "public String getCouncil() {\n return council;\n }", "public int getClase() {return clase;}", "public final Criminal getCriminal() {\n return criminal;\n }", "public int getCadence() {\n return cadence;\n }", "public String getRuc() {\n return ruc;\n }", "public teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCazuri(int index) {\n return cazuri_.get(index);\n }", "public com.besixplus.sii.objects.Cgg_jur_anticipo getCgg_jur_anticipo(){\n\t\treturn this.myCgg_jur_anticipo;\n\t}", "public String getCUSU_NOMBRES(){\n\t\treturn this.myCusu_nombres;\n\t}", "public String getCuenta() {\r\n return cuenta;\r\n }", "@Override\r\n\tpublic double getRelacaoCinturaQuadril() {\r\n\r\n\t\treturn anamnese.getCintura() / anamnese.getQuadril();\r\n\t}", "public BigDecimal getCOVERING_ACC_CIF() {\r\n return COVERING_ACC_CIF;\r\n }", "public String getCer() {\n return cer;\n }", "public Color getColor() {\n\t\treturn couleur;\n\t}", "public int getCedula() {\n return cedula;\n }", "public String getRhesus()\n\t{\n\t\treturn rhesus;\n\t}", "public static int showCuisines(){\r\n int check=0;\r\n for(int i=0;i<cuisines.size();i++){\r\n System.out.println(i+\".-\"+cuisines.get(i).getName());\r\n check=1;\r\n }\r\n if(check==0)\r\n System.out.println(\"There are not food in this category\");\r\n return check;\r\n }", "String getCidade();", "String getATCUD();", "protected Double getCAProfessionnel() {\n List<Facture> facturesProfessionnel = this.factureProfessionnelList;\n Double ca = 0.0; \n for(Facture f : facturesProfessionnel )\n ca = ca + f.getTotalHT();\n \n return ca ; \n \n }", "public String getCor() {\r\n return cor;\r\n }", "public String getClase() {\n\t\treturn clase;\n\t}", "public String ride() {\r\n return \"cantering\";\r\n }", "public CuentaContable getCuentaContableCierre()\r\n/* 98: */ {\r\n/* 99:115 */ return this.cuentaContableCierre;\r\n/* 100: */ }", "public String getCif() {\n return cif;\n }", "public String getRua() {// Retorna o nome da rua.\r\n\t\treturn rua;\r\n\t}", "public Controleur getControleur() {\n\t\treturn controleur;\n\t}", "public String getUserCate() {\n\t\treturn restClient.getSuggestedUsersCat();\n\t}", "int getStamina();", "public String getCognome() {\r\n return cognome;\r\n }", "public java.lang.String getCuentaCLABE() {\n return cuentaCLABE;\n }", "private Contestant getCurrentContestant() {\n \t\tboolean newCont = false;\n \t\tContestant x = null;\n \t\tif (activeCon == INACTIVE_CONT) {\n \t\t\tactiveCon = new Contestant();\n \t\t\tnewCont = true;\n \t\t}\n \t\t\n \t\tactiveCon.setFirstName(tfFirstName.getText());\n \t\tactiveCon.setLastName(tfLastName.getText());\n \t\tactiveCon.setTribe((String)cbTribe.getSelectedItem());\n \t\tactiveCon.setPicture(imgPath);\n \t\t\n \t\tString id = tfContID.getText();\n \t\tif (newCont) {\n \t\t\tif (GameData.getCurrentGame().isIDValid(id)) {\n \t\t\t\tactiveCon.setID(id);\n \t\t\t} else {\n \t\t\t\t// TODO: FIX\n \t\t\t\tArrayList<Person> a = new ArrayList<Person>(15);\n \t\t\t\tfor (Contestant c: GameData.getCurrentGame().getAllContestants())\n \t\t\t\t\ta.add((Person)c);\n \t\t\t\t\n \t\t\t\tid = StringUtil.generateID(activeCon, a);\n \t\t\t\tactiveCon.setID(id);\n \t\t\t}\n \t\t}\n \t\t\t\n \t\tx = activeCon;\n \t\tactiveCon = INACTIVE_CONT;\n \t\t\n \t\treturn x;\n \t}", "private Color couleurOfficiel( int numeroDeCouleur) {\n\t\tif(numeroDeCouleur ==1) {\n\n\t\t\treturn new Color(230,57,70);\n\t\t}\n\n\t\tif(numeroDeCouleur ==2) {\n\n\t\t\treturn new Color(241,250,238);\n\t\t}\n\t\tif(numeroDeCouleur ==3) {\n\n\t\t\treturn new Color(168,218,220);\n\t\t}\n\t\tif(numeroDeCouleur ==4) {\n\n\t\t\treturn new Color(168,218,220);\n\t\t}\n\t\telse {\n\t\t\treturn new Color(29,53,87);\n\t\t}\n\n\t}", "public Utilisateur getUtilisateurCourant() {\r\n\t\treturn utilisateurControlleur.getUtilisateurCourant();\r\n\t}", "public String getClasz() {\r\n \t\treturn clasz;\r\n \t}", "public teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCazuri(int index) {\n if (cazuriBuilder_ == null) {\n return cazuri_.get(index);\n } else {\n return cazuriBuilder_.getMessage(index);\n }\n }", "public String getCedula() {\r\n return cedula;\r\n }", "public BigDecimal getCOVERING_ACC_BR() {\r\n return COVERING_ACC_BR;\r\n }", "public String getUbicacionSucursal() {\r\n return ubicacionSucursal;\r\n }", "public String getCheflieuregion() {\n return (String) getAttributeInternal(CHEFLIEUREGION);\n }", "public String getC() {\n return c;\n }", "public static Ally getRandomCeleb () {\n return celebrity[(int) (Math.random() * celebrity.length)];\n }", "public int getCents()\r\n {\r\n return cents;\r\n }", "private String getCords() {\n return current.getLocString();\n\n }", "public Color choixCouleur(String s) {\n\t\tif(s.equals(\"ROUGE\")) return Color.RED;\n\t\telse if(s.equals(\"VERT\")) return Color.GREEN;\n\t\telse if(s.equals(\"BLEU\")) return Color.BLUE;\n\t\telse if(s.equals(\"ROSE\")) return Color.PINK;\n\t\telse if(s.equals(\"BLANC\")) return Color.WHITE;\n\t\telse if(s.equals(\"VIOLET\")) return Color.PURPLE;\n\t\telse if(s.equals(\"JAUNE\")) return Color.YELLOW;\n\t\telse if(s.equals(\"ORANGE\")) return Color.ORANGE;\n\t\telse if(s.equals(\"MARRON\")) return Color.BROWN;\n\t\telse if(s.equals(\"GRIS\")) return Color.GREY;\n\t\telse if(s.equals(\"ROUGE\")) return Color.RED;\n\t\telse return Color.BLACK;\n\t}", "public int getCC() {\n\t\treturn CC;\n\t}", "public String getCouname() {\n return couname;\n }", "@Override public String getCarne(){\n return \"salchicha y jamón \";\n }" ]
[ "0.67323154", "0.67109525", "0.66393256", "0.66021186", "0.65340143", "0.65340143", "0.6239239", "0.6237161", "0.6152172", "0.6060424", "0.60504675", "0.6050169", "0.60159934", "0.5978241", "0.59604686", "0.5914182", "0.5903599", "0.5875615", "0.58314276", "0.5819093", "0.58088183", "0.57697886", "0.575166", "0.57061124", "0.565916", "0.56414366", "0.56005746", "0.5595117", "0.5592308", "0.5585483", "0.5580853", "0.5578244", "0.5577172", "0.55674267", "0.55672014", "0.55625874", "0.55625236", "0.555289", "0.55493784", "0.5530003", "0.55259204", "0.5518594", "0.55132186", "0.5507287", "0.55000234", "0.5490768", "0.54887015", "0.54853094", "0.54848725", "0.5484867", "0.54791236", "0.5469766", "0.5465102", "0.54605263", "0.54540724", "0.5449937", "0.54383135", "0.54349935", "0.54301465", "0.54059017", "0.540451", "0.54038024", "0.53995186", "0.53871447", "0.538217", "0.53769374", "0.53761804", "0.53687644", "0.536836", "0.5363591", "0.53601795", "0.5359709", "0.53510123", "0.53393686", "0.5333296", "0.5331178", "0.5328411", "0.53171736", "0.53158474", "0.5309603", "0.5304482", "0.5301213", "0.52958286", "0.52913445", "0.5286107", "0.5282386", "0.52732265", "0.5270377", "0.52679276", "0.5263715", "0.52546287", "0.5252283", "0.524892", "0.52482975", "0.52470535", "0.5247002", "0.52468795", "0.52444696", "0.5243447", "0.52430063" ]
0.7921759
0
Returns the type of food in the restaurant
public String getTypeOfFood() { return typeOfFood; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTypeOfFood(){\n return typeOfFood;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "public String getFoodType() {\n return \"Carnivore\";\n }", "Food getByType(String type);", "public FoodType getFoodType() {\n\t\treturn FoodType.GRASS;\n\t}", "public void setTypeOfFood(String _typeOfFood)\n {\n typeOfFood = _typeOfFood;\n }", "@Override\n public EFoodType getFoodtype() {\n MessageUtility.logGetter(name,\"getFoodtype\",EFoodType.MEAT);\n return EFoodType.MEAT;\n }", "public void setTypeOfFood(String foodType){\n typeOfFood = foodType;\n }", "public static int showFoods(String cuisin, String type){\r\n int check=0;\r\n for(int i=0;i<foods.size();i++){\r\n if(foods.get(i).getCousin().toLowerCase().equals(cuisin.toLowerCase())\r\n && foods.get(i).getType().toLowerCase().equals(type)){\r\n System.out.println(i+\".-\"+foods.get(i).getName()+\" --> \"+foods.get(i).getDescription()+\" --> \"+foods.get(i).getPrice());\r\n check=1;\r\n }\r\n }\r\n if(check==0)\r\n System.out.println(\"There are not food in this category\");\r\n return check;\r\n }", "@Override\r\n\tpublic String getFood() {\n\t\treturn \"banana\";\r\n\t}", "@Override\n\tpublic List<Food> findFood(int typeid) {\n\t\treturn fb.findFood(typeid);\n\t}", "Restaurant getRestaurant();", "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "public int getFood() {\n\t\treturn food;\n\t}", "public void setFoodType(String food);", "public String food();", "RestaurantFullInfo getFullRestaurant();", "public int getFood(){\r\n\t\treturn food;\r\n\t}", "public String getFood() {\n if(food != null)\n return \"食材:\"+food;\n else {\n return content ;\n }\n }", "ArrayList<Restaurant> getRestaurantListByType(String type);", "public Restaurant getRestaurant() {\n return restaurant;\n }", "public online.food.ordering.Restaurant getRestaurant()\n {\n return restaurant;\n }", "public boolean isFood(){\n\t\treturn foodFlag;\n\t}", "public ItemType getType();", "public boolean isFood() {\n\t\treturn food > 0;\n\t}", "public String getFoodName() {\n return foodName;\n }", "@Override\n\tpublic String addFoodType(String ftname) {\n\t\treturn ftb.addFoodType(ftname);\n\t}", "public String types() { return faker.fakeValuesService().resolve(\"gender.types\", this, faker); }", "public String getType() {\n /**\n * @return type of Ice Cream\n */\n return type;\n }", "public OreType getOreType() \n {\n return m_oreType;\n }", "public void serveFood() {\r\n System.out.println(\"Serving food from \" + name + \" is a \" + type + \" restaurant\");\r\n }", "protected int get_food_level()\n {\n return food_level;\n }", "public FoodItem getFooditem() {\n return fooditem;\n }", "public int foodCount() {\r\n\t\treturn this.food;\r\n\t}", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "public String getCheese() {\n return this.hold.getType();\n }", "public String getHealthierFood(FoodItem item)\r\n\t{\r\n\t\tString result = \"\";\t\r\n\t\tif(item == null)\t\t\t\r\n\t\t\treturn result = \"No results for Image\";\r\n\t\tFoodSearch actualFood = searchFoodByActualName(item);\r\n\t\tFoodSearch otherSimilarFoods = searchFoodByGeneralName(item);\r\n\t\tNutrientSearch actualFoodsNutrients = null;\r\n\t\tNutrientSearch otherSimilarFoodsNutrients = null;\r\n\t\tOptional<Nutrient> actualFoodsSugar = null;\r\n\t\tOptional<Nutrient> otherSimilarFoodsSugar = null;\r\n\t\tif(actualFood == null)\r\n\t\t{\r\n\t\t\t//TODO: If searchFoodByActualName returns null, then search food by General name, and get first healthier option from there!\r\n\t\t\tresult = \"Food from image uploaded does not exist in database. Kindly try with another food item\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(actualFood == null || actualFood.getList() == null || actualFood.getList().getItem().size() == 0 || actualFood.getList().getItem().get(0) == null)\r\n\t\t\t{\r\n\t\t\t\tresult = \"Data 1 Not Properly Formed for Request. Please Try Again. If Error Persists, use another image\";\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tif(otherSimilarFoods == null || otherSimilarFoods.getList() == null || otherSimilarFoods.getList().getItem().size() == 0)\r\n\t\t\t{\r\n\t\t\t\tresult = \"Data 2 Not Properly Formed for Request. Please Try Again. If Error Persists, use another image\";\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tactualFoodsNutrients = searchNutrientByFoodNo(actualFood.getList().getItem().get(0).getNdbno());\r\n\t\t\t//Below line of code finds the first Nutrient object containing \"sugar\". Sugar is the parameter we use to determine healtier option\r\n\t\t\tactualFoodsSugar = actualFoodsNutrients.getReport().getFood().getNutrients().stream().filter(x -> x.getName().toUpperCase().contains(Constants.SUGAR)).findFirst();\r\n\t\t\tif(!actualFoodsSugar.isPresent())\r\n\t\t\t{\r\n\t\t\t\treturn result = \"No results for Image. Sugar content unavailable\";\r\n\t\t\t}\r\n\t\t\tdouble actualFoodSugarNum = Double.valueOf(actualFoodsSugar.get().getValue());\r\n\t\t\tif(actualFoodSugarNum <= 0)\r\n\t\t\t{\r\n\t\t\t\treturn result = \"The image you uploaded is the healthiest kind of \" + item.getGeneralFoodName() + \" there is!\" + \" It has zero sugars.\";\r\n\t\t\t}\r\n\t\t\tfor(Item element: otherSimilarFoods.getList().getItem())\r\n\t\t\t{\r\n\t\t\t\totherSimilarFoodsNutrients = searchNutrientByFoodNo(element.getNdbno());\r\n\t\t\t\totherSimilarFoodsSugar = otherSimilarFoodsNutrients.getReport().getFood().getNutrients().stream().filter(x -> x.getName().toUpperCase().contains(Constants.SUGAR)).findFirst();\r\n\t\t\t\tif(!otherSimilarFoodsSugar.isPresent())\r\n\t\t\t\t\tcontinue;\t\t\t\t\r\n\t\t\t\tdouble otherFoodsSugarNum = Double.valueOf(otherSimilarFoodsSugar.get().getValue());\r\n\t\t\t\tif(otherFoodsSugarNum < actualFoodSugarNum)\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble scale = Math.pow(10, 2);\r\n\t\t\t\t\tdouble percentDiff = ((actualFoodSugarNum - otherFoodsSugarNum)/actualFoodSugarNum) * 100;\r\n\t\t\t\t\tpercentDiff = Math.round(percentDiff * scale) / scale;\r\n\t\t\t\t\tString manufacturer = (element.getManu().equals(\"none\")) ? \"N/A\" : element.getManu();\r\n\t\t\t\t\t//result = element.getName() + \" is a healther option.\" + \"\\n\" + \"Made by: \" + manufacturer + \"\\n\" + \"It has \" + percentDiff + \" percent less sugar\";\r\n\t\t\t\t\t//result = \"Healthier option found \";\r\n\t\t\t\t\tresult = \" A healthier option is: \" + element.getName() + \"\\n\" + \"Made by: \" + manufacturer + \"\\n\" + \"It has \" + percentDiff + \" percent less sugar\";\r\n\t\t\t\t\tresult = Utilities.encodeHtml(result);\r\n\t\t\t\t\tresult = Utilities.encodeJavaScript(result);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(result.isEmpty())\r\n\t\t\t\tresult = \"No healthier option found. Kindly go with the image uploaded\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String getRestaurantName() {\n return restaurantName;\n }", "@RequestMapping(value = \"food/type\", method = RequestMethod.POST)\n\tpublic String findByType(HttpServletRequest request, Map<String, Object> model) throws JsonProcessingException {\n\t\tList<Food> foods = foodService.findAll();\n\t\tif (request.getParameter(\"type\").equals(\"ALL\")) {\n\t\t\tmodel.put(\"foods\", foodService.findAll());\n\t\t} else {\n\t\t\tmodel.put(\"foods\", foodService.findByType(request.getParameter(\"type\")));\n\t\t}\n\t\tmodel.put(\"types\", Food.TYPE.values());\n\t\tmodel.put(\"qualities\", Food.QUALITY.values());\n\t\tmodel.put(\"qualitycounts\", mapper.writeValueAsString(foodService.qualityCounts(foods)));\n\t\treturn \"index\";\n\n\t}", "public static int showFoods(String cuisin){\r\n int check=0;\r\n for(int i=0;i<foods.size();i++){\r\n if(foods.get(i).getCousin().toLowerCase().equals(cuisin.toLowerCase())){\r\n System.out.println(i+\".-\"+foods.get(i).getName()+\" --> \"+foods.get(i).getDescription()+\" --> \"+foods.get(i).getType()+\" --> \"+foods.get(i).getPrice());\r\n check=1;\r\n }\r\n }\r\n if(check==0)\r\n System.out.println(\"There are not food in this category\");\r\n return check;\r\n }", "public FeedType getType();", "private String findTypeofOrder(String orderName)\n {\n\n for (String partNameofOrder : orderName.split(\" \"))\n {\n for (Food.Types typeName : Food.Types.values()) {\n if (typeName.toString().equals(partNameofOrder)) {\n return Food.type;\n }\n }\n\n for (Medicine.Types typeName : Medicine.Types.values()) {\n if (typeName.toString().equals(partNameofOrder)) {\n return Medicine.type;\n }\n }\n\n for (Book.Types typeName : Book.Types.values()) {\n if (typeName.toString().equals(partNameofOrder)) {\n return Book.type;\n }\n }\n }\n return OtherItem.type;\n }", "public void addIngredient(String type) {\n\t\tBurger fullBurger1 = new Burger(true);\n\t\tBurger fullBurger2 = new Burger(true);\n\n\t\tfullBurger1.removeIngredient(\"Beef\");\n\t\tfullBurger2.removeIngredient(\"Beef\");\n\n\t\tint howManyBeef = this.howMany(\"Beef\");\n\t\tint howManyChicken = this.howMany(\"Chicken\");\n\t\tint howManyVeggie = this.howMany(\"Veggie\");\n\n\t\tif (this.has(\"Beef\")) {\n\t\t\tfor (int i = 0; i < howManyBeef; i++) {\n\t\t\t\tfullBurger1.addPatty();\n\t\t\t\tfullBurger2.addPatty();\n\t\t\t}\n\t\t}\n\t\tif (this.has(\"Chicken\")) {\n\t\t\tfor (int i = 0; i < howManyChicken; i++) {\n\t\t\t\tfullBurger1.addGeneralPatty(\"Chicken\");\n\t\t\t\tfullBurger2.addGeneralPatty(\"Chicken\");\n\t\t\t}\n\t\t}\n\t\tif (this.has(\"Veggie\")) {\n\t\t\tfor (int i = 0; i < howManyVeggie; i++) {\n\t\t\t\tfullBurger1.addGeneralPatty(\"Veggie\");\n\t\t\t\tfullBurger2.addGeneralPatty(\"Veggie\");\n\t\t\t}\n\t\t}\n\t\tmyBurger.push(type);\t\n\t\twhile (myBurger.size() != 0) {\n\t\t\tString top = (String) myBurger.peek();\n\t\t\tfullBurger1.removeIngredient(top);\n\t\t\tthis.removeIngredient(top);\n\t\t}\n\n\t\twhile (fullBurger1.myBurger.size() != 0) {\n\t\t\tString top = (String) fullBurger1.myBurger.peek();\n\t\t\tfullBurger2.removeIngredient(top);\n\t\t\tfullBurger1.removeIngredient(top);\n\t\t}\n\t\tint totalPatties = howManyBeef + howManyChicken + howManyVeggie;\n\t\tmyBurger = fullBurger2.myBurger;\n\t\tpattyCount = pattyCount + totalPatties;\n\t\tif (type.equals(\"Beef\") || type.equals(\"Chicken\") || type.equals(\"Veggie\")) {\n\t\t\tpattyCount++;\n\t\t}\n\t}", "public String getBreedOrType() { return breedOrType; }", "public static String getMostFrequentType() {\n\t\tint cars = 0;\n\t\tint figures = 0;\n\t\t\n\t\tfor (int i = 0; i < toyList.size(); i++) {\n\t\t\tif (toyList.get(i).getType().equals(\"Car\")) {\n\t\t\t\tcars++;\n\t\t\t}\n\t\t\tif (toyList.get(i).getType().equals(\"Action Figure\")) {\n\t\t\t\tfigures++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (cars > figures) {\n\t\t\treturn \"Car\";\n\t\t}\n\t\telse if (figures > cars) {\n\t\t\treturn \"Action Figure\";\n\t\t}\n\t\telse {\n\t\t\treturn \"Equal amounts of actions figures and cars.\";\n\t\t}\n\t}", "public int expfood()\n {\n SQLiteDatabase db1 = this.getReadableDatabase();\n String stmt = \"SELECT SUM(AMOUNT) FROM EXPENSE GROUP BY TYPE HAVING TYPE='FOOD'\";\n Cursor tot = db1.rawQuery(stmt, null);\n if(tot.getCount()==0)\n {\n return 0;\n }\n else {\n tot.moveToFirst();\n int amount = tot.getInt(0);\n tot.close();\n return amount;\n }\n }", "public Pizza getPizza() {\n return this.pizzaType;\n }", "@RequestMapping(value=\"/orderentry/food/{foodItem}\", method= RequestMethod.GET)\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@ApiOperation(value = \"Get Order Entries based on food\")\n\t@ApiResponses(value = {\n\t\t\t@ApiResponse(code = 200, message = \"Ok\"),\n\t\t\t@ApiResponse(code = 400, message = \"Bad / Invalid input\"),\n\t\t\t@ApiResponse(code = 401, message = \"Authorization failed\"),\n\t\t\t@ApiResponse(code = 404, message = \"Resource not found\"),\n\t\t\t@ApiResponse(code = 500, message = \"Server error\"),\n\t})\n\tpublic List<OrderEntry> getOrderEntriesByFood(\n\t\t\t@PathVariable(\"foodItem\") @ApiParam(\"type of food\") final String foodItem) {\n\t\t\n\t\tList<OrderEntry> orderEntryList = orderEntryService.getOrderEntriesByFood(foodItem);\n\t\treturn orderEntryList;\n\t}", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public int getFoodCount()\r\n\t{\r\n\t\treturn foodCount;\r\n\t}", "public String getFoodMenu() {\n\t\treturn mFoodMenu;\n\t}", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "Object getTipo();", "public String getTypeOfDrink()\n {\n return typeOFDrink;\n }", "public String getRestaurantName() {\n return mRestaurantName;\n }", "public static String IngredientTypeToString(IngredientType type){\n switch(type){\n case ANIMAL:\n return \"Animal\";\n case VEGETAL:\n return \"Vegetal\";\n case MINERAL:\n return \"Mineral\";\n default:\n return \"Invalido\";\n }\n }" ]
[ "0.815083", "0.7688354", "0.7688354", "0.76628274", "0.74828964", "0.7218194", "0.7135717", "0.7106273", "0.6959938", "0.67017204", "0.6578558", "0.6510657", "0.6401746", "0.6334331", "0.6325096", "0.63159144", "0.6266518", "0.62523884", "0.6246465", "0.62027436", "0.6177865", "0.6166273", "0.61508274", "0.6147319", "0.6047871", "0.6024883", "0.6007639", "0.5983155", "0.59708756", "0.59619606", "0.5958752", "0.5922184", "0.5885521", "0.585644", "0.582936", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5816603", "0.5814752", "0.5814573", "0.5771516", "0.57576483", "0.57387286", "0.57362396", "0.5697357", "0.5694085", "0.56799066", "0.56774783", "0.5667298", "0.56609523", "0.56322527", "0.5632158", "0.5632158", "0.5632158", "0.5632158", "0.5632158", "0.5632158", "0.5632158", "0.5632158", "0.55945337", "0.5587215", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.5581908", "0.55796134", "0.5578316", "0.55623615", "0.5554634" ]
0.81714004
0
Sets the type of food in the restaurant
public void setTypeOfFood(String _typeOfFood) { typeOfFood = _typeOfFood; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTypeOfFood(String foodType){\n typeOfFood = foodType;\n }", "public void setFoodType(String food);", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n\tpublic void setRestaurant(RestaurantChung restaurant) {\n\t\t\n\t}", "public void setFood(int foodIn){\r\n\t\tfood = foodIn;\r\n\t}", "public void setRestaurant(Restaurant restaurant) {\n this.restaurant = restaurant;\n }", "private void setPizza(Pizza type) throws IllegalPizza {\n if(type == null)\n throw new IllegalPizza(\"Invalid pizza!\");\n pizzaType = type;\n }", "private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "public void setBreedType(EnumDragonBreed type) {\n\t\tgetBreedHelper().setBreedType(type);\n\t}", "public void setRestaurant(online.food.ordering.Restaurant _restaurant)\n {\n restaurant = _restaurant;\n }", "public String getTypeOfFood()\n {\n return typeOfFood;\n }", "public String getFoodType() {\n return \"Carnivore\";\n }", "public void setType(int type) {\n type_ = type;\n }", "public String getTypeOfFood(){\n return typeOfFood;\n }", "public void setType(String type) {\n\t\tif (Input.isTypeValid(furniture.toLowerCase(), type.toLowerCase())) {\n\t\t\tLocateRequest.type = type; // makes sure that type is valid\n\t\t} else {\n\t\t\t// error message that type is not valid\n\t\t\tSystem.err.print(\"The furniture type provided is not valid\");\n\t\t}\n\t}", "public void setOreType() {\n\t\tif (subType.equalsIgnoreCase(\"poor\")) {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Poor Nether/End Ores\n\t\t\t\tif (isDust()) {\n\t\t\t\t\tcrushedItem = getDustTiny();\n\t\t\t\t\tdropType = (dropType == 3 || dropType == 0) ? 5 : 0;\n\t\t\t\t\tsetOreValues(2, 8, 4, 8, 8);\n\t\t\t\t\tsetSmeltingOutput(getDustTiny(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tcrushedItem = getNugget();\n\t\t\t\t\tdropType = (dropType == 2 || dropType == 0) ? 0 : 0;\n\t\t\t\t\tsetOreValues(1, 1, 3, 6, 6);\n\t\t\t\t\tsetSmeltingOutput(getNugget(smeltAmount));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Poor Sand/Gravel/Stone Ores\n\t\t\t\tif (isDust()) {\n\t\t\t\t\tcrushedItem = getDustTiny();\n\t\t\t\t\tdropType = (dropType == 3) ? 5 : 0;\n\t\t\t\t\tsetOreValues(1, 4, 2, 4, 4);\n\t\t\t\t\tsetSmeltingOutput(getDustTiny(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tcrushedItem = getNugget();\n\t\t\t\t\tdropType = (dropType == 2) ? 4 : 0;\n\t\t\t\t\tsetOreValues(1, 2, 1, 2, 2);\n\t\t\t\t\tsetSmeltingOutput(getNugget(smeltAmount));\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (subType.equalsIgnoreCase(\"dense\")) {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Dense Nether/End Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(8, 32, 16, 32, 32);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(6, 16, 8, 16, 16);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 8, 16, 16);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Dense Sand/Gravel/Stone Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(3, 8, 6, 8, 8);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(2, 6, 3, 6, 6);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 6;\n\t\t\t\t\t\tsetOreValues(3, 3, 3, 6, 6);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Nether/End Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(3, 2, 8, 16, 16);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(2, 1, 4, 8, 8);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 4, 8, 8);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Stone Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(1, 2, 2, 4, 4);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(1, 1, 1, 2, 2);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 1, 2, 2);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void setType(Type type)\n {\n this.type = type;\n }", "void setType(java.lang.String type);", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "public void setType(int type) {\r\n this.type = type;\r\n }", "public void setType(int type) {\r\n this.type = type;\r\n }", "public void setType (int type) {\n this.type = type;\n }", "public void setType (int type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public abstract void setType();", "public void setType( int type ) {\r\n typ = type;\r\n }", "public void setType(int t){\n this.type = t;\n }", "public void setType(String type){\n \tthis.type = type;\n }", "public void setType(String type){\n this.type = type;\n }", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType( final int type )\n {\n this.type = type;\n fireActionChanged();\n }", "public void setType(int type) {\n this.type = type;\n }", "public void settype(String cat) { this.type = cat; }", "void setType(String type) {\n this.type = type;\n }", "public void setType(Type type){\n\t\tthis.type = type;\n\t}", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(int pType) {\n mType = pType;\n }", "public void setType( String type )\n {\n this.type = type;\n }", "public void setType(String newValue);", "public void setType(String newValue);", "public final void setType(String type){\n\t\tthis.type = type;\t\n\t}", "private void setType(String type) {\n mType = type;\n }", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "private void setTipo(int tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "public void setType(int type)\n\t{\n\t\tthis.type = type;\n\t}", "private void setHabitType() {\n String title = getIntent().getStringExtra(\"ClickedHabitType\");\n habit_type = findHabitType(allHabits, title);\n }", "public void setTipo(String tipo);", "public void setType( String type ) {\n this.type = type;\n }", "public void setType(String type) {\n m_Type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "protected void set_food_level(int food_level)\n {\n this.food_level = food_level;\n }", "public void change_type(int type_){\n\t\ttype = type_;\n\t\tif(type != 0)\n\t\t\toccupe = 1;\n\t}", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "@Override\r\n\tpublic void setTipo(Tipo t) {\n\t\t\r\n\t}", "public void setType(String newtype)\n {\n type = newtype;\n }", "public void setType(int t) {\r\n\t\ttype = t;\r\n\t}", "public void setType(boolean type) {\n this.type = type;\n }", "final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }", "public void setType(int type) {\n\t\tthis.type = type;\n\t}", "public void setType(Type t) {\n type = t;\n }", "public void setType (String typ) {\n type = typ;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "void changeType(NoteTypes newType) {\n this.type = newType;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String name){\n\t\ttype = name;\n\t}" ]
[ "0.84484214", "0.81962967", "0.6952516", "0.6952516", "0.67865676", "0.6696349", "0.66289204", "0.65755886", "0.6538958", "0.65202516", "0.65202516", "0.65202516", "0.64020914", "0.6395879", "0.6338898", "0.6333605", "0.63248533", "0.6303749", "0.628412", "0.6260484", "0.6246017", "0.62125945", "0.6201173", "0.61919594", "0.61919594", "0.61887145", "0.61887145", "0.6187131", "0.6172457", "0.61639285", "0.6160571", "0.6158499", "0.615564", "0.6153082", "0.6149945", "0.6147814", "0.6140575", "0.61389405", "0.61147577", "0.6111334", "0.6111334", "0.6111334", "0.6108607", "0.61023754", "0.60825497", "0.60825497", "0.60781366", "0.6076172", "0.607162", "0.6060395", "0.6048202", "0.6047151", "0.6046541", "0.6044747", "0.6038491", "0.6030259", "0.60290414", "0.60171634", "0.60124207", "0.60124207", "0.60124207", "0.60124207", "0.60123163", "0.60123163", "0.60110277", "0.60110277", "0.60110277", "0.60067207", "0.6006298", "0.6002191", "0.60018605", "0.59798414", "0.59777266", "0.59695816", "0.59658855", "0.5958476", "0.5952359", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.5937666" ]
0.8067113
2
Return the type of drinks available in the restaurant
public String getTypeOfDrink() { return typeOFDrink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTypeOfFood(){\n return typeOfFood;\n }", "public String getFoodType() {\n return \"Carnivore\";\n }", "public String getTypeOfFood()\n {\n return typeOfFood;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "ArrayList<Restaurant> getRestaurantListByType(String type);", "Restaurant getRestaurant();", "Food getByType(String type);", "RestaurantFullInfo getFullRestaurant();", "public void setTypeOfDRink(String _typeOfDrink)\n {\n typeOfDrink = _typeOfDrink;\n }", "@Override\n\tpublic List<Food> findFood(int typeid) {\n\t\treturn fb.findFood(typeid);\n\t}", "public FoodType getFoodType() {\n\t\treturn FoodType.GRASS;\n\t}", "public Restaurant getRestaurant() {\n return restaurant;\n }", "public online.food.ordering.Restaurant getRestaurant()\n {\n return restaurant;\n }", "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "public static int showFoods(String cuisin, String type){\r\n int check=0;\r\n for(int i=0;i<foods.size();i++){\r\n if(foods.get(i).getCousin().toLowerCase().equals(cuisin.toLowerCase())\r\n && foods.get(i).getType().toLowerCase().equals(type)){\r\n System.out.println(i+\".-\"+foods.get(i).getName()+\" --> \"+foods.get(i).getDescription()+\" --> \"+foods.get(i).getPrice());\r\n check=1;\r\n }\r\n }\r\n if(check==0)\r\n System.out.println(\"There are not food in this category\");\r\n return check;\r\n }", "public void setTypeOfFood(String _typeOfFood)\n {\n typeOfFood = _typeOfFood;\n }", "public List<Drink> getDrinks() {\n\t\treturn dao.getDrinks();\r\n\t}", "public String drink(Beverage beverage) {\n return beverage.getDrink();\n }", "public static Beverage orderDrink(){\n // Create a Scanner object\n Scanner input = new Scanner(System.in);\n\n String size = \"\";\n String type =\"\";\n int x = 0;\n int y =0;\n //Ask user if what size and type of drink they would like to order.\n do {\n System.out.print(\"\\nWhat size of Drink would you like?\\n\" +\n \"S- Small\\n\" +\n \"M- Medium\\n\" +\n \"L- Large\\n\");\n\n String answer = input.nextLine();\n switch (answer) {\n case \"S\":\n case \"s\":\n case \"Small\":\n case \"small\":\n size=\"Small\";\n x=0;\n break;\n case \"M\":\n case \"m\":\n case \"Medium\":\n case \"medium\":\n size = \"Medium\";\n x=0;\n break;\n case \"L\":\n case \"l\":\n case \"Large\":\n case \"large\":\n size = \"Large\";\n x=0;\n break;\n default:\n System.out.println(\"invalid choice\");\n x++;\n break;\n }\n } while (x>0);\n\n do {\n System.out.print(\"\\nWhat soda do you prefer?\\n\" +\n \"S- Sprite\\n\" +\n \"R- Rootbeer\\n\" +\n \"F- Orange Fanta\\n\");\n\n String answer = input.nextLine();\n switch (answer) {\n case \"S\":\n case \"s\":\n case \"Sprite\":\n case \"sprite\":\n type=\"Sprite\";\n x=0;\n break;\n case \"R\":\n case \"r\":\n case \"Rootbeer\":\n case \"rootbeer\":\n type = \"Rootbeer\";\n x=0;\n break;\n case \"F\":\n case \"f\":\n case \"Fanta\":\n case \"fanta\":\n case \"Orange Fanta\":\n case \"orange fanta\":\n type = \"Orange Fanta\";\n x=0;\n break;\n default:\n System.out.println(\"invalid choice\");\n x++;\n break;\n }\n } while (x>0);\n return new Beverage(\"Drink\", size, type);\n }", "public String getCheese() {\n return this.hold.getType();\n }", "@Override\n\tpublic RatingDTO getRatings(Restaurant restaurant) {\n\t\tRatingDTO retVal = new RatingDTO();\n\t\ttry{\n\t\t\tdouble restMark = markRepository.sumForRestaurant(restaurant);\n\t\t\tretVal.setRating(restMark);\n\t\t}catch(Exception e){\n\t\t\tretVal.setRating(0);\n\t\t}\n\t\tCollection<Waiter> waiters = employeeRepository.findWaiters(restaurant);\n\t\tfor(Waiter w : waiters){\n\t\t\ttry{\n\n\t\t\t\tdouble rating = markRepository.sumForWaiter(w);\n\t\t\t\tretVal.getWaiters().put(w.getName() + \" \" + w.getLastname(), rating);\n\t\t\t}catch(Exception e){\n\t\t\t\tretVal.getWaiters().put(w.getName()+\" \"+w.getLastname(), 0.0);\n\t\t\t}\n\t\t}\n\t\t\n\t\tCollection<Meal> meals = restaurant.getMenu();\n\t\tCollection<Mark> totalMark = markRepository.findByRestaurant(restaurant);\n\t\tfor(Meal m : meals){\n\t\t\tdouble total = 0.0;\n\t\t\tint divide = 0;\n\t\t\tfor(Mark mark : totalMark){\n\t\t\t\tfor(ItemMeal im : mark.getVisit().getBill().getOrder().getMeals()){\n\t\t\t\t\tif(im.getMeal().equals(m)){\n\t\t\t\t\t\ttotal += mark.getMarkMeals();\n\t\t\t\t\t\tdivide += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tdouble end = 0.0;\n\t\t\tif(divide != 0){\n\t\t\t\tend = total/divide;\n\t\t\t}\n\t\t\tretVal.getMeals().put(m.getName(), end);\n\t\t}\n\t\treturn retVal;\n\t}", "public List<Restaurant> restaurantList(){\r\n\t\treturn DataDAO.getRestaurantList();\r\n\t}", "public void setTypeOfFood(String foodType){\n typeOfFood = foodType;\n }", "@Test\n\tvoid testGetAllByType() {\n\t\tList<Plant> plant = service.getAllByType(\"Shurbs\");\n\t\tString type = plant.get(0).getType();\n\t\tassertEquals(\"Shurbs\", type);\n\t}", "public String getBreedOrType() { return breedOrType; }", "@Override\r\n\tpublic String getFood() {\n\t\treturn \"banana\";\r\n\t}", "public List<Food> getAvailableFood() {\n return availableFood;\n }", "public void addIngredient(String type) {\n\t\tBurger fullBurger1 = new Burger(true);\n\t\tBurger fullBurger2 = new Burger(true);\n\n\t\tfullBurger1.removeIngredient(\"Beef\");\n\t\tfullBurger2.removeIngredient(\"Beef\");\n\n\t\tint howManyBeef = this.howMany(\"Beef\");\n\t\tint howManyChicken = this.howMany(\"Chicken\");\n\t\tint howManyVeggie = this.howMany(\"Veggie\");\n\n\t\tif (this.has(\"Beef\")) {\n\t\t\tfor (int i = 0; i < howManyBeef; i++) {\n\t\t\t\tfullBurger1.addPatty();\n\t\t\t\tfullBurger2.addPatty();\n\t\t\t}\n\t\t}\n\t\tif (this.has(\"Chicken\")) {\n\t\t\tfor (int i = 0; i < howManyChicken; i++) {\n\t\t\t\tfullBurger1.addGeneralPatty(\"Chicken\");\n\t\t\t\tfullBurger2.addGeneralPatty(\"Chicken\");\n\t\t\t}\n\t\t}\n\t\tif (this.has(\"Veggie\")) {\n\t\t\tfor (int i = 0; i < howManyVeggie; i++) {\n\t\t\t\tfullBurger1.addGeneralPatty(\"Veggie\");\n\t\t\t\tfullBurger2.addGeneralPatty(\"Veggie\");\n\t\t\t}\n\t\t}\n\t\tmyBurger.push(type);\t\n\t\twhile (myBurger.size() != 0) {\n\t\t\tString top = (String) myBurger.peek();\n\t\t\tfullBurger1.removeIngredient(top);\n\t\t\tthis.removeIngredient(top);\n\t\t}\n\n\t\twhile (fullBurger1.myBurger.size() != 0) {\n\t\t\tString top = (String) fullBurger1.myBurger.peek();\n\t\t\tfullBurger2.removeIngredient(top);\n\t\t\tfullBurger1.removeIngredient(top);\n\t\t}\n\t\tint totalPatties = howManyBeef + howManyChicken + howManyVeggie;\n\t\tmyBurger = fullBurger2.myBurger;\n\t\tpattyCount = pattyCount + totalPatties;\n\t\tif (type.equals(\"Beef\") || type.equals(\"Chicken\") || type.equals(\"Veggie\")) {\n\t\t\tpattyCount++;\n\t\t}\n\t}", "public String getRestaurantName() {\n return restaurantName;\n }", "@Override\n public EFoodType getFoodtype() {\n MessageUtility.logGetter(name,\"getFoodtype\",EFoodType.MEAT);\n return EFoodType.MEAT;\n }", "public FeedType getType();", "SortedSet<Recipe> findRecipesByType(MealType type) throws ServiceFailureException;", "public String getNameFromType(Type type) {\n\t\tif (type == Type.PURCHASE)\n\t\t\treturn \"PURCHASE\";\n\t\telse\n\t\t\treturn \"RENTAL\";\n\t}", "public EnumDragonBreed getBreedType() {\n\t\treturn getBreedHelper().getBreedType();\n\t}", "@Override\n public Dish get(int id, int restaurantId) {\n List<Dish> dishes = crudRepository.get(id, restaurantId);\n return DataAccessUtils.singleResult(dishes);\n }", "public String types() { return faker.fakeValuesService().resolve(\"gender.types\", this, faker); }", "public ItemType getType();", "public RewardType type();", "public ArrayList<DrinkAndQuantity> getDrinks()\n {\n return drinksAndQuantities;\n }", "@Override\r\n public List<DishTypeBean> getAllDishType() {\r\n Cursor cursor =\r\n database.query(DishTypeBean.TABLE_NAME, null, null, null, null, null, DishTypeBean.ID + \" DESC\");\r\n List<DishTypeBean> dishTypeBeans = new ArrayList<DishTypeBean>();\r\n for (DishTypeBean dishTypeBean : dishTypeBeans) {\r\n dishTypeBean.setId(cursor.getString(0));\r\n dishTypeBean.setName(cursor.getString(1));\r\n dishTypeBean.setSmallPictureAddress(cursor.getString(2));\r\n dishTypeBean.setBigPictureAddress(cursor.getString(3));\r\n dishTypeBean.setVideoAddress(cursor.getString(4));\r\n dishTypeBean.setAudioAddress(cursor.getString(5));\r\n dishTypeBeans.add(dishTypeBean);\r\n }\r\n return dishTypeBeans;\r\n }", "public FishingRod getBestRod();", "public boolean drink(Beverage beverage) {\n\t\tif (beverage instanceof AlcoholicBeverage) numOfAlcoholicDrinks += 1;\n\t\treturn true;\n\t}", "public String getLBR_ICMS_TaxReliefType();", "public interface Recipe {\n\n String getTitle();\n\n String getDescription();\n\n List<String> getMealType();\n\n List<String> getFoodType();\n\n List<String> getIngredients();\n}", "public List<Restaurant> getAllRestaurants() {\n\t\tList<Restaurant> restaurantList = new ArrayList<>();\n\t\trestaurantRepository.findAll()\n\t\t.forEach(r->restaurantList.add(r));\n\t\treturn restaurantList;\n\t}", "private ParkingType getVehicleType() {\n LOGGER.info(\"Please select vehicle type from menu\");\n LOGGER.info(\"1 CAR\");\n LOGGER.info(\"2 BIKE\");\n int input = inputReaderUtil.readSelection();\n switch (input) {\n case 1:\n return ParkingType.CAR;\n case 2:\n return ParkingType.BIKE;\n default:\n LOGGER.error(\"Incorrect input provided\");\n throw new IllegalArgumentException(\"Entered input is invalid\");\n }\n }", "public String getHealthierFood(FoodItem item)\r\n\t{\r\n\t\tString result = \"\";\t\r\n\t\tif(item == null)\t\t\t\r\n\t\t\treturn result = \"No results for Image\";\r\n\t\tFoodSearch actualFood = searchFoodByActualName(item);\r\n\t\tFoodSearch otherSimilarFoods = searchFoodByGeneralName(item);\r\n\t\tNutrientSearch actualFoodsNutrients = null;\r\n\t\tNutrientSearch otherSimilarFoodsNutrients = null;\r\n\t\tOptional<Nutrient> actualFoodsSugar = null;\r\n\t\tOptional<Nutrient> otherSimilarFoodsSugar = null;\r\n\t\tif(actualFood == null)\r\n\t\t{\r\n\t\t\t//TODO: If searchFoodByActualName returns null, then search food by General name, and get first healthier option from there!\r\n\t\t\tresult = \"Food from image uploaded does not exist in database. Kindly try with another food item\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(actualFood == null || actualFood.getList() == null || actualFood.getList().getItem().size() == 0 || actualFood.getList().getItem().get(0) == null)\r\n\t\t\t{\r\n\t\t\t\tresult = \"Data 1 Not Properly Formed for Request. Please Try Again. If Error Persists, use another image\";\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tif(otherSimilarFoods == null || otherSimilarFoods.getList() == null || otherSimilarFoods.getList().getItem().size() == 0)\r\n\t\t\t{\r\n\t\t\t\tresult = \"Data 2 Not Properly Formed for Request. Please Try Again. If Error Persists, use another image\";\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tactualFoodsNutrients = searchNutrientByFoodNo(actualFood.getList().getItem().get(0).getNdbno());\r\n\t\t\t//Below line of code finds the first Nutrient object containing \"sugar\". Sugar is the parameter we use to determine healtier option\r\n\t\t\tactualFoodsSugar = actualFoodsNutrients.getReport().getFood().getNutrients().stream().filter(x -> x.getName().toUpperCase().contains(Constants.SUGAR)).findFirst();\r\n\t\t\tif(!actualFoodsSugar.isPresent())\r\n\t\t\t{\r\n\t\t\t\treturn result = \"No results for Image. Sugar content unavailable\";\r\n\t\t\t}\r\n\t\t\tdouble actualFoodSugarNum = Double.valueOf(actualFoodsSugar.get().getValue());\r\n\t\t\tif(actualFoodSugarNum <= 0)\r\n\t\t\t{\r\n\t\t\t\treturn result = \"The image you uploaded is the healthiest kind of \" + item.getGeneralFoodName() + \" there is!\" + \" It has zero sugars.\";\r\n\t\t\t}\r\n\t\t\tfor(Item element: otherSimilarFoods.getList().getItem())\r\n\t\t\t{\r\n\t\t\t\totherSimilarFoodsNutrients = searchNutrientByFoodNo(element.getNdbno());\r\n\t\t\t\totherSimilarFoodsSugar = otherSimilarFoodsNutrients.getReport().getFood().getNutrients().stream().filter(x -> x.getName().toUpperCase().contains(Constants.SUGAR)).findFirst();\r\n\t\t\t\tif(!otherSimilarFoodsSugar.isPresent())\r\n\t\t\t\t\tcontinue;\t\t\t\t\r\n\t\t\t\tdouble otherFoodsSugarNum = Double.valueOf(otherSimilarFoodsSugar.get().getValue());\r\n\t\t\t\tif(otherFoodsSugarNum < actualFoodSugarNum)\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble scale = Math.pow(10, 2);\r\n\t\t\t\t\tdouble percentDiff = ((actualFoodSugarNum - otherFoodsSugarNum)/actualFoodSugarNum) * 100;\r\n\t\t\t\t\tpercentDiff = Math.round(percentDiff * scale) / scale;\r\n\t\t\t\t\tString manufacturer = (element.getManu().equals(\"none\")) ? \"N/A\" : element.getManu();\r\n\t\t\t\t\t//result = element.getName() + \" is a healther option.\" + \"\\n\" + \"Made by: \" + manufacturer + \"\\n\" + \"It has \" + percentDiff + \" percent less sugar\";\r\n\t\t\t\t\t//result = \"Healthier option found \";\r\n\t\t\t\t\tresult = \" A healthier option is: \" + element.getName() + \"\\n\" + \"Made by: \" + manufacturer + \"\\n\" + \"It has \" + percentDiff + \" percent less sugar\";\r\n\t\t\t\t\tresult = Utilities.encodeHtml(result);\r\n\t\t\t\t\tresult = Utilities.encodeJavaScript(result);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(result.isEmpty())\r\n\t\t\t\tresult = \"No healthier option found. Kindly go with the image uploaded\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static Drink makeSale(DrinkTypes type, double cost, String name, SizeTypes sizeType, ArrayList<ToppingsTypes> toppings, int sweetness) {\n\t\tDrink drink = null;\n\t\t\n\t\tswitch(type) {\n\t\tcase Coffee:\n\t\t\tdrink = new Coffee(cost, name, sizeType);\n\t\t\tbreak;\n\t\tcase Tea:\n\t\t\tdrink = new Tea(cost, name, sizeType, sweetness);\n\t\t}\n\n\t\tswitch(sizeType) {\n\t\t\tcase Small:\n\t\t\t\tdrink = new Small(drink);\n\t\t\t\tbreak;\n\t\t\tcase Medium:\n\t\t\t\tdrink = new Medium(drink);\n\t\t\t\tbreak;\n\t\t\tcase Large:\n\t\t\t\tdrink = new Large(drink);\n\t\t\t\tbreak;\n\n\t\t}\n\n\t\tfor(ToppingsTypes t: toppings) {\n\t\t\tswitch(t)\n\t\t\t{\n\t\t\tcase Boba:\n\t\t\t\tdrink = new Boba(drink);\n\t\t\t\tbreak;\n\t\t\tcase ChocolateDrizzle:\n\t\t\t\tdrink = new ChocolateDrizzle(drink);\n\t\t\t\tbreak;\n\t\t\tcase CaramelDrizzle:\n\t\t\t\tdrink = new CaramelDrizzle(drink);\n\t\t\t\tbreak;\n\t\t\tcase LycheeJelly:\n\t\t\t\tdrink = new LycheeJelly(drink);\n\t\t\t\tbreak;\n\t\t\tcase PassFruitJelly:\n\t\t\t\tdrink = new PassFruitJelly(drink);\n\t\t\t\tbreak;\n\t\t\tcase HoneyBoba:\n\t\t\t\tdrink = new HoneyBoba(drink);\n\t\t\t\tbreak;\n\t\t\tcase FreshStrawberries:\n\t\t\t\tdrink = new FreshStrawberries(drink);\n\t\t\t\tbreak;\n\t\t\tcase HalfMilk:\n\t\t\t\tdrink = new HalfMilk(drink);\n\t\t\t\tbreak;\n\t\t\tcase SoyMilk:\n\t\t\t\tdrink = new SoyMilk(drink);\n\t\t\t\tbreak;\n\t\t\tcase WholeMilk:\n\t\t\t\tdrink = new WholeMilk(drink);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn drink;\n\t}", "private static String getItemRarity(String[] itemSlot){\r\n String rarity = \"\";\r\n if(itemSlot[0].equals(\"Leather Helmet\")){\r\n leatherHelmet LeatherHelmet = new leatherHelmet();\r\n rarity = LeatherHelmet.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Chest Plate\")){\r\n leatherChestPlate LeatherChestPlate = new leatherChestPlate();\r\n rarity = LeatherChestPlate.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Boots\")){\r\n leatherBoots LeatherBoots = new leatherBoots();\r\n rarity = LeatherBoots.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Leather Gloves\")){\r\n leatherGloves LeatherGloves = new leatherGloves();\r\n rarity = LeatherGloves.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Boots\")){\r\n ironBoots IronBoots = new ironBoots();\r\n rarity = IronBoots.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Helmet\")){\r\n ironHelmet IronHelmet = new ironHelmet();\r\n rarity = IronHelmet.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Chest Plate\")){\r\n ironChestPlate IronChestPlate = new ironChestPlate();\r\n rarity = IronChestPlate.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Iron Gloves\")){\r\n ironGloves IronGloves = new ironGloves();\r\n rarity = IronGloves.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Short Sword\")){\r\n shortSword ShortSword = new shortSword();\r\n rarity = ShortSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Long Sword\")){\r\n longSword LongSword = new longSword();\r\n rarity = LongSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Great Sword\")){\r\n greatSword GreatSword = new greatSword();\r\n rarity = GreatSword.getRarity();\r\n return rarity;\r\n }else if(itemSlot[0].equals(\"Heaven Smiting Devil Slayer Sword\")){\r\n heavenSmitingDevilSlayerSword Honger = new heavenSmitingDevilSlayerSword();\r\n rarity = Honger.getRarity();\r\n return rarity;\r\n }\r\n return rarity;\r\n }", "public Cursor loadRecipesByType(String typeR) {\r\n Cursor c = db.query(recipes.TABLENAME, new String[]{recipes.TITLE, recipes.IMAGE, recipes.INGREDIENTS, recipes.STEPS, recipes.TYPE, recipes.TIME, recipes.PEOPLE, recipes.IDRECIPE}, recipes.TYPE + \"=\" + \"'\" + typeR + \"'\", null, null, null, null);\r\n if (c != null) c.moveToFirst();\r\n return c;\r\n }", "public String getFreighttype() {\n return freighttype;\n }", "public PURCHASE_TYPE getType(){\n return type;\n }", "private static void ListAnimalByType() {\n\t\t\n\t\tshowMessage(\"Choose one type to list:\\n\");\n showMessage(\"1 - Dog\");\n showMessage(\"2 - Cat\");\n showMessage(\"3 - Bird\");\n showMessage(\"4 - Hamster\");\n showMessage(\"5 - Rabbit\");\n showMessage(\"6 - Back to previous menu.\");\n \n int option = getUserAnimalByType();\n /** switch case option start below */\n\t\tswitch (option){\n\n case 1 : ToScreen.listAnimal(animals.getDogList(), true); ListAnimalByType();\n break;\n case 2 : ToScreen.listAnimal(animals.getCatList(), true); ListAnimalByType();\n break;\n case 3 : ToScreen.listAnimal(animals.getBirdList(), true); ListAnimalByType();\n \tbreak;\n case 4 : ToScreen.listAnimal(animals.getHamsterList(), true); ListAnimalByType();\n \tbreak;\n case 5 : ToScreen.listAnimal(animals.getRabbitList(), true); ListAnimalByType();\n \tbreak;\n case 6 : main();\n \tbreak;\n \n default: ListAnimalByType();\n\n\t\t}\n\t\t\n\t}", "public void getRestaurants () throws JSONException {\n\t\tint debug = 0; \n\t\tJSONObject js = new JSONObject(console.nextLine());\n\t\tfor (String name : JSONObject.getNames(js)) {\n\t\t\tJSONObject rest = js.getJSONObject(name);\n\t\t\tRestaurant r = new Restaurant(name);\n\t\t\tfor (String s : attributes) {\n\t\t\t\tif (rest.has(s)) {\n\t\t\t\t\tString v = rest.getString(s);\n\t\t\t\t\tif (v.contains(\"&amp;\")) {\n\t\t\t\t\t\tv =v.replace(\"&amp;\", \"and\");\n\t\t\t\t\t}\n\t\t\t\t\tif (v.contains(\"'\")) {\n\t\t\t\t\t\tv = v.replace(\"'\",\"\");\n\t\t\t\t\t}\n\t\t\t\t\tr.add(s,v);\n\t\t\t\t} else {\n\t\t\t\t\tr.add(s,\"\");\n\t\t\t\t}\n\t\t\t}\n\t\t\trestaurants.add(r);\n\t\t\t\n\t\t}\n\t\n\t\t\n\t}", "public Restaurant getSelectedRestaurant () {\n return restaurants.get(selectedRestaurant);\n }", "@Override\n\tpublic List<Type> listType() {\n\t\treturn goodsDao.listType();\n\t}", "public String seatType() {\n \t if (this.isCoachSeat) {\n \t\t return \"CoachSeat\";\n \t }\n \t else {\n \t\t return \"FirstClass\";\n \t }\n }", "boolean hasIngredientsFor(Drink drink);", "public void setFoodType(String food);", "public Item getDropType(int paramInt1, Random paramRandom, int paramInt2) {\n/* 27 */ return Items.MELON;\n/* */ }", "public static void displayRestaurants(Category category){\n ArrayList<Restaurant> restaurants = Restaurant.getCategorizedRestaurants(category.getCategory_id());\n for(int i = 0; i < restaurants.size(); i++){\n System.out.println(\"[\" + (i+1) + \"] \" + restaurants.get(i).getRestaurant_name());\n }\n\n }", "public void serveFood() {\r\n System.out.println(\"Serving food from \" + name + \" is a \" + type + \" restaurant\");\r\n }", "public ItemDisplay getDrinksDisplay() {\n\t\treturn dDisplay;\n\t}", "public void setRestaurant(Restaurant restaurant) {\n this.restaurant = restaurant;\n }", "public Pizza getPizza() {\n return this.pizzaType;\n }", "public Drinks getDrinkInOrderDetail(int drink_id) {\n SQLiteDatabase db = this.getReadableDatabase();\n String sqlSelectQuery = \"SELECT * FROM \" + CoffeeShopDatabase.DrinksTable.TABLE_NAME + \" dr, \"\n + CoffeeShopDatabase.OrderDetailTable.TABLE_NAME + \" od WHERE dr.\"\n + CoffeeShopDatabase.DrinksTable._ID + \" = \" + drink_id\n + \" AND dr.\" + CoffeeShopDatabase.DrinksTable._ID + \" = od.\" + CoffeeShopDatabase.OrderDetailTable.COLUMN_NAME_DRINK_ID;\n Cursor cursor = db.rawQuery(sqlSelectQuery, null);\n if (cursor != null) {\n cursor.moveToFirst();\n }\n Drinks drinks = new Drinks(\n cursor.getInt(cursor.getColumnIndex(CoffeeShopDatabase.DrinksTable._ID)),\n cursor.getString(cursor.getColumnIndex(CoffeeShopDatabase.DrinksTable.COLUMN_NAME_DRINK_NAME)),\n cursor.getString(cursor.getColumnIndex(CoffeeShopDatabase.DrinksTable.COLUMN_NAME_DESCRIPTION)),\n cursor.getString(cursor.getColumnIndex(CoffeeShopDatabase.DrinksTable.COLUMN_NAME_TYPE)),\n cursor.getDouble(cursor.getColumnIndex(CoffeeShopDatabase.DrinksTable.COLUMN_NAME_PRICE))\n );\n return drinks;\n }", "public String getRestaurantName() {\n return mRestaurantName;\n }", "@Override\r\npublic String getCelestialClassification() {\n\treturn \"DwarfPlanets\";\r\n}", "public Integer getRestaurantId() {\n return restaurantId;\n }", "public AlcoholicBeverage(BeverageType drinkType) {\n super(drinkType);\n }", "boolean hasGoodsType();", "protected Direction checkForDirt(Creature c){\r\n\t\tSensor s = c.getSensor();\r\n\t\tfor (Direction d : Direction.values()){\r\n\t\t\tint value = (int) s.getSense(d.name() + DirtBasedAgentSenseConfig.TYPE_SUFFIX).getValue();\r\n\t\t\tif (value == Environment.DIRT){\r\n\t\t\t\treturn d;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public String food();", "public List<Drink> getDrink() {\n\tString sql = \"select * from drink\";\n\t\n\tList<Drink>listDrink = new ArrayList<>();\n\t\n\ttry {\n\t\tPreparedStatement preparedStatement = ConnectionToTheBase.getConnectionToTheBase().getConnection().prepareStatement(sql);\n\t\tResultSet rs = preparedStatement.executeQuery();\n\t\twhile(rs.next()) {\n\t\t\tDrink drink = new Drink();\n\t\t\tdrink.setId(rs.getInt(\"Id_drink\"));\n\t\t\tdrink.setName(rs.getString(\"Name_Drink\"));\n\t\t\tdrink.setPrice(rs.getDouble(\"Price\"));\n\t\t\t\n\t\t\tlistDrink.add(drink);\n\t\t}\n\t} catch (SQLException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t}\n\t\n\t\n\treturn listDrink;\n}", "public boolean findType(BikeType type){ //Checks if the same name and rental price is registered - true if it's found\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(FIND_TYPE)){\n \n ps.setString(1, type.getTypeName());\n ps.setDouble(2, type.getRentalPrice());\n ResultSet rs = ps.executeQuery();\n if(rs.isBeforeFirst()){\n return true;\n }\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return false;\n }", "UsedTypes getTypes();", "public void diplayAvailableFood() {\n\t\tfor (int i = 0; i < food.size(); i++) {\n\t\t\tSystem.out.print(food.get(i).name + \" \");\n\t\t}\n\t}", "public Restaurant getRestaurant(Long id) {\n\t\treturn restaurantRepository.findOne(id);\n\t}", "public DiscountTypes getDiscountTypes() {\n return discountTypes;\n }", "public void findByType(String type)\n {\n boolean found = false;\n for(KantoDex entry : entries)\n {\n if(entry.getTypes1().contains(type) && !type.equals(\"\"))\n {\n found = true;\n } \n }\n if(!found)\n {\n System.out.println(\"You have input a nonexistent type, or the type was not applicable to this entry.\"); \n }\n else\n {\n System.out.println(\"All Pokedex entries of type \" + type + \":\");\n for(KantoDex entry : entries)\n {\n if(entry.getType1().equals(type) || entry.getType2().equals(type))\n {\n entry.display();\n }\n }\n }\n }", "static int askProductType() {\n\n int choice; // initialize return variable\n\n choice = Validate.readInt(ASK_PRODUCT_TYPE, 2); // display options to user for products and store result if valid choice\n\n return choice; // return users choice\n }", "private String findTypeofOrder(String orderName)\n {\n\n for (String partNameofOrder : orderName.split(\" \"))\n {\n for (Food.Types typeName : Food.Types.values()) {\n if (typeName.toString().equals(partNameofOrder)) {\n return Food.type;\n }\n }\n\n for (Medicine.Types typeName : Medicine.Types.values()) {\n if (typeName.toString().equals(partNameofOrder)) {\n return Medicine.type;\n }\n }\n\n for (Book.Types typeName : Book.Types.values()) {\n if (typeName.toString().equals(partNameofOrder)) {\n return Book.type;\n }\n }\n }\n return OtherItem.type;\n }", "public interface RestaurantRest {\r\n\t}", "public int availableCars(String type) {\r\n\t\tString typeCar = type.trim().toLowerCase();\r\n\t\tint count = 0;\r\n\r\n\t\tif (typeCar.equals(\"small\")) {\r\n\t\t\tfor (InterfaceAbstractCar car : companyCars) {\r\n\t\t\t\tif (car.getType().equals(TypeOfCar.SMALL) && !car.isCarRented()) {\r\n\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (typeCar.equals(\"large\")) {\r\n\t\t\tfor (InterfaceAbstractCar car : companyCars) {\r\n\t\t\t\tif (car.getType().equals(TypeOfCar.LARGE) && !car.isCarRented()) {\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\"Type of car has been entered incorrectly. Needs to be 'small' or 'large'\");\r\n\t\t}\r\n\r\n\t\treturn count;\r\n\t}", "public ArrayList<String> getRankedBrands(String type){\n\t\tArrayList<String> rank = new ArrayList<String>();\n\t\tHashtable<String, BrandsData> brands = this.getPromoPerBrand();\n\t\tArrayList<BrandsData> temp = new ArrayList<BrandsData>(brands.values());\n\t\tCollections.sort(temp, new Comparator<BrandsData>() {\n\t\t\t@Override\n\t\t\tpublic int compare(BrandsData b1, BrandsData b2) {\n\t\t\t\tif(type.equals(\"Price Disc.\")) {\n\t\t\t\t\tdouble value = b2.getPriceDisc(thisPeriod) - b1.getPriceDisc(thisPeriod);\n\t\t\t\t\treturn (int) Math.round(value);\n\t\t\t\t}else if (type.equals(\"Feature\")) {\n\t\t\t\t\tdouble value = b2.getFeat(thisPeriod) - b1.getFeat(thisPeriod);\n\t\t\t\t\treturn (int) Math.round(value);\n\t\t\t\t}else if (type.equals(\"Display\")) {\n\t\t\t\t\tdouble value = b2.getDisplay(thisPeriod) -b1.getDisplay(thisPeriod);\n\t\t\t\t\treturn (int) Math.round(value);\n\t\t\t\t} else if (type.equals(\"Quality\")) {\n\t\t\t\t\tdouble value = b2.getQual(thisPeriod) - b1.getQual(thisPeriod);\n\t\t\t\t\treturn (int) Math.round(value);\n\t\t\t\t} else if (type.equals(\"sales\")) {\n\t\t\t\t\tdouble value = b2.getSales(thisPeriod) - b1.getSales(thisPeriod);\n\t\t\t\t\treturn (int) Math.round(value);\n\t\t\t\t} else {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tfor (int i=0; i<temp.size(); i++) {\n\t\t\trank.add(temp.get(i).getBrand());\n\t\t}\n\t\t\n\t\treturn rank;\n\t}", "@Override\n public byte getType() {\n return TYPE_DIGITAL_GOODS;\n }", "@Override\n\tprotected Pizza createPizza(String type) {\n\t\tPizza pizza = null;\n\t\tPizzaIngredientFactory pizzaIngredientFactory = new NYPizzaIngredientFactory();\n\t\tif(type.equals(\"cheese\")){\n\t\t\tpizza = new CheesePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Cheese Pizza\");\n\t\t} else if(type.equals(\"veggie\")){\n\t\t\tpizza = new VeggiePizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Veggie Pizza\");\n\t\t} else if(type.equals(\"clam\")) {\n\t\t\tpizza = new ClamPizza(pizzaIngredientFactory);\n\t\t\tpizza.setName(\"NY Style Clam Pizza\");\n\t\t} return pizza;\n\t}", "public String getType() {\n /**\n * @return type of Ice Cream\n */\n return type;\n }", "public String getType() {\n if(iType == null){\n ArrayList<Identification_to_quantitation> lLinkers = this.getQuantitationLinker();\n for (int j = 0; j < lLinkers.size(); j++) {\n if (lLinkers.get(j).getL_identificationid() == this.getIdentificationid()) {\n this.setType(lLinkers.get(j).getType());\n }\n }\n }\n return iType;\n }", "public List<Food> getAllFoodsFromRestaurant(final int restaurantId) throws ExecutionException, InterruptedException {\n class GetAllFoodsFromRestaurantTask extends AsyncTask<Integer,Void,List<Food>>\n {\n @Override\n protected List<Food> doInBackground(Integer... restaurantId) {\n List<Food> allFoods = mainDatabase.foodDao().getAllFoodsForRestaurant(restaurantId[0]);\n List<Food> foodsAboveThreshold = new ArrayList<>();\n for (Food food : allFoods) {\n if (food.getNutritionalInfo().getCalories() > 10) {\n foodsAboveThreshold.add(food);\n }\n }\n return foodsAboveThreshold;\n }\n }\n return new GetAllFoodsFromRestaurantTask().execute(restaurantId).get();\n }", "public OreType getOreType() \n {\n return m_oreType;\n }", "public ArrayList<BikeType> getAllTypes(){\n typelist = new ArrayList<>();\n\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(ALL_TYPES);\n ResultSet rs = ps.executeQuery()){\n\n while(rs.next()){\n BikeType type = new BikeType(rs.getString(cTypeName),rs.getDouble(cRentalPrice));\n type.setTypeId(rs.getInt(cTypeId));\n typelist.add(type);\n }\n\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return typelist;\n }", "public ArrayList<Restaurant> nearbyRestaurants(){\r\n\t\tint closestlatindex = BinarySearch.indexOf(FindPath.rlist, lat);\r\n\t\treturn BinarySearch.getlist(lat, lng, closestlatindex);\t\t\r\n\t}", "@Test\n\tpublic void testPurachase() {\n\t\tassertTrue(order.purachaseCheeseMeal().getMeal().get(0) instanceof CheeseSandwich);\n\t\tassertTrue(order.purachaseCheeseMeal().getMeal().get(1) instanceof OrangeJuice);\n\n\t\tassertTrue(order.purachaseTunaMeal().getMeal().get(0) instanceof TunaSandwich);\n\t\tassertTrue(order.purachaseTunaMeal().getMeal().get(1) instanceof OrangeJuice);\n\t}", "@Override\n public int getCount() {\n return drinks.size();\n }", "public boolean isFood(){\n\t\treturn foodFlag;\n\t}", "String getType();", "String getType();", "String getType();" ]
[ "0.65527457", "0.6516978", "0.6427429", "0.6408655", "0.6408655", "0.6408218", "0.63683", "0.6343112", "0.6251023", "0.60780895", "0.60153884", "0.59831256", "0.59194815", "0.5755576", "0.572391", "0.5656866", "0.56249696", "0.559406", "0.55546075", "0.5551621", "0.5534608", "0.5522713", "0.5512392", "0.54764163", "0.5460518", "0.54211426", "0.5418433", "0.5379356", "0.5357853", "0.5348754", "0.5344197", "0.5342036", "0.5336405", "0.53318715", "0.5320079", "0.53168696", "0.52786934", "0.5277608", "0.5267393", "0.52546036", "0.5248977", "0.52423054", "0.5227737", "0.5224114", "0.5223769", "0.5188751", "0.5165183", "0.51600784", "0.5132241", "0.51292235", "0.5119848", "0.511918", "0.5112432", "0.5106758", "0.5101632", "0.5100382", "0.50953877", "0.5093898", "0.50931025", "0.5092356", "0.5073945", "0.5072823", "0.5069298", "0.5057953", "0.5057013", "0.505442", "0.50522363", "0.50501347", "0.50399715", "0.5012343", "0.5003197", "0.49996504", "0.49933228", "0.49921948", "0.49777883", "0.49765298", "0.49751675", "0.49689072", "0.49683088", "0.49537867", "0.49525052", "0.49487987", "0.49345118", "0.49335167", "0.4931348", "0.4926083", "0.49240538", "0.4918692", "0.49167764", "0.4915715", "0.4913681", "0.4902794", "0.49022895", "0.49005798", "0.48966354", "0.489501", "0.48826835", "0.48818696", "0.48818696", "0.48818696" ]
0.71643996
0
Sets the type of food in the restaurant
public void setTypeOfDRink(String _typeOfDrink) { typeOfDrink = _typeOfDrink; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTypeOfFood(String foodType){\n typeOfFood = foodType;\n }", "public void setFoodType(String food);", "public void setTypeOfFood(String _typeOfFood)\n {\n typeOfFood = _typeOfFood;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n\tpublic void setRestaurant(RestaurantChung restaurant) {\n\t\t\n\t}", "public void setFood(int foodIn){\r\n\t\tfood = foodIn;\r\n\t}", "public void setRestaurant(Restaurant restaurant) {\n this.restaurant = restaurant;\n }", "private void setPizza(Pizza type) throws IllegalPizza {\n if(type == null)\n throw new IllegalPizza(\"Invalid pizza!\");\n pizzaType = type;\n }", "private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "public void setBreedType(EnumDragonBreed type) {\n\t\tgetBreedHelper().setBreedType(type);\n\t}", "public void setRestaurant(online.food.ordering.Restaurant _restaurant)\n {\n restaurant = _restaurant;\n }", "public String getTypeOfFood()\n {\n return typeOfFood;\n }", "public String getFoodType() {\n return \"Carnivore\";\n }", "public void setType(int type) {\n type_ = type;\n }", "public String getTypeOfFood(){\n return typeOfFood;\n }", "public void setType(String type) {\n\t\tif (Input.isTypeValid(furniture.toLowerCase(), type.toLowerCase())) {\n\t\t\tLocateRequest.type = type; // makes sure that type is valid\n\t\t} else {\n\t\t\t// error message that type is not valid\n\t\t\tSystem.err.print(\"The furniture type provided is not valid\");\n\t\t}\n\t}", "public void setOreType() {\n\t\tif (subType.equalsIgnoreCase(\"poor\")) {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Poor Nether/End Ores\n\t\t\t\tif (isDust()) {\n\t\t\t\t\tcrushedItem = getDustTiny();\n\t\t\t\t\tdropType = (dropType == 3 || dropType == 0) ? 5 : 0;\n\t\t\t\t\tsetOreValues(2, 8, 4, 8, 8);\n\t\t\t\t\tsetSmeltingOutput(getDustTiny(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tcrushedItem = getNugget();\n\t\t\t\t\tdropType = (dropType == 2 || dropType == 0) ? 0 : 0;\n\t\t\t\t\tsetOreValues(1, 1, 3, 6, 6);\n\t\t\t\t\tsetSmeltingOutput(getNugget(smeltAmount));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Poor Sand/Gravel/Stone Ores\n\t\t\t\tif (isDust()) {\n\t\t\t\t\tcrushedItem = getDustTiny();\n\t\t\t\t\tdropType = (dropType == 3) ? 5 : 0;\n\t\t\t\t\tsetOreValues(1, 4, 2, 4, 4);\n\t\t\t\t\tsetSmeltingOutput(getDustTiny(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tcrushedItem = getNugget();\n\t\t\t\t\tdropType = (dropType == 2) ? 4 : 0;\n\t\t\t\t\tsetOreValues(1, 2, 1, 2, 2);\n\t\t\t\t\tsetSmeltingOutput(getNugget(smeltAmount));\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (subType.equalsIgnoreCase(\"dense\")) {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Dense Nether/End Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(8, 32, 16, 32, 32);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(6, 16, 8, 16, 16);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 8, 16, 16);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Dense Sand/Gravel/Stone Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(3, 8, 6, 8, 8);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(2, 6, 3, 6, 6);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 6;\n\t\t\t\t\t\tsetOreValues(3, 3, 3, 6, 6);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tif (type.equalsIgnoreCase(\"nether\") || type.equalsIgnoreCase(\"end\")) {\n\t\t\t\t// Nether/End Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(3, 2, 8, 16, 16);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(2, 1, 4, 8, 8);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 4, 8, 8);\n\t\t\t\t\t\tclearSmeltingOutput();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Stone Ores\n\t\t\t\tif (isDust() || dropType == 3) {\n\t\t\t\t\tdropType = 3;\n\t\t\t\t\tsetOreValues(1, 2, 2, 4, 4);\n\t\t\t\t\tsetSmeltingOutput(getDust(smeltAmount));\n\t\t\t\t} else {\n\t\t\t\t\tif (dropType == 2) {\n\t\t\t\t\t\tsetOreValues(1, 1, 1, 2, 2);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdropType = 0;\n\t\t\t\t\t\tsetOreValues(1, 1, 1, 2, 2);\n\t\t\t\t\t\tsetSmeltingOutput(getIngot(smeltAmount));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "void setType(Type type)\n {\n this.type = type;\n }", "void setType(java.lang.String type);", "public void setType(type type) {\r\n\t\tthis.Type = type;\r\n\t}", "public void setType(int type) {\r\n this.type = type;\r\n }", "public void setType(int type) {\r\n this.type = type;\r\n }", "public void setType (int type) {\n this.type = type;\n }", "public void setType (int type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public abstract void setType();", "public void setType( int type ) {\r\n typ = type;\r\n }", "public void setType(int t){\n this.type = t;\n }", "public void setType(String type){\n \tthis.type = type;\n }", "public void setType(String type){\n this.type = type;\n }", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType( final int type )\n {\n this.type = type;\n fireActionChanged();\n }", "public void setType(int type) {\n this.type = type;\n }", "public void settype(String cat) { this.type = cat; }", "void setType(String type) {\n this.type = type;\n }", "public void setType(Type type){\n\t\tthis.type = type;\n\t}", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(Type type) {\n this.type = type;\n }", "public void setType(int pType) {\n mType = pType;\n }", "public void setType( String type )\n {\n this.type = type;\n }", "public void setType(String newValue);", "public void setType(String newValue);", "public final void setType(String type){\n\t\tthis.type = type;\t\n\t}", "private void setType(String type) {\n mType = type;\n }", "public void setType(Object type)\r\n {\r\n\tthis.type = type;\r\n }", "private void setTipo(int tipo) {\r\n\t\tthis.tipo = tipo;\r\n\t}", "public void setType(int type)\n\t{\n\t\tthis.type = type;\n\t}", "private void setHabitType() {\n String title = getIntent().getStringExtra(\"ClickedHabitType\");\n habit_type = findHabitType(allHabits, title);\n }", "public void setTipo(String tipo);", "public void setType( String type ) {\n this.type = type;\n }", "public void setType(String type) {\n m_Type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "protected void set_food_level(int food_level)\n {\n this.food_level = food_level;\n }", "public void change_type(int type_){\n\t\ttype = type_;\n\t\tif(type != 0)\n\t\t\toccupe = 1;\n\t}", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "@Override\r\n\tpublic void setTipo(Tipo t) {\n\t\t\r\n\t}", "public void setType(String newtype)\n {\n type = newtype;\n }", "public void setType(int t) {\r\n\t\ttype = t;\r\n\t}", "public void setType(boolean type) {\n this.type = type;\n }", "final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }", "public void setType(int type) {\n\t\tthis.type = type;\n\t}", "public void setType(Type t) {\n type = t;\n }", "public void setType (String typ) {\n type = typ;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "void changeType(NoteTypes newType) {\n this.type = newType;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String name){\n\t\ttype = name;\n\t}" ]
[ "0.84484214", "0.81962967", "0.8067113", "0.6952516", "0.6952516", "0.67865676", "0.6696349", "0.66289204", "0.65755886", "0.6538958", "0.65202516", "0.65202516", "0.65202516", "0.64020914", "0.6395879", "0.6338898", "0.6333605", "0.63248533", "0.6303749", "0.628412", "0.6260484", "0.6246017", "0.62125945", "0.6201173", "0.61919594", "0.61919594", "0.61887145", "0.61887145", "0.6187131", "0.6172457", "0.61639285", "0.6160571", "0.6158499", "0.615564", "0.6153082", "0.6149945", "0.6147814", "0.6140575", "0.61389405", "0.61147577", "0.6111334", "0.6111334", "0.6111334", "0.6108607", "0.61023754", "0.60825497", "0.60825497", "0.60781366", "0.6076172", "0.607162", "0.6060395", "0.6048202", "0.6047151", "0.6046541", "0.6044747", "0.6038491", "0.6030259", "0.60290414", "0.60171634", "0.60124207", "0.60124207", "0.60124207", "0.60124207", "0.60123163", "0.60123163", "0.60110277", "0.60110277", "0.60110277", "0.60067207", "0.6006298", "0.6002191", "0.60018605", "0.59798414", "0.59777266", "0.59695816", "0.59658855", "0.5958476", "0.5952359", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.59399706", "0.5937666" ]
0.0
-1
Sets the resturant's address
public void setAddress(String _address){ address = _address; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Restaurant setRestaurantAddress(Address address);", "public void setAddress(String adrs) {\n address = adrs;\n }", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setExternalAddress(String address);", "@Override\n public void setAdress(Adress adress) {\n this.adress = adress;\n }", "public void setAddress(final String address){\n this.address=address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(String address) { this.address = address; }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String s) {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\taddress = s;\t\t\r\n\t}", "public void setAddr(String addr) {\n this.addr = addr;\n }", "public void setAddress(String address) throws JAXRException {\n this.address = address;\n }", "public void setAddress(String address)\n {\n this.address = address;\n }", "public void setAddress(java.lang.String param) {\r\n localAddressTracker = param != null;\r\n\r\n this.localAddress = param;\r\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setInternalAddress(String address);", "public void setAdress(Adress adr) {\r\n // Bouml preserved body begin 00040F82\r\n\t this.adress = adr;\r\n // Bouml preserved body end 00040F82\r\n }", "public void setAddress(final URL value) {\n this.address = value;\n }", "Builder setAddress(String address);", "void setAdress(String generator, String address);", "public void setAddress(String address) {\n try {\n if (address == null ||\n address.equals(\"\") ||\n address.equals(\"localhost\")) {\n m_Address = InetAddress.getLocalHost().getHostName();\n }\n } catch (Exception ex) {\n log.error(\"setAddress()\",ex);\n }\n m_Address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String string) {\n\t\tthis.address = string;\n\t}", "public void setAddress(final String address) {\n this._address = address;\n }", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public void setAddr(String addr) {\n\t\tthis.addr = addr;\n\t}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(java.lang.String address) {\r\n this.address = address;\r\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setAddress(final String address) {\n\t\tthis.address = address;\n\t}", "@Override\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setAddress(String address) {\n if (getAddresses().isEmpty()) {\n getAddresses().add(address);\n } else {\n getAddresses().set(0, address);\n }\n }", "public void setAddress(int address)\n {\n this.address = address;\n }", "public final void setAddress(final String addressNew) {\n this.address = addressNew;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setLocationAddress(final BwString val) {\n locationAddress = val;\n }", "public void setBaseAddress(int targetAddress, int baseAddress);", "private void setPrefAddress( String addr ) {\n\t\tmPreferences.edit().putString( PREF_ADDR, addr ).commit();\n\t}", "public void setAddress(String newAddress) {\r\n\t\tthis.address = newAddress;\r\n\t}", "@Override\r\n\tpublic void setAddress(String address) {\n\t\tif (address == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (address.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.address = address;\r\n\t}", "@Override\r\n public void setIPAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddr(String addr) {\n this.addr = addr == null ? null : addr.trim();\n }", "public void setAddr(String addr) {\n this.addr = addr == null ? null : addr.trim();\n }", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setBaseAddress(String base_address) {\n try {\n this.base_address = new URILocator(base_address);\n } catch (MalformedURLException e) {\n throw new OntopiaRuntimeException(e);\n }\n }", "public void setNatAddress(String addr);", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) { throw new NullPointerException(); }\n address_ = value;\n bitField0_ |= 0x00000020;\n onChanged();\n return this;\n }", "public void setaddress(String address) {\n\t\t_address = address;\n\t}", "public void setAddress(InetAddress address) {\r\n\t\tthis.address = address;\r\n\t}", "void setAddress(String address) throws IllegalArgumentException;", "public Builder setAddress(\n\t\t\t\t\t\tjava.lang.String value) {\n\t\t\t\t\tif (value == null) {\n\t\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t\t}\n\n\t\t\t\t\taddress_ = value;\n\t\t\t\t\tonChanged();\n\t\t\t\t\treturn this;\n\t\t\t\t}", "public void setAddress( java.lang.String newValue ) {\n __setCache(\"address\", newValue);\n }", "public void setAddress (java.lang.String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(java.lang.String address)\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(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ADDRESS$2);\n }\n target.setStringValue(address);\n }\n }", "public void setAddress(org.xmlsoap.schemas.wsdl.soap.TAddress address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.xmlsoap.schemas.wsdl.soap.TAddress target = null;\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().find_element_user(ADDRESS$0, 0);\n if (target == null)\n {\n target = (org.xmlsoap.schemas.wsdl.soap.TAddress)get_store().add_element_user(ADDRESS$0);\n }\n target.set(address);\n }\n }", "public void setAddress(org.nhind.config.Address[] address) {\n this.address = address;\n }", "public void setRegaddress(java.lang.String param) {\r\n localRegaddressTracker = param != null;\r\n\r\n this.localRegaddress = param;\r\n }", "public void setAddress(String address) {\n\t\tthis.address = StringUtils.trimString( address );\n\t}", "HandlebarsKnotOptions setAddress(String address) {\n this.address = address;\n return this;\n }", "public void setAddress2(String address2);", "public Builder setServerAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n serverAddress_ = value;\n onChanged();\n return this;\n }", "@Generated(hash = 607080948)\n public void setAddress(Address address) {\n synchronized (this) {\n this.address = address;\n addressId = address == null ? null : address.getId();\n address__resolvedKey = addressId;\n }\n }", "public void setAdresse(String adresse)\n {\n this.adresse = adresse;\n }", "public void setBillingAddressInCart(Address addr);", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }" ]
[ "0.7354896", "0.7278279", "0.7154117", "0.7154117", "0.7154117", "0.7154117", "0.70682395", "0.7020092", "0.6987047", "0.6950461", "0.6950461", "0.6950461", "0.69362515", "0.6928799", "0.6928487", "0.6897947", "0.6889186", "0.6850106", "0.6814549", "0.6808783", "0.6808783", "0.6796729", "0.6796729", "0.6796729", "0.6736699", "0.6724803", "0.6709307", "0.6709276", "0.670901", "0.6700666", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6663713", "0.6618552", "0.6613605", "0.6610994", "0.6610994", "0.66091865", "0.65990597", "0.65990597", "0.6597232", "0.6590081", "0.658675", "0.65557617", "0.6550979", "0.6550979", "0.6515476", "0.6507496", "0.6502154", "0.6496185", "0.64932555", "0.64932555", "0.64870214", "0.6480486", "0.64736503", "0.6462751", "0.6453109", "0.64486617", "0.6421994", "0.6421994", "0.6384251", "0.6384251", "0.6384251", "0.6384251", "0.6384251", "0.63753676", "0.6372399", "0.63672507", "0.63634807", "0.63255966", "0.63193834", "0.6314606", "0.630895", "0.62950176", "0.62924224", "0.62605596", "0.6258826", "0.62105936", "0.6205466", "0.6204767", "0.61994046", "0.6196066", "0.6194296", "0.6174709", "0.6150805", "0.61047375" ]
0.70503
7
Returns the resturant's 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();", "public String getExternalAddress();", "String getAddress();", "String getAddress();", "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();", "public String getAddress() throws JAXRException{\n return address;\n }", "public String address() {\n return Codegen.stringProp(\"address\").config(config).require();\n }", "public String getInternalAddress();", "public final String getAddress() {\n return 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 }", "public URL getAddress() {\n return address;\n }", "public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "@Override\r\n\tpublic String getAddress() {\n\t\treturn address;\r\n\t}", "public java.lang.String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\n return this._address;\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() {\r\n return 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 }", "public String getAddress()\n {\n \treturn address;\n }", "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 address;\n\t}", "public String address() {\n return this.address;\n }", "public String address() {\n return this.address;\n }", "public String getAddress() {\r\n\t\treturn address;\r\n\t}", "public String getAddress() {\r\n\t\treturn address;\r\n\t}", "public String getAddress(){\n\t\treturn this.address;\n\t}", "@AutoEscape\n\tpublic String getAddress();", "@AutoEscape\n\tpublic String getAddress();", "@AutoEscape\n\tpublic String getAddress();", "@AutoEscape\n\tpublic String getAddress();", "public String getAddress() {\r\n\t\treturn this.address;\r\n\t}", "public String getAddress() {\n\t\tlog.info(\"NOT IMPLEMENTED\");\n\t\treturn \"\";\n\t}", "String getAddr();", "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 }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return this.address;\n }", "public String getAddress() {\n return this.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}", "@Override\n\tpublic String getAddress() {\n\t\treturn address;\n\t}", "public java.lang.String getAddress () {\n\t\treturn address;\n\t}", "public java.lang.String getAddress() {\r\n return localAddress;\r\n }", "public String getAddress() {\n\t\treturn this.address;\n\t}", "public String getNatAddress();", "public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}", "public String getFrontEndAddress() {\n //TODO(alown): should this really only get the first one?\n return (this.isSSLEnabled ? \"https://\" : \"http://\") + frontendAddressHolder.getAddresses().get(0);\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 getBaseAddress() {\n return base_address.getAddress();\n }", "public String getaddress() {\n\t\treturn _address;\n\t}" ]
[ "0.7736742", "0.7736742", "0.7736742", "0.7736742", "0.7736742", "0.7736742", "0.76696736", "0.7641675", "0.7641675", "0.7566834", "0.7566834", "0.7491375", "0.7457144", "0.73368305", "0.7318462", "0.7237419", "0.72211736", "0.7215581", "0.72107196", "0.71481216", "0.71161735", "0.709546", "0.7093571", "0.708786", "0.708786", "0.708786", "0.708786", "0.708786", "0.708786", "0.708786", "0.70868045", "0.70749235", "0.7071397", "0.70669717", "0.7063243", "0.7063243", "0.70625436", "0.70625436", "0.7053536", "0.70402044", "0.70402044", "0.70402044", "0.70402044", "0.7038076", "0.7035255", "0.7027429", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.7025795", "0.70241195", "0.70241195", "0.701563", "0.701563", "0.7013997", "0.7013997", "0.7013997", "0.7013997", "0.7013997", "0.7013997", "0.7013997", "0.7012872", "0.70122695", "0.70108724", "0.698818", "0.69877625", "0.69447166", "0.6936907", "0.6922077", "0.6904417", "0.6892979" ]
0.0
-1
getTotalCustomers() Gets the total customers and returns.
public int getTotalCustomers() { return totalCustomers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTotalCustomers(int _totalCustomers){\n this.totalCustomers = _totalCustomers;\n\n }", "public int getNumOfCustomers() {\n return this.numOfCustomers;\n }", "@Override\n\tpublic int countCustomers() {\n\t\treturn 0;\n\t}", "public int Customers()\r\n\t{\r\n\t\treturn customers.size();\r\n\t}", "int getCustomersCount();", "public int getNonPrunedCustomerCount() {\n return this.customers.size();\n }", "private int getNumberOfCustomers(){\n FileServices fs = new FileServices();\n return fs.loadCustomers().size();\n }", "public double getCustomerMoney(){\n double total = 0.0;\n for(Coin c : customerMoney){\n total += c.getValue();\n }\n return total;\n }", "void getTotalNumerCustomer();", "public static ObservableList<Customers> getAllCustomers() {\n return allCustomers;\n }", "@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}", "public List<Customer> getCustomers() {\n\t\treturn customers;\n\t}", "@Test\n\tpublic void totalCustomers()\n\t{\n\t\tassertTrue(controller.getReport().getTotalCustomers() == 3);\n\t}", "public Double getCostAmong(CustomerAdaptaded... customers) {\n\t\treturn this.getDistanceTimeCostMatrixDesorderCustomers().getTimeCostAmong(customers);\n\t}", "@Override\n\t@Transactional\n\tpublic List<AMOUNT> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<AMOUNT> theQuery = currentSession.createQuery(\"from Customer ORDER BY lastName\", AMOUNT.class);\n\n\t\t// execute query and get result list\n\t\tList<AMOUNT> customers = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn customers;\n\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn customerRepository.findAllCustomer();\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}", "@GET\n\t@Path(\"getAllCustomer\")\n\tpublic List<Customer> getAllCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getAllCustomer();\n\t}", "public int getTotalSales()\n {\n int sales = totalSales;\n totalSales = 0;\n return sales;\n }", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\n\t}", "public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }", "@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\r\n\t\tList<Customer> allCustomers = new ArrayList<Customer>();\r\n\t\tallCustomers = customerRepository.findAll();\r\n\t\tif (!allCustomers.isEmpty()) {\r\n\t\t\treturn allCustomers;\r\n\t\t} else {\r\n\t\t\tthrow new EmptyEntityListException(\"No Customers Found.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic List<CustomerData> getAllCustomer() {\n\t\treturn customerRepository.findAll();\n\t}", "public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }", "public double getTotalSales() {\n\t\tdouble total = 0;\n\n\t\tfor (Order o : orders) {\n\t\t\ttotal += o.totalPrice();\n\t\t}\n\n\t\treturn total;\n\t}", "public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}", "public int getTotal()\n\t{\n\t\treturn total;\n\t\t\n\t}", "public List<Customer> getAllCustomers() {\n return customerRepository.findAll();\n }", "public String getTotalDeposits(){\n double sum = 0;\n for(Customer record : bank.getName2CustomersMapping().values()){\n for(Account acc: record.getAccounts()){\n sum += acc.getOpeningBalance();\n }\n }\n return \"Total deposits: \"+sum;\n }", "public int count() {\n\t\tint count = cstCustomerDao.count();\n\t\treturn count;\n\t}", "@Override\n\tpublic Collection<Customer> getAllCustomers() throws Exception {\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\ttry {\n\t\t\tString getAllCustomers = \"select * from customer\";\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(getAllCustomers);\n\t\t\tint result = 0;\n\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tCustomer cust = new Customer();\n\t\t\t\t\tcust.setId(rs.getLong(\"ID\"));\n\t\t\t\t\tcust.setCustName(rs.getString(\"Cust_Name\"));\n\t\t\t\t\tcust.setPassword(rs.getString(\"Password\"));\n\t\t\t\t\tcustomers.add(cust);\n\t\t\t\t\tresult++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(result + \" Customers were retrieved.\");\n \n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not close the connection to the DB\");\n\t\t\t}\n\t\t}\n\t\treturn customers;\n\t}", "public int getTotal() {\n\t\t\treturn total;\n\t\t}", "@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Customer> theQuery =\n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\treturn customers;\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Customer order by lastName\", Customer.class)\n\t\t\t\t.getResultList();\n\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getTotal () {\r\n\t\treturn total;\r\n\t}", "public int getTotal() {\n\t\treturn total;\n\t}", "public int getTotal () {\n\t\treturn total;\n\t}", "public double getTotal(){\n\t\tdouble Total = 0;\n\t\t\n\t\tfor(LineItem lineItem : lineItems){\n\t\t\tTotal += lineItem.getTotal();\t\n\t\t}\n\t\treturn Total;\n\t}", "@Override\n\tpublic List<MstCustomerDto> getAllCustomer() {\n\t\tList<MstCustomerDto> listMstCustomerDtos=new ArrayList<>();\n\t\tList<Object[]> obj=new ArrayList<>();\n\t\t\n\t\tobj = mstCustomerDao.getAll();\n\t\tlistMstCustomerDtos = mapperFacade.mapAsList(obj, MstCustomerDto.class);\n\t\t\n\t\treturn listMstCustomerDtos;\n\t}", "public double getTotal() {\r\n\t\treturn total;\r\n\t}", "public String getCustomersName()\r\n {\r\n return customersName;\r\n }", "public ArrayList<Customer> getservedCustomers()\r\n {\r\n return this.servedCustomers;\r\n }", "public BigDecimal getTotal() {\n return total;\n }", "public BigDecimal getTotal() {\n return total;\n }", "public int getTotal() {\n\t\treturn this.total;\n\t}", "public double getTotal() {\n\t\treturn total;\n\t}", "public ArrayList<Customer> getAllCustomers();", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//create the query\n\t\tQuery<Customer> query = session.createQuery(\"from Customer order by lastName\", Customer.class);\n\t\t//get the result list\n\t\tList<Customer> customers = query.getResultList();\n\t\treturn customers;\n\t}", "@GetMapping(value = CustomerRestURIConstants.GET_ALL_CUSTOMER )\n\tpublic ResponseEntity<List<Customer>> list() {\n\t\tList<Customer> customers = customerService.getAllCustomers();\n\t\treturn ResponseEntity.ok().body(customers);\n\t}", "public int getTotal() {\n return total;\n }", "public int getTotal() {\n return total;\n }", "public Coverage getTotal() {\n return this.total;\n }", "@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic ArrayList<Customer> getCustomers() {\r\n\t\treturn custDao.readAll();\r\n\t}", "@GetMapping(\"/customers\")\n\tpublic List<Customer> getcustomers(){\n\t\t\n\t\treturn thecustomerService.getCustomers();\n\t}", "public BigDecimal getTotalPrice() {\n\t\t// the current total cost which the customer owes in the transaction\n\t\tBigDecimal total = new BigDecimal(0);\n\n\t\tArrayList<Item> currentPurchases = purchaseList.getCurrentPurchases(); \n\n\t\tfor (Item item : currentPurchases) {\n\t\t\ttotal = total.add(this.getItemPrice(item));\n\t\t}\n\n\t\treturn total;\n\t}", "@RequestMapping(method = RequestMethod.GET)\n\t\tpublic ResponseEntity<Collection<Customer>> getAllUsers() {\n\t\t\treturn service.getAllCustomers();\n\t\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\t\t\n\t\t// create a query ... sort by the lastname\n\t\tQuery<Customer> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\",Customer.class);\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}", "public Total getTotal() {\r\n\t\treturn total;\r\n\t}", "public int getTotal () {\n return total;\n }", "public int countServedCustomers()\r\n {\r\n int count = 0;\r\n //go through list and see which customers have non zero serve times--update count\r\n for(Customer c: this.Customers){\r\n if(c.getserveTime()> 0 ){\t\r\n count++;\r\n //add these customers to their own list\r\n this.servedCustomers.add(c);\r\n }\r\n }\r\n return count;\r\n }", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "@Override\n\tpublic Long getTotalCat() {\n\t\treturn categoriesDAO.getTotalCat();\n\t}", "public double calTotalAmount(){\n\t\tdouble result=0;\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tresult += this.cd.get(i).getPrice();\n\t\t}\n\t\treturn result;\n\t}", "@GetMapping(\"/customers\")\r\n\tprivate List<Customer> getAllCustomers() {\r\n\t\treturn customerService.getAllCustomers();\r\n\t}", "@Override\n\tpublic List<Customer> listCustomers() {\n\t\treturn null;\n\t}", "public BigDecimal getTotalCashPayment() {\n return totalCashPayment;\n }", "public static int getCountCustomer(int sales) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tint count = 0;\r\n\t\tString query = \"Select Count(customer_id) AS sales from sold_to WHERE salesman_id = ? AND status > 0;\";\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\tstmt.setInt(1, sales);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcount = rs.getInt(1);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException ex) {\r\n\t\t\tlogger.error(\"\", ex);\r\n\t\t\tSystem.out.printf(ex.getMessage());\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "@PreAuthorize(\"#oauth2.hasAnyScope('read','write','read-write')\")\n\t@RequestMapping(method = GET)\n\tpublic Mono<ResponseEntity<List<Customer>>> allCustomers() {\n\n\t\treturn repo.findAll().collectList()\n\t\t\t.filter(customers -> customers.size() > 0)\n\t\t\t.map(customers -> ok(customers))\n\t\t\t.defaultIfEmpty(noContent().build());\n\t}", "public int getTotalCoins() {\r\n\t\treturn goods.get(Resource.COIN);\r\n\t}", "public int getTotal() {\n return total;\n }", "@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\t\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t\t\t// create a query ... sort by last name\n\t\t\t\tQuery<Customer> theQuery = currentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t\t\t// execute query and get result list\n\t\t\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\t\t\t// return the results\n\t\t\t\treturn customers;\n\t}", "public CustomerService getCustomerService() {\n\t\treturn customerService;\n\t}", "public List<Customer> getCustomerList() {\n return new ArrayList<Customer>(customersList);\n }", "@RequestMapping(value = \"/customers\", method = RequestMethod.GET)\n public ResponseEntity<?> getCustomers() {\n Iterable<Customer> customerList = customerService.getCustomers();\n return new ResponseEntity<>(customerList, HttpStatus.OK);\n }", "public native int getTotal() /*-{\n\t\treturn this.total;\n\t}-*/;", "public double getTotal() {\n return Total;\n }", "@RequestMapping(\"getAllCustomers\")\r\n\t @ResponseBody\r\n\t public List<Customer> getAllCustomers() {\r\n\t\t return repo.findAll();\r\n\t }", "@ApiOperation(value = \"Lists all the customers\", notes = \"\")\n @GetMapping(produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public CustomerListDTO getCustomers() {\n\n return new CustomerListDTO(customerService.getCustomers());\n }", "public int countNumberClientsTotal() {\n\t\tint counter = 0;\n\t\tfor(int number : numberClients.values())\n\t\t\tcounter += number;\n\t\treturn counter;\n\t}", "public String allCustomers(){\n String outputString = \"Customer accounts:\"+\"\\n\";\n for(Customer record : bank.getName2CustomersMapping().values()){\n outputString += record.getFullName()+\" \"+record.getAccounts().toString()+\"\\n\";\n }\n return outputString;\n }", "public double calculateTotalCost() {\n finalTotal = (saleAmount + taxSubtotal + SHIPPINGCOST);\n\n return finalTotal;\n }", "public static List<Customer> getAllCustomers() {\r\n\t\tList<Customer> customerList = new ArrayList<Customer>();\r\n\t\tConnection conn = ConnectionFactory.getConnection();\r\n\r\n\t\tString query = \"SELECT customerUuid, customerType, customerName, personKey, addressKey FROM Customer\";\r\n\r\n\t\tPreparedStatement ps = null;\r\n\t\tResultSet rs = null;\r\n\t\tCustomer customer = null;\r\n\r\n\t\ttry {\r\n\t\t\tps = conn.prepareStatement(query);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString customerUuid = rs.getString(\"customerUuid\");\r\n\t\t\t\tString customerType = rs.getString(\"customerType\");\r\n\t\t\t\tString customerName = rs.getString(\"customerName\");\r\n\t\t\t\tint personKey = rs.getInt(\"personKey\");\r\n\t\t\t\tPerson primaryContact = Person.getPersonByKey(personKey);\r\n\t\t\t\tint addressKey = rs.getInt(\"addressKey\");\r\n\t\t\t\tAddress address = Address.getAddressByKey(addressKey);\r\n\t\t\t\t\r\n\t\t\t\tif (customerType.equals(\"G\")) {\r\n\t\t\t\t\tcustomer = new GovernmentCustomer(customerUuid, primaryContact, customerName, address);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcustomer = new CorporateCustomer(customerUuid, primaryContact, customerName, address);\r\n\t\t\t\t}\r\n\t\t\t\tcustomerList.add(customer);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"SQLException: \");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.closeConnection(conn, ps, rs);\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\tsetTotalCost((RETAIL_PRICE*.7)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<100){\n\t\t\tsetTotalCost((RETAIL_PRICE*.6)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse {\n\t\t\tsetTotalCost((RETAIL_PRICE*.5)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t}", "public double getTotal() {\r\n\r\n return getSubtotal() + getTax();\r\n }", "public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }", "@Override\n\tpublic int getBalanceToCustomer(String customerId) {\n\t\treturn 0;\n\t}", "public List<Customer> getCustomerList() {\r\n\t\tList<Object> columnList = null;\r\n\t\tList<Object> valueList = null;\r\n\t\tList<Customer> customers = new ArrayList<Customer>();\r\n\r\n\t\tif (searchValue != null && !searchValue.trim().equals(\"\")) {\r\n\t\t\tcolumnList = new ArrayList<Object>();\r\n\t\t\tvalueList = new ArrayList<Object>();\r\n\t\t\tcolumnList.add(searchColumn);\r\n\t\t\tvalueList.add(searchValue);\r\n\t\t}\r\n\t\tcustomers = customerService.searchCustomer(columnList, valueList,\r\n\t\t\t\tfirst, pageSize);\r\n\t\t\r\n\r\n\t\treturn customers;\r\n\t}", "public static float getTotal() {\n return total;\r\n }", "public ArrayList<Customer> getCustomerList() {\n\t\treturn customerList;\n\t}", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public Double getTotal() {\n return total;\n }", "public float getTotal(){\r\n\t\treturn Total;\r\n\t}", "public double getTotal() {\n return totalCost;\n }", "public static void fetchOrderTotal(String customerId)\n throws InterruptedException, ExecutionException {\n \n CompletableFuture<Integer> cfTotal\n = fetchOrder(customerId).thenCompose(o -> computeTotal(o));\n\n int total = cfTotal.get();\n logger.info(() -> \"Total: \" + total + \"\\n\");\n }", "@Override\n public double getTotal() {\n return total;\n }" ]
[ "0.72727424", "0.6853368", "0.6676634", "0.6572634", "0.64187354", "0.6280303", "0.6245089", "0.6176752", "0.6126171", "0.60432684", "0.60325116", "0.60200584", "0.6015485", "0.5991646", "0.5987031", "0.5939173", "0.59315926", "0.59067464", "0.5898464", "0.5882943", "0.5858171", "0.58267194", "0.57486516", "0.5735544", "0.57320154", "0.56953806", "0.5681316", "0.5680104", "0.56561345", "0.5652785", "0.5644316", "0.5642034", "0.5612391", "0.56087685", "0.56083184", "0.5601199", "0.55948704", "0.5592307", "0.5592307", "0.55745494", "0.5557532", "0.5555911", "0.5525693", "0.55073315", "0.547634", "0.5473842", "0.54687744", "0.54687744", "0.54607505", "0.5453425", "0.5452771", "0.5444734", "0.54412824", "0.5434686", "0.5434686", "0.54284024", "0.54223245", "0.5421519", "0.54210633", "0.5414523", "0.5409256", "0.5404519", "0.5396054", "0.5378421", "0.53764725", "0.53758776", "0.5374659", "0.5367629", "0.53561985", "0.5356101", "0.53547525", "0.5339915", "0.5337495", "0.5318075", "0.531434", "0.5313652", "0.53052515", "0.52977085", "0.5297216", "0.5287192", "0.5287109", "0.5287032", "0.528069", "0.52760506", "0.52730715", "0.52696633", "0.52557963", "0.5250837", "0.52475446", "0.524612", "0.52456623", "0.5241338", "0.5237839", "0.52326685", "0.52326685", "0.52326685", "0.5231346", "0.5224262", "0.5221188", "0.52188206" ]
0.8064279
0
getTotalCustomers() Sets the total customers.
public void setTotalCustomers(int _totalCustomers){ this.totalCustomers = _totalCustomers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getTotalCustomers()\n {\n return totalCustomers;\n }", "@Override\n\tpublic int countCustomers() {\n\t\treturn 0;\n\t}", "public int getNumOfCustomers() {\n return this.numOfCustomers;\n }", "@Test\n\tpublic void totalCustomers()\n\t{\n\t\tassertTrue(controller.getReport().getTotalCustomers() == 3);\n\t}", "public int Customers()\r\n\t{\r\n\t\treturn customers.size();\r\n\t}", "public void clearCustomers()\r\n\t{\r\n\t\tfor(int i=0;i<inStore.size();i++)\r\n\t\t{\r\n\t\t\tcustomers.add(inStore.get(i));\r\n\t\t}\r\n\t\tinStore.clear();\r\n\t}", "public void salesTotal(){\n\t\tif (unitsSold<10){\n\t\t\tsetTotalCost(basePrice);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<20){\n\t\t\tsetTotalCost((RETAIL_PRICE*.8)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t\t\n\t\t}\n\t\telse if (unitsSold<50){\n\t\t\tsetTotalCost((RETAIL_PRICE*.7)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse if (unitsSold<100){\n\t\t\tsetTotalCost((RETAIL_PRICE*.6)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t\telse {\n\t\t\tsetTotalCost((RETAIL_PRICE*.5)*unitsSold);\n\t\t\tsetDiscount(basePrice - this.getCost());\n\t\t}\n\t}", "public static void setAllCustomers(ObservableList<Customers> allCustomers) {\n Customers.allCustomers = allCustomers;\n System.out.println(\"The query has successfully applied all customers to the list\");\n }", "public void setTotal(int value) {\n this.total = value;\n }", "public int getNonPrunedCustomerCount() {\n return this.customers.size();\n }", "public void setTotal(int total) {\n this.total = total;\n }", "private int getNumberOfCustomers(){\n FileServices fs = new FileServices();\n return fs.loadCustomers().size();\n }", "public void setTotalRecords(int totalRecords) {\r\n this.totalRecords = totalRecords;\r\n }", "public void setTotal(int total) {\n\t\tthis.total = total;\n\t}", "void getTotalNumerCustomer();", "public void setTotalCost(float totalCost) {\n this.totalCost = totalCost;\n }", "int getCustomersCount();", "public void setTotalCost(float totalCost)\r\n\t{\r\n\t\tthis.totalCost = totalCost;\r\n\t}", "public void setTotal(float total) {\n this.total = total;\n }", "void setTotal(BigDecimal total);", "public void addSales(double totalSales) {\n this.total_sales = totalSales;\n }", "public void setTotal(BigDecimal total) {\n this.total = total;\n }", "public void setTotal(BigDecimal total) {\n this.total = total;\n }", "public void setTotal(Coverage total) {\n this.total = total;\n }", "public void setTotalCost (java.math.BigDecimal totalCost) {\n\t\tthis.totalCost = totalCost;\n\t}", "public void setTotal(Double total);", "public void setTotals(PersonReviewData totals) {\n this.totals = totals;\n }", "public void setTotal(Double total) {\n this.total = total;\n }", "public void setTotal(Double total) {\n this.total = total;\n }", "public void setTotal(Double total) {\n this.total = total;\n }", "public List<Customer> getCustomers() {\n\t\treturn customers;\n\t}", "public static ObservableList<Customers> getAllCustomers() {\n return allCustomers;\n }", "public void setTotalPassengers(int value) {\n this.totalPassengers = value;\n }", "public void incrementTotal() {\n\t\t\ttotal++;\n\t\t}", "@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.SETTER)\n\tpublic void setCustomers(final Collection<B2BCustomerModel> value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CUSTOMERS, value);\n\t}", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn customerRepository.findAllCustomer();\n\t}", "public Double getCostAmong(CustomerAdaptaded... customers) {\n\t\treturn this.getDistanceTimeCostMatrixDesorderCustomers().getTimeCostAmong(customers);\n\t}", "public void setTotal(Number value) {\n setAttributeInternal(TOTAL, value);\n }", "public void setTotalCost(String TotalCost) {\n this.TotalCost = TotalCost;\n }", "public void setTotalNumberOfTransactionLines(int totalNumberOfTransactionLines) {\n this.totalNumberOfTransactionLines = totalNumberOfTransactionLines;\n }", "public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\n\t}", "public void setCustomersName(String customersName)\r\n {\r\n this.customersName = customersName;\r\n }", "public void setTotalResults(Integer totalResults) {\r\n this.totalResults = totalResults;\r\n }", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}", "public int updateCustomer(Map customerMap, Map allData){\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public void setTcintmtotal(float _tcintmtotal)\r\n {\r\n this._tcintmtotal = _tcintmtotal;\r\n }", "public void setExpensesTotal(){\n\t\t\texpensesOutput.setText(\"$\" + getExpensesTotal());\n\t\t\tnetIncomeOutput.setText(\"$\" + getNetIncome());\n\t\t}", "private void calcTotalAmount(){\n\t totalAmount = 0;\n\t\tfor(FlightTicket ft : tickets)\n\t\t{\n\t\t\ttotalAmount += ft.getClassType().getFee() * getFlight().getFlightCost();\n\t\t}\n\t\tsetTotalAmount(totalAmount);\n\t}", "public void setTotalCount(int totalCount) {\n this.totalCount = totalCount;\n }", "public int countServedCustomers()\r\n {\r\n int count = 0;\r\n //go through list and see which customers have non zero serve times--update count\r\n for(Customer c: this.Customers){\r\n if(c.getserveTime()> 0 ){\t\r\n count++;\r\n //add these customers to their own list\r\n this.servedCustomers.add(c);\r\n }\r\n }\r\n return count;\r\n }", "public void updateCustomerInfo(){\n nameLabel.setText(customer.getName());\n productWantedLabel.setText(customer.getWantedItem());\n serviceManager.getTotalPrice().updateNode();\n }", "public void setTotalminions(int totalminions) {\n\t\tthis.totalminions = totalminions;\n\t}", "public void setCurrentCustomer(Customer currentCustomer) {\n\t\tthis.currentCustomer = currentCustomer;\n\t}", "public void setTotal_Venta(double total_Venta) {\n this.total_Venta = total_Venta;\n }", "public double getCustomerMoney(){\n double total = 0.0;\n for(Coin c : customerMoney){\n total += c.getValue();\n }\n return total;\n }", "@Override\n\tpublic void viewCustomers(Session session){\n\t\ttry{\n\t\t\tSystem.out.print(\"*----*****-------List of Customers-------*****----*\\n\");\n\t\t\t\n\t\t\t//pass these input items to client controller\n\t\t\tviewCustomers=mvc.viewCustomers(session);\n\n\t\t\tSystem.out.println(\"CustomerId\"+\" \"+\"UserName\");\n\t\t\tfor(int i = 0; i < viewCustomers.size(); i++) {\n\t System.out.println(viewCustomers.get(i)+\"\\t\"+\"\\t\");\n\t }\n\t System.out.println(\"<------------------------------------------------>\");\n\t\t\t//System.out.println(viewCustomers);\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Online Market App- Remove Customer Exception: \" +e.getMessage());\n\t\t}\n\t}", "@CustomMetric(name = \"totalFailedRequests\", kind = Metric.Kind.COUNTER,\n \t\tdescription = \"The number of failed inserts/gets over the lifetime of the operator.\")\n public void setTotalFailedRequests(Metric totalFailedRequests) {\n \tthis.totalFailedRequests = totalFailedRequests;\n }", "public static void setCustomerData()\n\t{\n\t\tString sURL = PropertyManager.getInstance().getProperty(\"REST_PATH\") + \"measurements?state=WAIT_FOR_CONFIG\";\n\t\tmCollect = new MeasurementCollection();\n\t\tmCollect.setList(sURL);\n\n\t\tfor (int i = 0; i < mCollect.getList().size(); i++)\n\t\t{\n\t\t\tmObject = mCollect.getList().get(i);\n\t\t\tString mID = mObject.getId();\n\t\t\taData = new AddressData(mID);\n\t\t\tif (mObject.getPriority().equals(\"HIGH\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"+ \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse if (mObject.getPriority().equals(\"MEDIUM\"))\n\t\t\t{\n\t\t\t\tcustomerList.add(\"- \" + aData.guiAddressData());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcustomerList.add(\"o \" + aData.guiAddressData());\n\t\t\t}\n\n\t\t}\n\t\tcustomerText.setText(aData.getCustomerData());\n\t\tmeasureText.setText(mObject.getMeasurementData());\n\n\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }", "public void setTotalCashPayment(BigDecimal totalCashPayment) {\n this.totalCashPayment = totalCashPayment;\n }", "public void setSales(Integer sales) {\n this.sales = this.sales + sales;\n }", "public void setCustomerId(Number value) {\n setAttributeInternal(CUSTOMERID, value);\n }", "public void setTotal (java.lang.Double total) {\r\n\t\tthis.total = total;\r\n\t}", "public void setCurrentCustomer(Customer customer) {\n this.currentCustomer = customer;\n }", "public void setCustomerId(long value) {\n this.customerId = value;\n }", "public int getTotalSales()\n {\n int sales = totalSales;\n totalSales = 0;\n return sales;\n }", "public void setCustomerId(int customerId) {\n\t\tthis.customerId = customerId;\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\r\n\t\tList<Customer> allCustomers = new ArrayList<Customer>();\r\n\t\tallCustomers = customerRepository.findAll();\r\n\t\tif (!allCustomers.isEmpty()) {\r\n\t\t\treturn allCustomers;\r\n\t\t} else {\r\n\t\t\tthrow new EmptyEntityListException(\"No Customers Found.\");\r\n\t\t}\r\n\r\n\t}", "public int count() {\n\t\tint count = cstCustomerDao.count();\n\t\treturn count;\n\t}", "public CustomerBase(ArrayList<CustomerWithGoods> allCustomers) {\n\t\tsuper();\n\t\tthis.allCustomers = allCustomers;\n\t}", "public void setTotalSeats(int value) {\n this.totalSeats = value;\n }", "public void setCustomer(Integer customer) {\n this.customer = customer;\n }", "public void setCustomerId(int customerId) \n {\n this.customerId = customerId;\n }", "public void setTotalFee(BigDecimal totalFee) {\n this.totalFee = totalFee;\n }", "public void setTotalDistance(int totalDistance) {\n this.totalDistance = totalDistance;\n }", "public void setCustomer(org.tempuri.Customers customer) {\r\n this.customer = customer;\r\n }", "public void setCustomerId(String customerId) {\n this.customerId = customerId;\n }", "public void setCustomerId(String customerId) {\n this.customerId = customerId;\n }", "public void setCustomer(final Customer customer) {\n\t\tthis.customer = customer;\n\t}", "TotalRevenueView(){\r\n this.runningTotal = 0;\r\n this.VAT = 0;\r\n }", "private static void updateTotals()\r\n\t{\r\n\t\ttaxAmount = Math.round(subtotalAmount * salesTax / 100.0);\r\n\t\ttotalAmount = subtotalAmount + taxAmount;\r\n\t}", "public void setTotalTransactrateMoney(BigDecimal totalTransactrateMoney) {\n this.totalTransactrateMoney = totalTransactrateMoney;\n }", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}", "public void setTotale(double totale) {\n\t\t\tthis.totale = totale;\n\t\t}", "public void setBudgetCustomerId(Number value) {\n setAttributeInternal(BUDGETCUSTOMERID, value);\n }", "@Override\n\t@Transactional\n\tpublic List<AMOUNT> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<AMOUNT> theQuery = currentSession.createQuery(\"from Customer ORDER BY lastName\", AMOUNT.class);\n\n\t\t// execute query and get result list\n\t\tList<AMOUNT> customers = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn customers;\n\t}", "@Override\n\tpublic List<CustomerData> getAllCustomer() {\n\t\treturn customerRepository.findAll();\n\t}", "public void setCustomerId(final Integer customerId)\n {\n this.customerId = customerId;\n }", "public void setTotal(BigDecimal amount){\r\n\t\ttotal = amount.doubleValue();\r\n\t}", "public void setMontantTotal(int montantTotal_) {\n\t\tmontantTotal = montantTotal_;\n\t}", "protected void setCustomer(Customer customer) {\n this.customer = customer;\n }", "public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "public void initTotalCash() {\n\t\ttotalCash.setValue(\"\");\n\t}", "public void setCustomer (de.htwg_konstanz.ebus.framework.wholesaler.vo.Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t}", "@ApiModelProperty(value = \"The estimated total cost of the rental given the rental period and location provided, including all mandatory taxes and charges, and using a default set of rental options and restrictions defined by the car company.\")\n public Amount getEstimatedTotal() {\n return estimatedTotal;\n }", "public void setCustomerId(String customerId)\n\t{\n\t\tthis.customerId = customerId;\n\t}" ]
[ "0.7166786", "0.6337093", "0.6076596", "0.59385574", "0.5852529", "0.5745869", "0.5723905", "0.57191205", "0.57069284", "0.5688987", "0.5661952", "0.5563051", "0.55326563", "0.55179095", "0.5471851", "0.540812", "0.53917575", "0.53631157", "0.53537154", "0.5340472", "0.53404015", "0.5325495", "0.5325495", "0.529435", "0.5227734", "0.5208442", "0.52012616", "0.5198379", "0.5198379", "0.5198379", "0.51638585", "0.5156543", "0.51558924", "0.51551884", "0.5143072", "0.51301426", "0.51176286", "0.5106496", "0.50866073", "0.5085905", "0.5056669", "0.5053118", "0.503", "0.5028472", "0.50273705", "0.5026527", "0.50204545", "0.5019866", "0.50087655", "0.5008283", "0.500233", "0.500161", "0.49938762", "0.49896196", "0.49856266", "0.497621", "0.49750954", "0.49735215", "0.49689603", "0.4960106", "0.4949547", "0.49483153", "0.4941001", "0.49409217", "0.4934957", "0.4933062", "0.4932857", "0.4929514", "0.49222142", "0.4911032", "0.48882863", "0.48863623", "0.48829207", "0.48802114", "0.48703554", "0.48675868", "0.48659956", "0.48616406", "0.4856611", "0.4856611", "0.4855166", "0.48506278", "0.48395467", "0.48359373", "0.48350248", "0.48306003", "0.48166686", "0.48122886", "0.48117217", "0.48116654", "0.4809453", "0.48094192", "0.4807618", "0.48038864", "0.48015967", "0.47966012", "0.478588", "0.47826424", "0.47807992", "0.4777243" ]
0.82346845
0
return the star rating
public int getStarRating(){ return starRating; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getRating();", "public int getRating();", "public double getRating(){\n\t\treturn this.rating;\n\t}", "@Nullable\n final public Double getStarRating() {\n return mStarRating;\n }", "public double getRating() {\n return rating_;\n }", "public double getRating() {\n return rating_;\n }", "public double getRating() {\n\t\treturn rating;\n\t}", "public float getRating() {\n\t\treturn rating;\n\t}", "public float getRating() {\n return rating;\n }", "public float getRating() {\n return rating;\n }", "public Integer getRating() {\n return this.rating;\n }", "public float getRating() {\n return this.rating;\n }", "public int getStars() {\n return stars;\n }", "public int getStars() {\n return stars;\n }", "public int getRating()\n {\n return this.rating;\n }", "public int getRating() {\n\t\treturn this.rating;\n\t}", "public double getRating(){\n\t\treturn this.user_rating;\n\t}", "public float getStars() {\n return this.stars;\n }", "public Integer getGivenRating() {\n\t\treturn givenRating;\n\t}", "public int getStars() {\n\t\treturn this.stars;\n\t}", "public Integer getRating()\n\t{\n\t\treturn null;\n\t}", "public double rating() {\r\n double value = BASE_RATING * specialization * (1 / (1 + era)) \r\n * ((wins - losses + saves) / 30.0);\r\n return value;\r\n }", "public String getRating() {\r\n\t\tswitch (rating) {\r\n\t\tcase \"high\":\r\n\t\t\treturn \"high\";\r\n\t\tcase \"medium\":\r\n\t\t\treturn \"medium\";\r\n\t\tcase \"low\":\r\n\t\t\treturn \"low\";\r\n\t\tdefault: return \"none\";\r\n\t\t}\r\n\t}", "public short getStars()\r\n {\r\n return this.stars;\r\n }", "public Integer getRewardStar() {\n return rewardStar;\n }", "public int getSeekerRating() {\n return getIntegerProperty(\"Rating\");\n }", "public Integer getStarcount() {\n return starcount;\n }", "public java.lang.String getRating() {\n return rating;\n }", "@Min(0)\n @Max(5)\n public int getRating() {\n return rating;\n }", "public Integer getStarCount() {\n return starCount;\n }", "@Nullable\n public Float getRating() {\n return rating;\n }", "public int getHotOrNotRating() {\r\n if (ratingCount == 0) return 0;\r\n return (rating/ratingCount);\r\n }", "public Integer getRating() {\r\n if (recipe != null && ui.isIsUserAuthenticated()) {\r\n RecipeRating temp = ratingEJB.findByUserAndRecipe(ui.getUser(), recipe);\r\n if (temp != null) {\r\n rating = temp.getRatingValue().getValue();\r\n }\r\n }\r\n return rating;\r\n }", "public int getRatingFirst() {\n return this.ratingFirst ? 1 : 0;\n }", "public double getTotalRating() {\n return totalRating;\n }", "String getReviewrate();", "float getSteamSupplyRating2();", "public static double difficultyRating()\n\t{\n\t\treturn 2.5;\n\t}", "public java.math.BigDecimal getFiveStarRating() {\n return fiveStarRating;\n }", "public int getMinRating() {\n return minRating;\n }", "public float getRating(String productid) {\n\t\treturn 0;\r\n\t}", "public int getNoOfratings() {\n\treturn noofratings;\n}", "public Short getUserRating() {\r\n return userRating;\r\n }", "public int getStarvationRate ( ) {\n\t\treturn extract ( handle -> handle.getStarvationRate ( ) );\n\t}", "public double getMinRating() {\n return min;\n }", "public int getSumratings() {\n\treturn sumratings;\n}", "public int getRatings() {\n return ratings;\n }", "public void setRating(int rating) {\r\n this.rating = rating;\r\n }", "public String getUserRating() {\n return userRating;\n }", "public void setRating(int rating)\n {\n this.rating = rating;\n }", "public double getParseRating() {\n return getDouble(KEY_RATING);\n }", "public void setRating(int rating) {\n this.rating = rating;\n }", "public Integer getAttendStar() {\n return attendStar;\n }", "public void setRating(Integer rating) {\r\n this.rating = rating;\r\n }", "public void setStars(float stars) {\n this.stars = stars;\n }", "public int get () { return rating; }", "public void setRating(float rating) {\n this.rating = rating;\n }", "public float getUserRatingScore() {\n float scorePercent = Float.valueOf(userRating) * 10;\n\n return ((5 * scorePercent) / 100);\n }", "public double getRatingAt(int pos) {\n return this.usersRatings.get(pos).getRating();\n }", "public void setRating(double rating){\n\t\tthis.rating = rating;\n\t}", "public static boolean isStar(int Rating) {\n if(Rating > 0 && Rating <= 5) {\n return true;\n }\n else {\n return false;\n }\n }", "public String getRatingValue() {\n return ratingValue;\n }", "public void setRating(int rating) {\n\t\tthis.rating = rating;\n\t}", "public void printStars(double rating) {\n String s = String.format(\"%.1f\", rating);\n if(rating <= 1)\n println(\"★☆☆☆☆(\" + s + \")\");\n else if(rating <= 2)\n println(\"★★☆☆☆(\" + s + \")\");\n else if(rating <= 3)\n println(\"★★★☆☆(\" + s + \")\");\n else if(rating <= 4)\n println(\"★★★★☆(\" + s + \")\");\n else\n println(\"★★★★★(\" + s + \")\");\n println();\n }", "public MediaRating getRating() {\n MediaRating mediaRating = ratings.get(MediaRating.USER);\n\n // then the default one (either NFO or DEFAULT)\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.NFO);\n }\n if (mediaRating == null) {\n mediaRating = ratings.get(MediaRating.DEFAULT);\n }\n\n // is there any rating?\n if (mediaRating == null && !ratings.isEmpty()) {\n mediaRating = ratings.values().iterator().next();\n }\n\n // last but not least a non null value\n if (mediaRating == null) {\n mediaRating = new MediaRating();\n }\n\n return mediaRating;\n }", "void getRating(String rid, final RatingResult result);", "public void setRating(Integer value)\n\t{\n\t}", "public double getAverageRating() {\n return averageRating;\n }", "public double getAverageRating() {\n return averageRating;\n }", "public static double difficultyRating()\r\n {\r\n double howhard = 4.0;\r\n return howhard;\r\n }", "public static double getRandomRating() {\n return (double) (RandomNumberGenerator.getRandomInt(0, 10) / 2d);\n }", "public void setRating(int rating);", "public abstract double calcAvRating();", "public String getRatingText() {\n return ratingText;\n }", "private double formatRating(String rating){\n double ratingDouble = Double.parseDouble(rating);\n return ratingDouble;\n\n }", "public int getRatingID() {\n return ratingID;\n }", "public void setRating(double rating) {\n\t\tthis.rating = rating;\n\t}", "public Float getAverageRating() {\n\t return this.averageRating;\n\t}", "public void setRating(float r) {\n\t\trating = r;\n\t}", "public int minimum_rating() {\n\t\tint minimumRating = 0;\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i<identifiedArray.length;i++) {\n\t\t\tif(identifiedArray[i] != null) {\n\t\t\t\tif (minimumRating>identifiedArray[i].rating) {\n\t\t\t\t\tminimumRating = identifiedArray[i].rating;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn minimumRating;\n\t}", "public double getRatingAverage() {\n return average;\n }", "private Map<Profile, Integer> rating(){\n\t\treturn allRatings;\n\t}", "void calculateRating(){\r\n if(playerScore <= 30){\r\n playerRating = getString(R.string.rating_message_bad);\r\n }\r\n else if(playerScore <= 70){\r\n playerRating = getString(R.string.rating_message_regular);\r\n }\r\n else if(playerScore <= 90){\r\n playerRating = getString(R.string.rating_message_good);\r\n }\r\n else{\r\n playerRating = getString(R.string.rating_message_excelent);\r\n }\r\n }", "public void setRating(java.lang.String rating) {\n this.rating = rating;\n }", "private void updateUserRatingStars(Long currentKey) {\r\n\t\tSwagItemRating swagItemRatingForKey = loginInfo.getSwagItemRating(currentKey);\r\n\t\tInteger userRating = (swagItemRatingForKey==null) ? 0 : swagItemRatingForKey.getUserRating();\r\n\t\t\r\n\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\tif (i<userRating) {\r\n\t\t\t\tstarImages.get(i).setSrc(\"/images/starOn.gif\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tstarImages.get(i).setSrc(\"/images/starOff.gif\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "int getStars();", "public double getAverageRating() {\n int[] ratings = new int[reviews.length];\n for(int i = 0; i < reviews.length; i++) {\n ratings[i] = reviews[i].getRating();\n }\n double average = (double) sumIntegerArray(ratings) / reviews.length;\n return Double.parseDouble(new DecimalFormat(\"#.#\").format(average));\n }", "public double calculateOverallRating() {\n Rating[] ratingArray = this.ratings;\n double sum = 0.0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) { // Making sure it has a rating\n sum = sum + ratingArray[i].getScore();\n } else {\n sum = sum + 0.0;\n }\n }\n return sum;\n }", "public double getOgRating() {\n return ogRating;\n }", "public Integer getRate() {\r\n return rate;\r\n }", "public java.lang.String[] getRating() {\n return rating;\n }", "public static void setRatings (double irating){\n\t\t\t//ratings = irating;\n\t\t\tr = irating;\n\t}", "public ArrayList<Rating> getAverageRating(int minimalRaters)\n {\n ArrayList<Rating> ans=new ArrayList<>();//this a new syntax of defining arraylist\n ArrayList<String> movies=MovieDatabase.filterBy(new TrueFilter());\n double sum=0.0;\n int numOfRaters=0;\n for(int k=0;k<movies.size();k++)\n {\n String moviID=movies.get(k);\n double curr=getAverageByID(moviID,minimalRaters);\n if(curr!=0.0)\n {\n ans.add(new Rating(moviID,curr));\n }\n }\n return ans;\n }", "stars.StarListDocument.StarList getStarList();", "public void setRating(int rating) {\n this.rating = rating;\n if (this.rating < 0) {\n this.rating = 0;\n }\n }", "@Override\n public String toString() {\n return \"{rating = \" + averageRating + \", count \" + count + \"}\";\n }", "public List<Star> getStars() {\n return star;\n }", "public int getRate() {\n return rate_;\n }", "public void setRating(int rating) {\n if (rating > starCount) {\n rating = starCount;\n }\n int lastRating = this.rating;\n this.rating = rating;\n for (int i = 0; i < getChildCount(); i++) {\n ImageView iv = (ImageView) getChildAt(i);\n if (i < rating) {\n iv.setImageResource(checkedStarDrawable);\n } else {\n iv.setImageResource(normalStarDrawable);\n }\n }\n if (listener != null && lastRating != rating) {\n listener.onRatingChanged(rating, starCount);\n }\n }", "private void calculateRating() {\n\t\tVisitor[] visitors = getVisitors();\n\t\tint max = 0;\n\t\tint act = 0;\n\t\tfor (Visitor visitor : visitors) {\n\t\t\tif(validRating(visitor)) {\n\t\t\t\tmax += 5;\n\t\t\t\tact += visitor.getRating();\n\t\t\t}\n\t\t}\n\t\tif(max != 0) {\n\t\t\trating = (1f*act)/(1f*max);\n\t\t}\n\t}" ]
[ "0.80911905", "0.76963305", "0.7644305", "0.75799245", "0.75624675", "0.75537956", "0.7544622", "0.75310266", "0.7529053", "0.7529053", "0.7498755", "0.74899966", "0.74377465", "0.74377465", "0.74018115", "0.73661214", "0.7359823", "0.73545414", "0.7345683", "0.7250699", "0.7239777", "0.71930444", "0.71342623", "0.71233195", "0.7106661", "0.70151114", "0.69980156", "0.69823927", "0.6966908", "0.6919298", "0.6912464", "0.6909534", "0.6908357", "0.6902155", "0.6893785", "0.68887764", "0.68744165", "0.68473417", "0.68463576", "0.6801762", "0.67882085", "0.6772069", "0.67629635", "0.6735089", "0.67350245", "0.671536", "0.6708393", "0.6705956", "0.6699645", "0.66510123", "0.66461885", "0.6642216", "0.6631813", "0.66279525", "0.6609076", "0.6599414", "0.659469", "0.6583979", "0.65358293", "0.6535512", "0.65317816", "0.6522172", "0.65155226", "0.65114504", "0.65087086", "0.65085393", "0.64868844", "0.6466241", "0.6466241", "0.6460397", "0.64603084", "0.64564663", "0.64544195", "0.64536464", "0.64506406", "0.6426307", "0.63993603", "0.6399067", "0.6357094", "0.6342946", "0.6329419", "0.6313462", "0.629128", "0.62903744", "0.62715083", "0.62685245", "0.62588435", "0.62484145", "0.62442213", "0.624372", "0.62008995", "0.6182598", "0.61809", "0.61659425", "0.61626357", "0.61598927", "0.61378026", "0.61327296", "0.61163384", "0.61145467" ]
0.8231205
0
setDishOfTheDay(Sring _dishOfTheDay) Sets the dish of the day
public void setDishOfTheDay(String _dishOfTheDay){ dishOfTheDay = _dishOfTheDay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDayOrNight(int day) {\n setStat(day, dayOrNight);\n }", "public void setDay(final short day) {\r\n\t\tthis.day = day;\r\n\t}", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\r\n this.day = day;\r\n }", "public void setDay(Date day) {\n this.day = day;\n }", "public void setDay(int day)\n {\n this.day = day;\n }", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public void setName(String dishName) {\n this.dishName = dishName;\n }", "public void setDay(int day) {\n\t\tthis.day = day;\n\t}", "public void setDay(int day) {\n\t\tthis.day = day;\n\t}", "public void setDay(final int day) {\n\t\tthis.day = day;\n\t}", "public void setDay(java.lang.String day)\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(DAY$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(DAY$0);\n }\n target.setStringValue(day);\n }\n }", "public final void setMonday(final TimeSlot monday) {\n this.monday = monday;\n log.info(this.monday.toString());\n }", "void setDaytime(boolean daytime);", "public void setDay(int day) {\r\n if ((day >= 1) && (day <= 31)) {\r\n this.day = day; //Validate day if true set else throws an exception\r\n } else {\r\n throw new IllegalArgumentException(\"Invalid Day!\");\r\n }\r\n\r\n }", "public void xsetDay(org.apache.xmlbeans.XmlString day)\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(DAY$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(DAY$0);\n }\n target.set(day);\n }\n }", "public void setWorkDay(Date workDay) {\n\t\tthis.workDay = workDay;\n\t}", "public void setDay(String day) {\n\n\t\tthis.day = day;\n\t}", "public void setDay(int day)\r\n {\n \tif (!(day <= daysInMonth(month) || (day < 1)))\r\n\t\t{\r\n \t\tthrow new IllegalArgumentException(\"Bad day: \" + day);\r\n\t\t}\r\n this.day = day;\r\n }", "public final void setSaturday(final TimeSlot saturday) {\n this.saturday = saturday;\n }", "public void setDay(int day) {\n if(day < 1 || day > 31) {\n this.day = 1;\n } else {\n this.day = day;\n }\n\n if(month == 2 && this.day > 29) {\n this.day = 29;\n } else if((month==4 || month==6 || month==8 || month==11) && this.day > 30) {\n this.day = 30;\n }\n }", "@Override\n\tpublic void setNgayBatDau(java.util.Date ngayBatDau) {\n\t\t_keHoachKiemDemNuoc.setNgayBatDau(ngayBatDau);\n\t}", "public Meal(Date date, Dish dish, String category) {\n this.date = date;\n this.dish = dish;\n this.category = category;\n this.done = 0;\n }", "public void setDayOfWeek(int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }", "public final void setSunday(final TimeSlot sunday) {\n this.sunday = sunday;\n }", "public void setDay(Day day, int dayNum) {\n\t\tif (dayNum <= days.length) {\n\t\t\tdays[dayNum - 1] = day;\n\t\t}\n\t}", "public final void setKingdom(Kingdom kingdom) {\r\n\tremove();\r\n\tthis.kingdom = kingdom;\r\n\tapply();\r\n }", "@Override\n\tpublic void setNgayDong(java.util.Date ngayDong) {\n\t\t_keHoachKiemDemNuoc.setNgayDong(ngayDong);\n\t}", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\r\n this.day = value;\r\n }", "public final void setThursday(final TimeSlot thursday) {\n this.thursday = thursday;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDay(byte value) {\n this.day = value;\n }", "public void setDayDOB(int dayDOB) {\n this.dayDOB = dayDOB;\n }", "public final void setWednesday(final TimeSlot wednesday) {\n this.wednesday = wednesday;\n }", "public void setDayOfWeek(Integer dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }", "public CinemaDate setDay(String d) {\n return new CinemaDate(this.month, d, this.time);\n }", "public void setDayOfWeek(final int dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }", "public final void setTuesday(final TimeSlot tuesday) {\n this.tuesday = tuesday;\n }", "public void setBirthday(Date birthday);", "public void setDay(int day) throws InvalidDateException {\r\n\t\tif (day <= 31 & day >= 1) {\r\n\t\t\tthis.day = day;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic day for the date (between 1 and 31) !\");\r\n\t\t}\r\n\t}", "public String getDishOfTheDay(){\n return dishOfTheDay;\n }", "public void setMday(int value) {\n this.mday = value;\n }", "public void setDayOfWeek(String dayOfWeek) {\r\n this.dayOfWeek = dayOfWeek;\r\n }", "public void setDayOfWeek(String dayOfWeek){\n\t\tthis.dayOfWeek = dayOfWeek;\n\t}", "public void setDate(int dt) {\n date = dt;\n }", "public void changeName(Person dinesh) {\n\t\tdinesh.setAge(60);\n\t\tdinesh.setName(\"Dinesh\");\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(int month, int day) {\r\n this.month = month;\r\n this.day = day;\r\n }", "public void setDayOfWeek(DayTemplate dayOfWeek) {\n this.dayOfWeek = dayOfWeek;\n }", "public void setFechaDesde(Date fechaDesde)\r\n/* 169: */ {\r\n/* 170:293 */ this.fechaDesde = fechaDesde;\r\n/* 171: */ }", "@Override\n\tpublic void setNgayKetThuc(java.util.Date ngayKetThuc) {\n\t\t_keHoachKiemDemNuoc.setNgayKetThuc(ngayKetThuc);\n\t}", "public void setDate(String ymd) throws RelationException;", "public void setDob(Date dob) {\n this.dob = dob;\n }", "public void setDayOfTheWeek(String day){\r\n this.dayOfTheWeek.setText(day);\r\n }", "public boolean setDay(int newDay) {\n\t\tthis.day = newDay;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType);\n\t\treturn true;\n\t}", "public void setFechaHasta(Date fechaHasta)\r\n/* 179: */ {\r\n/* 180:312 */ this.fechaHasta = fechaHasta;\r\n/* 181: */ }", "public void setDose (java.lang.String dose) {\n\t\tthis.dose = dose;\n\t}", "public void setDateAndTime(int d,int m,int y,int h,int n,int s);", "public void setDuke(Duke d) {\n this.duke = d;\n updateTotalSpentLabel();\n }", "public void setDoily(DoilyState doily) {\n\t\tthis.doily = doily;\n\t\t// Create doily drawer\n\t\tdoilyDrawer = new DoilyDrawer(doily);\n\t\tclearRedoStack();\n\t\tredraw();\n\t}", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public void setBirthday(Date birthday) {\n this.birthday = birthday;\n }", "public int SetSchroniskToPies(Shelter shelter, Dog Dog) {\n\t\tint count = 0;\n\t\ttry {\n\t\t\tupdateDogsShelter.setLong(1, shelter.getId());\n\t\t\tupdateDogsShelter.setLong(2, Dog.getId());\n\n\t\t\tcount = updateDogsShelter.executeUpdate();\n\t\t\treturn count;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\n\t}", "public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }", "public void setBirthday(Date birthday) {\r\n this.birthday = birthday;\r\n }", "public void setDate(int m, int d, int y){\n\t\tday = d;\n\t\tyear =y;\n\t\tmonth = m;\n\t}", "abstract public void setServiceAppointment(Date serviceAppointment);", "@Override\n\tpublic void setRestaurant(RestaurantChung restaurant) {\n\t\t\n\t}", "public void setSettleTime(Date settleTime) {\n this.settleTime = settleTime;\n }", "public void SetDate(Date date);", "void setDate(Date data);", "public void setDiaryNewEntryContent(Date newDate, String content) throws SQLIntegrityConstraintViolationException {\n\t\tLong songid = newDiaryEntry.songid;\n\t\tDate originalDate = newDiaryEntry.date;\n\t\tString sqlQuery = \"update diary set content = ?, date = ? where song_id = ? and date= ?;\";\n\n\t\ttry {\n\t\t\tPreparedStatement preparedStmt = connection.prepareStatement(sqlQuery);\n\t\t\tpreparedStmt.setString(1, content);\n\t\t\tpreparedStmt.setDate(2, newDate);\n\t\t\tpreparedStmt.setLong(3, songid);\n\t\t\tpreparedStmt.setDate(4, originalDate);\n\n\t\t\t// execute the java preparedstatement\n\t\t\tpreparedStmt.executeUpdate();\n\n\t\t\t// update\n\t\t\tnewDiaryEntry.date = newDate;\n\t\t\tnewDiaryEntry.content = content;\n\n\t\t} catch (SQLIntegrityConstraintViolationException e1) {\n\t\t\tthrow e1;\n\t\t} catch (SQLException e2) {\n\t\t\te2.printStackTrace();\n\t\t}\n\t\t// then: update new recentDiaryvl\n\t}", "public void setDBizDay(java.util.Calendar dBizDay) {\n this.dBizDay = dBizDay;\n }", "public void setDayId(String dayId) {\r\n this.dayId = dayId;\r\n }", "public void setDay(int year, int month, int day)\n\t{\n\t\t m_calendar.set(year,month-1,day);\n\n\t}", "public void setDay(Calendar cal) {\n this.cal = (Calendar) cal.clone();\n }", "public void setHireDate(Date hireDate) {\n this.hireDate = hireDate;\n }", "public void setCalendarDay(int day)\n {\n this.currentCalendar.set(Calendar.DAY_OF_MONTH, day);\n }", "public boolean setDay(int newDay, boolean check) {\n\t\tthis.day = newDay;\n\t\tdeltatIsValid = false;\n\t\tthis.jd = swe_julday(this.year, this.month, this.day, this.hour, this.calType); // ->\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// erzeugt\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// JD\n\t\tif (check) {\n\t\t\tdouble oldYear = this.year;\n\t\t\tdouble oldMonth = this.month;\n\t\t\tIDate dt = swe_revjul(this.jd, this.calType); // -> erzeugt neues\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Datum\n\t\t\tthis.year = dt.year;\n\t\t\tthis.month = dt.month;\n\t\t\tthis.day = dt.day;\n\t\t\tthis.hour = dt.hour;\n\t\t\treturn (this.year == oldYear && this.month == oldMonth && this.day == newDay);\n\t\t}\n\t\treturn true;\n\t}", "@Test\r\n public void testSetDateEaten()\r\n {\r\n System.out.println(\"setDateEaten\");\r\n Date dateEaten = Date.valueOf(\"1982-04-08\");\r\n FoodBean instance = new FoodBean(5, \"Beans on toast\", \r\n Date.valueOf(\"2014-04-01\"), Time.valueOf(\"10:00:00\"), \r\n 100, 120, 5, 7, 500, 0, 3);\r\n instance.setDateEaten(dateEaten);\r\n assertEquals(dateEaten, instance.getDateEaten());\r\n }", "public void setCalDay() {\n\t\tfloat goal_bmr;\n\t\tif(gender==\"male\") {\n\t\t\tgoal_bmr= (float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age + 5);\n\t\t}\n\t\telse {\n\t\t\tgoal_bmr=(float) (10 * (weight+loseGainPerWeek) + 6.25 * height - 5 * age - 161);\n\t\t}\n\t\tswitch (gymFrequency) {\n\t\tcase 0:calDay = goal_bmr*1.2;\n\t\t\t\tbreak;\n\t\tcase 1:\n\t\tcase 2:\n\t\tcase 3:calDay = goal_bmr*1.375;\n\t\t\t\tbreak;\n\t\tcase 4:\n\t\tcase 5:calDay = goal_bmr*1.55;\n\t\t\n\t\t\t\tbreak;\n\t\tcase 6:\n\t\tcase 7:calDay = goal_bmr*1.725;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public void setDay(int year, int month, int day) {\n cal = Calendar.getInstance();\n cal.set(year, month, day);\n }", "void setDadosDoacao(String date, String hora, String cpfDoador, String nomeDoador, String fator) {\n this.fator = fator;\n this.date = date;\n this.cpf = cpfDoador;\n this.nome = nomeDoador;\n this.hora = hora;\n }", "public void setIdOverDay(int rdID, int c) {\n\t\t((BorrowDAL)dal).setIdOverDay(rdID,c);\r\n\t}", "public void setGioBatDau(Date gioBatDau);", "String updateDay(String userName, Day day);", "public DayOfWeek diaDaSemana(LocalDate d);", "public void setDealingTime(Date dealingTime)\n/* */ {\n/* 171 */ this.dealingTime = dealingTime;\n/* */ }", "public Meal(int id, Date date, Dish dish, String category, int done) {\n this.id = id;\n this.date = date;\n this.dish = dish;\n this.category = category;\n this.done = done;\n }", "public Builder setDay(app.onepass.apis.DayOfWeek value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n day_ = value.getNumber();\n onChanged();\n return this;\n }", "public void setAtNeutral(Kingdom relatingKingdom) {\n try {\n java.sql.PreparedStatement s = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s.setInt(1, this.id);\n s.setInt(2, relatingKingdom.getID());\n ResultSet res = s.executeQuery();\n\n java.sql.PreparedStatement s1 = QuartzKingdoms.DBKing.prepareStatement(\"SELECT * FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s1.setInt(1, relatingKingdom.getID());\n s1.setInt(2, this.id);\n ResultSet res1 = s1.executeQuery();\n\n if (res.next()) {\n java.sql.PreparedStatement s2 = QuartzKingdoms.DBKing.prepareStatement(\"DELETE FROM relationships WHERE kingdom_id=? AND sec_kingdom_id=?;\");\n s2.setInt(1, relatingKingdom.getID());\n s2.setInt(2, this.id);\n s2.executeUpdate();\n } else if (res1.next()) {\n\n } else {\n return;\n }\n } catch (SQLException e) {\n KUtil.printException(\"Could not set kingdoms at neutral\", e);\n }\n }", "@Override\n\tpublic void setNgaygiahan(java.util.Date ngaygiahan) {\n\t\t_phieugiahan.setNgaygiahan(ngaygiahan);\n\t}", "public final void setWishDateEnd(java.util.Date wishdateend)\r\n\t{\r\n\t\tsetWishDateEnd(getContext(), wishdateend);\r\n\t}" ]
[ "0.67618144", "0.66695064", "0.66285855", "0.66285855", "0.66285855", "0.66285855", "0.66285855", "0.6620117", "0.66145825", "0.6579499", "0.6525829", "0.649413", "0.649413", "0.64319247", "0.6298245", "0.61956996", "0.6191729", "0.6184659", "0.60973215", "0.6097066", "0.6066072", "0.6033938", "0.59856015", "0.59743893", "0.59679854", "0.594371", "0.5937345", "0.5935969", "0.5931654", "0.593139", "0.59135133", "0.5885821", "0.5875292", "0.586577", "0.58528095", "0.58414876", "0.58414876", "0.58414876", "0.5831375", "0.57937497", "0.5792409", "0.57813364", "0.5767286", "0.576607", "0.57634246", "0.57426125", "0.5741128", "0.57292926", "0.5688551", "0.56752336", "0.56743884", "0.5669574", "0.5669206", "0.56665945", "0.5657044", "0.5651473", "0.5638119", "0.5633205", "0.56231064", "0.56049174", "0.5592566", "0.55908394", "0.55799675", "0.55532414", "0.5550163", "0.55501145", "0.5537691", "0.5537691", "0.5537691", "0.5523689", "0.5519611", "0.5519611", "0.55076367", "0.55074286", "0.5504917", "0.5495873", "0.5493853", "0.5488231", "0.548708", "0.5483958", "0.5481714", "0.5476838", "0.54676646", "0.5466873", "0.54630613", "0.54593575", "0.54513025", "0.5434237", "0.54309", "0.5410616", "0.5410418", "0.53976643", "0.53899294", "0.5384542", "0.5382235", "0.53707373", "0.5369366", "0.5359288", "0.5343504", "0.5342141" ]
0.82885075
0
getDishOfTheDay() Accesses the dish of the day
public String getDishOfTheDay(){ return dishOfTheDay; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDishOfTheDay(String _dishOfTheDay){\n dishOfTheDay = _dishOfTheDay;\n }", "private Date getdDay() {\n\t\treturn this.dDay;\r\n\t}", "public void dayIsLike() \r\n\t{ \r\n\t\tswitch (day) \r\n\t\t{ \r\n\t\tcase MONDAY: \r\n\t\t\tSystem.out.println(\"Mondays are bad.\"); \r\n\t\t\tbreak; \r\n\t\tcase FRIDAY: \r\n\t\t\tSystem.out.println(\"Fridays are better.\"); \r\n\t\t\tbreak; \r\n\t\tcase SATURDAY: \r\n\t\t\tSystem.out.println(\"Saturdays are better.\"); \r\n\t\t\tbreak;\r\n\t\tcase SUNDAY: \r\n\t\t\tSystem.out.println(\"Weekends are best.\"); \r\n\t\t\tbreak; \r\n\t\tdefault: \r\n\t\t\tSystem.out.println(\"Midweek days are so-so.\"); \r\n\t\t\tbreak; \r\n\t\t} \r\n\t}", "public String getDishName() {\n\t\treturn dishName;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay()\n {\n return day;\n }", "public int getDay() {\n\treturn day;\n }", "@java.lang.Override public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }", "public int getDay(){\n\t\treturn day;\n\t}", "public int getDay() {\r\n return day;\r\n }", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "public int getDay() {\n\t\treturn day;\n\t}", "@java.lang.Override\n public app.onepass.apis.DayOfWeek getDay() {\n @SuppressWarnings(\"deprecation\")\n app.onepass.apis.DayOfWeek result = app.onepass.apis.DayOfWeek.valueOf(day_);\n return result == null ? app.onepass.apis.DayOfWeek.UNRECOGNIZED : result;\n }", "public int getDay() {\r\n\t\treturn (this.day);\r\n\t}", "Integer getDay();", "private String getStatusDay(LunarDate date) {\n if (Locale.SIMPLIFIED_CHINESE.equals(Locale.getDefault())\n || Locale.TRADITIONAL_CHINESE.equals(Locale.getDefault())) {\n if (date.holidayIdx != -1) {\n return RenderHelper.getStringFromList(R.array.holiday_array,\n date.holidayIdx);\n }\n if (date.termIdx != -1) {\n return RenderHelper.getStringFromList(R.array.term_array, date.termIdx);\n }\n }\n return getDay(date);\n }", "public int getDay() {\n\t\treturn this.day;\n\t}", "public int getDay() {\n\t\treturn this.day;\n\t}", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public Date getDay() {\r\n return day;\r\n }", "public TypicalDay() {\n\t\tnbDeliveries = 0;\n\t\twareHouse = -1;\n\t}", "public int getDay() {\n return day;\n }", "public Date getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public String getDay() {\n\t\treturn day;\n\t}", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public byte getDay() {\n return day;\n }", "public static void printDay(Day d) {\n\t\t\n\t\tUtility.printString(\"-----------------\\n\");\n\t\tUtility.printString(d.getDay() + \".\" + Utility.weekDayToString(d.getDay()) + \" (\" + d.getKcals() + \" Kcal)\" + \" \\n\");\n\t\t\n\t\t\n\t\tfor(MealTime mt : d.getMealTimes()) {\n\t\t\tprintMealtime(mt);\n\t\t}\n\t\t\n\t\t\n\t}", "public int determineDayRandomly() {\n\t\treturn 0;\r\n\t}", "public byte getDay() {\r\n return day;\r\n }", "public Integer getDay()\n {\n return this.day;\n }", "public String considerDiet() {\n if (diet.equals(\"carnivore\")) {\n printedDailyCarbon = allowedCarbonPerDay * 1;\n } else if (diet.equals(\"pescetarian\")) {\n printedDailyCarbon = allowedCarbonPerDay * 0.65;\n } else if (diet.equals(\"vegetarian\")) {\n printedDailyCarbon = allowedCarbonPerDay * 0.5;\n } else if (diet.equals(\"vegan\")) {\n printedDailyCarbon = ((double) allowedCarbonPerDay / (double) 6) * (double) 2;\n }\n String formattedDailyCarbonFigure = String.format(\"%.2f\", printedDailyCarbon);\n return formattedDailyCarbonFigure;\n }", "public int getDay(){\n\t return this.day;\n }", "public String getDay() {\n return this.day;\n }", "public String getDay() {\n\n\t\treturn day;\n\t}", "public byte getDay() {\n return day;\n }", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "private Day getDay(int day, int month) {\n return mainForm.getDay(day, month);\n }", "@Override\n\tpublic int widgetDday(WidgetCheck wc, String[] dlist) {\n\t\treturn dDao.widgetDday(sqlSession, wc, dlist);\n\t}", "public int getDayOrNight() {\n return getStat(dayOrNight);\n }", "public int GetDay(){\n\t\treturn this.date.get(Calendar.DAY_OF_WEEK);\n\t}", "public Date getDate(){\n\t\treturn day.date;\n\t}", "@java.lang.Override public int getDayValue() {\n return day_;\n }", "@Override\n\tpublic String getDailyWorkout() {\n\t\treturn \"SWIM COACH: getDailyWorkout()\";\n\t}", "String getDayofservice();", "public DayOfWeek diaDaSemana(LocalDate d);", "@Override\n\tpublic java.util.Date getNgayDong() {\n\t\treturn _keHoachKiemDemNuoc.getNgayDong();\n\t}", "public DayOfWeek primeiroDiaSemanaAno(int ano);", "boolean hasDayNight();", "public java.util.Calendar getDBizDay() {\n return dBizDay;\n }", "public DayNightClock getDayNightClock() {\n return this.dayNightClock;\n }", "io.dstore.values.StringValue getDay();", "public int getDaysSinceDeath() {\n return daysSinceDeath;\n }", "public Die getDie() {\n\t\treturn die;\n\t}", "public DishVO getDish(int index) {\n\t\t\treturn dishes.get(index);\n\t}", "public String getSomeDayInfo(int day){\n\t\tHashMap<String,String> hashMap = getSomeDaydata(day);\n\t\tStringBuilder sb = new StringBuilder();\n\t\tsb.append(hashMap.get(\"日期\")+\" \"+hashMap.get(\"天气\")+\"\\n\");\n\t\tsb.append(\"最\"+hashMap.get(\"最高温\")+\"\\n\"+\"最\"+hashMap.get(\"最低温\"));\n\t\tsb.append(\"\\n风力:\"+hashMap.get(\"风力\"));\n\n\t\treturn sb.toString();\n\t}", "public final native int getDay() /*-{\n return this.getDay();\n }-*/;", "public int getDayDistance() {\n\t\treturn dayDistance;\n\t}", "void dailyLife() {\n\t\tString action = inputPrompt.dailyOptions(dailyTime).toLowerCase();\r\n\t\tswitch(action) {\r\n\t\tcase \"exercise\":\tthis.exercise();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"study\":\t\tthis.study();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"rocket\":\t\tthis.buildRocket();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"eat\":\t\t\tthis.eat();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"meds\":\t\tthis.getEnergised();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tcase \"fun\":\t\t\tthis.haveFun();\r\n\t\t\t\t\t\t\tbreak;\r\n\t\tdefault:\t\t\tdailyLife();\r\n\t\t}\t\r\n\t}", "public java.lang.String getWkday() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: gov.nist.javax.sip.header.SIPDate.getWkday():java.lang.String, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: gov.nist.javax.sip.header.SIPDate.getWkday():java.lang.String\");\n }", "public static int dan(int mjesec, int day, int godina) {\r\n\r\n\t\tint y = godina - (14 - mjesec) / 12;\r\n\t\tint x = y + y / 4 - y / 100 + y / 400;\r\n\t\tint m = mjesec + 12 * ((14 - mjesec) / 12) - 2;\r\n\t\tint d = (day + x + (31 * m) / 12) % 7;\r\n\t\treturn d;\r\n\t}", "public IDwelling getDwelling();", "public io.dstore.values.StringValue getDay() {\n if (dayBuilder_ == null) {\n return day_ == null ? io.dstore.values.StringValue.getDefaultInstance() : day_;\n } else {\n return dayBuilder_.getMessage();\n }\n }", "@Override\r\n\tpublic String getDailyStudy() {\n\t\treturn \"Practice Expilliarmus and Work on the patronus charm\";\r\n\t}", "private WeekDays(String mood){\n this.mood = mood;\n }", "@Override\t\r\n\tpublic String getDailyWorkout() {\n\t\treturn \"practice 30 hrs daily\";\r\n\t}", "public String getName() {\n return dishName;\n }", "private Day getDay(String dayName){\n for(Day day: dayOfTheWeek)\n if(dayName.equals(day.getDay()))\n return (day);\n return(new Day());\n }", "private String getFileOftheDay() throws IOException {\n Calendar calendar = Calendar.getInstance();\n int day = calendar.get(Calendar.DAY_OF_WEEK);\n if (Calendar.SUNDAY == day) {\n day = Calendar.SATURDAY;\n } else if (Calendar.MONDAY <= day && Calendar.SATURDAY >= day) {\n day -= 1;\n }\n return (pathFiles + \"h_\" + day + \"_\" + getCustomerCode() + \".xml\");\n }", "@Override\n\tpublic String getDailyWorkout() {\n\t\treturn \"Baseball coachtan implement getDailyWorkout\";\n\t}", "@Override\n\tpublic String getDailyWorkout() {\n\t\treturn \"Let's Play Football\";\n\t}", "public int getDayOfWeek();", "@Test\n\t public void testDayInFinnish(){\n\t\t TimeSource mock = new MockTimeSource();\n\t\t Watch test = new FinnishWatch(mock);\t\n\t\t String expected = EnumarationDays.mercredi.getFinnish();\n\t\t String actual = test.getDay(Languages.Finnish);\n\t\t assertEquals(actual, expected);\t\t \n\t }", "public io.dstore.values.StringValue getDay() {\n return day_ == null ? io.dstore.values.StringValue.getDefaultInstance() : day_;\n }", "boolean checkDayNight(boolean daytime);", "@Override\n public int getDate() {\n return this.deadline.getDay();\n }", "public java.lang.String getDay()\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(DAY$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public Integer getPresentDays()\r\n/* 48: */ {\r\n/* 49:51 */ return this.presentDays;\r\n/* 50: */ }", "public void setDay(int day)\n {\n this.day = day;\n }", "String getQuoteOfTheDay();", "@SuppressWarnings(\"unchecked\")\n\t@External(readonly = true)\n\tpublic Map<String, String> get_daily_wagers(BigInteger day) {\n\t\tif (day.compareTo(BigInteger.ONE) == -1) {\n\t\t\tBigInteger now = BigInteger.valueOf(Context.getBlockTimestamp());\t\t\n\t\t\tday.add(now.divide(U_SECONDS_DAY));\t\t\t\n\t\t}\n\t\t\n\t\t Map.Entry<String, String>[] wagers = new Map.Entry[this.get_approved_games().size()];\n\t\t \n\t\tfor (int i= 0; i< this.get_approved_games().size(); i++ ) {\n\t\t\tAddress game = this.get_approved_games().get(i);\n\t\t\twagers[i] = Map.entry(game.toString(), String.valueOf(this.wagers.at(day).get(game)) );\n\t\t}\n\t\treturn Map.ofEntries(wagers);\n\t}", "public Meal(Date date, Dish dish, String category) {\n this.date = date;\n this.dish = dish;\n this.category = category;\n this.done = 0;\n }", "public void setDay(int day) {\r\n this.day = day;\r\n }", "public static String getMessageOfTheDay() {\n\t\treturn MessageOfTheDay.getPuzzleMessage();\n\t}", "public double getDayAbsent() {\n return dayAbsent;\n }", "public int getDay()\n\t{\n\t\treturn this.dayOfMonth;\n\t}", "public long getDays() {\r\n \treturn days;\r\n }", "boolean hasDay();", "boolean hasDay();", "public int getIDays() {\n return iDays;\n }", "@Override\n\tpublic String getDailyWorkout() {\n\t\treturn \"Run and shoot!\";\n\t}", "public static String DiaActual(){\n java.util.Date fecha = new Date();\n int dia = fecha.getDay();\n String myDia=null;\n switch (dia){\n case 1:\n myDia=\"LUNES\";\n break;\n case 2:\n myDia=\"MARTES\";\n break;\n case 3:\n myDia=\"MIERCOLES\";\n break;\n case 4:\n myDia=\"JUEVES\";\n break;\n case 5:\n myDia=\"VIERNES\";\n break;\n case 6:\n myDia=\"SABADO\";\n break;\n case 7:\n myDia=\"DOMINGO\";\n break; \n }\n return myDia;\n }", "private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }", "public static void main(String[] args) {\n\n LocalDate today = LocalDate.now();\n System.out.println(\"today = \" + today);\n\n LocalDate tomorrow = today.plus(1, ChronoUnit.DAYS);\n System.out.println(\"tomorrow = \" + tomorrow );\n\n LocalDate yesterday = tomorrow.minusDays(2);\n System.out.println(\"yesterday = \" + yesterday);\n\n LocalDate independenceDay = LocalDate.of(2019, Month.DECEMBER, 11);\n DayOfWeek dayOfWeek = independenceDay.getDayOfWeek();\n System.out.println(\"dayOfWeek = \" + dayOfWeek);\n\n\n\n\n }", "public double tongDoanhThu() {\n double doanhThu = 0;\n for (ChuyenXe cx : dsChuyenXe) {\n doanhThu += cx.doanhThu;\n }\n return doanhThu;\n }" ]
[ "0.74954677", "0.67570555", "0.6463663", "0.6432664", "0.6411371", "0.64072967", "0.6379742", "0.636148", "0.6345761", "0.63438225", "0.63415587", "0.63415587", "0.63415587", "0.63061917", "0.62950987", "0.62838775", "0.62811", "0.62758297", "0.62758297", "0.6237851", "0.6237851", "0.6237851", "0.6237851", "0.6237851", "0.6227798", "0.6215308", "0.616183", "0.6127482", "0.612224", "0.6091682", "0.6091682", "0.6091682", "0.6083614", "0.6076125", "0.60642797", "0.6050823", "0.60429513", "0.6039396", "0.60348064", "0.60285866", "0.6018104", "0.6003654", "0.5987472", "0.5961588", "0.59458977", "0.5941888", "0.59403276", "0.5932272", "0.59114426", "0.58978385", "0.58491355", "0.5839817", "0.5837392", "0.583154", "0.5824148", "0.5775811", "0.5758613", "0.57566893", "0.5756054", "0.5731315", "0.5715963", "0.57143843", "0.57045174", "0.5703456", "0.5685613", "0.5684908", "0.56831306", "0.5670683", "0.5644166", "0.56323117", "0.56300503", "0.56285655", "0.56213623", "0.5617797", "0.5610424", "0.5585714", "0.558127", "0.5569995", "0.55686426", "0.55615723", "0.55520874", "0.55484766", "0.5547953", "0.55423415", "0.55410975", "0.5537651", "0.5534905", "0.5534204", "0.55274236", "0.5523915", "0.5498892", "0.5492359", "0.5490934", "0.5490934", "0.54904604", "0.5489748", "0.5476562", "0.5470677", "0.5467152", "0.5466705" ]
0.76812845
0
setTypeOfFood(String foodType) Sets the type of food that the restaurant serves
public void setTypeOfFood(String foodType){ typeOfFood = foodType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTypeOfFood(String _typeOfFood)\n {\n typeOfFood = _typeOfFood;\n }", "public void setFoodType(String food);", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "public void setType(String type);", "public void setType(String type);", "public void setType(String type);", "public void setType(String type) {\n\t\tif (Input.isTypeValid(furniture.toLowerCase(), type.toLowerCase())) {\n\t\t\tLocateRequest.type = type; // makes sure that type is valid\n\t\t} else {\n\t\t\t// error message that type is not valid\n\t\t\tSystem.err.print(\"The furniture type provided is not valid\");\n\t\t}\n\t}", "void setType(java.lang.String type);", "Food getByType(String type);", "public String getTypeOfFood()\n {\n return typeOfFood;\n }", "public void setType(String type) \n {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public String getTypeOfFood(){\n return typeOfFood;\n }", "public void setType(String type){\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type){\n \tthis.type = type;\n }", "public void setType( String type )\n {\n this.type = type;\n }", "void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n m_Type = type;\n }", "public final void setType(String type){\n\t\tthis.type = type;\t\n\t}", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "public String getFoodType() {\n return \"Carnivore\";\n }", "public void setType( String type ) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public void setType (String type) {\n this.type = type;\n }", "public final void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\r\n this.type = type;\r\n }", "private void setType(String type) {\n mType = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type){\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setType (String typ) {\n type = typ;\n }", "public void setPreferredType(String preferredType){\n m_preferredType = preferredType;\n }", "public void setType(String type) {\r\r\n\t\tthis.type = type;\r\r\n\t}", "public void setType(String type) {\n\n this.type = type;\n }", "public void setType(String type) {\r\n\t\tthis.type=type;\r\n\t}", "public void setType(String type) {\n this.type = type;\n }", "public void setType(String type) {\n this.type = type;\n }", "public void setType(int pType) {\n mType = pType;\n }", "public void setType(String type)\n\t{\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setType(String type) {\r\n\t\tthis.type = type;\r\n\t}", "public void setFood(int foodIn){\r\n\t\tfood = foodIn;\r\n\t}", "public void setType(String type)\r\n {\r\n this.mType = type;\r\n }", "public void settype(String cat) { this.type = cat; }", "@Override\n\tpublic String addFoodType(String ftname) {\n\t\treturn ftb.addFoodType(ftname);\n\t}", "public void setType(String newtype)\n {\n type = newtype;\n }", "public void setType(java.lang.String type) {\n this.type = type;\n }", "public void setType(java.lang.String type) {\n this.type = type;\n }", "public void setType(String type){\r\n if(type == null){\r\n throw new IllegalArgumentException(\"Type can not be null\");\r\n }\r\n this.type = type;\r\n }", "private void setImageRestaurant(String type, ImageView imageView){\n\n switch (type){\n case Restaurante.TYPE_ITALIAN:\n imageView.setImageResource(R.drawable.italian);\n break;\n case Restaurante.TYPE_MEXICAN:\n imageView.setImageResource(R.drawable.mexicano);\n break;\n case Restaurante.TYPE_ASIAN:\n imageView.setImageResource(R.drawable.japones);\n break;\n case Restaurante.TYPE_BURGER :\n imageView.setImageResource(R.drawable.hamburguesa);\n break;\n case Restaurante.TYPE_TAKEAWAY :\n imageView.setImageResource(R.drawable.takeaway);\n default:\n imageView.setImageResource(R.drawable.restaurante);\n break;\n }\n\n }", "private void setPizza(Pizza type) throws IllegalPizza {\n if(type == null)\n throw new IllegalPizza(\"Invalid pizza!\");\n pizzaType = type;\n }", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "public void setType(String type) {\n\t\tthis.type = type;\n\t}", "@Override\n public void setType(String type) {\n this.type = type;\n }", "public FoodType getFoodType() {\n\t\treturn FoodType.GRASS;\n\t}", "public void addCategory(String type) {\n\t\tif (type.equals(\"Cheese\")) {\n\t\t\taddIngredient(\"Pepperjack\");\n\t\t\taddIngredient(\"Mozzarella\");\n\t\t\taddIngredient(\"Cheddar\");\n\t\t}\n\t\tif (type.equals(\"Sauces\")) {\n\t\t\taddIngredient(\"Mayonnaise\");\n\t\t\taddIngredient(\"Baron Sauce\");\n\t\t\taddIngredient(\"Mustard\"); \n\t\t\taddIngredient(\"Ketchup\");\n\t\t}\n\t\tif (type.equals(\"Veggies\")) {\n\t\t\taddIngredient(\"Pickle\");\n\t\t\taddIngredient(\"Lettuce\");\n\t\t\taddIngredient(\"Tomato\");\n\t\t\taddIngredient(\"Onions\"); \n\t\t\taddIngredient(\"Mushrooms\");\n\t\t}\n\t}", "public void setType(int type) {\n type_ = type;\n }", "public void setType(String type) {\n\t this.mType = type;\n\t}", "public void set_type(String type)\r\n\t{\r\n\t\tthis.type = type;\r\n\t}", "final public void setType(String type)\n {\n setProperty(TYPE_KEY, (type));\n }", "@Override\n\tpublic void setType(String type) {\n\t}", "public void setType( int type ) {\r\n typ = type;\r\n }" ]
[ "0.83463824", "0.799616", "0.679367", "0.679367", "0.67109257", "0.67109257", "0.67109257", "0.6661244", "0.6625589", "0.64727074", "0.6418281", "0.64098203", "0.6407375", "0.6398655", "0.6385612", "0.6344961", "0.6341441", "0.63407254", "0.63375217", "0.6335667", "0.6335667", "0.63323206", "0.6319477", "0.63142747", "0.63142747", "0.63142747", "0.63142747", "0.62827235", "0.6279407", "0.6273831", "0.6273831", "0.6273831", "0.6268269", "0.6259473", "0.625669", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6251572", "0.6218629", "0.6215454", "0.62102896", "0.6200284", "0.6193146", "0.6185371", "0.6174428", "0.6161853", "0.6161853", "0.61504287", "0.6148963", "0.61474675", "0.61474675", "0.61474675", "0.6142105", "0.61380315", "0.6111678", "0.6105165", "0.60894823", "0.6077735", "0.6077735", "0.6070109", "0.6070042", "0.60603815", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6049067", "0.6039622", "0.6034345", "0.60248446", "0.6005543", "0.59787315", "0.59700245", "0.5969738", "0.5966656", "0.5964069" ]
0.86725104
0
getTypeOfFood() Accesses and returns the type of food the restaurant serves
public String getTypeOfFood(){ return typeOfFood; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTypeOfFood()\n {\n return typeOfFood;\n }", "public void setTypeOfFood(String _typeOfFood)\n {\n typeOfFood = _typeOfFood;\n }", "Food getByType(String type);", "@Override\n public String getFoodType() {\n return foodType;\n }", "@Override\n public String getFoodType() {\n return foodType;\n }", "public void setTypeOfFood(String foodType){\n typeOfFood = foodType;\n }", "public String getFoodType() {\n return \"Carnivore\";\n }", "public FoodType getFoodType() {\n\t\treturn FoodType.GRASS;\n\t}", "@Override\n public EFoodType getFoodtype() {\n MessageUtility.logGetter(name,\"getFoodtype\",EFoodType.MEAT);\n return EFoodType.MEAT;\n }", "@Override\n\tpublic List<Food> findFood(int typeid) {\n\t\treturn fb.findFood(typeid);\n\t}", "public void setFoodType(String food);", "public void serveFood() {\r\n System.out.println(\"Serving food from \" + name + \" is a \" + type + \" restaurant\");\r\n }", "public int getFood() {\n\t\treturn food;\n\t}", "@Override\r\n\tpublic String getFood() {\n\t\treturn \"banana\";\r\n\t}", "public int getFood(){\r\n\t\treturn food;\r\n\t}", "public static int showFoods(String cuisin, String type){\r\n int check=0;\r\n for(int i=0;i<foods.size();i++){\r\n if(foods.get(i).getCousin().toLowerCase().equals(cuisin.toLowerCase())\r\n && foods.get(i).getType().toLowerCase().equals(type)){\r\n System.out.println(i+\".-\"+foods.get(i).getName()+\" --> \"+foods.get(i).getDescription()+\" --> \"+foods.get(i).getPrice());\r\n check=1;\r\n }\r\n }\r\n if(check==0)\r\n System.out.println(\"There are not food in this category\");\r\n return check;\r\n }", "public String getType() {\n /**\n * @return type of Ice Cream\n */\n return type;\n }", "public boolean isFood(){\n\t\treturn foodFlag;\n\t}", "public String getFood() {\n if(food != null)\n return \"食材:\"+food;\n else {\n return content ;\n }\n }", "@Override\n\tpublic List<FoodType> FindAllType() {\n\t\treturn ftb.FindAllType();\n\t}", "public String getFoodName() {\n return foodName;\n }", "public boolean isFood() {\n\t\treturn food > 0;\n\t}", "public String food();", "public ItemType getType();", "public int foodCount() {\r\n\t\treturn this.food;\r\n\t}", "Restaurant getRestaurant();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "@Override\n\tpublic String addFoodType(String ftname) {\n\t\treturn ftb.addFoodType(ftname);\n\t}", "public int getFoodCount()\r\n\t{\r\n\t\treturn foodCount;\r\n\t}", "protected int get_food_level()\n {\n return food_level;\n }", "public FoodItem getFooditem() {\n return fooditem;\n }", "public FeedType getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "ArrayList<Restaurant> getRestaurantListByType(String type);", "public FactType getFactType() {\r\n\t\treturn factType;\r\n\t}", "@RequestMapping(value=\"/orderentry/food/{foodItem}\", method= RequestMethod.GET)\n\t@Produces(MediaType.APPLICATION_JSON)\n\t@ApiOperation(value = \"Get Order Entries based on food\")\n\t@ApiResponses(value = {\n\t\t\t@ApiResponse(code = 200, message = \"Ok\"),\n\t\t\t@ApiResponse(code = 400, message = \"Bad / Invalid input\"),\n\t\t\t@ApiResponse(code = 401, message = \"Authorization failed\"),\n\t\t\t@ApiResponse(code = 404, message = \"Resource not found\"),\n\t\t\t@ApiResponse(code = 500, message = \"Server error\"),\n\t})\n\tpublic List<OrderEntry> getOrderEntriesByFood(\n\t\t\t@PathVariable(\"foodItem\") @ApiParam(\"type of food\") final String foodItem) {\n\t\t\n\t\tList<OrderEntry> orderEntryList = orderEntryService.getOrderEntriesByFood(foodItem);\n\t\treturn orderEntryList;\n\t}", "@RequestMapping(value = \"food/type\", method = RequestMethod.POST)\n\tpublic String findByType(HttpServletRequest request, Map<String, Object> model) throws JsonProcessingException {\n\t\tList<Food> foods = foodService.findAll();\n\t\tif (request.getParameter(\"type\").equals(\"ALL\")) {\n\t\t\tmodel.put(\"foods\", foodService.findAll());\n\t\t} else {\n\t\t\tmodel.put(\"foods\", foodService.findByType(request.getParameter(\"type\")));\n\t\t}\n\t\tmodel.put(\"types\", Food.TYPE.values());\n\t\tmodel.put(\"qualities\", Food.QUALITY.values());\n\t\tmodel.put(\"qualitycounts\", mapper.writeValueAsString(foodService.qualityCounts(foods)));\n\t\treturn \"index\";\n\n\t}", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public int getType();", "public String types() { return faker.fakeValuesService().resolve(\"gender.types\", this, faker); }", "public online.food.ordering.Restaurant getRestaurant()\n {\n return restaurant;\n }", "public int expfood()\n {\n SQLiteDatabase db1 = this.getReadableDatabase();\n String stmt = \"SELECT SUM(AMOUNT) FROM EXPENSE GROUP BY TYPE HAVING TYPE='FOOD'\";\n Cursor tot = db1.rawQuery(stmt, null);\n if(tot.getCount()==0)\n {\n return 0;\n }\n else {\n tot.moveToFirst();\n int amount = tot.getInt(0);\n tot.close();\n return amount;\n }\n }", "public Restaurant getRestaurant() {\n return restaurant;\n }", "public String getCheese() {\n return this.hold.getType();\n }", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getType();", "public String getHealthierFood(FoodItem item)\r\n\t{\r\n\t\tString result = \"\";\t\r\n\t\tif(item == null)\t\t\t\r\n\t\t\treturn result = \"No results for Image\";\r\n\t\tFoodSearch actualFood = searchFoodByActualName(item);\r\n\t\tFoodSearch otherSimilarFoods = searchFoodByGeneralName(item);\r\n\t\tNutrientSearch actualFoodsNutrients = null;\r\n\t\tNutrientSearch otherSimilarFoodsNutrients = null;\r\n\t\tOptional<Nutrient> actualFoodsSugar = null;\r\n\t\tOptional<Nutrient> otherSimilarFoodsSugar = null;\r\n\t\tif(actualFood == null)\r\n\t\t{\r\n\t\t\t//TODO: If searchFoodByActualName returns null, then search food by General name, and get first healthier option from there!\r\n\t\t\tresult = \"Food from image uploaded does not exist in database. Kindly try with another food item\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif(actualFood == null || actualFood.getList() == null || actualFood.getList().getItem().size() == 0 || actualFood.getList().getItem().get(0) == null)\r\n\t\t\t{\r\n\t\t\t\tresult = \"Data 1 Not Properly Formed for Request. Please Try Again. If Error Persists, use another image\";\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tif(otherSimilarFoods == null || otherSimilarFoods.getList() == null || otherSimilarFoods.getList().getItem().size() == 0)\r\n\t\t\t{\r\n\t\t\t\tresult = \"Data 2 Not Properly Formed for Request. Please Try Again. If Error Persists, use another image\";\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t\tactualFoodsNutrients = searchNutrientByFoodNo(actualFood.getList().getItem().get(0).getNdbno());\r\n\t\t\t//Below line of code finds the first Nutrient object containing \"sugar\". Sugar is the parameter we use to determine healtier option\r\n\t\t\tactualFoodsSugar = actualFoodsNutrients.getReport().getFood().getNutrients().stream().filter(x -> x.getName().toUpperCase().contains(Constants.SUGAR)).findFirst();\r\n\t\t\tif(!actualFoodsSugar.isPresent())\r\n\t\t\t{\r\n\t\t\t\treturn result = \"No results for Image. Sugar content unavailable\";\r\n\t\t\t}\r\n\t\t\tdouble actualFoodSugarNum = Double.valueOf(actualFoodsSugar.get().getValue());\r\n\t\t\tif(actualFoodSugarNum <= 0)\r\n\t\t\t{\r\n\t\t\t\treturn result = \"The image you uploaded is the healthiest kind of \" + item.getGeneralFoodName() + \" there is!\" + \" It has zero sugars.\";\r\n\t\t\t}\r\n\t\t\tfor(Item element: otherSimilarFoods.getList().getItem())\r\n\t\t\t{\r\n\t\t\t\totherSimilarFoodsNutrients = searchNutrientByFoodNo(element.getNdbno());\r\n\t\t\t\totherSimilarFoodsSugar = otherSimilarFoodsNutrients.getReport().getFood().getNutrients().stream().filter(x -> x.getName().toUpperCase().contains(Constants.SUGAR)).findFirst();\r\n\t\t\t\tif(!otherSimilarFoodsSugar.isPresent())\r\n\t\t\t\t\tcontinue;\t\t\t\t\r\n\t\t\t\tdouble otherFoodsSugarNum = Double.valueOf(otherSimilarFoodsSugar.get().getValue());\r\n\t\t\t\tif(otherFoodsSugarNum < actualFoodSugarNum)\r\n\t\t\t\t{\r\n\t\t\t\t\tdouble scale = Math.pow(10, 2);\r\n\t\t\t\t\tdouble percentDiff = ((actualFoodSugarNum - otherFoodsSugarNum)/actualFoodSugarNum) * 100;\r\n\t\t\t\t\tpercentDiff = Math.round(percentDiff * scale) / scale;\r\n\t\t\t\t\tString manufacturer = (element.getManu().equals(\"none\")) ? \"N/A\" : element.getManu();\r\n\t\t\t\t\t//result = element.getName() + \" is a healther option.\" + \"\\n\" + \"Made by: \" + manufacturer + \"\\n\" + \"It has \" + percentDiff + \" percent less sugar\";\r\n\t\t\t\t\t//result = \"Healthier option found \";\r\n\t\t\t\t\tresult = \" A healthier option is: \" + element.getName() + \"\\n\" + \"Made by: \" + manufacturer + \"\\n\" + \"It has \" + percentDiff + \" percent less sugar\";\r\n\t\t\t\t\tresult = Utilities.encodeHtml(result);\r\n\t\t\t\t\tresult = Utilities.encodeJavaScript(result);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(result.isEmpty())\r\n\t\t\t\tresult = \"No healthier option found. Kindly go with the image uploaded\";\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "type getType();", "public List<Food> getFoods() {\n return FoodListManager.convertListToFoods(foodEntries);\n }", "RestaurantFullInfo getFullRestaurant();", "public ArrayList<Food> getFood()\n\t{\n\t\treturn food;\n\t}", "Type getType();", "Type getType();", "Type getType();", "Type getType();" ]
[ "0.83976054", "0.77688444", "0.77190304", "0.7657112", "0.7657112", "0.7528243", "0.75147474", "0.73913026", "0.73541206", "0.65882134", "0.65600866", "0.647229", "0.6450136", "0.6419857", "0.63423854", "0.63305986", "0.61786884", "0.6157401", "0.61387324", "0.6103289", "0.6074207", "0.60091704", "0.60026497", "0.589993", "0.5888608", "0.5880447", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58527577", "0.58481836", "0.5795355", "0.5751584", "0.57494754", "0.57492954", "0.57174224", "0.57174224", "0.57174224", "0.57174224", "0.57174224", "0.57174224", "0.57174224", "0.57174224", "0.57036036", "0.570359", "0.564904", "0.5648001", "0.5624091", "0.5624091", "0.5624091", "0.5624091", "0.5624091", "0.5599215", "0.5595338", "0.55933094", "0.5588844", "0.55862844", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5578319", "0.5576337", "0.55687565", "0.5562502", "0.55544597", "0.55489933", "0.5541978", "0.5541978", "0.5541978", "0.5541978" ]
0.83092856
1
setEmployees(int _employees) Sets the number of employees that the restaurant has.
public void setEmployees(int _employees){ employees = _employees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}", "public void setEmployees(ArrayList<Employee> employees) { \r\n this.employees = employees;\r\n }", "@Override\n public void setEmployees() throws EmployeeCreationException {\n\n }", "public void setEmployeeID(int employeeID) { this.employeeID = employeeID; }", "public Builder setEmployeeId(int value) {\n \n employeeId_ = value;\n onChanged();\n return this;\n }", "public void updateEmployees(List<Employe> employees) {\n\t\t\n\t}", "public void setNumberOfFloorsAndElevators(int numberOfFloors, int numberOfElevators) {\n int oldNumberOfFloors = mFloors.size();\n int oldNumberOfElevators = mElevators.size();\n\n mElevators.clear();\n mFloors.clear();\n for (int i = 0; i < numberOfFloors; ++i) {\n mFloors.add(new Floor(i, getFloorDescription(i), getFloorShortDescription(i)));\n }\n for (int i = 0; i < numberOfElevators; ++i) {\n mElevators.add(new Elevator(i, getElevatorDescription(i), mFloors));\n }\n\n pcs.firePropertyChange(PROP_NUMBER_OF_FLOORS, oldNumberOfFloors, numberOfFloors);\n pcs.firePropertyChange(PROP_NUMBER_OF_ELEVATORS, oldNumberOfElevators, numberOfElevators);\n }", "public void setEmployeeId(long employeeId);", "@Override\n\tpublic void updateEmployee(List<Employee> employees) {\n\t\t\n\t}", "public Manager(Employee[] employees) {\n\t\tsuper();\n\t\tthis.employees = employees;\n\t}", "void setNumberOfArtillery(int artillery);", "public void setEmployee(int index, Person emp) {\n if (index >= 0 && index < employees.length) {\n employees[index] = emp;\n }\n }", "@Override\n\tpublic void setEmpno(Integer empno) {\n\t\tsuper.setEmpno(empno);\n\t}", "public void setEmployeeNumber(String value) {\n setAttributeInternal(EMPLOYEENUMBER, value);\n }", "@Override\r\n\tpublic Result update(Employees employees) {\n\t\treturn null;\r\n\t}", "public EmployeeSet()\n\t{\n\t\tnumOfEmployees = 0;\n\t\temployeeData = new Employee[10];\n\t}", "public void setEmployeeID(int employeeID)\n {\n if(employeeID<=9999&&employeeID>=1000)\n {\n this.employeeID = employeeID;\n }else\n {\n System.out.println(\"The Employee ID should be of 4 digits only.\");\n \n }\n }", "public void setEmployeeId(int employeeId) {\r\n\t\r\n\t\tthis.employeeId = employeeId;\r\n\t}", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "public void setFloors(final int theFloors) {\n\t\tif (theFloors < 1) {\n\t\t\tthrow new IllegalArgumentException(\"Please supply a valid floors.\");\n\t\t}\n\t\tthis.mFloors = theFloors;\n\t}", "public void setNoOfTicket(String noOfTickets) {\n \r\n }", "public void setEmployeeId(long employeeId) {\n this.employeeId = employeeId;\n }", "public void setCantidadAvenidasYCalles(int avenidas, int calles);", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "void xsetNumberOfInstallments(org.apache.xmlbeans.XmlInteger numberOfInstallments);", "public void setEmpleado(Empleado empleado)\r\n/* 188: */ {\r\n/* 189:347 */ this.empleado = empleado;\r\n/* 190: */ }", "public void setProducts(Employee employee, List<Product> products) {\n employee.getProducts().clear();\n employee.setProducts(products);\n employeeRepository.save(employee);\n }", "public int size()\n\t{\n\t\treturn numOfEmployees;\n\t}", "@Override\r\n\tpublic int updateEmployee(Connection con, Employee employee) {\n\t\treturn 0;\r\n\t}", "public void setEmployee(String employee)\r\n/* 43: */ {\r\n/* 44:47 */ this.employee = employee;\r\n/* 45: */ }", "public void setEmpId(int parseInt) {\n\t\t\n\n\n\t\t\n\t}", "public void setNumSales(int numSales){\r\n this.sales = numSales;\r\n }", "public void setNumberOfElevators(int numberOfElevators) {\r\n this.numberOfElevators = numberOfElevators;\r\n }", "public static void setHotelSize(int size) {\r\n\t\tfor(int count = 0;count< size; count++) {\r\n\t\t\thotel_size.add(count + 1);\r\n\t\t}\r\n\t}", "public void setNumErode(int n) {\r\n itersErode = n;\r\n }", "@Override\n\tpublic void setEmpId(long empId) {\n\t\t_employee.setEmpId(empId);\n\t}", "public void updateEmployee(Employe employee) {\n\t\t\n\t}", "void setNumberOfCavalry(int cavalery);", "public void setEmployee (jkt.hms.masters.business.MasEmployee employee) {\n\t\tthis.employee = employee;\n\t}", "private void setNumberOfInjured(long numberOfInjured) throws NumberOutOfBoundsException {\n if (!isValidNumberOfInjured(numberOfInjured)) {\n throw new NumberOutOfBoundsException(String.format(\"Number of Injured people must be larger or equal to zero and not \\\"%s\\\"\", numberOfInjured));\n }\n this.numberOfInjured = numberOfInjured;\n }", "public void setNumberOfRestraunts(int _numberOfRestraunts){\n \n numberOfRestraunts = _numberOfRestraunts;\n }", "@Test\n\tpublic void testingMultipleEmployees() {\n\t\t\n\t\tthis.gettingUserAndPass();\n\t\t\n\t\tthis.sendingKeys();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\t\t\n\t\tdriver.findElement(By.id(\"sn_staff\")).click();\n\t\tdriver.findElement(By.id(\"act_primary\")).click();\n\t\t\n\t\tint beforeAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tdriver.findElement(By.id(\"_asf1\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl1\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase1\")).sendKeys(\"[email protected]\");\n\t\t\n\t\tdriver.findElement(By.id(\"_asf2\")).sendKeys(\"FirstName\");\n\t\tdriver.findElement(By.id(\"_asl2\")).sendKeys(\"LastName\");\n\t\tdriver.findElement(By.id(\"_ase2\")).sendKeys(\"[email protected]\");\n\t\t\n\t\tdriver.findElement(By.id(\"_as_save_multiple\")).click();\n\t\t\n\t\tint afterAdd = driver.findElements(By.tagName(\"a\")).size();\n\t\t\n\t\tint newAdded = beforeAdd - afterAdd;\n\t\t\n\t\tassertEquals(2, newAdded);\n\t\t\n\t}", "@Override\n public void setDepartmentEmployee(Employee employee, int departmentId) {\n\n }", "public void setNumPens(int numPens){\n this.mFarm.setNumPens(numPens);\n }", "public void setFoodCount(int foodCount)\r\n\t{\r\n\t\tthis.foodCount = foodCount;\r\n\t}", "public void setMakeEmp(Integer makeEmp) {\n\t\tthis.makeEmp = makeEmp;\n\t}", "public void setNoOfRentals(int noOfRentals) {\n this.noOfRentals = noOfRentals;\n }", "@Override\n public void setEmployeeDepartment(int employeeId, int departmentId) {\n\n }", "public void setNumberOfCheese(int cheese) {\n this.cheese = cheese;\n }", "public void setNumberOfFloors(int numberOfFloors) {\r\n this.numberOfFloors = numberOfFloors;\r\n }", "public void setEmployee(Employee employee) {\r\n this.employee = employee;\r\n\r\n idLabel.setText(Integer.toString(employee.getId()));\r\n firstNameField.setText(employee.getFirstName());\r\n lastNameField.setText(employee.getLastName());\r\n industryField.setText(employee.getIndustry());\r\n workTypeField.setText(employee.getWorkType());\r\n addressField.setText(employee.getAddress());\r\n }", "public void setMaxNoEmp(Integer maxNoEmp) {\n this.maxNoEmp = maxNoEmp;\n }", "public void setNumberShips(int numberShips);", "public void setGivenNumbers(int numbers) {\r\n\t\tthis.givenNumbers= numbers;\r\n\t}", "@Override\n\tpublic void updateEmployee() {\n\n\t}", "public void setModifyEmp(Integer modifyEmp) {\n\t\tthis.modifyEmp = modifyEmp;\n\t}", "void setNumberOfInstallments(java.math.BigInteger numberOfInstallments);", "@Override\n\tpublic void setEnemyCount(int n) {\n\t\t\n\t}", "public void setNumberOfBees(int n) {\r\n this.numberOfBees = n;\r\n }", "public void setFloors(int floors);", "@Override\n\tpublic TaskForUserOngoingRecord setNumRevives(Integer value) {\n\t\tsetValue(6, value);\n\t\treturn this;\n\t}", "public void setBalls(int n){\r\n balls = n;\r\n }", "public SalesEmployee(){\n\t\tfirstName = \"unassigned\";\n\t\tlastName = \"unassigned\";\n\t\tppsNumber = \"unassigned\";\n\t\tbikeEmployeeNumber++;\n\t}", "public void setNumofbids(int value) {\n this.numofbids = value;\n }", "@Override\n\tpublic int updateOrgEmployee(Org_employee orgEmloyee) {\n\t\treturn 0;\n\t}", "public void setNumberOfRolls(int nOfRolls)\n {\n this.numberOfRolls = nOfRolls;\n }", "public void setEmployeeId(String employeeId) {\n this.employeeId = employeeId;\n }", "public void setEmployeePersonId(Number value) {\n setAttributeInternal(EMPLOYEEPERSONID, value);\n }", "public void renewEmployeesList(){\n employees = new ArrayList<>();\n }", "@Override\n\tpublic void updateEmployee(int empid, int empNewSalary) {\n\t\t\n\t}", "public Manager(Employee[] employees, String name, String jobTitle, int level, String dept) {\n\t\tsuper(name, jobTitle, level, dept);\n\t\tthis.employees = employees;\n\t}", "@Override\n\tpublic int getNumberOfEmployees() {\n\t\treturn template.queryForObject(\"select count(*) from employee\", Integer.class);\n\t}", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "@Override\r\n\tpublic Result add(Employees employees) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void setEmployeeId(long employeeId) {\n\t\t_userSync.setEmployeeId(employeeId);\n\t}", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_employee.setUserId(userId);\n\t}", "void setNumberOfInfantry(int infantry);", "public void setEmpNumber(String empNumber)\r\n\t{\r\n\t\tthis.empNumber = empNumber;\r\n\t}", "public static void fillEmployees() {\n\t\tString name1;\n\t\tString name2;\n\t\tString name3;\n\t\tString name4;\n\t\tfor(int i=0;i<auxEmployees.length;i++) { //Va llenando de una en una las filas del array auxiliar de empleados (cada fila es una empresa) con nommbres aleatorios del array employees\n\t\t\tname1=\"\";\n\t\t\tname2=\"\";\n\t\t\tname3=\"\";\n\t\t\tname4=\"\";\n\t\t\twhile (name1.equals(name2) || name1.equals(name3) || name1.equals(name4) || name2.equals(name3) || name2.equals(name4) || name3.equals(name4)) { //Si los nombres son iguales vuelve a asignar nombres\n\t\t\t\tname1=employees[selector.nextInt(employees.length)];\n\t\t\t\tname2=employees[selector.nextInt(employees.length)];\n\t\t\t\tname3=employees[selector.nextInt(employees.length)];\n\t\t\t\tname4=employees[selector.nextInt(employees.length)];\n\t\t\t}\n\t\t\tauxEmployees[i][0]=name1;\n\t\t\tauxEmployees[i][1]=name2;\n\t\t\tauxEmployees[i][2]=name3;\n\t\t\tauxEmployees[i][3]=name4;\n\t\t}\n\t}", "public void setEDays(int days){\n \teDays = days;\n }", "public Manager() {\n\t\tsuper();\n\t\temployees = new Employee[10];\n\t}", "public static void setNumberOfTables(int numberOfTables) {\n if (numberOfTables < 0) {\n ReservationManager.numberOfTables = 0;\n\n } else {\n ReservationManager.numberOfTables = numberOfTables;\n }\n\n allReservations = new HashMap<>();\n }", "@Override\n\tpublic void updateEmployee(Employee e) {\n\t\t\n\t}", "public void setNumberOfProducts (int p)\n {\n if (p <= 0)\n {\n System.out.println (\"Please try again and enter a valid number of products.\");\n }\n else{\n numberOfProducts = p;\n }\n\n }", "public void setEmployeeArray(int i, andrewNamespace.xsdconfig.EmployeeDocument.Employee employee)\r\n {\r\n generatedSetterHelperImpl(employee, EMPLOYEE$0, i, org.apache.xmlbeans.impl.values.XmlObjectBase.KIND_SETTERHELPER_ARRAYITEM);\r\n }", "public void setSales(Integer sales) {\n this.sales = this.sales + sales;\n }", "public countEmplyee_args(countEmplyee_args other) {\n __isset_bitfield = other.__isset_bitfield;\n this.companyId = other.companyId;\n }", "public void seteWages(Integer eWages) {\n this.eWages = eWages;\n }", "void setSpokes(long spokes);", "public void setHotelID(int value) {\n this.hotelID = value;\n }", "@Test\n public void setNumberOfHoursTest() {\n e1.setNumberOfHours(200);\n int expected = 200;\n\n assertEquals(\"The expected new number of hours does not match the actual: \"\n , expected, e1.getNumberOfHours());\n }", "public void setFlores(int avenida, int calle, int cant);", "private static void setEulerNumber(final Cell3D[] aCells, final ImageStack aInputStack, final int[] aLables)\r\n\t{\r\n\t\tfinal double[] eulerNumbers = GeometricMeasures3D.eulerNumber(aInputStack, aLables, connectivity);\r\n\t\tfor (int i = 0; i < aCells.length; i++)\r\n\t\t{\r\n\t\t\taCells[i].getNucleus().getMeasurements().setMeasurement(SegmentMeasurements.EULER_NUMBER, eulerNumbers[i]);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void updateEmployee(Employee t) {\n\t\t\r\n\t}", "public void setAttempts(int value) {\n this.attempts = value;\n }", "public void setEmployeeCode(String value) {\n this.employeeCode = value;\n }", "public void setNumFilhos(int numFilhos){ \n this.numFilhos = numFilhos;\n }", "public void setEmployeeNum(String employeeNum) {\n this.employeeNum = employeeNum == null ? null : employeeNum.trim();\n }", "public void setNumBalls(int numBalls) {\n this.numBalls += numBalls;\n setScoreText();\n }", "public void setTotalCustomers(int _totalCustomers){\n this.totalCustomers = _totalCustomers;\n\n }" ]
[ "0.70679104", "0.6715396", "0.6191042", "0.61899203", "0.6119194", "0.6106275", "0.60348344", "0.58800864", "0.58733165", "0.5866944", "0.57879317", "0.57839596", "0.57049245", "0.56986", "0.56504035", "0.56312066", "0.5607398", "0.5600048", "0.5550465", "0.5403343", "0.5379848", "0.53603935", "0.53599805", "0.5358575", "0.53512794", "0.53377455", "0.53058267", "0.52951396", "0.52850753", "0.52828974", "0.5269434", "0.5268411", "0.52619463", "0.5250089", "0.5249301", "0.524082", "0.52278113", "0.5222452", "0.52217126", "0.5203301", "0.51980925", "0.51979667", "0.51889575", "0.51783645", "0.51711166", "0.5165155", "0.5156193", "0.5152367", "0.51470315", "0.51468015", "0.5146417", "0.5144694", "0.5138485", "0.5136348", "0.51351184", "0.51244104", "0.51110595", "0.51110256", "0.51105064", "0.51080775", "0.5102849", "0.5096175", "0.50817454", "0.50690955", "0.50517964", "0.50485593", "0.50225854", "0.5021729", "0.5015436", "0.50119567", "0.5002396", "0.50022256", "0.5001071", "0.49933195", "0.49914318", "0.49893147", "0.49786362", "0.49766716", "0.49635604", "0.4962787", "0.49624303", "0.49488795", "0.49453968", "0.49406457", "0.49355304", "0.4933655", "0.4931876", "0.49294302", "0.4925384", "0.4923339", "0.49161723", "0.49085915", "0.48960394", "0.48927712", "0.48919663", "0.4889608", "0.48862854", "0.48840117", "0.4882937", "0.48798275" ]
0.85545045
0
getEmployees() Returns the number of employees that the restaurant has.
public String getEmployees(){ return employees; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getNumberOfEmployees() {\n\t\treturn template.queryForObject(\"select count(*) from employee\", Integer.class);\n\t}", "public int size()\n\t{\n\t\treturn numOfEmployees;\n\t}", "public int sizeOfEmployeeArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(EMPLOYEE$0);\r\n }\r\n }", "@Override\r\n\tpublic int fetchEmployeCount() {\n\t\treturn edao.getEmployeCount();\r\n\t}", "public void setEmployees(int _employees){\n employees = _employees;\n }", "@Override\r\n\tpublic List<Employee> countByName() {\n\t\treturn null;\r\n\t}", "public int countEmployees(String g) {\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\t\n\t\tlog.debug(\"EmplyeeService.getAllEmployee() return list of employees\");\n\t\treturn repositary.findAll();\n\t}", "@Override\n\tpublic List<Employee> findAllEmployees() {\n\t\treturn employeeRepository.findAllEmployess();\n\t}", "public long employeesCount(String companyShortName);", "public int totalLivrosEmprestados(String clienteNome){\n int quantidadeLivro = 0;\n for (Emprestimo e : listaEmprestimo) {\n if(e.getClienteNome().equals(clienteNome)){\n quantidadeLivro++;\n }\n }\n return quantidadeLivro;\n }", "public List<Employe> findAllEmployees() {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/listEmployees\", method = RequestMethod.GET)\r\n\tpublic Employee employees() {\r\n System.out.println(\"---BEGIN\");\r\n List<Employee> allEmployees = employeeData.findAll();\r\n \r\n System.out.println(\"size of emp == \"+allEmployees.size());\r\n System.out.println(\"---END\");\r\n Employee oneEmployee = allEmployees.get(0);\r\n\t\treturn oneEmployee;\r\n }", "public void listEmployees() {\n\t\tSession session = factory.openSession();\n\t\tTransaction transaction = null;\n\t\ttry {\n\t\t\ttransaction = session.beginTransaction();\n\t\t\t@SuppressWarnings(\"rawtypes\")\n\t\t\tList employees = session.createQuery(\"FROM Employee\").list();\n\t\t\tfor (@SuppressWarnings(\"rawtypes\")\n\t\t\tIterator iterator = employees.iterator(); iterator.hasNext();) {\n\t\t\t\tEmployee employee = (Employee) iterator.next();\n\t\t\t\tSystem.out.print(\"First Name: \" + employee.getFirstName());\n\t\t\t\tSystem.out.print(\" Last Name: \" + employee.getLastName());\n\t\t\t\tSystem.out.println(\" Salary: \" + employee.getSalary());\n\t\t\t}\n\t\t\ttransaction.commit();\n\t\t} catch (HibernateException e) {\n\t\t\tif (transaction != null)\n\t\t\t\ttransaction.rollback();\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}", "public Employee[] getEmployeesList() {\n\t\treturn employees;\n\t}", "@Override\n public int getResourceCount() {\n for (Employee employee: employeesList){\n this.resourceCount += employee.getResourceCount();\n }\n return this.resourceCount+1;\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employees;\r\n\t}", "@Test\n public void getAllEmployees() {\n List<Employees> employeesList = employeeDAO.getEmployees().collect(Collectors.toList());\n Assertions.assertEquals(107, employeesList.size());\n }", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\n\t}", "@Override\r\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn null;\n\t}", "public List<Employee> getAllEmployees(){\n\t\tList<Employee> employees = employeeDao.findAll();\n\t\tif(employees != null)\n\t\t\treturn employees;\n\t\treturn null;\n\t}", "public Map<String, Person> getEmployees() {\n return employees;\n }", "public List<Employees> getEmployeesList()\n {\n return employeesRepo.findAll();\n }", "public List<Employee> getAllEmployees() {\n return employeeRepository.findAll();\n }", "@Override\n\tpublic List<EmployeeBean> getAllEmployees() {\n\t\tLOGGER.info(\"starts getAllEmployees method\");\n\t\tLOGGER.info(\"Ends getAllEmployees method\");\n\t\t\n\t\treturn adminEmployeeDao.getAllEmployees();\n\t}", "@Override\n\t@Transactional\n\tpublic List<Employee> getAllEmployees() {\n\t\treturn employeeDao.getAllEmployees();\n\t}", "@GetMapping(value=\"/searchEmpData\")\n\tpublic List<Employee> getAllEmployees()\n\t{\n\t\treturn this.integrationClient.getAllEmployees();\n\t}", "@Override\n\tpublic List<Employee> getEmpleados() {\n\t\treturn repositorioEmployee.findAll();\n\t}", "public List<EmployeeTO> getAllEmployees() {\n\t\t\r\n\t\treturn EmployeeService.getInstance().getAllEmployees();\r\n\t}", "public List<Employee> list() {\n\t\t\treturn employees;\n\t\t}", "public List<Employee> getAllEmployees() {\n\t\tList<Employee> list = new ArrayList<Employee>();\n\t\tlist = template.loadAll(Employee.class);\n\t\treturn list;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployees() {\n\t\ttry {\n\t\t\tList<Employee> empList = new ArrayList<Employee>();\n\t\t\tList<Map<String, Object>> rows = template.queryForList(\"select * from employee\");\n\t\t\tfor(Map<?, ?> rowNum : rows) {\n\t\t\t\tEmployee emp = new Employee();\n\t\t\t\temp.setEmployeeId((Integer)rowNum.get(\"empid\"));\n\t\t\t\temp.setFirstName((String)rowNum.get(\"fname\"));\n\t\t\t\temp.setLastName((String)rowNum.get(\"lname\"));\n\t\t\t\temp.setEmail((String)rowNum.get(\"email\"));\n\t\t\t\temp.setDesignation((String)rowNum.get(\"desig\"));\n\t\t\t\temp.setLocation((String)rowNum.get(\"location\"));\n\t\t\t\temp.setSalary((Integer)rowNum.get(\"salary\"));\n\t\t\t\tempList.add(emp);\n\t\t\t}\n\t\t\treturn empList;\n\t\t} catch (DataAccessException excep) {\n\t\t\treturn null;\n\t\t}\n\t}", "public int getNumberOfPeopleInElevator(int elevator) {\n\t\treturn elevators.get(elevator).getPeopleCount();\n\t}", "public static void printEmployees() {\n List<Employee> employees = null;\n try {\n employees = employeeRepository.getAll(dataSource);\n } catch (SQLException e) {\n LOGGER.error(e.getMessage());\n }\n if (employees.isEmpty()) {\n System.out.println(\"\\n\" + resourceBundle.getString(\"empty.list\") + \"\\n\");\n LOGGER.warn(\"The list of employees is empty\");\n return;\n }\n System.out.println();\n employees.forEach(System.out::println);\n }", "@Transactional(readOnly = true)\r\n\t@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\treturn em.createQuery(\"select e from Employee e order by e.office_idoffice\").getResultList();\r\n\t}", "@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_EMPLOYEECOMPLAINT);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\r\n\tpublic List<Employee> findAllEMployees() {\n\t\tList<Employee> employees = new ArrayList<Employee>();\r\n\t\tString findData = \"select * from employee\";\r\n\r\n\t\ttry {\r\n\t\t\tStatement s = dataSource.getConnection().createStatement();\r\n\r\n\t\t\tResultSet set = s.executeQuery(findData);\r\n\r\n\t\t\twhile (set.next()) {\r\n\t\t\t\tString name = set.getString(1);\r\n\t\t\t\tint id = set.getInt(\"empId\");\r\n\t\t\t\tint sal = set.getInt(\"salary\");\r\n\t\t\t\tString tech = set.getString(\"technology\");\r\n\t\t\t\tEmployee employee = new Employee(id, sal, name, tech);\r\n\t\t\t\temployees.add(employee);\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn employees;\r\n\r\n\t}", "@Override\n\tpublic List<Employee> findAllEmployee() {\n\t\treturn null;\n\t}", "public List<Employee> getAllEmployees(){\n\t\tFaker faker = new Faker();\n\t\tList<Employee> employeeList = new ArrayList<Employee>();\n\t\tfor(int i=101; i<=110; i++) {\n\t\t\tEmployee myEmployee = new Employee();\n\t\t\tmyEmployee.setId(i);\n\t\t\tmyEmployee.setName(faker.name().fullName());\n\t\t\tmyEmployee.setMobile(faker.phoneNumber().cellPhone());\n\t\t\tmyEmployee.setAddress(faker.address().streetAddress());\n\t\t\tmyEmployee.setCompanyLogo(faker.company().logo());\n\t\t\temployeeList.add(myEmployee);\n\t\t}\n\t\treturn employeeList;\n\t}", "@Query(\"select count(u) from User u where u.role = 'EMPLOYEE'\")\n Long getTotalEmployeesCount();", "public static void main(String[] args) throws Exception {\n\n System.out.println(Employee.employeeCount);\n\n }", "public ViewObjectImpl getEmployees() {\n return (ViewObjectImpl)findViewObject(\"Employees\");\n }", "public void setEmployees(Employee[] employees) {\n\t\tthis.employees = employees;\n\t}", "@Override\n public int getItemCount() {\n return employeeList.size();\n }", "int getCustomersCount();", "public List<Employee> getListOfAllEmployees() {\n\t\tlista = employeeDao.findAll();\r\n\r\n\t\treturn lista;\r\n\t}", "public String getAllEmployees() {\n\t\t\n\t\tString allEmployees = \"\\n\";\n\t\t\n\t\tfor(AbsStaffMember staffMember : repository.getAllMembers())\n\t\t{\n\t\t\tallEmployees += \"\\t- \" + staffMember.getName() + \"\\n\";\n\t\t}\n\t\t\n\t\treturn allEmployees;\n\t}", "@Override\r\n\tpublic Result add(Employees employees) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic int countByEmployeeId(int EmployeeId) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_EMPLOYEEID;\n\n\t\tObject[] finderArgs = new Object[] { EmployeeId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_LMSLEAVEINFORMATION_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_EMPLOYEEID_EMPLOYEEID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(EmployeeId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int numberOfHotels() {\r\n \tint anzahlHotel=hotelDAO.getHotelList().size();\r\n \treturn anzahlHotel;\r\n }", "public List<Integer> getAllEmpno() {\n\t\treturn null;\n\t}", "public ResponseEntity<List<Employee>> getAllEmployees() {\n \tList<Employee> emplist=empService.getAllEmployees();\n\t\t\n\t\tif(emplist==null) {\n\t\t\tthrow new ResourceNotFoundException(\"No Employee Details found\");\n\t\t}\n\t\t\n\t\treturn new ResponseEntity<>(emplist,HttpStatus.OK);\t\t\n }", "public static int getNoOfHospitals(){\n return noOfHospitals;\n }", "@Override\r\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn employeeDao.getAllEmployee();\r\n\t}", "public List<Employee> getEmployees() {\n\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\t/*Sample data begins\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tEmployee employee = new Employee();\n\t\t\temployee.setEmail(\"[email protected]\");\n\t\t\temployee.setFirstName(\"Shiyong\");\n\t\t\temployee.setLastName(\"Lu\");\n\t\t\temployee.setAddress(\"123 Success Street\");\n\t\t\temployee.setCity(\"Stony Brook\");\n\t\t\temployee.setStartDate(\"2006-10-17\");\n\t\t\temployee.setState(\"NY\");\n\t\t\temployee.setZipCode(11790);\n\t\t\temployee.setTelephone(\"5166328959\");\n\t\t\temployee.setEmployeeID(\"631-413-5555\");\n\t\t\temployee.setHourlyRate(100);\n\t\t\temployees.add(employee);\n\t\t}\n\t\tSample data ends*/\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\"SELECT P.*, E.StartDate, E.HourlyRate, E.Email, E.ID, L.* \"\n\t\t\t\t\t+ \"FROM Employee E, Person P, Location L\"\n\t\t\t\t\t+ \" WHERE P.SSN = E.SSN AND L.ZipCode = P.ZipCode\");\n\t\t\twhile(rs.next()) {\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\temployee.setAddress(rs.getString(\"Address\"));\n\t\t\t\temployee.setCity(rs.getString(\"City\"));\n\t\t\t\temployee.setStartDate(String.valueOf(rs.getDate(\"StartDate\")));\n\t\t\t\temployee.setState(rs.getString(\"State\"));\n\t\t\t\temployee.setZipCode(rs.getInt(\"ZipCode\"));\n\t\t\t\temployee.setTelephone(String.valueOf(rs.getLong(\"Telephone\")));\n\t\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"SSN\")));\n\t\t\t\temployee.setHourlyRate(rs.getInt(\"HourlyRate\"));\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t\treturn employees;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn null;\n\t}", "int getEducationsCount();", "public abstract long countByEmployee(Employee employee);", "public int queryAllRows(Emp emp) throws Exception {\n\t\tint result = 0;\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = sf.openSession();\n\t\t\tString sql = \"select count(*) from emp\";\n\t\t\tif (emp != null) {\n\t\t\t\tif (!(\"\").equals(emp.getEname())) {\n\t\t\t\t\tsql = sql + \" where ename like '%\" + emp.getEname() + \"%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tSQLQuery query = session.createSQLQuery(sql);\n\t\t\tList list = query.list();\n//\t\t\tBigInteger count = (BigInteger) list.get(0);\n//\t\t\trows = count.intValue();\n\t\t\tresult=(Integer) list.get(0);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (session != null)\n\t\t\t\tsession.close();\n\t\t}\n\t\treturn result;\n\t}", "public static int getEmployeeCount(Connection conn) {\n\t\tint num = -1;\n\t\ttry {\n\t\t\t// Create the SQL query string which uses the \"getEmployeeCount\" stored procedure in the employee \n\t\t\tString sql = \"CALL getEmployeeCount()\";\n\t\t\t// Create a new SQL statement \n\t\t\tStatement st = conn.createStatement();\n\t\t\t// Create a new results set which store the value returned by the when the SQL statement is executed \n\t\t\tResultSet rs = st.executeQuery(sql);\n\t\t\t// While there are still elements in the results set\n\t\t\twhile (rs.next()) \n\t\t\t\t// assign the next int in the results set to num\n\t\t\t\tnum = rs.getInt(1); \n\t\t\t// close the results set\n\t\t\trs.close(); \n\t\t\t// close the statement\n//\t\t\tThis process will be used similarly in the other methods also, with modifications\n\t\t\tst.close(); \n\t\t}\n//\t\tWe call the SQL exception if there are any errors with calling the SQL procedures but not in the java file itself.\n\t\tcatch (SQLException e) {\n\t\t\tSystem.out.println(\"Error in getEmployeeCount\");\n\t\t\te.printStackTrace();\n\t\t}\n//\t\tWe are returning the result\n\t\treturn num;\t\t\n\t}", "@Override\n public List<Employee> getAllEmployees() {\n return null;\n }", "public static void main(String[] args) {\n \n Employee[] employees = readFile(\"C:\\\\Users\\\\gdemirturk\\\\OneDrive\\\\Shared\\\\Coding\\\\git\\\\javabyLiang\\\\src\\\\JavaIII\\\\Project_1\\\\employee.txt\");\n \n //pass the employee list to employee manager class\n EmployeeManager employeeManager = new EmployeeManager(employees);\n String manager = \"Joseph\";\n int empCount = employeeManager.countEmployeesUnder(manager);\n System.out.println(\"Number of employees report to \" + manager + \" are:\"+ empCount);\n }", "@Override\n\tpublic void getAllEmployee() {\n\t\t\n\t}", "public Vector<Employees> getEmployees() {\n\t\t\tVector<Employees> v = new Vector<Employees>();\n\t\t\ttry {\n\t\t\t\tStatement stmt = conn.createStatement();\n\t\t\t\tResultSet rs = stmt\n\t\t\t\t\t\t.executeQuery(\"select * from employees_details order by employees_pf\");\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tint file_num = rs.getInt(1);\n\t\t\t\t\tString name = rs.getString(2);\n\t\t\t\t\tint drive = rs.getInt(3);\n\t\t\t\t\tEmployees employee = new Employees(file_num, name, drive);\n//\t\t\t\t\tCars cars = new Truck(reg, model, drive);\n\t\t\t\t\tv.add(employee);\n\t\t\t\t}\n\t\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn v;\n\t}", "@RequestMapping(\"/employee\")\n\tpublic List<Employee> getAllEmplyee() {\n\t\treturn service.getAllEmplyee();\n\t}", "public static int inputEmployeeCount() throws IOException{\n int employeeCount; //Theinteger for the number of employees\n \n //Prompt user it input data\n System.out.println(\"Please enter the number of employees you wish to calculate commission for:\");\n \n //Get numberof employees\n employeeCount = Integer.parseInt(input.readLine());\n System.out.println(\"\");\n \n //Return number of employees\n return employeeCount;\n }", "@GetMapping(\"/findAllEmployees\")\n\tpublic List<Employee> getAll() {\n\t\treturn testService.getAll();\n\t}", "@Override\r\n\tpublic List<Employee> findAll() {\n\t\treturn null;\r\n\t}", "public static List<Employee> getAllEmployees(){\n\t\t// Get the Datastore Service\n\t\tlog.severe(\"datastoremanager-\" + 366);\n\t\tDatastoreService datastore = DatastoreServiceFactory.getDatastoreService();\n\t\tlog.severe(\"datastoremanager-\" + 368);\n\t\tQuery q = buildAQuery(null);\n\t\tlog.severe(\"datastoremanager-\" + 370);\n\t\t// Use PreparedQuery interface to retrieve results\n\t\tPreparedQuery pq = datastore.prepare(q);\n\t\tlog.severe(\"datastoremanager-\" + 373);\n\t\t//List for returning\n\t\tList<Employee> returnedList = new ArrayList<>();\n\t\tlog.severe(\"datastoremanager-\" + 376);\n\t\t//Loops through all results and add them to the returning list \n\t\tfor (Entity result : pq.asIterable()) {\n\t\t\tlog.severe(\"datastoremanager-\" + 379);\n\t\t\t//Vars to use\n\t\t\tString actualFirstName = null;\n\t\t\tString actualLastName = null;\n\t\t\tBoolean attendedHrTraining = null;\n\t\t\tDate hireDate = null;\n\t\t\tBlob blob = null;\n\t\t\tbyte[] photo = null;\n\t\t\t\n\t\t\t//Get results via the properties\n\t\t\ttry {\n\t\t\t\tactualFirstName = (String) result.getProperty(\"firstName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tactualLastName = (String) result.getProperty(\"lastName\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tattendedHrTraining = (Boolean) result.getProperty(\"attendedHrTraining\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\thireDate = (Date) result.getProperty(\"hireDate\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tblob = (Blob) result.getProperty(\"picture\");\n\t\t\t} catch (Exception e){}\n\t\t\ttry {\n\t\t\t\tphoto = blob.getBytes();\n\t\t\t} catch (Exception e){}\n\t\t\tlog.severe(\"datastoremanager-\" + 387);\n\t\t\t\n\t\t\t//Build an employee (If conditionals for nulls)\n\t\t\tEmployee emp = new Employee();\n\t\t \temp.setFirstName((actualFirstName != null) ? actualFirstName : null);\n\t\t \temp.setLastName((actualLastName != null) ? actualLastName : null);\n\t\t \temp.setAttendedHrTraining((attendedHrTraining != null) ? attendedHrTraining : null);\n\t\t \temp.setHireDate((hireDate != null) ? hireDate : null);\n\t\t \temp.setPicture((photo != null) ? photo : null);\n\t\t \tlog.severe(\"datastoremanager-\" + 395);\n\t\t \treturnedList.add(emp);\n\t\t}\n\t\tlog.severe(\"datastoremanager-\" + 398);\n\t\treturn returnedList;\n\t}", "@Override\n\tpublic List<Employee> getAllEmployee() {\n\t\tList<Employee> employee = new ArrayList<>();\n\t\tlogger.info(\"Getting all employee\");\n\t\ttry {\n\t\t\temployee = employeeDao.getAllEmployee();\n\t\t\tlogger.info(\"Getting all employee = {}\",employee.toString());\n\t\t} catch (Exception exception) {\n\t\t\tlogger.error(exception.getMessage());\n\t\t}\n\t\treturn employee;\n\t}", "@GetMapping(\"/employees\")\r\n\tpublic List<Employee> getEmployees(){\r\n\t\t\r\n\t\treturn employeeService.getEmployees();\r\n\t\t\r\n\t}", "public int totalCompanies(){\n\treturn companyEmpWageArray.size();\n }", "public static int countByEmployeeId(long employeeID)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException {\n\t\treturn getPersistence().countByEmployeeId(employeeID);\n\t}", "@GetMapping(\"/employee\")\r\n\tpublic List<Employee> getAllEmployees()\r\n\t{\r\n\t\treturn empdao.findAll();\r\n\t}", "@Transactional\n\tpublic List<Employee> getAllEmployee() {\n\t\treturn accountDao.getAllEmployee();\n\t}", "public List<Employee> findAll() {\n return employeeRepository.findAll();\n }", "public int getElevatorCount() { return this.elevators == null ? 0 : this.elevators.length; }", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Employee> getAllEmployees() {\r\n\t\tfinal Session session = sessionFactory.getCurrentSession();\t\t\r\n\t\tfinal Query query = session.createQuery(\"from Employee e order by id desc\");\r\n\t\t//Query q = session.createQuery(\"select NAME from Customer\");\r\n\t\t//final List<Employee> employeeList = query.list(); \r\n\t\treturn (List<Employee>) query.list();\r\n\t}", "public int Customers()\r\n\t{\r\n\t\treturn customers.size();\r\n\t}", "public List<Employee> getEmployees();", "public int getEmployeeNumber() {\r\n return employeeNumber;\r\n }", "@GetMapping(\"/all\")\n\tpublic ResponseEntity<List<Employee>> getAllEmployees() {\n\t\tList<Employee> list = service.getAllEmployees();\n\t\treturn new ResponseEntity<List<Employee>>(list, HttpStatus.OK);\n\t}", "public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}", "public int capacity()\n\t{\n\t\treturn employeeData.length;\n\t}", "@Override\n\tpublic List<Employee> viewAllEmployees() {\n\t\t CriteriaBuilder cb = em.getCriteriaBuilder();\n\t\t CriteriaQuery<Employee> cq = cb.createQuery(Employee.class);\n\t\t Root<Employee> rootEntry = cq.from(Employee.class);\n\t\t CriteriaQuery<Employee> all = cq.select(rootEntry);\n\t \n\t\t TypedQuery<Employee> allQuery = em.createQuery(all);\n\t\t return allQuery.getResultList();\n\t}", "int getNumberOfGuests();", "@Override\n\tpublic int incheoncount() throws Exception {\n\t\treturn dao.incheoncount();\n\t}", "public List<Employee> getAll() {\n\t\treturn edao.listEmploye();\n\t}", "public Employee getHighestRevenueEmployee() {\n\t\tEmployee employee = new Employee();\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tConnection con = DriverManager.getConnection(\"jdbc:mysql://mysql3.cs.stonybrook.edu:3306/mwcoulter?useSSL=false\",\"mwcoulter\",\"111030721\");\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(\n\t\t\t\t\t\"SELECT R.CustRepId, P.FirstName, P.LastName, E.Email, Count(*) \" +\n\t\t\t\t\t\"FROM Person P, Rental R, Employee E \" +\n\t\t\t\t\t\"WHERE P.SSN = R.CustRepId AND E.SSN = P.SSN \"+\n\t\t\t\t\t\"group by P.FirstName, P.LastName \" +\n\t\t\t\t\t\"ORDER BY COUNT(*) DESC; \"\n\t\t\t\t\t);\n\t\t\trs.next();\n\t\t\temployee.setEmployeeID(String.valueOf(rs.getInt(\"CustRepId\")));\n\t\t\temployee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\temployee.setLastName(rs.getString(\"LastName\"));\n\t\t\temployee.setEmail(rs.getString(\"Email\"));\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\n\t\treturn employee;\n\t\t\n\t}", "@Test\r\n\tpublic void test_getAllEmployees() {\r\n\t\tgiven()\r\n\t\t\t\t.contentType(ContentType.JSON)//\r\n\t\t\t\t// .pathParam(\"page\", \"0\")//\r\n\t\t\t\t.when()//\r\n\t\t\t\t.get(\"/api/v1/employees\")//\r\n\t\t\t\t.then()//\r\n\t\t\t\t.log()//\r\n\t\t\t\t.body()//\r\n\t\t\t\t.statusCode(200)//\r\n\t\t\t\t.body(\"number\", equalTo(0))//\r\n\t\t\t\t.body(\"content.size()\", equalTo(10));\r\n\r\n\t}", "public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "public int getEmployeeId() {\n\t\treturn employeeId;\n\t}", "@RequestMapping(method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public final List<EmployeeDTO> findAllEmployees() {\n LOGGER.info(\"getting all employees\");\n return employeeFacade.findAllEmployees();\n }", "@ResponseBody\n\t@GetMapping(\"/employees\")\n\tpublic List<Employee> listEmployees() {\n\t\tList<Employee> theEmployees = employeeDAO.getEmployees();\n\t\t\n\t\treturn theEmployees;\n\t}", "@GetMapping(\"/getEmployees\")\n\t@ResponseBody\n\tpublic List<Employee> getAllEmployees(){\n\t\treturn employeeService.getEmployees();\n\t}", "public int getNumPersons() {\r\n\t\treturn this.persons.size();\r\n\t}", "public List<Employee> listEmployees (int managerId){\n\t\tList<Employee> employees = new ArrayList<Employee>();\n\t\t\n\t\ttry {\n\t\t\t// use prepared statements to prevent sql injection attacks\n\t\t\tPreparedStatement stmt = null;\n\t\t\t\n // the query to send to the database\n String query = \"SELECT e.EmployeeID, e.FirstName, e.LastName, e.ManagerID As ManagerID, (SELECT COUNT(*) FROM employees WHERE ManagerID = e.EmployeeID) AS DirectReports FROM employees e \"; \n \n if (managerId == 0) {\n // select where employees reportsto is null\n query += \"WHERE e.ManagerID = 0\";\n stmt = _conn.prepareStatement(query);\n }else{\n // select where the reportsto is equal to the employeeId parameter\n query += \"WHERE e.ManagerID = ?\" ;\n stmt = _conn.prepareStatement(query);\n stmt.setInt(1, managerId);\n }\n\t\t\t// execute the query into a result set\n\t\t\tResultSet rs = stmt.executeQuery();\n \n\t\t\t// iterate through the result set\n\t\t\twhile(rs.next()) {\t\n\t\t\t\t// create a new employee model object\n\t\t\t\tEmployee employee = new Employee();\n\t\t\t\t\n\t\t\t\t// select fields out of the database and set them on the class\n\t\t\t\t//employee.setEmployeeID(rs.getString(\"EmployeeID\"));\n\t\t\t\t//employee.setFirstName(rs.getString(\"FirstName\"));\n\t\t\t\t//employee.setLastName(rs.getString(\"LastName\"));\n\t\t\t\t//employee.setManagerID(rs.getString(\"ManagerID\"));\n employee.setHasChildren(rs.getInt(\"DirectReports\") > 0); \n\t\t\t\t//employee.setFullName();\n\t\t\t\t\n\t\t\t\t// add the class to the list\n\t\t\t\temployees.add(employee);\n\t\t\t}\n\t\t}\n\t\tcatch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t// return the result list\n\t\treturn employees;\n\t\t\n\t}", "@RequestMapping(value = \"/employeesList\", method = RequestMethod.GET, produces = {\"application/xml\", \"application/json\" })\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic @ResponseBody\n\tEmployeeListVO getListOfAllEmployees() {\n\t\tlog.info(\"ENTERING METHOD :: getListOfAllEmployees\");\n\t\t\n\t\tList<EmployeeVO> employeeVOs = employeeService.getListOfAllEmployees();\n\t\tEmployeeListVO employeeListVO = null;\n\t\tStatusVO statusVO = new StatusVO();\n\t\t\n\t\tif(employeeVOs.size()!=0){\n\t\t\tstatusVO.setCode(AccountantConstants.ERROR_CODE_0);\n\t\t\tstatusVO.setMessage(AccountantConstants.SUCCESS);\n\t\t}else{\n\t\t\tstatusVO.setCode(AccountantConstants.ERROR_CODE_1);\n\t\t\tstatusVO.setMessage(AccountantConstants.NO_RECORDS_FOUND);\n\t\t}\n\t\t\n\t\temployeeListVO = new EmployeeListVO(employeeVOs, statusVO);\n\t\t\n\t\tlog.info(\"EXITING METHOD :: getListOfAllEmployees\");\n\t\treturn employeeListVO;\n\t}" ]
[ "0.7621645", "0.7558214", "0.68634915", "0.68209344", "0.6724211", "0.67121875", "0.6552877", "0.6362333", "0.635294", "0.62792313", "0.6225053", "0.61952245", "0.6193257", "0.6189782", "0.61871743", "0.61803716", "0.61595964", "0.61442524", "0.6103105", "0.6056463", "0.6053162", "0.6053162", "0.6044165", "0.59918827", "0.5955259", "0.59476817", "0.5917247", "0.5913752", "0.59119946", "0.5901331", "0.5897936", "0.5890424", "0.5884561", "0.5881732", "0.5877315", "0.5875945", "0.5864377", "0.58622", "0.5858062", "0.5846448", "0.58180934", "0.5812691", "0.5795355", "0.5781235", "0.57811314", "0.5776873", "0.57639694", "0.57607746", "0.5741326", "0.5735019", "0.57244986", "0.57220274", "0.56940013", "0.5693908", "0.56910473", "0.56668895", "0.5656545", "0.5649084", "0.56490463", "0.56408864", "0.56407046", "0.5638233", "0.5631731", "0.562993", "0.56265306", "0.5621699", "0.55849886", "0.5584719", "0.5580468", "0.5571164", "0.55707693", "0.5569866", "0.5556439", "0.5552745", "0.55505645", "0.5541985", "0.5537919", "0.55354", "0.5531324", "0.5526525", "0.55265105", "0.5516906", "0.5509254", "0.55054206", "0.5501025", "0.5497431", "0.5492872", "0.54884785", "0.54840964", "0.5480653", "0.5479518", "0.5479039", "0.54760855", "0.5475761", "0.54752564", "0.54552346", "0.54550856", "0.54448485", "0.54416543", "0.54323316" ]
0.6355881
8
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Trainees)) { return false; } Trainees other = (Trainees) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.6477893", "0.6426692", "0.6418966", "0.6416817", "0.6401561", "0.63664836", "0.63549376", "0.63515353", "0.6347672", "0.6324549", "0.6319196", "0.6301484", "0.62935394", "0.62935394", "0.62832105", "0.62710917", "0.62661785", "0.6265274", "0.6261401", "0.6259253", "0.62559646", "0.6251244", "0.6247282", "0.6247282", "0.6245526", "0.6238957", "0.6238957", "0.6232451", "0.62247443", "0.6220427", "0.6219304", "0.6211484", "0.620991", "0.62023336", "0.62010616", "0.6192621", "0.61895776", "0.61895776", "0.61893976", "0.61893976", "0.61893976", "0.6184292", "0.618331", "0.61754644", "0.6173718", "0.6168409", "0.6166131", "0.6161708", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.6157667", "0.61556244", "0.61556244", "0.61430943", "0.61340135", "0.6128617", "0.6127841", "0.61065215", "0.61043483", "0.61043483", "0.6103568", "0.61028486", "0.61017346", "0.6101399", "0.6098963", "0.6094214", "0.6094", "0.6093529", "0.6093529", "0.6091623", "0.60896", "0.6076881", "0.60723215", "0.6071593", "0.6070138", "0.6069936", "0.6069529" ]
0.0
-1
function to count and print currency notes
public static void countCurrency(int amount) { int rs; Scanner scan=new Scanner(system.in); rs=scan.nextInt(); int[] notes = new int[]{2000,1000,500,100,50,20,10 }; int[] noteCounter = new int[7]; if((rs%10)==0) { for (int i = 0; i < 7; i++) { if (rs >= notes[i]) { noteCounter[i] = amount / notes[i]; amount = amount%notes[i]; } } // Print notes System.out.println("Currency Count ->"); for (int i = 0; i < 7; i++) { if (noteCounter[i] != 0) { System.out.println(noteCounter[i] + "notes of" + notes[i]); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString()\n {\n\tint c = coinCounter();\n\treturn \"$\" + c / 100 + \".\" + c % 100;\n }", "private void displayQuantity() {\n Log.d(\"Method\", \"displayQuantity()\");\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n\n quantityTextView.setText(String.format(Locale.getDefault(), \"%d\", coffeeCount));\n displayTotal();\n }", "private void displayQuantity(int numOfCoffeee) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + numOfCoffeee);\n }", "void printTotalQuantity();", "public String countsOutput() throws IOException,ArrayIndexOutOfBoundsException{\r\n String payColor = \"green\";\r\n String payments = getActualSheet().getCellAt(\"B3\").getTextValue(); \r\n \r\n \r\n if(payments.contains(\"-\")){\r\n payColor = \"red\";\r\n }\r\n return \"<html>\" + countIncomes()+\"<br/>\"+countExpense() +\"<br/>\"\r\n + \"<font color=\"+payColor+\">\"+countPayments()+\"</font></html>\";\r\n \r\n }", "private void displayQuantity(int numberOfCoffees) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + numberOfCoffees);\n }", "public String toString() {\n return \"$\"+getDollars() +\".\"+ getCents();\n }", "public void print()\r\n {\r\n int i = numar.length()/3;\r\n while( i != 0 ){\r\n String n = numar.substring(0,3);\r\n numar = numar.substring(3);\r\n printNo(n);\r\n if( i == 3){\r\n System.out.print(\"million \");\r\n }\r\n else if( i == 2 ){\r\n System.out.print(\"thousand \");\r\n }\r\n i--;\r\n }\r\n }", "private void displayPrice(int number) {\n }", "void printPetalCount() {\n\t\tprint(\"petalCout = \"+petalCount+\" S = \"+s);\r\n\t\t\r\n\t}", "public void display()\r\n\t{\r\n\t\tSystem.out.println(\"Dollar: $\"+getAmount());\r\n\t\tSystem.out.println(\"Rupiah: Rp.\"+dollarTorp());\r\n\t}", "private void showRate() {\r\n\t\tString currencyCode = signalThreeLetters();\r\n\t\tif (currencyCode == null){\r\n\t\t\treturn;\r\n }\r\n //needed if-else to check if currencies is null. As currencies.getCurrencyByCode doesn't work if currencies is null\r\n if (currencies == null){\r\n \tSystem.out.println(\"There are currently no currencies in the system.\");\r\n \tSystem.out.println();}\r\n \t\r\n else{\r\n Currency currency = currencies.getCurrencyByCode(currencyCode);\r\n if (currency == null) {\r\n\t\t\t// No, so complain and return\r\n\t\t\tSystem.out.println(\"\\\"\" + currencyCode + \"\\\" is is not in the system.\");\r\n\t\t\tSystem.out.println();}\r\n else {\r\n System.out.println(\"Currency \" +currencyCode+ \" has exchange rate \" + currency.getExchangeRate() + \".\");\r\n System.out.println();}\r\n \r\n }\r\n \r\n\t}", "public void getDiscount(){\n System.out.println(\"10% off, final price: \" + price * 0.9);\n }", "public String toString() {\n\t\treturn String.format(\"%.0f-%s note [%d]\", this.getValue(),this.getCurrency(),this.getSerial());\n\t}", "private static String getTotal(ArrayList<CatalogItem> items) {\n double dTotal = 0.0;\n for (CatalogItem item : items) {\n dTotal += item.getPrice();\n }\n\n dTotal += dTotal*0.0825;\n return \"$\" + df.format(dTotal);\n }", "private void displayCount() {\n\t\tlabel.setText(String.format(\"%2d\", game.getCount()));\n\t}", "public void getPrice(){\n System.out.println(\"Price: $\" + price); \n }", "public String getDiscounts(){\r\n\t return \"Fines: \" + fines;\r\n }", "String notes();", "@Override\n public String getDescription() {\n return \"Issue currency\";\n }", "private void displayPrice(int number) {\n TextView priceTextView = findViewById(R.id.textPrice);\n// priceTextView.setText(NumberFormat.getCurrencyInstance().format(number));\n priceTextView.setText(\"KES \" + number);\n }", "public void displayTotalCash(int tc) {\n\t\tString stc;\n\n\t\tstc = new String(tc + \" C\");\n\t\ttotalCash.setValue(stc);\n\t}", "public static String cashInWords (Double cash) {\n String s = \"\";\n int cashInCents = (BigDecimal.valueOf(cash).movePointRight(2)).intValue();\n int hrivna = cash.intValue();\n int cop = cashInCents%100;\n if (hrivna/1000000>=1) s+=ch999(hrivna / 1000000, \"million \");\n if (hrivna%1000000/1000>=1) s+=ch999(hrivna % 1000000 / 1000, \"thousand \");\n if (hrivna%1000000%1000>=1) s+=ch999(hrivna % 1000000 % 1000, \"\");\n if (hrivna>0) s+=\"hryvnas \";\n if (hrivna>0&&cop>0) s+=\"and \";\n if (cop>0) s+=ch999(cop, \"cop.\");\n\n return s;\n }", "void putdata()\n {\n System.out.printf(\"\\nCD Title \\\"%s\\\", is of %d minutes length and of %d rupees.\",title,length,price);\n }", "private static double printBill(double discountPercent) {\n double total = checkOrder();\n System.out.println();\n double discount;\n if (discountPercent != 0) {\n discount = total * discountPercent / 100;\n System.out.printf(\"%36s%2.0f%%%8s: %8.2f Baht%n\", \"\", discountPercent, \"Discount\", discount);\n total -= discount;\n }\n System.out.printf(\"%41s%2d%%%3s: %8.2f Baht%n\", \"\", 7, \"Vat\", total * 7 / 100);\n total += total * 7 / 100;\n System.out.printf(\"%47s: %8.2f Baht%n\", \"Net total\", total);\n return total;\n }", "public String tally()\r\n {\r\n String output = \r\n \" _-Final Tally-_\\n\\n\" +\r\n \"Total Rounds Played: \" + round + \"\\n\\n\" +\r\n \"Total Ties: \" + ties + \"\\n\\n\" +\r\n \"User Wins: \" + uWins + \"\\n\" +\r\n \" Rock win ratio: \" + uRockW + \" of \" + uRock + \"\\n\" +\r\n \" Paper win ratio: \" + uPapW + \" of \" + uPap + \"\\n\" +\r\n \" Scissors win ratio: \" + uSciW + \" of \" + uSci + \"\\n\\n\" +\r\n \"Computer Wins: \" + cWins + \"\\n\" +\r\n \" Rock win ratio: \" + cRockW + \" of \" + cRock + \"\\n\" +\r\n \" Paper win ratio: \" + cPapW + \" of \" + cPap + \"\\n\" +\r\n \" Scissors win ratio: \" + cSciW + \" of \" + cSci + \"\\n\";\r\n \r\n return output;\r\n }", "int getNumCyc();", "private synchronized void print4() {\n try {\n int jNum = 0;\n\n byte[] printText22 = new byte[10240];\n\n byte[] oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setInternationalCharcters('3');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"FoodCiti\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"\\nOrder No : \" + order.getOrderNo());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String location = SessionManager.get(getActivity()).getRestaurantLocation();\n int spacecount = commacount(location);\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (spacecount >= 1) {\n oldText = getGbk(location.substring(0, location.indexOf(',')) + \"\\n\" + location.substring(location.indexOf(',') + 1) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(location + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(SessionManager.get(getActivity()).getRestaurantPostalCode() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Tel:\" + SessionManager.get(getActivity()).getRestaurantPhonenumber());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderSpecialInstruction() != null) {\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(order.getOrderSpecialInstruction());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\" \" + \"GBP\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // Toast.makeText(getContext(),\"Size \"+order.getOrderedItemList().size(),Toast.LENGTH_LONG).show();\n\n for (int i = 0; i < order.getOrderedItemList().size(); i++) {\n\n OrderedItem orderedItem = order.getOrderedItemList().get(i);\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// int qntity = Integer.parseInt(orderedItem.getQuantity());\n oldText = getGbk(\" \" + orderedItem.getQuantity() + \" x \" + orderedItem.getItemData().getItemName());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Double total_price = Double.valueOf(orderedItem.getTotalPrice()) * Double.valueOf(orderedItem.getQuantity());\n\n oldText = getGbk(\" \" + String.format(Locale.getDefault(), \"%.2f\", total_price) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n for (int j = 0; j < orderedItem.getSubItemList().size(); j++) {\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(35);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n SubItem subItem = orderedItem.getSubItemList().get(j);\n\n String subitemname = subItem.getItemName();\n int subItemOrderQty = Integer.parseInt(subItem.getOrderedQuantity());\n\n if (subItemOrderQty > 1) {\n oldText = getGbk(\" \" + subItem.getOrderedQuantity() + \" x \" + subitemname + \"\\n\");\n } else {\n oldText = getGbk(\" \" + subitemname + \"\\n\");\n }\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n // By Ravi\n// oldText = getGbk(\"........................\\n\");\n// System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n// jNum += oldText.length;\n//////////////////////////////////////////////////////////////////////////////////////////////////////////\n /** TODO\n * change here for print suboptions text\n * **/\n //print text for suboptions items\n if (subItem.getSubOptions() != null && subItem.getSubOptions().size() > 0) {\n List<SubOptions> subOptions = subItem.getSubOptions();\n for (int k = 0; k < subOptions.size(); k++) {\n SubOptions options = subOptions.get(k);\n oldText = getGbk(\" - \" + options.getName() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;*/\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n }\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Subtotal : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderSubtotal())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (Double.valueOf(order.getDiscount()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Discount : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDiscount())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n if (Double.valueOf(order.getTax()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Service Charge : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n if (order.getTax() != null) {\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getTax())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\" \" + \"0.00\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n }\n\n if (!order.getOrderDelivery().equals(Consts.PICK_UP) && Double.valueOf(order.getDeliveryCharges()) > 0) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Delivery Charges : \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(390);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getDeliveryCharges())) + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"TOTAL Price: \");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setCusorPosition(370);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n //Toast.makeText(getActivity(),String.valueOf(order.getOrderTotal()),Toast.LENGTH_LONG).show();\n\n oldText = getGbk(\" \" + String.format(\" %.2f\", Double.valueOf(order.getOrderTotal())));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getFreenDrinkText() != null && !TextUtils.isEmpty(order.getFreenDrinkText())) {\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n String freeTxt = \"Free \" + order.getFreenDrinkText();\n oldText = getGbk(freeTxt);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n }\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n /** TODO\n * change here to print payment method text\n * **/\n //print text for payment method\n if (order.getOrderPaid().equalsIgnoreCase(\"paypal\") || order.getOrderPaid().equalsIgnoreCase(\"worldpay\")) {\n oldText = getGbk(order.getOrderPaid() + \" PAID \" + \"\\n\");\n } else {\n oldText = getGbk(order.getOrderPaid() + \" NOT PAID \" + \"\\n\");\n }\n// oldText = getGbk(\"ORDER BY \" + order.getOrderPaid() + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n if (order.getOrderDelivery().equals(Consts.PICK_UP)) {\n oldText = getGbk(\"COLLECTION\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n } else {\n oldText = getGbk(\"DELIVERY\" + \"\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n }\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n // String strTmp2 = new SimpleDateFormat(\"dd-MM-yyyy hh:mm a\", Locale.UK).format(new Date());\n oldText = getGbk(getDate(order.getOrderTime()));\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('0');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('4');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Customer Details: \" + \"\\n\" +\n order.getUser().getUserName().toUpperCase() + \"\\n\" +\n order.getUser().getAddress().toUpperCase() + \"\\n\" +\n order.getUser().getCity().toUpperCase() + \"\\n\" +\n order.getUser().getPostalCode().toUpperCase() + \"\\n\" +\n order.getUser().getPhNo().toUpperCase()\n );\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('5');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"Ref:\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(order.getOrderId());\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(false);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n// oldText = getGbk(\"\\n-----------------------\\n\");\n oldText = getGbk(\"\\n........................\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setAlignCenter('1');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = setBold(true);\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = setWH('2');\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n\n oldText = getGbk(\"www.foodciti.co.uk\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n oldText = getGbk(\"\\n\\n\");\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n /*String s = new String(printText22);\n Toast.makeText(getActivity(),s,Toast.LENGTH_LONG).show();*/\n\n oldText = CutPaper();\n System.arraycopy(oldText, 0, printText22, jNum, oldText.length);\n jNum += oldText.length;\n\n Intent intent = new Intent(PrintUtils.ACTION_PRINT_REQUEST);\n intent.putExtra(PrintUtils.PRINT_DATA, printText22);\n localBroadcastManager.sendBroadcast(intent);\n\n// mOutputStream.write(printText22);\n\n } catch (Exception ex) {\n Exlogger exlogger = new Exlogger();\n exlogger.setErrorType(\"Print Error\");\n exlogger.setErrorMessage(ex.getMessage());\n exlogger.setScreenName(\"OrderInfo->>print4() function\");\n logger.addException(exlogger);\n Toast.makeText(getActivity(), ex.getMessage(), Toast.LENGTH_LONG).show();\n\n\n }\n }", "public void incrementCoinCount() {\n coinCount++;\n System.out.println(\"Rich! Coin count = \" + coinCount);\n }", "public static void main(String[] args) {\n //ENTER CODE HERE\n Scanner scan =new Scanner(System.in);\n System.out.println(\"Enter price in cents:\");\n\n int itemPrice = scan.nextInt();\n\n if (itemPrice < 25 || itemPrice > 100 || (itemPrice % 5 != 0) ) {\n System.out.println(\"Invalid entry\");\n }\n else\n {\n int change=(100-itemPrice);\n int quarterCount = change / 25;\n int remainder1 = change % 25;\n int dimeCount = remainder1 / 10;\n int remainder2 = remainder1 % 10;\n int nickelCount = remainder2 / 5;\n\n System.out.println(\"When you give $1 for \" +itemPrice+ \"cents item. You will get back \"+\n quarterCount+ (quarterCount>1 ? \"quarters \" :\"quarter \")+\n dimeCount + (dimeCount > 1 ? \"dimes \" : \"dime \") +\n nickelCount+ (nickelCount > 1 ? \"nickels \" :\"nickel \") );\n\n }\n\n\n\n }", "public void mostrarTareasNumeradas()\n {\n int numeroPosicion = 1;\n for (String tarea : tareas){\n if (tarea.substring(0,1).equals(\"$\")) {\n System.out.println(numeroPosicion + \". [X] \" + tarea.substring(1, tarea.length())); \n }\n else {\n System.out.println(numeroPosicion + \". [ ] \" + tarea); \n }\n\n numeroPosicion = numeroPosicion + 1;\n }\n }", "public void amount() {\n \t\tfloat boxOHamt=boxOH*.65f*48f;\n \t\tSystem.out.printf(boxOH+\" boxes of Oh Henry ($0.65 x 48)= $%4.2f \\n\",boxOHamt);\n \t\tfloat boxCCamt=boxCC*.80f*48f;\n \t\tSystem.out.printf(boxCC+\" boxes of Coffee Crisp ($0.80 x 48)= $%4.2f \\n\", boxCCamt);\n \t\tfloat boxAEamt=boxAE*.60f*48f;\n \t\tSystem.out.printf(boxAE+\" boxes of Aero ($0.60 x 48)= $%4.2f \\n\", boxAEamt);\n \t\tfloat boxSMamt=boxSM*.70f*48f;\n \t\tSystem.out.printf(boxSM+\" boxes of Smarties ($0.70 x 48)= $%4.2f \\n\", boxSMamt);\n \t\tfloat boxCRamt=boxCR*.75f*48f;\n \t\tSystem.out.printf(boxCR+\" boxes of Crunchies ($0.75 x 48)= $%4.2f \\n\",boxCRamt);\n \t\tSystem.out.println(\"----------------------------------------------\");\n \t\t//display the total prices\n \t\tsubtotal=boxOHamt+boxCCamt+boxAEamt+boxSMamt+boxCRamt;\n \t\tSystem.out.printf(\"Sub Total = $%4.2f \\n\", subtotal);\n \t\ttax=subtotal*.07f;\n \t\tSystem.out.printf(\"Tax = $%4.2f \\n\", tax);\n \t\tSystem.out.println(\"==============================================\");\n \t\ttotal=subtotal+tax;\n \t\tSystem.out.printf(\"Amount Due = $%4.2f \\n\", total);\n \t}", "public void invoice(){ //------------------------------->>-----------------------------------void invoice------------------------------->>--------------------------------------------------//\r\n\t\r\n\t\r\n\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\r\n\t\tSystem.out.println(\"\tSr.No\t||\tName \t||\tQuantity\t||\tPrice\t||\tAmount\t\");\r\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\r\n \t\r\n\tfor(i = 1; i <= n; i++){\r\n\r\n\t\tSystem.out.println(\"\\t\"+ i+\"\\t\\t\"+name[i]+\"\\t\\t\"+quantity[i]+\"\\t\\t\\t\"+price[i]+\"\\t\\t\"+amount[i]); \t\t\r\n\t \r\n\t} // end of for loop\r\n\t\tSystem.out.println(\"--------------------------------------------------------------------------------------------\");\r\n\t\tSystem.out.println(\"\tTotal\t\t||\t\t\t\t\t\t \t\t\"+ total);\r\n\t\tSystem.out.println(\" For You\t\t||\t\t\t\t\t\t \t\t\"+ cc);\r\n\r\n\t\tSystem.out.println(\"\\n\\n\\n\");\r\n \r\n }", "@Override\n public String toString() {\n String printString;\n if (cents == 0) {\n printString = String.format(\"$%d.00\", dollars);\n } else {\n printString = String.format(\"$%d.%d\", dollars, cents);\n }\n return printString;\n }", "private static void displayReceipt()\r\n\t{\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Receipt \");\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"Waiter/waitress: \"+name);\r\n\t\tSystem.out.println(\"Table Number: \"+tableNo);\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tSystem.out.println(\"ID Item Name Unit Price Quantity Sub-total\");\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tBillingSystemFormatter.receiptFormatter(orderList,menu,subTotalList);\r\n\t\tSystem.out.println(\"__________________________________________________________\");\r\n\t\tBillingSystemFormatter.billFormatter(total, tax, tip, grandTotal);\r\n\t}", "public void printReport(){\n StdOut.println(name);\n double total = cash;\n for (int i=0; i<n; i++){\n int amount = shares[i];\n double price = StockQuote.priceOf(stocks[i]);\n total+= amount*price;\n StdOut.printf(\"%4d %5s \", amount, stocks[i]);\n StdOut.printf(\"%9.2f %11.2f\\n\", price, amount*price);\n }\n StdOut.printf(\"%21s %10.2f\\n\", \"Cash: \", cash);\n StdOut.printf(\"%21s %10.2f\\n\", \"Total: \", total);\n }", "private void displayquintity(int numberOFCoffee){\n TextView quintityText= findViewById(R.id.quantity_text_view);\n quintityText.setText(\"\"+numberOFCoffee);\n\n }", "@Override\n public String toString() {\n\n //convert cents to dollars using cents2dollarsAndCents\n String output = DessertShoppe.cents2dollarsAndCents(this.getCost());\n //create string storing cost in a string \n String costLength = Integer.toString(this.getCost());\n //find spacing needed between name and cost in reciept by subtracting 30(total spaces) by \n //length of name and length of cost\n int spacing = 30 - super.getName().length() - costLength.length() - 1;\n //loop through an add a space each time up to \"spacing\" integer\n for (int i = 0; i < spacing; i++) {\n output = \" \" + output;\n }\n //return name of cookie along with cost along with the right format posting amount of pounds with cost per pound\n return this.weight + \" lbs. \" + \"@ $\" + DessertShoppe.cents2dollarsAndCents(this.pricePerLbs) + \" /lb.\\n\" + this.getName() + output;\n }", "@Test\n\tpublic void test_PNL_NDeals_BOTH_R(){\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 19.99, GRPN, 10.00, 100.00));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 19.99, GRPN, 15.00, 500.00));\n\t\tpa.addTransaction(new Trade(new Date(), new Date(), \"\", 19.99, GRPN, 18.00, -300.00));\n\t\tassertEquals( \"1150.00\", nf.format(new PNLImpl(pa, GRPN,20.00).getPNLRealized(false)) );\n\t}", "private void displayTotal() {\n Log.d(\"Method\", \"displayTotal()\");\n\n TextView priceTextView = (TextView) findViewById(\n R.id.price_text_view);\n\n priceTextView.setText(NumberFormat.getCurrencyInstance().format(calculateTotal()));\n }", "@Override\n public String getDescription() {\n return \"Mint currency\";\n }", "double getTipAmount();", "public void getCredit(){\n System.out.println(\"Total Credit: \" +\"£\" + getUserMoney());\n }", "int getPriceCount();", "@Override\n\tpublic String showPrice() {\n\t\treturn \"煎饼的价格是5元 \";\n\t}", "double computePrintingCost(double price){\n //TODO calculate price and return it\n return price * printer.countCharactersPrinted();\n }", "public void updateCount(){\n TextView newCoupons = (TextView) findViewById(R.id.counter);\n //couponsCount.setText(\"Pocet pouzitych kuponov je: \" + SharedPreferencesManager.getUsedCoupons());\n if(SharedPreferencesManager.getNew()>0) {\n newCoupons.setVisibility(View.VISIBLE);\n newCoupons.setText(String.valueOf(SharedPreferencesManager.getNew()));\n }\n else {\n newCoupons.setVisibility(View.GONE);\n }\n }", "public void printLn1(){\r\n\t\tSystem.out.print(\"Enter the number of Bedrooms in the \" + this.getCategory() + \": \");\r\n\t}", "int countByExample(ComplainNoteDOExample example);", "private void checkout() {\n System.out.printf(\n \"Total + Tax %12s%n\", getTotal(cart)\n );\n }", "private void display(int number) {\n TextView quantityText = findViewById(R.id.textCups);\n quantityText.setText(\"\" + number);\n }", "String getCountInt();", "public void countCoins() {\r\n\t\tthis.coinCount = 0;\r\n\t\tfor (int x = 0; x < WIDTH; x++) {\r\n\t\t\tfor (int y = 0; y < HEIGHT; y++) {\r\n\t\t\t\tif (this.accessType(x, y) == 'C')\r\n\t\t\t\t\tthis.coinCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void display() {\n\t\tSystem.out.println(\"Discount Code: \" + discode);\r\n\t\tSystem.out.println(\"Group Size: \" + groupsize);\r\n\t\t\r\n\t}", "private static void getChange(double money, double prize) {\n\t\tdouble difference = money-prize;\n\t\tdouble[] denominations = {0.01,0.05,0.10,0.25,0.50,1};\n\t\tint[] count = new int[denominations.length];\n\t\twhile(difference>0){\n\t\t\tint max = getMaxDenominationToDivide(denominations,difference);\n\t\t\tdifference -= denominations[max];\n\t\t\tdifference = (double)Math.round(difference*100)/100;\n\t\t\tcount[max] = count[max]+1;\n\t\t}\n\t\tSystem.out.print(\"[\");\n\t\tfor(int i = 0 ; i < count.length;i++){\n\t\t\tSystem.out.print(count[i]);\n\t\t\tif(i!=count.length-1)\n\t\t\t\tSystem.out.print(\",\");\n\t\t}\n\t\tSystem.out.print(\"]\");\n\t}", "public String info()\n {\n String display = \"The player has $\" + spendingMoney + \" left to spend, and has won \" + prizesWon;\n return display;\n }", "public static void main(String[] args){\n NumberFormat currency = NumberFormat.getCurrencyInstance();\n String result =currency.format(123456.789);//A method for formatting values\n System.out.println(result);\n }", "BigDecimal getDisplayQuantity();", "int countByExample(TdxNoticeCertificateExample example);", "public void printInvoiceInfo() {\r\n\r\n\t\tSystem.out.println(\"\\nBill Summary :\");\r\n\r\n\t\tfor (int i = 0; i <= (numberOfBills - counter); i++) {\r\n\t\t\tSystem.out.println(invoiceInfo[i].toString());\r\n\t\t}\r\n\t}", "public String countExpense() throws IOException{ \r\n return \"Expences: \" + getActualSheet().getCellAt(\"B2\").getTextValue() + \"\\n\";\r\n }", "public String countAndSay(int n) {\n String input = \"1\";\n String immediate_str = \"\";\n\n \n for (int i = 1; i < n; i++) {\n //System.out.println(input);\n char [] nums = input.toCharArray();\n int count = 0;\n int prev = -1;\n for (int j = 0; j < nums.length; j++) {\n //System.out.println(j + \",\"+ nums[j]);\n if ((nums[j] - '0') == prev) {\n count ++;\n }\n else {\n if (prev != -1)\n immediate_str += Integer.toString(count) + Integer.toString(prev);\n count = 1;\n }\n prev = nums[j] - '0';\n }\n immediate_str += Integer.toString(count) + Integer.toString(prev);\n input = immediate_str;\n immediate_str = \"\";\n }\n return input; \n }", "public void displayPrize()\n {\n System.out.println(name + \", Worth: $\" + worth + \n \", Cost: $\" + cost);\n }", "int countByExample(CGcontractCreditExample example);", "public static void displayOutput(double monthlyPayment, double totalPaid, double interestPaid)\r\n {\r\n // Your code goes here ... use cut and paste as much as possible!\r\n DecimalFormat df = new DecimalFormat (\"$#,###,###.00\");\r\n\r\n System.out.println();\r\n System.out.println(\"The monthly payment is \" + df.format (monthlyPayment));\r\n System.out.println(\"The total paid on the loan is \" + df.format (totalPaid));\r\n System.out.println(\"The total interest paid on loan is \" + df.format (interestPaid));\r\n\r\n \r\n }", "long countByExample(TerminalInfoExample example);", "private int paperExtractorV1(Printer printer) {\n Document document;\n if(debug)\n document = getDocument(printer.getUrl() + \"Filer_for_counter/topPage.htm\") ;\n else\n document = getDocument(printer.getUrl() + \"/web/guest/en/websys/status/getUnificationCounter.cgi\");\n\n String text = document.text();\n String status;\n if(\"Aficio SP 8200DN\".equals(printer.getModel()))\n status = text.substring(text.indexOf(\"Total :\")+8,text.indexOf(\"Printer\")-1);\n else\n status = text.substring(text.indexOf(\"Total :\")+8,text.indexOf(\"Copier\")-1);\n\n try {\n int count = Integer.parseInt(status);\n return count;\n }catch (NumberFormatException exception) {\n exception.printStackTrace();\n return -1;\n }\n }", "public static Integer calculateCNC(String inputNote)\r\n {\r\n Integer octave = Integer.parseInt(inputNote.substring(inputNote.length()-1, inputNote.length()));\r\n Integer nameClass = getNameClass(inputNote.substring(0, 1));\r\n //System.out.println(\"Inside calculateCNC parameter: octave - value: \" + octave);\r\n //System.out.println(\"Inside calculateCNC parameter: nameClass - value: \" + nameClass);\r\n return (octave * 7) + nameClass; \r\n }", "public final String getCount() {\n return String.valueOf(count);\n }", "public void count() {\n APIlib.getInstance().addJSLine(jsBase + \".count();\");\n }", "manExp15(){ \r\n\r\n\tcount++; \r\n\r\n\tSystem.out.println(count); \r\n\r\n\t}", "private void displayQuantity(int number) {\n TextView ob = findViewById(R.id.quantity_text_view);\n ob.setText(\"\"+number);\n }", "public void showInfo(){\n\t\tfor (int i = 0; i < this.cd.size(); i++) {\n\t\t\tthis.cd.get(i).showInfo();\n\t\t}\n\t\tSystem.out.println(\"\\tToatl amount: \" + calTotalAmount());\n\t}", "public void display()\n\t{\n\t\tSystem.out.println(\"Bike No.\\t\"+\n\t\t\t\t\"Phone no.\\t\"+\n\t\t\t\t\"Name\\t\"+\n\t\t\t\t\"No. of days\\t\"+\n\t\t\t\t\"Charge\");\n\t\tSystem.out.println(bno+\n\t\t\t\t\"\\t\"+phno+\n\t\t\t\t\"\\t\"+name+\n\t\t\t\t\"\\t\"+days+\n\t\t\t\t\"\\t\"+charge);\n\t}", "public int getKcp13V05NoOfDiaries()\n {\n return kcp13V05NoOfDiaries;\n }", "public String summaryInfo() {\r\n \r\n DecimalFormat df = new DecimalFormat(\"#,##0.0##\");\r\n String result = \"\";\r\n result = \"----- Summary for \" + getName() + \" -----\";\r\n result += \"\\nNumber of Ellipsoid Objects: \" + list.size();\r\n result += \"\\nTotal Volume: \" + df.format(totalVolume()) + \" cubic units\";\r\n result += \"\\nTotal Surface Area: \" + df.format(totalSurfaceArea()) \r\n + \" square units\";\r\n result += \"\\nAverage Volume: \" + df.format(averageVolume()) \r\n + \" cubic units\";\r\n result += \"\\nAverage Surface Area: \" + df.format(averageSurfaceArea()) \r\n + \" square units\";\r\n \r\n return result;\r\n }", "public void showInvoiceNo(){\n\t}", "public String getTotalDeposits(){\n double sum = 0;\n for(Customer record : bank.getName2CustomersMapping().values()){\n for(Account acc: record.getAccounts()){\n sum += acc.getOpeningBalance();\n }\n }\n return \"Total deposits: \"+sum;\n }", "public String getCount() {\n if(count != null)\n return \"浏览: \" + count + \"次\";\n else\n return \"\";\n }", "@Override\n public String getDescription() {\n return \"Buy currency\";\n }", "@Override\n\tpublic String toString() \n {\n\t\tString output_variable=super.toString()+\"\\nDISCOUNT PERCENTAGE : \"+discountRate+\"\\n\"+\n\t\t\t\"PRICE AFTER DISCOUNT : \"+getUnitPrice();\n\t\treturn output_variable;\n\t}", "public void addCart(View view) {\n TextView textView = findViewById(R.id.price_total2);\n double price = Double.parseDouble(textView.getText().toString().replace(\"$\", \"\"));\n String text = \"$\" + String.valueOf(++price);\n textView.setText(text);\n Log.i(TAG, \"Value Successfully Increased! :\" /**+ ++i**/);\n }", "private String getTextCount(int conut, String name) {\n for (int i = 0; i < conut; i++) {\r\n name = name + \" \";\r\n }\r\n return name;\r\n }", "private void printNumberOfCoursesInEachLetterGradeCategory(){\r\n\r\n System.out.println(\"\\nNumber of courses with the following letter grades: \");\r\n\r\n for(int i = grades.length - 1, j = 0; i >= 0; i--, j++) {\r\n if(j % 3 == 0) System.out.println(\"\"); // for formatting\r\n System.out.print(grades[i] +\": \" + gradeCount[i] + \"\\t\\t\");\r\n }\r\n }", "@Override\n public String getDescription() {\n return \"Digital goods quantity change\";\n }", "public void toStrings() {\n String output = \"\";\n output += \"Gen Price: $\" + genPrice + \"0\"+ \"\\n\";\n output += \"Bronze Price: $\" + bronzePrice +\"0\"+ \"\\n\";\n output += \"Silver Price: $\" + silverPrice +\"0\"+ \"\\n\";\n output += \"Gold Price: $\" + goldPrice +\"0\"+ \"\\n\";\n output += \"Vip Price: $\" + vipPrice +\"0\"+ \"\\n\";\n System.out.println(output);\n }", "public void displayAmount(){\n synchronized(this){\n for( ClientHandler client: clientArray){\n client.getOutput().println(\"Bid of \" + currentItem.getNewPrice() +\n \" placed by \" + currentItem.getHighestBidder().getClientDetails() + \n \" for \" + currentItem.getItem() + \n \".\\n\");\n }\n }\n }", "private String calibrate(int count)\n {\n String str = \"\";\n if(count < 10)\n {\n str = \" \" + Integer.toString(count);\n }\n else if(count < 100)\n {\n str = \" \" + Integer.toString(count);\n }\n else if(count < 1000)\n {\n str = \" \" + Integer.toString(count);\n }\n else\n {\n str = Integer.toString(count);\n }\n\n return str;\n }", "private void displayPrice(int number){\n TextView priceTV = (TextView) findViewById(R.id.price_tv);\n priceTV.setText(NumberFormat.getCurrencyInstance().format(number));\n }", "public void cashReceipt(int amount){\r\n System.out.println(\"Take the receipt\");\r\n }", "private String formatUsNumber(Editable text) {\n\t\tStringBuilder cashAmountBuilder = null;\n\t\tString USCurrencyFormat = text.toString();\n//\t\tif (!text.toString().matches(\"^\\\\$(\\\\d{1,3}(\\\\,\\\\d{3})*|(\\\\d+))(\\\\.\\\\d{2})?$\")) { \n\t\t\tString userInput = \"\" + text.toString().replaceAll(\"[^\\\\d]\", \"\");\n\t\t\tcashAmountBuilder = new StringBuilder(userInput);\n\n\t\t\twhile (cashAmountBuilder.length() > 3 && cashAmountBuilder.charAt(0) == '0') {\n\t\t\t\tcashAmountBuilder.deleteCharAt(0);\n\t\t\t}\n\t\t\twhile (cashAmountBuilder.length() < 3) {\n\t\t\t\tcashAmountBuilder.insert(0, '0');\n\t\t\t}\n\t\t\tcashAmountBuilder.insert(cashAmountBuilder.length() - 2, '.');\n\t\t\tUSCurrencyFormat = cashAmountBuilder.toString();\n\t\t\tUSCurrencyFormat = Util.getdoubleUSPriceFormat(Double.parseDouble(USCurrencyFormat));\n\n//\t\t}\n\t\tif(\"0.00\".equals(USCurrencyFormat)){\n\t\t\treturn \"\";\n\t\t}\n\t\tif(!USCurrencyFormat.contains(\"$\"))\n\t\t\treturn \"$\"+USCurrencyFormat;\n\t\treturn USCurrencyFormat;\n\t}", "private void display(int number){\n TextView quantTV = (TextView) findViewById(R.id.quant_tv);\n quantTV.setText(\"\"+ number);\n }", "void getTotalNumerCustomer();", "@Override\npublic String toString() {\nreturn \"\" + counter;\n}", "public void printCost() {\r\n double cost;\r\n cost = quantity * price;\r\n System.out.printf(\"Total cost = $%.2f\", cost);\r\n }", "int getAcksCount();", "int getAcksCount();", "int getNewsindentifydetailCount();", "long countByExample(SysNoticeExample example);", "public void displayCoins(int cc) {\n\t\tcollectCash.setValue(cc);\n\t}" ]
[ "0.6197089", "0.60431004", "0.5994992", "0.58486205", "0.57125336", "0.5669883", "0.5648111", "0.56311333", "0.5628503", "0.56187034", "0.56167376", "0.5610292", "0.56072897", "0.55475473", "0.5499657", "0.5461925", "0.54577714", "0.5433207", "0.54134226", "0.5401515", "0.5397314", "0.53946936", "0.53937966", "0.53782964", "0.536297", "0.5356144", "0.53517985", "0.53515553", "0.5348365", "0.53478515", "0.5338727", "0.532989", "0.53277177", "0.53252524", "0.53231835", "0.53032404", "0.5300601", "0.5296937", "0.5296603", "0.52927136", "0.5283608", "0.52819914", "0.5280926", "0.52792215", "0.52618784", "0.5253047", "0.5252513", "0.5247405", "0.5245006", "0.5244847", "0.52320844", "0.5220914", "0.52171046", "0.52104753", "0.5206808", "0.5204531", "0.52012706", "0.519862", "0.5176878", "0.5164438", "0.51634616", "0.51599973", "0.5146197", "0.514611", "0.5140605", "0.5138897", "0.513687", "0.51306814", "0.51285756", "0.512654", "0.51258475", "0.5121435", "0.51171935", "0.5099824", "0.50934625", "0.50916994", "0.50869864", "0.5084529", "0.50815314", "0.5079947", "0.5074936", "0.50745434", "0.5073681", "0.5071718", "0.5069905", "0.50684404", "0.50684124", "0.50648797", "0.50584847", "0.50564545", "0.50538653", "0.5051672", "0.50464356", "0.5041098", "0.50393677", "0.5038926", "0.5038926", "0.5038669", "0.50383943", "0.5037404" ]
0.7666838
0
super.paint(g); System.out.println("Start Paint start view");
@Override public void paint(Object g) { Graphics2D graphics = (Graphics2D) g; largeFontMetrics = graphics.getFontMetrics(largeFont); mediumFontMetrics = graphics.getFontMetrics(mediumFont); smallFontMetrics = graphics.getFontMetrics(smallFont); largeHeight = largeFontMetrics.getHeight(); mediumHeight = mediumFontMetrics.getHeight(); smallHeight = smallFontMetrics.getHeight(); int firstLineYBase = largeHeight + FIRST_LINE_Y_OFFSET; int secondLineYBase = firstLineYBase + mediumHeight; int thirdLineYBase = secondLineYBase + smallHeight; int fourthLineYBase = thirdLineYBase + smallHeight; graphics.setColor(ABOUT_BACKGROUND); graphics.fillRect(BORDER_OFFSET,BORDER_OFFSET, drawComponent.getWidth() -BORDER_OFFSET*2, OBJECT_EDITOR_HEIGHT); graphics.setColor(ABOUT_FOREGROUND); graphics.setFont(largeFont); graphics.drawString(OBJECT_EDITOR_NAME, LINE_X_OFFSET, OBJECT_EDITOR_Y + firstLineYBase); graphics.setFont(mediumFont); // graphics.drawString("(" + objectEditorVersion + ": " + objectEditorBuildTime + ")", 90, 20); graphics.drawString(versionDetails, LINE_X_OFFSET, OBJECT_EDITOR_Y + secondLineYBase ); graphics.setFont(smallFont); graphics.drawString(AboutManager.getObjectEditorDescription().getCopyRight(), LINE_X_OFFSET, OBJECT_EDITOR_Y + thirdLineYBase); graphics.drawString(AboutManager.getObjectEditorDescription().getPatent(), LINE_X_OFFSET, OBJECT_EDITOR_Y + fourthLineYBase); graphics.setColor(STATUS_BACKGROUND); graphics.fillRect(BORDER_OFFSET, STATUS_Y, drawComponent.getWidth() -BORDER_OFFSET*2, STATUS_HEIGHT); // graphics.setColor(Color.DARK_GRAY); graphics.setColor(STATUS_FOREGROUND); // graphics.drawLine(0, 32, drawComponent.getWidth(), 33); graphics.setFont(largeFont); // System.out.println("Drawstring edited object:" + editedObject); // // System.out.println("Drawstring edited object toSTring:" + editedObject.toString()); // System.out.println("Drawstring firstLine Base:" + firstLineYBase); // if (mainHeader != null) // graphics.drawString( mainHeader.toString(), LINE_X_OFFSET, STATUS_Y + firstLineYBase); // System.out.println(" Painting main header to string "); if (mainHeaderToString != null) graphics.drawString( mainHeaderToString, LINE_X_OFFSET, STATUS_Y + firstLineYBase); // this will deadlock // graphics.drawString( mainHeader.toString(), LINE_X_OFFSET, STATUS_Y + firstLineYBase); // graphics.drawString( "" + editedObject + "(" + editorGenerationMessage + ")", 5, 80); graphics.setFont(mediumFont); graphics.drawString( majorStepMessage, LINE_X_OFFSET, STATUS_Y + secondLineYBase); graphics.setFont(smallFont); graphics.drawString(statusMessage, LINE_X_OFFSET, STATUS_Y + thirdLineYBase); String timeString = "(" + numSeconds +"s)"; graphics.drawString( timeString, LINE_X_OFFSET, STATUS_Y + fourthLineYBase); int timeStringLength = smallFontMetrics.stringWidth(timeString); graphics.setColor(PROGRESS_COLOR); graphics.fillRect(LINE_X_OFFSET + timeStringLength + 3, STATUS_Y + fourthLineYBase -10, numSeconds*5, 12); graphics.setColor(DEFINITION_BACKGROUND); graphics.fillRect(BORDER_OFFSET, DEFINITION_Y, drawComponent.getWidth()-BORDER_OFFSET*2, drawComponent.getHeight()- DEFINITION_Y - BORDER_OFFSET); graphics.setFont(largeFont); graphics.setColor(DEFINITION_FOREGROUND); if (computerDefinition != null) { graphics.drawString(computerDefinition.getWord(), LINE_X_OFFSET, DEFINITION_Y + firstLineYBase); graphics.setFont(mediumFont); graphics.drawString(computerDefinition.getMeaning(), LINE_X_OFFSET, DEFINITION_Y + secondLineYBase); graphics.setFont(smallFont); graphics.drawString(DEFINITIONS_BEHAVIOR_MESSAGE, LINE_X_OFFSET, DEFINITION_Y + thirdLineYBase); } else { graphics.drawString("Missing definition file:" + ComputerDefinitionsGenerator.DICTIONARY_FILE, LINE_X_OFFSET, DEFINITION_Y + firstLineYBase); } if (logoImage != null) { graphics.drawImage(logoImage, LOGO_X, LOGO_Y, LOGO_WIDTH, LOGO_HEIGHT, drawComponent); // graphics.drawImage(logoImage, LOGO_X, LOGO_Y, drawComponent); } // System.out.println("End Paint start view"); // graphics.drawString(ComputerDefinitions.definitions[0], LINE_X_OFFSET, DEFINITION_Y + firstLineYBase); // graphics.drawString(editorGenerationMessage, 10, 40); // graphics.drawString("" + numSeconds +"s", 50, 80); // graphics.drawString(lastTraceable, 100, 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void paint(Graphics g) {\n super.paint(g);\n\n }", "@Override\r\n\t\tpublic void paint(Graphics g) {\n\t\t\tsuper.paint(g);\r\n\t\t}", "@Override\n public void paintComponent(Graphics g) \n {\n super.paintComponent(g);\n doDrawing(g);\n }", "@Override\n public void paint(Graphics g) {\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t\r\n\t\r\n\t}", "public void draw(){\n super.repaint();\n }", "public void paint (Graphics g){\n \r\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t\trender(g);\r\n\t}", "public void paint (Graphics g)\r\n {\n }", "public void paint(Graphics g){\n\t\t\n\t}", "@Override\n public void onPaint(Graphics2D g) {\n\n }", "public void draw() {\n\t\tsuper.repaint();\n\t}", "public void paint(Graphics g) {\n }", "public void paint(Graphics g) {\n }", "public void paint(Graphics g) {\n\t\t\n\t}", "public void paint(Graphics g)\r\n\t{\r\n\t\t// First call the base class paint method to do a one time\r\n\t\t// Initialization - specific to the JoglCanvas class\r\n\t\tsuper.paint(g);\r\n\t\t//System.out.println(\"Call to paint\");\r\n\t\tdisplay();\r\n\t}", "@Override //paint component is overridden to allow super.paintCompnent to be called\r\n public void paintComponent(Graphics g) {\n \tsuper.paintComponent(g); //The super.paintComponent() method calls the method of the parent class, prepare a component for drawing\r\n doDrawing(g); //The drawing is delegated inside the doDrawing() method\r\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n render(g);\n }", "public void paint (Graphics g) {\n super.paint(g);\n // g.setColor(Color.BLUE);\n // g.drawRect(0, 0, 100, 100);\n }", "@Override\n public void paintComponent(Graphics g)\n {\n m_g = g;\n // Not sure what our parent is doing, but this seems safe\n super.paintComponent(g);\n // Setup, then blank out with white, so we always start fresh\n g.setColor(Color.white);\n g.setFont(null);\n g.clearRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.fillRect(1, 1, this.getBounds().width, this.getBounds().height);\n g.setColor(Color.red);\n //g.drawRect(10,10,0,0);\n //drawPoint(20,20);\n \n // Call spiffy functions for the training presentation\n m_app.drawOnTheCanvas(new ExposedDrawingCanvas(this));\n m_app.drawOnTheCanvasAdvanced(g);\n \n // ADVANCED EXERCISE: YOU CAN DRAW IN HERE\n \n // END ADVANCED EXERCISE SPACE\n \n // Clear the special reference we made - don't want to abuse this\n m_g = null;\n \n \n // Schedule the next repaint\n java.awt.EventQueue.invokeLater(new Runnable() {\n public void run() {\n m_app.repaint();\n try\n {\n Thread.sleep(100);\n }\n catch (Exception e)\n { \n \n }\n }\n }); \n }", "private void paint(){\n ;\n }", "@Override\n protected void paint2d(Graphics2D g) {\n \n }", "@Override\r\n public void draw()\r\n {\n\r\n }", "public abstract void paint(Graphics g);", "@Override\r\n public void draw() {\n }", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\t\n\t}", "@Override\n public void draw()\n {\n }", "public abstract void selfPaint(Graphics g);", "@Override\n public void draw() {\n }", "public void paint(Graphics g) {\n super.paint(g);\n update(g);\n }", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void draw() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void paint(float deltaTime) {\n\t\t\r\n\t}", "public void paint(Graphics g) {\n\tupdate(g);\n }", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t}", "@Override\n\tprotected void repaintView(ViewGraphics g) {\n\t}", "@Override \n\tpublic void update(Graphics g) \n\t{\n\t\tpaint(g); \n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "@Override\n\tpublic void draw() {\n\n\t}", "public void paint(Graphics g) {\r\n super.paint(g); // call method paint() of super class (JFrame)\r\n if (ge != null) { // if the paint tool exists\r\n System.out.println(\"calling method redrawAll() of PaintTool.\");\r\n ge.redrawAll(g); // call method redrawAll() of class PaintTool\r\n System.out.println(\"method redrawAll() of class PaintTool executed.\");\r\n }\r\n }", "public void paintComponent(Graphics g)\n {\n super.paintComponent(g);\n draw(g);\n }", "protected void paintComponent(Graphics g)\n\t{\n\t}", "@Override\n public void paintComponent(Graphics g) {\n g.setColor(Color.WHITE);\n g.fillRect(0,0,super.getWidth(),super.getHeight());\n\n for (DrawableVector instruction : instructions){\n instruction.draw(g, getWidth(), getHeight());\n }\n if (currentInstruction != null){\n currentInstruction.draw(g, getWidth(), getHeight());\n }\n }", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void paintComponent(Graphics g)\r\n\t\t{\t\t\t\r\n\t\t\tsuper.paintComponent(g);\r\n\t\t\tthis.draw(g);\r\n\t\t}", "public void paint (Graphics g) {\n updateReport();\n super.paint(g);\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n\n paintBackground(g);\n }", "@Override\n public void update(Graphics g) {\n paint(g);\n }", "public void paint(Graphics g){\n g.setColor(Color.LIGHT_GRAY);\n g.drawRoundRect(0, 0, getWidth()-1, getHeight()-1, 20, 20);\n try{\n super.paint(g);}\n catch(Exception e){\n ij.IJ.showMessage(\"Paint Error\");\n }\n }", "@Override\r\n\tpublic void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\t\t//parent.log(\"Height = \" + getHeight());\r\n\t\tpaintGrid((Graphics2D) g);\r\n\t\tpaintMap((Graphics2D) g);\r\n\t\tif (parent.showMesh) paintMesh((Graphics2D) g);\r\n\t\tpaintParticles((Graphics2D) g);\r\n\t\tpaintRobot((Graphics2D) g);\r\n\t\tpaintTarget((Graphics2D) g);\r\n\t\tpaintPath((Graphics2D) g);\r\n\t\tpaintMoves((Graphics2D) g);\r\n\t\tpaintFeatures((Graphics2D) g);\r\n\t\tpaintWaypoints((Graphics2D) g);\r\n\t}", "public void paint (Graphics g) {\n super.paint(g);\n genReport();\n }", "public void paint(Graphics g) {\n\n \t\n \tsuper.paint(g);\n \n \tg.drawRect(0, 0, \n \t\t getSize().width - 1,\n \t\t getSize().height - 1); \t\n \t\n\n }", "@Override\r\n\tpublic void paint(Graphics g, JComponent c) {\n\t\tsuper.paint(g, c);\r\n\t}", "public void paint(Graphics g) {\n setViewWindow(myCurrentLeftX, 0, DISP_WIDTH, DISP_HEIGHT);\n paint(g, CANVAS_X, CANVAS_Y);\n }", "public void paint (Graphics g) {\n genReport();\n super.paint(g);\n }", "@Override\r\n \tpublic void paintComponent(Graphics g) {\r\n \t\tsuper.paintComponent(g);\r\n \t\tdrawSnake(g);\r\n \t}", "@Override\n\tpublic void render(Graphics g)\n\t{\n\t}", "public abstract void paint(Graphics2D g);", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "@Override\n\tpublic void render(Graphics g) {\n\t\t\n\t}", "public void paint (Graphics g) {\n updateReport();\n super.paint(g);\n }", "protected void paint(Graphics g) {\n mymidlet.paint(g);\n }", "@Override\n public void paint(Graphics g) {\n\tsuper.paint(g);\n\t// getContentPane().setBackground(Color.orange);\n\timg = Util.createImage(getContentPane());\n\tbackColor = new Color(img.getRGB(3, 3));\n\t// img.getGraphics().setColor(Color.blue);\n\t// img.getGraphics().fillRect(0, 0, img.getWidth(), img.getHeight());\n\tdrawEntrance(new Point(557, 70), 0, img.getGraphics());\n\tgetContentPane().getGraphics().drawImage(img, 0, 0, null);\n\tanimate(g);\n\t// img = Util.createImage(getContentPane());\n\n }", "@Override\n\tpublic void draw(Graphics2D g) {\n\t\t\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"draw method\");\n\t}", "@Override\n public void paint(Graphics g) {\n g2 = (Graphics2D) g;\n drawBackground();\n drawSquares();\n drawLines();\n gui.hint = new TreeSet<>();\n }", "@Override\n void draw()\n {\n \n System.out.println(\"Drawing Circle at\" + super.x +\"and\"+ super.y+\"!\");\n \n }", "@Override\r\n\tpublic void update(Graphics g) {\r\n\t\t// S*ystem.out.println(\"Graph.update\");\r\n\t\t// paint(g);\r\n\t\t// super.update(g);\r\n\t}", "public void draw(){\n }", "public void paintComponent(Graphics g)\r\n\t{\n\t}", "@Override\n\tpublic void draw(Graphics g) {\n\t\tsuper.draw(g);\n\t\tif(!satillite){\n\t\t\tdrawTrace(g);\n\t\t}\n\t\t\n \t\tmove();\n\t}", "public void beginDrawing();", "public void draw(Graphics g) {\r\n\t\t\r\n\t}", "public void draw() {\n }", "public void update(Graphics g){\n paint (g);\r\n \r\n }", "public void paint(Graphics g)\n/* */ {\n/* 100 */ Graphics2D g2d = (Graphics2D)g.create();\n/* */ try\n/* */ {\n/* 103 */ this.painter.paint(g2d, this.c, this.c.getWidth(), this.c.getHeight());\n/* */ } finally {\n/* 105 */ g2d.dispose();\n/* */ }\n/* */ }", "private void paintPainter(Graphics g)\n/* */ {\n/* 165 */ if (this.painter == null) { return;\n/* */ }\n/* */ \n/* */ \n/* 169 */ Graphics2D scratch = (Graphics2D)g.create();\n/* */ try {\n/* 171 */ this.painter.paint(scratch, this, getWidth(), getHeight());\n/* */ }\n/* */ finally {\n/* 174 */ scratch.dispose();\n/* */ }\n/* */ }", "public abstract void paint(Graphics2D g2d);", "@Override\n\tvoid drowing() {\n\t\tSystem.out.println(\"test--drawing\");\n\t}", "@Override\n\tpublic void draw() {\n\t\tSystem.out.println(\"绘制圆形\");\n\t}", "public void paintComponent(Graphics g);", "public void draw() {\n\n }", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n\t{\r\n\t\tif(_StartFinish)\r\n\t\t\tsetBackground(Color.WHITE);\r\n\t\telse\r\n\t\t\tsetBackground(Color.DARK_GRAY);\r\n\t\t\r\n\t\tsuper.paintComponent(g);\r\n\t}", "public void debugDraw(Graphics g)\n\t{\n\t}", "public void draw(Graphics g){\n\t}", "@Override\r\n\tpublic void paintComponent(Graphics g)\r\n {\r\n\t\tsuper.paintComponent(g);\r\n\t\tg.setColor(getForeground());\r\n\t\tg.fillOval(0,0, this.getWidth(),this.getHeight());\r\n }", "@Override\n\tpublic void draw(Graphics g, JPanel panel) {\n\t\t\n\t}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\r\n\tpublic void repaint() {\n\t\tsuper.repaint();\r\n\t}", "@Override\n\tpublic void draw(Graphics2D g2d) {\n\t\t\n\t}", "@Override\n\tpublic void draw(Graphics canvas) {}", "@Override\n\tpublic void repaint() {\n\t\tsuper.repaint();\n\t}", "public void draw(Graphics g) {\n\t\t\r\n\t}", "public void paint(Graphics g) {\n\t\tupdate(g);\n\t}", "public void draw(Graphics2D g)\r\n\t{\r\n\t\t//Draw this Pedestrian\r\n\t\tsuper.draw(g);\r\n\t}", "@Override\r\n public void repaint() {\r\n }", "public void paintComponent(Graphics g){\n\n\n\n r.render(g);\n }", "public void draw(Graphics g) {\n\t\t\n\t}" ]
[ "0.80853516", "0.79595685", "0.79410523", "0.7940598", "0.7848547", "0.78246176", "0.7805715", "0.7714731", "0.7609298", "0.7591939", "0.7539703", "0.75337046", "0.7522151", "0.7522151", "0.74958557", "0.746949", "0.74388146", "0.74359417", "0.7423312", "0.74138236", "0.7408735", "0.74052984", "0.7403434", "0.73907614", "0.738795", "0.7379151", "0.7379151", "0.7374021", "0.73581547", "0.73375523", "0.73039716", "0.7286837", "0.7286837", "0.7281367", "0.7275433", "0.7268806", "0.7268806", "0.7262817", "0.7259723", "0.7250077", "0.72308123", "0.72308123", "0.7226202", "0.7213879", "0.719983", "0.7185394", "0.71799344", "0.71799344", "0.7176632", "0.71723926", "0.7169845", "0.7156845", "0.7154282", "0.7153502", "0.71443766", "0.71381843", "0.7127005", "0.71261555", "0.71146786", "0.71084636", "0.71006036", "0.71005756", "0.71005756", "0.7097506", "0.7088086", "0.7087914", "0.7086227", "0.70835614", "0.7076578", "0.70626915", "0.7025733", "0.701873", "0.70168734", "0.6990155", "0.69741935", "0.6956815", "0.69429374", "0.69392955", "0.69275004", "0.69263005", "0.69181204", "0.69177765", "0.69096756", "0.69004637", "0.6900296", "0.689858", "0.68957275", "0.6889798", "0.6888991", "0.6868744", "0.685406", "0.685406", "0.6853277", "0.6847084", "0.6837041", "0.6833746", "0.6833098", "0.68301225", "0.6825", "0.68244886", "0.6824021" ]
0.0
-1
TODO Autogenerated method stub
@Override public void mouseClicked(MouseEvent e) { }
{ "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 mousePressed(MouseEvent e) { }
{ "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 mouseEntered(MouseEvent e) { }
{ "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 mouseExited(MouseEvent e) { }
{ "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 keyTyped(KeyEvent e) { }
{ "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 keyPressed(KeyEvent e) { }
{ "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 keyReleased(KeyEvent e) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
Start reading the file from the start
private CSVReaderHeaderAware getCSVReader(File file) throws IOException { FileReader fileReader; CSVReaderHeaderAware rowReader; try { fileReader = new FileReader(file); try { rowReader = new CSVReaderHeaderAware(fileReader); } catch (IOException exception) { System.out.println("IO ERROR ON CSV READ"); throw exception; } } catch (FileNotFoundException exception) { System.out.println("CSV FILE NOT FOUND"); throw exception; } return rowReader; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start(){\n\t\tboolean readFromFile = readFromIndex();\r\n\t\tif (!readFromFile){\t\r\n\t\t\tfor (int i = 0;i<1000;++i){\r\n\t\t\t\tString file = \"../crawler/pages/page\"+i+\".html\";\r\n\t\t\t\taddFile(file);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void start() throws IOException;", "public void start(File fastqParser) throws IOException {\n\t\tthis.fastqFile = fastqParser;\n\t\treader=new BufferedReader(new InputStreamReader(new FileInputStream(fastqFile)));\n\t\tnextLine = reader.readLine();\n\t}", "public void start() {\n\t\tif (path != null) {\n\t\t\tfileNameChain = new ByteArrayOutputStream();\n\t\t\tfileAsynctask doing = new fileAsynctask();\n\t\t\tdoing.execute(getPath());\n\t\t}\n\t}", "public void start() throws RuntimeException {\n InputStream is = null;\n try {\n is = new FileInputStream(this.filePath);\n } catch (FileNotFoundException ex) {\n throw new RuntimeException(ex);\n }\n BufferedReader br = null;\n try {\n parseBefore();\n if (isGz) {//读取压缩文件\n br = new BufferedReader(new InputStreamReader(new GZIPInputStream(is), this.encoding), Constants.BUFFER_SIZE);\n } else {//读取非压缩文件\n br = new BufferedReader(new InputStreamReader(is, this.encoding), Constants.BUFFER_SIZE);\n }\n String theLine = null;\n do {\n theLine = br.readLine();\n if (theLine != null && !\"\".equals(theLine.trim())) {\n try {\n if (isTrim) {\n parse(theLine.trim());\n } else {\n parse(theLine);\n }\n } catch (Exception ex) {\n \tex.printStackTrace();\n //ERROR_LOG.error(\"ReadFile parse error:\" + theLine, ex);\n }\n }\n } while (theLine != null);\n parseEnd();\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n } finally {\n try {\n if (is != null) {\n is.close();\n is = null;\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "private void startRead() {\n ExecutorService service = Executors.newFixedThreadPool(this.countReadThreads);\n while (!this.files.isEmpty() || !this.isWorkSearch()) {\n service.submit(this.threads.getReadThread());\n }\n service.shutdown();\n }", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "public void start()\n throws IOException\n {\n }", "public synchronized void start()\n {\n if (!started && open) {\n line.start();\n started = true;\n if (getTimeLeft() > 0) {\n // If we haven't finished playback of bytes already written, we\n // should start the tracker again.\n timeTracker.start();\n }\n }\n }", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "public abstract void start() throws IOException;", "protected void doBeginRead() throws Exception {}", "public final void start() throws IOException, IllegalStateException {\n accessLock.writeLock().lock();\n try {\n if (started || starting) {\n return;\n }\n starting = true;\n\n if (!this.journalDirectory.exists() || !this.journalDirectory.canWrite()) {\n throw new IllegalStateException(\"Journal directory does not exist or is not writable\");\n }\n\n openAndLockJournalFile();\n\n readIterators = Collections.synchronizedList(new ArrayList<RwJournalIterator>());\n\n updateLastTxCounters();\n\n starting = false;\n started = true;\n\n }\n finally {\n accessLock.writeLock().unlock();\n }\n }", "public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}", "private StringBuffer readFileStart(Reader pReader, int pMinimumLength) {\n\t\tBufferedReader in = null;\n\t\tStringBuffer buffer = new StringBuffer();\n\t\ttry {\n\t\t\t// get the file start into the memory:\n\t\t\tin = new BufferedReader(pReader);\n\t\t\tString str;\n\t\t\twhile ((str = in.readLine()) != null) {\n\t\t\t\tbuffer.append(str);\n\t\t\t\tif (buffer.length() >= pMinimumLength)\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (Exception e) {\n\t\t\tfreemind.main.Resources.getInstance().logException(e);\n\t\t\treturn new StringBuffer();\n\t\t}\n\t\treturn buffer;\n\t}", "public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }", "public void startDocument ()\n\t\t{\n\t\t\t//System.out.println(\"Start document\");\n\t\t}", "public void start() {\n try {\n long start = System.currentTimeMillis();\n readFile();\n result = wordStorage.getTopNWords(3);\n long end = System.currentTimeMillis();\n long timeTaken = ((end - start) / 1000);\n logger.info(\"time taken to run program: \" + timeTaken);\n display.displayTimeTaken(timeTaken);\n display.displayTopNWords(result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void start(){\n\t\tdo{\n\t\t\tMessage<T> msg= input.read();\n\t\t\tif (!msg.getQuit() && !msg.getFail() ){\n\t\t\t\tconsume(msg.getContent());\n\t\t\t}\n\t\t\tif (msg.getQuit()){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}while(true);\n\t\t\n\t}", "public void start(){\n\t\tterritoryCardsReader.readCards(1,cards);\n\t\tterritoryCardsReader.readCards(2,cards);\n\t\tterritoryCardsReader.readCards(3,cards);\n\t\t\n\t\tbuildingCardsReader.readCards(1, cards);\n\t\tbuildingCardsReader.readCards(2, cards);\n\t\tbuildingCardsReader.readCards(3, cards);\n\t\t\n\t\tcharacterCardsReader.readCards(1, cards);\n\t\tcharacterCardsReader.readCards(2, cards);\n\t\tcharacterCardsReader.readCards(3, cards);\n\t\t\n\t\tventureCardsReader.readCards(1, cards);\n\t\tventureCardsReader.readCards(2, cards);\n\t\tventureCardsReader.readCards(3, cards);\n\t\t\n\t\tleaderCardsReader.readCards(cards);\n\t\t\n\t\tboardResourcesAndStartingPlayerResourcesReader.readResources(bonus);\n\t\tboardResourcesAndStartingPlayerResourcesReader.readStartingPlayerResources(bonus);\n\t\tboardResourcesAndStartingPlayerResourcesReader.readFaithTrack(bonus);\n\t\tboardResourcesAndStartingPlayerResourcesReader.readPersonalBoardTiles(bonus, \"advanced\");\n\t\tboardResourcesAndStartingPlayerResourcesReader.readTimers(timer);\n\t\t\n\t\texcommunicationTilesReader.readCards(1, cards);\n\t\texcommunicationTilesReader.readCards(2, cards);\n\t\texcommunicationTilesReader.readCards(3, cards);\n\t\t\n\t\t\n\t}", "private void readToStartFragment() throws XMLStreamException {\r\n\t\twhile (true) {\r\n\t\t\tXMLEvent nextEvent = eventReader.nextEvent();\r\n\t\t\tif (nextEvent.isStartElement()\r\n\t\t\t\t\t&& ((StartElement) nextEvent).getName().getLocalPart().equals(fragmentRootElementName)) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void start(){\n\t\tstarted = true;\n\t\tlastTime = System.nanoTime();\n\t}", "public void\n start() throws IOException;", "private void start() {\n\n\t}", "public void startOver() {\n this.pagesRead = 0;\n }", "public void startreading() {\n\t\tSystem.out.println(\"You are reading a book written by \" + getAuthor() + \" and it's title is \" + title);\n\t}", "public void start() {\n \tupdateHeader();\n }", "public void start (BufferedReader br) throws IOException {\n\t\treader=br;\n\t\tnextLine = reader.readLine();\n\t}", "@Override\n\tpublic void resume() throws IOException {\n\n\t\ttry {\n\n\t\t\tstartInput(fileLocation);\n\n\t\t\t// gives us the current location\n\t\t\tint bytesToSkip = getSongTotalLenght() - pauseLocation;\n\t\t\tSystem.out.println(\"Resume button says: Num of Bytes to skip is \" + bytesToSkip);\n\t\t\tfis.skip(bytesToSkip);\n\n\t\t} catch (FileNotFoundException | JavaLayerException e) {\n\t\t}\n\n\t\t// Play every song on a new Thread\n\t\tnew Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tplayer.play();\n\t\t\t\t} catch (JavaLayerException e) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t}.start();\n\n\t}", "public void startDocument() {\r\n lineBuffer = new StringBuffer(128); \r\n saxLevel = 0;\r\n charState = -1;\r\n }", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "@Override\n public void onStart(boolean fromBeginning)\n {\n if(fromBeginning)\n {\n System.out.println(mLabel + \" Started!\");\n }\n else\n {\n System.out.println(mLabel + \" resumed\");\n }\n }", "void seekToFirst();", "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "public void initializeFullRead() {\r\n\r\n try {\r\n bPtr = 0;\r\n\r\n if (raFile != null) {\r\n fLength = raFile.length();\r\n } else {\r\n return;\r\n }\r\n\r\n if (tagBuffer == null) {\r\n tagBuffer = new byte[(int) fLength];\r\n } else if (fLength > tagBuffer.length) {\r\n tagBuffer = new byte[(int) fLength];\r\n }\r\n\r\n raFile.readFully(tagBuffer);\r\n } catch (final IOException ioE) {}\r\n }", "private void start()\n\tthrows FileNotFoundException\n\t{\n\t\t// Open the data file for reading\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(\"distance.in\")));\n\n\t\t// Read in the number of datasets.\n\t\ttry {\n \t\tline = in.readLine();\n\t\t\ttokenBuffer = new StringTokenizer(line);\n\t\t\tnumDatasets = Integer.parseInt(tokenBuffer.nextToken());\n\n \t} catch(IOException ioError) {\n\t\t\t\tSystem.out.println(\n\t\t\t\t\t\"Error occurred while reading in the first line of input.\");\n \t\tioError.printStackTrace();\n\t\t\t\tSystem.exit(1);\n \t}\n\n\t\t// While we have data to process...\n\t\tfor(int index = 0; index < numDatasets; index++) { \n\t\t\t// Grab a line of input \t\t\n\t\t\ttry {\n \t\tline = in.readLine();\n\n } catch(IOException ioError) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\"Error occurred while reading in the next line of input.\");\n \t\t\tioError.printStackTrace();\n\t\t\t\t\tSystem.exit(1);\n \t\t}\n\n\t\t\t// Popluate the unsorted list using this line of data\n\t\t\tbuildUnsortedList(line);\n\n\t\t\t// Sort the list using recursion\n\t\t\twhile(!sortList());\n\n\t\t\t// Print the mean variable between the sorted and unsorted list\n\t\t\tSystem.out.println(calcDistance());\n\t\t}\n\t}", "public boolean start() {\n return start(0);\n }", "private void start() {\n\t\twhile(!navi.pathCompleted())\n\t\t{\n\t\t\tThread.yield();\n\t\t\t\n\t\t}\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void startDocument ()\n {\n\tSystem.out.println(\"Start document\");\n }", "public void start(InputStream in, String path);", "public void start() {\n\n\t}", "public void start()\n {\n }", "public void start() {}", "public void start() {}", "public void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }", "public void init() throws IOException {\n restart(scan.getStartRow());\n }", "public void readFromFile() {\n\n\t}", "@Override\n\tpublic void startInput(String path) throws FileNotFoundException, JavaLayerException {\n\t\tfis = new FileInputStream(path);\n\t\tsetBis(new BufferedInputStream(fis));\n\n\t\tplayer = new Player(getBis());\n\t}", "public void start() throws IOException {\n startTime = Calendar.getInstance().getTime();\n pw = new PrintWriter(new FileWriter(logFileName));\n\n writeln(\"# --------------------------------------------------------------------\");\n writeln(\"# LOG FILE : \" + logFileName);\n writeln(\"# START TIME : \" + startTime);\n writeln(\"# --------------------------------------------------------------------\");\n writeln();\n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}", "public void start( )\n {\n // Implemented by student.\n }", "public void start() {\n\t\tSystem.out.println(\"parent method\");\n\t}", "@Test\n public void testBasicRead() throws IOException {\n String output = singleLineFileInit(file, Charsets.UTF_8);\n\n PositionTracker tracker = new DurablePositionTracker(meta, file.getPath());\n ResettableInputStream in = new ResettableFileInputStream(file, tracker);\n\n String result = readLine(in, output.length());\n assertEquals(output, result);\n\n String afterEOF = readLine(in, output.length());\n assertNull(afterEOF);\n\n in.close();\n }", "public void start() {\n\n String pathFile = mainMenu.menuTakePathFile();\n int countThreads = mainMenu.menuCountThreads();\n int downloadSpeed = mainMenu.menuDownloadSpeed();\n String folderForDownload = mainMenu.menuPathDownload();\n\n List<String> urls = null;\n try {\n urls = bootPreparation.parsingFileForUrls(pathFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n List<String> fileNames = bootPreparation.parsingListUrlsForNames(urls);\n\n multiThreadedDownloader.startDownloading(countThreads, urls.size(), urls, fileNames, downloadSpeed, folderForDownload);\n\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "private void startReadLoop() {\n\t\t\n\t\treadLoop=new Thread() {\n\t\t\tpublic void run() {\n\t\t\t\t/*\n\t\t\t\t * According to the spec, we should be able to read an 8 character string,\n\t\t\t\t * which we turn into a number, and that number is the size of the next data\n\t\t\t\t * block. In all likelihood our buffer will be much bigger, but the whole point\n\t\t\t\t * of using the buffer is we don't have to care about the underlying sync between\n\t\t\t\t * what we have read, what the device has written etc. etc. \n\t\t\t\t */\n\t\t\t\twhile(keepGoing) {\n//\t\t\t\t\tif(pauseForCommand) {\n//\t\t\t\t\t\ttry {\n//\t\t\t\t\t\t\tThread.sleep(50);\t//Give a bit of time for something else...\n//\t\t\t\t\t\t} catch (InterruptedException e) {\n//\t\t\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\t\t\te.printStackTrace();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.err.println(\"readLoop is paused\");\n//\t\t\t\t\t\tcontinue;\n//\t\t\t\t\t}\n\t\t\t\t\tDocument xmlDoc;\n\t\t\t\t\ttry {\n\t\t\t\t\t\txmlDoc = getNextBlock();\n\t\t\t\t\t\tif(xmlDoc.hasChildNodes()) {\n\t\t\t\t\t\t\tprocessChildren(xmlDoc);\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} catch (SAXException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tlog.info(\"Read loop finishing as keepGoing now false\");\n\t\t\t}\n\t\t};\n\t\treadLoop.setName(\"NKV550Reader\");\n\t\treadLoop.setPriority(Thread.MAX_PRIORITY);\n\t\treadLoop.start();\n\t}", "@Override\n\tprotected void start() {\n\t\tif (Cfg.DEBUG) {\n\t\t\tCheck.log(TAG + \" (actualStart)\");\n\t\t}\n\t\treadChatMessages();\n\t}", "void seek(int offsetFromStart);", "public static void start(String fName) {\n\tfileName = fName;\n\t//make usre that the directory exists and that the file is rw\n\ttry{\n\t File f = new File(fileName);\n\t if (f.exists()){\n\t\tFile fBak = new File(fileName + \".bak\");\n\t\tif (fBak.exists()){\n\t\t if (fBak.delete()){\n\t\t\tf.renameTo(fBak);\t\t\n\t\t }else{\n\t\t\tf.delete();\n\t\t }\n\t\t}else{\n\t\t f.renameTo(fBak);\n\t\t}\n\t }\n\t fStream = new DataOutputStream(new FileOutputStream(f));\n\t}catch(IOException e){\n\t System.out.println(\"LogFile:\"+e);\n\t System.exit(1);\n\t}\n\tstarted = true;\n\twriteHeader();\n }", "public void start() {\n process(0);\n }", "public void start() {\n\t\tcurrentFrameIndex = 0;\n\t}", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "public int start() { return _start; }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(true) {\n\t\t\t\t\tv.read(file);\n\t\t\t\t}\n\t\t\t}", "@Override\n public synchronized void start()\n {\n if (run)\n return;\n run = true;\n super.start();\n }", "public void start()\n\t{\n\t\tloopy();\n\t}", "public boolean isFileStartHit() {\n return pageRequest.getStart() == 0;\n }", "public void startRecord() {\n\t\tif (state == State.INITIALIZING) {\n\t\t\taudioRecorder.startRecording();\n\t\t\taudioRecorder.read(buffer, 0, buffer.length);\n\t\t\tstate = State.RECORDING;\n\t\t}\n\t\telse {\n\t\t\tLog.e(TAG, \"start() called on illegal state\");\n\t\t\tstate = State.ERROR;\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "@Override\r\n public void start() {\r\n }", "private boolean readingHasStarted()\n {\n return readingHasStarted;\n }", "public FilePartReader() {\n filePath = \"/home/cc/Desktop/OopModule/testing/filepartreader-testing-with-junit-grzechu31/text.txt\";\n fromLine = 1;\n toLine = 10;\n }", "public void start() {\n }", "public void beginSlice() throws IOException {}", "public void start() {\n startTime = System.currentTimeMillis();\n }", "protected void start() {\n }", "public void setStart(int start) {\r\n this.start = start;\r\n }", "public void begin(String mode) throws IOException {\r\n main.begin(mode);\r\n }", "public boolean start() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tbr.seek(0);\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(\"Files not found.\");\r\n\t\t}\r\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "public void setStartCode() throws Exception {\n String line;\n while ((line = this.fnirsDataIn.readLine()) != null) {\n if (line.startsWith(\"Start Code:\")) {\n String [] vals = line.split(\"\\t\");\n this.startCode = Float.parseFloat(vals[1]);\n return;\n } //.. now buffered reader is in desired location\n }\n throw new Exception(\"Could not find line Start Code:\");\n }", "@Override\n public void start() { }", "protected long readDataStartHeader() throws IOException {\n file.seek(DATA_START_HEADER_LOCATION);\n return file.readLong();\n }", "public final void start(){\n cpt = 0;\n inProgress = true;\n init();\n UpdateableManager.addToUpdate(this);\n }", "@Override public void start() {\n }", "public void start() {\n System.out.println(\"start\");\n }", "public void start(String filenameA , String filenameB){\n\t\t\n\t\t// READ DATA\n\t\treadKeyDataToIdentifyTransactions();\n\t\treadDataFromUserLog(userData,filenameA);\n\t\treadDataFromUserLog(userData,filenameB);\n\t\t\n\t\t//Enable the below to print the data read from the files\n\t\t//printData(userData);\n\t\t\t\t\n\t\t// ADD DATA TO RESPECTIVE SETS\n\t\tcategorizeData();\t\t\n\t\t\t\n\t\t// GIVE RECOMMENDATION\n\t\tprintRecommendation();\n\t}", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public void setStart(int start) {\n this.start=start;\n }", "@Override\r\n\tpublic synchronized void start() {\n\t\tsuper.start();\r\n\t}", "public void start(){\n\t\tsuper.start();\n\t}", "public void setStart(int start) {\n\t\tthis.start = start;\n\t}", "@Override\n\tpublic void start() {\n\n\t}", "public int start() {\n return start;\n }", "public void start() {\n startTime = System.currentTimeMillis();\n }" ]
[ "0.67431784", "0.65802366", "0.6577045", "0.64625156", "0.64139473", "0.63391286", "0.63100815", "0.6302535", "0.6287061", "0.6191989", "0.6119084", "0.6027633", "0.6014418", "0.6012392", "0.5996126", "0.59820426", "0.5946915", "0.59401685", "0.5924552", "0.59198046", "0.5909063", "0.5882536", "0.58813477", "0.5875284", "0.5869344", "0.5868666", "0.5853127", "0.5849273", "0.58258635", "0.58174", "0.57958174", "0.57958174", "0.57947344", "0.579278", "0.5788074", "0.57827985", "0.5772547", "0.5767955", "0.57629114", "0.5758353", "0.57416445", "0.5729027", "0.5723937", "0.5716085", "0.5716085", "0.57069445", "0.5697742", "0.5681367", "0.5666401", "0.5647637", "0.5641169", "0.5637927", "0.5613493", "0.5609992", "0.55966663", "0.5594208", "0.55912495", "0.55908376", "0.55880696", "0.5584875", "0.5578158", "0.55774796", "0.55677897", "0.5564223", "0.5562969", "0.5562588", "0.5561465", "0.5557596", "0.5547246", "0.5546752", "0.55388945", "0.5534812", "0.5533983", "0.5524812", "0.5520943", "0.5518833", "0.5518818", "0.55156326", "0.551335", "0.5513212", "0.55127215", "0.55034655", "0.5497561", "0.5497561", "0.5497561", "0.5497561", "0.5492268", "0.54901963", "0.5485324", "0.54809403", "0.5478697", "0.54779124", "0.5477842", "0.5470599", "0.5468062", "0.54676086", "0.5466777", "0.54664326", "0.54638803", "0.546372", "0.5459716" ]
0.0
-1
Read a row into a Map with column headings as keys and row entries as values
private Map<String, String> getRow(CSVReaderHeaderAware rowReader) throws IOException { return rowReader.readMap(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static Map<Integer, Map<String, Object>> readTxt(BufferedReader in) throws IOException {\n\t\t\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\"\\t\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\tString[] val = valString.split(\"\\t\");\n\t\t\t\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t\t\n\t\t\t}\t//end for\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the outside container\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\t//end while\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "static Map<Integer, Map<String, Object>> readCsv(BufferedReader in) throws IOException {\n\n\t\t// reads the key names (column names) and stores them\n\t\tString colString = in.readLine();\n\t\tString[] col = colString.split(\",\");\n\n\t\t//instantiates the object being returned so we can add in objects\n\t\tMap<Integer, Map<String, Object>> dict = new HashMap<Integer, Map<String, Object>>();\n\t\t\n\t\t//loops while there is still more data to read\n\t\twhile (in.ready()) {\n\t\t\t\n\t\t\t//pulls the next line and splits it apart by the delimiter\n\t\t\tString valString = in.readLine();\n\t\t\t\n\t\t\t/*code found for the regex expression found at \n\t\t\t* http://stackoverflow.com/questions/1757065/java-splitting-a-comma-separated-string-but-ignoring-commas-in-quotes\n\t\t\t* by user Bart Kiers\n\t\t\t*/\n\t\t\tString[] val = valString.split(\",(?=(?:[^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\", -1);\n\n\t\t\t//instantiates the object to be put in the list\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\n\t\t\t//loops per amount of columns\n\t\t\tfor (int i = 0; i < col.length; i++) {\n\t\t\t\t\n\t\t\t\t//instantiates to be put into the map and checks if it is a numeric data type\n\t\t\t\tObject value = val[i];\n\t\t\t\tif (isDouble((String) value)) {\n\t\t\t\t\tvalue = Double.parseDouble((String) value);\n\t\t\t\t}\n\n\t\t\t\t//puts the object into the map\n\t\t\t\tmap.put(col[i], value);\n\t\t\t}\n\n\t\t\t//since map.get(\"StudentID\") is a double, we cast it to an int so we can have a Integer Key for the outside map\n\t\t\tint i = ((Double) map.get(\"StudentID\")).intValue();\n\t\t\t\n\t\t\t//puts the map into the list\n\t\t\tdict.put(i, map);\n\t\t\t\n\t\t}\n\n\t\t//closes the BufferedReader\n\t\tin.close();\n\n\t\t//returns our data structure\n\t\treturn dict;\n\t}", "public static HashMap<String, String> getCSVRow(int rowNumber) {\n\t\tString COMMA_DELIMITER = \",\";\n\t\ttry {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\".\\\\CSVFiles\\\\C2ImportCalEventSample.csv\"));\n\n\t\t\tHashMap<String, String> map = new HashMap<>();\n\n\t\t\tString line = \"\";\n\t\t\tint header = 0;\n\t\t\t\n\t\t\t// Reading header\n\t\t\tline = br.readLine();\n\t\t\t\n\t\t\tString[] row = line.split(COMMA_DELIMITER);\n\t\t\t\n\t\t\tint l = 1;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\t\n\n\t\t\t\tif (l == rowNumber) {\n\t\t\t\t\tString[] row1 = line.split(COMMA_DELIMITER);\n\n\t\t\t\t\tif (row1.length >= 0) {\n\t\t\t\t\t\tint i = 0;\n\t\t\t\t\t\tfor (String cell : row) {\n\t\t\t\t\t\t\tmap.put(row[i].trim().toLowerCase(), row1[i].trim().toLowerCase());\n\t\t\t\t\t\t\t//System.out.println(\"row[\" + i + \"]=\" + row[i]);\n\t\t\t\t\t\t\t//System.out.println(\"row1[\" + i + \"]=\" + row1[i]);\n\t\t\t\t\t\t\ti++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn map;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tl++;\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\n\t\treturn null;\n\n\t}", "private static HashMap<String,String> getRowValues( String[] headerArray, String row ) {\r\n\t\t\r\n\t\tString[] dataArray = ContactsImport.parseCSVLine(row, false);\r\n\t\tHashMap<String,String> values = null;\r\n\t\t\r\n\t\ttry {\r\n\t\t\t//validate: number of elements in the row should be equals to the number of elements in the header\r\n\t\t\tif (dataArray.length != headerArray.length) {\r\n\t\t\t\t\r\n\t\t\t\tthrow( new Exception(\"number of elements doesn't match header row\"));\r\n\t\t\t\t\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t//store all values in the hashmap\r\n\t\t\t\tvalues = new HashMap<String,String>();\r\n\t\t\t\t\r\n\t\t\t\tfor (int i=0; i<dataArray.length; i++) {\r\n\t\t\t\t\tvalues.put( headerArray[i], dataArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.error(\"invalid row (\" + e.getMessage() + \"): \" + row);\r\n\t\t}\r\n\t\t\r\n\t\treturn values;\r\n\t\t\r\n\t}", "boolean onReadRow(int rowIndex, Map<String, String> rowData);", "public static Map<String, String> readMap(File inFile, String kColumn, String vColumn) throws IOException {\n Map<String, String> retVal = new HashMap<String, String>();\n try (TabbedLineReader inStream = new TabbedLineReader(inFile)) {\n int kCol = inStream.findField(kColumn);\n int vCol = inStream.findField(vColumn);\n for (Line line : inStream)\n retVal.put(line.get(kCol), line.get(vCol));\n }\n return retVal;\n }", "public static HashMap<String, ArrayList<String>> CSVHeadData(String path) {\r\n\t\t\r\n\t\t// get the rows of the file\r\n\t\tString[] rows = read(path).split(\"(\\n)+\");\r\n\t\r\n\t\t\r\n\t\t// Initialize the map\r\n\t\tHashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\r\n\t\t\r\n\t\t// Initialize keys\r\n\t\tArrayList<String> keys = new ArrayList<String>();\r\n\t\t// get the keys from the first row\r\n\t\tfor (String i : rows[0].split(\",\")) {\r\n\t\t\t// get rid of first and last spaces\r\n\t\t\tString current = i.trim();\r\n\t\t\t// add the current string to the list\r\n\t\t\tkeys.add(current);\r\n\t\t\t// add the key to the map and initialize the corresponding list\r\n\t\t\tmap.put(current, new ArrayList<String>());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// iterate over the rest of the rows \r\n\t\tfor (int i = 1; i < rows.length; i++) {\r\n\t\t\tint j = 0;\r\n\t\t\tString[] currentRowWords = rows[i].split(\",\");\r\n\t\t\t\r\n\t\t\t// check if the number of values is equal to the number of keys\r\n\t\t\tif (currentRowWords.length != keys.size()) {\r\n\t\t\t\tSystem.out.println(\"Invalid row n: \" + (i + 1) + \r\n\t\t\t\t\t\t\".\\nNumber of values does not match number of keys\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// get the words from the row and add them to the list of appropriate key\r\n\t\t\tfor (String k : currentRowWords) {\r\n\t\t\t\tString current = k.trim();\r\n\t\t\t\tmap.get(keys.get(j)).add(current);\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// That's all Folks!\r\n\t\treturn map;\r\n\t}", "@Nonnull\n @Override\n public GraphHead fromRow(@Nonnull Map.Entry<Key, Value> pair) throws IOException {\n EPGMGraphHead content = KryoUtils.loads(pair.getValue().get(), EPGMGraphHead.class);\n content.setId(GradoopId.fromString(pair.getKey().getRow().toString()));\n //read from content\n return content;\n }", "public HashMap<String,String> readMapFile(String filename) throws IOException {\n\t\tHashMap<String,String> valueMap = new HashMap<String,String>();\t\t\n List<String> cols = new ArrayList<String>(); \n\t\t\n try{\n \t buf = new BufferedReader(new FileReader(filename)); \n\t String strRead; \n\t while ((strRead=buf.readLine())!=null) {\n\t \tcols = Arrays.asList(strRead.split(\"\\t\")); \t\n\t \tif(cols.size() != 2)\n\t \t\tcontinue; \t\n\t \tvalueMap.put(cols.get(0),cols.get(1)); \t\n\t \t }\n\t } catch(IOException e){\n\t e.printStackTrace();\n\t } finally {\n\t \tbuf.close(); \n\t }\n\t\t\t\n\t\treturn valueMap;\n\t}", "public static Map<String, Long> getSalesMap(Reader reader) throws IOException {\n Map<String, Long> map = new HashMap<>();\n\n Scanner scanner = new Scanner(reader);\n\n scanner.nextLine();\n\n while (scanner.hasNext()) {\n String line = scanner.next();\n if (scanner.hasNextLong()) {\n map.merge(line, scanner.nextLong(), Long::sum);\n }\n }\n\n for(Map.Entry<String, Long> entry: map.entrySet()) {\n System.out.println(entry);\n }\n if (!map.isEmpty()) {\n System.out.println(map);\n }\n\n /* for (Map.Entry<String, Long> entry : map.entrySet()) {\n System.out.println(entry.getKey() + \"=\" + entry.getValue());\n } // но тут не полный вывод. Тут перезапись старых\n */ // ключей новыми\n\n return map;\n }", "private static Map<Short, String> getHeaderValuesMap(Document reportDocument) {\n Map<Short, String> headerValues = new HashMap<Short, String>();\n Element reportElement = reportDocument.getDocumentElement();\n NodeList thElements = reportElement.getElementsByTagName(\"th\");\n // assumes only one header row\n for (int i = 0; i < thElements.getLength(); i++) {\n headerValues.put((short) i, thElements.item(i).getTextContent());\n }\n return headerValues;\n }", "public static HashMap<String, ArrayList<String>> CSVKeyData(String path) {\r\n\r\n\t\t// Initialize the map\r\n\t\tHashMap<String, ArrayList<String>> map = new HashMap<String, ArrayList<String>>();\r\n\t\t\r\n\t\t// get the rows of the file\r\n\t\tString[] rows = read(path).split(\"(\\n)+\");\r\n\t\t\r\n\t\t\r\n\t\t// iterate over the rows\r\n\t\tfor (int i = 0; i < rows.length; i++) {\r\n\t\t\t// get the words of the current line\r\n\t\t\tString[] currentRowWords = rows[i].split(\",\");\r\n\t\t\t\r\n\t\t\t// get the current key\r\n\t\t\tString currentKey = currentRowWords[0].trim();\r\n\t\t\t\r\n\t\t\t// set the key and initialize the list\r\n\t\t\tmap.put(currentKey, new ArrayList<String>());\r\n\t\t\t\r\n\t\t\t// add the values to the current key\r\n\t\t\tfor (int j = 1; j < currentRowWords.length; j++) {\r\n\t\t\t\tString currentValue = currentRowWords[j].trim();\r\n\t\t\t\tmap.get(currentKey).add(currentValue);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// That's all Folks!\r\n\t\treturn map;\r\n\t}", "public static HashMap<String, String> readFromExcel() throws IOException, WriteException, BiffException {\n\t\t\t\tList<String> keyList = new ArrayList<String>(); \r\n\t\t\t\tList<String> list = new ArrayList<String>(); \r\n\t\t\t\tHashMap<String, String> map = new HashMap<String, String>(); \r\n\t\t\t\tString str = null;\r\n\t\t\t\r\n\t\t\t\ttry\r\n\t\t {\r\n\t\t File f1=new File(\"//ecs-9844/DoNotDelete/JenkinsData/input.xls\");\r\n\t\t //the excel sheet which contains data\r\n\t\t WorkbookSettings ws=new WorkbookSettings();\r\n\t\t ws.setLocale(new Locale(\"er\",\"ER\"));\r\n\t\t Workbook workbook=Workbook.getWorkbook(f1,ws);\r\n\t\t Sheet readsheet=workbook.getSheet(0);\r\n\t\t //Loop to read the KEYS from Excel i.e, 1st column of the Excel\r\n\t\t for(int i=0;i<readsheet.getColumns();i++) {\r\n\t\t \tstr=readsheet.getCell(i,0).getContents().toString();\r\n\t\t \tlist.add(str);\r\n\t\t }\r\n\t\t \tkeyList.addAll(list);\r\n\t\t \t// Hardcoding the first map (key, value) values \r\n\t\t \tmap.put(keyList.get(0), readsheet.getCell(0, 1).getContents().toString());\r\n\t\t \t// Loop to read TEST DATA from the Excel\r\n\t\t for(int i=1;i<readsheet.getRows();i++) {\r\n\t\t for(int j=1;j<readsheet.getColumns();j++) {\t\r\n\t\t str=readsheet.getCell(j,i).getContents().toString();\r\n\t\t list.add(str);\r\n\t\t System.out.println(str);\r\n\t\t map.put(keyList.get(j),str); \r\n\t\t \t}\r\n\t\t }\r\n\t\t //Print the map(key, value) \r\n\t\t System.out.println(\"Print map\");\r\n\t\t System.out.println(map);\r\n\t\t \r\n\t\t }\r\n\t\t catch(IOException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\r\n\t\t catch(BiffException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t } catch (Exception e) {\r\n\t\t e.printStackTrace(); \r\n\t\t }\r\n\t\t\t\t\treturn map;\r\n\t}", "public HashMap<String, String> readTestData() {\n\t\trequiredRow = getRequiredRow();\n\t\tif(requiredRow!=0) {\n\t\t\tfor(int i = 0 ; i < sheet.getRow(requiredRow).getLastCellNum(); i++) {\n\t\t\t\tif(sheet.getRow(requiredRow).getCell(i)==null)\n\t\t\t\t\tsheet.getRow(requiredRow).createCell(i).setCellType(CellType.STRING);\n\t\t\t\ttestData.put(sheet.getRow(0).getCell(i).toString(),sheet.getRow(requiredRow).getCell(i).toString());\n\t\t\t}\n\t\t}\n\t\treturn testData;\n\t}", "HashMap<String,Object> processQueryResultRow(Map<String,Object> rawRow, String collectionName) {\n HashMap<String,Object> resultRow = new HashMap<>();\n for (String key: rawRow.keySet()) {\n Object value = rawRow.get(key);\n if (collectionName != null)\n value = formatFieldValue(collectionName,key,value);\n if (value != null) resultRow.put(key,value);\n }\n return resultRow;\n }", "private Object getEntry( Object[] row, String rrName ) {\n Integer icol = colMap_.get( rrName );\n return icol == null ? null : row[ icol.intValue() ];\n }", "public Map<Integer, Double> getRow(int row) {\n \t\n \treturn _elements.get(row);\n \t\n }", "public static String[][] ReadTestData(String pathToCSVfile) throws Exception{\n\t\t\t\n\t\t//\tHashMap<String,String> theMap = new HashMap<String,String>();\n\n\t\t \n //Create object of FileReader\n FileReader inputFile = new FileReader(pathToCSVfile);\n \n //Instantiate the BufferedReader Class\n BufferedReader bufferReader = new BufferedReader(inputFile);\n \n //Variable to hold one line data\n String line;\n int NumberOfLines = 0;\n \n String[][] data = new String[1000][25]; // set the max rows to 1000 and col to 100\n \n // Read file line by line and print on the console\n while ((line = bufferReader.readLine()) != null) {\n \t \n \t String[] lineArray = line.split(Pattern.quote(\",\")); //split the line up and save to array\n \t int lineSize = lineArray.length;\n \t int z;\n \t for (z = 0; z <= (lineSize-1);)\n \t {\n \t\t data[NumberOfLines][z] = lineArray[z].toString();\n \t\t z++;\n \t } \n \t \n \t if(z <= 25) // read in 25 cols to make sure the array does not have nulls that other areas of the code are looking in\n \t {\t \t\t \n \t\t while (z <= 24)\n\t \t {\t\t \n \t\t\t data[NumberOfLines][z] = \" \";\n\t \t\t z++;\n\t \t } \n \t }\n \t NumberOfLines++; \n \t \n }\n \n bufferReader.close();\n \n // for (int h=0; h< NumberOfLines; h++) {theMap.put(data[h][0],data[h][1]); }\n \n \n System.out.println(\"Test Data has been saved \"); \n \n \t \n return data;\n \n\t \n\t}", "private Map.Entry<Integer, Column<?>> getColumnEntry(final int row) {\n Preconditions.checkElementIndex(row, numTuples);\n readOnly = true;\n return columnIds.floorEntry(row);\n }", "private HashMap<String, String> readExcelData(HashMap<String, String> map, String fileName, String tabName)\n\t\tthrows Exception{\n\t\tWorkbook configWorkBook = Workbook.getWorkbook(this.getClass().getResourceAsStream(fileName));\n//\t\tlogger.debug(\"configWorkBook \" + configWorkBook);\n\t\tSheet configDataSheet = configWorkBook.getSheet(tabName);\n//\t\tlogger.debug(\"reading \" + fileName);\n//\t\tlogger.debug(\"found \" + configDataSheet.getRows() + \"rows in \" + fileName);\n\t\tfor(int row=1; row<configDataSheet.getRows(); row++){\n\t\t\tString key = configDataSheet.getCell(0, row).getContents();\n\t\t\tString value = configDataSheet.getCell(1, row).getContents();\n//\t\t\tlogger.debug(\"processing row \" + row + \" in \" + fileName + \" - found key \" + key + \" value \" + value);\n\t\t\tmap.put(key, value);\n\t\t}\n\t\treturn map;\n\t}", "protected abstract Map<String, Map<String, Object>> getData(String columnFamilyName);", "public synchronized Map<String, byte[]> getRow(String rowKey,\n Set<byte[]> columns, boolean cacheBlocks) throws IOException {\n HTable table = getTable();\n Get get = new Get(rowKey.getBytes());\n get.setCacheBlocks(cacheBlocks);\n for (byte[] column: columns) {\n get.addColumn(familyName, column);\n }\n Result row = table.get(get);\n if (row.raw().length >= 1) {\n Map<String, byte[]> result = new HashMap<String, byte[]>();\n for (KeyValue kv: row.raw()) {\n result.put(new String(kv.getQualifier()), kv.getValue());\n }\n return result;\n }\n return null;\n }", "public static void convertRsToMap(ResultSet rs,Map<String,Object> map) throws SQLException{\n\t\tResultSetMetaData rsMeta = rs.getMetaData();\r\n\t\tint columnCount = rsMeta.getColumnCount();\r\n\t\t\r\n\t\tfor(int i = 1; i <= columnCount; i++){\r\n\t\t\tString key = rsMeta.getColumnLabel(i).toLowerCase();\r\n\t\t\t\r\n\t\t\tObject value = rs.getObject(key);\r\n\t\t\t\r\n\t\t\t//if(value instanceof oracle.sql.DATE){\r\n\t\t\t//\tvalue = new java.sql.Date(((oracle.sql.DATE)value).timestampValue().getTime());\r\n\t\t\t//}else if(value instanceof oracle.sql.TIMESTAMP){\r\n\t\t\t//\tvalue = new java.sql.Timestamp(((oracle.sql.TIMESTAMP)value).timestampValue().getTime());\r\n\t\t\t//}\r\n\t\t\t\r\n\t\t\tmap.put(key, value);\r\n\t\t}\r\n\t}", "@Override\n public Map<String, String> get() {\n\n Map<String, String> hugoMap = Maps.newHashMap();\n try {\n final CSVParser parser = new CSVParser(this.reader, CSVFormat.TDF.withHeader());\n for (CSVRecord record : parser) {\n\n hugoMap.put(record.get(0), record.get(1));\n }\n\n } catch (IOException e) {\n log.error(e.getMessage());\n e.printStackTrace();\n }\n return hugoMap;\n }", "public static List<Map<String, String>> loadData(String filename) throws IOException {\n\t\tList<Map<String, String>> data = new ArrayList<>();\n\t\tPath dataFile = Paths.get(filename);\n\t\t\n\t\t// Files.readAllLines only accepts Path and returns a List\n\t\t// it reads the whole file in one shot\n\t\tList<String> linesList = Files.readAllLines(dataFile);\n\t\t// header row to attributes array\n\t\tString[] attributes = linesList.get(0).split(\",\");\n\t\t\n\t\t// process data rows\n\t\tfor (int i = 1; i < linesList.size(); i++) {\n\t\t\tString[] values = linesList.get(i).split(\",\");\n\t\t\tif (values.length == 0 && values[0].length() == 0) break;\n\t\t\t// create a map for each row\n\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t//fill the row\n\t\t\tfor (int j = 0; j < attributes.length; j++)\n\t\t\t\trow.put(attributes[j], values[j]);\n\t\t\tdata.add(row);\t\t// add data to row\n\t\t}\t\n\n\t\t// do the same with a Stream, but use the iterator of the stream\n\t\t// instead of dealing with it directly\n\t\tStream<String> linesStream = Files.lines(dataFile);\n\t\tIterator<String> it = linesStream.iterator();\n\t\tattributes = it.next().split(\",\");\n\t\twhile (it.hasNext()) {\n\t\t\tString[] values = it.next().split(\",\");\n\t\t\tif (values.length > 0 && values[0].length() > 0) {\n\t\t\t\tMap<String, String> row = new HashMap<>();\n\t\t\t\tfor (int i = 0; i < attributes.length; i++)\n\t\t\t\t\trow.put(attributes[i], values[i]);\n\t\t\t\t// data.add(row);\n\t\t\t}\n\t\t}\n\t\tlinesStream.close();\n\n\t\treturn data;\n\t}", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "public int readMapHeader() throws IOException {\n return in.readInt();\n }", "private void initMapData() {\n\n\t\ttry {\n\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(mapFile));\n\t\t\t\n\t\t\tfor (int row = 0; row < height; row++) {\n\t\t\t\t\n\t\t\t\t// read a line\n\t\t\t\tString line = br.readLine();\n\t\t\t\t\n\t\t\t\t// if length of this line is different from width, then throw\n\t\t\t\tif (line.length() != width)\n\t\t\t\t\tthrow new InvalidLevelFormatException();\n\t\t\t\t\n\t\t\t\t// split all single characters of this string into array\n\t\t\t\tchar[] elements = line.toCharArray();\n\t\t\t\t\n\t\t\t\t// save these single characters into mapData array\n\t\t\t\tfor (int col = 0; col < width; col++) {\n\t\t\t\t\tmapElementStringArray[row][col] = String.valueOf(elements[col]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@SuppressWarnings(\"unchecked\")\n public TreeMap readMap() throws IOException {\n int length = readMapHeader();\n TreeMap result = new TreeMap();\n for (int i = 0; i < length; i++) {\n Object key = read();\n Object value = read();\n result.put(key, value);\n }\n return result;\n }", "public Map<Object, Object[]> selectAsMap(String mapColumn) {\n\n int mapColumnIndex = columnIndex(mapColumn);\n if (mapColumnIndex < 0) {\n throw new IllegalArgumentException(\"Unknown column: \" + mapColumn);\n }\n\n List<Object[]> list = select();\n\n Map<Object, Object[]> map = new HashMap<>();\n\n list.forEach(r -> {\n Object[] existing = map.put(r[mapColumnIndex], r);\n if (existing != null) {\n throw new IllegalArgumentException(\"More than one row matches '\" + r[mapColumnIndex] + \"' value\");\n }\n });\n\n return map;\n }", "Map<String, String> readAttrs(Map<String, Object> pRqVs,\n Reader pReader) throws Exception;", "private void loadCSVFileIntoHashmap(){\n try {\n postCodesFileReader = new FileReader(postCodesFileLocation);\n String line;\n //Open up the buffered reader so we can start looping through our CSV file\n BufferedReader br = new BufferedReader(postCodesFileReader);\n while ((line = br.readLine()) != null) {\n String[] country = line.split(fieldSeperator);\n if(country.length<=3){\n //Add the region code and matching country to the hashmap\n postCodesMap.put(country[0].trim(), country[2].trim());\n }\n }\n br.close();\n } \n catch (Exception e) {\n //Ideally we would use a custom log file, but for the sake of a quick demo use the stderr \n e.printStackTrace();\n } \n }", "public HashMap<String, String[]> readDictionary (){\n\t\tHashMap<String, String[]> hashmap = new HashMap<String, String[]>();\n\t\t\n\t\treturn (HashMap<String, String[]>) readDictionary(hashmap);\n\t}", "HRegionInfo getHRegionInfo(final byte [] row, final Map<byte [], Cell> map)\n throws IOException {\n Cell regioninfo = map.get(COL_REGIONINFO);\n if (regioninfo == null) {\n StringBuilder sb = new StringBuilder();\n for (byte [] e: map.keySet()) {\n if (sb.length() > 0) {\n sb.append(\", \");\n }\n sb.append(Bytes.toString(e));\n }\n LOG.warn(Bytes.toString(COL_REGIONINFO) + \" is empty for row: \" +\n Bytes.toString(row) + \"; has keys: \" + sb.toString());\n return null;\n }\n return Writables.getHRegionInfo(regioninfo.getValue());\n }", "@Override\n\t\t\tpublic Row map(String value) throws Exception {\n\t\t\t\tString[] str = value.split(\",\");\n\t\t\t\tRow row = new Row(4);\n\t\t\t\tfor(int i=0 ;i<str.length;i++){\n\t\t\t\t\tswitch(i){\n\t\t\t\t\tcase 0:{\n\t\t\t\t\t\tString time = str[i].substring(1,str[i].length()-1);\n\t\t\t\t\t\tTimestamp tms = Timestamp.valueOf(time);\n\t\t\t\t\t\trow.setField(i,tms);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 1:{\n\t\t\t\t\t\tString tmp = str[i].substring(1,str[i].length()-1);;\n\t\t\t\t\t\trow.setField(i,Integer.valueOf(tmp));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tcase 2:\n\t\t\t\t\tcase 3:{\n\t\t\t\t\t\tString time = str[i].substring(1,str[i].length()-1);\n\t\t\t\t\t\trow.setField(i,time);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn row;\n\t\t\t}", "public DataRow mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\n\t\n\t\tDataRow row = new DataRow();\n\t\t//if (rs.isClosed()){return null;}\n\t\tint cols = rs.getMetaData().getColumnCount();\n\t\t\n\t\tfor (int i=1 ; i <= cols; i++){\n\t\t\tDefaultLobHandler blob = new DefaultLobHandler();\n\t\t\trow.setValue(rs.getMetaData().getColumnName(i), blob.getBlobAsBinaryStream(rs, i));\n\t\t}\n\t\n\t\treturn row;\n\t}", "public static Map<Long, Book> readToMap() throws ApplicationException {\r\n ArrayList<String> bookList = readFile();\r\n Map<Long, Book> books = new HashMap<>();\r\n\r\n for (int i = 0; i < bookList.size(); i++) {\r\n String[] rows = bookList.get(i).split(COMMA_DELIMITER, -1);\r\n Book book = readBookString(rows);\r\n books.put(book.getId(), book);\r\n LOG.debug(String.format(\"%s has been added to the Map\", book.getAuthor()));\r\n\r\n }\r\n\r\n return books;\r\n\r\n }", "private void readMap( Map<String, String> map ) {\n\t\t\n\t\tSet<Map.Entry<String, String>> set = map.entrySet();\n\t\t\n\t\tfor( Map.Entry<String, String> entry : set ) {\n\t\t\tSystem.out.printf( \"'%1$-10s' '%2$20s' %n\", entry.getKey(), entry.getValue() );\n\t\t}\n\t\t\n\t}", "public static HashMap<String, IRI> processCSVGoTHash(String path) throws FileNotFoundException {\n BufferedReader in = null;\n in = new java.io.BufferedReader(new java.io.FileReader(path));\n String currentLine;\n int lineN = 0;\n String value=\"\";\n String term=\"\";\n HashMap<String, IRI> got = new HashMap<String, IRI>();\n try {\n while ((currentLine = in.readLine()) != null) {\n if (lineN == 0) {\n lineN++; //get rid of the headers\n } else {\n //process each vocab\n String[] info = currentLine.split(\";\");\n if(info.length==2) {\n value = info[0];\n term = info[1];\n }\n got.put(value, IRI.create(term));\n\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n in.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return got ;\n }", "DataFrameRow<R,C> row(R rowKey);", "public static int[][] loadMap(String fileName) throws Exception{\n FileReader fr=new FileReader(fileName);\n int c;\n String str=\"\";\n List<String> strA=new ArrayList<>(); //list of lines\n //process out newlines from midline\n while((c=fr.read())!=-1){\n System.out.print((char)c); //show map\n if(!(((char)c=='\\n') || ((char)c=='\\r'))){str=str+(char)c;}\n else if(((char)c=='\\n' || (char)c=='\\r')){\n if(strA.size()<1) {strA.add(str);str=\"\";}\n else if(strA.size()>0 && strA.get(0).length()>str.length()){} //newline char found midline\n else {strA.add(str);str=\"\";}\n }\n else System.out.println(\"Err: \"+(char)c);\n }\n strA.add(str);\n System.out.println(\"\\nWidth: \"+str.length()+\"\\nHeight: \"+strA.size());\n //now that size is known, fill info array\n int[][] map=fillMap(strA);\n \n return map;\n }", "public static void ColumnDictionary()\r\n\t{\r\n\t\t//Iterate through all the columns in the Excel sheet and store the value in Hashtable\r\n\t\tfor(int col=0;col < wrksheet.getColumns();col++)\r\n\t\t{\r\n\t\t\tdict.put(ReadCell(col,0), col);\r\n\t\t\t//System.out.println(dict.values());\r\n\t\t}\r\n\t}", "protected abstract Object mapRow(ResultSet rs) throws SQLException;", "private static void addToHashMap(String csvLine, HashMap<String, HashMap<String, String>> testData)\n {\n final String KEY_DELIMITER = \",\";\n final String RECORD_DELIMITER = \";\";\n final String VALUE_DELIMITER = \"=\";\n final int KEY = 0;\n final int VALUE = 1;\n\n //Get all keys available in line\n String[] keys = parseCSVLine(csvLine, KEY_DELIMITER);\n if (keys.length > 0)\n {\n HashMap<String,String> data = new HashMap<String, String>();\n String[] records = parseCSVLine(keys[1], RECORD_DELIMITER);\n for(String recordData : records)\n {\n String [] datavalues = parseCSVLine(recordData, VALUE_DELIMITER);\n if (datavalues.length > 0)\n {\n data.put(new String(datavalues[KEY]), new String(datavalues[VALUE]));\n }\n }\n testData.put(new String(keys[0]), data);\n }\n }", "public static Map readMap(File f)\n {\n Map map = new Map(1);\n try\n {\n MapReader run = new MapReader();\n Scanner mapReader = new Scanner(f);\n ArrayList<String[]> numberLines = new ArrayList<String[]>();\n int dim = mapReader.nextInt();\n mapReader.nextLine();\n for(int gh = 0 ; gh < dim; gh++)\n {\n String[] nums = mapReader.nextLine().split(\" \");\n numberLines.add(nums);\n }\n int[][] newMap = new int[numberLines.size()][numberLines.size()];\n \n for(int i = 0; i < numberLines.size();i++)\n {\n for(int h = 0; h < numberLines.get(i).length;h++)\n {\n newMap[i][h] = Integer.parseInt(numberLines.get(i)[h]);\n }\n }\n map.loadMap(newMap);\n \n TreeMap<Integer,ArrayList<Integer>> spawn1 = map.getSpawn1();\n TreeMap<Integer,ArrayList<Integer>> spawn2 = map.getSpawn2();\n \n String line = \"\";\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn1\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn1.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn1.get(x).add(in.nextInt());\n }\n }\n \n if(!line.equals(\"\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n while(mapReader.hasNextLine() && (line = mapReader.nextLine()).contains(\"spawn2\"))\n {\n Scanner in = new Scanner(line);\n in.next();\n int x = in.nextInt();\n spawn2.put(x, new ArrayList<Integer>());\n while(in.hasNextInt())\n {\n spawn2.get(x).add(in.nextInt());\n }\n }\n }\n catch (Exception ex)\n {\n JOptionPane.showMessageDialog(null, \"Corrupted file!\");\n }\n return map;\n }", "public static Map<String, Map<String,String>> getDataMap() throws Exception\r\n\t{\r\n\t\tif(sheet==null)\r\n\t\t{\r\n\t\t\tloadExcel();\r\n\t\t}\r\n\t\t\r\n\t\tMap<String,Map<String,String>> superMap = new HashMap<String, Map<String,String>>();\r\n\t\tMap<String,String> myMap = new HashMap<String, String>();\r\n\t\t\r\n\t\tfor(int i=1;i<sheet.getLastRowNum()+1;i++)\r\n\t\t{\r\n\t\t\trow=sheet.getRow(i);\r\n\t\t\tString keyCell = row.getCell(0).getStringCellValue();\r\n\t\t\t\r\n\t\t\tint colNum = row.getLastCellNum();\r\n\t\t\tfor(int j=1;j<colNum;j++)\r\n\t\t\t{\r\n\t\t\t\tString value = row.getCell(j).getStringCellValue();\r\n\t\t\t\tmyMap.put(keyCell, value);\r\n\t\t\t}\r\n\t\t\tsuperMap.put(\"MasterData\", myMap);\r\n\t\t}\r\n\t\t\r\n\t\treturn superMap;\r\n\t}", "public HashMap<String, String> convertToString() throws IOException\n\t{\n\t HashMap<String, String> map = new HashMap<String, String>();\n\n\t String line;\n\t BufferedReader reader;\n\t String multiple_line=null;\n\t\ttry {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t String[] parts = (line.replaceAll(\"\\\"\", \"\").split(\"=\", 2)); //tolto replaceAll\n\t\t if (parts.length >= 2)\n\t\t {\n\t\t String key = parts[0];\n\t\t multiple_line=key;\n\t\t String value = parts[1];\n\t\t map.put(key, value);\n\t\t } else {\n\t\t \n\t\t String line2=map.get(multiple_line);\n\t\t map.put(multiple_line, line2+\"\\n\"+line);\n\t\t }\n\t\t }\n\t\t\t\n\t\t\t//for (String key : map.keySet())\n\t\t //{\n\t\t // System.out.println(key + \":\" + map.get(key));\n\t\t // }\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "Map(String input) {\n row = 0;\n col = 0;\n\n String line;\n Scanner fin = null;\n try\n {\n fin = new Scanner(new File(input));\n }\n catch (FileNotFoundException x)\n {\n System.out.println(\"Error: \" + x);\n System.exit(0);\n }\n // Take first line and get mapLength and mapHeight. Initialize map array\n line = fin.nextLine();\n String[] temp = line.split(\" \");\n maxR = Integer.parseInt(temp[0].toString());\n maxC = Integer.parseInt(temp[1].toString());\n map = new String[maxR][maxC];\n\n for(int j = 0; j < maxR; j++) {\n line = fin.nextLine();\n for(int i = 0; i < maxC; i++){\n map[j][i] = (line.charAt(i)) + \"\";\n }\n }\n }", "public static Map<String, Object> csvRecordToMap(CSVRecord csvRecord, String[] headers) {\r\n\t\tMap<String, Object> dataMap = new HashMap<String, Object>();\r\n\t\tfor (int index = 0; index < headers.length; index++) {\r\n\t\t\tString header = headers[index];\r\n\t\t\tString value = csvRecord.get(index);\r\n\t\t\tdataMap.put(header, value);\r\n\t\t}\r\n\t\treturn dataMap;\r\n\t}", "private HashMap<Object, Object> HashMapTransform(List<String> lines) {\n\n HashMap<Object, Object> keypair = new HashMap<>();\n\n for (String line : lines) {\n if (line.contains(pairDelimiter)) {\n String[] intermediate = line.split(pairDelimiter, maxSplitSize);\n keypair.put(intermediate[0], intermediate[1]);\n }\n }\n return keypair;\n }", "RowValues createRowValues();", "Map <String, List <String> > parse (List <String> keys, List <String> lines);", "public static Map readingFilesMap(String file) {\n\n Stream<String> lines = null;\n try {\n lines = Files.lines(Paths.get(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n /* lines = lines.filter(line -> line.trim().length() > 0)\n .map(line -> line.substring(line.lastIndexOf(\" \")));\n*/\n Map map = lines.collect(Collectors.toMap(\n line -> line.substring(line.lastIndexOf(\" \")),\n line -> line.substring(0, line.lastIndexOf(\" \"))\n ));//.forEach(System.out::print);\n //lines.forEach(Collections.list());\n\n map.forEach((k, v) -> {\n System.out.println(\"key:\"+k+ \" Value=\"+v);\n } );\n return map;\n\n //set.forEach(System.out::print);\n\n\n }", "@Override\n\t public mesconfig mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t mesconfig mes = new mesconfig();\n\t mes.setTitle(rs.getString(1));\n\t mes.setKeyword(rs.getString(2));\n\t mes.setDescription(rs.getString(3));\n\n\t return mes;\n\t }", "public static Map loadMap(String MapFile){\n int Bottle =0;\n int Bottle1= 0;\n Map Object = new Map(0,0);\n \n try {\n \n Scanner scan = new Scanner(new File(MapFile));\n FileReader fr = new FileReader(MapFile);\n while(scan.hasNextLine()){\n if (scan.hasNextInt()){\n Bottle = scan.nextInt();\n Bottle1 = scan.nextInt();\n\n }\n Object = new Map(Bottle,Bottle1);\n }\n fr.close();\n }\n \n catch (Exception e){\n System.out.println(\"Sorry Nothing Found\");\n System.out.println(e.toString());\n e.printStackTrace(); \n } \n \n return Object;\n }", "private HashMap<String, String> getHashMapfromResultSetRow(ResultSet resultset)\n/* */ {\n/* 1406 */ return getHashMapfromResultSetRow(resultset, new ArrayList());\n/* */ }", "java.util.Map<java.lang.String, java.lang.String>\n getFieldMap();", "public Map<String, Object[]> loadMarksheet(String filePath) {\n int keyCounter = 0;\n Map<String, Object[]> map = new TreeMap<String, Object[]>();\n\n try {\n FileInputStream fis = new FileInputStream(new File(filePath)); //can generate file not found \n try { //nesteed try\n\n// Workbook workbook = WorkbookFactory.create(fis);//new HSSFWorkbook(fis);\n Workbook workbook = new XSSFWorkbook(fis);\n // Sheet sheet = workbook.getSheetAt(0); //can generate sheet not available exception \n // HSSFSheet sheet = (HSSFSheet)workbook.getSheetAt(0);\n XSSFSheet sheet = (XSSFSheet) workbook.getSheetAt(0);\n LinkedList node = new LinkedList();\n\n for (Iterator<Row> row = sheet.rowIterator(); row.hasNext();) {\n XSSFRow r = (XSSFRow) row.next();\n// HSSFRow r =(HSSFRow) row.next();\n for (Iterator<Cell> cell = r.cellIterator(); cell.hasNext();) {\n // HSSFCell c = (HSSFCell)cell.next();\n XSSFCell c = (XSSFCell) cell.next();\n node.add(c.getRichStringCellValue());\n }//end of inner for each loop\n map.put(\"rec\" + keyCounter++, node.toArray());\n }//end of for loop \n }//end of nested try\n catch (Exception ex) { //nested catch block \n return null;\n }//end of the nested catch block ;\n\n }//end of the outter try block \n catch (Exception ex) {\n System.out.println(ex);\n }//end of the outer catch block \n return map;\n\n }", "private HashMap getTableRow(int rowNum)\r\n {\r\n HashMap hashRow = new HashMap() ;\r\n int colTotal = codeTableModel.getColumnCount()-1;\r\n for (int colCount=0; colCount <= codeTableModel.getColumnCount()-1; colCount++)\r\n { // for each column u will build a hashmap\r\n// if (colCount == 1 )\r\n// {//sponsor name is not in update sp.\r\n// continue;\r\n// }\r\n TableColumn column = codeTableColumnModel.getColumn(colCount) ;\r\n ColumnBean columnBean = (ColumnBean)column.getIdentifier() ;\r\n Object val = null ;\r\n // the whole idea of setting up the columnBean as the identifier is that u get to know\r\n // all abt the structure details of the column, so u can create appropriate type of object\r\n // and stick it in to the hashMap\r\n if (columnBean.getDataType().equals(\"NUMBER\"))\r\n {\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount) == null\r\n ||(codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).equals(\"\")))\r\n {\r\n val = null ; //new Integer(0)\r\n }\r\n else\r\n {\r\n val = codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount);\r\n if (val instanceof ComboBoxBean)\r\n {\r\n if (((ComboBoxBean)val).getCode().equals(\"\"))// user deleted selection\r\n val = null;\r\n else\r\n val = new Integer(((ComboBoxBean)val).getCode().toString());\r\n }\r\n else\r\n {\r\n val = new Integer(val.toString()) ;\r\n }\r\n }\r\n }\r\n\r\n if (columnBean.getDataType().equals(\"VARCHAR2\"))\r\n {\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount)==null)\r\n {\r\n val = \"\";\r\n }\r\n else\r\n {\r\n val = codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).toString() ;\r\n }\r\n }\r\n\r\n if (columnBean.getDataType().equals(\"DATE\"))\r\n {\r\n //coeusdev-568 start\r\n //Date today = new Date();\r\n //coeusdev-568 end\r\n if (codeTableModel.getValueAt(sorter.getIndexForRow(rowNum), codeTableModel.getColumnCount()-1).equals(\"I\")) // if itz an insert\r\n { //AV_ & AW_ will be the same for insert\r\n //coeusdev-568 start\r\n //val = new java.sql.Timestamp(today.getTime());\r\n val = CoeusUtils.getDBTimeStamp();\r\n //coeusdev-568 end\r\n }\r\n else\r\n { // for update\r\n // there will be only two dates in any table one AV_UPDATE_TIMESTAMP and the other one AW_UPDATE_TIMESTAMP\r\n if (columnBean.getQualifier().equals(\"VALUE\"))\r\n { //AV_...\r\n //coeusdev-568 start\r\n //val = new java.sql.Timestamp(today.getTime());\r\n val = CoeusUtils.getDBTimeStamp();\r\n //coeusdev-568 end\r\n }\r\n else\r\n { //AW_...\r\n val = java.sql.Timestamp.valueOf(codeTableModel.getValueAt(sorter.getIndexForRow(rowNum),colCount).toString()) ;\r\n }\r\n }\r\n }\r\n\r\n hashRow.put(columnBean.getColIdentifier(), val) ;\r\n } //end for\r\n return hashRow;\r\n }", "private TreeMap<String, double[]> readFlowInfo(XSSFSheet sheet) {\n\t\tIterator<Row> rowIterator = sheet.iterator();\n\t\t\n\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;\n\t\tTreeMap<String, double[]> treeMap = new TreeMap<String, double[]>();\n\n\t\twhile(rowIterator.hasNext()){\n\t\t\trow = rowIterator.next();\n\t\t\t//The composed key: [newID+type.firstLetter+hour]\n\t\t\tString key =Math.round(row.getCell(CELLMATCHKEY).getNumericCellValue())+\n\t\t\t\t\trow.getCell(CELLDAYTYPE).getStringCellValue().substring(0, 1)+\n\t\t\t\t\tMath.round(row.getCell(CELLHOUR).getNumericCellValue());\n\t\t\t//System.out.println(key);\n\t\t\tdouble[] values = new double[16];\n\t\t\t\n\t\t\tfor(int i=0;i<16;i++){\n\t\t\t\tvalues[i]=row.getCell(i+6).getNumericCellValue();\n\t\t\t}\n\t\t\t\n\t\t\ttreeMap.put(key,values);\n\t\t}\n\t\treturn treeMap;\n\t}", "private void readDataFromUserLog(HashMap<String,TransactionData> hmap , String filename){\n\t\t\n\t\tBufferedReader reader = null;\n\t\t\n\t\ttry{\n\t\t\treader = new BufferedReader(new FileReader(filename));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tString transaction = line.split(\",\")[1];\n\t\t\t/*\tString transactionKey = (transaction.length() > keyLength ) ?\n\t\t\t\t\t\ttransaction.substring(0,keyLength):\n\t\t\t\t\t\t\ttransaction;*/\n\t\t\t\tString transactionKey = formTransactionKey(transaction);\n\t\t\t\tdouble amount = Double.parseDouble(line.split(\",\")[2]);\n\t\t\t\tif(hmap.containsKey(transactionKey)){\n\t\t\t\t\tTransactionData d = hmap.get(transactionKey);\n\t\t\t\t\td.addAnotherOccurence(amount);\n\t\t\t\t\thmap.put(transactionKey,d );\n\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tchar type = identifyTheTransactions(transaction);\n\t\t\t\t\tTransactionData d =new TransactionData(transaction,amount,type);\n\t\t\t\t\thmap.put(transactionKey,d);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"Sorry!! File : \"+ filename +\" required for processing!!!\");\n\t\t\tSystem.out.println(\"\\n\\nPlease try again !!!\");\n\t\t\tSystem.exit(1);\n\t\t\t//e.printStackTrace();\n\t\t}\n\t\tfinally{\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public HashMap<String, String[]> convertToArray() throws IOException\n\t{\n\t HashMap<String, String[]> map = new HashMap<String, String[]>();\n\t String[] list;\n\t \n\t String line;\n\t BufferedReader reader;\n\t\t\n\t try {\n\t\t\treader = new BufferedReader(new FileReader(filePath));\n\t\t\t\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t {\n\t\t\t\tString key = line;\n\t\t\t\tString value = \"\";\n\t\t\t\tString tmp;\n\t\t\t\t\n\t\t\t\twhile(!(tmp=reader.readLine()).equals(\"$\"))\n\t\t\t\t{\t\n\t\t\t\t\tvalue = value+tmp; \n\t\t\t\t}\n\t\t\t\tString values = value.replaceAll(\"\\\"\", \"\");\n\t\t\t\t\n\t\t\t\tString[] parts = values.split(\",\");\n\t\t map.put(key, parts);\n\t\t }\n\t\t\t\n\t\t\t/*for (String key : map.keySet())\n\t\t {\n\t\t System.out.println(key);\n\t\t for(int i=0; i < map.get(key).length; i++)\n\t\t {\n\t\t \tSystem.out.println(map.get(key)[i]);\n\t\t }\n\t\t }*/\n\t\t\t\n\t\t reader.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t \n\t \n\t return map;\n\t}", "public void initFromRows(SimpleIterator<String> lines) {\n this.reset();\n int rowId = 0;\n Optional<String> lineOpt;\n Int2ObjectMap<IntArrayList> colsMap = new Int2ObjectOpenHashMap<>();\n int maxColId = -1;\n while (true) {\n lineOpt = lines.next();\n if (!lineOpt.isPresent()) {\n break;\n } else {\n String line = lineOpt.get().trim();\n if (!line.isEmpty()) {\n String[] tokens = line.split(\"\\\\s+\");\n int[] row = new int[tokens.length];\n for (int i = 0; i < tokens.length; i++) {\n int colId = Integer.parseInt(tokens[i]) - 1; // convert to 0-based\n if (colId < 0) {\n throw new RuntimeException(\n String.format(\n \"Column %d smaller than 1, in line number %d, line:'%s'\",\n colId + 1, rowId + 1, line\n )\n );\n }\n row[i] = colId;\n if (!colsMap.containsKey(colId)) {\n colsMap.put(colId, new IntArrayList());\n }\n colsMap.get(colId).add(rowId);\n if (colId > maxColId) {\n maxColId = colId;\n }\n }\n Arrays.sort(row);\n this.rows[rowId] = row;\n }\n rowId++;\n if (rowId > this.numRows) {\n throw new RuntimeException(\n \"More rows in input rows file than the expected \" + this.numRows\n );\n }\n }\n }\n if (maxColId > this.numCols) {\n this.numCols = maxColId + 1;\n this.cols = new IntSet[this.numCols];\n }\n for (int colId = 0; colId < this.numCols; colId++) {\n if (colsMap.containsKey(colId) && !colsMap.get(colId).isEmpty()) {\n this.cols[colId] = new IntOpenHashSet(colsMap.get(colId));\n } else {\n this.cols[colId] = new IntOpenHashSet();\n }\n }\n }", "private static String[][] getMap(String inputFile, String[][] Map) {\n\t\tFile text = new File(inputFile);\t\r\n\t\tint j = 0;\r\n\r\n\t\ttry {\r\n\t\t\tScanner s = new Scanner(text);\r\n\t\t\tString nex = s.nextLine();\r\n\t\t\t\r\n\t\t\twhile(s.hasNextLine())\r\n\t\t\t{\r\n\t\t\tnex = s.nextLine();\r\n\t\t\tfor (int i = 0; i < nex.length(); i++)\r\n\t\t\t{\r\n\t\t\t\tchar c = nex.charAt(i);\r\n\t\t\t\tString d = Character.toString(c);\r\n\t\t\t\tMap[j][i] = d;\t\r\n\t\t\t}\r\n\t\t\tj++;\r\n\t\t\t}\t\r\n\t\t\ts.close();\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t\treturn Map;\r\n}", "protected void parseHeader(String line){\n headerMap = new LinkedHashMap<>();\n String[] bits = line.split(delimiter);\n for (int i = 0; i < bits.length; i++){\n headerMap.put(bits[i], i);\n }\n }", "@Override\n public void convertValueToKey(Map row, Map condition) throws KkmyException {\n\n }", "@Override\n\tpublic Ticket mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\treturn ticketExtractor.extractData(rs);\n\t}", "private static List<HashMap<Short, String>> getBodyValuesMap(Document reportDocument) {\n List<HashMap<Short, String>> bodyValues = new ArrayList<HashMap<Short, String>>();\n Element reportElement = reportDocument.getDocumentElement();\n NodeList trElements = reportElement.getElementsByTagName(\"tr\");\n for (int i = 0; i < trElements.getLength(); i++) {\n NodeList tdElements = trElements.item(i).getChildNodes();\n HashMap<Short, String> bodyRowValues = new HashMap<Short, String>();\n for (int n = 0; n < tdElements.getLength(); n++) {\n if (tdElements.item(n).getNodeType() == Node.ELEMENT_NODE && tdElements.item(n).getNodeName().equals(\"td\")) {\n bodyRowValues.put((short) n, tdElements.item(n).getTextContent());\n }\n }\n if (bodyRowValues.size() > 0) {\n bodyValues.add(bodyRowValues);\n }\n }\n return bodyValues;\n }", "@Override\n\t\tpublic KhachHang mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\tKhachHang kh=new KhachHang();\n\t\t\tkh.setMaKH(rs.getString(1));\n\t\t\tkh.setAddress(rs.getString(2));\n\t\t\tkh.setName(rs.getString(3));\n\t\t\tkh.setPhoneNum(rs.getString(4));\n\t\t\treturn kh;\n\t\t}", "public String mapRow(ResultSet rs, int rowNum) throws SQLException {\n\t\t\t\tString column = rs.getString(1);\n\t\t\t\treturn column;\n\t\t\t}", "static Map.Entry<String, String> splitLine(String line) {\n // TODO: Make this method less gross!\n int count = 0;\n int cur = 0;\n do {\n cur = line.indexOf(' ', cur+1); // Move cursor to next space character.\n count++;\n } while (0 <= cur && count < 4);\n\n String key, value;\n if (0 <= cur && cur < line.length()) {\n // Don't include the separating space in either `key` or `value`:\n key = line.substring(0, cur); //\n value = line.substring(cur+1, line.length());\n } else {\n key = line;\n value = \"\";\n }\n\n return new Map.Entry<String, String>() {\n @Override public String getKey() {\n return key;\n }\n @Override public String getValue() {\n return value;\n }\n @Override public String setValue(String value) {\n throw new UnsupportedOperationException();\n }\n };\n }", "private TreeMap<String, double[]> readFactorsInfo(XSSFSheet sheet) {\n\t\tIterator<Row> rowIterator = sheet.iterator();\n\t\t\n\t\trowIterator.next();//Ignore the column names. We actually know it.\n\t\trowIterator.next();//Ignore second column\n\t\tRow row = null;\n\t\tTreeMap<String, double[]> treeMap = new TreeMap<String, double[]>();\n\n\t\twhile(rowIterator.hasNext()){\n\t\t\trow = rowIterator.next();\n\t\t\t//The composed key: [newID+type.firstLetter+hour]\n\t\t\tString key =row.getCell(CELL_POLLUTANT).getStringCellValue();\n\t\t\tSystem.out.println(key);\n\t\t\tdouble[] values = new double[30];\n\t\t\t\n\t\t\tfor(int i=0;i<30;i++){\n\t\t\t\tvalues[i]=row.getCell(i+1).getNumericCellValue();\n\t\t\t}\n\t\t\t\n\t\t\ttreeMap.put(key,values);\n\t\t}\n\t\treturn treeMap;\n\t}", "private HashMap<String, SubsetElement> LoadFile(String fileName) {\n final HashMap<String, SubsetElement> tempMap = new HashMap<String, SubsetElement>();\r\n try {\r\n final Scanner input = new Scanner(new File(fileName));\r\n String line = input.nextLine();\r\n final String[] headers = line.split(\"\\t\");\r\n\r\n Integer i = 1;\r\n while (input.hasNext()) {\r\n line = input.nextLine();\r\n final String[] values = line.split(\"\\t\");\r\n // if(values.length!=headers.length){\r\n // System.out.println(\"Missing values in data row \"+ i);\r\n // break;\r\n // }\r\n\r\n final SubsetElement element = new SubsetElement(headers,\r\n values, this.subsetIdName, this.conceptIdName);\r\n tempMap.put(element.getHash(), element);\r\n i++;\r\n }\r\n input.close();\r\n\r\n } catch (final FileNotFoundException e) {\r\n System.err.println(\"Unable to open and parse file \" + fileName);\r\n e.printStackTrace();\r\n }\r\n\r\n return tempMap;\r\n }", "public void readValuesfromtableWithoutHeadings()\n\t {\n\t\t open();\n\t\t List<Map<Object, String>> tab1= withColumns(\"Last Name \" ,\"First Name\",\"Email\", \"Due\" , \"Web Site\" , \"My Test\") \n\t\t\t\t .readRowsFrom(table);\n\t\t System.out.println(tab1);\n\t }", "public void mapHeader(){\r\n\t\tString header = readNextLine();\r\n\t\tif (header == null) return;\r\n\t\t\r\n\t\tString split[] = header.split(Constants.SPLIT_MARK);\r\n\t\tfor (int i=0; i < Constants.HEADER.length; i++){\r\n\t\t\tmapHeader.put(Constants.HEADER[i], Constants.UNKNOWN);\r\n\t\t\tfor (int j = 0; j < split.length; j++){\r\n\t\t\t\tif (Constants.HEADER[i].equals(split[j])){\r\n\t\t\t\t\tmapHeader.put(Constants.HEADER[i], j);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static HashMap<String, String> getTestDataSetMap_Column_String_Map(XLS_Reader xls, String testDataID) {\n\t\tHashMap<String, String> test_data_map = null;\n\t\tint start_row = 0;\n\t\tint total_rows = 0;\n\t\tString dataSheet = null;\n\t\tint keyColumnIndex=Integer.parseInt(CONFIG.getProperty(\"DataSheetKeyColumnIndex\"));\n\t\t\n\t\ttry {\n\n\t\t\tfinal int no_of_Sheets = xls.CountSheets();\n\t\t\tfor (int sheet = 0; sheet < no_of_Sheets; sheet++) {\n\t\t\t\tdataSheet = xls.GetSheetAtIndex(sheet);\n\n\t\t\t\tif (!xls.IsSheetExists(dataSheet)) {\n\t\t\t\t\txls = null;\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfinal int column_number = xls.getColumnIndex(dataSheet, testDataID);\n\n\t\t\t\tint rows = 0;\n\t\t\t\tif (column_number != -1)\n\t\t\t\t\trows = xls.GetRowCount(dataSheet);\n\n\t\t\t\ttotal_rows = total_rows + rows;\n\t\t\t\t// System.out.println(sheet);\n\t\t\t}\n\t\t\tObject[][] data = new Object[2][total_rows];\n\t\t\tfor (int sheet = 0; sheet < no_of_Sheets; sheet++) {\n\n\t\t\t\tdataSheet = xls.GetSheetAtIndex(sheet);\n\t\t\t\t// System.out.println(dataSheet);\n\n\t\t\t\tif (!xls.IsSheetExists(dataSheet)) {\n\t\t\t\t\txls = null;\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfinal int column_number = xls.getColumnIndex(dataSheet, testDataID);\n\n\t\t\t\tint rows = 0;\n\t\t\t\tif (column_number != -1) {\n\t\t\t\t\trows = xls.GetRowCount(dataSheet);\n\n\t\t\t\t\tint rownum;\n\t\t\t\t\tint c = 0;\n\t\t\t\t\tfor (rownum = start_row; rownum < (rows + start_row); rownum++) {\n\n\t\t\t\t\t\tdata[0][rownum] = xls.getCellData(dataSheet, c, keyColumnIndex);\n\t\t\t\t\t\tdata[1][rownum] = xls.getCellData(dataSheet, c, column_number);\n\t\t\t\t\t\t// System.out.println(\"Col \"+column_number);\n\t\t\t\t\t\tc++;\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"Col \"+rownum);\n\t\t\t\t\tstart_row = rownum;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} // sheet for loop\n\n\t\t\ttest_data_map = new HashMap<>();\n\n\t\t\tfor (int ic = 0; ic < total_rows; ic++) {\n\t\t\t\ttest_data_map.put(data[0][ic].toString().trim(), data[1][ic].toString().trim());\n\t\t\t}\n\t\t} catch (NullPointerException npe) {\n\t\t\tApp_logs.error(\"Data issue in > \"+dataSheet+\" < Sheet for Test Case > \"+testDataID+\" < . \");\n\t\t\tSystem.out.println(\"Data issue in > \"+dataSheet+\" < Sheet for Test Case > \"+testDataID+\" < . Unable to Populate data in to Structure . \");\n\t\t}\n\n\t\t// System.out.println(\"Hello\");\n\t\treturn test_data_map;\n\t}", "private static void parseInput(BufferedReader reader) {\n\t\tString line = \"\";\n\t\tField f;\n\t\ttry {\n\t\t\tline = reader.readLine();\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\twhile (line != null) {\n\t\t\tf = Field.parse(line);\n\t\t\tif (dimension < f.getCoords().getX()) {\n\t\t\t\tdimension = f.getCoords().getX();\n\t\t\t}\n\t\t\tmap.put(f.getCoords(), f);\n\t\t\ttry {\n\t\t\t\tline = reader.readLine();\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\n\t\t}\n\n\t}", "public static void readMap(Scanner scanner) {\n // getting the pair of nodes from the input until an empty line is found\n while (true) {\n // read the current line of input\n String line = scanner.nextLine();\n // break the loop when the line is empty\n if (line.equals(\"\")) {\n break;\n }\n readLine(line);\n }\n }", "public void readLine(String line) {\n\t\tif (line.length() < 32) {\n\t\t\twhile (line.length() < 32) {\n\t\t\t\tline += \"0\";\n\t\t\t}\n\t\t}\n\n\t\tint begin = 0;\n\t\tint end = 2;\n\n\t\t\n\t\tfor (int row = 0; row < 4; row++) {\n\t\t\tfor (int col = 0; col < 4; col++) {\n\t\t\t\t// int val = 0;\n\t\t\t\tString hexVal = line.substring(begin, end);\n\t\t\t\thexVal = \"0x\" + hexVal;\n\t\t\t\tchar val; \n\t\t\t\ttry {\n\t\t\t\t\tval = (char) Integer.decode(hexVal).intValue();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// System.out.println(\"Error: Key has non hex characters.\");\n\t\t\t\t\tthis.state = null;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tthis.state[row][col] = val;\n\t\t\t\tbegin += 2;\n\t\t\t\tend += 2;\n\t\t\t}\n\t\t}\n\t}", "private Map<String, String> findMetadata(InputStream table, String itemCode) throws IOException {\n\t\t\tfinal BufferedReader br = new BufferedReader(new InputStreamReader(table));\n\t\t\tfinal List<String> columnNames = Arrays.asList(br.readLine().split(\"\\t\"));\n\t\t\tfinal int codeIndex = columnNames.indexOf(CODE_COLUMN);\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\tString[] values = line.split(\"\\t\");\n\t\t\t\tif(values[codeIndex].equals(itemCode)) {\n\t\t\t\t\tfinal Map<String, String> metadata = new HashMap<String, String>();\n\t\t\t\t\tfor(int i = 0; i < columnNames.size(); ++i) {\n\t\t\t\t\t\tmetadata.put(columnNames.get(i), values[i]);\n\t\t\t\t\t}\n\t\t\t\t\treturn metadata;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn null;\n\t\t}", "Map<String, Object> idFromFlatRow(DataRow flatRow) {\n\n // TODO: should we also check for nulls in ID (and skip such rows) - this will\n // likely be an indicator of an outer join ... and considering SQLTemplate,\n // this is reasonable to expect...\n\n Map<String, Object> id = new TreeMap<>();\n for (int idIndex : idIndices) {\n Object value = flatRow.get(columns[idIndex].getDataRowKey());\n id.put(columns[idIndex].getName(), value);\n }\n\n return id;\n }", "public static Map<String, String> readMap() {\n\n\n // take resource from jar file (in the project they are in the \"target\" folder)\n InputStream playlist =\n PlaylistPrepare.class.getClassLoader()\n .getResourceAsStream(\"playlist.txt\");\n\n InputStreamReader reader = new InputStreamReader(playlist);\n BufferedReader br = new BufferedReader(reader);\n\n Map<String, String> map = new HashMap<>();\n\n try {\n String line;\n while ((line = br.readLine()) != null) {\n String[] split = line.split(\"¦\");\n// System.out.println(split[1] + \"; \" + split[2]);\n map.put(split[1], split[2]);\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n return map;\n }", "public static HashMap<String, Integer> readHashMap(Hessian2Input dis, Integer[] allInts) {\n int count;\n HashMap<String, Integer> tileMap = null;\n String[] keys;\n try {\n // TODO - The following read is necessary, but could be removed in a future version\n dis.readInt();//size = dis.readInt();\n count = dis.readInt();\n tileMap = new HashMap<String, Integer>(count);\n keys = new String[count];\n for (int i = 0; i < keys.length; i++) {\n keys[i] = dis.readString();\n }\n for (int i = 0; i < count; i++) {\n tileMap.put(keys[i], allInts[dis.readInt()]);\n }\n\n } catch (IOException e) {\n MessageGenerator.briefErrorAndExit(\"Error in readHashMap()\");\n }\n return tileMap;\n }", "private void readHeader(){ \n Set<Object> tmpAttr = headerFile.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n \n Object[][] dataArray = new Object[attributes.length][2];\n for (int ndx = 0; ndx < attributes.length; ndx++) {\n dataArray[ndx][0] = attributes[ndx];\n dataArray[ndx][1] = headerFile.get(attributes[ndx]);\n if (attributes[ndx].toString().equals(\"Description\"))\n Description = headerFile.get(attributes[ndx]);\n }\n data = dataArray;\n }", "public void map(ImmutableBytesWritable row, Result value, Context context) throws InterruptedException, IOException {\n\t\tKey tb1key = new Key(row);\n\t\tbyte[] v = value.getValue( Table1Record.COLUMN_FAMILY, Table1Record.ATTRIBUTE );\n\t\tTable1Value tb1value = new Table1Value( Bytes.toString(v) );\n\t\t\n\t\tcontext.write(new Text(tb1key.toString()), new Text(tb1value.toString()));\n\t}", "public static HashMap<Object, Object> getTestDataSetMap_Column(XLS_Reader xls, String testDataID) {\n\t\tHashMap<Object, Object> test_data_map = null;\n\t\tint start_row = 0;\n\t\tint total_rows = 0;\n\t\tString dataSheet = null;\n\t\tint keyColumnIndex=Integer.parseInt(CONFIG.getProperty(\"DataSheetKeyColumnIndex\"));\n\t\t\n\t\ttry {\n\n\t\t\tfinal int no_of_Sheets = xls.CountSheets();\n\t\t\tfor (int sheet = 0; sheet < no_of_Sheets; sheet++) {\n\t\t\t\tdataSheet = xls.GetSheetAtIndex(sheet);\n\n\t\t\t\tif (!xls.IsSheetExists(dataSheet)) {\n\t\t\t\t\txls = null;\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfinal int column_number = xls.getColumnIndex(dataSheet, testDataID);\n\n\t\t\t\tint rows = 0;\n\t\t\t\tif (column_number != -1)\n\t\t\t\t\trows = xls.GetRowCount(dataSheet);\n\n\t\t\t\ttotal_rows = total_rows + rows;\n\t\t\t\t// System.out.println(sheet);\n\t\t\t}\n\t\t\tObject[][] data = new Object[2][total_rows];\n\t\t\tfor (int sheet = 0; sheet < no_of_Sheets; sheet++) {\n\n\t\t\t\tdataSheet = xls.GetSheetAtIndex(sheet);\n\t\t\t\t// System.out.println(dataSheet);\n\n\t\t\t\tif (!xls.IsSheetExists(dataSheet)) {\n\t\t\t\t\txls = null;\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\n\t\t\t\tfinal int column_number = xls.getColumnIndex(dataSheet, testDataID);\n\n\t\t\t\tint rows = 0;\n\t\t\t\tif (column_number != -1) {\n\t\t\t\t\trows = xls.GetRowCount(dataSheet);\n\n\t\t\t\t\tint rownum;\n\t\t\t\t\tint c = 0;\n\t\t\t\t\tfor (rownum = start_row; rownum < (rows + start_row); rownum++) {\n\n\t\t\t\t\t\tdata[0][rownum] = xls.getCellData(dataSheet, c, keyColumnIndex);\n\t\t\t\t\t\tdata[1][rownum] = xls.getCellData(dataSheet, c, column_number);\n\t\t\t\t\t\t// if(c == 53)\n\t\t\t\t\t\t// System.out.println(\"Row \"+c);\n\t\t\t\t\t\t// System.out.println(\"Col \"+column_number);\n\t\t\t\t\t\tc++;\n\t\t\t\t\t}\n\t\t\t\t\t// System.out.println(\"Col \"+rownum);\n\t\t\t\t\tstart_row = rownum;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} // sheet for loop\n\n\t\t\ttest_data_map = new HashMap<>();\n\n\t\t\tfor (int ic = 0; ic < total_rows; ic++) {\n\t\t\t\ttest_data_map.put(data[0][ic].toString().trim(), data[1][ic].toString().trim());\n\t\t\t}\n\t\t} catch (Throwable npe) {\n\t\t\tApp_logs.error(\"Data issue in > \"+dataSheet+\" < Sheet for Test Case > \"+testDataID+\" < . \");\n\t\t\tSystem.out.println(\"Data issue in > \"+dataSheet+\" < Sheet for Test Case > \"+testDataID+\" < . Unable to Populate data in to Structure . \");\n\t\t\tthrow new NullPointerException();\n\t\t}\n\n\t\t// System.out.println(\"Hello\");\n\t\treturn test_data_map;\n\t}", "private String addFieldValuesToRow(String row, MapWritable mapw, String columnName) {\n Object valueObj = (Object) mapw.get(new Text(columnName));\n row += valueObj.toString() + \"|\";\n return row;\n }", "public static Map<Integer, Map<Integer, Object>> readSheetContent(File excelFile, int sheetIndex) throws IOException {\n\n Workbook workbook = WorkbookFactory.create(excelFile);\n\n Sheet sheet = workbook.getSheetAt(sheetIndex);\n\n Map<Integer, Map<Integer, Object>> sheetMap = new HashMap<>();\n\n for (Row row : sheet) {\n\n Map<Integer, Object> rowMap = new HashMap<>(row.getPhysicalNumberOfCells());\n sheetMap.put(row.getRowNum(), rowMap);\n\n for (Cell cell : row) {\n\n Object val;\n switch (cell.getCellType()) {\n case STRING:\n val = cell.getStringCellValue();\n break;\n case NUMERIC:\n if (DateUtil.isCellDateFormatted(cell)) {\n val = cell.getDateCellValue();\n } else {\n val = cell.getNumericCellValue();\n }\n break;\n case BOOLEAN:\n val = cell.getBooleanCellValue();\n break;\n case FORMULA:\n val = cell.getCellFormula();\n break;\n case BLANK:\n val = \"\";\n break;\n // case _NONE:break;\n // case ERROR:break;\n default:\n val = null;\n }\n\n rowMap.put(cell.getColumnIndex(), val);\n }\n }\n\n return sheetMap;\n }", "void parseWritable(final DataInputStream in) throws IOException {\n // First clear the map. Otherwise we will just accumulate entries every time this method is called.\n this.map.clear();\n // Read the number of entries in the map\n int entries = in.readInt();\n // Then read each key/value pair\n for (int i = 0; i < entries; i++) {\n byte[] key = Bytes.readByteArray(in);\n // We used to read a byte that encoded the class type. Read and ignore it because it is always byte [] in hfile\n in.readByte();\n byte[] value = Bytes.readByteArray(in);\n this.map.put(key, value);\n }\n }", "private Map createSpecimenArrayMap(SpecimenArrayForm specimenArrayForm)\r\n\t{\r\n\t\tfinal Map arrayContentMap = new HashMap();\r\n\t\tString value = \"\";\r\n\t\tfinal int rowCount = specimenArrayForm.getOneDimensionCapacity();\r\n\t\tfinal int columnCount = specimenArrayForm.getTwoDimensionCapacity();\r\n\r\n\t\tfor (int i = 0; i < rowCount; i++)\r\n\t\t{\r\n\t\t\tfor (int j = 0; j < columnCount; j++)\r\n\t\t\t{\r\n\t\t\t\tfor (int k = 0; k < AppletConstants.ARRAY_CONTENT_ATTRIBUTE_NAMES.length; k++)\r\n\t\t\t\t{\r\n\t\t\t\t\tvalue = \"\";\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_ONE_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(i + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (k == AppletConstants.ARRAY_CONTENT_ATTR_POS_DIM_TWO_INDEX)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvalue = String.valueOf(j + 1);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tarrayContentMap.put(SpecimenArrayAppletUtil\r\n\t\t\t\t\t\t\t.getArrayMapKey(i, j, columnCount, k), value);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn arrayContentMap;\r\n\t}", "public static Map readRecords() throws ClassNotFoundException, IOException {\n\t\tMap map = null;\n\t\ttry{\n\t\t\twhile(true) {\n\t\t\t\tmap = (Map) input.readObject();\n\t\t\t\treturn map;\n\t\t\t}\n\t\t} catch(EOFException e) {\n\t\t\tSystem.err.println(\"Error: Reached end of file prematurely. File may be corrupted.\");\n\t\t\tthrow e;\n\t\t} catch(ClassNotFoundException e) {\n\t\t\tSystem.err.println(\"Error: Class 'map' not found. Unable to create object.\");\n\t\t\tthrow e;\n\t\t} catch(IOException e) {\n\t\t\tSystem.err.println(\"Error: Unable to read map from file.\");\n\t\t\tthrow e;\n\t\t}\n\t}", "<R> ProcessOperation<R> map(RowMapper<R> rowMapper);", "public static long getRowSizeBytes(Map<String, Object> rowMap){\r\n\t\tlong bytesUsed = 0;\r\n\t\tIterator it = rowMap.values().iterator();\r\n\t\twhile(it.hasNext()){\r\n\t\t\tObject value = it.next();\r\n\t\t\tif(value == null) continue;\r\n\t\t\tif(value instanceof String){\r\n\t\t\t\tString sValue = (String) value;\r\n\t\t\t\tbytesUsed += sValue.length()*BYTES_PER_CHAR;\r\n\t\t\t}else if(value instanceof Long){\r\n\t\t\t\tbytesUsed += BYTES_PER_LONG;\r\n\t\t\t}else if(value instanceof Integer){\r\n\t\t\t\tbytesUsed += BYTES_PER_INTEGER;\r\n\t\t\t}else if(value instanceof Double){\r\n\t\t\t\tbytesUsed += BYTES_PER_DOUBLE;\r\n\t\t\t}else if(value instanceof byte[]){\r\n\t\t\t\tbyte[] bytes = (byte[]) value;\r\n\t\t\t\tbytesUsed += bytes.length;\r\n\t\t\t}else{\r\n\t\t\t\tthrow new IllegalArgumentException(\"Unknown value type: \"+value.getClass().getName());\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn bytesUsed;\r\n\t}", "public static Map<Integer, List<GeoDBSlipRateRecord>> readGeoDB(Reader reader) throws IOException {\n\t\tif (!(reader instanceof BufferedReader))\n\t\t\treader = new BufferedReader(reader);\n\t\tMap<Integer, List<GeoDBSlipRateRecord>> ret = new HashMap<>();\n\t\t\n\t\tFeatureCollection features = FeatureCollection.read(reader);\n\t\t\n\t\tfor (Feature feature : features.features) {\n\t\t\tGeoDBSlipRateRecord record = new GeoDBSlipRateRecord(feature);\n\t\t\tList<GeoDBSlipRateRecord> faultRecords = ret.get(record.faultID);\n\t\t\tif (faultRecords == null) {\n\t\t\t\tfaultRecords = new ArrayList<>();\n\t\t\t\tret.put(record.faultID, faultRecords);\n\t\t\t}\n\t\t\tfaultRecords.add(record);\n\t\t}\n\t\treader.close();\n\t\treturn ret;\n\t}", "public static <V extends Parcelable> Map<String, V> readMap(Parcel in,\n Class<? extends V> type) {\n\n Map<String, V> map = new HashMap<String, V>();\n if (in != null) {\n String[] keys = in.createStringArray();\n Bundle bundle = in.readBundle(type.getClassLoader());\n for (String key : keys)\n map.put(key, type.cast(bundle.getParcelable(key)));\n }\n return map;\n }", "public static HashMap<String, Investor> readInvestorInfoFile(String fileName)\n\t\t\tthrows InvalidFileFormatException, IOException {\n\t\tFile csvFile = new File(fileName);\n\t\t// read the file only if it exists\n\t\tif (csvFile.isFile()) {\n\t\t\t// the row in the csv file\n\t\t\tString row = null;\n\t\t\tint indexRow = 0;\n\t\t\t// create BufferedReader and read data from csv\n\t\t\tBufferedReader csvReader = new BufferedReader(new FileReader(fileName));\n\t\t\ttry {\n\t\t\t\t// read the rest of the lines\n\t\t\t\tHashMap<String, Investor> tableInvestorInfo = new HashMap<String, Investor>();\n\t\t\t\twhile ((row = csvReader.readLine()) != null) {\n\t\t\t\t\tString[] data = row.split(\",\");\n\n\t\t\t\t\t// check the header at the first line (header)\n\t\t\t\t\tif (indexRow == 0) {\n\t\t\t\t\t\t// check if the column names\n\t\t\t\t\t\tif (!(data[0].equals(\"name\") && data[1].equals(\"targetRatio\"))) {\n\t\t\t\t\t\t\tthrow new InvalidFileFormatException(\n\t\t\t\t\t\t\t\t\t\"The column names of the file is invalid.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tindexRow++;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// for the rest of the rows\n\t\t\t\t\t// - create the transaction node for each row\n\t\t\t\t\tString name = data[0];\n\t\t\t\t\tdouble targetRatio = Double.valueOf(data[1]);\n\n\t\t\t\t\t// add the row data to the hash table\n\t\t\t\t\tInvestor investorInfo = new Investor(name, targetRatio);\n\t\t\t\t\ttableInvestorInfo.put(name, investorInfo);\n\t\t\t\t\tindexRow++;\n\t\t\t\t}\n\t\t\t\t// return the table\n\t\t\t\treturn tableInvestorInfo;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tthrow new IOException(\"IO Exception occured while reading the file at line \"\n\t\t\t\t\t\t+ String.valueOf(indexRow) + \" in: \" + fileName);\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tthrow new InvalidFileFormatException(\n\t\t\t\t\t\t\"The format of the file at line \" + String.valueOf(indexRow)\n\t\t\t\t\t\t\t\t+ \" is invalid,i.e.,\" + row + \" in: \" + fileName);\n\t\t\t} finally {\n\t\t\t\t// close the reader\n\t\t\t\tcsvReader.close();\n\t\t\t}\n\t\t} else\n\n\t\t{\n\t\t\tthrow new FileNotFoundException(\n\t\t\t\t\t\"The file you attempted to read does not exist or is not a valid file: \"\n\t\t\t\t\t\t\t+ fileName);\n\t\t}\n\t}", "private static void insertRow(HTable htable, byte[] rowKey, byte[] family, Map<byte[], byte[]> qualifierValueMap)\n throws IOException {\n Put put = new Put(rowKey);\n for (Map.Entry<byte[], byte[]> entry : qualifierValueMap.entrySet()) {\n int key = Bytes.toInt(entry.getKey());\n int value = Bytes.toInt(entry.getValue());\n//System.out.println(\"In Map, the key = \"+key+\", the value = \"+value);\n put.add(family, entry.getKey(), entry.getValue());\n }\n for (Map.Entry<byte[], List<KeyValue>> entry : (Set<Map.Entry<byte[], List<KeyValue>>>) put.getFamilyMap().entrySet()) {\n byte[] keyBytes = entry.getKey();\n String familyString = Bytes.toString(keyBytes);\n//System.out.println(\"Family: \"+familyString+\"\\n\");\n List<KeyValue> list = entry.getValue();\n for (KeyValue kv : list) {\n byte[] kkk = kv.getQualifier();\n byte[] vvv = kv.getValue();\n int index = Bytes.toInt(kkk);\n int fid = Bytes.toInt(vvv);\n//System.out.println(\" (\"+index+\"th FID) = \"+fid);\n }\n }\n htable.put(put);\n }", "public HashMap<Integer, String> executeToMap(String query) {\n \t// Create a connection which is used to store info about our connection\n Connection con = null;\n \n //create a local map will be returned later\n HashMap<Integer, String> map = new HashMap<>();\n \n // Statement is used to execute a SQL query\n Statement stmt = null;\n \n // Resultset is the set of info we get back from running our query\n ResultSet rs = null;\n String SQL = query; \n \n\n try {\n // try to import the external driver\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\n // try to establish a connection using the connectionUrl variable\n con = DriverManager.getConnection(connectionUrl);\n\n //prepare a new statement\n stmt = con.createStatement();\n //Provide the statement with a query and execute this\n //this will return a resultSet which we will save to rs\n rs = stmt.executeQuery(SQL);\n \n //As long as there are rows in our ResultSet we want to step through them\n //adding each row their id and string to our map;\n while (rs.next()) {\n \tmap.put(rs.getInt(1), rs.getString(2));\n }\n\n }\n\n // Handle any errors that may have occurred.\n catch (Exception e) {\n e.printStackTrace();\n }\n //when we are done with our actions we should close the connection\n finally {\n if (rs != null) try {\n \trs.close();\n \t} catch(Exception e) {}\n if (stmt != null) try { stmt.close(); } catch(Exception e) {}\n if (con != null) try { con.close(); } catch(Exception e) {}\n }\n //return the map\n return map;\n }", "public RowMapperSheetExtractor(RowMapper<T> rowMapper) {\n\t\tthis.rowMapper = rowMapper;\n\t}", "void readMap()\n {\n try {\n FileReader\t\tmapFile = new FileReader(file);\n StringBuffer\tbuf = new StringBuffer();\n int\t\t\t\tread;\n boolean\t\t\tdone = false;\n \n while (!done)\n {\n read = mapFile.read();\n if (read == -1)\n done = true;\n else\n buf.append((char) read);\n }\n \n mapFile.close();\n \n parseMap(buf.toString());\n \n } catch (Exception e) {\n ErrorHandler.displayError(\"Could not read the map file data.\", ErrorHandler.ERR_OPEN_FAIL);\n }\n }" ]
[ "0.6537413", "0.6490584", "0.64349186", "0.63174427", "0.6234222", "0.622434", "0.60469985", "0.5879434", "0.5866978", "0.56689394", "0.56687677", "0.5668398", "0.5658922", "0.56563103", "0.5651165", "0.5582928", "0.5551616", "0.55259174", "0.5514595", "0.54883033", "0.5475337", "0.5432157", "0.5430798", "0.5393106", "0.5391241", "0.5385174", "0.5363796", "0.53634465", "0.53549093", "0.53347576", "0.5326792", "0.53249586", "0.5320469", "0.5304505", "0.5295271", "0.52884537", "0.52549016", "0.5251635", "0.5245539", "0.52142316", "0.5195729", "0.5187949", "0.51855636", "0.5155228", "0.5126685", "0.51238835", "0.5106748", "0.5103644", "0.50850534", "0.5068154", "0.5064659", "0.5056691", "0.505401", "0.5047844", "0.50305295", "0.5029511", "0.50210506", "0.50096375", "0.50087076", "0.50025827", "0.4966529", "0.4962203", "0.49589944", "0.49571165", "0.49560377", "0.49456072", "0.49320182", "0.4930098", "0.49029377", "0.48994857", "0.48961705", "0.48903078", "0.4886995", "0.4877183", "0.48760635", "0.48724", "0.48684844", "0.48601037", "0.48576847", "0.4855876", "0.48473868", "0.484648", "0.48368654", "0.4829956", "0.4822318", "0.48186257", "0.4803556", "0.47891748", "0.47880238", "0.4784547", "0.47807965", "0.47792378", "0.47742838", "0.47713932", "0.47708714", "0.47708023", "0.47658214", "0.475769", "0.4746877", "0.4746433" ]
0.69958067
0
/ Possible exceptions? Inner org.hibernate.exception.ConstraintViolationException Outer org.springframework.dao.DataIntegrityConstraintViolationException Inner java.lang.IllegalStateException Outer org.springframework.transaction.CannotCreateTransactionException I think the parent of the ones I want is: org.springframework.dao.DataAccessException The parent of that is: org.springframework.core.NestedRuntimeException
private void processDeptsAndCollections(Map<String, String> row, Map<String, Dept> deptsAdded, Map<String, Collection> collectionsAdded) { String deptName = sanitizeString(row.get(departmentHeading)); String collName = sanitizeString(row.get(collectionHeading)); //if (deptName.isEmpty()) { // // Don't add anything if the department field was empty // return; //} Dept dept; Collection coll; if (failedDeptAttempts >= maxDeptAttempts) { throw new RuntimeException("Aborting: too many failed attempts to add Departments"); } if (failedCollAttempts >= maxCollAttempts) { throw new RuntimeException("Aborting: too many failed attempts to add Collections"); } //System.out.println(deptsAdded.get(deptName)); if (deptsAdded.get(deptName) == null) { dept = new Dept(); // id is auto-generated dept.setName(deptName); try { deptRepo.saveAndFlush(dept); deptsAdded.put(deptName, dept); } catch (Exception exception) { System.out.println("Skipped Dept: duplicate or malformed entry"); System.out.println(exception.toString()); failedDeptAttempts++; } } // How to handle null deptsAdded.get(deptName)? if (collectionsAdded.get(collName) == null) { coll = new Collection(); // id is auto-generated coll.setName(collName); coll.setDept(deptsAdded.get(deptName)); try { collectionRepo.saveAndFlush(coll); collectionsAdded.put(collName, coll); } catch (Exception exception) { System.out.println("Skipped Collection: duplicate or malformed entry, or missing Dept"); System.out.println(exception.toString()); failedCollAttempts++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n /**\n * Do not allow delete of record in parent table that will cause orphan records in child tables of the database.\n */\n void dataIntegrityViolationExceptionThrownWhenDelete() {\n }", "@Test(expected = DataAcessException.class)\n\t public void testUpdateExcep() throws DataAcessException{\n\t\tUsers user = BaseData.getUsers();\n\t\twhen(entityManager.merge(user)).thenThrow(new RuntimeException());\n\t\tuserDao.update(user);\n\t }", "@Test\n void testErrorValidation() {\n jdbcTemplate.execute(\"update obligor set name = null where id = '25410'\");\n assertThatThrownBy(() -> obligorJpaService.findObligorById(25410)).isInstanceOf(ConstraintViolationException.class)\n .hasMessageContaining(\"findObligorById.<return value>.name:\");\n }", "@Test(expected = DataAcessException.class)\n\t public void testSaveExcep() throws DataAcessException{\n\t \tUsers user = BaseData.getUsers();\n\t\tdoThrow(RuntimeException.class).when(entityManager).persist(user);\n\t\tuserDao.save(user);\n\t }", "@Test(expectedExceptions = DataAccessLayerException.class)\n void updateThrowsTest() {\n reservation1.setId(85L);\n Mockito.doThrow(IllegalArgumentException.class).when(reservationDao).update(Mockito.any(Reservation.class));\n reservationService.update(reservation1);\n }", "private void handleJdbcDataAccessException(org.springframework.dao.DataAccessException dae)\n throws DataAccessException {\n log.error(\"Jdbc Data access exception occurred: \" + dae.getRootCause().getMessage());\n dae.printStackTrace();\n throw dae;\n }", "private void manejaExcepcion(HibernateException he) throws HibernateException\r\n\t{\n\t tx.rollback();\r\n\t throw new HibernateException(\"Ocurrió un error en la capa de acceso a datos\", he);\r\n\t}", "@Test(expected = DataAcessException.class)\n\t public void testUpdateAllExcep() throws DataAcessException{\n\t\tUsers user = BaseData.getUsers();\n\t\twhen(entityManager.merge(user)).thenThrow(new RuntimeException());\n\t\t List<Users> users = new ArrayList<Users>();\n\t\t users.add( BaseData.getUsers());\n\t\t\tusers.add(BaseData.getDBUsers());\n\t\tuserDao.update(users);\n\t }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n/* 62: */ public void guardar(Reporteador reporteador)\r\n/* 63: */ throws ExcepcionAS2Financiero, ExcepcionAS2, AS2Exception\r\n/* 64: */ {\r\n/* 65: */ try\r\n/* 66: */ {\r\n/* 67: 91 */ boolean indicadorNuevo = reporteador.getId() == 0;\r\n/* 68: 93 */ if (indicadorNuevo) {\r\n/* 69: 94 */ this.reporteadorDao.guardar(reporteador);\r\n/* 70: */ }\r\n/* 71: 96 */ for (DetalleReporteadorVariable detalle : reporteador.getListaDetalleReporteadorVariable()) {\r\n/* 72: 97 */ this.detalleReporteadorVariableDao.guardar(detalle);\r\n/* 73: */ }\r\n/* 74: 99 */ guardarDetallesReporteador(reporteador, null);\r\n/* 75:100 */ if (!indicadorNuevo) {\r\n/* 76:101 */ this.reporteadorDao.guardar(reporteador);\r\n/* 77: */ }\r\n/* 78: */ }\r\n/* 79: */ catch (AS2Exception e)\r\n/* 80: */ {\r\n/* 81:104 */ this.context.setRollbackOnly();\r\n/* 82:105 */ throw e;\r\n/* 83: */ }\r\n/* 84: */ catch (Exception e)\r\n/* 85: */ {\r\n/* 86:107 */ e.printStackTrace();\r\n/* 87:108 */ this.context.setRollbackOnly();\r\n/* 88:109 */ throw new AS2Exception(e.getMessage());\r\n/* 89: */ }\r\n/* 90: */ }", "@Transactional\npublic interface OpinionDao extends CrudRepository< Opinion, OpinionPK> {\n}", "@Test(expectedExceptions = DataAccessLayerException.class)\n void createThrows2Test() {\n Mockito.doThrow(IllegalArgumentException.class).when(reservationDao).create(reservation2);\n reservationService.create(reservation2);\n }", "public int orderCountByUser(int userId)throws ApplicationEXContainer.ApplicationCanNotChangeException{\n int count;\n try(Connection connection = MySQLDAOFactory.getConnection();\n AutoRollback autoRollback = new AutoRollback(connection)){\n count = orderDao.orderCountByUser(connection,userId);\n autoRollback.commit();\n } catch (SQLException | NamingException | DBException throwables) {\n LOGGER.error(throwables.getMessage());\n throw new ApplicationEXContainer.ApplicationCanNotChangeException(throwables.getMessage(),throwables);\n }\n return count;\n}", "@Transactional\npublic interface PredecessorReleaseMapDAO extends\n CrudRepository<PredecessorReleaseMap, Long> {\n\n\n}", "public DAO rollback() throws IllegalStateException\r\n\t{\r\n\t\treturn rollback(false);\r\n\t}", "public User insert(User user) throws DataAccessException;", "@Test(expected = DataAcessException.class)\n\t public void testSaveAllExcep() throws DataAcessException{\n\t \tUsers user = BaseData.getUsers();\n\t\tdoThrow(RuntimeException.class).when(entityManager).persist(user);\n\t\t List<Users> users = new ArrayList<Users>();\n\t\t users.add( BaseData.getUsers());\n\t\t\tusers.add(BaseData.getDBUsers());\n\t\tuserDao.save(users);\n\t }", "@Transactional\npublic interface ProjectStageActionMovementRepository extends JpaRepository<ProjectStageActionMovement,Long> {\n}", "public DataAccessException translateExceptionIfPossible(RuntimeException ex) {\n\t\tif (ex instanceof HibernateException) {\n\t\t\treturn convertHibernateAccessException((HibernateException) ex);\n\t\t}\n\t\treturn null;\n\t}", "public DataAccessException(Throwable exception) {\n super(exception);\n }", "@Test(expected = DataAcessException.class)\n\t public void testRetrieveByIdExcep() throws DataAcessException {\n\t\twhen(entityManager.find(Users.class,\"A1007483\")).thenThrow(new RuntimeException());\n\t\tuserDao.retrieveById(\"A1007483\");\n\t }", "public void testupdateAddresses_PersistenceException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").updateAddresses(new Address[]{address}, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n/* 160: */ private void eliminarDetallesReporteador(Reporteador reporteador, DetalleReporteador detalleReporteadorPadre)\r\n/* 161: */ throws AS2Exception\r\n/* 162: */ {\r\n/* 163: */ try\r\n/* 164: */ {\r\n/* 165:181 */ List<DetalleReporteador> listaDetalleReporteador = null;\r\n/* 166:182 */ if (detalleReporteadorPadre == null) {\r\n/* 167:183 */ listaDetalleReporteador = reporteador.getListaDetalleReporteador();\r\n/* 168: */ } else {\r\n/* 169:185 */ listaDetalleReporteador = detalleReporteadorPadre.getListaDetalleReporteadorHijo();\r\n/* 170: */ }\r\n/* 171:189 */ for (DetalleReporteador detalleReporteador : listaDetalleReporteador) {\r\n/* 172:190 */ eliminarDetallesReporteador(reporteador, detalleReporteador);\r\n/* 173: */ }\r\n/* 174:194 */ if ((detalleReporteadorPadre != null) && (detalleReporteadorPadre.getId() != 0)) {\r\n/* 175:195 */ this.detalleReporteadorDao.eliminar(detalleReporteadorPadre);\r\n/* 176: */ }\r\n/* 177: */ }\r\n/* 178: */ catch (AS2Exception e)\r\n/* 179: */ {\r\n/* 180:198 */ this.context.setRollbackOnly();\r\n/* 181:199 */ throw e;\r\n/* 182: */ }\r\n/* 183: */ catch (Exception e)\r\n/* 184: */ {\r\n/* 185:201 */ e.printStackTrace();\r\n/* 186:202 */ this.context.setRollbackOnly();\r\n/* 187:203 */ throw new AS2Exception(e.getMessage());\r\n/* 188: */ }\r\n/* 189: */ }", "public void testupdateAddress_PersistenceException() throws Exception {\r\n try {\r\n Address address = this.getAddress();\r\n address.setCreationDate(new Date());\r\n address.setId(1);\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").updateAddress(address, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Test(expectedExceptions = DataAccessLayerException.class)\n void createThrowsTest() {\n Mockito.doThrow(IllegalArgumentException.class).when(reservationDao).create(reservation2);\n reservationService.create(reservation2);\n }", "@Transactional\n DataRistorante insert(DataRistorante risto);", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n/* 93: */ private void guardarDetallesReporteador(Reporteador reporteador, DetalleReporteador detalleReporteadorPadre)\r\n/* 94: */ throws AS2Exception\r\n/* 95: */ {\r\n/* 96: */ try\r\n/* 97: */ {\r\n/* 98:116 */ boolean indicadorEliminar = (detalleReporteadorPadre != null) && (detalleReporteadorPadre.isEliminado());\r\n/* 99:118 */ if (indicadorEliminar)\r\n/* 100: */ {\r\n/* 101:119 */ eliminarDetallesReporteador(reporteador, detalleReporteadorPadre);\r\n/* 102: */ }\r\n/* 103: */ else\r\n/* 104: */ {\r\n/* 105:122 */ List<DetalleReporteador> listaDetalleReporteador = null;\r\n/* 106:123 */ if (detalleReporteadorPadre == null) {\r\n/* 107:124 */ listaDetalleReporteador = reporteador.getListaDetalleReporteador();\r\n/* 108: */ } else {\r\n/* 109:126 */ listaDetalleReporteador = detalleReporteadorPadre.getListaDetalleReporteadorHijo();\r\n/* 110: */ }\r\n/* 111:130 */ if (detalleReporteadorPadre != null) {\r\n/* 112:131 */ this.detalleReporteadorDao.guardar(detalleReporteadorPadre);\r\n/* 113: */ }\r\n/* 114:135 */ for (DetalleReporteador detalleReporteador : listaDetalleReporteador) {\r\n/* 115:136 */ guardarDetallesReporteador(reporteador, detalleReporteador);\r\n/* 116: */ }\r\n/* 117: */ }\r\n/* 118: */ }\r\n/* 119: */ catch (AS2Exception e)\r\n/* 120: */ {\r\n/* 121:140 */ this.context.setRollbackOnly();\r\n/* 122:141 */ throw e;\r\n/* 123: */ }\r\n/* 124: */ catch (Exception e)\r\n/* 125: */ {\r\n/* 126:143 */ e.printStackTrace();\r\n/* 127:144 */ this.context.setRollbackOnly();\r\n/* 128:145 */ throw new AS2Exception(e.getMessage());\r\n/* 129: */ }\r\n/* 130: */ }", "@Test(expected = DataAcessException.class)\n\t public void testDeleteEntityExcep() throws DataAcessException {\n\t\t\tUsers user = BaseData.getUsers();\n\t\t\tdoThrow(RuntimeException.class).when(entityManager).remove(entityManager.getReference(Users.class,\n\t \t \t\tuser.getLoginName()));\n\t\t\tuserDao.delete(user.getLoginName(),user);\n\t}", "private void addHibernateConstraintViolationExceptionMapper() {\n if (ClassUtils.existsClass(\"org.hibernate.exception.ConstraintViolationException\")) {\n ExceptionUtil.wrapCatchedExceptions(new Callable<Object>() {\n\n @Override\n public Object call() throws Exception {\n Class<?> mapperClass = Class.forName(\"io.crnk.data.jpa.internal.HibernateConstraintViolationExceptionMapper\");\n Constructor<?> constructor = mapperClass.getConstructor();\n ExceptionMapper<?> mapper = (ExceptionMapper<?>) constructor.newInstance();\n context.addExceptionMapper(mapper);\n return null;\n }\n });\n }\n }", "@Transactional\npublic interface TxExabiscompetencesCrosssubjectDAO extends CrudRepository<TxExabiscompetencesCrosssubject, Long> {\n}", "@Override\r\n\tpublic void validateIntegrityConstraint() {\n\t\tvalidatorEngine.validate(entity);\r\n\t}", "@Test(expectedExceptions = DataAccessLayerException.class)\n void findAllThrowsTest() {\n Mockito.when(reservationDao.findAll()).thenThrow(IllegalArgumentException.class);\n reservationService.findAll();\n }", "@Transactional\npublic interface ProjectStageMovementRepository extends JpaRepository<ProjectStageMovement, Long> {\n}", "@Override\n public void rollbackTx() {\n \n }", "protected DataAccessException convertHibernateAccessException(HibernateException ex) {\n\t\tif (this.jdbcExceptionTranslator != null && ex instanceof JDBCException) {\n\t\t\tJDBCException jdbcEx = (JDBCException) ex;\n\t\t\treturn this.jdbcExceptionTranslator.translate(\n\t\t\t\t\t\"Hibernate operation: \" + jdbcEx.getMessage(), jdbcEx.getSQL(), jdbcEx.getSQLException());\n\t\t}\n\t\treturn SessionFactoryUtils.convertHibernateAccessException(ex);\n\t}", "@Transactional(propagation=Propagation.REQUIRES_NEW)\r\n\tpublic void createError(){\r\n\t\tOrder newOrder = new Order( );\r\n\t\tnewOrder.setDescription(\"Service layer added \"+Calendar.getInstance().getTime());\r\n\t\tspringOrderDao.errorSave(newOrder);\r\n\t}", "void insertBooking(detailDTO detail) throws DataAccessException;", "void insertConfirm(bookingDTO booking) throws DataAccessException;", "@Transactional(rollbackOn = Exception.class)\n @Override\n public BaseResponse addTransMedical(TransactionMedicalDTO transMedicalDTO, String doctorName) {\n Doctor doctor = doctorRepository.findByAccount_Username(doctorName);\n if (doctor == null) {\n return new NotFoundResponse(\"Không tìm thấy thông tin bác sĩ\");\n }\n Optional<ProcessOfTreatment> ofTreatment = processOfTreatmentRepository.findById(transMedicalDTO.getPotId());\n if (!ofTreatment.isPresent()) {\n return new NotFoundResponse(\"Không tìm thấy thông tin giao dịch khám của bệnh nhân!\");\n }\n\n List<Notify> notifies = new ArrayList<>();\n Patient patient = ofTreatment.get().getPatientPot();\n TransactionMedical transactionMedical = TransactionMedical.builder()\n .createDate(new Date())\n .doctor(doctor)\n .status(0)\n .processOfTreatment(ofTreatment.get())\n .patient(patient).build();\n List<TransactionMedicalDetail> details = new ArrayList<>();\n for (Integer i : transMedicalDTO.getItemOfDepts()) {\n Optional<ItemOfDept> item = iodRepository.findById(i);\n if (!item.isPresent()) {\n continue;\n }\n LOGGER.info(\"Oki\");\n details.add(new TransactionMedicalDetail(new\n TransactionMedicalDetailID(transactionMedical, item.get())));\n }\n LOGGER.info(\"TAG 1\");\n transactionMedical.setTransactionMedicalDetails(\n\n details);\n LOGGER.info(\"TAG 2\");\n\n String currentToken = patient.getAccount().getDeviceToken();\n LOGGER.info(\"TAG 4\");\n\n notifies.add( Notify.builder()\n .accountId(patient.getAccount().getAccountId())\n .type(2)\n .createDate(new Date())\n .title(\"Thông báo từ MedTech\")\n .content(\"Bạn đã hoàn thành khám lâm sàng, vui lòng xem chi tiết chỉ địch của bác sĩ trong mục lịch khám\")\n .build());\n LOGGER.info(\"TAG 5\");\n ProcessOfTreatmentDetailID kProcessOfTreatmentDetailID = new ProcessOfTreatmentDetailID();\n kProcessOfTreatmentDetailID.setDeptId(doctor.getDeptDoctor());\n kProcessOfTreatmentDetailID.setPotId(ofTreatment.get());\n LOGGER.info(\"TAG 6\");\n Optional<ProcessOfTreatmentDetail> processOfTreatmentDetail = potDetailRepository\n .findById(kProcessOfTreatmentDetailID);\n LOGGER.info(\"TAG 7\");\n int currentIndexPot = -1;\n if(processOfTreatmentDetail.isPresent()){\n ProcessOfTreatmentDetail p = processOfTreatmentDetail.get();\n p.setAccStatus(1);\n currentIndexPot = p.getIndexNum();\n// todo notify last 2 account\n potDetailRepository.save(p);\n LOGGER.info(\"TAG 8\");\n }\n// them thu n thi notify thang n+1 va n+2;\n Pageable paging = PageRequest.of(0, 2);\n Page<ProcessOfTreatmentDetail> userNeedNotys = potDetailRepository._getAccountNotifyByPotId(currentIndexPot,doctor.getDeptDoctor().getDeptId()\n , ofTreatment.get().getPotId(),paging);\n List<String> tokens = new ArrayList<>();\n LOGGER.info(\"TAG 9\");\n if(userNeedNotys != null && userNeedNotys.getContent() != null){\n\n for (ProcessOfTreatmentDetail p : userNeedNotys.getContent()){\n notifies.add( Notify.builder()\n .accountId(p.getProcessDetailId().getPotId().getPatientPot().getAccount().getAccountId())\n .type(3)\n .createDate(new Date())\n .title(\"Thông báo từ MedTech\")\n .content(\"Sắp đến lượt khám của bạn. vui long quay lại phòng khám.\")\n .build());\n String token;\n try {\n token = p.getProcessDetailId().getPotId().getPatientPot().getAccount().getDeviceToken();\n if(token != null){\n tokens.add(token);\n }\n }catch (Exception e){\n e.printStackTrace();\n }\n\n\n }\n LOGGER.info(\"TAG 10\");\n }\n if(currentToken != null){\n List<String> tokenCurrent = new ArrayList<>();\n tokenCurrent.add(currentToken);\n FCMRequest request = new FCMRequest();\n RestTemplate restTemplate = new RestTemplate();\n\n request.registration_ids = tokenCurrent;\n FCMRequest.Notification notification = new FCMRequest.Notification();\n notification.title = \"Thông báo từ MedTech\";\n notification.body = \"Bạn đã hoàn thành khám lâm sàng. Vui lòng xem chi tiết chỉ định của bác sĩ trong mục lịch khám!\";\n request.notification = notification;\n\n HttpHeaders registrationHeaders = StringUtils.getHeaders();\n registrationHeaders.set(\"Authorization\", \"key=AAAAmZOYw60:APA91bG8BYYUTKZ5ZKpU54sNTzR7MVx1Vp_cFgso-hVjfqBrl02MJ4yVDQZdMuJjHv6gXr3MDJAhC0jxF7xunCyegOL2WR0-lHrh_j9mGcVBn-z1ssk5ka25g90f8oZEgkKAGE2f3ZrA\");\n try {\n HttpEntity<String> registrationEntity = new HttpEntity<String>(StringUtils.getBody(request),\n registrationHeaders);\n ResponseEntity<String> response = restTemplate.exchange(\"https://fcm.googleapis.com/fcm/send\",\n HttpMethod.POST, registrationEntity,\n String.class);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n LOGGER.info(\"TAG 11\");\n }\n if(!tokens.isEmpty()){\n// notifies\n LOGGER.info(\"TAG 12\");\n FCMRequest request = new FCMRequest();\n RestTemplate restTemplate = new RestTemplate();\n\n request.registration_ids = tokens;\n FCMRequest.Notification notification = new FCMRequest.Notification();\n notification.title = \"Thông báo từ MedTech\";\n notification.body = \"Sắp đến lượt khám của bạn. Vui lòng quay lại phòng khám!\";\n request.notification = notification;\n\n HttpHeaders registrationHeaders = StringUtils.getHeaders();\n registrationHeaders.set(\"Authorization\", \"key=AAAAmZOYw60:APA91bG8BYYUTKZ5ZKpU54sNTzR7MVx1Vp_cFgso-hVjfqBrl02MJ4yVDQZdMuJjHv6gXr3MDJAhC0jxF7xunCyegOL2WR0-lHrh_j9mGcVBn-z1ssk5ka25g90f8oZEgkKAGE2f3ZrA\");\n try {\n HttpEntity<String> registrationEntity = new HttpEntity<String>(StringUtils.getBody(request),\n registrationHeaders);\n ResponseEntity<String> response = restTemplate.exchange(\"https://fcm.googleapis.com/fcm/send\",\n HttpMethod.POST, registrationEntity,\n String.class);\n\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n\n }\n\n if(!notifies.isEmpty()){\n LOGGER.info(\"TAG 13\");\n mNotifyRepository.saveAll(notifies);\n }\n LOGGER.info(\"TAG 13\");\n medicalRepository.save(transactionMedical);\n medicalDetailRepository.saveAll(transactionMedical.getTransactionMedicalDetails());\n return new OkResponse(MsgRespone.TAO_PHIEU_KHAM_THANH_CONG);\n }", "@Override\r\n @Transactional(rollbackFor=ExpedienteException.class) \r\n public ExpedienteGSMDTO actualizarExpediente(ExpedienteGSMDTO expedienteDTO, UsuarioDTO usuarioDTO) throws ExpedienteException {\r\n LOG.info(\"actualizarExpediente\");\r\n ExpedienteGSMDTO retorno=null;\r\n try{\r\n PghExpediente expe = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n expe.setIdEstadoLevantamiento(new MdiMaestroColumna(expedienteDTO.getEstadoLevantamiento().getIdMaestroColumna()));\r\n expe.setDatosAuditoria(usuarioDTO);\r\n crud.update(expe);\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(expe);\r\n }catch(Exception e){\r\n LOG.error(\"error en actualizarExpediente\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno; \r\n }", "public void testassociate_PersistenceException() throws Exception {\r\n Address address = this.getAddress();\r\n address.setId(1);\r\n address.setCreationDate(new Date());\r\n address.setModificationDate(new Date());\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").associate(address, 1, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Repository\npublic interface LoanCorporateForeignInvestment_DAO{\n @Insert(\"insert into LoanCorporateForeignInvestment(custCode,CreditCardNumber,InvesteeCompanyName,InvestmentAmount,InvestmentCurrency,OrganizationCode) \" +\n \"values (\" +\n \"#{custCode,jdbcType=VARCHAR},\" +\n \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \")\")\n @ResultType(Boolean.class)\n public boolean save(LoanCorporateForeignInvestment_Entity entity);\n\n @Select(\"SELECT COUNT(*) FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\")\n @ResultType(Integer.class)\n Integer countAll(String custCode);\n\n @Select(\"SELECT * FROM LoanCorporateForeignInvestment Where CustCode=\"+\"#{custCode,jdbcType=VARCHAR}\"+\" Order By Id Asc\")\n @ResultType(LoanCorporateForeignInvestment_Entity.class)\n List<LoanCorporateForeignInvestment_Entity> findAll(String custCode);\n\n @Update(\"Update LoanCorporateForeignInvestment \" +\n \"SET \" +\n \"custCode=\" + \"#{custCode,jdbcType=VARCHAR},\"+\n \"CreditCardNumber=\" + \"#{CreditCardNumber,jdbcType=VARCHAR},\" +\n \"InvesteeCompanyName=\" + \"#{InvesteeCompanyName,jdbcType=VARCHAR},\" +\n \"InvestmentAmount=\" + \"#{InvestmentAmount,jdbcType=VARCHAR},\" +\n \"InvestmentCurrency= \" + \"#{InvestmentCurrency,jdbcType=VARCHAR},\" +\n \"OrganizationCode= \" + \"#{OrganizationCode,jdbcType=VARCHAR}\" +\n \"Where Id=\" + \"#{Id,jdbcType=VARCHAR}\"\n )\n @ResultType(Boolean.class)\n boolean update(LoanCorporateForeignInvestment_Entity entity);\n\n @Delete(\"DELETE FROM LoanCorporateForeignInvestment Where Id=\"+\"#{Id,jdbcType=VARCHAR}\")\n boolean delete(String Id);\n}", "@Override\n //public void save(User user) throws PasswordConfirmationException, PasswordConfirmationEmptyException, DuplicateMailException, DuplicateHandleException {\n public void save(User user) throws UserValidationException {\n StringBuilder strExceptions = new StringBuilder();\n String passConfirmation = user.getPasswordConfirmation();\n\n if (user.getEmail() == null || user.getEmail().equals(\"\")) {\n strExceptions.append(\"[EmptyEmailException] Mail address not provided\");\n }\n\n if (user.getHandle() == null || user.getHandle().length() < 3) {\n if (strExceptions.length() > 0) {\n strExceptions.append(\"\\n\");\n }\n\n strExceptions.append(\"[HandleLengthException] User handle empty or not long enough\");\n }\n\n if (user.getPassword() == null || user.getPassword().length() < 8) {\n if (strExceptions.length() > 0) {\n strExceptions.append(\"\\n\");\n }\n\n strExceptions.append(\"[PasswordLengthException] User password empty or not long enough\");\n }\n\n if (!user.getPassword().equals(passConfirmation)) {\n //throw new PasswordConfirmationException(\"Passwords do not match\");\n if (strExceptions.length() > 0) {\n strExceptions.append(\"\\n\");\n }\n\n strExceptions.append(\"[PasswordConfirmationException] Passwords do not match\");\n }\n\n if (passConfirmation == null || passConfirmation.equals(\"\")) {\n //throw new PasswordConfirmationEmptyException(\"Password confirmation turned up empty\");\n if (strExceptions.length() > 0) {\n strExceptions.append(\"\\n\");\n }\n\n strExceptions.append(\"[PasswordConfirmationEmptyException] Password confirmation turned up empty\");\n }\n\n List<User> results = userRepository.findByMailOrHandle(user.getEmail(), user.getHandle());\n\n // If size == 0 -> this is skipped\n for (int x = 0; x < results.size(); x++) {\n User u = results.get(x);\n\n if (u.getEmail().equals(user.getEmail())) {\n //throw new DuplicateMailException(\"Email is already taken\");\n if (strExceptions.length() > 0) {\n strExceptions.append(\"\\n\");\n }\n\n strExceptions.append(\"[DuplicateMailException] Email is already taken\");\n }\n else if (u.getHandle().equals(user.getHandle())) {\n //throw new DuplicateHandleException(\"Handle is already taken\");\n if (strExceptions.length() > 0) {\n strExceptions.append(\"\\n\");\n }\n\n strExceptions.append(\"[DuplicateHandleException] Handle is already taken\");\n }\n }\n\n String encodedPassword = passwordEncoder.encode(user.getPassword());\n user.setPassword(encodedPassword);\n\n if (strExceptions.length() > 0) {\n throw new UserValidationException(strExceptions.toString());\n }\n\n userRepository.save(user);\n }", "public interface ExistenciaMaqDao extends GenericDao<ExistenciaMaq, Long>{\n\t\n\t/**\n\t * Localiza el inventario inicial para un producto, sucursal aņo y mes \n\t * \n\t * @param producto La clave del producto\n\t * @param sucursal La sucursal\n\t * @param year El aņo\n\t * @param mes El mes (valido 1 al 12)\n\t * @return\n\t */\n\t@Transactional(propagation=Propagation.SUPPORTS)\n\tpublic ExistenciaMaq buscar(String producto,long almacen,int year,int mes);\n\t\n\t\n\tpublic ExistenciaMaq buscarPorClaveSiipap(String producto,int clave,int year,int mes);\n\t\n\t\n\t/**\n\t * Actualiza las existencias para el articulo indicado en el aņo y al fin del mes solicitado\n\t * \n\t * @param clave La clave del articulo\n\t * @param year El aņo o periodo fiscal\n\t * @param mes El mes (1 - 12)\n\t * \n\t */\n\tpublic void actualizarExistencias(String clave,int year, int mes);\n\t\n\tpublic void actualizarExistencias(Long almacenlId,String clave,int year,int mes);\n\t\n\t/**\n\t * Actualiza las existencias de todas las sucursales y para todos los articulos al final del mes\n\t * \n\t * @param year\n\t * @param mes\n\t */\n\tpublic void actualizarExistencias(int year, int mes);\n\t\n\tpublic void actualizarExistencias();\n\t\n\tpublic void actualizarExistencias(Long almacenId,int year,int mes);\n\t\n\t/**\n\t * Calcula y regresa la existencia \n\t * \n\t * @param producto El producto\n\t * @param sucursal La sucursal \n\t * @param fecha A la fecha indicada (corte)\n\t * @return\n\t */\n\t@Transactional(propagation=Propagation.REQUIRED)\n\tpublic double calcularExistencia(Producto producto,Almacen almacen,final Date fecha);\t\n\t\n\t\n\t/**\n\t * Regresa las existencias del producto en el mes en curso\n\t * en la fecha/periodo indicado\n\t * \n\t * @param producto\n\t * @param fecha\n\t * @return\n\t */\n\tpublic List<ExistenciaMaq> buscarExistencias(final Producto producto,final Date fecha);\n\t\n\t/**\n\t * Regresa todas las existencias para la sucursal indicada\n\t * \n\t * @param sucursalId\n\t * @param fecha\n\t * @return\n\t */\n\tpublic List<ExistenciaMaq> buscarExistencias(final Long almacenId,final Date fecha);\n\t\n\t/**\n\t * Genera un registro de existencia si este ya existe lo regresa\n\t * \n\t * @param producto\n\t * @param fecha\n\t * @return\n\t */\n\tpublic ExistenciaMaq generar(final Producto producto,final Date fecha, final Long almacenId);\n\t\t\n\t/**\n\t * Genera un registro de existencia si este ya existe lo regresa\n\t * \n\t * @param clave\n\t * @param fecha\n\t * @param sucursalId\n\t * @return\n\t */\n\tpublic ExistenciaMaq generar(final String clave,final Date fecha, final Long almacenId);\n\t\n\t/**\n\t * Genera un registro de existencia si este ya existe lo regresa\n\t * \n\t * @param clave\n\t * @param sucursalId\n\t * @param year\n\t * @param mes El mes 1 based en 1= Enero 12= Diciembre\n\t * @return\n\t */\n\tpublic ExistenciaMaq generar(final String clave,final Long almacenId,int year,int mes);\n \n}", "boolean isRollbackOnConstraintViolation();", "@Test(expectedExceptions = DataAccessLayerException.class)\n void findByIdThrowsTest() {\n Mockito.when(reservationDao.findById(15L)).thenThrow(IllegalArgumentException.class);\n reservationService.findById(15L);\n }", "@TransactionAttribute(TransactionAttributeType.REQUIRED)\r\n/* 133: */ public void eliminar(Reporteador reporteador)\r\n/* 134: */ throws AS2Exception\r\n/* 135: */ {\r\n/* 136: */ try\r\n/* 137: */ {\r\n/* 138:158 */ reporteador = this.reporteadorDao.cargarDetalle(reporteador.getIdReporteador());\r\n/* 139: */ \r\n/* 140:160 */ eliminarDetallesReporteador(reporteador, null);\r\n/* 141:162 */ for (DetalleReporteadorVariable detalle : reporteador.getListaDetalleReporteadorVariable()) {\r\n/* 142:163 */ this.detalleReporteadorVariableDao.eliminar(detalle);\r\n/* 143: */ }\r\n/* 144:166 */ this.reporteadorDao.eliminar(reporteador);\r\n/* 145: */ }\r\n/* 146: */ catch (AS2Exception e)\r\n/* 147: */ {\r\n/* 148:168 */ this.context.setRollbackOnly();\r\n/* 149:169 */ throw e;\r\n/* 150: */ }\r\n/* 151: */ catch (Exception e)\r\n/* 152: */ {\r\n/* 153:171 */ e.printStackTrace();\r\n/* 154:172 */ this.context.setRollbackOnly();\r\n/* 155:173 */ throw new AS2Exception(e.getMessage());\r\n/* 156: */ }\r\n/* 157: */ }", "@Test(expected = DataIntegrityViolationException.class)\n public void addWithRefIntegrityException() {\n Coffee coffee = new Coffee();\n coffee.setRoaster_id(999);\n coffee.setName(\"Reference Exception Test\");\n coffee.setCount(12);\n coffee.setUnit_price(new BigDecimal(\"11.00\"));\n coffee.setDescription(\"Test\");\n coffee.setType(\"Test\");\n coffee = coffeeDao.addCoffee(coffee);\n }", "@Test(expected = DataAcessException.class)\n\t public void testDeleteExcep() throws DataAcessException {\n\t\tUsers user = BaseData.getUsers();\n\t\tdoThrow(RuntimeException.class).when(entityManager).remove(user);\n\t\tuserDao.delete(user);\n\t}", "public abstract void rollback() throws DetailException;", "@Override\r\n\t\tpublic void rollback() throws SQLException {\n\t\t\t\r\n\t\t}", "@Test(expectedExceptions = DataAccessLayerException.class)\n void removeThrowsTest() {\n reservation1.setId(24L);\n Mockito.doThrow(IllegalArgumentException.class).when(reservationDao).remove(reservation1);\n reservationService.remove(reservation1);\n }", "public static DAO Rollback() throws IllegalStateException\r\n\t{\r\n\t\treturn instance.rollback();\r\n\t}", "private void createReferentialIntegrityConstraints() {\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" ADD FOREIGN KEY (THE_BOOK_FK) REFERENCES \" + IDaoBooks.TABLE + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.BOOKS_AUTHOR_TABLE + \" ADD FOREIGN KEY (THE_AUTHOR_FK) REFERENCES \" + IDaoPersons.TABLE + \" (ID) ON UPDATE SET NULL\");\n\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_KIND_FK) REFERENCES \" + SimpleData.DataType.KIND.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_LANGUAGE_FK) REFERENCES \" + SimpleData.DataType.LANGUAGE.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_LENDING_FK) REFERENCES \" + IDaoLendings.TABLE + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_SAGA_FK) REFERENCES \" + SimpleData.DataType.SAGA.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_TYPE_FK) REFERENCES \" + SimpleData.DataType.TYPE.getTable() + \" (ID) ON UPDATE SET NULL\");\n jdbcTemplate.update(\"ALTER TABLE \" + IDaoBooks.TABLE + \" ADD FOREIGN KEY (THE_EDITOR_FK) REFERENCES \" + IDaoEditors.TABLE + \" (ID) ON UPDATE SET NULL\");\n }", "@Test(expected = AppException.class)\n public void shouldThrowAnAppException() throws Exception {\n Mockito.when(customerRepository.existsByEmail(view.getEmail())).thenReturn(false);\n //error on saving\n Mockito.when(customerRepository.save(Mockito.any(Customer.class))).thenThrow(new DataAccessException(\"Could not save customer\") {});\n\n customerService.create(view);\n Mockito.verify(customerRepository).existsByEmail(view.getEmail());\n Mockito.verify(customerRepository).save(Mockito.any(Customer.class));\n }", "@Repository\n@Transactional\npublic interface PointOfInterestDao extends CrudRepository<PointOfInterest, Integer> {\n}", "@Repository\n@Transactional\npublic interface ScratcherGameSnapshotDao extends CrudRepository<ScratcherGameSnapshot, Integer> {\n}", "public User update(User user) throws DataAccessException;", "public void updateInsurance(Insurance insurance) throws DataAccessException;", "@Test(expectedExceptions = DataAccessLayerException.class)\n void findByCustomerThrowsTest() {\n Mockito.doThrow(IllegalArgumentException.class).when(reservationDao).findByCustomerId(Mockito.anyLong());\n reservationService.findByCustomer(15L);\n }", "@Transactional\npublic interface FoodRepository extends CrudRepository<Food, Long> {\n\n}", "public void savePosPay(PosPay posPay) throws DataAccessException;", "@Override\n\tpublic void rollBack() {\n\n\t}", "public DAOException()\r\n {\r\n super();\r\n }", "public OpenXdataDataAccessException() {\r\n \tsuper(\"A Data Base Access Exception occurred.\");\r\n }", "public DataIntegrityError(String message) {\n super(message);\n }", "@Test(expected = DataAcessException.class) \n\t public void testRetrieveAllExcep() throws DataAcessException{\n\t\t\tQuery mockQuery = mock(Query.class);\n\t\t\twhen(entityManager.createQuery(Mockito.anyString())).thenReturn(mockQuery);\n\t\t\twhen(mockQuery.getResultList()).thenThrow(new RuntimeException());\n\t\t\tuserDao.retrieveAll();\n\t }", "public DuplicatedUserException() {\n super();\n }", "public void testGetAllCountries_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").getAllCountries();\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public DataAccessException(String message) {\n super(message);\n }", "public DataAccessException() {\n }", "@Override\n @Transactional(propagation = Propagation.REQUIRED)\n public void insertNewEntity(BaseEntity baseEntity) throws UnableToInsertException {\n try{\n // transaction = openTransaction(sessionFactory.getCurrentSession());\n entityDAO.insert(baseEntity);\n // transaction.commit();\n }\n catch(Exception ex){\n /* if(transaction != null)\n transaction.rollback();*/\n throw new UnableToInsertException(ex.getMessage());\n }\n }", "public void testSearchAddresses_PersistenceException() throws Exception {\r\n try {\r\n this.dao.searchAddresses(new EqualToFilter(\"address_id\", new Long(1)));\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Transactional\npublic interface VideoDao extends CrudRepository<Video, Long> {\n}", "public void testdeassociate_PersistenceException() throws Exception {\r\n Address address = this.getAddress();\r\n address.setId(1);\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").deassociate(address, 1, false);\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@Transactional\npublic interface ModuloRepository extends JpaRepository<Modulo,Long>{\n\n}", "@Transactional\n\tpublic Object rollBackAllWithDifferentTx(String action) {\n\t\tObject res;\n\t\ttry {\n\t\t\tres = annotationSubService.throwRunTimeExceptionInNewTx(action);\n\t\t\tuniActionLogDao.insert(res);\n\t\t\treturn res;\n\t\t} catch (Exception e) {\n\t\t\tres = \"F\";\n\t\t\tuniActionLogDao.insert(res);\n\t\t\tthrow e;\n\t\t}\n\t}", "private void checkIfTransactionDoesntExists(TransactionDto transactionDto) {\n Optional<Transaction> transactionO = transactionRepository.findById(transactionDto.getId());\n if (transactionO.isPresent()) {\n throw new BusinessLogicException(String.format(\"A transaction with the id '%s' already exists.\",\n transactionDto.getId()));\n }\n }", "@Test\n public void deleteEmpleadoTest() {\n \n try{ \n EmpleadoEntity entity = data.get(3);\n empleadoLogic.deleteEmpleado(entity.getId());\n EmpleadoEntity deleted = em.find(EmpleadoEntity.class, entity.getId());\n Assert.assertNull(deleted);\n \n }catch(BusinessLogicException b){\n Assert.fail();\n }\n }", "@Repository\n@Transactional\npublic interface MenuDao extends CrudRepository<Menu, Integer> {\n\n}", "void addconBooking(detailDTO detail) throws DataAccessException;", "@Transactional\n\tpublic Object rollBackAllWithSameTx2(String action) {\n\t\tObject res;\n\t\ttry {\n\t\t\tres = annotationSubService.throwRunTimeExceptionInSameTx(action);\n\t\t} catch (Exception e) {\n\t\t\tres = \"F\";\n\t\t}\n\t\tuniActionLogDao.insert(res);\n\t\treturn res;\n\t}", "@Test\n @Transactional\n void createIndActivationWithExistingId() throws Exception {\n indActivation.setId(1L);\n IndActivationDTO indActivationDTO = indActivationMapper.toDto(indActivation);\n\n int databaseSizeBeforeCreate = indActivationRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restIndActivationMockMvc\n .perform(\n post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(indActivationDTO))\n )\n .andExpect(status().isBadRequest());\n\n // Validate the IndActivation in the database\n List<IndActivation> indActivationList = indActivationRepository.findAll();\n assertThat(indActivationList).hasSize(databaseSizeBeforeCreate);\n }", "public T insert(T entity) throws DataAccessException;", "@Repository\n@Transactional(propagation = Propagation.REQUIRED)\npublic interface AccountCalendarService extends AbstractEntityService<AccountCalendar> {\n\n}", "public DAOException(Throwable cause)\r\n {\r\n super(cause);\r\n }", "@Test(timeout = 4000)\n public void test46() throws Throwable {\n PipedWriter pipedWriter0 = new PipedWriter();\n PipedReader pipedReader0 = new PipedReader();\n Boolean boolean0 = Boolean.FALSE;\n SQLUtil.isQuery(\"selectntowrong c|ck\");\n Boolean.valueOf(true);\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"selectntowrong c|ck\");\n // Undeclared exception!\n try { \n defaultDBTable0.getUniqueConstraint(\"^h=wZ>:9%}Pj6(#%M\");\n fail(\"Expecting exception: NullPointerException\");\n \n } catch(NullPointerException e) {\n //\n // no message in exception (getMessage() returned null)\n //\n verifyException(\"org.databene.jdbacl.model.DefaultDBTable\", e);\n }\n }", "@Test(expectedExceptions = DataAccessLayerException.class)\n void findByTripThrowsTest() {\n Mockito.when(reservationDao.findByTripId(Mockito.anyLong())).thenThrow(IllegalArgumentException.class);\n reservationService.findByTrip(27L);\n }", "@Test\n @Transactional\n void createUserExtraWithExistingId() throws Exception {\n userExtra.setId(1L);\n\n int databaseSizeBeforeCreate = userExtraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restUserExtraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(userExtra)))\n .andExpect(status().isBadRequest());\n\n // Validate the UserExtra in the database\n List<UserExtra> userExtraList = userExtraRepository.findAll();\n assertThat(userExtraList).hasSize(databaseSizeBeforeCreate);\n\n // Validate the UserExtra in Elasticsearch\n verify(mockUserExtraSearchRepository, times(0)).save(userExtra);\n }", "@Test\n @Transactional\n void createUserextraWithExistingId() throws Exception {\n userextra.setId(1L);\n\n int databaseSizeBeforeCreate = userextraRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restUserextraMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(userextra)))\n .andExpect(status().isBadRequest());\n\n // Validate the Userextra in the database\n List<Userextra> userextraList = userextraRepository.findAll();\n assertThat(userextraList).hasSize(databaseSizeBeforeCreate);\n }", "public void testRetrieveAddresses_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").retrieveAddresses(new long[]{1});\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "@ResponseStatus(value = HttpStatus.CONFLICT, reason = \"Another entity with the same identity exists\")\n @ExceptionHandler({DataIntegrityViolationException.class})\n public void handleAlreadyExists() {\n // just return empty 409\n logger.info(\"-----> Entity save operation failure\");\n }", "@Override\n public Throwable getRollbackCause()\n throws Exception {\n if (_runtime == null)\n getTransactionManager();\n\n if (_runtime != null)\n return _runtime.getRollbackCause();\n\n return null;\n }", "@Override\r\n /* OSINE791 - RSIS1 - Inicio */\r\n //public ExpedienteDTO asignarOrdenServicio(ExpedienteDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO) throws ExpedienteException{\r\n public ExpedienteGSMDTO asignarOrdenServicio(ExpedienteGSMDTO expedienteDTO,String codigoTipoSupervisor,UsuarioDTO usuarioDTO,String sigla) throws ExpedienteException{\r\n LOG.error(\"asignarOrdenServicio\");\r\n ExpedienteGSMDTO retorno=expedienteDTO;\r\n try{\r\n //cambiarEstado expediente \r\n \tExpedienteGSMDTO expedCambioEstado=cambiarEstadoProceso(expedienteDTO.getIdExpediente(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getPersonal().getIdPersonal(),expedienteDTO.getEstadoProceso().getIdEstadoProceso(),null,usuarioDTO);\r\n LOG.info(\"expedCambioEstado:\"+expedCambioEstado);\r\n //update expediente\r\n PghExpediente registroDAO = crud.find(expedienteDTO.getIdExpediente(), PghExpediente.class);\r\n registroDAO.setDatosAuditoria(usuarioDTO);\r\n if(expedienteDTO.getTramite()!=null){\r\n registroDAO.setIdTramite(new PghTramite(expedienteDTO.getTramite().getIdTramite()));\r\n }else if(expedienteDTO.getProceso()!=null){\r\n registroDAO.setIdProceso(new PghProceso(expedienteDTO.getProceso().getIdProceso()));\r\n }\r\n if(expedienteDTO.getObligacionTipo()!=null){\r\n registroDAO.setIdObligacionTipo(new PghObligacionTipo(expedienteDTO.getObligacionTipo().getIdObligacionTipo()));\r\n }\r\n if(expedienteDTO.getObligacionSubTipo()!=null && expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()!=null){\r\n registroDAO.setIdObligacionSubTipo(new PghObligacionSubTipo(expedienteDTO.getObligacionSubTipo().getIdObligacionSubTipo()));\r\n }\r\n registroDAO.setIdUnidadSupervisada(new MdiUnidadSupervisada(expedienteDTO.getUnidadSupervisada().getIdUnidadSupervisada()));\r\n crud.update(registroDAO);\r\n //inserta ordenServicio\r\n Long idLocador=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)?expedienteDTO.getOrdenServicio().getLocador().getIdLocador():null;\r\n Long idSupervisoraEmpresa=codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)?expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa():null;\r\n OrdenServicioDTO OrdenServicioDTO=ordenServicioDAO.registrar(expedienteDTO.getIdExpediente(), \r\n expedienteDTO.getOrdenServicio().getIdTipoAsignacion(), expedienteDTO.getOrdenServicio().getEstadoProceso().getIdEstadoProceso(), \r\n /* OSINE791 - RSIS1 - Inicio */\r\n //codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO);\r\n codigoTipoSupervisor, idLocador, idSupervisoraEmpresa, usuarioDTO,sigla);\r\n /* OSINE791 - RSIS1 - Fin */\r\n LOG.info(\"OrdenServicioDTO:\"+OrdenServicioDTO.getNumeroOrdenServicio());\r\n //busca idPersonalDest\r\n PersonalDTO personalDest=null;\r\n List<PersonalDTO> listPersonalDest=null;\r\n if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_NATURAL)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(expedienteDTO.getOrdenServicio().getLocador().getIdLocador(),null));\r\n }else if(codigoTipoSupervisor.equals(Constantes.CODIGO_TIPO_SUPERVISOR_PERSONA_JURIDICA)){\r\n listPersonalDest=personalDAO.find(new PersonalFilter(null,expedienteDTO.getOrdenServicio().getSupervisoraEmpresa().getIdSupervisoraEmpresa()));\r\n }\r\n if(listPersonalDest==null || listPersonalDest.isEmpty() || listPersonalDest.get(0).getIdPersonal()==null){\r\n throw new ExpedienteException(\"La Empresa Supervisora no tiene un Personal asignado\",null);\r\n }else{\r\n personalDest=listPersonalDest.get(0);\r\n }\r\n //inserta historico Orden Servicio\r\n EstadoProcesoDTO estadoProcesoDto=estadoProcesoDAO.find(new EstadoProcesoFilter(Constantes.IDENTIFICADOR_ESTADO_PROCESO_OS_REGISTRO)).get(0);\r\n MaestroColumnaDTO tipoHistorico=maestroColumnaDAO.findMaestroColumna(Constantes.DOMINIO_TIPO_COMPONENTE, Constantes.APLICACION_INPS, Constantes.CODIGO_TIPO_COMPONENTE_ORDEN_SERVICIO).get(0);\r\n /* OSINE_SFS-480 - RSIS 40 - Inicio */\r\n HistoricoEstadoDTO historicoEstado=historicoEstadoDAO.registrar(null, OrdenServicioDTO.getIdOrdenServicio(), estadoProcesoDto.getIdEstadoProceso(), expedienteDTO.getPersonal().getIdPersonal(), personalDest.getIdPersonal(), tipoHistorico.getIdMaestroColumna(),null,null, null, usuarioDTO); \r\n LOG.info(\"historicoEstado:\"+historicoEstado);\r\n /* OSINE_SFS-480 - RSIS 40 - Fin */\r\n retorno=ExpedienteGSMBuilder.toExpedienteDto(registroDAO);\r\n retorno.setOrdenServicio(new OrdenServicioDTO(OrdenServicioDTO.getIdOrdenServicio(),OrdenServicioDTO.getNumeroOrdenServicio()));\r\n }catch(Exception e){\r\n LOG.error(\"error en asignarOrdenServicio\",e);\r\n ExpedienteException ex = new ExpedienteException(e.getMessage(), e);\r\n throw ex;\r\n }\r\n return retorno;\r\n }", "public String insert(RightInfoDTO rightInfo) throws DataAccessException;", "@Test(expected = DataIntegrityViolationException.class)\n public void testInsertNullDepartmentName() throws Exception {\n Department insertDepartment = new Department(null);\n departmentDao.addDepartment(insertDepartment);\n\n }", "public interface IScheduldeExceptionDao extends IAbstractDao<ScheduldeException>\n{\n}", "public void testGetAllStates_PersistenceException() throws Exception {\r\n try {\r\n new InformixAddressDAO(\"InformixAddressDAO_Error_4\").getAllStates();\r\n fail(\"PersistenceException expected\");\r\n } catch (PersistenceException e) {\r\n //good\r\n }\r\n }", "public DaoException() {\r\n\t\tsuper();\r\n\t}", "@Test\n @Order(6)\n void TC_UTENTE_DAO_10()\n {\n /*creo uno username valido*/\n Utente utente=new Utente();\n UtenteDAO utenteDAO = new UtenteDAO();\n\n assertThrows(RuntimeException.class, ()->utenteDAO.doUpdate(utente));\n\n }", "@Rollback(false)\r\n @Test\r\n public void testEntityMerge_Insert()\r\n {\n PersonDAO person = personFactory.blank();\r\n //Populate\r\n person.setName(\"New Person\");//a NON EXISTING person!\r\n //Add an EXISTING parent person\r\n PersonDAO parent = personFactory.blank();\r\n parent.setId(5);\r\n person.setParent(parent);\r\n\r\n //persist\r\n personFactory.merge(person);\r\n System.out.println(\"Person:\"+person);\r\n\r\n newId = person.getId();\r\n\r\n //-------------------------------------------------------------------------------------\r\n\r\n //dissect\r\n GenericDaoProxy<PersonDAO> dao = GenericDaoProxy.getDaoFromProxiedEntity(person);\r\n\r\n assertThat(dao.getCommonName(), is(\"person\"));\r\n assertThat(person.__identity(), is(dao.getIdentity()));\r\n\r\n //verify that modified fields are detected correctly and not cleared before transaction commit\r\n Set<String> modifiedFields = dao.getModifiedFields();\r\n assertThat(modifiedFields.size(),is(2));\r\n assertThat(modifiedFields.contains(\"name\"),is(true));\r\n assertThat(modifiedFields.contains(\"parent\"),is(true));\r\n\r\n assertThat(person.__revision(), is(-1L));//the default value (not yet updated to the new value (1))\r\n assertThat(dao.getData().get(\"__revision$new\"), is(0L));//verify the new entity revision is 0 (after merge)\r\n\r\n //verify raw data\r\n assertThat(dao.getData().get(\"name\"), is(\"New Person\"));\r\n assertThat(dao.getData().get(\"id$new\"), is(newId));\r\n }", "@Test(expected = CannotCreateTransactionException.class)\r\n\tpublic void findAllWhenNoDataBaseConnectionNegativeTest() {\r\n\r\n\t\tMockito.when(messageRepository.findAll()).thenThrow(new CannotCreateTransactionException(\"Text of exception\"));\r\n\r\n\t\tmesServ.findAll();\r\n\t}" ]
[ "0.6423021", "0.62938124", "0.62234086", "0.6139801", "0.60283864", "0.60089284", "0.59259355", "0.5904889", "0.5876278", "0.58114", "0.57645535", "0.57476294", "0.5747169", "0.57072484", "0.56808865", "0.56562823", "0.5646231", "0.56364363", "0.56345755", "0.56304073", "0.5629368", "0.5622835", "0.560816", "0.5597762", "0.5592817", "0.55472225", "0.55397123", "0.55380005", "0.5527997", "0.5522233", "0.55196047", "0.5507741", "0.5505988", "0.54994553", "0.54919344", "0.54773897", "0.547616", "0.5448133", "0.5442752", "0.54423773", "0.5435261", "0.5415605", "0.54146385", "0.54046196", "0.54000276", "0.5397297", "0.53935134", "0.53869957", "0.53715503", "0.53705347", "0.5369066", "0.5365115", "0.5358292", "0.53538346", "0.5353565", "0.53517014", "0.53508437", "0.5341779", "0.5310394", "0.5309273", "0.5307079", "0.53022164", "0.5300656", "0.53001016", "0.5276699", "0.5273111", "0.5271465", "0.5239483", "0.5238757", "0.5233491", "0.52317184", "0.52234286", "0.5212719", "0.5209502", "0.5197444", "0.51969564", "0.51938087", "0.518884", "0.5187155", "0.5184142", "0.5181429", "0.51804745", "0.51742387", "0.51720387", "0.51700747", "0.5156414", "0.51471126", "0.5142153", "0.5140248", "0.5138972", "0.51365054", "0.5125642", "0.5124611", "0.5124223", "0.512012", "0.5118191", "0.5114477", "0.5113553", "0.51130134", "0.5112292", "0.510729" ]
0.0
-1
Creates an Item and adds it to the buffer (destructively)
private boolean processItems(Map<String, String> row, List<Item> itemBuffer, Integer bufSize, Map<String, Dept> deptsAdded, Map<String, Collection> collectionsAdded, Map<String, List<String>> allIrns, Map<String, Integer> mediaCounts) { boolean batchAdded = false; if (row == null) return batchAdded; // Create list of Entities, then batch-insert using repo.saveAll(). Would be nice to be able to skip indiviual malformed // Items, but difficult with batch saving. Instead, skip the entire batch containing the malformed entry. // TODO: maybe handle blank lines and malformed items/dates more gracefully. Can a required Dept/Collection actually be missing? // That shouldn't be the case unless there were some exceptions earlier on. if (itemBuffer.size() == bufSize) { try { itemRepo.saveAll(itemBuffer); } catch (DataIntegrityViolationException exception) { System.out.printf("Skipped batch: contained duplicate item(s), starting with the item with reference number '%s'\n", extractDuplicateItemRef(extractUsefulErrorMessage(exception))); //System.out.println(extractUsefulErrorMessage(exception)); } catch (NestedRuntimeException exception) { System.out.println("Skipped batch: contained malformed item(s), blank line, or a required Dept/Collection was missing. Details:"); System.out.println(extractUsefulErrorMessage(exception)); } finally { itemRepo.flush(); } itemBuffer.clear(); batchAdded = true; } // TODO: trim whitespace etc for all values? Item item = new Item(); // id is auto-generated // TODO: check for null collection and skip this individual Item (never add it to the buffer, and reduce the // total number of items to add (i.e. fullBatches and/or lastBatchSize etc)) item.setCollection(collectionsAdded.get(sanitizeString(row.get(collectionHeading)))); item.setItemRef(row.get(itemRefHeading).trim()); if (row.get(locationHeadingArchive) != null) { item.setLocation(row.get(locationHeadingArchive)); } else if (row.get(locationHeadingMuseum) != null) { item.setLocation(row.get(locationHeadingMuseum)); } if (row.get(nameHeading) != null && !truncateString(row.get(nameHeading), 200).isEmpty()) { item.setName(truncateString(row.get(nameHeading), 200)); } else { item.setName(row.get(itemRefHeading)); } if (row.get(descriptionHeadingMuseum) != null) { item.setDescription(row.get(descriptionHeadingMuseum)); } else if (row.get(descriptionHeadingArchive) != null) { item.setDescription(row.get(descriptionHeadingArchive)); } if (allIrns.get(row.get(itemRefHeading)) != null) { item.setMediaIrns(stringifyIrns(allIrns.get(row.get(itemRefHeading)))); } if (mediaCounts.get(row.get(itemRefHeading)) == null) { item.setMediaCount(0); } else { item.setMediaCount(mediaCounts.get(row.get(itemRefHeading))); } if (row.get(copyrightHeading) !=null) { item.setCopyrighted(row.get(copyrightHeading)); } else { item.setCopyrighted("Unknown"); } if (row.get(displayDateHeadingArchive) != null && !StringUtils.isAllBlank(row.get(displayDateHeadingArchive))) { item.setDisplayDate(row.get(displayDateHeadingArchive)); } else if (row.get(displayDateHeadingMuseum) != null && !StringUtils.isAllBlank(row.get(displayDateHeadingMuseum))) { item.setDisplayDate(row.get(displayDateHeadingMuseum)); } if (item.getDisplayDate() != null) { DateMatcher dateMatcher = new DateMatcher(); dateMatcher.matchAttempt(item.getDisplayDate()); item.setStartDate(dateMatcher.startDate); item.setEndDate(dateMatcher.endDate); } if (row.get(extentHeadingArchive) != null) { item.setExtent(row.get(extentHeadingArchive)); } else if (row.get(extentHeadingMuseum) != null) { item.setExtent(row.get(extentHeadingMuseum)); } // Missing/already used //item.setPhysTechDesc(); item.setCollectionDisplayName(truncateString(sanitizeString(row.get(collectionDisplayNameHeading)), 200)); item.setThumbnailIrn(); itemBuffer.add(item); return batchAdded; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void put(T bufferItem);", "void add(Item item);", "public void Add(String item) {\n byte[] bites = Utils.hexToBytes(item);\n mpBuffer += Utils.bytesToHex(bites);\n mLenght += bites.length;\n mBackOffset = mLenght;\n }", "public void push(Object item) {\r\n\t\tdata.add(item);\r\n\r\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(T item){\n\t\t\n\n\t\tif(currentsize == data.length-1){\n\t\t\tgrow();\n\t\t}\n\n\t\t\n\t\tdata[currentsize] = item;\n\t\tcurrentsize++;\n\n\n\t}", "protected abstract void makeItem();", "public abstract void addItem(AbstractItemAPI item);", "public void addItem(Object obj) {\n items.add(obj);\n }", "public boolean add(BufferSlot bs);", "public Item addItem(Item item) {\r\n uniqueCounter++;\r\n items.add(item);\r\n return item;\r\n }", "public @NotNull Item newItem();", "void addItem(DataRecord record);", "public void append(Object item);", "void push(T item) {\n contents.addAtHead(item);\n }", "public ItemReference alloc();", "void push(Object item);", "void addItem (Item toAdd){\n\t\t\tthis.items.add(toAdd);}", "@Override\n public Item createItem(int itemNum, Item item) throws VendingMachinePersistenceException {\n loadItemFile();\n Item newItem = itemMap.put(itemNum, item);\n writeItemFile();\n return newItem;\n }", "public int addItem(Item i);", "@Override\r\n\tpublic void addItem(AbstractItemAPI item) {\n\t\titems.add(item);\r\n\t\t\r\n\t}", "public void store(Item item) {\n this.items.add(item);\n }", "public Item() {}", "@Override\r\n\t\tpublic boolean createItem() {\n\t\t\treturn false;\r\n\t\t}", "public synchronized void add(Integer item) {\r\n while (true) {\r\n if (buffer.size() == SIZE) {\r\n try {\r\n wait();\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n buffer.add(item);\r\n notifyAll();\r\n return;\r\n }\r\n }", "public void addItem(Collectable item){\n \tif (!(item instanceof Token)) {\n \t\titems.add(item);\n \t}\n }", "public interface IBufferInput<T> {\n\n\t/**\n\t * Puts the bufferItem at the end of the bufferStore ArrayList\n\t * @param bufferItem an item to append to bufferStore \n\t */\n\tpublic void put(T bufferItem);\n}", "public void add(int Item) {\n\t\t\tif (nowLength < MAXSIZE) {\n\t\t\t\tray[nowLength] = Item;\n\t\t\t\tnowLength++;\n\t\t\t}\n\t}", "public Object putItem (String key, Object item);", "@Override\n public ID createItem(@NotNull String uid) {\n final long startNs = myStats != null ? System.nanoTime() : 0;\n final ID result = createItemImpl(uid);\n if (myStats != null) {\n myStats.incrementCounter(StatsCounters.itemsCreationDurationNs, System.nanoTime() - startNs);\n }\n return result;\n }", "public final TokenStatement push(final TokenStatement item) {\r\n\t\tthis.ensureCapacity( this.size + 1 ); // Increments modCount!!\r\n\t\tthis.elementData[this.size++] = item;\r\n\t\treturn item;\r\n\t}", "public IBuffer newBuffer();", "public void addItem(Item item) {\n items.add(item);\n }", "public void addItem(Item item) {\n items.add(item);\n }", "Item addItem(IDAOSession session, String title, String description,\n\t\t\tint userId);", "Node(E item) {\n UNSAFE.putObject(this, itemOffset, item);\n }", "private void makeObject() {\n\t\t\n\t\tItem I1= new Item(1,\"Cap\",10.0f,\"to protect from sun\");\n\t\tItemMap.put(1, I1);\n\t\t\n\t\tItem I2= new Item(2,\"phone\",100.0f,\"Conversation\");\n\t\tItemMap.put(2, I2);\n\t\t\n\t\tSystem.out.println(\"Objects Inserted\");\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic void add(int pos, T item){\n\n\t\tif(pos > data.length){\n\t\t\tcurrentsize = currentsize*2;\n\t\t}\n\n\t\n\t\tfor(int i = currentsize; i > pos; i--){\n\t\t\tdata[i] = data[i-1];\n\t\t}\n\t\tdata[pos]= item;\n\t\tcurrentsize++;\n\t}", "void addCpItem(ICpItem item);", "void insertItem(Position position, IItem item);", "public void push(T item);", "public void addItem(Item i) {\n this.items.add(i);\n }", "public ReturnObject add(Object item) {\n ReturnObjectImpl rtn = new ReturnObjectImpl();\n if (item == null) {\n rtn.setError(ErrorMessage.INVALID_ARGUMENT);\n } else {\n rtn.setObj(item);\n extendArray();\n AL[size()-1] = item;\n }\n return rtn;\n }", "public Item(){}", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "@Override\n public void add(Object item)\n {\n if (size == list.length)\n {\n Object [] itemInListCurrently = deepCopy();\n list = new Object[size * 2];\n\n System.arraycopy(itemInListCurrently, 0, list, 0, size);\n }\n\n list[size++] = item;\n }", "public Item_Record() {\n super(Item_.ITEM_);\n }", "public Item createItem() {\n if(pickUpImplementation == null)\n {\n pickUpImplementation = new DefaultPickUp();\n }\n\n if(lookImplementation == null)\n {\n lookImplementation = new DefaultLook(R.string.default_look);\n }\n\n if(defaultItemInteraction == null)\n {\n throw new IllegalArgumentException(\"No default interaction specified!\");\n }\n\n\n return new Item(\n id,\n name,\n pickUpImplementation,\n lookImplementation,\n useImplementation,\n defaultItemInteraction\n );\n }", "public void addFirst(Object item) {\r\n\t\tdata.add(0, item);\r\n\t}", "public void push(Item item){\n this.stack.add(item);\n\n }", "void add(T item);", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "public ItemRecord() {\n super(Item.ITEM);\n }", "public void add() {\n\t\tcart.add(item.createCopy());\n\t}", "public ItemBlock createItemBlock() {\n\t\treturn new GenericItemBlock(this);\n\t}", "public void additem(String item){\n\t\trep.takeitem(\"take \" + item);\n\t}", "private Item(){}", "public native String appendItem(String newItem);", "public void addItem(Item item) {\n _items.add(item);\n }", "public void addItem(Item itemToAdd){\n\t\tif(!isFull()){\n\t\t\tint index = findFreeSlot();\n\t\t\tinventoryItems[index] = itemToAdd;\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Inventory full.\");\n\t\t}\n\t\t\n\t}", "@Override\n public void addItem(P_CK t) {\n \n }", "public void add(int index, Object item)\n {\n items[index] = item;\n numItems++;\n }", "public Item()\n {\n super();\n }", "@attribute(value = \"\", required = false)\r\n\tpublic void addItem(Item i) {\r\n\t}", "public void addItem(Item i) {\r\n assert (ic != null);\r\n \r\n ic.setItem(i);\r\n ic.setHandler(handler);\r\n items.add(ic.getItem());\r\n }", "public void push(Item item)\n {\n top = new Node<Item>(item, top);\n N++;\n }", "public ReturnObject add(int index, Object item) {\n ReturnObjectImpl rtn = new ReturnObjectImpl();\n if (item == null) {\n rtn.setError(ErrorMessage.INVALID_ARGUMENT);\n } else if(index < 0 || index > size()) {\n rtn.setError(ErrorMessage.INDEX_OUT_OF_BOUNDS);\n } else {\n rtn.setObj(item);\n extendArray();\n for (int j = size()-1; j > index; j--) {\n AL[j] = AL[j-1];\n }\n AL[index] = item;\n }\n return rtn;\n }", "public void addItem(Item item) {\n\t\tObjects.requireNonNull(item);\n\t\titems.add(item);\n\t}", "public void addItem(Item item){\r\n items.add(item);\r\n total = items.getTotal();\r\n }", "private void add(GroceryItem itemObj, String itemName) {\n\t\tbag.add(itemObj);\n\t\tSystem.out.println(itemName + \" added to the bag.\");\n\t}", "public Item(Integer itemSlot) {\n this.itemSlot = itemSlot;\n }", "public void push(T newItem);", "public void addItem(Item toAdd) {\n\t\tthis.items.add(toAdd);\n\t}", "public void addItem(Item item) {\r\n\t\titems.add(item);\r\n\t}", "public void insert(KeyedItem newItem);", "private void pushNow(Recycler.DefaultHandle<?> item)\r\n/* 529: */ {\r\n/* 530:567 */ if ((Recycler.DefaultHandle.access$1500(item) | Recycler.DefaultHandle.access$1100(item)) != 0) {\r\n/* 531:568 */ throw new IllegalStateException(\"recycled already\");\r\n/* 532: */ }\r\n/* 533:570 */ Recycler.DefaultHandle.access$1502(item, Recycler.DefaultHandle.access$1102(item, Recycler.OWN_THREAD_ID));\r\n/* 534: */ \r\n/* 535:572 */ int size = this.size;\r\n/* 536:573 */ if ((size >= this.maxCapacity) || (dropHandle(item))) {\r\n/* 537:575 */ return;\r\n/* 538: */ }\r\n/* 539:577 */ if (size == this.elements.length) {\r\n/* 540:578 */ this.elements = ((Recycler.DefaultHandle[])Arrays.copyOf(this.elements, Math.min(size << 1, this.maxCapacity)));\r\n/* 541: */ }\r\n/* 542:581 */ this.elements[size] = item;\r\n/* 543:582 */ this.size = (size + 1);\r\n/* 544: */ }", "public void addItem(final Item item) {\n\t\tnumberOfItems++;\n\t}", "public void addItem( Item anItem) {\n currentItems.add(anItem);\n }", "public void addItem(Item e) {\n\t\tItem o = new Item(e);\n\t\titems.add(o);\n\t}", "public Item createNew(int xpos, int ypos) {\r\n Item i = new Item(name, id);\r\n i.setPosition(xpos, ypos);\r\n return i;\r\n }", "public void push(Item item){\n\t\tNode oldfirst=first;\r\n\t\tfirst=new Node();\r\n\t\tfirst.item=item;\r\n\t\tfirst.next=oldfirst;\r\n\t\tN++;\r\n\t}", "ShipmentItem createShipmentItem();", "public InventoryItem(){\r\n this.itemName = \"TBD\";\r\n this.sku = 0;\r\n this.price = 0.0;\r\n this.quantity = 0;\r\n nItems++;\r\n }", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "public void addItem() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter Item Name: \");\n\t\tString itemName = scanner.nextLine();\n\t\tSystem.out.print(\"Enter Item Description: \");\n\t\tString itemDescription = scanner.nextLine();\n\t\tSystem.out.print(\"Enter minimum bid price for item: $\");\n\t\tdouble basePrice = scanner.nextDouble();\n\t\tLocalDate createDate = LocalDate.now();\n\t\tItem item = new Item(itemName, itemDescription, basePrice, createDate);\n\t\taddItem(item);\n\t}", "@Override\n public void addItem(ItemType item) {\n if (curArrayIndex > items.length - 1) {\n System.out.println(item.getDetails() + \" - This bin is full. Item cannot be added!\");\n }\n else if (item.getWeight() + curWeight <= maxWeight) {\n curWeight += item.getWeight();\n items[curArrayIndex++] = item;\n }\n else {\n System.out.println(item.getDetails() + \" - Overweighted. This item cannot be added!\");\n }\n if (item.isFragile()) {\n setLabel(\"Fragile - Handle with Care\");\n }\n\n }", "void push(T item);", "void push(T item);", "abstract public Buffer createBuffer();", "public boolean add(Type item);", "public Item()\r\n\t{\r\n\t\tserialNum = 00000;\r\n\t\tweight = 0.0;\r\n\t}", "public void push(E item);", "public void giveItem(Item item) {\n\t\tif (hasItem()) return;\n\t\tthis.item = item;\n\t}", "QuoteItem createQuoteItem();", "@Override\r\n\t\r\n\t protected OverlayItem createItem(int index) {\n\t\treturn lstItems.get(index);\r\n\t\r\n\t }", "public void doCreateItem() {\r\n\t\tlogger.info(\"Se procede a crear el book \" + newItem.getDescription());\r\n\t\tBook entity = newItem.getEntity();\r\n\t\tentity.setUser(Global.activeUser());\r\n\t\tentity.setBookBalance(BigDecimal.ZERO);\r\n\t\tentity.setTotalBudget(BigDecimal.ZERO);\r\n\t\tentity.setTotalIncome(BigDecimal.ZERO);\r\n\t\tentity.setTotalExpenses(BigDecimal.ZERO);\r\n\t\tentity = bookService.create(entity);\r\n\r\n\t\t// Actualizar el mapa de books\r\n\t\tGlobalBook.instance().put(new BookData(entity));\r\n\r\n\t\tlogger.info(\"Se ha creado el book \" + newItem.getDescription());\r\n\t\tnewItem = new BookData(new Book());\r\n\t\tFacesContext.getCurrentInstance().addMessage(null,\r\n\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO, \"Libro creado\", \"Libro creado correctamente\"));\r\n\t}", "void enqueue(T item) {\n contents.addAtTail(item);\n }", "public void putItemLIFO(T item) {\n\t\tNode newItem = new Node(item);\n\t\tif (first == null) { \n\t\t\tfirst = newItem; \n\t\t} else {\n\t\t\tnewItem.next = first;\n\t\t\tfirst = newItem;\n\t\t}\n\t}", "public void push(T item){\n Node<T> n;\n if(this.isEmpty()){\n n = new Node<>();\n n.setData(item);\n } else {\n n = new Node<>(item, this._top);\n }\n\n this._top = n;\n }", "@JsonIgnore\n @Override\n public Item createDynamoDbItem() {\n return new Item()\n .withPrimaryKey(\"widgetId\", this.getWidgetId())\n .with(\"widgetJSONString\", WidgetSerializer.serialize(this));\n }", "public void addItem(Item item) {\n\t\titems.add(item);\n\t}", "public void push(String item) {\r\n\t\t\r\n\t\tNode node = new Node();\r\n\t\tnode.data=item;\r\n\t\tnode.next=last;\r\n\t\tlast=node;\r\n\t}" ]
[ "0.70924103", "0.6496833", "0.6445138", "0.63183177", "0.61984724", "0.615943", "0.6132817", "0.61166424", "0.61156297", "0.60776603", "0.60603535", "0.6043947", "0.60031635", "0.5994582", "0.5975167", "0.5955627", "0.59354967", "0.592628", "0.5885138", "0.587324", "0.5862367", "0.58588064", "0.58557063", "0.58541787", "0.585003", "0.5835576", "0.5821086", "0.5802666", "0.57986426", "0.57946795", "0.57852435", "0.5770151", "0.5770151", "0.5769115", "0.5756416", "0.5753977", "0.57462186", "0.57404786", "0.5726503", "0.57255", "0.5714222", "0.5710129", "0.56695944", "0.5642676", "0.5641822", "0.56395537", "0.561844", "0.5606714", "0.560443", "0.5600752", "0.5596065", "0.5588115", "0.5585997", "0.5582928", "0.5582084", "0.5575335", "0.55739504", "0.55733997", "0.5566957", "0.5559646", "0.5547532", "0.55472016", "0.55447495", "0.55442226", "0.55439496", "0.554336", "0.5543273", "0.55425835", "0.5533293", "0.5533187", "0.55314213", "0.5528433", "0.55239534", "0.5523333", "0.55201167", "0.55146253", "0.5509762", "0.5507194", "0.5499937", "0.5494096", "0.5492615", "0.5490037", "0.5485834", "0.54836637", "0.54822457", "0.5478919", "0.5478919", "0.5478046", "0.54780453", "0.546849", "0.54659706", "0.5465197", "0.5462719", "0.5462275", "0.5460976", "0.5458735", "0.5453629", "0.5448", "0.5446078", "0.54447454", "0.54410154" ]
0.0
-1
The management interface for asynchronous serversockets for Coconut AIO.
public interface ServerSocketMXBean { /** * Returns all live server-socket IDs. Some server-socket included in the * returned array may have been terminated when this method returns. * * @return an array of <tt>long</tt>, each is a server-socket ID. * @throws java.lang.SecurityException if a security manager exists and the * caller does not have ManagementPermission("monitor"). */ long[] getAllServerSocketIds(); /** * Returns the total number of server-sockets opened since the Java virtual * machine started. * * @return the total number of server-sockets opened. */ long getTotalServerSocketsCount(); /** * Returns the peak open server-socket count since the Java virtual machine * started or the peak was reset. * * @return the peak live server-socket count. */ int getPeakServerSocketCount(); /** * Returns the current number of open server-sockets. * * @return the current number of open server-sockets. */ int getServerSocketCount(); /** * Returns the total number of sockets accepted by all server-sockets since * the Java virtual machine started. * * @return the total number of server-sockets opened. */ long getTotalAcceptCount(); /** * Returns the total number of sockets accepted by a server-socket with the * specified <tt>id</tt>. * * @param id the ID of the server-socket. Must be positive. * @return the total number of server-sockets opened. */ long getTotalAcceptCount(long id); /** * Returns the server-socket info for a server-socket of the specified * <tt>id</tt>. * <p> * This method returns a <tt>ServerSocketInfo</tt> object representing the * server-socket information for the server-socket of the specified ID. If a * server-socket of the given ID is not open or does not exist, this method * will return <tt>null</tt>. * <p> * <b>MBeanServer access </b>: <br> * The mapped type of <tt>ServerSocketInfo</tt> is <tt>CompositeData</tt> * with attributes as specified in * {@link ServerSocketInfo#from ServerSocketInfo}. * * @param id the ID of the server-socket. Must be positive. * @return a {@link ServerSocketInfo}object for the server-socket of the * given ID; <tt>null</tt> if the server-socket of the given ID is * not open or it does not exist. * @throws IllegalArgumentException if <tt>id &lt= 0</tt>. * @throws java.lang.SecurityException if a security manager exists and the * caller does not have ManagementPermission("monitor"). */ ServerSocketInfo getServerSocketInfo(long id); /** * Returns the server-socket info for each server-socket whose ID is in the * input array <tt>ids</tt>. * <p> * This method returns an array of the <tt>ServerSocketInfo</tt> objects. * If a server-socket of a given ID is not open or does not exist, the * corresponding element in the returned array will contain <tt>null</tt>. * <p> * <b>MBeanServer access </b>: <br> * The mapped type of <tt>ServerSocketInfo</tt> is <tt>CompositeData</tt> * with attributes as specified in * {@link ServerSocketInfo#from ServerSocketInfo}. * * @param ids an array of server-socket IDs * @return an array of the {@link ServerSocketInfo}objects, each containing * information about a server-socket whose ID is in the * corresponding element of the input array of IDs. * @throws IllegalArgumentException if any element in the input array * <tt>ids</tt> is <tt>&lt= 0</tt>. * @throws java.lang.SecurityException if a security manager exists and the * caller does not have ManagementPermission("monitor"). */ ServerSocketInfo[] getServerSocketInfo(long[] ids); /** * Resets the peak server-socket count to the current number of open * server-sockets. * * @throws java.lang.SecurityException if a security manager exists and the * caller does not have ManagementPermission("control"). * @see #getPeakServerSocketCount * @see #getServerSocketCount */ void resetPeakServerSocketCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void run()\n\t{\n\t\tSocket clientSocket;\n\t\tMemoryIO serverIO;\n\t\t// Detect whether the listener is shutdown. If not, it must be running all the time to wait for potential connections from clients. 11/27/2014, Bing Li\n\t\twhile (!super.isShutdown())\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// Wait and accept a connecting from a possible client residing on the coordinator. 11/27/2014, Bing Li\n\t\t\t\tclientSocket = super.accept();\n\t\t\t\t// Check whether the connected server IOs exceed the upper limit. 11/27/2014, Bing Li\n\t\t\t\tif (MemoryIORegistry.REGISTRY().getIOCount() >= ServerConfig.MAX_SERVER_IO_COUNT)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the upper limit is reached, the listener has to wait until an existing server IO is disposed. 11/27/2014, Bing Li\n\t\t\t\t\t\tsuper.holdOn();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (InterruptedException e)\n\t\t\t\t\t{\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// If the upper limit of IOs is not reached, a server IO is initialized. A common Collaborator and the socket are the initial parameters. The shared common collaborator guarantees all of the server IOs from a certain client could notify with each other with the same lock. Then, the upper limit of server IOs is under the control. 11/27/2014, Bing Li\n//\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator(), ServerConfig.COORDINATOR_PORT_FOR_MEMORY);\n\t\t\t\tserverIO = new MemoryIO(clientSocket, super.getCollaborator());\n\t\t\t\t// Add the new created server IO into the registry for further management. 11/27/2014, Bing Li\n\t\t\t\tMemoryIORegistry.REGISTRY().addIO(serverIO);\n\t\t\t\t// Execute the new created server IO concurrently to respond the client requests in an asynchronous manner. 11/27/2014, Bing Li\n\t\t\t\tsuper.execute(serverIO);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public interface AsyncConnection {\n \n /**\n * Return <tt>true</tt> is the current connection associated with \n * this event has been suspended.\n */\n public boolean isSuspended();\n \n \n /**\n * Suspend the current connection. Suspended connection are parked and\n * eventually used when the Grizzlet Container initiates pushes.\n */\n public void suspend() throws AlreadyPausedException;\n \n \n /**\n * Resume a suspended connection. The response will be completed and the \n * connection become synchronous (e.g. a normal http connection).\n */\n public void resume() throws NotYetPausedException;\n \n \n /**\n * Advises the Grizzlet Container to start intiating a push operation, using \n * the argument <code>message</code>. All asynchronous connection that has \n * been suspended will have a chance to push the data back to their \n * associated clients.\n *\n * @param message The data that will be pushed.\n */\n public void push(String message) throws IOException;\n \n \n /**\n * Return the GrizzletRequest associated with this AsynchConnection. \n */\n public GrizzletRequest getRequest();\n \n \n /**\n * Return the GrizzletResponse associated with this AsynchConnection. \n */\n public GrizzletResponse getResponse();\n \n \n /**\n * Is this AsyncConnection being in the process of being resumed?\n */\n public boolean isResuming();\n \n \n /**\n * Is this AsyncConnection has push events ready to push back data to \n * its associated client.\n */\n public boolean hasPushEvent();\n \n \n /**\n * Return the <code>message</code> that can be pushed back.\n */\n public String getPushEvent();\n \n \n /**\n * Is the current asynchronous connection defined as an HTTP Get.\n */\n public boolean isGet();\n \n \n /**\n * Is the current asynchronous connection defined as an HTTP Get. \n */\n public boolean isPost();\n \n \n /**\n * Return the number of suspended connections associated with the current\n * {@link Grizzlet}\n */\n public int getSuspendedCount();\n \n \n}", "@Override\n public void completed(AsynchronousSocketChannel sockChannel, AsynchronousServerSocketChannel serverSockMain ) {\n serverSockMain.accept( serverSockMain, this );\n\n //Print IP Address\n try{\n System.out.println( sockChannel.getLocalAddress());\n clientChannel = sockChannel;\n }catch(IOException e) {\n\n e.printStackTrace();\n }\n\n //Add To Client List\n //list.add(list.size(), sockChannel);\n\n //start to read message from the client\n startRead( sockChannel );\n \n }", "@Override\n public void completed(AsynchronousSocketChannel sockChannel, AsynchronousServerSocketChannel serverSock ) {\n serverSock.accept( serverSock, this );\n\n try{\n //Print IP Address\n System.out.println( sockChannel.getLocalAddress().toString());\n\n //Add To Client List\n list.add(list.size(), sockChannel);\n\n }catch(IOException e) {\n e.printStackTrace();\n }\n\n //start to read message from the client\n startRead( sockChannel );\n \n }", "public void runServer() throws IOException {\n\t\twhile (true) {\n\t\t\tSocket client = server.accept();\n\t\t\t// pass in protocol as argument so that there is only one protocol for\n\t\t\t// the entire server\n\t\t\tservice.submit(new PollClientHandler(client, poll));\n\t\t}\n\t}", "public interface ClientServiceAsync {\n\t/**\n\t * Save a Client instance to the data store\n\t * @param c The client to be saved\n\t * @param cb The async callback\n\t */\n\tpublic void saveClient(Client c, AsyncCallback<Void> cb);\n\t\n\t/**\n\t * Load all the Client instances from the server\n\t * @param cb The async callback\n\t */\n\tpublic void getClients(AsyncCallback<List<Client>> cb);\n\t\n\t/**\n\t * Get a Client by id\n\t * @param id The client id\n\t * @param cb The async callback\n\t */\n\tpublic void getClient(String id, AsyncCallback<Client> cb);\n\n\t/**\n\t * Delete a list of clients from the data store\n\t * @param clients The list of clients to be deleted\n\t * @param cb The async callback\n\t */\n\tpublic void deleteClients(Collection<Client> clients, AsyncCallback<Void> cb);\n\t\n\tpublic void saveClients(Collection<Client> clients, AsyncCallback<Void> cb);\n}", "public interface INetworkHandler<T> extends Runnable {\n\n /**\n * The main method which starts the protocol implementation.\n * <p>\n * {@inheritDoc}\n */\n void run();\n\n /**\n * Sends the request of the network handler to all online peers of the node.\n *\n * @throws ConnectionFailedException If the other online clients can not be determined\n */\n void sendRequest(IRequest request)\n throws ConnectionFailedException;\n\n /**\n * Blocks until all notified clients have responded\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await()\n throws InterruptedException;\n\n /**\n * Blocks for the given timeout.\n *\n * @param timeout The timeout to wait\n * @param timeUnit The time unit which qualifies the timeout\n *\n * @throws InterruptedException If the thread got interrupted while waiting\n */\n void await(long timeout, TimeUnit timeUnit)\n throws InterruptedException;\n\n /**\n * Returns true once all notified clients have responded.\n *\n * @return True, if all notified clients have responded, false otherwise.\n */\n boolean isCompleted();\n\n /**\n * Returns the progress until this handler's communication\n * is considered complete (See {@link INetworkHandler#isCompleted()}).\n *\n * Returns values between 100 and 0 (inclusive).\n *\n * @return The progress\n */\n int getProgress();\n\n\n /**\n * Returns the final result of the exchange.\n * Note, that the result may be null before all clients have responded.\n *\n * @return The result once the all necessary clients responded. May be null before all clients have responded\n */\n T getResult();\n}", "public void conectServer() {\n\n\t}", "public interface AsynService {\n void asynMethod();\n}", "public void collectAsync() throws IOException {\n rmiAcceptor = new RMIAcceptor(rmiPort);\n socketAcceptor = new SocketAcceptor(socketPort);\n // We prepare the task to get our first Future, it will then be overwritten once we get the promised result\n currentRMITask = threadPool.submit(rmiAcceptor);\n currentSocketTask = threadPool.submit(socketAcceptor);\n\n threadPool.execute(this::scheduledTask);\n }", "public interface DBServiceAsync {\r\n\tvoid greetServer(String input, AsyncCallback<String> callback);\r\n\r\n\tvoid startDB(AsyncCallback<String> callback);\r\n\r\n\tvoid stopDB(AsyncCallback<String> callback);\r\n\r\n\tvoid createDB(AsyncCallback<String> callback);\r\n}", "@Override\n public void run() {\n ServerChannel channel;\n if (socketFactory == null) {\n socketFactory = this;\n }\n serverLoop : while (!shutdown) {\n try {\n serverSocket = socketFactory.createServerSocket(port);\n\n Logger.log (new LogEvent (this, \"iso-server\",\n \"listening on \" + (bindAddr != null ? bindAddr + \":\" : \"port \") + port\n + (backlog > 0 ? \" backlog=\"+backlog : \"\")\n ));\n while (!shutdown) {\n try {\n if (pool.getAvailableCount() <= 0) {\n try {\n serverSocket.close();\n fireEvent(new ISOServerShutdownEvent(this));\n } catch (IOException e){\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n }\n\n for (int i=0; pool.getIdleCount() == 0; i++) {\n if (shutdown) {\n break serverLoop;\n }\n if (i % 240 == 0 && cfg.getBoolean(\"pool-exhaustion-warning\", true)) {\n LogEvent evt = new LogEvent (this, \"warn\");\n evt.addMessage (\n \"pool exhausted \" + serverSocket.toString()\n );\n evt.addMessage (pool);\n Logger.log (evt);\n }\n ISOUtil.sleep (250);\n }\n serverSocket = socketFactory.createServerSocket(port);\n }\n channel = (ServerChannel) clientSideChannel.clone();\n channel.accept (serverSocket);\n\n if (cnt[CONNECT]++ % 100 == 0) {\n purgeChannels ();\n }\n WeakReference wr = new WeakReference (channel);\n channels.put (channel.getName(), wr);\n channels.put (LAST, wr);\n pool.execute (createSession(channel));\n setChanged ();\n notifyObservers (this);\n fireEvent(new ISOServerAcceptEvent(this));\n if (channel instanceof Observable) {\n ((Observable)channel).addObserver (this);\n }\n } catch (SocketException e) {\n if (!shutdown) {\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n continue serverLoop;\n }\n } catch (IOException e) {\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n }\n } // while !shutdown\n } catch (Throwable e) {\n Logger.log (new LogEvent (this, \"iso-server\", e));\n relax();\n }\n }\n }", "public interface ConnectionManager\n{\n String ROLE = ConnectionManager.class.getName();\n\n /**\n * Start managing a connection.\n * Management involves accepting connections and farming them out to threads\n * from pool to be handled.\n *\n * @param name the name of connection\n * @param socket the ServerSocket from which to\n * @param handlerFactory the factory from which to aquire handlers\n * @param threadPool the thread pool to use\n * @exception Exception if an error occurs\n */\n void connect( String name,\n ServerSocket socket,\n ConnectionHandlerFactory handlerFactory,\n ThreadPool threadPool )\n throws Exception;\n\n /**\n * Start managing a connection.\n * This is similar to other connect method except that it uses default thread pool.\n *\n * @param name the name of connection\n * @param socket the ServerSocket from which to\n * @param handlerFactory the factory from which to aquire handlers\n * @exception Exception if an error occurs\n */\n void connect( String name,\n ServerSocket socket,\n ConnectionHandlerFactory handlerFactory )\n throws Exception;\n\n /**\n * This shuts down all handlers and socket, waiting for each to gracefully shutdown.\n *\n * @param name the name of connection\n * @exception Exception if an error occurs\n */\n void disconnect( String name )\n throws Exception;\n\n /**\n * This shuts down all handlers and socket.\n * If tearDown is true then it will forcefully shutdown all connections and try\n * to return as soon as possible. Otherwise it will behave the same as\n * void disconnect( String name );\n *\n * @param name the name of connection\n * @param tearDown if true will forcefully tear down all handlers\n * @exception Exception if an error occurs\n */\n void disconnect( String name, boolean tearDown )\n throws Exception;\n}", "protected void mainTask() {\n\ttry {\n\t socket = serverSocket.accept();\t\n\t spawnConnectionThread(socket);\n\t} catch (IOException e) {\n\t return;\n\t}\n }", "public AsyncServer(int port) throws IOException {\n serverChannel= AsynchronousServerSocketChannel.open();\n serverChannel.bind(new InetSocketAddress(port));\n log.debug(serverChannel.getLocalAddress().toString());\n InetSocketAddress address = (InetSocketAddress) serverChannel.getLocalAddress();\n this.port = address.getPort();\n log.debug(\"PORT:\" + this.port);\n log.debug(Integer.toString(port));\n results = ConcurrentHashMap.newKeySet();\n clientChannels = ConcurrentHashMap.newKeySet();\n }", "private void runServer() {\n while(true) {\n // This is a blocking call and waits until a new client is connected.\n Socket clientSocket = waitForClientConnection();\n handleClientInNewThread(clientSocket);\n } \n }", "public interface SocketControl {\n\n /**\n * 获取服务的IP和端口\n * @return 格式:ip:port,如127.0.0.1:8080\n */\n String getIpPort();\n\n /**\n * 获取服务的ServiceId\n * @return 服务的ServiceId\n */\n String getServiceId();\n\n /**\n * 获取服务的InstanceId\n * @return 服务的InstanceId\n */\n String getInstanceId();\n\n\n /**\n * 获取模块名称,也可以直接调用getIpPort()\n * @return 模块名称\n */\n String getModelName();\n\n\n /**\n * 模块下连接的标示\n * @param channel 管道对象\n * @return uk\n */\n String getUniqueKey(Channel channel);\n\n\n /**\n * 模块下连接的标示\n * @param ctx 管道对象\n * @return uk\n */\n String getUniqueKey(ChannelHandlerContext ctx);\n\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(ChannelHandlerContext ctx,String key);\n\n /**\n * 绑定key\n * @param ctx 当前连接对象\n * @param key key\n */\n void bindKey(Channel ctx,String key);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(Channel ctx);\n\n /**\n * 获取key\n * @param ctx 当前链接对象\n * @return key\n */\n String getKey(ChannelHandlerContext ctx);\n\n\n /**\n * 重置心跳时间\n * @param ctx 当前连接对象\n * @param heartTime 心跳时间(秒)\n */\n void resetHeartTime(Channel ctx,int heartTime);\n\n\n\n}", "private void init() {\n\n\t\tgroup = new NioEventLoopGroup();\n\t\ttry {\n\t\t\thandler = new MoocHandler();\n\t\t\tBootstrap b = new Bootstrap();\n\t\t\t\n\t\t\t\n\t\t\t//ManagementInitializer ci=new ManagementInitializer(false);\n\t\t\t\n\t\t\tMoocInitializer mi=new MoocInitializer(handler, false);\n\t\t\t\n\t\t\t\n\t\t\t//ManagemenetIntializer ci = new ManagemenetIntializer(handler, false);\n\t\t\t//b.group(group).channel(NioSocketChannel.class).handler(handler);\n\t\t\tb.group(group).channel(NioSocketChannel.class).handler(mi);\n\t\t\tb.option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 10000);\n\t\t\tb.option(ChannelOption.TCP_NODELAY, true);\n\t\t\tb.option(ChannelOption.SO_KEEPALIVE, true);\n\n\t\t\t// Make the connection attempt.\n\t\t\tchannel = b.connect(host, port).syncUninterruptibly();\n\n\t\t\t// want to monitor the connection to the server s.t. if we loose the\n\t\t\t// connection, we can try to re-establish it.\n\t\t\tChannelClosedListener ccl = new ChannelClosedListener(this);\n\t\t\tchannel.channel().closeFuture().addListener(ccl);\n\t\t\tSystem.out.println(\" channle is \"+channel);\n\t\t} catch (Exception ex) {\n\t\t\tlogger.error(\"failed to initialize the client connection\", ex);\n\n\t\t}\n\n\t\t// start outbound message processor\n\t//\tworker = new OutboundWorker(this);\n\t//\tworker.start();\n\t}", "public Socket awaitMessages(){\n Socket s = null;\n try { \n s = serverSocket.accept();\n\t } catch (IOException e) {\n System.out.println(\"Could not listen on port \" + portNumber);\n }\n return s;\n }", "public synchronized void listen() {\n// synchronized (this) {\n try {\n String input;\n if ((input = in.readLine()) != null) {\n parseCommand(input);\n }\n } catch (IOException ex) {\n Logger.getLogger(ClientIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n// }\n }", "public interface SocketTask extends Task\n{\n\t/**\n\t * Method sets to object socketWrapper object to allow task to use this socket.\n\t * @param socket socket wrapper object.\n\t */\n\tpublic void setSocket(SocketWrapper socket);\n}", "void onConnect(SocketIOOutbound outbound);", "public interface GeneralService {\n\n /**\n * Returns general server data\n */\n Request getGeneralData(AsyncCallback<GeneralData> callback);\n\n}", "@Override\n public void onAccepted(AsyncSocket socket) {\n if (asyncClient != null) {\n asyncClient.close();\n }\n asyncClient = (AsyncNetworkSocket) socket;\n asyncClient.setDataCallback(new DataCallback() {\n @Override\n public void onDataAvailable(DataEmitter emitter, ByteBufferList bb) {\n Timber.i(\"Data received: %s\", bb.readString());\n }\n });\n asyncClient.setClosedCallback(new CompletedCallback() {\n @Override\n public void onCompleted(Exception ex) {\n asyncClient = null;\n Timber.i(\"Client socket closed\");\n }\n });\n Timber.i(\"Client socket connected\");\n }", "public interface ConnectionServiceAsync {\n void searchSynonyms(String input, AsyncCallback<List<String>> callback) throws IllegalArgumentException;;\n void callMaplabelsToSynonyms(AsyncCallback<Boolean> callback) throws IllegalArgumentException;;\n\n\n}", "public interface ServerBasique extends Observable{\n\t\n\tpublic void ouvrirConnection(int port) throws Exception;\n\t\n\tpublic void envoyer(String message) throws Exception;\n\t\n\tpublic String recevoir() throws Exception;\n\t\n}", "private static void server() throws IOException {\n\t\tServerSocket serverSocket = new ServerSocket(10999);\n\t\t//listener, waiting connection\n\t\tSocket socket = serverSocket.accept();//block\n\t\t//input --> receive / output --> send\n\t\tInputStream inputStream = socket.getInputStream();\n\t\tOutputStream outputStream = socket.getOutputStream();\n\t\t//byte array (stream)\n\t\tbyte[] b = new byte[1024];\n\t\t//read/receive\n\t\tinputStream.read(b);\n\t\t//\n\t\tString resp = client(b);\n\t\t//\n\t\toutputStream.write(resp.getBytes());\n\t\t//closing\n\t\tsocket.close();\n\t\t//close server\n\t\tserverSocket.close();\n\t}", "public void listen() throws IOException, InterruptedException{\n\t\tString response;\n\t\twhile (!serverSoc.isClosed() && (response = fromServer.readLine()) != null){\n\t\t\tif (gui != null){\n\t\t\t\tgui.giveResponse(response);\n\t\t\t}\n\t\t\tSystem.out.println(response);\n\t\t\tbotAction(response);\n\t\t}\n\t\tqueue.add(\"\");\n\t\tgameOver = true;\n\t}", "public static void main(String[] args) throws Exception {\n EventLoopGroup bossGroup = new NioEventLoopGroup(1);\n EventLoopGroup workerGroup = new NioEventLoopGroup(8);\n\n //\n ServerBootstrap bootstrap = new ServerBootstrap();\n\n try {\n //\n bootstrap.group(bossGroup, workerGroup)\n .channel(NioServerSocketChannel.class) // use this as channel in boss group\n .option(ChannelOption.SO_BACKLOG, 128) // set initial queue connection count\n .childOption(ChannelOption.SO_KEEPALIVE, true) // set connection type, keep alive\n // set handler to the workerGroup, handler() will set to the BossGroup\n .childHandler(new ChannelInitializer<SocketChannel>() {\n // define actions along with channel creation (getting SocketChannel from ServeSocketChannel in nio\n // add handler to the pipeline\n @Override\n protected void initChannel (SocketChannel ch) throws Exception {\n // can utilize channel to push message to different client since one channel correspond to one client\n System.out.println(\"client socket channel hashcode = \" + ch.hashCode());\n ch.pipeline().addLast(new NettyServerHandler());\n }\n }); // set worker group handler\n\n System.out.println(\"...Server instance is ready\");\n\n // bind to a port (non-blocking)\n // start the server\n // sync = block until future ready\n ChannelFuture channelFuture = bootstrap.bind(6668).sync();\n System.out.println(\"After future sync\");\n\n // You can add listener to ChannelFuture\n channelFuture.addListener(new ChannelFutureListener() {\n @Override\n public void operationComplete(ChannelFuture channelFuture) throws Exception {\n if (channelFuture.isSuccess()) {\n System.out.println(\"connect success\");\n } else {\n System.out.println(\"connect fail\");\n }\n }\n });\n\n //\n channelFuture.channel().closeFuture().sync();\n\n\n\n } finally {\n bossGroup.shutdownGracefully();\n workerGroup.shutdownGracefully();\n }\n }", "public interface Server extends Endpoint, Resetable {\n\n /**\n * is bound.\n *\n * @return bound\n */\n boolean isBound();\n\n /**\n * get channels.\n *\n * @return channels\n */\n Collection<Channel> getChannels();\n\n /**\n * get channel.\n *\n * @param remoteAddress\n * @return channel\n */\n Channel getChannel(InetSocketAddress remoteAddress);\n\n}", "public interface ReplicaRepositoryServiceAsync extends IAsyncRemoteServiceProxy {\n\t\n\t/**\n\t * Add the specified ontology to the pool of shared ontologies. The ontology\n\t * will belong to no group. Use <code>addOWLOntology(OWLOntology, ID)</code>\n\t * if you want to set the group to which the ontology belongs.\n\t * \n\t * @param ontology\n\t * @return\n\t * @throws ReplicaOntologyAddException\n\t * \n\t * @deprecated use addOWLOntology(OWLOntology, ID) instead\n\t */\n\t// OWLOntology addOWLOntology(OWLOntology ontology) throws\n\t// ReplicaOntologyAddException;\n\n\t/**\n\t * Add the specified ontology to the pool of shared ontologies in\n\t * <code>groups</code>. If <code>groups</code> is null, then the ontology will\n\t * belong to no group. If <code>groups</code> does not exist yet, it will be\n\t * created.\n\t * \n\t * @param ontology\n\t * @param groups\n\t * @param listener\n\t * @throws AddException\n\t */\n\tvoid addOWLOntologyAsync(OWLOntology ontology, Set<? extends Object> groups,\n\t\t\tIAsyncCallback<String> callback);\n//\t\t\tthrows AddException;\n\n\t/**\n\t * Fetches the ontology with the specified OWLOntologyID.\n\t * \n\t * @param ontologyID\n\t * @param listener\n\t * @throws FetchException\n\t */\n\tvoid getOWLOntologyAsync(OWLOntologyID ontologyID,\n\t\t\tIAsyncCallback<OWLOntology> callback);\n//\t\t\tthrows FetchException;\n\n\t/**\n\t * Returns IDs of all shared ontologies or an empty list if none found.\n\t * \n\t * @deprecated use getOWLOntologies(String group) instead\n\t */\n\t// List<OWLOntologyID> getOWLOntologies() throws\n\t// ReplicaOntologyFetchException;\n\n\t/**\n\t * Returns IDs of all shared ontologies which belong to the specified groups.\n\t * <br>\n\t * If <code>groups</code> is null, IDs of all shared ontologies will be\n\t * returned.<br>\n\t * Beware that the specified set implementation has to be serializable.\n\t * \n\t * @param groups\n\t * @param listener\n\t */\n\tvoid getOWLOntologyIDsAsync(Set<Object> groups,\n\t\t\tIAsyncCallback<String> callback);\n//\t\t\tthrows FetchException;\n\n\t/**\n\t * Returns a set of all group names currently registered.\n\t * \n\t * @param listener\n\t */\n\tvoid getGroupsAsync(IAsyncCallback<Set<Object>> callback);\n//\t\t\tthrows FetchException;\n\t\n}", "public interface AsyncRunner {\n\n\t\tvoid closeAll();\n\n\t\tvoid closed(ClientHandler clientHandler);\n\n\t\tvoid exec(ClientHandler code);\n\t}", "public interface IConnector extends Callable<Boolean> {\n\n enum State {\n DISCOVER,\n RECONNECT,\n WAIT_FOR_CONNECT_BUTTON_PRESS,\n CONNECT_BUTTON_IS_PRESSED,\n WAIT_FOR_CMD,\n WAIT_UPLOAD,\n WAIT_EXECUTION,\n DISCONNECT,\n WAIT_FOR_SERVER,\n UPDATE,\n UPDATE_SUCCESS,\n UPDATE_FAIL,\n ERROR_HTTP,\n ERROR_UPDATE,\n ERROR_BRICK,\n ERROR_DOWNLOAD,\n TOKEN_TIMEOUT\n }\n\n String KEY_TOKEN = \"token\";\n String KEY_CMD = \"cmd\";\n String KEY_SUBTYPE = \"subtype\";\n\n String CMD_REGISTER = \"register\";\n String CMD_PUSH = \"push\";\n String CMD_ISRUNNING = \"isrunning\";\n\n String CMD_REPEAT = \"repeat\";\n String CMD_ABORT = \"abort\";\n String CMD_UPDATE = \"update\";\n String CMD_DOWNLOAD = \"download\";\n String CMD_DOWNLOAD_RUN = \"download_run\";\n String CMD_CONFIGURATION = \"configuration\";\n\n /**\n * Search for a specific robot type for auto detection at the beginning of the program. The robot is considered to not run a user program at this time to be\n * available.\n *\n * @return true if a robot is connected, false otherwise\n */\n boolean findRobot();\n\n /**\n * Tell the connector to collect necessary data from the robot and initialise a registration to Open Roberta.\n */\n void userPressConnectButton();\n\n /**\n * Disconnect the current robot properly and search for robots again (start condition of the USB program).\n */\n void userPressDisconnectButton();\n\n /**\n * Shut down the connector for closing the USB program.\n */\n void close();\n\n /**\n * Tell the gui, that the connector state has changed.\n *\n * @param state the state of the connector\n */\n void notifyConnectionStateChanged(State state);\n\n /**\n * Get the token to display in the gui.\n *\n * @return the token\n */\n String getToken();\n\n /**\n * Get the robot name to display in the gui.\n *\n * @return robot name\n */\n String getBrickName();\n\n /**\n * In this state, the connector will download system libraries from the server, and upload it to the robot.\n */\n void update();\n\n /**\n * Update the server communicator's address to which it will connect.\n *\n * @param customServerAddress the specified server address\n */\n void updateCustomServerAddress(String customServerAddress);\n\n /**\n * If gui fields are empty but advanced options is checked, use the default server address.\n */\n void resetToDefaultServerAddress();\n}", "public void acceptSocket(AsynchronousSocketChannel arg0) {\n\r\n\t\tnew TCPClient(arg0);\r\n\t}", "public interface IceAdapter {\n CompletableFuture<Integer> start(int gameId);\n\n void stop();\n\n void setIceServers(Collection<CoturnServer> coturnServers);\n}", "@Override\n public void socket() {\n }", "public interface GreetingServiceAsync {\r\n \r\n public void getAvailableDatasets(AsyncCallback<Map<Integer,String> >datasetResults);\r\n public void loadDataset(int datasetId,AsyncCallback<DatasetInformation> asyncCallback);\r\n public void computeLineChart(int datasetId,AsyncCallback<LineChartResults> asyncCallback);\r\n public void computeSomClustering(int datasetId,int linkage,int distanceMeasure,AsyncCallback<SomClusteringResults> asyncCallback);\r\n public void computeHeatmap(int datasetId,List<String>indexer,List<String>colIndexer,AsyncCallback<ImgResult> asyncCallback );\r\n public void computePCA(int datasetId,int comI,int comII, AsyncCallback<PCAResults> asyncCallback);\r\n public void computeRank(int datasetId,String perm,String seed,String[] colGropNames,String log2, AsyncCallback<RankResult> asyncCallback);\r\n public void createRowGroup(int datasetId, String name, String color, String type, int[] selection, AsyncCallback<Boolean> asyncCallback);\r\n public void createColGroup(int datasetId, String name, String color, String type, String[] selection, AsyncCallback<Boolean> asyncCallback);\r\n public void createSubDataset(String name,int[] selection,AsyncCallback<Integer> asyncCallback);\r\n public void updateDatasetInfo(int datasetId, AsyncCallback<DatasetInformation> asyncCallback);\r\n public void activateGroups(int datasetId,String[] rowGroups,String[] colGroups, AsyncCallback<DatasetInformation> asyncCallback);\r\n\r\n \r\n public void saveDataset(int datasetId, String newName,AsyncCallback<Integer> asyncCallback);\r\n \r\n}", "public interface IOControl {\n\n /**\n * Requests event notifications to be triggered when the underlying\n * channel is ready for input operations.\n */\n void requestInput();\n\n /**\n * Suspends event notifications about the underlying channel being\n * ready for input operations.\n */\n void suspendInput();\n\n /**\n * Requests event notifications to be triggered when the underlying\n * channel is ready for output operations.\n */\n void requestOutput();\n\n /**\n * Suspends event notifications about the underlying channel being\n * ready for output operations.\n */\n void suspendOutput();\n\n /**\n * Shuts down the underlying channel.\n *\n * @throws IOException in an error occurs\n */\n void shutdown() throws IOException;\n\n}", "public void creatSocket() {\n\n try {\n\n server = new ServerSocket(PORT);\n\n mExecutorService = Executors.newCachedThreadPool();\n\n while (true) {\n\n Socket client = server.accept();\n\n mExecutorService.execute(new SockectService(client));\n\n Log.d(TAG, \"Creating Socket\" );\n\n }\n\n } catch (Exception e) {\n\n e.printStackTrace();\n\n }\n\n }", "public SocketIOServer getServer() {\n return server;\n }", "private void startServer() throws IOException {\n while (true) {\n System.out.println(\"[1] Waiting for connection...\");\n\n client = server.accept();\n System.out.println(\"[2] Connection accepted from: \" + client.getInetAddress());\n\n in = new BufferedReader(new InputStreamReader(client.getInputStream()));\n out = new PrintStream(client.getOutputStream(), true);\n\n while (!in.ready()) ;\n\n String line = in.readLine();\n ManageConnections connection = new ManageConnectionsFactory().getConnection(line);\n\n connection.goConnect(client, in, out);\n }\n }", "private static void handleServer(){\n // Main program. It should handle all connections.\n try{\n while(true){\n Socket clientSocket= serverSocket.accept();\n ServerThread thread = new ServerThread(clientSocket, connectedUsers, groups);\n thread.start();\n }\n }catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Test public void asyncExecute() throws Exception\n {\n \n GlobalSettings.getInstance().setDefaultExecutor( new ThreadPoolExecutor( \"client-model\", 1));\n \n createClients( 1);\n\n final XioClient client = clients.get( 0);\n client.connect( address, port).await();\n \n final int count = 10000;\n final Semaphore semaphore = new Semaphore( 0);\n \n XioCallback cb = new XioCallback( count, semaphore);\n\n String xml = \n \"<script>\" +\n \" <mutex on='$value'>\" +\n \" <set target='$value'>$value + 1</set>\" +\n \" <return>string( $value)</return>\" +\n \" </mutex>\" +\n \"</script>\";\n\n try\n {\n synchronized( serverContext)\n {\n IModelObject valueNode = new ModelObject( \"value\");\n valueNode.setValue( -1);\n serverContext.set( \"value\", valueNode);\n }\n \n IModelObject script = new XmlIO().read( xml);\n StatefulContext context = new StatefulContext();\n \n for( int i=0; i<count; i++)\n {\n client.execute( context, i, new String[ 0], script, cb, 600000);\n assertTrue( cb.failed == -1);\n }\n }\n catch( Exception e)\n {\n e.printStackTrace( System.err);\n }\n \n //System.out.println( \"Finished sending ...\");\n \n semaphore.acquireUninterruptibly();\n //System.out.println( \"Done.\");\n }", "public void readFromServer() throws IOException {\n\t\tclientBuffer.writeFrom(serverChannel);\n\t\tif (clientBuffer.isReadyToRead()) {\n\t\t\tregister();\n\t\t}\n\t}", "void clientReady();", "@Override\n public void initialize(URL location, ResourceBundle resources) {\n new Thread( ()-> {\n try {\n //Start the server\n ServerSocket serverSocket = new ServerSocket(8080);\n\n //show in terminal server has started\n System.out.println(\"Server Started: at \" + new Date() + \"\\n\");\n\n //main loop that will accept connections\n while (true) {\n //accept a new socket connection, this socket comes from client\n Socket clientSocket = serverSocket.accept();\n\n //thread that will handle what to do with new socket\n new Thread(new HandleAclient(clientSocket)).start();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }).start();\n\n }", "public interface GreetingServiceAsync {\r\n\tvoid getAll( String type, AsyncCallback<HashMap<String, String>> callback );\r\n\tvoid delete(String id,AsyncCallback callback );\r\n\tvoid getById(String idData, AsyncCallback<PhotoClient> callback);\r\n\tvoid addProject(String proName,AsyncCallback callback);\r\n\tvoid getProjectList(AsyncCallback callback);\r\n\tvoid getFolderChildren(FileModel model, AsyncCallback<List<FileModel>> children);\r\n \r\n}", "public TCPMessengerServer() {\n initComponents();\n customInitComponents();\n listenForClient(); \n }", "public void start() throws IOException {\n ThreadExecutor.registerClient(this.getClass().getName());\n tcpServer.startServer();\n }", "public interface SocketClientInterface {\n boolean openConnection();\n void handleSession();\n void closeSession();\n}", "public abstract void handleServer(ServerConnection conn);", "public void ObserverIO() {\r\n\t\twhile(running && !gameover) {\r\n\t\t\tif (engine.begin) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tToClient.writeBoolean(running);\r\n\t\t\t\t\tToClient.writeBoolean(engine.gameOver);\r\n\t\t\t\t\t// Exit the loop if game over\r\n\t\t\t\t\tif(engine.gameOver)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tturnDelta = engine.getActiveTurn();\r\n\t\t\t\t\tToClient.writeBoolean(turnDelta != recordedTurn);\r\n\t\t\t\t\tif (turnDelta != recordedTurn) {\r\n\t\t\t\t\t\tToClient.writeUTF(engine.OutputData());\r\n\t\t\t\t\t\trecordedTurn = turnDelta;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tyield();\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\tSystem.out.println(\"Thread Connection lost\");\r\n\t\t\t\t\tinterrupt();\r\n\t\t\t\t} \r\n\t\t\t} else {\r\n\t\t\t\tyield();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(engine.gameOver) {\r\n\t\t\ttry {\r\n\t\t\t\tToClient.writeUTF(engine.getGameOverMessage(TYPE));\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void execute() {\n\n\t\tPropertiesParser propertiesParser = new PropertiesParser();\n\t\t\n\t\tsetupServer(propertiesParser);\n\t\ttry {\n\t\t\t\n\t\t\tThread.sleep(SERVER_AFTER_RUN_DELAY);\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tint i=0;\n\t\tfor( ; i < propertiesParser.getReadersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,true);\n\t\t\t\n\t\t}\n\t\tfor(; i < propertiesParser.getReadersNum()+ propertiesParser.getWritersNum() ; i++){\n\t\t\t\n\t\t\tsetupClient(propertiesParser , i,false);\n\t\t\t\n\t\t}\n\t\t\n\t}", "public void setUpNetworking() throws Exception {\n this.serverSock = new ServerSocket(4242);\n\n groupChats = new HashMap<String, ArrayList<String>>();\n groupMessages = new HashMap<String, ArrayList<String>>();\n groupMessages.put(\"Global\", new ArrayList<String>());\n\n int socketOn = 0;\n\n while (true) {\n\n Socket clientSocket = serverSock.accept();\n System.out.println(\"Received connection \" + clientSocket);\n\n ClientObserver writer = new ClientObserver(clientSocket.getOutputStream());\n\n Thread t = new Thread(new ClientHandler(clientSocket, writer));\n t.start();\n System.out.println(\"Connection Established\");\n socketOn = 1;\n }\n }", "public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Lists nodes.\n * </pre>\n */\n default void listNodes(\n com.google.cloud.tpu.v2alpha1.ListNodesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListNodesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the details of a node.\n * </pre>\n */\n default void getNode(\n com.google.cloud.tpu.v2alpha1.GetNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.Node> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a node.\n * </pre>\n */\n default void createNode(\n com.google.cloud.tpu.v2alpha1.CreateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a node.\n * </pre>\n */\n default void deleteNode(\n com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Stops a node. This operation is only available with single TPU nodes.\n * </pre>\n */\n default void stopNode(\n com.google.cloud.tpu.v2alpha1.StopNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Starts a node.\n * </pre>\n */\n default void startNode(\n com.google.cloud.tpu.v2alpha1.StartNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the configurations of a node.\n * </pre>\n */\n default void updateNode(\n com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists queued resources.\n * </pre>\n */\n default void listQueuedResources(\n com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListQueuedResourcesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets details of a queued resource.\n * </pre>\n */\n default void getQueuedResource(\n com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.QueuedResource>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a QueuedResource TPU instance.\n * </pre>\n */\n default void createQueuedResource(\n com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a QueuedResource TPU instance.\n * </pre>\n */\n default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Resets a QueuedResource TPU instance\n * </pre>\n */\n default void resetQueuedResource(\n com.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getResetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates the Cloud TPU service identity for the project.\n * </pre>\n */\n default void generateServiceIdentity(\n com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateServiceIdentityMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists accelerator types supported by this API.\n * </pre>\n */\n default void listAcceleratorTypes(\n com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAcceleratorTypesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets AcceleratorType.\n * </pre>\n */\n default void getAcceleratorType(\n com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.AcceleratorType>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAcceleratorTypeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists runtime versions supported by this API.\n * </pre>\n */\n default void listRuntimeVersions(\n com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListRuntimeVersionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a runtime version.\n * </pre>\n */\n default void getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetRuntimeVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves the guest attributes for the node.\n * </pre>\n */\n default void getGuestAttributes(\n com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetGuestAttributesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Simulates a maintenance event.\n * </pre>\n */\n default void simulateMaintenanceEvent(\n com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSimulateMaintenanceEventMethod(), responseObserver);\n }\n }", "private void listen() {\n System.out.println(\"launch listen task\");\n listenTask = new AsyncTask<Void, String, IOException>() {\n @Override\n protected IOException doInBackground(Void... params) {\n try (BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()))) {\n String line;\n while ((line = in.readLine()) != null) {\n System.out.println(\"receive \" + line);\n publishProgress(line);\n }\n } catch (SocketException e) {\n if (e.toString().equals(\"java.net.SocketException: Socket closed\")) {\n //that's what will happen when task.cancel() is called.\n System.out.println(\"listening is stopped as socket is closed\");\n return null;\n } else {\n e.printStackTrace();\n return e;\n }\n } catch (IOException e) {\n e.printStackTrace();\n return e;\n }\n return null;\n }\n\n @Override\n protected void onProgressUpdate(String... values) {\n handler.accept(new Message(MsgType.SERVER, values[0]));\n }\n\n @Override\n protected void onPostExecute(IOException e) {\n if (e == null) {\n handler.accept(new Message(MsgType.INFO, \"listening finished\"));\n } else {\n handler.accept(new Message(MsgType.ERROR,\n \"exception while listening\" + \"\\n\" + e.toString()));\n }\n }\n\n @Override\n protected void onCancelled() {\n super.onCancelled();\n }\n };\n //the listen task will last for a quite long time (blocking) and thus should run in a parallel pool.\n listenTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n }", "private void listenForConnection() throws IOException {\n\twhile(true) {\n System.out.println(\"Waiting for connection...\");\n // Wait for client to connect\n Socket cli = server.accept();\n if(connlist.size() < MAX_CONN) {\n\t\t// if numCli is less then 100\n initConnection(cli);\n }\n\t}\n }", "public void awaitConnection(){\n System.out.println(\"Waiting for connection from client\");\n\n try {\n socket = server.accept();\n System.out.println(\"Client Connected!\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "public ControlCenter(){\n serverConnect = new Sockets();\n serverConnect.startClient(\"127.0.0.1\", 5000);\n port = 5000;\n }", "public interface AcnServiceAsync {\r\n\t\r\n\tvoid ordernarSequencia(Integer num1, Integer num2, AsyncCallback<Integer[]> callback) throws Exception;\r\n\t\r\n\tvoid recuperarListaPessoa(int quantidade, AsyncCallback<Map<String, List<Pessoa>>> callback);\r\n\t\r\n}", "public final static void main(String[] args) throws Exception {\n \n ThreadFactory threadFactory =\n new VerboseThreadFactory(log, Executors.defaultThreadFactory());\n \n ThreadPoolExecutor executor = (ThreadPoolExecutor)\n (MAX_THREADS == Integer.MAX_VALUE\n ? Executors.newCachedThreadPool(threadFactory)\n : Executors.newFixedThreadPool(MAX_THREADS, threadFactory));\n \n AsynchronousChannelProvider provider =\n AsynchronousChannelProvider.provider();\n \n AsynchronousChannelGroup group =\n provider.openAsynchronousChannelGroup(executor);\n \n log.log(Level.INFO, \"ChannelGroup is a {0}\", group.getClass());\n \n startSignal = new CountDownLatch(NUM_CLIENTS);\n doneSignal = new CountDownLatch(NUM_CLIENTS);\n \n log.log(Level.INFO,\n \"Prestarting {0,number,integer} threads\", NUM_THREADS);\n \n executor.setCorePoolSize(NUM_THREADS);\n executor.prestartAllCoreThreads();\n \n log.log(Level.INFO,\n \"Connecting {0,number,integer} clients\", NUM_CLIENTS);\n \n Set<EchoClient> clients = new HashSet<EchoClient>(NUM_CLIENTS);\n \n for (int i = 0; i < NUM_CLIENTS; ++i) {\n EchoClient client = new EchoClient(group);\n clients.add(client);\n client.connect();\n }\n \n startSignal.await();\n \n log.info(\"Starting test\");\n startTime = System.nanoTime();\n \n for (EchoClient client : clients)\n client.start();\n \n doneSignal.await();\n \n long ops = NUM_CLIENTS * NUM_MSGS * 2;\n long elapsed = System.nanoTime() - startTime;\n log.log(Level.INFO, \"Bytes read: {0} written:{1}\",\n new Object[] {\n totalBytesRead.get(),\n totalBytesWritten.get()\n });\n log.log(Level.INFO, \"{0} ops in {1} seconds = {2} ops/sec\",\n new Object[] {\n ops,\n TimeUnit.NANOSECONDS.toSeconds(elapsed),\n TimeUnit.SECONDS.toNanos(ops) / elapsed\n });\n \n group.shutdown();\n log.info(\"Awaiting group termination\"); \n if (! group.awaitTermination(5, TimeUnit.SECONDS)) {\n log.warning(\"Forcing group termination\");\n group.shutdownNow();\n if (! group.awaitTermination(5, TimeUnit.SECONDS)) {\n log.warning(\"Group could not be forcibly terminated\");\n }\n }\n if (group.isTerminated())\n log.info(\"Group terminated\");\n \n log.info(\"Terminating executor\");\n executor.shutdown();\n log.info(\"Awaiting executor termination\"); \n if (! executor.awaitTermination(5, TimeUnit.SECONDS)) {\n log.warning(\"Forcing executor termination\");\n executor.shutdownNow();\n if (! executor.awaitTermination(5, TimeUnit.SECONDS)) {\n log.warning(\"Executor could not be forcibly terminated\");\n }\n }\n if (executor.isTerminated())\n log.info(\"Executor terminated\");\n }", "public interface IOperation {\n Future<String> AsyncRead();\n Future AsyncWrite(final String message);\n}", "public interface CommunicationEventListener extends EventListener {\n // Ajoute un handler\n boolean handleServerResponse(String response);\n}", "public void serve() throws IOException {\n int req = 0;\n while (req<maxreq) {\n //block intil a client connects\n final Socket socket = serversocket.accept();\n //create a new thread to handle the client\n\n Thread handler = new Thread(new Runnable() {\n public void run() {\n try {\n try {\n handle(socket);\n } finally {\n socket.close();\n }\n } catch (IOException ioe) {\n // this exception wouldn't terminate serve(),\n // since we're now on a different thread, but\n // we still need to handle it\n ioe.printStackTrace();\n }\n }\n });\n // start the thread\n handler.start();\n req++;\n }\n\n }", "public Gossip_server() throws IOException {\n\t\t//creo socket\n\t\tsocket = new ServerSocket(Gossip_config.TCP_PORT);\n\t\t\n\t\t//creo thread pool\n\t\tpool = (ThreadPoolExecutor)Executors.newCachedThreadPool();\n\t\t\n\t\t//ininzializzo struttura dati\n\t\tdata = new Gossip_data();\n\t\t\n\t}", "public void handleNewConnections() throws IOException {\n\t\tfinal Socket newConnection = serverSocket.accept();\n\t\tnew Thread() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n \t\t\t\tclientOutputs.add(new PrintWriter(newConnection.getOutputStream(), true));\n \t\t\t\thandleCurrentConnection(newConnection);\n\t\t\t\t} catch(Exception e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}.start();\n\t}", "@Service\npublic interface BugFetch {\n @Async\n void fetch(BugzillaConnector conn) throws InterruptedException;\n}", "public interface Http2Client extends Closeable {\n\n /**\n * connect to remote address asynchronously\n * @return CompletableFuture contains {@link Void}\n */\n CompletableFuture<Void> connect();\n\n /**\n * send http request to remote address asynchronously\n * @param request http2 request\n * @return CompletableFuture contains response\n */\n CompletableFuture<HttpResponse> sendRequest(HttpRequest request);\n\n /**\n * send http request to remote address asynchronously,\n * and not wait far response\n * @param request http2 request\n * @return CompletableFuture contains nothing\n */\n CompletableFuture<Void> sendRequestOneWay(HttpRequest request);\n\n /**\n * send server-push ack to remote address asynchronously\n * @param pushAck server-push ack\n * @param streamId http2 streamId\n * @return CompletableFuture contains nothing\n */\n CompletableFuture<Void> sendPushAck(HttpPushAck pushAck, int streamId);\n}", "AsynchronousSocketChannel getClientSocket() {\n return clientSocket;\n }", "public static void main(String[] args) throws IOException\n {\n ServerSocket listener = new ServerSocket(PORT);\n\n while (true)\n {\n System.out.println(\"[SERVER] Waiting for connection . . . \");\n //takes in the user client sockets\n Socket client = listener.accept();\n //Announces that the user has connected\n System.out.println(\"[SERVER] Connected to client \" + client.getInetAddress());\n ClientHandler clientThread = new ClientHandler(client, clients);\n\n pool.execute(clientThread);\n }\n }", "public void host() throws IOException {\n\t\tserverSocket = new ServerSocket(getPort());\n\t\twhile (true) {\n\t\t\thandleNewConnections();\n\t\t}\n\t}", "public static void echo_server_single( int portno ) \nthrows IOException\n {\n ServerSocket acc = new ServerSocket( portno );\n print_my_host_port( portno );\n while( true )\n {\n stdout.printf(\"accepting incoming connections (hash== %s) ...\\n\", \n acc.hashCode());\n Socket com = acc.accept();\n tcp_peeraddr_print( com );\n EchoServerWorker esw = new EchoServerWorker(com);\n esw.run();\n } // while\n}", "@Override\n protected void initChannel(NioSocketChannel nioSocketChannel) throws Exception {\n nioSocketChannel.pipeline().addLast(new FirstClientHandler());\n }", "public void receiveInfoFromServerC() throws IOException\n\t{\n\t\tstatus = fromServer.readInt();\n\n\t\tif (status == PLAYER1WINS)\n\t\t{\t\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"You've won!\")); \n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == PLAYER2WINS)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - Player O has won!\"));\n\t\t\tcontinueToPlay = false;\n\t\t}\n\n\t\telse if (status == DRAW)\n\t\t{\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Game over - It's a tie!\"));\n\t\t\tsetMove(otherToken);\n\t\t\tcontinueToPlay = false;\n\t\t}\n\t\telse if (status == WAIT)\n\t\t{\n\t\t\tsetMove(currentToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Other player's turn.\"));\n\t\t\tmyTurn = false; \n\t\t}\n\t\telse if (status == CONTINUE)\n\t\t{\n\t\t\tsetMove(otherToken);\n\t\t\tPlatform.runLater(() -> lblStatus.setText(\"Your turn.\"));\n\t\t\tmyTurn = true;\n\t\t}\n\t}", "@Override\r\n public Object connect() {\n if(status()){\r\n //creates thread that checks messages in the network\r\n System.out.println(\"notifying network that connection is good\");\r\n notifyObservers(this);\r\n }\r\n return socket;\r\n }", "@Override\r\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t\tRecieveSocketOfClient(SocketForClient);\r\n\t\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\t\t// TODO: handle exception\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}", "public interface Master extends Runnable{\n\n /**\n * bind port and begin to accept request\n */\n void bind(WorkerPool workerPool);\n\n /**\n * handle the income requests ,accept and register to worker thread\n */\n void handleRequest();\n}", "@Override\n public void completed(Integer result, AsynchronousSocketChannel channel ) {\n }", "@Override\r\n\tpublic void doStart() {\n\t\tbootstrap.group(this.bossEventLoopGroup, this.workerEventLoopGroup)\r\n\t\t\t\t .channel(NioServerSocketChannel.class)\r\n\t\t\t\t //允许在同一端口上启动同一服务器的多个实例,只要每个实例捆绑一个不同的本地IP地址即可\r\n .option(ChannelOption.SO_REUSEADDR, true)\r\n //用于构造服务端套接字ServerSocket对象,标识当服务器请求处理线程全满时,用于临时存放已完成三次握手的请求的队列的最大长度\r\n// .option(ChannelOption.SO_BACKLOG, 1024) // determining the number of connections queued\r\n\r\n //禁用Nagle算法,即数据包立即发送出去 (在TCP_NODELAY模式下,假设有3个小包要发送,第一个小包发出后,接下来的小包需要等待之前的小包被ack,在这期间小包会合并,直到接收到之前包的ack后才会发生)\r\n .childOption(ChannelOption.TCP_NODELAY, true)\r\n //开启TCP/IP协议实现的心跳机制\r\n .childOption(ChannelOption.SO_KEEPALIVE, true)\r\n .childHandler(newInitializerChannelHandler());\r\n\t\ttry {\r\n\t\t\tInetSocketAddress serverAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(),getPort());\r\n\t\t\tchannelFuture = bootstrap.bind(getPort());\r\n//\t\t\tchannelFuture = bootstrap.bind(serverAddress).sync();\r\n\t\t\tLOGGER.info(\"connector {} started at port {},protocal is {}\",getName(),getPort(),getSchema());\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\tLOGGER.error(\"error happen when connector {} starting\",getName());\r\n\t\t}\r\n\t}", "interface Connect extends RconConnectionEvent, Cancellable {}", "void initAndListen() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\tSocket clientSocket = serverSocket.accept();\n\t\t\t\t// Startuje nowy watek z odbieraniem wiadomosci.\n\t\t\t\tnew ClientHandler(clientSocket, this);\n\t\t\t} catch (IOException e) {\n\t\t\t\tSystem.err.println(\"Accept failed.\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "public interface ISocketEchoServer extends ISocketServer\r\n{\r\n\r\n}", "private void manageClients() {\n manage = new Thread(\"Manage\") {\n public void run() {\n //noinspection StatementWithEmptyBody\n while (running) {\n sendToAll(\"/p/server ping/e/\".getBytes());\n try {\n Thread.sleep(1500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n //noinspection ForLoopReplaceableByForEach\n for (int i = 0; i < clients.size(); i++) {\n ServerClient tempClient = clients.get(i);\n if (!clientResponse.contains(tempClient.getID())) {\n if (tempClient.getAttempt() >= MAX_ATTEMPTS)\n disconnect(tempClient.getID(), false);\n else\n tempClient.setAttempt(tempClient.getAttempt() + 1);\n } else {\n clientResponse.remove(new Integer(tempClient.getID()));\n tempClient.setAttempt(0);\n }\n }\n }\n }\n };\n manage.start();\n }", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public void run() {\n clientLogger.info(\"Client \" + name + \" started working\");\n EventLoopGroup group = new NioEventLoopGroup();\n try {\n Bootstrap bootstrap = new Bootstrap()\n .group(group)\n .channel(NioSocketChannel.class)\n .handler(new ClientInitializer());\n Channel channel = bootstrap.connect(host, port).sync().channel();\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\n while (true) {\n channel.write(in.readLine() + \"\\r\\n\");\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n group.shutdownGracefully();\n }\n clientLogger.info(\"Client \" + name + \" finished working\");\n }", "public interface AsyncResponce {\n\n /// Cette classe permet de realiser une callback dans une Async Task en overidant cette classe\n void ComputeResult(Object result);\n}", "public interface IServer {\n /**\n * \n * @param data\n */\n public void sendData(String data);\n\n /**\n * \n * @return\n * @throws ServerNullDataException\n * @throws ServerEmptyDataException\n * @throws ServerBadDataException\n * @throws ServerBadFormatException\n */\n public String receiveData() throws ServerNullDataException, ServerEmptyDataException, ServerBadDataException, ServerBadFormatException;\n\n /**\n * \n * @param data\n * @return\n * @throws ServerNullDataException\n * @throws ServerEmptyDataException\n * @throws ServerBadDataException\n * @throws ServerBadFormatException\n */\n public boolean verifyData(String data) throws ServerNullDataException, ServerEmptyDataException, ServerBadDataException, ServerBadFormatException;\n\n /**\n * \n * @return\n */\n public String getData();\n\n /**\n * \n * @param s\n */\n public void setData(String s);\n\n /**\n * \n * @return\n */\n public Socket getConnectedSocket();\n \n /**\n * \n * @param s\n */\n public void setConnectedSocket(Socket s);\n\n /**\n * \n * @return\n */\n public Socket getDistantServerSocket();\n \n /**\n * \n * @param s\n */\n public void setDistantServerSocket(Socket s);\n \n /**\n * Permet de connecter la socket issues de l'écoute.\n * @return La socket permettant de communiquer avec le second joueur.\n * @throws ServerSocketAcceptException \n */\n public Socket connectSocket() throws ServerSocketAcceptException;\n \n /**\n * Méthode deconnectant la <code>Socket</code> et fermant son flux. \n * @throws ServerClosedSocketException \n * @throws ServerNullSocketException \n * @pre \n * isRunning() == true\n * s != null\n */\n public void closeSocket(Socket s) throws ServerClosedSocketException, ServerNullSocketException;\n \n /**\n * Méthode permettant de définir un <code>Timeout</code> en milliseconde.\n * @pre \n * s != null\n * 0 < timeout < MAX_TIMEOUT\n */\n public void setTimeout(Socket s, int timeout);\n \n /**\n * Retourne L'IP sous forme d'InetAddress.\n */\n public InetAddress getIP();\n \n /**\n * Retourne le nom du serveur.\n */\n public String getHostName();\n \n /**\n * Retourne le port sur lequel écoute le serveur.\n */\n public int getPort();\n \n /**\n * Permet de changer le port que l'on utilise par défaut sur le serveur.\n * @throws ServerBadPortException \n * @pre\n * 1024 < port < 49152\n * @post\n * getPort() == port\n */\n public void setPort(int port) throws ServerBadPortException;\n}", "public void start() throws IOException {\n\t\tserverSocket = new ServerSocket(port);\n\t\tserverCallbacks.forEach(c -> c.onServerStarted(this, port));\n\t}", "public void connect() {\n try {\n socket = new Socket(serverAddress, serverPort);\n outputStream = new ObjectOutputStream(socket.getOutputStream());\n inputStream = new ObjectInputStream(socket.getInputStream());\n //A thread which will constantly listen for updates from the server and forward them to Client\n new Thread(() -> {\n while (socket.isConnected()) {\n try {\n Renderable message = (Renderable) inputStream.readObject();\n if(message != null) {\n //logger.info(\"Received \" + message.getClass().getSimpleName() + \" from server.\");\n renderablePublisher.submit(message);\n }\n } catch (IOException | ClassNotFoundException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n break;\n }\n }\n }).start();\n } catch (IOException e) {\n renderablePublisher.submit(new ServerOfflineUpdate());\n }\n }", "public interface Client<C extends Client<C,S>, S extends Server<S,C>> {\n\n\t/**\n\t * Callback called when the connection to the server has been established. Should not be called\n\t * directly from the server.\n\t */\n\tvoid onOpen();\n\n\t/**\n\t * Callback called when the connection to the server has been closed. Should not be called\n\t * directly from the server.\n\t */\n\tvoid onClose();\n\n\t/**\n\t * Called when an error occurs while trying to send a message to the server.\n\t * @param error the error that occurred.\n\t */\n\tvoid onError(Throwable error);\n}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (true) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSocket socket = serverSocket.accept();\n\t\t\t\t\t\tclients.add(new Client(socket));\n\t\t\t\t\t\tSystem.out.println(\"[클라이언트 접속] \" + socket.getRemoteSocketAddress() + \": \"\n\t\t\t\t\t\t\t\t+ Thread.currentThread().getName());\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\t\tif (!serverSocket.isClosed()) {\n\t\t\t\t\t\t\tstopServer();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "public static void main(String[] args) {\n new ServerControl().start();\n new UserMonitor().start();\n boolean listening = true;\n //listen for connection attempt and handle it accordingly\n try (ServerSocket socket = new ServerSocket(4044)) {\n while (listening) {\n new AwaitCommand(Singleton.addToList(socket.accept())).start();\n System.out.println(\"Connection started...\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run() {\n sendMessageToClient(\"Connexion au serveur réussie\");\n\n while (isActive) {\n try {\n String input = retrieveCommandFromClient();\n handleCommand(input);\n } catch (ServerException e) {\n System.out.println(e.getMessage());\n sendMessageToClient(e.getMessage());\n } catch (ClientOfflineException e) {\n System.out.println(\"Client # \" + clientId + \" deconnecte de facon innattendue\");\n deactivate();\n }\n }\n\n close();\n }", "@Override\n protected void initChannel(SocketChannel ch) throws Exception {\n //4. Add ChannelHandler to intercept events and allow to react on them\n ch.pipeline().addLast(new ChannelHandlerAdapter() {\n @Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n //5. Write message to client and add ChannelFutureListener to close connection once message written\n ctx.write(buf.duplicate()).addListener(ChannelFutureListener.CLOSE);\n }\n });\n }", "public interface RLatitudeServiceAsync {\r\n\r\n\tvoid sayHello(AsyncCallback<String> callback);\r\n\r\n\tvoid publishUser(String name, String firstName, String dateNaissance,\r\n\t\t\tAsyncCallback< String > callback );\r\n\t\r\n\tvoid checkPasswordLoginValidity( String login, String password, AsyncCallback< Boolean > callback );\r\n\t\r\n\tvoid publishAuthentication( String uid, String login, String password, AsyncCallback</*IUser*/Void> callback );\r\n\t\r\n\tvoid connect(String login, String password, AsyncCallback< String > callback);\r\n\t\r\n\tvoid disconnect(String uid, AsyncCallback< Boolean > callback);\r\n\t\r\n\tvoid changeMyVisibility(String uid, boolean visibility,\r\n\t\t\tAsyncCallback<Boolean> callback);\r\n\r\n\tvoid getVisibility(String uid, AsyncCallback<Boolean> callback);\r\n\t\r\n\tvoid setCurrentPostion(String uid, Position position,\r\n\t\t\tAsyncCallback<Void> callback);\r\n\t\r\n\tvoid addContact( String uidUser, String uidContact, AsyncCallback< Void > callback );\r\n\t\r\n\tvoid getContact( String uid,\r\n\t\t\tAsyncCallback< List< ResolvedContact > > callback );\r\n\t\r\n\tvoid getUser( String name, String lastName, AsyncCallback<ResolvedUser> callback );\r\n\t\r\n\tvoid getUser(String uid,AsyncCallback<ResolvedUser> callback);\r\n\r\n\tvoid getPosition( String uidUser, AsyncCallback< Position > callback );\r\n\r\n}", "public void await() {\n tomcat.getServer().await();\n }", "public void connectedTo(ServerDescriptor desc);", "private void runProgram() {\n\n try {\n ServerSocket ss = new ServerSocket(8088);\n Dispatcher dispatcher = new Dispatcher(allmsg,allNamedPrintwriters,clientsToBeRemoved);\n Cleanup cleanup = new Cleanup(clientsToBeRemoved,allClients);\n cleanup.start();\n dispatcher.start();\n logger.initializeLogger();\n\n while (true) {\n Socket client = ss.accept();\n InputStreamReader ir = new InputStreamReader(client.getInputStream());\n PrintWriter printWriter = new PrintWriter(client.getOutputStream(),true);\n BufferedReader br = new BufferedReader(new InputStreamReader(client.getInputStream()));\n String input = br.readLine();\n System.out.println(input);\n String name = input.substring(8);\n logger.logEventInfo(name + \" has connected to the chatserver!\");\n allClients.put(name,client);\n allNamedPrintwriters.put(name,printWriter);\n ClientHandler cl = new ClientHandler(name,br, printWriter, allmsg);\n Thread t = new Thread(cl);\n t.start();\n allmsg.add(\"ONLINE#\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n ServerSocket server = new ServerSocket(8080);\n ExecutorService service = Executors.newCachedThreadPool();\n while (true) {\n Socket socket = server.accept();\n System.out.println(\"Client accept\");\n service.submit(new ClientSession(socket));\n }\n\n }", "@Async @Endpoint(\"http://0.0.0.0:8080\")\npublic interface AsyncEndpoint {\n\t\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler}.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @return {@code null}, since the request is processed asynchronously\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncsuccess\")\n\tString asyncSuccess(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler} which returns response \n\t * code that signifies a failure. This should invoke {@link AsyncHandler#onFailure(HttpResponse)} on the \n\t * provided callback.</p> \n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncfailure\")\n\tvoid asyncFailure(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler} whose execution is \n\t * expected to fail with an exception and hence handled by the callback {@link AsyncHandler#onError(Exception)}.</p>\n\t * \n\t * <p>The error is caused by the deserializer which attempts to parse the response content, which is \n\t * not JSON, into the {@link User} model.</p> \n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @since 1.3.4\n\t */\n\t@Deserialize(JSON)\n\t@GET(\"/asyncerror\")\n\tvoid asyncError(AsyncHandler<User> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} but does not expect the response to be \n\t * handled using an {@link AsyncHandler}.</p>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncnohandling\")\n\tvoid asyncNoHandling();\n\t\n\t/**\n\t * <p>Processes a successful execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onSuccess(HttpResponse, Object)} throws an exception.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onSuccess</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/successcallbackerror\")\n\tvoid asyncSuccessCallbackError(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Processes a failed execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onFailure(HttpResponse)} throws an exception.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onFailure</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/failurecallbackerror\")\n\tvoid asyncFailureCallbackError(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Processes an erroneous execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onError(Exception)} throws an exception itself.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onError</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@Deserialize(JSON)\n\t@GET(\"/errorcallbackerror\")\n\tvoid asyncErrorCallbackError(AsyncHandler<User> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request <b>synchronously</b> by detaching the inherited @{@link Async} annotation.</p> \n\t * \n\t * @return the response string which indicated a synchronous request\n\t * \n\t * @since 1.3.0\n\t */\n\t@Detach(Async.class) \n\t@GET(\"/asyncdetached\")\n\tString asyncDetached();\n}", "@Override\r\n\tpublic void start() {\n\t\tscavenger.start();\r\n\t\tnew Thread() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\twhile (!serverSocket.isClosed()) {\r\n\t\t\t\t\tSocket socket = null;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tsocket = serverSocket.accept();\r\n\t\t\t\t\t\tscavenger.addSocket(socket);\r\n\t\t\t\t\t\tnew SynchronousSocketThread(socket).start();\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}.start();\r\n\t}" ]
[ "0.66657394", "0.63091177", "0.6223619", "0.61692184", "0.5959323", "0.5939742", "0.5923306", "0.59222543", "0.5884226", "0.58799934", "0.5846374", "0.5833999", "0.58022904", "0.5783484", "0.57734936", "0.57262754", "0.571495", "0.56895864", "0.56894416", "0.5676077", "0.56748885", "0.567483", "0.56649643", "0.56460863", "0.56230384", "0.5621217", "0.56170374", "0.55673575", "0.55671406", "0.5566737", "0.55662596", "0.5560734", "0.55355465", "0.5533949", "0.55288154", "0.55158174", "0.5507271", "0.5503858", "0.54837376", "0.5476868", "0.54748917", "0.54738843", "0.5472687", "0.54623634", "0.5459273", "0.54549587", "0.5432453", "0.5430572", "0.5425004", "0.5423733", "0.54205406", "0.541949", "0.54097944", "0.5405652", "0.53984237", "0.53969675", "0.53968763", "0.5387072", "0.5377672", "0.5376978", "0.5374911", "0.536178", "0.53605443", "0.53564495", "0.5355975", "0.5355161", "0.535247", "0.53491056", "0.53485507", "0.5347274", "0.53431344", "0.53413266", "0.53361654", "0.5335843", "0.5325363", "0.5319352", "0.5305282", "0.53026146", "0.52988416", "0.529872", "0.52948284", "0.52811474", "0.5279334", "0.5276287", "0.5273378", "0.52730227", "0.52689976", "0.5268263", "0.5262749", "0.5260394", "0.5254913", "0.5253394", "0.52521276", "0.52497417", "0.52458346", "0.5234932", "0.52341545", "0.5230612", "0.52288485", "0.5215482", "0.5213175" ]
0.0
-1
Returns all live serversocket IDs. Some serversocket included in the returned array may have been terminated when this method returns.
long[] getAllServerSocketIds();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String[] getServerIds() {\r\n return serverIds;\r\n }", "private Set<Session> getOpenServerSessions(){\n ClientContainer jettySocketServer = getWebSocketsContainer();\n return jettySocketServer.getOpenSessions();\n }", "public int[] getIDs(){\r\n\t\tint[] id = new int[Config.MAX_CLIENTS];\r\n\t\tfor(int i=0; i< Config.MAX_CLIENTS;i++){\r\n\t\t\tid[i] = clients[i].getID();\r\n\t\t}\r\n\t\treturn id;\r\n\t}", "public static Server [] getServers(){\r\n Enumeration serversEnum = servers.elements();\r\n Server [] arr = new Server[servers.size()];\r\n for (int i = 0; i < arr.length; i++)\r\n arr[i] = (Server)serversEnum.nextElement();\r\n\r\n return arr;\r\n }", "public int[] availableServers() throws RemoteException {\n\t\t\tint i = 0;\n\n\t\t\t// convert to primitives array\n\t\t\tint[] result = new int[m_services.size()];\n\t\t\tfor (Integer id : m_services.keySet())\n\t\t\t\tresult[i++] = id;\n\t\t\t\n\t\t\treturn result;\n\t\t}", "public ArrayList<ServerSocket> getConnectedClients() {\n return connectedClients;\n }", "List<Long> getServers();", "public synchronized List<ServerThread> getConnectionArray() {\r\n return connectionArray;\r\n }", "public static synchronized String[] getSessionIds() {\n String[] ids = new String[statemap.size()];\n statemap.keySet().toArray(ids);\n return ids;\n }", "List<Server> servers() {\n return servers;\n }", "public NetworkInstance[] getServers();", "Collection<TcpIpConnection> getConnections();", "public List<Server> getAllServers(){\n\t\tlogger.info(\"Getting the all server details\");\n\t\treturn new ArrayList<Server>(servers.values());\n\t}", "Collection<TcpIpConnection> getActiveConnections();", "public Object[] getNameServerPorts() {\n\t\treturn _nameserverPorts.toArray();\n\t}", "@Override public Collection<String> getServerIds() {\n return getTrackedBranches().getServerIds();\n }", "public static long getConnections() {\n return connections;\n }", "public List<Server> getServerList() {\n return serverList;\n }", "public List<Server> getServerList() {\n return new ArrayList<Server>(serversList);\n }", "public Object[] getNameServers() {\n\t\treturn _nameservers.toArray();\n\t}", "public ArrayList<Server> getServers(){\n return this.serversList;\n }", "public List<Long> getSessionNodes() {\n List<Long> ret = new ArrayList<>();\n\n for (int i = 0; i < sessionsList.size(); i++) {\n ret.add(sessionsList.get(i).dhtNodes());\n }\n\n return ret;\n }", "public ArrayList<Integer> getConnections(){\n return connectedKeys;\n }", "public ArrayList<Integer> getConnections() {\n\t\treturn connections;\n\t}", "private List<Server> getRemoteServers() {\n if (!isDas())\n throw new RuntimeException(\"Internal Error\"); // todo?\n\n List<Server> notdas = new ArrayList<Server>(targets.size());\n String dasName = serverEnv.getInstanceName();\n\n for (Server server : targets) {\n if (!dasName.equals(server.getName()))\n notdas.add(server);\n }\n\n return notdas;\n }", "int getServerSocketCount();", "public int[] getAllPids(Activity context) throws Exception {\n ActivityManager activityManager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);\n List<ActivityManager.RunningServiceInfo> pids = activityManager.getRunningServices(Integer.MAX_VALUE);\n int processid = 0;\n int[] retVal = new int[pids.size()];\n Log.d(\"feature\", \"pid size: \" + pids.size());\n for (int i = 0; i < pids.size(); i++) {\n ActivityManager.RunningServiceInfo info = pids.get(i);\n retVal[i] = info.pid;\n Log.d(\"feature\", \"pid: \" + info.service);\n\n return (retVal);\n }\n return(null);\n }", "public HostID[] getChunkServers()\n {\n return chunkServers;\n }", "long getTotalServerSocketsCount();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Session> \n getSessionsList();", "public String[] listConnections() {\n\t\t\tString[] conns = new String[keyToConn.entrySet().size()];\n\t\t\tint i = 0;\n\n\t\t\tfor (Map.Entry<String, Connection> entry : keyToConn.entrySet()) {\n\t\t\t\t// WebSocket ws = entry.getKey();\n\t\t\t\tConnection conn = entry.getValue();\n\t\t\t\tconns[i] = String.format(\"%s@%s\", conn.user, entry.getKey());\n\t\t\t\t++i;\n\t\t\t}\n\t\t\tArrays.sort(conns);\n\t\t\treturn conns;\n\t\t}", "public static List<SkungeeServer> getServers() {\n\t\treturn ServerManager.getServers();\n\t}", "public Collection<Long> getSessions() {\n return dataTree.getSessions();\n }", "public List<ConnectionHandler> getClientConnections() {\r\n return clientConnections;\r\n }", "private void refreshServerList() {\n\t\tcurrentRequestId++;\n\t\tserverNames.clear();\n\t\tserverTable.clear();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\taddresses = client.discoverHosts(WifiHelper.UDP_PORT, 1000);\n\t\t\t\tint removed = 0;\n\t\t\t\tfor(int i = 0; i + removed < addresses.size(); i++) {\n\t\t\t\t\tsynchronized(client) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tclient.connect(1000, addresses.get(i - removed), WifiHelper.TCP_PORT, WifiHelper.UDP_PORT);\n\t\t\t\t\t\t\tclient.sendTCP(new NameRequest(currentRequestId, addresses.size()));\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tclient.wait(5000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\taddresses.remove(i);\n\t\t\t\t\t\t\tremoved++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}", "public static String[] getAvailableIDs();", "public ConcurrentHashMap<String, SocketManager> getActiveConnections() {\n return threadListen.getActiveConnexion();\n }", "@Override\n\tpublic List<Socket> GetConnectedClients() {\n\t\t\n\t\tArrayList<Socket> list = new ArrayList<Socket>();\n\t\t\n\t\tif(clients == null)return list;\n\t\t\n\t\tfor(Socket s : clients)\n\t\t{\n\t\t\tlist.add(s);\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "public ServerList getServers() {\r\n return this.servers;\r\n }", "public ServerIdentifiers getServerIdentifiers() {\n if (this.serverId == null) {\n try (CoreJBossASClient client = new CoreJBossASClient(getModelControllerClientFactory().createClient())) {\n Address rootResource = Address.root();\n boolean isDomainMode = client.getStringAttribute(\"launch-type\", rootResource)\n .equalsIgnoreCase(\"domain\");\n String hostName = (isDomainMode) ? client.getStringAttribute(\"host\", rootResource) : null;\n String serverName = client.getStringAttribute(\"name\", rootResource);\n Properties sysprops = client.getSystemProperties();\n String nodeName = sysprops.getProperty(\"jboss.node.name\");\n\n // this is a new attribute that only exists in Wildfly 10 and up. If we can't get it, just use null.\n String uuid;\n try {\n uuid = client.getStringAttribute(\"uuid\", rootResource);\n } catch (Exception ignore) {\n uuid = null;\n }\n\n this.serverId = new ServerIdentifiers(hostName, serverName, nodeName, uuid);\n } catch (Exception e) {\n log.warnCannotObtainServerIdentifiersForDMREndpoint(this.toString(), e.toString());\n }\n }\n\n return this.serverId;\n }", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "@Override\n\tpublic Collection<InetSocketAddress> getAvaliableServers() {\n\t\treturn null;\n\t}", "public String getLiveNodes()\n {\n return ssProxy.getLiveNodes();\n }", "public String[] getIDs() {\n return impl.getIDs();\n }", "public ConnInfo[] getConnections() {\n return connInfo;\n }", "public RemoteIdentities remoteIdentities() {\n return this.remoteIdentities;\n }", "public ArrayList<Integer> getConnections() {\n\t\tArrayList<Integer> connections = new ArrayList<Integer>();\n\t\tfor (Link l : links) {\n\t\t\tconnections.add(l.getDestination());\n\t\t}\n\t\treturn connections;\n\n\t}", "public Set<String> peersAlive() {\n return peerLastHeartbeatTime.keySet();\n }", "private Stream<ProcessHandle> getProcesses() {\n return ProcessHandle.allProcesses();\n }", "public static java.lang.String[] getAvailableIDs() { throw new RuntimeException(\"Stub!\"); }", "public ArrayList<Connection> getConnections(){\n\t\treturn manager.getConnectionsWith(this);\n\t}", "public ServerStatus[] getServerStatus() {\r\n ServerStatus[] toReturn = new ServerStatus[0];\r\n\r\n String[] paramFields = {\"item_delimiter\", \"value_delimiter\"};\r\n SocketMessage request = new SocketMessage(\"admin\", \"server_status\",\r\n SocketMessage.PriorityType.EMERGENCY, SocketMessage.TransferType.BI_WAY, \"\", paramFields);\r\n request.setValue(\"item_delimiter\", ITEM_DELIMITER);\r\n request.setValue(\"value_delimiter\", VALUE_DELIMITER);\r\n\r\n SocketMessage response = handleMessage(request);\r\n if (!isSuccessful(response)) {\r\n if (\"\".equals(response.getErrorCode())) {\r\n setError(\"APIL_0201\", \"couldn't get server status\");\r\n } else {\r\n wrapError(\"APIL_0201\", \"couldn't get server status\");\r\n }\r\n return toReturn;\r\n } else {\r\n String serversString = response.getValue(\"servers\");\r\n StringTokenizer tokenizer = new StringTokenizer(serversString, ITEM_DELIMITER);\r\n toReturn = new ServerStatus[tokenizer.countTokens()];\r\n try {\r\n for (int i = 0; i < toReturn.length; i++) {\r\n String itemString = tokenizer.nextToken();\r\n StringTokenizer itemTokenizer = new StringTokenizer(itemString, VALUE_DELIMITER);\r\n String ip = itemTokenizer.nextToken();\r\n String portString = itemTokenizer.nextToken();\r\n String aliveString = itemTokenizer.nextToken();\r\n String timeString = itemTokenizer.nextToken();\r\n int port = Integer.parseInt(portString.trim());\r\n boolean alive = \"y\".equals(aliveString);\r\n long time = Tools.parseTime(timeString.trim());\r\n toReturn[i] = new ServerStatus(ip, port, time, alive);\r\n }\r\n } catch (Exception e) {\r\n setError(\"APIL_0202\", \"error in parsing status string: \" + serversString);\r\n return new ServerStatus[0];\r\n }\r\n }\r\n\r\n return toReturn;\r\n }", "public Iterator getClients() {\n rrwl_serverclientlist.readLock().lock();\n try {\n return clientList.iterator();\n } finally {\n rrwl_serverclientlist.readLock().unlock();\n }\n }", "public Collection<SendenDevice> getClientsConnected() {\n return clientsConnected.values();\n }", "Vector<JPPFClientConnection> getAvailableConnections();", "public Room[] getConnections() {\n return connections;\n }", "private List<String> getRunningInstances()\n {\n final long maxResults = 500L; // 500 is sadly the max, see below\n\n ArrayList<String> ids = new ArrayList<>();\n try {\n final String project = envConfig.getProjectId();\n final String zone = envConfig.getZoneName();\n final String managedInstanceGroupName = envConfig.getManagedInstanceGroupName();\n\n Compute computeService = createComputeService();\n Compute.InstanceGroupManagers.ListManagedInstances request =\n computeService\n .instanceGroupManagers()\n .listManagedInstances(project, zone, managedInstanceGroupName);\n // Notice that while the doc says otherwise, there is not nextPageToken to page\n // through results and so everything needs to be in the same page\n request.setMaxResults(maxResults);\n InstanceGroupManagersListManagedInstancesResponse response = request.execute();\n for (ManagedInstance mi : response.getManagedInstances()) {\n ids.add(GceUtils.extractNameFromInstance(mi.getInstance()));\n }\n log.debug(\"Found running instances [%s]\", String.join(\",\", ids));\n }\n catch (Exception e) {\n log.error(e, \"Unable to get instances.\");\n }\n return ids;\n }", "public List<Address> getWatchedAddresses() {\n try {\n List<Address> addresses = new LinkedList<Address>();\n for (Script script : watchedScripts)\n if (script.isSentToAddress())\n addresses.add(script.getToAddress(params));\n return addresses;\n } finally {\n }\n }", "public List<String> getConnectedDevices() {\n if (services.size() == 0) {\n return new ArrayList<String>();\n }\n\n HashSet<String> toRet = new HashSet<String>();\n\n for (String s : services.keySet()) {\n ConnectionService service = services.get(s);\n\n if (service.getState() == ConnectionConstants.STATE_CONNECTED) {\n toRet.add(s);\n }\n }\n\n return new ArrayList<String>(toRet);\n }", "public ArrayList<String> getConnectedUsers() {\r\n\t\tArrayList<String> connectedUsers = new ArrayList<>();\r\n\t\tString message=\"107\";\r\n\t\tsendDatagramPacket(message);\r\n\t\t\r\n\t\t//connectedUsers.add(\"Default\");\r\n\t\t\r\n\t\treturn connectedUsers;\r\n\t}", "int getPeakServerSocketCount();", "public Set<UUID> getAlivePlayers() {\n return new HashSet<>(players);\n }", "public List<Connection> getConnections() {\n\t\treturn new ArrayList<Connection>(connectionsByUri.values());\n\t}", "java.util.List<io.netifi.proteus.admin.om.Connection> \n getConnectionsList();", "public long getReconnects() {\n return reconnects.get();\n }", "public long getRepairSessions() {\n long repairSessions = 0;\n\n Iterator<Map.Entry<String, JMXEnabledThreadPoolExecutorMBean>> threads = nodeProbe.getThreadPoolMBeanProxies();\n while (threads.hasNext()) {\n Map.Entry<String, JMXEnabledThreadPoolExecutorMBean> thread = threads.next();\n\n if (thread.getKey().equals(REPAIR_THREAD_POOL_NAME)) {\n JMXEnabledThreadPoolExecutorMBean threadPoolProxy = thread.getValue();\n repairSessions = threadPoolProxy.getPendingTasks() + threadPoolProxy.getActiveCount();\n }\n }\n\n return repairSessions;\n }", "public void getRunningInstances() {\n LogContainerResultCallback resultCallback = new LogContainerResultCallback();\n //override method onNext of resultcallback\n dockerClient.logContainerCmd(\"id\").exec(resultCallback);\n dockerClient.attachContainerCmd(\"id\").withStdIn(new ByteArrayInputStream(\"list\\n\".getBytes()));\n }", "public Long[] getInitiatorIDs() { return this.initiatorIDs; }", "public List<String> allRequiredConnectionIdsPresent() {\n return this.allRequiredConnectionIdsPresent;\n }", "public List<String> getAddresses() throws RemoteException {\n\t\tList<String> addresses = new ArrayList<String>();\n\t\tif (this.registry != null) {\n\t\t\tfor (IServer server : this.serverList.getServers()) {\n\t\t\t\taddresses.add(server.getFullAddress());\n\t\t\t}\n\t\t}\n\t\treturn addresses;\n\t}", "@java.lang.Override\n public java.util.List<java.lang.Integer>\n getLobbyIdList() {\n return lobbyId_;\n }", "public List<String> getCPanelServerList() {\n\t\tString cPanelServerList = getProperties().getProperty(\"cpanel.server.list\").trim();\n\t\tString[] cPanelServerArray= cPanelServerList.split(\"#\");\n\t\tList<String> result = new ArrayList<String>(); \n\t\tfor(String cPanelServer: cPanelServerArray){\n\t\t\tString[] params = cPanelServer.split(\",\");\n\t\t\tif(params!= null && params.length>1){\n\t\t\t\tString cpanelIP = params[0];\n\t\t\t\tresult.add(cpanelIP);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public abstract I_SessionInfo[] getSessions();", "List<Uuid> getActivePeers() throws RemoteException;", "private static void getClients() throws IOException {\r\n\t\tbidders=new ArrayList<Socket>();\r\n\t\tserverSocket=new ServerSocket(portno);\r\n\t\twhile ((bidders.size()<numBidders)&&(auctioneer==null)) {\r\n\t\t\tSocket temp=serverSocket.accept();\r\n\t\t\t//if (this client is a bidder)\r\n\t\t\t\tbidders.add(temp);\r\n\t\t\t//if (this client is the auctioneer)\r\n\t\t\t\tauctioneer=temp;\r\n\t\t}\r\n\t}", "public int getCurrentServerId() {\n return currentServerId;\n }", "public ArrayList<AStarNode> getConnections() {\n return connected;\n }", "public String[] getPlayers() {\r\n return playerIds;\r\n }", "public static HTTPSession [] getAllSessions ()\n\t{\n\t\tObject [] theSessions = sessionHashtable.values ().toArray ();\n\t\tHTTPSession [] retVal = new HTTPSession [theSessions.length];\n\t\tfor (int i = 0; i < retVal.length; i++)\n\t\t{\n\t\t\tretVal [i] = (HTTPSession) theSessions [i];\n\t\t}\n\t\treturn retVal;\n\t}", "public void runServer() {\n\t\tint i = 0;\n\n\t\tclientList = new ArrayList<>();\n\t\ttry {\n\t\t\tServerSocket listener = new ServerSocket(port);\n\n\t\t\tSocket server;\n\n\t\t\tprintDetails();\n\n\t\t\twhile ((i++ < maxConnections) || (maxConnections == 0)) {\n\n\t\t\t\tserver = listener.accept();\n\t\t\t\tSession session = new Session(server, this.storageLocation );\n\n\t\t\t\tnew Thread(session).start();\n\n\t\t\t\tString name = session.getName();\n\t\t\t\tSystem.out.printf(\"%s STARTED\\r\\n\", name );\n\t\t\t\tclientList.add( session );\n\t\t\t\tdoGC();\n\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"IOException on socket listen: \" + ioe);\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public static long getBlockedConnections() {\n return blocks;\n }", "public static void viewConnections(){\n\t\tfor(int i=0; i<Server.clients.size();i++){\n\t\t\tServerThread cliente = Server.clients.get(i);\n\t\t\tlogger.logdate(cliente.getConnection().getInetAddress().getHostName());\n\t\t}\n\t}", "storage_server_connections get(String id);", "public Vector<String> getAllLaunchersIds() {\n\t\tVector<String> visibleIds = new Vector<>();\n\n\t\tfor (EnemyLauncher el : enemyLauncherArr) {\n\t\t\tif (el.isAlive()) {\n\t\t\t\tvisibleIds.add(el.getLauncherId());\n\t\t\t}\n\t\t}\n\n\t\tif (visibleIds.size() == 0)\n\t\t\treturn null;\n\n\t\treturn visibleIds;\n\t}", "public interface ServerSocketMXBean {\r\n\r\n /**\r\n * Returns all live server-socket IDs. Some server-socket included in the\r\n * returned array may have been terminated when this method returns.\r\n * \r\n * @return an array of <tt>long</tt>, each is a server-socket ID.\r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"monitor\").\r\n */\r\n long[] getAllServerSocketIds();\r\n\r\n /**\r\n * Returns the total number of server-sockets opened since the Java virtual\r\n * machine started.\r\n * \r\n * @return the total number of server-sockets opened.\r\n */\r\n long getTotalServerSocketsCount();\r\n\r\n /**\r\n * Returns the peak open server-socket count since the Java virtual machine\r\n * started or the peak was reset.\r\n * \r\n * @return the peak live server-socket count.\r\n */\r\n int getPeakServerSocketCount();\r\n\r\n /**\r\n * Returns the current number of open server-sockets.\r\n * \r\n * @return the current number of open server-sockets.\r\n */\r\n int getServerSocketCount();\r\n\r\n /**\r\n * Returns the total number of sockets accepted by all server-sockets since\r\n * the Java virtual machine started.\r\n * \r\n * @return the total number of server-sockets opened.\r\n */\r\n long getTotalAcceptCount();\r\n\r\n /**\r\n * Returns the total number of sockets accepted by a server-socket with the\r\n * specified <tt>id</tt>.\r\n * \r\n * @param id the ID of the server-socket. Must be positive.\r\n * @return the total number of server-sockets opened.\r\n */\r\n long getTotalAcceptCount(long id);\r\n\r\n /**\r\n * Returns the server-socket info for a server-socket of the specified\r\n * <tt>id</tt>.\r\n * <p>\r\n * This method returns a <tt>ServerSocketInfo</tt> object representing the\r\n * server-socket information for the server-socket of the specified ID. If a\r\n * server-socket of the given ID is not open or does not exist, this method\r\n * will return <tt>null</tt>.\r\n * <p>\r\n * <b>MBeanServer access </b>: <br>\r\n * The mapped type of <tt>ServerSocketInfo</tt> is <tt>CompositeData</tt>\r\n * with attributes as specified in\r\n * {@link ServerSocketInfo#from ServerSocketInfo}.\r\n * \r\n * @param id the ID of the server-socket. Must be positive.\r\n * @return a {@link ServerSocketInfo}object for the server-socket of the\r\n * given ID; <tt>null</tt> if the server-socket of the given ID is\r\n * not open or it does not exist.\r\n * @throws IllegalArgumentException if <tt>id &lt= 0</tt>.\r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"monitor\").\r\n */\r\n ServerSocketInfo getServerSocketInfo(long id);\r\n\r\n /**\r\n * Returns the server-socket info for each server-socket whose ID is in the\r\n * input array <tt>ids</tt>.\r\n * <p>\r\n * This method returns an array of the <tt>ServerSocketInfo</tt> objects.\r\n * If a server-socket of a given ID is not open or does not exist, the\r\n * corresponding element in the returned array will contain <tt>null</tt>.\r\n * <p>\r\n * <b>MBeanServer access </b>: <br>\r\n * The mapped type of <tt>ServerSocketInfo</tt> is <tt>CompositeData</tt>\r\n * with attributes as specified in\r\n * {@link ServerSocketInfo#from ServerSocketInfo}.\r\n * \r\n * @param ids an array of server-socket IDs\r\n * @return an array of the {@link ServerSocketInfo}objects, each containing\r\n * information about a server-socket whose ID is in the\r\n * corresponding element of the input array of IDs.\r\n * @throws IllegalArgumentException if any element in the input array\r\n * <tt>ids</tt> is <tt>&lt= 0</tt>.\r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"monitor\").\r\n */\r\n ServerSocketInfo[] getServerSocketInfo(long[] ids);\r\n\r\n /**\r\n * Resets the peak server-socket count to the current number of open\r\n * server-sockets.\r\n * \r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"control\").\r\n * @see #getPeakServerSocketCount\r\n * @see #getServerSocketCount\r\n */\r\n void resetPeakServerSocketCount();\r\n}", "@Override\n public List<Integer> getAllWorklogIds() {\n List<Integer> worklogIds;\n\n try (Connection connection = database.connect();\n PreparedStatement stmt = connection.prepareStatement(GET_ALL_WORKLOG_IDS_SQL)) {\n worklogIds = worklogIdDataMapper.toDTO(stmt.executeQuery());\n } catch (SQLException e) {\n logger.logToDatabase(getClass().getName(), \"getAllWorklogIds\", e);\n throw new InternalServerErrorException(e.getMessage());\n }\n return worklogIds;\n }", "public List<Integer> getAllIDClient(){\n\t\tPreparedStatement ps = null;\n\t\tResultSet resultatRequete =null;\n\t\t\n\t\ttry {\n\t\t\tString requeteSqlGetAll=\"SELECT id_client FROM clients\";\n\t\t\tps = this.connection.prepareStatement(requeteSqlGetAll);\n\t\t\t\n\t\t\tresultatRequete = ps.executeQuery();\n\n\t\t\tClient client = null;\n\t\t\t\n\t\t\tList<Integer> listeIDClient = new ArrayList <>();\n\n\t\t\twhile (resultatRequete.next()) {\n\t\t\t\tint idClient = resultatRequete.getInt(1);\n\t\t\t\t\n\t\t\t\tlisteIDClient.add(idClient);\n\t\t\t\t\n\t\t\t}//end while\n\t\t\treturn listeIDClient;\n\t\t\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}finally {\n\t\t\ttry {\n\t\t\t\tif(resultatRequete!= null) resultatRequete.close();\n\t\t\t\tif(ps!= null) ps.close();\n\t\t\t\t\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "public static List<Connection> getLoggedInUserConnections() {\n List<Connection> userConnections = new ArrayList<Connection>();\n for (User user : UserManager.getLoggedInUsers()) {\n if (user.getConnection() != null) {\n userConnections.add(user.getConnection());\n }\n }\n return userConnections;\n }", "public Connections getConnections();", "public final Set<WritableSession> getSubscribers() {\r\n return sessions;\r\n }", "public static List getAllSessions() {\n\t\tsynchronized (FQN) {\n\t\t\tList<MemberSession> msList = new ArrayList<MemberSession>();\n//\t\t\tObject object = cache.getValues(FQN);\n\t\t\tObject object = null;\n\t\t\tif (object != null) {\n\t\t\t\tmsList = (List<MemberSession>) object;\n\t\t\t\treturn new ArrayList(msList);\n\t\t\t} else {\n\t\t\t\tCollection list = new ArrayList();\n\t\t\t\tobject = cache.getValues(FQN);\n\t\t\t\tif(object != null){\n\t\t\t\t\tlist = (Collection) object;\n\t\t\t\t}\n\t\t\t\tmsList = new ArrayList(list);\n//\t\t\t\tfor (MemberSession ms : msList) {\n//\t\t\t\t\tcache.add(FQN, ms.getSessionId(), ms);\n//\t\t\t\t}\n\t\t\t\treturn msList;\n\t\t\t}\n\n\t\t}\n\t}", "private Task[][] getTasks() {\n\t\tList<Server> servers = this.scheduler.getServers();\n\t\tTask[][] tasks = new Task[servers.size()][];\n\t\tfor (int i = 0; i < servers.size(); i++) {\n\t\t\ttasks[i] = servers.get(i).getTasks();\n\t\t}\n\t\treturn tasks;\n\t}", "public List<ServerServices> listServerServices();", "public ServerPlayers() {\n sockets = new ArrayList<Socket>();\n }", "public java.lang.String[] getRemoteHostNames() {\r\n return remoteHostNames;\r\n }", "public int[] getUserIds() {\n return this.mInjector.getUserManager().getUserIds();\n }", "public synchronized Enumeration<ServerDesc> elements() {\n return new Enumerator(VALUES);\n }", "public int getServerId() {\n return serverId_;\n }", "public void getConnections() throws IOException {\n\t\tString fileName = \"\";\n\t\twhile (serverAlive) {\n\t\t\ttry {\n\t\t\t\tTrackerServerCommunicator comm = \n\t\t\t\t\t\tnew TrackerServerCommunicator(listen.accept(), this, globalId);\n\t\t\t\tglobalId++;\n\t\t\t\tcomm.setDaemon(true);\n\t\t\t\tcomm.start();\n\t\t\t\taddCommunicator(comm);\n\t\t\t} \n\t\t\tcatch (SocketException e) {\n\t\t\t\tfileName = dataTable.saveInfo(\"./\");\n\t\t\t\tserverAlive = false;\n\t\t\t}\n\t\t}\n\t\tString[] cmd = {\"/usr/bin/python ./Visualizer.py \" + fileName};\n\t\tRuntime.getRuntime().exec(cmd);\n\t}" ]
[ "0.6937009", "0.64163935", "0.6366279", "0.6298386", "0.6252622", "0.62067264", "0.6204067", "0.6041598", "0.58784944", "0.58202595", "0.5774353", "0.57634974", "0.5750694", "0.57275575", "0.5696132", "0.56921303", "0.56495166", "0.56454617", "0.5635627", "0.5622988", "0.5622324", "0.561926", "0.5618889", "0.5573418", "0.55621475", "0.55557865", "0.5536738", "0.55287856", "0.5522852", "0.55004627", "0.5489136", "0.54742604", "0.545464", "0.5453358", "0.54264075", "0.5409056", "0.5394426", "0.5389614", "0.53777355", "0.5363979", "0.5346615", "0.53359795", "0.53308684", "0.53307617", "0.5286256", "0.52617556", "0.52352685", "0.5233752", "0.52026623", "0.51860565", "0.51666963", "0.5164983", "0.5162641", "0.5160151", "0.51534176", "0.51497906", "0.5143114", "0.5138892", "0.51025665", "0.50902194", "0.5073691", "0.5068314", "0.50678194", "0.50669074", "0.5061534", "0.5060677", "0.5057367", "0.50510794", "0.5046429", "0.50427496", "0.50403684", "0.50387806", "0.50293297", "0.5015802", "0.5013495", "0.5010455", "0.50061494", "0.4990846", "0.4980061", "0.4979543", "0.49787387", "0.49780193", "0.49735165", "0.49642643", "0.49637002", "0.49464893", "0.49425074", "0.4930403", "0.4928275", "0.49146968", "0.4910546", "0.49099478", "0.49097374", "0.49038506", "0.49009913", "0.48982126", "0.48974237", "0.48948732", "0.4892181", "0.48908532" ]
0.7984638
0
Returns the total number of serversockets opened since the Java virtual machine started.
long getTotalServerSocketsCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getServerSocketCount();", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "int getPeakServerSocketCount();", "int getTotalCreatedConnections();", "int getConnectionsCount();", "public Integer serverCount() {\n return this.serverCount;\n }", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "public int numConnections(){\n return connections.size();\n }", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "public int connectionCount()\n {\n return _connectionCount;\n }", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "public int getNumOfServers() {\n return numOfServers;\n }", "public static long getConnections() {\n return connections;\n }", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "public int numberOfOpenSites() {\n\t\treturn openCount;\n\t}", "public int numberOfOpenSites() {\n return (openCount);\n }", "int getConnectionCount();", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public int getTotalConnections()\n {\n // return _connections.size();\n return 0;\n }", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "public int numberOfOpenSites() {\n return count;\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "@Override\r\n\tpublic int getConnectionsCount() {\r\n\t\treturn currentConnections.get();\r\n\t}", "public static int getTotalSessionCount() {\n\t\treturn (totalSessionCount);\n\t}", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public int getRunningDevicesCount();", "public int numberOfOpenSites() {\n \treturn size;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "Integer getConnectorCount();", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "long getListenerCount();", "private void countConnectingSocket() {\n \t\tcurrentlyConnectingSockets.incrementAndGet();\n \t}", "public int numberOfOpenSites() {\n return this.numOfOpenSites;\n }", "long getRequestsCount();", "public int numberOfOpenSites(){\n\t\treturn numOpen;\n\t}", "int getRequestsCount();", "int getRequestsCount();", "public int numberOfOpenSites() {\n return mOpenSites;\n }", "public abstract int getNumSessions();", "long getReceivedEventsCount();", "public int numberOfOpenSites() {\n return NOpen;\r\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int getConnectionCount() {\n int i;\n synchronized (this.bindings) {\n i = 0;\n for (IntentBindRecord intentBindRecord : this.bindings) {\n i += intentBindRecord.connections.size();\n }\n }\n return i;\n }", "public int getSize() {\n\t\treturn currConnections;\n\t}", "public static int getNumberOfRowsServer() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt3 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt3.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // sql count statement\r\n\t\trownumber.next(); // move cursor to first position\r\n\r\n\t\tint rnum = rownumber.getInt(1); //store result in an integer variable\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return integer\r\n\r\n\t}", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int clientsCount(){\n return clientsList.size();\n }", "public static Integer numValidClients() {\n return getLoggedInUserConnections().size() + anonClients.size();\n }", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "public int numberOfOpenSites(){\n return numOpenSites;\n }", "private synchronized static void decrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets--;\r\n\t}", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "public int numberOfOpenSites() {\n return numberOfOpenSites;\n }", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "public int numberOfOpenSites() {\n return openNum;\n }", "private Set<Session> getOpenServerSessions(){\n ClientContainer jettySocketServer = getWebSocketsContainer();\n return jettySocketServer.getOpenSessions();\n }", "public long getReconnects() {\n return reconnects.get();\n }", "private void countSocketClose() {\n \t\tcurrentlyOpenSockets.decrementAndGet();\n \t\tsynchronized (this) {\n \t\t\tthis.notifyAll();\n \t\t}\n \n \t}", "int getPeersCount();", "public int getRequestsCount() {\n return requests_.size();\n }", "public long getProcessCount() {\n return getProcesses().count();\n }", "public long getRepairSessions() {\n long repairSessions = 0;\n\n Iterator<Map.Entry<String, JMXEnabledThreadPoolExecutorMBean>> threads = nodeProbe.getThreadPoolMBeanProxies();\n while (threads.hasNext()) {\n Map.Entry<String, JMXEnabledThreadPoolExecutorMBean> thread = threads.next();\n\n if (thread.getKey().equals(REPAIR_THREAD_POOL_NAME)) {\n JMXEnabledThreadPoolExecutorMBean threadPoolProxy = thread.getValue();\n repairSessions = threadPoolProxy.getPendingTasks() + threadPoolProxy.getActiveCount();\n }\n }\n\n return repairSessions;\n }", "static final long getTotalStartedCount()\n {\n synchronized (threadStartLock)\n {\n return totalStartedCnt;\n }\n }", "public int getActiveSessions();", "public int getRequestsCount() {\n return requests_.size();\n }", "public int numberOfOpenSites()\r\n { return openSites; }", "public int getThreadCount() {\n\t\treturn this.threadCalls.size();\n\t}", "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 numberOfOpenSites() {\n return 0;\n }", "public int numberOfOpenSites() {\n return open_blocks;\n }", "private static synchronized void printMonitoringSocketStatus() {\r\n\r\n\t\tif (log.isInfoEnabled()) {\r\n\t\t\tlog.info(\"There are currently \" + numberOfOpenSockets\r\n\t\t\t\t\t+ \" open MonitoringSockets\");\r\n\t\t}\r\n\t}", "int getNetworkInterfacesCount();", "public int getPortCount() throws SdpParseException {\n\t\treturn getNports();\n\t}", "public static int getNumStarted() {\n return numStarted;\n }", "int getActiveSessions();", "public int size() {\r\n return listeners.size() + weak.size();\r\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public int getStreamCount()\n {\n return _streams.size();\n }", "public int getNumIdle();", "public int getCountAtSessionStart() {\r\n return countAtSessionStart;\r\n }", "@Override\n public int getNumOpenConnections() {\n return allChannels.size() - 1;\n }", "public static int getNumberOfRowsTBLSERVERS() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt4 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt4.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // SQL Count query\r\n\t\trownumber.next();\r\n\r\n\t\tint rnum = rownumber.getInt(1);\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return value\r\n\r\n\t}", "public int getNumThreads() {\n return numThreads;\n }", "public int getNumAlive() {\n return numAlive;\n }", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "int getSessionCount();", "public static int getThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getThreadCount();\r\n\t}", "public int getNbClients() {\n\t\t\treturn nbClients;\r\n\t\t}", "public int getRequests()\n\t{\n\t\tint requests=0;\n\t\tString query=\"select count(*) from requests where status=?\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tps.setString(1, \"Confirm\");\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\trequests=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn requests;\n\t}", "public int getNumStreams()\r\n {\r\n return this.numStreams;\r\n }" ]
[ "0.7649942", "0.7049941", "0.70026475", "0.66757756", "0.6656013", "0.6612727", "0.6566897", "0.6558961", "0.6396418", "0.6365089", "0.630364", "0.6302125", "0.6293953", "0.6288076", "0.62866133", "0.6271091", "0.62681663", "0.62276495", "0.6210644", "0.6190455", "0.6167532", "0.615004", "0.61403507", "0.6118075", "0.6075592", "0.6071878", "0.6071878", "0.60706", "0.6055965", "0.6053409", "0.60523707", "0.6025317", "0.6022753", "0.6022753", "0.6022753", "0.6022753", "0.6022753", "0.60140544", "0.6005372", "0.6003993", "0.599974", "0.59966654", "0.59819615", "0.5970245", "0.59607285", "0.59607285", "0.594752", "0.5943589", "0.5927073", "0.59219146", "0.5921211", "0.5901899", "0.5882812", "0.5877523", "0.58769953", "0.5876193", "0.5873199", "0.58714545", "0.58659077", "0.58617324", "0.58543843", "0.5852584", "0.5850578", "0.58390605", "0.5827988", "0.5825538", "0.58252907", "0.58045346", "0.5803568", "0.5799495", "0.5794597", "0.57924193", "0.5788574", "0.57705164", "0.5770471", "0.5770033", "0.57645226", "0.5762168", "0.57614815", "0.57432705", "0.57400066", "0.57383895", "0.57372373", "0.57364357", "0.5735191", "0.57138866", "0.57019544", "0.57011837", "0.5699637", "0.568454", "0.56627244", "0.566144", "0.5657335", "0.5655066", "0.5647905", "0.562763", "0.56228614", "0.56108654", "0.56093454", "0.560832" ]
0.7772771
0
Returns the peak open serversocket count since the Java virtual machine started or the peak was reset.
int getPeakServerSocketCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getServerSocketCount();", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "long getTotalServerSocketsCount();", "public int getMaxConnections() {\n return maxConnections;\n }", "public int getMaxConnections()\n {\n return _maxConnections;\n }", "static final int getPeakThreadCount(boolean reset)\n {\n int count = maxLiveThreadCnt;\n if (reset)\n synchronized (nonDaemonLock)\n {\n maxLiveThreadCnt = liveThreadCnt;\n }\n return count + 1;\n }", "public static int getPeakThreadCount() {\r\n\t\treturn THREAD_MX_BEAN.getPeakThreadCount();\r\n\t}", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "public int getMaxCalls();", "void resetPeakServerSocketCount();", "public org.apache.axis.types.UnsignedInt getMaxconn() {\n return maxconn;\n }", "public Integer serverCount() {\n return this.serverCount;\n }", "public static int getMaxSessionCount() {\n\t\treturn (maxSessionCount);\n\t}", "@Override\n\tpublic int getMaxNumMonitors() {\n\t\treturn getMaxNumMonitors(this.rootMonitor);\n\t}", "public int getNumIdle();", "public int getMaxIdleConns() {\n return maxIdleConns;\n }", "private int getMaxConfiguredReplicaCount() {\n if (maxConfiguredReplicaCount > 0) {\n return maxConfiguredReplicaCount;\n } else {\n ClientMessage request = PNCounterGetConfiguredReplicaCountCodec.encodeRequest(name);\n ClientMessage response = invoke(request);\n maxConfiguredReplicaCount = PNCounterGetConfiguredReplicaCountCodec.decodeResponse(response);\n }\n return maxConfiguredReplicaCount;\n }", "public Long getMaxConcurrentConnection() {\n return this.MaxConcurrentConnection;\n }", "public int getMaxConns() {\n return maxConns;\n }", "public native int getOOBTimeoutCount();", "int getConnectionsCount();", "@Override\n public int getMaxConnections() throws ResourceException {\n return Integer.MAX_VALUE;\n }", "public int getNumStreams()\r\n {\r\n return this.numStreams;\r\n }", "public int get_max_accept() throws Exception;", "public final int getMaxLinkCount() {\n\t\tint r = 0;\n\t\tlockMe(this);\n\t\tr = maxLinkCount;\n\t\tunlockMe(this);\n\t\treturn r;\n\t}", "public int getMaxCount() {\n return maxCount_;\n }", "public int connectionCount()\n {\n return _connectionCount;\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "long getReceivedEventsCount();", "public java.lang.Integer getMaxHostRunningVms() {\r\n return maxHostRunningVms;\r\n }", "public static long getConnections() {\n return connections;\n }", "protected int getMaxRetries()\n {\n return heartbeat.getMaxRetries();\n }", "public int getRunningDevicesCount();", "public int getMaxOverhaulCount () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_MaxOverhaulCount);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}", "public int getMaxCount() {\n return maxCount_;\n }", "public Long getMaximumPlayerSessionCount() {\n return this.MaximumPlayerSessionCount;\n }", "public int getNumberOfLastMinuteEvents() {\n return getNumberOfEventsByMinuteOrHour(true);\n }", "public int getMinConnections() {\n return minConnections;\n }", "private int getMaxReconsumeTimes() {\n if (this.defaultMQPushConsumer.getMaxReconsumeTimes() == -1) {\n return Integer.MAX_VALUE;\n } else {\n return this.defaultMQPushConsumer.getMaxReconsumeTimes();\n }\n }", "public java.lang.Integer getMaxRunningVMs() {\r\n return maxRunningVMs;\r\n }", "public int numberOfOpenSites() {\n return (openCount);\n }", "public interface ServerSocketMXBean {\r\n\r\n /**\r\n * Returns all live server-socket IDs. Some server-socket included in the\r\n * returned array may have been terminated when this method returns.\r\n * \r\n * @return an array of <tt>long</tt>, each is a server-socket ID.\r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"monitor\").\r\n */\r\n long[] getAllServerSocketIds();\r\n\r\n /**\r\n * Returns the total number of server-sockets opened since the Java virtual\r\n * machine started.\r\n * \r\n * @return the total number of server-sockets opened.\r\n */\r\n long getTotalServerSocketsCount();\r\n\r\n /**\r\n * Returns the peak open server-socket count since the Java virtual machine\r\n * started or the peak was reset.\r\n * \r\n * @return the peak live server-socket count.\r\n */\r\n int getPeakServerSocketCount();\r\n\r\n /**\r\n * Returns the current number of open server-sockets.\r\n * \r\n * @return the current number of open server-sockets.\r\n */\r\n int getServerSocketCount();\r\n\r\n /**\r\n * Returns the total number of sockets accepted by all server-sockets since\r\n * the Java virtual machine started.\r\n * \r\n * @return the total number of server-sockets opened.\r\n */\r\n long getTotalAcceptCount();\r\n\r\n /**\r\n * Returns the total number of sockets accepted by a server-socket with the\r\n * specified <tt>id</tt>.\r\n * \r\n * @param id the ID of the server-socket. Must be positive.\r\n * @return the total number of server-sockets opened.\r\n */\r\n long getTotalAcceptCount(long id);\r\n\r\n /**\r\n * Returns the server-socket info for a server-socket of the specified\r\n * <tt>id</tt>.\r\n * <p>\r\n * This method returns a <tt>ServerSocketInfo</tt> object representing the\r\n * server-socket information for the server-socket of the specified ID. If a\r\n * server-socket of the given ID is not open or does not exist, this method\r\n * will return <tt>null</tt>.\r\n * <p>\r\n * <b>MBeanServer access </b>: <br>\r\n * The mapped type of <tt>ServerSocketInfo</tt> is <tt>CompositeData</tt>\r\n * with attributes as specified in\r\n * {@link ServerSocketInfo#from ServerSocketInfo}.\r\n * \r\n * @param id the ID of the server-socket. Must be positive.\r\n * @return a {@link ServerSocketInfo}object for the server-socket of the\r\n * given ID; <tt>null</tt> if the server-socket of the given ID is\r\n * not open or it does not exist.\r\n * @throws IllegalArgumentException if <tt>id &lt= 0</tt>.\r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"monitor\").\r\n */\r\n ServerSocketInfo getServerSocketInfo(long id);\r\n\r\n /**\r\n * Returns the server-socket info for each server-socket whose ID is in the\r\n * input array <tt>ids</tt>.\r\n * <p>\r\n * This method returns an array of the <tt>ServerSocketInfo</tt> objects.\r\n * If a server-socket of a given ID is not open or does not exist, the\r\n * corresponding element in the returned array will contain <tt>null</tt>.\r\n * <p>\r\n * <b>MBeanServer access </b>: <br>\r\n * The mapped type of <tt>ServerSocketInfo</tt> is <tt>CompositeData</tt>\r\n * with attributes as specified in\r\n * {@link ServerSocketInfo#from ServerSocketInfo}.\r\n * \r\n * @param ids an array of server-socket IDs\r\n * @return an array of the {@link ServerSocketInfo}objects, each containing\r\n * information about a server-socket whose ID is in the\r\n * corresponding element of the input array of IDs.\r\n * @throws IllegalArgumentException if any element in the input array\r\n * <tt>ids</tt> is <tt>&lt= 0</tt>.\r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"monitor\").\r\n */\r\n ServerSocketInfo[] getServerSocketInfo(long[] ids);\r\n\r\n /**\r\n * Resets the peak server-socket count to the current number of open\r\n * server-sockets.\r\n * \r\n * @throws java.lang.SecurityException if a security manager exists and the\r\n * caller does not have ManagementPermission(\"control\").\r\n * @see #getPeakServerSocketCount\r\n * @see #getServerSocketCount\r\n */\r\n void resetPeakServerSocketCount();\r\n}", "int getTotalCreatedConnections();", "long getListenerCount();", "public int getNumStreams() {\n return numStreams;\n }", "public int getNumOfServers() {\n return numOfServers;\n }", "public int getMaxInstances() {\n return maxInstances;\n }", "public Long peakWorkingSet64() {\n return this.peakWorkingSet64;\n }", "public int getStreamCount() {\n return streamCount;\n }", "public int numberOfOpenSites() {\n\t\treturn openCount;\n\t}", "public java.lang.Integer getMaxSupportedVcpus() {\r\n return maxSupportedVcpus;\r\n }", "public Object getMaxConcurrentConnections() {\n return this.maxConcurrentConnections;\n }", "public Integer maxPort() {\n return this.maxPort;\n }", "public Object maxConcurrentConnections() {\n return this.maxConcurrentConnections;\n }", "public String getDatabaseConnectionPoolMaxNumberConnections(){\n \t\treturn getProperty(\"org.sagebionetworks.pool.max.number.connections\");\n \t}", "public int numConnections(){\n return connections.size();\n }", "int getMonitors();", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "public int getMaxWait() {\n\t\treturn this.maxWait;\n\t}", "private void countSocketClose() {\n \t\tcurrentlyOpenSockets.decrementAndGet();\n \t\tsynchronized (this) {\n \t\t\tthis.notifyAll();\n \t\t}\n \n \t}", "@Override\n public int getNumOpenConnections() {\n return allChannels.size() - 1;\n }", "public java.lang.Integer getMaxHostSupportedVcpus() {\r\n return maxHostSupportedVcpus;\r\n }", "public int numberOfOpenSites() {\n return this.numOfOpenSites;\n }", "public int getMaxLagFirstWaitTime() {\n\t\treturn maxLagFirstWaitTime;\n\t}", "public int numberOfOpenSites() {\n return NOpen;\r\n }", "Integer getConnectorCount();", "int getConnectionCount();", "public int numberOfOpenSites() {\n return open_blocks;\n }", "public Long peakVirtualMemorySize64() {\n return this.peakVirtualMemorySize64;\n }", "public int getNumberOfLastHourEvents() {\n return getNumberOfEventsByMinuteOrHour(false);\n }", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "public int numberOfOpenSites() {\n return mOpenSites;\n }", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public int getAvailableCount();", "public int numberOfOpenSites() {\n return count;\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int getMaxLagMaxRetries() {\n\t\treturn maxLagMaxRetries;\n\t}", "public int getTotalConnections()\n {\n // return _connections.size();\n return 0;\n }", "public java.lang.Integer getMaxPorts() {\r\n return maxPorts;\r\n }", "public Integer getMaxTimerDrivenThreads() {\n return maxTimerDrivenThreads;\n }", "public int numberOfOpenSites(){\n\t\treturn numOpen;\n\t}", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int numberOfOpenSites(){\n return numOpenSites;\n }", "public int numberOfOpenSites() {\n return openNum;\n }", "Integer backlogCapacity();", "public static int getMaxThreadCount(){\n return Integer.parseInt(properties.getProperty(\"maxThreadCount\"));\n }", "public int getCount(){\r\n\t\tif(_serverinfo != null){\r\n\t\t\treturn _serverinfo.length / 6;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public int numberOfOpenSites() {\n \treturn size;\n }", "public java.lang.Integer getMaxRegisteredVMs() {\r\n return maxRegisteredVMs;\r\n }", "public int getSessionMaxAliveTime();", "long getRequestsCount();" ]
[ "0.6820582", "0.6590013", "0.6548523", "0.65256834", "0.6524642", "0.6421768", "0.6270213", "0.6253332", "0.6181653", "0.6179006", "0.61532784", "0.6121524", "0.60628873", "0.60268337", "0.6022807", "0.5994856", "0.5992362", "0.594969", "0.58985305", "0.58856624", "0.58492756", "0.57928485", "0.57854205", "0.5784479", "0.57646894", "0.572917", "0.57197946", "0.5703599", "0.56974214", "0.5692783", "0.56754893", "0.5664126", "0.56568414", "0.5652337", "0.56504846", "0.5645901", "0.5627969", "0.5619022", "0.56098646", "0.560658", "0.5601673", "0.5601308", "0.56000066", "0.55984926", "0.5596394", "0.5560884", "0.55545884", "0.5551154", "0.5546588", "0.5544008", "0.55438733", "0.55398005", "0.5532773", "0.55302846", "0.55289716", "0.55256546", "0.55235606", "0.551966", "0.5518987", "0.5514119", "0.5512437", "0.55077463", "0.5498734", "0.54983926", "0.54908913", "0.5488066", "0.54871726", "0.5471837", "0.54713446", "0.54684824", "0.5460734", "0.5458203", "0.54558027", "0.54424155", "0.54405075", "0.5435685", "0.5435685", "0.54259646", "0.5425552", "0.5425541", "0.5424897", "0.5424897", "0.5424897", "0.5424897", "0.5424897", "0.54211235", "0.54165524", "0.54097223", "0.54082507", "0.5406111", "0.53953826", "0.5391715", "0.5388919", "0.5382724", "0.53822863", "0.5381966", "0.5367599", "0.5359098", "0.5356394", "0.53498656" ]
0.82533044
0
Returns the current number of open serversockets.
int getServerSocketCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "int getConnectionsCount();", "int getPeakServerSocketCount();", "long getTotalServerSocketsCount();", "public int numConnections(){\n return connections.size();\n }", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "@Override\n public int getNumOpenConnections() {\n return allChannels.size() - 1;\n }", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "public Integer serverCount() {\n return this.serverCount;\n }", "public int numberOfOpenSites() {\n\t\treturn openCount;\n\t}", "public int connectionCount()\n {\n return _connectionCount;\n }", "public int numberOfOpenSites() {\n return (openCount);\n }", "@Override\r\n\tpublic int getConnectionsCount() {\r\n\t\treturn currentConnections.get();\r\n\t}", "public int numberOfOpenSites() {\n return openNum;\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "public int numberOfOpenSites() {\n return count;\n }", "int getConnectionCount();", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "private synchronized static void decrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets--;\r\n\t}", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSites;\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "public int numberOfOpenSites() {\n return openSitesCount;\n }", "public int numberOfOpenSites() {\n return NOpen;\r\n }", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "public static long getConnections() {\n return connections;\n }", "public int numberOfOpenSites() {\n return mOpenSites;\n }", "public int numberOfOpenSites() {\n return this.numOfOpenSites;\n }", "public int numberOfOpenSites(){\n\t\treturn numOpen;\n\t}", "public int numberOfOpenSites() {\n return numOpen;\n }", "public int numberOfOpenSites() {\n \treturn num;\r\n }", "public int numberOfOpenSites() {\n return numOpen;\n }", "Integer getConnectorCount();", "public int numberOfOpenSites() {\n \treturn size;\n }", "public int getNumOfServers() {\n return numOfServers;\n }", "public int numberOfOpenSites() {\n return numberOfOpenSites;\n }", "int getTotalCreatedConnections();", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "public int numberOfOpenSites(){\n return numOpenSites;\n }", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "public int numberOfOpenSites()\r\n { return openSites; }", "public int numberOfOpenSites() {\n return open_blocks;\n }", "public int getSize() {\n\t\treturn currConnections;\n\t}", "public abstract int getNumSessions();", "public int getMaxConnections()\n {\n return _maxConnections;\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "private Set<Session> getOpenServerSessions(){\n ClientContainer jettySocketServer = getWebSocketsContainer();\n return jettySocketServer.getOpenSessions();\n }", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "public int getNumIdle();", "public int numberOfOpenSites() {\n return 0;\n }", "private void countConnectingSocket() {\n \t\tcurrentlyConnectingSockets.incrementAndGet();\n \t}", "private void countSocketClose() {\n \t\tcurrentlyOpenSockets.decrementAndGet();\n \t\tsynchronized (this) {\n \t\t\tthis.notifyAll();\n \t\t}\n \n \t}", "public int getConnectionCount() {\n int i;\n synchronized (this.bindings) {\n i = 0;\n for (IntentBindRecord intentBindRecord : this.bindings) {\n i += intentBindRecord.connections.size();\n }\n }\n return i;\n }", "public int getMaxConnections() {\n return maxConnections;\n }", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public int getActiveSessions();", "int getRequestsCount();", "int getRequestsCount();", "public synchronized int activeStreams() {\n return streams.size();\n\n }", "public int getTotalConnections()\n {\n // return _connections.size();\n return 0;\n }", "@Override\n public int getNumIdle() {\n return _pool.size();\n }", "public int getMaxIdleConns() {\n return maxIdleConns;\n }", "public static int openSocket() throws IOException {\n serverSocket = new ServerSocket(0, 10, InetAddress.getLocalHost());\n return serverSocket.getLocalPort();\n }", "public int getNumStreams()\r\n {\r\n return this.numStreams;\r\n }", "public int getClients()\r\n\t{\r\n\t\treturn numberOfClients;\r\n\t}", "public int getRunningDevicesCount();", "int getActiveSessions();", "public final int getOpenCount() {\n\t\treturn m_openCount;\n\t}", "public int getNbClients() {\n\t\t\treturn nbClients;\r\n\t\t}", "public int getNumAlive() {\n return numAlive;\n }", "public static Integer numValidClients() {\n return getLoggedInUserConnections().size() + anonClients.size();\n }", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "public int clientsCount(){\n return clientsList.size();\n }", "public int getNumStreams() {\n return numStreams;\n }", "public long getReconnects() {\n return reconnects.get();\n }", "public int getStreamCount() {\n return streamCount;\n }", "long getRequestsCount();", "int getPeersCount();", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "public static synchronized long getConnectionAttemptsGlobalCounter() {\n return connectionAttemptsGlobalCounter;\n }", "public int getRequestsCount() {\n return requests_.size();\n }", "public int getNumThreads() {\n return numThreads;\n }", "public int getStreamCount()\n {\n return _streams.size();\n }", "public int numberOfOpenSites(){ return openSites; }", "public int getNumOfThreads() {\n return numOfThreads;\n }", "public int getRequestsCount() {\n return requests_.size();\n }", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "private static synchronized void printMonitoringSocketStatus() {\r\n\r\n\t\tif (log.isInfoEnabled()) {\r\n\t\t\tlog.info(\"There are currently \" + numberOfOpenSockets\r\n\t\t\t\t\t+ \" open MonitoringSockets\");\r\n\t\t}\r\n\t}", "long getListenerCount();", "public int getAvailableCount();", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }", "int getNetworkInterfacesCount();", "public int getChannelCount();", "public int getOpenWhiteListCount() {\n return openWhiteList_.size();\n }" ]
[ "0.79763156", "0.7723148", "0.74066377", "0.7398035", "0.73601544", "0.7335408", "0.7240033", "0.70916986", "0.7073893", "0.70492226", "0.7037034", "0.7032247", "0.69988805", "0.6945479", "0.6944811", "0.6944594", "0.6937603", "0.69248873", "0.6921024", "0.68996984", "0.68959546", "0.68945515", "0.68945515", "0.68945515", "0.68945515", "0.68945515", "0.68802667", "0.68802667", "0.6872052", "0.68656033", "0.68637264", "0.6852926", "0.6850173", "0.68295634", "0.68289155", "0.68033606", "0.6782586", "0.6762769", "0.67566556", "0.67410725", "0.67199045", "0.66740537", "0.66627544", "0.6649902", "0.66450983", "0.6630014", "0.66147476", "0.65817523", "0.6581482", "0.65576965", "0.65385145", "0.6531002", "0.65292245", "0.65279925", "0.6511161", "0.6497698", "0.64915943", "0.6482354", "0.64641815", "0.64541715", "0.6425916", "0.6399823", "0.63912094", "0.63912094", "0.63875383", "0.6382189", "0.63763654", "0.63763255", "0.63351166", "0.63284177", "0.63129765", "0.6306549", "0.6298801", "0.62734777", "0.62682384", "0.62588996", "0.62487376", "0.6239913", "0.6238771", "0.6230275", "0.6227513", "0.6223885", "0.6221673", "0.62152165", "0.6208839", "0.6207851", "0.6190799", "0.6190477", "0.6185502", "0.6167808", "0.6151429", "0.6134325", "0.612692", "0.6125715", "0.61239105", "0.6090695", "0.6055617", "0.60544413", "0.605189", "0.60342" ]
0.8210244
0
Returns the total number of sockets accepted by all serversockets since the Java virtual machine started.
long getTotalAcceptCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getTotalServerSocketsCount();", "int getServerSocketCount();", "int getPeakServerSocketCount();", "int getConnectionsCount();", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "public int numConnections(){\n return connections.size();\n }", "int getTotalCreatedConnections();", "public static Integer numValidClients() {\n return getLoggedInUserConnections().size() + anonClients.size();\n }", "public static long getNumberOfOpenConnections() {\n return openConnections.size();\n }", "public Integer serverCount() {\n return this.serverCount;\n }", "public int getTotalConnections()\n {\n // return _connections.size();\n return 0;\n }", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "int getNetworkInterfacesCount();", "private void countConnectingSocket() {\n \t\tcurrentlyConnectingSockets.incrementAndGet();\n \t}", "@Exported\n public int getNumberOfOnlineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOnline()) {\n count++;\n }\n }\n return count;\n }", "public int getNumConnects() {\n\t\treturn numConnects;\n\t}", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "int getPeersCount();", "public static long getConnections() {\n return connections;\n }", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "private int visitedNetworksCount() {\n final HashSet<String> visitedNetworksSet = new HashSet<>(mVisitedNetworks);\n return visitedNetworksSet.size();\n }", "public int getNumOfServers() {\n return numOfServers;\n }", "int getConnectionCount();", "public int size() {\r\n return listeners.size() + weak.size();\r\n }", "public int getPortCount() throws SdpParseException {\n\t\treturn getNports();\n\t}", "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 getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "long getListenerCount();", "Integer getConnectorCount();", "@Override\r\n\tpublic int getConnectionsCount() {\r\n\t\treturn currentConnections.get();\r\n\t}", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "public int connectionCount()\n {\n return _connectionCount;\n }", "@Override\n public int getNumConnections()\n {\n return connections.size();\n }", "public int getConnectionCount() {\n int i;\n synchronized (this.bindings) {\n i = 0;\n for (IntentBindRecord intentBindRecord : this.bindings) {\n i += intentBindRecord.connections.size();\n }\n }\n return i;\n }", "public int getSize() {\n\t\treturn currConnections;\n\t}", "public int clientsCount(){\n return clientsList.size();\n }", "public static int countNodes() {\n\t\treturn count_nodes;\n\t}", "public ArrayList<ServerSocket> getConnectedClients() {\n return connectedClients;\n }", "int getPeerCount();", "int getRequestsCount();", "int getRequestsCount();", "public int size() {\n int size = 0;\n for (Map<Number160, PeerStatistic> map : peerMapVerified) {\n synchronized (map) {\n size += map.size();\n }\n }\n return size;\n }", "public int getRequests()\n\t{\n\t\tint requests=0;\n\t\tString query=\"select count(*) from requests where status=?\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tps.setString(1, \"Confirm\");\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\trequests=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn requests;\n\t}", "@Exported\n public int getNumberOfOfflineSlaves() {\n int count = 0;\n for (Slave s : slaves) {\n if (s.getComputer().isOffline()) {\n count++;\n }\n }\n return count;\n }", "long getReceivedEventsCount();", "protected int numPeers() {\n\t\treturn peers.size();\n\t}", "@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_FACILITY_HOST);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public long getConnectionCount() {\n return connectionCount.getCount();\n }", "long getRequestsCount();", "public int getRunningDevicesCount();", "public int getTotalWorkerCount() {\n return this.workerCount;\n }", "public int numOutgoing() {\r\n int result = outgoing.size();\r\n return result;\r\n }", "public long getRepairSessions() {\n long repairSessions = 0;\n\n Iterator<Map.Entry<String, JMXEnabledThreadPoolExecutorMBean>> threads = nodeProbe.getThreadPoolMBeanProxies();\n while (threads.hasNext()) {\n Map.Entry<String, JMXEnabledThreadPoolExecutorMBean> thread = threads.next();\n\n if (thread.getKey().equals(REPAIR_THREAD_POOL_NAME)) {\n JMXEnabledThreadPoolExecutorMBean threadPoolProxy = thread.getValue();\n repairSessions = threadPoolProxy.getPendingTasks() + threadPoolProxy.getActiveCount();\n }\n }\n\n return repairSessions;\n }", "@Override\n public int countAll() throws SystemException {\n Long count = (Long) FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n FINDER_ARGS_EMPTY, this);\n\n if (count == null) {\n Session session = null;\n\n try {\n session = openSession();\n\n Query q = session.createQuery(_SQL_COUNT_BROKERMESSAGELISTENER);\n\n count = (Long) q.uniqueResult();\n\n FinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n FINDER_ARGS_EMPTY, count);\n } catch (Exception e) {\n FinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n FINDER_ARGS_EMPTY);\n\n throw processException(e);\n } finally {\n closeSession(session);\n }\n }\n\n return count.intValue();\n }", "public int getSize()\n\t{\n\t\treturn _floodClient.size();\n\t}", "public int getServicesCount() {\n return services_.size();\n }", "public int getServicesCount() {\n return services_.size();\n }", "public int countNumberClientsTotal() {\n\t\tint counter = 0;\n\t\tfor(int number : numberClients.values())\n\t\t\tcounter += number;\n\t\treturn counter;\n\t}", "private void countSocketClose() {\n \t\tcurrentlyOpenSockets.decrementAndGet();\n \t\tsynchronized (this) {\n \t\t\tthis.notifyAll();\n \t\t}\n \n \t}", "public int getRequestsCount() {\n return instance.getRequestsCount();\n }", "public int numEdges() {\n int tot = 0;\n\n ListIterator<EdgeList> curEdge = edgeListVector.listIterator();\n while (curEdge.hasNext()) {\n tot += curEdge.next().size();\n }\n\n return tot;\n }", "public static int getTotalSessionCount() {\n\t\treturn (totalSessionCount);\n\t}", "public int getRequestsCount() {\n return requests_.size();\n }", "public int getRequestsCount() {\n return requests_.size();\n }", "synchronized public int getSize() {\n\t\tint x = 0;\n\t\tfor (Enumeration<PeerNode> e = peersLRU.elements(); e.hasMoreElements();) {\n\t\t\tPeerNode pn = e.nextElement();\n\t\t\tif(!pn.isUnroutableOlderVersion()) x++;\n\t\t}\n\t\treturn x;\n\t}", "long[] getAllServerSocketIds();", "public static int getNumberOfRowsServer() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt3 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt3.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // sql count statement\r\n\t\trownumber.next(); // move cursor to first position\r\n\r\n\t\tint rnum = rownumber.getInt(1); //store result in an integer variable\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return integer\r\n\r\n\t}", "public int Sizeofnetwork() {\n\t\treturn Nodeswithconnect.size();\n\t}", "int getNetTransferMsgsCount();", "public long getAllContextNodeCount();", "public static int getTcpMssSize() {\n return tcp_mss_size;\n }", "public int getServicesCount() {\n if (servicesBuilder_ == null) {\n return services_.size();\n } else {\n return servicesBuilder_.getCount();\n }\n }", "public int getServicesCount() {\n if (servicesBuilder_ == null) {\n return services_.size();\n } else {\n return servicesBuilder_.getCount();\n }\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "int getTotalNumOfNodes() {\n\t\treturn adjList.size();\n\t}", "private int getNumPeers() {\n String[] peerIdList = skylinkConnection.getPeerIdList();\n if (peerIdList == null) {\n return 0;\n }\n // The first Peer is the local Peer.\n return peerIdList.length - 1;\n }", "public int get_max_accept() throws Exception;", "public int getConnectedDeviceCount() {\n return getConnectedDevices().size();\n }", "int numSeatsAvailable();", "@Exported\n public int getNumberOfSlaves() {\n if (this.slaves == null) {\n return 0;\n }\n return this.slaves.size();\n }", "public int getNumNetworkCopies(){\n synchronized (networkCopiesLock){\n return this.networkCopies.size();\n }\n }", "private synchronized static void decrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets--;\r\n\t}", "@Override\n\tpublic int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_CANDIDATE);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public int countAll() throws SystemException {\n\t\tLong count = (Long)FinderCacheUtil.getResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\tFINDER_ARGS_EMPTY, this);\n\n\t\tif (count == null) {\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(_SQL_COUNT_VCAL);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tif (count == null) {\n\t\t\t\t\tcount = Long.valueOf(0);\n\t\t\t\t}\n\n\t\t\t\tFinderCacheUtil.putResult(FINDER_PATH_COUNT_ALL,\n\t\t\t\t\tFINDER_ARGS_EMPTY, count);\n\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int getServicesCount();", "int getServicesCount();", "public int getSize(){\r\n\t\treturn listeners.size();\r\n\t}", "@java.lang.Override\n @java.lang.Deprecated public int getListeningAddressesCount() {\n return listeningAddresses_.size();\n }", "public static int getNumberOfRowsTBLSERVERS() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt4 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt4.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // SQL Count query\r\n\t\trownumber.next();\r\n\r\n\t\tint rnum = rownumber.getInt(1);\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return value\r\n\r\n\t}", "public int getNumberOfNodesEvaluated();", "public static int getCurrentSessionCount() {\n\t\treturn (currentSessionCount);\n\t}", "public int getNumberOfIncludedServices(){\n \n return listOfIncludedServices.size();\n }", "public int getNetTransferMsgsCount() {\n return netTransferMsgs_.size();\n }", "public static int numberOfStops() {\n return getAllStops().size();\n }", "public int getRequestsCount() {\n if (requestsBuilder_ == null) {\n return requests_.size();\n } else {\n return requestsBuilder_.getCount();\n }\n }", "private void askForNumberOfRequests() {\n\t\tconnectToServer();\n\t\tout.println(\"How many requests have you handled ?\");\n\t\tout.flush();\n\t\tint count = 0;\n\t\ttry {\n\t\t\tcount = Integer.parseInt(in.readLine());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot receive num requests from server\");\n\t\t}\n\t\tSystem.out.println(\"CLIENT: The number of requests are \" + count);\n\t\tdisconnectFromServer();\n\t}", "private static synchronized void printMonitoringSocketStatus() {\r\n\r\n\t\tif (log.isInfoEnabled()) {\r\n\t\t\tlog.info(\"There are currently \" + numberOfOpenSockets\r\n\t\t\t\t\t+ \" open MonitoringSockets\");\r\n\t\t}\r\n\t}", "@java.lang.Deprecated public int getListeningAddressesCount() {\n if (listeningAddressesBuilder_ == null) {\n return listeningAddresses_.size();\n } else {\n return listeningAddressesBuilder_.getCount();\n }\n }", "public Object getNumberOfConnectedComponents() {\r\n\t\tConnectivityInspector<Country, DefaultEdge> inspector=new ConnectivityInspector<Country, DefaultEdge>(graph);\r\n\t\treturn inspector.connectedSets().size();\r\n\t}" ]
[ "0.8000313", "0.7686085", "0.7064491", "0.635544", "0.63255143", "0.6305058", "0.62521344", "0.6233599", "0.6228558", "0.61615396", "0.614216", "0.6098858", "0.6095568", "0.6080153", "0.60435367", "0.6042233", "0.60328287", "0.60039943", "0.5980702", "0.5941689", "0.59227633", "0.5911927", "0.5897295", "0.58631986", "0.58579415", "0.58376104", "0.58176905", "0.5816627", "0.57674676", "0.5758954", "0.5730388", "0.57280695", "0.57173157", "0.56876135", "0.56872994", "0.5687292", "0.56768006", "0.56587976", "0.56440306", "0.56397474", "0.5594285", "0.5594285", "0.5593164", "0.55899185", "0.55869484", "0.5583144", "0.5577711", "0.55764633", "0.5572551", "0.55524606", "0.5544601", "0.55428576", "0.5534922", "0.55329263", "0.5531382", "0.5530307", "0.55258584", "0.55258584", "0.552518", "0.5523319", "0.5522573", "0.55140144", "0.5509458", "0.5504635", "0.54814196", "0.54807496", "0.5460149", "0.54583216", "0.5453514", "0.54522", "0.54485655", "0.5440215", "0.5439564", "0.5439564", "0.5434701", "0.5433421", "0.5432911", "0.5432181", "0.54246", "0.54225016", "0.54169375", "0.5412201", "0.5405428", "0.53910804", "0.53879726", "0.53832024", "0.53832024", "0.5376875", "0.5373828", "0.53651077", "0.5363999", "0.5359856", "0.5351791", "0.53517807", "0.5350303", "0.5349708", "0.53485054", "0.53462297", "0.53380406", "0.53286046" ]
0.55998236
40
Returns the total number of sockets accepted by a serversocket with the specified id.
long getTotalAcceptCount(long id);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getTotalServerSocketsCount();", "int getServerSocketCount();", "public void acceptedSocket(long socketId) {}", "int getPeakServerSocketCount();", "int getConnectionsCount();", "int getPeersCount();", "public int getTicketsCountService(String eventid) throws SQLException {\n\t\treturn dao.getTicketsCountDao(eventid);\r\n\t}", "@Override\n\tpublic Integer count(Integer id) {\n\t\treturn chiTietDonHangRepository.count(id);\n\t}", "public static int countEquivalentIDs(java.lang.String id) { throw new RuntimeException(\"Stub!\"); }", "public int get_max_accept() throws Exception;", "int getTotalCreatedConnections();", "public int getNumberOfSoldBeanBags(String id)\r\n throws BeanBagIDNotRecognisedException, IllegalIDException {\n Check.validID(id);\r\n // Define integer \"counter\" and set the value to 0.\r\n int counter = 0;\r\n // Loop through every object in the \"stockList\" object array list.\r\n for (int i = 0; i < stockList.size(); i++) {\r\n // If the ID in the stockList matches the passed parameter ID\r\n // AND the BeanBag boolean state \"isSold()\" is true.\r\n if ((((BeanBag) stockList.get(i)).getID()).equals(id)\r\n & ((BeanBag) stockList.get(i)).isSold()) {\r\n // Increment the \"counter\" integer by 1.\r\n counter++;\r\n }\r\n }\r\n // If the \"counter\" integer is 0.\r\n if (counter == 0) {\r\n // Throw exception BeanBagIDNotRecognisedException, as no beanBags with that ID have been\r\n // sold.\r\n throw new BeanBagIDNotRecognisedException(\"No BeanBags with this ID have been sold.\");\r\n }\r\n // Return the value of the \"counter\" integer.\r\n return counter;\r\n }", "long[] getAllServerSocketIds();", "int getPeerCount();", "public int getCountMessages(String id_chat){\n\t\tint result = -1;\n\n\t\tCursor mCount= db.rawQuery(\"SELECT COUNT(*) FROM \"+TABLE_MESSAGES+\" WHERE \"+ID_CHAT+\" ='\"+id_chat+\"' GROUP BY \"+ID_CHAT, null);\n\t\t//Cursor mCount= db.rawQuery(\"SELECT COUNT(*) FROM \"+TABLE_MESSAGES+\" WHERE \"+ID_CHAT+\" = ? GROUP BY ?\", null);\n\n\t\tif(mCount.moveToFirst()){\n\t\t\tint count= mCount.getInt(0);\n\t\t\tresult = count;\n\t\t}\n\t\tmCount.close();\n\t\treturn result;\n\n\t}", "private void askForNumberOfRequests() {\n\t\tconnectToServer();\n\t\tout.println(\"How many requests have you handled ?\");\n\t\tout.flush();\n\t\tint count = 0;\n\t\ttry {\n\t\t\tcount = Integer.parseInt(in.readLine());\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(\"CLIENT: Cannot receive num requests from server\");\n\t\t}\n\t\tSystem.out.println(\"CLIENT: The number of requests are \" + count);\n\t\tdisconnectFromServer();\n\t}", "private void countConnectingSocket() {\n \t\tcurrentlyConnectingSockets.incrementAndGet();\n \t}", "public int countByid_(long id_);", "public int manyConnections() {\n\t\tint ammound = 0;\n\t\tfor (int i = 0; i < this.size(); i++) {\n\t\t\tif(this.get(i).clientAlive) {\n\t\t\t\tammound++;\n\t\t\t}\n\t\t\tSystem.out.println(\"Ist Client Nr. \" + i + \" frei? \" + !this.get(i).isAlive());\n\t\t}\n\t\treturn ammound;\n\t\t\n\t}", "long getTotalAcceptCount();", "public int numofConnections() {\n\t\tint numberofconnection = 0;\n\t\tString node;\n\t\tfor (String key : Nodeswithconnect.keySet()) {\n\t\t\tfor (int i = 0; i < Nodeswithconnect.get(key).length; i++) {\n\t\t\t\tnode = Nodeswithconnect.get(key)[i];\n\t\t\t\tif (!node.equals(\"null\")) {\n\t\t\t\t\tnumberofconnection++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn numberofconnection;\n\t}", "int getNetworkInterfacesCount();", "public int getTotalConnections()\n {\n // return _connections.size();\n return 0;\n }", "int getConnectionCount();", "public double getEdgeLength(String id) {\n\t\treturn idToEdge.get(id).getWeight();\n\t}", "public static int getNumberOfRowsServer() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt3 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt3.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // sql count statement\r\n\t\trownumber.next(); // move cursor to first position\r\n\r\n\t\tint rnum = rownumber.getInt(1); //store result in an integer variable\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return integer\r\n\r\n\t}", "public static int getCountByExperimentId(int id) throws SQLException {\n PreparedStatement st = DatabaseConnector.getInstance().getConn().prepareStatement(\"SELECT COUNT(*) as count FROM \" + table + \" WHERE Experiment_idExperiment=?\");\n st.setInt(1, id);\n ResultSet rs = st.executeQuery();\n rs.next(); // there will always be a count\n int count = rs.getInt(\"count\");\n rs.close();\n return count;\n }", "int numSeatsAvailable();", "public int eventIdToCapacity(String id){\n Event e = getEvent(id);\n return e.getCapacity();\n }", "public int numIncoming() {\r\n int result = incoming.size();\r\n return result;\r\n }", "public int numConnections(){\n return connections.size();\n }", "public static int getTotalTicketsResolved(int technicianId) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tint couunt = 0;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tString query = \"SELECT Count(technician_id) FROM alerts where technician_id= ? and status= 3;\";\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\tstmt.setInt(1, technicianId);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcouunt = rs.getInt(1);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn couunt;\r\n\t}", "public int bondCount(String id, String bondname) {\n \treturn accountFactory.bondCount(id, bondname);\n }", "int getNetTransferMsgsCount();", "Integer getConnectorCount();", "private synchronized Long getCount(String id) {\n if (counts.isEmpty()) {\n log.info(\"Getting counts for ontology\");\n Set<String> availIds = efo.getAllTermIds();\n\n for (String efoTerm : availIds) {\n Attribute attr = new EfoAttribute(efoTerm);\n int geneCount = atlasStatisticsQueryService.getBioEntityCountForEfoAttribute(attr, StatisticsType.UP_DOWN);\n if (geneCount > 0)\n counts.put(attr.getValue(), (long) geneCount);\n\n }\n log.info(\"Done getting counts for ontology\");\n }\n\n return counts.get(id);\n }", "public static int countUnseenMessagesFromApplianceStatus(int doId) {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"CustomerBAL.countUnseenMessagesFromApplianceStatus()\");\r\n\t\tint count = 0;\r\n\t\ttry {\r\n\t\t\tConnection connection = Connect.getConnection();\r\n\t\t\tif (connection != null) {\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{CALL count_unseen_messages_from_appliance_status(?)}\");\r\n\t\t\t\tprepareCall.setInt(1, doId);\r\n\t\t\t\tResultSet resultSet = prepareCall.executeQuery();\r\n\t\t\t\t// End Stored Procedure\r\n\t\t\t\twhile (resultSet.next()) {\r\n\t\t\t\t\tcount = resultSet.getInt(1);\r\n\t\t\t\t}\r\n\t\t\t\tresultSet.close();\r\n\t\t\t\tprepareCall.close();\r\n\t\t\t\tconnection.close();\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\r\n\t\t}\r\n\t\treturn count;\r\n\r\n\t}", "int sizeOf(int node){\n\t\tint counter =1;\r\n\t\tfor (int i=0;i<idNode.length;i++){ //Count all node with the same parent\r\n\t\t\tif (idNode[i]==node){\r\n\t\t\t\tcounter++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn counter;\r\n\t}", "int getRequestsCount();", "int getRequestsCount();", "int getMessageIdCount();", "@Override\n\tpublic int getSellCountentCount(int id) {\n\n\t\treturn trxMapper.getCountCountent(id);\n\t}", "public static int getTotalTickets(int technicianId) {\r\n\r\n\t\tResultSet rs = null;\r\n\r\n\t\tint couunt = 0;\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\r\n\t\t\tString query = \"SELECT Count(technician_id) FROM alerts where technician_id=?;\";\r\n\t\t\tPreparedStatement stmt = (PreparedStatement) con\r\n\t\t\t\t\t.prepareStatement(query);\r\n\t\t\tstmt.setInt(1, technicianId);\r\n\t\t\trs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcouunt = rs.getInt(1);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn couunt;\r\n\t}", "private int getNumberOfChildren(String elemId) {\n return selenium.getXpathCount(\"//*[@id='\" + elemId + \"']/*\").intValue();\n }", "public static Integer numValidClients() {\n return getLoggedInUserConnections().size() + anonClients.size();\n }", "public int getUseCount() {\n\t\tint useCount=0;\n\t\tsynchronized(connStatus) {\n\t\t\tfor(int i=0; i < currConnections; i++) {\n\t\t\t\tif(connStatus[i] > 0) { // In use\n\t\t\t\t\tuseCount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn useCount;\n\t}", "@Override\n\tpublic int getTotalCount(int boardId) {\n\t\tConnection conn = null;\n\t\tPreparedStatement pstmt = null;\n\t\tResultSet rs = null;\n\t\tint totalCount = 0;\n\t\t\n\t\ttry {\n\t\t\tconn = getConnection();\n\t\t\t\n\t\t\tString query = \"SELECT COUNT(comment_id)\t\" +\n\t\t\t\t\t\t \"FROM scomment\t\t\t\t\" +\n\t\t\t\t\t\t \"WHERE board_id = ?\t\t\t\" +\n\t\t\t\t\t\t \"AND isdeleted is NULL\t\t\";\n\t\t\tpstmt = conn.prepareStatement(query);\n\t\t\t\n\t\t\tpstmt.setInt(1, boardId);\n\t\t\t\n\t\t\trs = pstmt.executeQuery();\n\t\t\t\n\t\t\tif (rs.next()) {\n\t\t\t\ttotalCount = rs.getInt(1);\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (pstmt != null) pstmt.close();\n\t\t\t\tif (conn != null) conn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(\"error:\" + e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn totalCount;\n\t}", "public int getSize()\n\t{\n\t\treturn _floodClient.size();\n\t}", "int getReqCount();", "long getReceivedEventsCount();", "public int getSize() {\n\t\treturn currConnections;\n\t}", "public static int getNumberOfRowsTBLSERVERS() throws SQLException {\n\t\tstmt = conn.createStatement();\r\n\t\tStatement stmt4 = conn.createStatement();\r\n\t\tResultSet rownumber = stmt4.executeQuery(\"SELECT COUNT (*) AS count1 FROM TBLSERVERS\"); // SQL Count query\r\n\t\trownumber.next();\r\n\r\n\t\tint rnum = rownumber.getInt(1);\r\n\t\tSystem.out.println(rnum); // for debugging purposes\r\n\t\treturn rnum; //return value\r\n\r\n\t}", "public static int getTcpMssSize() {\n return tcp_mss_size;\n }", "public int getNumOfConnections() {\r\n\t\treturn numOfConnections;\r\n\t}", "public Integer serverCount() {\n return this.serverCount;\n }", "long getListenerCount();", "long getRequestsCount();", "public void readFromSocket(long socketId) {}", "public int getRequests()\n\t{\n\t\tint requests=0;\n\t\tString query=\"select count(*) from requests where status=?\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tps.setString(1, \"Confirm\");\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\trequests=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn requests;\n\t}", "@Override\n\tpublic int cartCount(String id) {\n\t\treturn cookie.cartCount(id);\n\t}", "public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }", "public int numOutgoing() {\r\n int result = outgoing.size();\r\n return result;\r\n }", "public int countByAnswerid(long answerid)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public synchronized int threadReplyCount(String threadID) {\n \tfinal Query q = mDB.query();\n q.constrain(BoardReplyLink.class);\n q.descend(\"mBoard\").constrain(this).identity();\n q.descend(\"mThreadID\").constrain(threadID);\n return q.execute().size();\n }", "public int getPortCount() throws SdpParseException {\n\t\treturn getNports();\n\t}", "public static int countCharactersInRoom(String roomID)\r\n\t{\r\n\t\treturn rooms.get(roomID).countCharacters();\r\n\t}", "int getMsgCount();", "int getMsgCount();", "int getNumberOfArgumentsByUser(UUID id);", "public int countNumberClientsTotal() {\n\t\tint counter = 0;\n\t\tfor(int number : numberClients.values())\n\t\t\tcounter += number;\n\t\treturn counter;\n\t}", "public int clientsCount(){\n return clientsList.size();\n }", "public int countPlayers(Long gameId){\n List<User_Game> user_games = userGameRepository.retrieveGamePlayers(gameId);\n return user_games.size();\n }", "public int countNodes() {\r\n \r\n // call the private countNodes method with root\r\n return countNodes(root);\r\n }", "@Override\n\tpublic int countByhostId(long hostId) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_HOSTID;\n\n\t\tObject[] finderArgs = new Object[] { hostId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_FACILITY_HOST_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_HOSTID_HOSTID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(hostId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public static int getConnectionCount()\r\n {\r\n return count_; \r\n }", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "public int getConnectionCount() {\n int i;\n synchronized (this.bindings) {\n i = 0;\n for (IntentBindRecord intentBindRecord : this.bindings) {\n i += intentBindRecord.connections.size();\n }\n }\n return i;\n }", "public int getNumConnections(ImmutableNodeInst n) {\n int myNodeId = n.nodeId;\n int i = searchConnectionByPort(myNodeId, 0);\n int j = i;\n for (; j < connections.length; j++) {\n int con = connections[j];\n ImmutableArcInst a = getArcs().get(con >>> 1);\n boolean end = (con & 1) != 0;\n int nodeId = end ? a.headNodeId : a.tailNodeId;\n if (nodeId != myNodeId) break;\n }\n return j - i;\n }", "@Override\n\tpublic int countByfacilityId(long facilityId) throws SystemException {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_FACILITYID;\n\n\t\tObject[] finderArgs = new Object[] { facilityId };\n\n\t\tLong count = (Long)FinderCacheUtil.getResult(finderPath, finderArgs,\n\t\t\t\tthis);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_FACILITY_HOST_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_FACILITYID_FACILITYID_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(facilityId);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tFinderCacheUtil.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tFinderCacheUtil.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "@Override\n\tpublic int countByIdRichiesta(long id_richiesta) {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_IDRICHIESTA;\n\n\t\tObject[] finderArgs = new Object[] { id_richiesta };\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_LOCALRICHINFO_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_IDRICHIESTA_ID_RICHIESTA_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(id_richiesta);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int getMessagesCount();", "int getMessagesCount();", "int getMessagesCount();", "@Transactional(readOnly = true)\n public int getQueueNumber(Long id) {\n log.debug(\"Request to get getQueueNumber : {}\", id);\n return findByFoodJoint_Id(id).size();\n }", "@Override\n\tpublic int countByIdSala(long id_sala) {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_IDSALA;\n\n\t\tObject[] finderArgs = new Object[] { id_sala };\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(2);\n\n\t\t\tquery.append(_SQL_COUNT_APPROVATORE_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_IDSALA_ID_SALA_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(id_sala);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "int getServicesCount();", "int getServicesCount();", "@Override\n public int findRoomsSize() throws AppException {\n log.info(\"#findRoomsSize\");\n Connection con = null;\n Statement st;\n ResultSet rs;\n int size = 0;\n try {\n con = DataSource.getConnection();\n st = con.createStatement();\n rs = st.executeQuery(FIND_SIZE);\n if (rs.next()) {\n size = rs.getInt(1);\n }\n } catch (SQLException e) {\n rollback(con);\n log.error(\"Problem findRooms\");\n throw new AppException(\"Cannot find rooms, try again\");\n } finally {\n close(con);\n }\n log.info(\"size = \" + size);\n return size;\n }", "public ReadOnlyIntegerProperty numberofTickets(PlayerId playerId) {\n return numberOfTicketsMap.get(playerId);\n }", "int getFriendCount();", "int getFriendCount();", "private int getNumSent() {\n\t\tint ret = 0;\n\t\tfor (int x=0; x<_sentPackets.getSize(); x++) {\n\t\t\tif (_sentPackets.bitAt(x)) {\n\t\t\t\tret++;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "private void countSocketClose() {\n \t\tcurrentlyOpenSockets.decrementAndGet();\n \t\tsynchronized (this) {\n \t\t\tthis.notifyAll();\n \t\t}\n \n \t}", "public int connectionCount()\n {\n return _connectionCount;\n }", "public native long getReceivedPacketCount()\n throws IOException, IllegalArgumentException;", "public int getPacketLength() {\n return TfsConstant.INT_SIZE * 3 + failServer.size() * TfsConstant.LONG_SIZE;\n }", "public int listenerCount(String event) {\n ConcurrentLinkedQueue<EventListener> eventListeners = listeners.get(event);\n if(eventListeners == null) {\n return 0;\n }\n return eventListeners.size();\n }", "public static int getDoSalesmanListCount(int doId) {\r\n\t\tint count = 0;\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\t\tConnection con = Connect.getConnection();\r\n\r\n\t\ttry {\r\n\t\t\tcall = con.prepareCall(\"{CALL get_do_customer_list_count(?)}\");\r\n\t\t\tcall.setInt(1, doId);\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcount = rs.getInt(1);\r\n\t\t\t}\r\n\t\t\tcon.close();\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn count;\r\n\t}", "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}", "int getUdpServerPort();" ]
[ "0.70536023", "0.6776331", "0.63351834", "0.60788876", "0.5588703", "0.5557572", "0.5366126", "0.53287774", "0.5323872", "0.5317049", "0.5307819", "0.5265895", "0.524038", "0.5227393", "0.5215548", "0.5213001", "0.5208426", "0.520575", "0.51900935", "0.51828593", "0.51825917", "0.5156816", "0.51546854", "0.5130513", "0.5110515", "0.5110297", "0.5103753", "0.51011515", "0.50998265", "0.50861156", "0.50811476", "0.5070379", "0.5044949", "0.5033707", "0.50311244", "0.50286806", "0.50046575", "0.4997038", "0.49890432", "0.49890432", "0.49754456", "0.49753156", "0.49732617", "0.49705157", "0.4950159", "0.4920764", "0.49136382", "0.4909924", "0.48959187", "0.487649", "0.48686877", "0.485771", "0.48570225", "0.48491004", "0.48490173", "0.48472667", "0.48351556", "0.4820557", "0.48196486", "0.4817984", "0.48163837", "0.48150325", "0.47987252", "0.47973755", "0.47956973", "0.4788146", "0.47867253", "0.47867253", "0.47779745", "0.4771447", "0.47501814", "0.4736077", "0.4734554", "0.47335103", "0.47232294", "0.4723194", "0.47064695", "0.47023", "0.46966693", "0.46897024", "0.4673885", "0.4673885", "0.4673885", "0.46714112", "0.46647817", "0.46644363", "0.46644363", "0.46634853", "0.46544388", "0.46524844", "0.46524844", "0.46488652", "0.46472216", "0.464512", "0.46344143", "0.46283805", "0.46280754", "0.4623794", "0.4623779", "0.45969906" ]
0.61773646
3
Resets the peak serversocket count to the current number of open serversockets.
void resetPeakServerSocketCount();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private synchronized static void decrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets--;\r\n\t}", "int getPeakServerSocketCount();", "public static void resetConnectionCounts() {\n CREATED_TCP_CONNECTIONS.set(0);\n CREATED_UDP_CONNECTIONS.set(0);\n }", "private void countSocketClose() {\n \t\tcurrentlyOpenSockets.decrementAndGet();\n \t\tsynchronized (this) {\n \t\t\tthis.notifyAll();\n \t\t}\n \n \t}", "private synchronized static void incrementNumberOfOpenSockets() {\r\n\r\n\t\tnumberOfOpenSockets++;\r\n\t}", "void resetReceivedEventsCount();", "private void setSockets()\n {\n String s = (String) JOptionPane.showInputDialog(null,\n \"Select Number of Sockets:\", \"Sockets\",\n JOptionPane.PLAIN_MESSAGE, null, socketSelect, \"1\");\n\n if ((s != null) && (s.length() > 0))\n {\n totalNumThreads = Integer.parseInt(s);\n }\n else\n {\n totalNumThreads = 1;\n }\n\n recoveryQueue.setMaxSize(totalNumThreads * 10);\n }", "public void setMaxConnections(int maxConnections)\n {\n _maxConnections = maxConnections;\n }", "int getServerSocketCount();", "public void resetConnection() {\n connected = new ArrayList<>(50);\n }", "public void setMaxOverflowConnections(int maxOverflowConnections)\n {\n _maxOverflowConnections = maxOverflowConnections;\n }", "public void resetRegisterCount() {\n currentNumberOfRegisterPushed = 0;\n maxNumberOfRegisterPushed = 0;\n }", "public void resetPingCount() {\n\t\tpingCount = 0;\n\t}", "public int getMaxOverflowConnections()\n {\n return _maxOverflowConnections;\n }", "public void resetCount() {\n\t\tcount = 0;\n\t}", "public void resetCount() {\n count = 0;\n }", "public void resetServers() {\n EventHandlerService.INSTANCE.reset();\n UserRegistryService.INSTANCE.reset();\n }", "public int getMaxConnections()\n {\n return _maxConnections;\n }", "private void decrConnectionCount() {\n connectionCount.dec();\n }", "public static void resetCount() {\n count = 1;\n }", "public void setMaxConnections(int maxConnections) {\n this.maxConnections = maxConnections;\n saveProperties();\n }", "public void resetMissedCallsCount();", "long getTotalServerSocketsCount();", "public void reset() {\n\t\tthis.count = 0;\n\t}", "public void reset() {\n serverReset(game.generateUIDs(data.getObjectCount()));\n }", "public void resetStatic() {\n\t\tmaxLaps = 0;\n\t}", "public void reset() {\n\t\tcount = 0;\n\t}", "public int getMaxConnections() {\n return maxConnections;\n }", "public void setNumOfConnections(int num) {\r\n\t\tnumOfConnections = num;\r\n\t}", "public void honourFreeBufferCount() {\n // Check if there are enough free launchers\n int freeCount = getFreeLaunchers().size();\n\n while (freeCount < freeBufferCount) {\n if (getTotalLaunchers().size() > maxCount) {\n log.warn(\"Specified Maximum Concurrency has been exceeded, but scaling up will be permitted. If this \" +\n \"message appears often increase maximum concurrency.\");\n }\n\n log.info(\"Scaling UP: REASON -> [Free Count] \" + freeCount + \" < [Free Gap] \" + freeBufferCount);\n scaleUp(\"honourFreeBufferCount\");\n freeCount = getFreeLaunchers().size();\n }\n }", "public void resetActiveStats() {\n if (!valid)\n return;\n\n\n Handler handler = new Handler(getLooper());\n handler.post(() -> {\n recentStats.activeRequests = toLoad.size() + loading.size();\n recentStats.maxActiveRequests = recentStats.activeRequests;\n });\n }", "public void setSocketRetries(int retries);", "void reset() {\n count = 0;\n\n }", "public void resetSystemMessageCount(){\n\t\tiMessageCount = 0;\n\t}", "private void clearSeenAToServer() {\n if (reqCase_ == 15) {\n reqCase_ = 0;\n req_ = null;\n }\n }", "private void countConnectingSocket() {\n \t\tcurrentlyConnectingSockets.incrementAndGet();\n \t}", "@Override\n public int getMaxConnections() throws ResourceException {\n return Integer.MAX_VALUE;\n }", "private void resetCount(){\r\n\t\t\tactiveAgent = 0;\r\n\t\t\tjailedAgent = 0;\r\n\t\t\tquietAgent = 0;\r\n\t\t}", "public void resetCount() {\n\t\tresetCount(lineNode);\n\t}", "public void reset()\n {\n current = 0;\n highWaterMark = 0;\n lowWaterMark = 0;\n super.reset();\n }", "public void reset() {\n this.metricsSent.set(0);\n this.eventsSent.set(0);\n this.serviceChecksSent.set(0);\n this.bytesSent.set(0);\n this.bytesDropped.set(0);\n this.packetsSent.set(0);\n this.packetsDropped.set(0);\n this.packetsDroppedQueue.set(0);\n this.aggregatedContexts.set(0);\n }", "@Override\n public int getNumOpenConnections() {\n return allChannels.size() - 1;\n }", "public void clearConnection() {\n serverSock = null;\n in = null;\n out = null;\n }", "public void setMaxIdleConns(int value) {\n this.maxIdleConns = value;\n }", "public synchronized void setNumberOfServers(int num) {\n\t\tif(num != this.numServers) {\n\t\t\tthis.updating = true;\n\t\t\tthis.prevNumServers = this.numServers;\n\t\t\tthis.numServers = num;\n\t\t\tthis.rehashUsers();\n\t\t\tthis.updating = false;\n\t\t\tthis.notifyAll();\n\t\t}\n\t}", "public Builder clearServerMs() {\n \n serverMs_ = 0L;\n onChanged();\n return this;\n }", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public static void resetCounter() {\n\t\t\tcount = new AtomicInteger();\n\t\t}", "public void setMaxConcurrentConnection(Long MaxConcurrentConnection) {\n this.MaxConcurrentConnection = MaxConcurrentConnection;\n }", "public synchronized void reset() throws IOException {\n super.reset();\n if(!iMaxSet) {\n iMaximum = available();\n }\n iRemainder = iMaximum;\n }", "void resetToDefaultServerAddress();", "public void shutdown() {\n\t\t//We call peers.values() and put into Array to create an unchanging copy, one that\n\t\t//does not shrink even as the sockets remove themselves from the peers list\n\t\t//this prevents a ConcurrentModificationException\n\t\tonline = false;\n\t\tArrayList<DecentSocket> connections = new ArrayList<DecentSocket>(peers.values());\n\t\tfor(DecentSocket socket: connections) {\n\t\t\tsocket.stop();\n\t\t}\n\t\tlistener.stop();\n\t\tchecker.stop();\n\t}", "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 setNumConnections(int connections) {\n\t\tnumConnects = connections;\n\t}", "public void resetTimeout(){\n this.timeout = this.timeoutMax;\n }", "public void clearGaps() {\n this.openGaps = 0;\n }", "private void clearNumPendingFgJobs() {\n this.bitField0_ &= -33;\n this.numPendingFgJobs_ = 0;\n }", "LargestSubsequenceConcurrentServer(Socket clientSocket, int clientIdNumber) {\n this.clientSocket = clientSocket;\n this.clientIdNumber = clientIdNumber;\n }", "void refreshNodeHostCount(int nodeHostCount);", "public void setMaxCapacity(int max) {\n\t\tbuffer = new Object[max];\n\t\tbufferSize = 0;\n\t}", "public void setMaxConns(int value) {\n this.maxConns = value;\n }", "private void handleClosedConnection() {\n final int currentConnections = concurrentConnections.decrementAndGet();\n\n log.debug(\"[Vertx-EventMetricsStream] - Current Connections - {} / Max Connections {}\", currentConnections, maxConcurrentConnections.get());\n }", "public static synchronized void resetAllTimers() {\r\n _count = 0;\r\n _time = 0;\r\n _serverStarted = -1;\r\n _timers.clear();\r\n }", "public void invalidateAll() {\n synchronized (this) {\n long l10;\n this.H = l10 = 512L;\n }\n this.requestRebind();\n }", "private void resetTriesRemaining() {\n triesLeft[0] = tryLimit;\n }", "public void reset() {\n mNewNotificationCount.setValue(0);\n }", "public static void reset()\r\n {\r\n errorCount = 0;\r\n warningCount = 0;\r\n }", "private void clearConfigNumMaxTotalJobs() {\n this.bitField0_ &= -2;\n this.configNumMaxTotalJobs_ = 0;\n }", "public static void resetStatistics()\r\n {\r\n \t//System.out.println ( \"Resetting statistics\");\r\n count_ = 0; \r\n }", "static public void setMaxAsyncPollingRetries(int maxRetries) {\n maxAsyncPollingRetries = maxRetries;\n }", "public static void reset() {\n // shutdown thread-pools\n HystrixThreadPool.Factory.shutdown();\n _reset();\n }", "public static void terminate_all_connections()\n\t{\n\t\tNetwork_Control_Message pckt = new Network_Control_Message();\n\t\tpckt.set_terminate(true);\n\t\tsend_queue.add(pckt);\n\t\t\n\t\ttry {\n\t\t\tserver_socket.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Could not close the ServerSocket.\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public synchronized void clear() {\n ServerDescEntry tab[] = table;\n for (int index = tab.length; --index >= 0; )\n tab[index] = null;\n count = 0;\n }", "public void reset()\n {\n total_frames = 0;\n total_messages = 0;\n total_size = 0;\n lost_frames = 0;\n lost_segments = 0;\n num_files = 0;\n start_time = System.nanoTime();\n m_lastFrames.clear();\n }", "public void reset() {\n monitor.sendReset();\n }", "public void removeAll() {\n/* 105 */ this.connectionToTimes.clear();\n/* */ }", "protected void reset() {\n\t\tresetChannel();\n\t\tthis.connection = null;\n\t}", "public Builder clearServerProcessingIterations() {\n \n serverProcessingIterations_ = 0;\n onChanged();\n return this;\n }", "public void incrMetaCacheNumClearServer() {\n metaCacheNumClearServer.inc();\n }", "private void clearNumRunningFgJobs() {\n this.bitField0_ &= -9;\n this.numRunningFgJobs_ = 0;\n }", "public void setMaxCalls(int max);", "public void resetCount(int count) {\n latch = new CountDownLatch(count);\n }", "private void incrConnectionCount() {\n connectionCount.inc();\n }", "public void resetUpdateCount() {\n updateCount = 0;\n numNucleiToRemove = 0;\n }", "public final synchronized void reset() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t\tlistenersInline = null;\r\n\t}", "public Builder clearServerWorkIterations() {\n \n serverWorkIterations_ = 0;\n onChanged();\n return this;\n }", "private void clearConfigNumMaxBgJobs() {\n this.bitField0_ &= -3;\n this.configNumMaxBgJobs_ = 0;\n }", "ServerSocketChannelConfig setBacklog(int backlog);", "public void invalidateAll() {\n synchronized (this) {\n long l10;\n this.m = l10 = (long)8;\n }\n this.requestRebind();\n }", "public void clearErrorCount() {\n\t\terrorCount = 0;\n\t}", "private void limitedMemoryWithoutEviction() {\n Jedis jedis = this.connector.connection();\n System.out.println(\"Collect: \" + jedis.get(\"0\")); // Redis still services read operations.\n System.out.println(jedis.set(\"0\", \"0\")); // Write operations will be refused.\n }", "public void resetTimeLimit();", "public void reset()\r\n {\n if_list.removeAllElements();\r\n ls_db.reset();\r\n spf_root = null;\r\n vertex_list.removeAllElements();\r\n router_lsa_self = null;\r\n floodLastTime = Double.NaN;\r\n delayFlood = false;\r\n spf_calculation = 0;\r\n lsa_refresh_timer = null;\r\n }", "public void resetCounters() {\n setErrorCounter(0);\n setDelayCounter(0);\n }", "public void setSlave(int count) {\n this.slaveCount = count;\n }", "private void clearSeenServerToB() {\n if (rspCase_ == 19) {\n rspCase_ = 0;\n rsp_ = null;\n }\n }", "public void close() {\n for (final BasicServerMetrics metrics : myServerMetrics.values()) {\n metrics.close();\n }\n myServerMetrics.clear();\n }", "public void setCountToZero() {\r\n \r\n // set count to 0\r\n count = 0;\r\n }", "public void reset()\r\n\t{\r\n\t\tthis.num.clear();\r\n\t\t\r\n\t\tfor (StackObserver<T> o : observers )\r\n\t\t\to.onStackReset();\r\n\t\t\r\n\t}", "public void setMaxNumberOfHeartbeats(int maxHeartbeats) {\n this.maxHeartbeats = maxHeartbeats;\n }" ]
[ "0.69767", "0.6936661", "0.6615598", "0.62604314", "0.6232159", "0.612451", "0.6100719", "0.59890133", "0.5951702", "0.5925814", "0.5918558", "0.5856856", "0.5837175", "0.5815057", "0.56858224", "0.5667542", "0.5653225", "0.55946314", "0.55624324", "0.5521375", "0.551751", "0.54940456", "0.5477908", "0.5446491", "0.54275256", "0.54258984", "0.5413859", "0.5379355", "0.53430974", "0.52873904", "0.5274909", "0.52745575", "0.52592105", "0.52587885", "0.52548677", "0.5251516", "0.52480054", "0.5245064", "0.52447885", "0.52372587", "0.5233692", "0.52275467", "0.5213262", "0.52088237", "0.5205303", "0.5195463", "0.51806134", "0.51806134", "0.51740456", "0.517059", "0.51608443", "0.5156839", "0.51330996", "0.51275426", "0.51233006", "0.51230836", "0.51175106", "0.51107013", "0.51010513", "0.5098105", "0.5093954", "0.5092938", "0.5089289", "0.50877666", "0.5081452", "0.50777674", "0.5074684", "0.50682014", "0.5053561", "0.50402194", "0.50350523", "0.50344735", "0.50338626", "0.5033441", "0.50313044", "0.50276303", "0.5017475", "0.5006956", "0.49973452", "0.4997059", "0.4995253", "0.49940634", "0.49905908", "0.4987493", "0.49849993", "0.4984229", "0.49826896", "0.49826017", "0.49804524", "0.49794653", "0.49788958", "0.49777755", "0.4976687", "0.49737635", "0.4969987", "0.4961258", "0.49506903", "0.49422556", "0.4937244", "0.49282897" ]
0.8705643
0
Methods to check the status of the current token
public boolean matchDelim(char d) { return d == (char) tok.ttype; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean checkSavedToken(Context context) {\n SharedPreferences preferences = context.getSharedPreferences(token_storage, 0);\n String storage_token = preferences.getString(\"token\", \"notoken\");\n\n if (!storage_token.equals(\"notoken\")) {\n Log.d(\"Service\", \"Using stored token\");\n header_token = \"Bearer \" + storage_token;\n isTokenPresent = true;\n bindToken();\n return true;\n }\n return false;\n }", "protected void checkToken(){\n DBManager dao = new DBManager(appContext);\n dao= dao.open();\n Cursor c = dao.selectionner();\n if (c.getCount()>0) {\n System.out.println(\"Base activity token:\"+c.getCount());\n System.out.println(\"Base activity token:\"+c.getString(0));\n Intent main =new Intent(this, SplashScreenActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n } else {\n System.out.println(\"No token Found\");\n Intent main = new Intent(this, LoginActivity.class).setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(main);\n }\n }", "boolean hasToken();", "boolean hasToken();", "boolean hasToken();", "boolean hasToken();", "boolean hasToken();", "boolean hasToken();", "private void updateTokenUI() {\n if (authResult != null) {\n TextView it = (TextView) findViewById(R.id.itStatus);\n TextView at = (TextView) findViewById(R.id.atStatus);\n\n if(authResult.getIdToken() != null) {\n it.setText(it.getText() + \" \" + getString(R.string.tokenPresent));\n } else {\n it.setText(it.getText() + \" \" + getString(R.string.noToken));\n }\n\n if (authResult.getAccessToken() != null) {\n at.setText(at.getText() + \" \" + getString(R.string.tokenPresent));\n } else {\n at.setText(at.getText() + \" \" + getString(R.string.noToken));\n }\n\n /* Only way to check if we have a refresh token is to actually refresh our tokens */\n hasRefreshToken();\n } else {\n Log.d(TAG, \"No authResult, something went wrong.\");\n }\n }", "public boolean isTokenValide() {\n try {\n token = Save.defaultLoadString(Constants.PREF_TOKEN, getApplicationContext());\n if (token != null && !token.equals(\"\")) {\n if (token.equals(\"\"))\n return false;\n JWT jwt = new JWT(token);\n boolean isExpired = jwt.isExpired(0);\n return !isExpired;\n } else\n return false;\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n\n }", "boolean getStatus();", "boolean getStatus();", "boolean getStatus();", "public boolean hasToken() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "public boolean tokenEnabled() {\n return tokenSecret != null && !tokenSecret.isEmpty();\n }", "protected void validateToken() {\n\n authToken = preferences.getString(getString(R.string.auth_token), \"\");\n saplynService = new SaplynService(preferences.getInt(debugLvl, -1), authToken);\n\n // Check if user already authenticated\n if (authToken.equals(\"\")) {\n Intent intent = new Intent(HomeActivity.this, AuthenticationActivity.class);\n startActivityForResult(intent, 0);\n }\n else {\n populateUser();\n }\n }", "private void updateRefreshTokenUI(boolean status) {\n\n TextView rt = (TextView) findViewById(R.id.rtStatus);\n\n if (rt.getText().toString().contains(getString(R.string.noToken))\n || rt.getText().toString().contains(getString(R.string.tokenPresent))) {\n rt.setText(R.string.RT);\n }\n if (status) {\n rt.setText(rt.getText() + \" \" + getString(R.string.tokenPresent));\n } else {\n rt.setText(rt.getText() + \" \" + getString(R.string.noToken) + \" or Invalid\");\n }\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }", "@Override\n public void tokenOverdue(final Context context) {\n System.out.println(\"tokenOverdue token 失效,重新获取token\");\n\n // 开发者通过自己的方法获取token,这里是demo\n String acountId = \"\";\n USDKCommonManager.updateToken(context, acountId);\n\n /**** 这份代码是例子。。。。。 ****/\n acountId = USDKTest.getSPToken(context);\n String callerPhone = USDKTest.getCallerPhone(context);\n if (TextUtils.isEmpty(acountId) || TextUtils.isEmpty(acountId)) {\n return;\n }\n USDKTest.getToken(context, callerPhone, acountId, new IUSDKHttpCallback() {\n @Override\n public void onSuccess(Object result) {\n try {\n String json = (String) result;\n System.out.println(\"onSuccess json =\" + json);\n String token = \"\";\n\n USDKTestResultGetTokenBean bean = new USDKTestResultGetTokenBean(new JSONObject(json));\n token = bean.getToken();\n USDKCommonManager.updateToken(context, token);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n @Override\n public void onFailed(Object result) {\n System.out.println(\"onFailed result =\" + result);\n }\n });\n /**** 这份代码是例子。。。。。 ****/\n }", "void checkToken(String token) throws InvalidTokenException;", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "boolean hasStatus();", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "@GET\n @Path(\"/check/{token}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response checkToken(@PathParam(\"token\")String token) {\n\n final AuthServiceResult result = AuthServiceResult.OK;\n final String tokenInfo = authService.checkToken(token);\n\n return Response\n .status(result.getStatus())\n .entity(tokenInfo)\n .build();\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean hasToken() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "public boolean refreshTokenKey() {\n\t\tOptional<String> apiGetTokenKeyURLOptional = ConfigPropertiesFileUtils.getValue(\"mail.api.url.getTokenKey\");\n\t\tif (!apiGetTokenKeyURLOptional.isPresent()) {\n\t\t\tLOGGER.error(\"mail.api.url.getTokenKey not exist\");\n\t\t\treturn false;\n\t\t}\n\t\tHttpClient httpClient = HttpClientBuilder.create().build();\n\t\tHttpPost request = new HttpPost(apiGetTokenKeyURLOptional.get().trim());\n\t\trequest.addHeader(\"Content-Type\", \"application/json\");\n\t\ttry {\n\t\t\tHttpResponse httpResponse = httpClient.execute(request);\n\t\t\tif (httpResponse.getStatusLine().getStatusCode() != 200) {\n\t\t\t\tLOGGER.error(\"Fail to get Token Key: \"\n\t\t\t\t\t\t+ IOUtils.toString(httpResponse.getEntity().getContent(), Charset.forName(\"UTF-8\")));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tString contentJsonString = IOUtils.toString(httpResponse.getEntity().getContent(),\n\t\t\t\t\tCharset.forName(\"UTF-8\"));\n\t\t\tJSONArray contentJsonArray = new JSONArray(contentJsonString);\n\t\t\tLOGGER.debug(\"TOKEN KEY : \" + contentJsonArray.getString(0));\n\t\t\tif (contentJsonArray.getString(0).equals(\"null\")) {\n\t\t\t\tLOGGER.error(\"The response is null, check the mail.api.url.getTokenKey\");\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tthis.tokenKey = contentJsonArray.getString(0);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Send request to ask a new token\", e);\n\t\t\treturn false;\n\t\t}\n\t\tLOGGER.debug(\"Get token key successfully\");\n\t\treturn true;\n\t}", "UserStatus getStatus();", "SessionStatus getStatus();", "public boolean isSetToken() {\n return this.token != null;\n }", "@Override\n\tpublic boolean isTokenValid(String token) {\n\t\tLoginToken loginToken = getLoginTokenByToken(token);\n\t\tif (loginToken != null) {\n\t\t\tDate createTime = loginToken.getCreateTime();\n\t\t\tDate current = new Date();\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()));\n\t\t\tSystem.out.println(\"过了:\"+Math.abs(current.getTime() - createTime.getTime()) / (1000 *60));\n\t\t\tif (Math.abs(current.getTime() - createTime.getTime()) / (1000 * 60) >= 60) {\n\t\t\t\tloginToken.setStatus(Constant.LOGIN_TOKEN_STATUS_INVALID);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\tloginToken.setCreateTime(current);\n\t\t\t\tloginTokenMapper.updateByPrimaryKey(loginToken);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "int getStatus();", "boolean isSetStatus();", "boolean isValidStatus();", "KeeperContainerTokenStatusResponse refreshKeeperContainerTokenStatus(KeeperContainerTokenStatusRequest request);", "public ZipStatus getStatus(String token) {\n synchronized (statusMap) {\n return statusMap.get(token);\n }\n }", "@Test\n public void getTokenTest() {\n assertEquals(token, device.getToken());\n }", "void onGetTokenSuccess(AccessTokenData token);", "@Override\n public boolean isTokenValid(CrUser user, String token) {\n boolean result = false;\n if (user.getToken().equalsIgnoreCase(token)) {\n Date currentTime = new Date();\n if ((currentTime.getTime() - user.getTokenUpdateTime().getTime()) <= 1800000) {\n user.setTokenUpdateTime(currentTime);\n result = true;\n }\n }\n return result;\n }", "public boolean checkComplete(){\n return Status;\n }", "@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "RequestStatus getStatus();", "public Boolean getStatus() {return status;}", "public boolean getResponseStatus();", "@Override\n public void onRequestToken() {\n Toast.makeText(getApplicationContext(), \"Your token has expired\", Toast.LENGTH_LONG).show();\n Log.i(\"Video_Call_Tele\", \"The token as expired..\");\n // mRtcEngine.renewToken(token);\n // https://docs.agora.io/en/Video/API%20Reference/java/classio_1_1agora_1_1rtc_1_1_rtc_engine.html#af1428905e5778a9ca209f64592b5bf80\n // Renew token - TODO\n }", "@java.lang.Override\n public boolean hasToken() {\n return ((bitField0_ & 0x00000001) != 0);\n }", "String status(SignedObject accessToken) throws RemoteException, rmi.AuthenticationException;", "public boolean hasToken(){\n return (!clozerrtoken.isEmpty());\n }", "public Status getStatus();", "public String getAuthorizationStatus(){\n\t\treturn accessToken;\n\t}", "public boolean getStatus(){\r\n\t\treturn status;\r\n\t}", "com.polytech.spik.protocol.SpikMessages.Status getStatus();", "com.polytech.spik.protocol.SpikMessages.Status getStatus();", "public static boolean hasRequestToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN, null)!= null;\n\t\t}", "public boolean returnStatus(){\n return status;\r\n }", "public int getStatus();", "public int getStatus();", "public int getStatus();", "boolean hasLoginapiavgrtt();", "public void testGetSessionToken() throws Exception {\r\n LOG.info(\"getSessionToken\");\r\n TokenAuthorisation token = tmdb.getAuthorisationToken();\r\n assertFalse(\"Token is null\", token == null);\r\n assertTrue(\"Token is not valid\", token.getSuccess());\r\n LOG.info(token.toString());\r\n \r\n TokenSession result = tmdb.getSessionToken(token);\r\n assertFalse(\"Session token is null\", result == null);\r\n assertTrue(\"Session token is not valid\", result.getSuccess());\r\n LOG.info(result.toString());\r\n }", "@Override\n public boolean check() {\n return GlobalParams.isLogin();\n }", "public boolean getOnlineStatus(int status) throws android.os.RemoteException;", "public void setStatus(int status) {\n result.setStatus(status);\n latch.countDown();\n ResultCallback<? super TokenResult> cb = getCallback();\n TokenResult res = getResult();\n if (cb != null) {\n Log.d(TAG, \" Calling onResult for callback. result: \" + res);\n getCallback().onResult(res);\n }\n }", "private Boolean isInSession(String token, String username) {\n \treturn true;\n }" ]
[ "0.6809197", "0.6619255", "0.6568087", "0.6568087", "0.6568087", "0.6568087", "0.6568087", "0.6568087", "0.6470719", "0.64424926", "0.6412205", "0.6412205", "0.6412205", "0.6346271", "0.63390714", "0.6330468", "0.6274254", "0.6270889", "0.62538594", "0.62371296", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6211088", "0.6179132", "0.6179132", "0.6179132", "0.6179132", "0.6156858", "0.6132598", "0.6132598", "0.6132598", "0.6132598", "0.6108413", "0.61014247", "0.60946363", "0.6081923", "0.60206515", "0.6017282", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.60033625", "0.5992608", "0.5991236", "0.59887797", "0.5980317", "0.59575814", "0.59423393", "0.5942175", "0.59369475", "0.59362733", "0.5927909", "0.59164643", "0.5904203", "0.5900413", "0.588054", "0.5870403", "0.58530194", "0.5818779", "0.5817766", "0.58145887", "0.58083427", "0.5804237", "0.5804237", "0.57714605", "0.57701886", "0.5761239", "0.5761239", "0.5761239", "0.57605624", "0.5755003", "0.57512426", "0.57494265", "0.57463634", "0.5740021" ]
0.0
-1
Methods to "eat" the current token
public void eatDelim(char d) { if (!matchDelim(d)) throw new BadSyntaxException(); nextToken(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Token next();", "private void consumeToken() {\n\t\tToken token = lexAnalyser.nextToken();\n\t\tlogMessage(functionStack.peekFirst() + \" consumed \" + token.getType()\n\t\t\t\t+ \": <lexeme>\" + token.getLexeme() + \"</lexeme>\");\n\t\tpeekToken = lexAnalyser.peekToken();\n\t}", "Token current();", "final void advanceToNextTokenSilently()\n {\n try\n {\n getTokenizer().nextToken();\n }\n catch( Exception e )\n {\n // ignore\n }\n }", "public void advance(){\n\n if (hasMoreTokens()) {\n currentToken = tokens.get(pointer);\n pointer++;\n }else {\n throw new IllegalStateException(\"No more tokens\");\n }\n\n //System.out.println(currentToken);\n\n if (currentToken.matches(keyWordReg)){\n currentTokenType = TYPE.KEYWORD;\n }else if (currentToken.matches(symbolReg)){\n currentTokenType = TYPE.SYMBOL;\n }else if (currentToken.matches(intReg)){\n currentTokenType = TYPE.INT_CONST;\n }else if (currentToken.matches(strReg)){\n currentTokenType = TYPE.STRING_CONST;\n }else if (currentToken.matches(idReg)){\n currentTokenType = TYPE.IDENTIFIER;\n }else {\n\n throw new IllegalArgumentException(\"Unknown token:\" + currentToken);\n }\n\n }", "Token peek();", "private Token consume() throws SyntaxException {\n\t\tToken tmp = t;\n\t\tt = scanner.nextToken();\n\t\treturn tmp;\n\t}", "private void tokenEnd() {\n zzStartRead = tokenStartIndex;\n }", "void tokenchange();", "private void updateToken() throws IOException\n\t{\n\t\ttheCurrentToken = theNextToken;\n\t\ttheNextToken = theScanner.GetToken();\n\t}", "void token(TokenNode node);", "public void skipToken() {\t\t\n\t\t//remove token from line\n\t\tif (token != null)\n\t\t{\n\t\t\tline = line.substring(token.length());\n\t\t}\n\t\t//check if new token in line\n\t\tint pos = findFirstNotWhitespace(line.toCharArray());\n\t\t\n\t\t//read line until next token found\n\t\twhile (pos == -1 && s.hasNextLine())\n\t\t{\n\t\t\t//read next line\n\t\t\tline = s.nextLine();\n\t\t\t//check for start of token\n\t\t\tpos = findFirstNotWhitespace(line.toCharArray());\n\t\t}\n\t\t\n\t\t//no token found till eof\n\t\tif (pos == -1)\n\t\t{\n\t\t\t//set EOF tag\n\t\t\tline = null;\n\t\t}\n\t\t//reset token values\n\t\ttoken = null;\n\t\ttType = null;\n\t}", "public static void getNextToken() {\n if (currPos < tokens.size()) {\n currToken = tokens.get(currPos);\n //TODO del \n // System.out.println(currToken);\n currPos++;\n } else {\n// System.out.println(\"end of tokens reached\");\n currToken = new Token(Token.UNRECOGNIZED);\n }\n }", "@Override\n\tprotected void handleOpenBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "static void getToken() throws IOException{\n curr_char = pbIn.read();\n getNonBlank();\n lookUp();\n }", "void unexpectedTokenDeleted(Term token);", "private Token advance() {\n if(!isAtEnd()) current++;\n return previous();\n }", "public void finish() {\n charScanner.pushBack(currentCharToken);\n }", "public void advance() throws IOException{\r\n\t\tif (dotSymbol)\r\n\t\t{\r\n\t\t\tcurrentToken = \".\";\r\n\t\t\tclassdot=true;\r\n\t\t\tdotSymbol = false;\r\n\t\t\tisSymbol = true;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\t\r\n\t\telse if (classdot)\r\n\t\t{\r\n\t\t\tcurrentToken = classdot_Str;\r\n\t\t\t\r\n\t\t\tisSymbol = false;\r\n\t\t\tclassdot= false;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (tokenizer.ttype!=StreamTokenizer.TT_EOF)\r\n\t\t{\r\n\t\t\ttokenizer.nextToken();\r\n\t\t\tcurrentToken = tokenizer.toString();\r\n\t\t\tif (currentToken.charAt(6)==\"'\".charAt(0))\r\n\t\t\t{\r\n\t\t\t\tcurrentToken = Character.toString(currentToken.charAt(7));\r\n\t\t\t\tisSymbol = true;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcurrentToken= currentToken.substring(6, \r\n\t\t\t\t\t\tcurrentToken.lastIndexOf(']',currentToken.length()-1));\r\n\t\t\t\tisSymbol = false;\r\n\t\t\t\tif ((currentToken.contains(\".\")) &&\r\n\t\t\t\t\t\ttokenizer.ttype== StreamTokenizer.TT_WORD)\r\n\t\t\t\t{\r\n\t\t\t\t\tString temp = currentToken.substring(0, \r\n\t\t\t\t\t\t\tcurrentToken.indexOf('.'));\r\n\t\t\t\t\tclassdot_Str = currentToken.substring\r\n\t\t\t\t\t\t\t(currentToken.indexOf('.')+1,\r\n\t\t\t\t\t\t\tcurrentToken.length());\r\n\t\t\t\t\tcurrentToken = temp;\r\n\t\t\t\t\tclassdot = false;\r\n\t\t\t\t\tisSymbol=false;\r\n\t\t\t\t\tdotSymbol = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcurrentToken.ind\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\tchar[] tokenstr = tokenizer.toString().toCharArray();\r\n\t\t\tString a = \"'\";\r\n\t\t\tif(tokenizer.ttype == StreamTokenizer.TT_WORD)\r\n\t\t\t\tcurrentToken = tokenizer.sval;\r\n\t\t\telse if (tokenizer.ttype == StreamTokenizer.TT_NUMBER)\r\n\t\t\t{\r\n\t\t\t\tcurrentToken = Double.toString(tokenizer.nval);\r\n\t\t\t}\r\n\t\t\telse if(tokenizer.ttype == StreamTokenizer.TT_EOF)\r\n\t\t\t{\r\n\t\t\t\tcurrentCommand = null;\r\n\t\t\t}\r\n\t\t\telse if(tokenstr[6]==a.charAt(0))\r\n\t\t\t{\r\n\t\t\t\tcurrentToken = Character.toString(tokenstr[7]);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tcurrentToken = \"!UNKNOWN TOKEN! \" + tokenizer.toString()+\"!!!\";\r\n\t\t\t\t*/\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t}", "@Nonnull\r\n private Token expanded_token()\r\n throws IOException,\r\n LexerException {\r\n for (;;) {\r\n Token tok = source_token();\r\n // System.out.println(\"Source token is \" + tok);\r\n if (tok.getType() == IDENTIFIER) {\r\n Macro m = getMacro(tok.getText());\r\n if (m == null)\r\n return tok;\r\n if (source.isExpanding(m))\r\n return tok;\r\n if (macro(m, tok))\r\n continue;\r\n }\r\n return tok;\r\n }\r\n }", "private @Nullable Token eat(TokenType expectedTokenType) {\n Token token = nextToken();\n if (token.type != expectedTokenType) {\n reportExpectedError(token, expectedTokenType);\n return null;\n }\n return token;\n }", "private Token nextTokenWithWhites() throws IOException {\n\t\tString lexemaActual = \"\";\n\t\t// Si hay lexemas en el buffer, leemos de ahi\n\t\tif (!bufferLocal.esVacia()) {\n\t\t\treturn bufferLocal.extraer();\n\t\t} else {\n\t\t\t// Si no, leemos del Stream\t\t\t\t\t\n\t\t\tint lexema = tokens.nextToken();\n\t\t\tswitch (lexema) {\n\t\t\t\tcase StreamTokenizer.TT_WORD: \n\t\t\t\t\tlexemaActual = tokens.sval; \n\t\t\t\t\tbreak;\n\t\t\t\tcase StreamTokenizer.TT_EOF:\n\t\t\t\t\tlexemaActual = \"fin\";\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tlexemaActual = String.valueOf((char)tokens.ttype);\n\t\t\t\t\tbreak;\n\t\t\t}\t\t\t\n\t\t\t// Sumamos una linea en caso de haber salto de linea\n\t\t\tif (lexemaActual.equals(\"\\n\")) \n\t\t\t\tnumeroLinea++;\t\t\t\n\t\t}\n\t\treturn new Token(lexemaActual,this.numeroLinea);\n\t}", "public String popCurrentToken() throws IOException, DataFormatException {\n String token = this.currentToken;\n advance();\n return token;\n }", "public void alg_HOLDTOKEN(){\nTokenOut.value=false;\nSystem.out.println(\"hold\");\n\n}", "private void scan() {\n token = nextToken;\n nextToken = scanner.next();\n }", "private void extendedNext() {\n\t\twhile (currentIndex < data.length\n\t\t\t\t&& Character.isWhitespace(data[currentIndex])) {\n\t\t\tcurrentIndex++;\n\t\t\tcontinue;\n\t\t} // we arw now on first non wmpty space\n\t\tif (data.length <= currentIndex) {\n\t\t\ttoken = new Token(TokenType.EOF, null); // null reference\n\t\t\treturn;\n\t\t}\n\t\tstart = currentIndex;\n\t\t// System.out.print(data);\n\t\t// System.out.println(\" \"+data[start]);;\n\t\tswitch (data[currentIndex]) {\n\t\tcase '@':\n\t\t\tcurrentIndex++;\n\t\t\tcreateFunctName();\n\t\t\treturn;\n\t\tcase '\"':// string\n\t\t\tcreateString();// \"\" are left\n\t\t\treturn;\n\t\tcase '*':\n\t\tcase '+':\n\t\tcase '/':\n\t\tcase '^':\n\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\tbreak;\n\t\tcase '$':\n\t\t\tString value = \"\";\n\t\t\tif (currentIndex + 1 < data.length && data[currentIndex] == '$'\n\t\t\t\t\t&& data[currentIndex + 1] == '}') {\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\tvalue += data[currentIndex++];\n\t\t\t\ttoken = new Token(TokenType.WORD, value);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase '=':\n\t\t\ttoken = new Token(TokenType.Name,\n\t\t\t\t\tString.valueOf(data[currentIndex++]));\n\t\t\treturn;\n\t\tcase '-':\n\t\t\tif (currentIndex + 1 >= data.length\n\t\t\t\t\t|| !Character.isDigit(data[currentIndex + 1])) {\n\t\t\t\ttoken = new Token(TokenType.Operator, data[currentIndex++]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\tdefault:\n\t\t\t// if we get here,after - is definitely a number\n\t\t\tif (data[currentIndex] == '-'\n\t\t\t\t\t|| Character.isDigit(data[currentIndex])) {\n\t\t\t\t// if its decimal number ,it must starts with 0\n\t\t\t\tcreateNumber();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (Character.isLetter(data[currentIndex])) {\n\t\t\t\tvalue = name();\n\t\t\t\ttoken = new Token(TokenType.Name, value);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthrow new LexerException(\n\t\t\t\t\t\"No miningful tag starts with \" + data[currentIndex]);\n\t\t\t// createWord();\n\n\t\t}\n\t}", "private Token peek() {\n return tokens.get(current);\n }", "public Token nextToken() {\n\t\t\t// if something in queue, just remove and return it\n\t\t\tif ( tokens.size()>0 ) {\n\t\t\t\tToken t = (Token)tokens.firstElement();\n\t\t\t\ttokens.removeElementAt(0);\n\t\t\t\t// System.out.println(t);\n\t\t\t\treturn t;\n\t\t\t}\n\n\t\t\tinsertImaginaryIndentDedentTokens();\n\n\t\t\treturn nextToken();\n\t\t}", "@Override\n\tpublic void eat() {\n\t\t\n\t}", "private void tokenStart() {\n tokenStartIndex = zzStartRead;\n }", "public char getNextToken(){\n\t\treturn token;\n\t}", "private Token nextToken() {\n Token token = scanner.nextToken();\n lastSourcePosition = token.location.end;\n return token;\n }", "private Token peekToken() {\n return peekToken(0);\n }", "public void tokenArrived(Object token)\n {\n }", "@Override\n\tprotected void handleSpace() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "@Override\n\tpublic void expireToken() {\n\t\t\n\t}", "private void eatValue() {\n while (position < length) {\n switch (data.charAt(position)) {\n case '\\t': case '\\n': case '\\r': case ' ':\n tokenEnd = position;\n return;\n default:\n position++;\n break;\n }\n }\n tokenEnd = position;\n }", "@Override\n\tprotected void handleCloseBracket() {\n\t\tif (isInClearText()) {\n\t\t\tsaveToken();\n\t\t}\n\t}", "protected void attack() {\n int[] dir = orientationToArray(orientation);\n int newX = positionX + dir[0];\n int newY = positionY + dir[1];\n Skill currentSkill = grid.getPlayer().getBattleSkill();\n if (\n currentSkill != null\n && grid.valid(newX, newY)\n && grid.getPlayer().hasEnoughMp(currentSkill.getCost())\n && System.currentTimeMillis() - currentSkill.getLastUsed() > currentSkill.getCooldown()\n ) {\n Token token = new SkillToken(\n currentSkill.getImage(),\n newX,\n newY,\n grid,\n dir[0],\n dir[1],\n currentSkill\n );\n token.orientation = orientation;\n grid.addTokenAt(token, newX, newY);\n currentSkill.use(System.currentTimeMillis());\n new Thread(token).start();\n }\n grid.repaint();\n }", "private void basicNext() {\n\t\t// start = currentIndex;\n\t\tif (currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t} else {\n\t\t\tcreateBasicToken();\n\t\t}\n\t}", "public void eat() {\n if (!isTired()) {\n hunger -= 3;\n fatigue += 2;\n\n if (!muted) {\n System.out.println(\"eat\\t\\t|\\tYummy this is tasty!\");\n }\n }\n }", "public void printToken(){\r\n System.out.println(\"Kind: \" + kind + \" , Lexeme: \" + lexeme);\r\n }", "protected void updateTokens(){}", "public Token peekToken() {\r\n return this.current;\r\n }", "public Object next() {\n\t\t ArrayList tokenList = new ArrayList();\n\t\t Utterance utterance = null;\n\n\t\t if (savedToken != null) {\n\t\t\ttokenList.add(savedToken);\n\t\t\tsavedToken = null;\n\t\t }\n\n\t\t while (tok.hasMoreTokens()) {\n\t\t\tToken token = tok.getNextToken();\n\t\t\tif ((token.getWord().length() == 0) ||\n\t\t\t (tokenList.size() > 500) ||\n\t\t\t tok.isBreak()) {\n\t\t\t savedToken = token;\n\t\t\t break;\n\t\t\t}\n\t\t\ttokenList.add(token);\n\t\t }\n\t\t utterance = new Utterance(Voice.this, tokenList);\n\t\t utterance.setSpeakable(speakable);\n\t\t utterance.setFirst(first);\n\t\t first = false;\n boolean isLast = \n (!tok.hasMoreTokens() && \n (savedToken == null || \n savedToken.getWord().length() == 0));\n\t\t utterance.setLast(isLast);\n\t\t return utterance;\n\t\t}", "Token CurrentToken() throws ParseException {\r\n return token;\r\n }", "protected void addCurrentTokenToParseTree() {\n\t\tif (guessing>0) {\n\t\t\treturn;\n\t\t}\n\t\tParseTreeRule root = (ParseTreeRule)currentParseTreeRoot.peek();\n\t\tParseTreeToken tokenNode = null;\n\t\tif ( LA(1)==Token.EOF_TYPE ) {\n\t\t\ttokenNode = new ParseTreeToken(new org.netbeans.modules.cnd.antlr.CommonToken(\"EOF\"));\n\t\t}\n\t\telse {\n\t\t\ttokenNode = new ParseTreeToken(LT(1));\n\t\t}\n\t\troot.addChild(tokenNode);\n\t}", "public Token next() {\n \tcurrent = peek;\n \tpeek = extractToken();\n \treturn current;\n }", "@Override\n\tpublic void eatOut() {\n\t\t\n\t}", "@Override\r\n\tpublic boolean incrementToken() throws IOException {\n\t\treturn false;\r\n\t}", "public void extract() throws Exception{\n //because when this is called, Scanner had already determined the first character\n char currentChar = getCurrentChar();\n\n do {\n this.text += Character.toString(currentChar);\n currentChar = getNextChar();\n } while (Character.isLetterOrDigit(currentChar) || currentChar == '_');\n\n this.value = this.text;\n\n //find token type. For words, the type is either IDENTIFIER, or the specific reserved word\n\n if (TokenType.getReservedWords().contains(this.text.toLowerCase())) {\n this.type = TokenType.valueOf(this.text.toUpperCase());\n }\n else {\n this.type = TokenType.IDENTIFIER;\n }\n }", "Token peekToken() throws SyntaxException;", "@Override\n void advance() {\n }", "private Token () { }", "public Token nextToken ()\n throws ParseException\n {\n return getNextToken();\n }", "public void putToken(Token token)throws Exception;", "public Token curr() throws SyntaxException {\n\t\tif (token==null)\n\t\t\tthrow new SyntaxException(pos,new Token(\"ANY\"),new Token(\"EMPTY\"));\n\t\treturn token;\n }", "void eat() {\n\t\tSystem.out.println(\"eating...\");\n\t}", "private Token nextTokenExtended() throws LexerException {\n while(currentIndex < dataLength \n && !Character.isWhitespace( data[currentIndex] ) \n && data[currentIndex]!='#') {\n \n stringToken.append( data[ currentIndex++ ] );\n }\n \n token = new Token(TokenType.WORD, stringToken.toString());\n stringToken = new StringBuilder();\n \n return token;\n }", "@Override\r\n\tpublic String eat() {\n\t\treturn \"eats rats\";\r\n\t}", "void unexpectedTokenReplaced(Term unexpectedToken, Term replacementToken);", "@Override\n\tpublic void eat() {\n\t\tsuper.eat();\n\t\tSystem.out.println(\"喝奶.......\");\n\t}", "private void consume(final TermParserReader p, final Terms kind) {\n if (p.current().kind() != kind) {\n throw new IllegalStateException(\"The current token \" + p.current()\n + \" does not match expected kind \" + kind);\n }\n p.advance();\n }", "private void next(JSONTokener tokener) {\n char result = tokener.nextClean();\n // step back one if we haven't reached the end of the input\n if (result != 0) tokener.back();\n }", "protected Token lookahead() {\n return m_current;\n }", "private Token nextToken() throws IOException {\n // Si hay lexemas en el buffer, leemos de ahi\n if (!bufferLocal.esVacia()) {\n return bufferLocal.extraer();\n }\n // Si no, leemos del Stream\n String lexemaActual = \"\";\n do {\n int lexema = tokens.nextToken();\n switch (lexema) {\n case StreamTokenizer.TT_WORD:\n lexemaActual = tokens.sval;\n break;\n case StreamTokenizer.TT_EOF:\n lexemaActual = \"fin\";\n break;\n default:\n lexemaActual = String.valueOf((char)tokens.ttype);\n break;\n }\n // Sumamos una linea en caso de haber salto de linea\n if (lexemaActual.equals(\"\\n\"))\n numeroLinea++;\n } while (lexemaActual.matches(\" |\\t|\\n|\\r\"));\n return new Token(lexemaActual,this.numeroLinea);\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "private void clearToken() {\n \n token_ = getDefaultInstance().getToken();\n }", "abstract protected void parseNextToken();", "public void syntax_error(Symbol current_token){}", "private void setNextToken() {\n\t\t\n\t\tif (token != null && token.getType() == TokenType.EOF)\n\t\t\tthrow new QueryLexerException(\"There is no more tokens\");\n\n\t\tskipWhitespaces();\n\t\t\n\t\tif (currentIndex >= data.length) {\n\t\t\ttoken = new Token(TokenType.EOF, null);\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (Character.isLetter(data[currentIndex])) {\n\t\t\tint beginningOfWord = currentIndex;\n\t\t\tcurrentIndex++;\n\t\t\twhile(currentIndex < data.length && Character.isLetter(data[currentIndex])) {\n\t\t\t\tcurrentIndex++;\n\t\t\t}\n\t\t\tString word = new String(data, beginningOfWord, currentIndex - beginningOfWord);\n\t\t\tToken mappedToken = keywordsTokenMap.get(word.toUpperCase());\n\t\t\tif (mappedToken != null) {\n\t\t\t\ttoken = mappedToken;\n\t\t\t\treturn;\n\t\t\t} else {\n\t\t\t\tthrow new QueryLexerException(\"Word that you inputed is not keyword.\\n You entered: \" + word);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif (data[currentIndex] == '\\\"') {\n\t\t\tcurrentIndex++;\n\t\t\tint beginningOfText = currentIndex;\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tif (currentIndex >= data.length)\n\t\t\t\t\tthrow new QueryLexerException(\"Wrong input. Missing one double quote.\");\n\t\t\t\t\n\t\t\t\tif (data[currentIndex] == '\\\"') \n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcurrentIndex++;\n\t\t\t}\n\t\t\t\n\t\t\tString text = new String(data, beginningOfText, currentIndex - beginningOfText);\n\t\t\ttoken = new Token(TokenType.TEXT, text);\n\t\t\tcurrentIndex++;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (isOperator(data[currentIndex])) {\n\t\t\tsetOperatorToken();\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// everything else is invalid\n\t\tthrow new QueryLexerException(\"Invalid input: Last character was: \" + data[currentIndex]);\n\t}", "@Override\n public final boolean incrementToken() throws IOException {\n if (lemmaListIndex < lemmaList.size()) {\n restoreState(current);\n posIncrAtt.setPositionIncrement(0);\n popNextLemma();\n return true;\n } else if (this.input.incrementToken()) {\n if (!keywordAttr.isKeyword()\n && (lookupSurfaceForm(termAtt) || lookupSurfaceForm(toLowercase(termAtt)))) {\n current = captureState();\n popNextLemma();\n } else {\n tagsAtt.clear();\n }\n return true;\n } else {\n return false;\n }\n }", "public void eat() {\n\t\tSystem.out.println(\"Ape eating\");\n\t}", "@Override\n public final boolean incrementToken() throws IOException {\n clearAttributes();\n return matcher.yylex() != matcher.getYYEOF();\n }", "void missingTokenInserted(Term token);", "public void reenviarToken() {\r\n\t\ttry {\r\n\t\t\tmngRes.generarEnviarToken(getEstudiante());\r\n\t\t\tMensaje.crearMensajeINFO(\"Token reenviado correctamente.\");\r\n\t\t} catch (Exception e) {\r\n\t\t\tMensaje.crearMensajeERROR(\"Error al reenviar token: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private Token extendedNextWordToken() {\n\t\t StringBuilder sb = new StringBuilder();\n\t\t \n\t\t while(currentIndex < data.length) {\n\t\t\t char c = data[currentIndex];\n\t\t\t \n\t\t\t if(c == '#') break;\n\t\t\t if(c == ' ' || c == '\\n' || c== '\\t' || c == '\\r') break;\n\t\t\t \n\t\t\t sb.append(c);\n\t\t\t currentIndex++;\n\t\t }\n\t\t return new Token(TokenType.WORD, sb.toString());\n\t }", "@Nonnull\r\n public Token token()\r\n throws IOException,\r\n LexerException {\r\n Token tok = _token();\r\n if (getFeature(Feature.DEBUG))\r\n LOG.debug(\"pp: Returning \" + tok);\r\n return tok;\r\n }", "@Override\n\tpublic Token getToken() {\n\t\treturn this.token;\n\t\t\n\t}", "void cannotRecognize(Term token);", "public Token nextToken() {\r\n\t\treturn tokens.get(nextTokenPos++);\r\n\t}", "private String nextToken()\n {\n // ensure that the current line has a token\n while (line == null || !line.hasMoreTokens())\n {\n try\n {\n // attempt to input another line\n String newLine = in.readLine();\n if (newLine == null) // end of file encountered\n throw new MyInputException(\"End of file\");\n\n // convert newLine to tokens\n line = new StringTokenizer(newLine);\n }\n catch (IOException e)\n {throw new MyInputException(e.getMessage());}\n\n }\n\n // extract and return the next token\n return line.nextToken();\n }", "public Token() {\n this.clitic = \"none\";\n }", "@Override\n\tpublic void eat() {\n\t\tSystem.out.println(\"eat\");\n\t}", "public void eat();", "public Token next()\n\t{\n\t\tint munchSize = 0;\n\t\tStringBuilder buffer = new StringBuilder();\n\n\t\t// iterate until we either:\n\t\t//\t1. Match a token in any state but MANY_STATE\n\t\t//\t2. Whitespace, newline or EOF\n\t\tboolean was_good = false, can_continue = true;\n\t\tToken to_return = Token.generateToken(lineNum, charPos, \"EOF\", Token.Kind.EOF);\n\n\t\t// skip any initial white space.\n\t\twhile (readChar() == -1) { }\n\t\tthis.lastChar = this.nextChar;\n\t\twhile (can_continue && readChar() > -1) {\n\t\t\tchar next = (char)this.nextChar;\n\t\t\tint pos = (charPos - (buffer.length() + 1));\n\t\t\tswitch (munchSize) {\n\t\t\t\tcase EMPTY_STATE:\n\t\t\t\t\t// Search for all tokens of one token. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getSingleCharacterMap(), String.valueOf(next), 0)) {\n\t\t\t\t\t\t// We can transition.\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getSingleCharacterMap());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// error.\n\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase SINGLE_STATE:\n\t\t\t\t\t// Search for all tokens of two tokens. If we match\n\t\t\t\t\t// store it, and attempt to switch states.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getDoubleCharTokens(), buffer.toString() + next, 1)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getDoubleCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t\twas_good = true;\n\n\t\t\t\t\t\t// is this a comment?\n\t\t\t\t\t\tif (to_return.is(Token.Kind.COMMENT)) {\n\t\t\t\t\t\t\t// restart parse.\n\t\t\t\t\t\t\tthis.on_comment = true;\n\t\t\t\t\t\t\tmunchSize = 0;\n\t\t\t\t\t\t\tbuffer.delete(0, buffer.length());\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tcan_continue = true;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"EOF\", Token.Kind.EOF);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\tif (!was_good) {\n\t\t\t\t\t\t\t// error.\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase DOUBLE_STATE:\n\t\t\t\t\t// Search for multiple character states and keywords.\n\t\t\t\t\tif (Token.isValidLexeme(Token.getMultiCharTokens(), buffer.toString() + next, 2)) {\n\t\t\t\t\t\t// we can transition\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(),\n\t\t\t\t\t\t\t\tToken.getMultiCharTokens());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if we had a previous good state, return, else error.\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: // MANY_STATE\n\t\t\t\t\tif (Token.isValidLexeme(Token.getKeywords(), buffer.toString() + next, munchSize)) {\n\t\t\t\t\t\tbuffer.append(next);\n\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, buffer.toString(), Token.getKeywords());\n\t\t\t\t\t\tmunchSize++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcan_continue = false;\n\t\t\t\t\t\tif (was_good) {\n\t\t\t\t\t\t\tthis.lastChar = this.nextChar;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twas_good = false;\n\t\t\t\t\t\t\tto_return = Token.generateToken(lineNum, pos, \"Unexpected token: \" + buffer.toString(),\n\t\t\t\t\t\t\t\t\tToken.Kind.ERROR);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn to_return;\n\t}", "public void attackTargetCharacter() {\n }", "void expr() throws IOException {\n\t\tinput = input+(char)lookahead;\n\t\tterm();\n\t\trest();\n\t\tprintPostfix();\n\t}", "public Token current() {\n \tif( current == null ) {\n \t\treturn peek;\n \t}\n return current;\n }", "int getTokenFinish();", "@Override\n\tprotected Token findNextToken() {\n\t\tLocatedChar ch = nextNonWhitespaceChar();\n\t\tif(isCommentStart(ch)) {\n\t\t\tscanComment(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t\tif(ch.isDigit()) {\n\t\t\treturn scanNumber(ch);\n\t\t}\n\t\telse if(isIdentifierStart(ch)) {\n\t\t\treturn scanIdentifier(ch);\n\t\t}\n\t\telse if(isPunctuatorStart(ch)) {\n\t\t\treturn PunctuatorScanner.scan(ch, input);\n\t\t}\n\t\telse if(isCharStart(ch)) {\n\t\t\treturn scanChar(ch);\n\t\t}\n\t\telse if(isStrStart(ch)) {\n\t\t\treturn scanString(ch);\n\t\t}\n\t\telse if(isEndOfInput(ch)) {\n\t\t\treturn NullToken.make(ch);\n\t\t}\n\t\telse {\n\t\t\tlexicalError(ch);\n\t\t\treturn findNextToken();\n\t\t}\n\t}", "public void eat()\n {\n System.out.println(\"You have eaten now and you are not hungry any more\");\n }", "public void eat() {\n\t\tSystem.out.println(\"They eat...\");\n\t}", "private boolean UpdateToken()\n\t{\n\t\ttry\n\t\t{\n\t\t\tToken tempToken = scanner.GetNextToken();\n\t\t\tif(tempToken.GetTokenType() == TokenType.ERROR)\n\t\t\t{\n\t\t\t\tcurrentToken = tempToken;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(tempToken.GetTokenType() == TokenType.META)\n\t\t\t{\n\t\t\t\tnewFile.write(tempToken.GetTokenName() + \"\\n\");\n\t\t\t\treturn UpdateToken();\n\t\t\t}\n\t\t\tcurrentToken = tempToken;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}", "public void eat () {\n System.out.println(\"He's eating everything\" );\n }", "private void clearTokens(){\n Login.gramateia_counter = false; \n }", "@Override\n\tpublic void eat() {\n\t\tSystem.out.println(\"狗吃肉\");\n\t}", "private Token peekToken(int index) {\n return scanner.peekToken(index);\n }", "public boolean hasMoreTokens(){\n return !ended;\n }", "public Token getNextToken() throws IOException {\n\t\t\n\t\tToken palabra = this.nextToken();\n\t\t// Comprobamos si es un caso especial\n\t\tpalabra = casoEspecial(palabra);\n\t\tpalabra.setCatLexica(reconoceCategoria(palabra.get_lexema()));\n\t\t \n\t\tlistaTokens.add(palabra);\n\t\treturn palabra;\t\n\t}" ]
[ "0.70672524", "0.677557", "0.6752418", "0.6692412", "0.6400982", "0.6335785", "0.6304151", "0.6250004", "0.6142677", "0.6067183", "0.60454166", "0.6034938", "0.5985698", "0.5960256", "0.59371877", "0.59301287", "0.5913286", "0.5871596", "0.58667713", "0.5863043", "0.5852947", "0.58442754", "0.5829596", "0.5824481", "0.58215976", "0.57968956", "0.5796711", "0.576784", "0.5753094", "0.5748981", "0.5745259", "0.5733459", "0.5711126", "0.5710538", "0.5690402", "0.56802386", "0.5676773", "0.56712186", "0.5669131", "0.56669855", "0.5618598", "0.55769867", "0.5573897", "0.5567149", "0.55617756", "0.55564374", "0.55471665", "0.5545613", "0.55395174", "0.55378187", "0.5535188", "0.5515243", "0.55028987", "0.5489254", "0.54875207", "0.54871666", "0.54839337", "0.5478986", "0.54737335", "0.546439", "0.5459865", "0.5459697", "0.5440329", "0.5433473", "0.543236", "0.54134405", "0.5412419", "0.5412419", "0.5412419", "0.5412301", "0.5409446", "0.5408463", "0.5404334", "0.5403541", "0.538664", "0.53768575", "0.5360334", "0.53585947", "0.53497076", "0.53463024", "0.534015", "0.5331155", "0.5326882", "0.5322825", "0.53213584", "0.53098166", "0.53081", "0.5305435", "0.5304899", "0.5302502", "0.5291286", "0.5285815", "0.5285769", "0.5281752", "0.5281651", "0.5280375", "0.527953", "0.52738166", "0.5269709", "0.5255453", "0.5252823" ]
0.0
-1
Parsing String format data into JSON format
private static String jsonToString(final Object obj) throws JsonProcessingException { String result; try { final ObjectMapper mapper = new ObjectMapper(); final String jsonContent = mapper.writeValueAsString(obj); result = jsonContent; } catch (JsonProcessingException e) { result = "Json processing error"; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private JSONDocument parseString(String data){\n JSONDocument temp = null;\n int pointer = 0;\n boolean firstValidCharReached = false;\n do{\n char c = data.charAt(pointer ++);\n switch (c) {\n case '{':\n HashMap thm = this.parseMap(this.getFull(data.substring(pointer),0));\n temp = new JSONDocument(thm);\n firstValidCharReached = true;\n break;\n case '[':\n ArrayList tal = this.parseList(this.getFull(data.substring(pointer),1));\n temp = new JSONDocument(tal);\n firstValidCharReached = true;\n break;\n }\n }while (!firstValidCharReached);\n return temp;\n }", "@Override\n\tpublic JSON parse(String in) throws IOException {\n\t\tMyJSON js = new MyJSON();\n\t\t//count brackets make sure they match\n\t\tif(!syntaxOkay(in)){\n\t\t\tthrow new IllegalStateException(\"Mismatched brackets error\");\n\t\t}\n\t\t//get rid of spaces to make things easier\n\t\tString withoutSpaces = remove(in, ' ');\n\t\t//handles edge case of an empty object\n\t\tString withoutBraces = remove(withoutSpaces, '{');\n\t\twithoutBraces = remove(withoutBraces, '}');\n\t\tif(withoutBraces.length() == 0){\n\t\t\treturn js;\n\t\t}\n\t\tint colonIndex = in.indexOf(\":\");\n\t\tString key = in.substring(0, colonIndex);\n\t\tString value = in.substring(colonIndex + 1);\n\n\t\tif(value.contains(\":\")){\n\t\t\t//this means the value is an object so we figure out how many strings to add to the object\n\t\t\tString[] values = value.split(\",\");\n\t\t\t//creates a temp for the new object\n\t\t\tMyJSON temp = new MyJSON();\n\t\t\tfillObject(values, temp);\n\t\t\tkey = removeOutsides(key);\n\t\t\tjs.setObject(key, temp);\n\t\t}else{\n\t\t\t//the base case that actually puts things as a JSON object\n\t\t\tkey = removeOutsides(key);\n\t\t\tvalue = removeOutsides(value);\n\t\t\tjs.setString(key, value);\n\t\t}\n\n\t\treturn js;\n\t}", "public static Example stringToJSON(String s){\n Gson gson = new Gson();\n JsonReader reader = new JsonReader(new StringReader(s));\n reader.setLenient(true);\n\n Example ex = gson.fromJson(reader, Example.class);\n\n return ex;\n }", "private static Object m7292a(String str) throws JSONException {\n Object obj = null;\n String trim = str.trim();\n if (trim.startsWith(\"{\") || trim.startsWith(\"[\")) {\n obj = new JSONTokener(trim).nextValue();\n }\n return obj == null ? trim : obj;\n }", "public JSONDocument parse (String data){\n JSONDocument temp = null;\n if (data != null && !data.isEmpty()){\n temp = this.parseString(this.cleanString(data));\n }else throw new IllegalArgumentException(\"data cannot be null or empty\");\n return temp;\n }", "protected Map<String, String> deserialize(String data)\n {\n Map<String, String> map = new HashMap<String, String>();\n if (!StringUtils.isEmpty(data)) {\n JavaScriptObject jsObject = JavaScriptObject.fromJson(data);\n JsArrayString keys = jsObject.getKeys();\n for (int i = 0; i < keys.length(); i++) {\n String key = keys.get(i);\n Object value = jsObject.get(key);\n if (value != null) {\n map.put(key, String.valueOf(value));\n }\n }\n }\n return map;\n }", "public static String reParseJson(String old){\n int start = old.indexOf(\"{\");\n int end = old.lastIndexOf(\"}\");\n return old.substring(start,end+1);\n\n }", "public String toJson(final String object) {\n if (object != null && (object.startsWith(\"[\") || object.startsWith(\"{\")\n || (object.startsWith(\"\\\"[\") || object.startsWith(\"\\\"{\")))) {\n return object;\n } else\n return \"{\\\"\" + \"{\\\"success\\\" : 1}\" + \"\\\":\\\"\" + object + \"\\\"}\";\n }", "protected Map<String, String> parseSimpleJavaScriptObjectProperties(String data) {\n\t\tMap<String, String> result = new LinkedHashMap<String, String>(10);\n\t\t\n\t\tMatcher m = SIMPLE_JSON_PATTERN.matcher(data);\n\t\twhile ( m.find() ) {\n\t\t\tString attrName = m.group(1);\n\t\t\tString attrValue = m.group(2);\n\t\t\tresult.put(attrName, attrValue);\n\t\t}\n\t\t\n\t\tlog.trace(\"Parsed {} attributes from data [{}]: {}\",\n\t\t\t\tnew Object[] {result.size(), data, result});\n\t\t\n\t\treturn result;\n\t}", "void mo59932a(String str, JSONObject jSONObject);", "void mo16412a(String str, JSONObject jSONObject);", "public JSONString(String stringIn)\n {\n this.string = stringIn;\n }", "Map<String, Object> parseToMap(String json);", "public native Object parse( Object json );", "public static JsonElement stringToJSON2(String json) {\n try {\n JsonElement parser = new JsonPrimitive(json);\n System.out.println(parser.getAsString());\n //JsonObject Jso = new JsonObject();\n //Jso = (JsonObject) parser.p(json);\n return parser;\n } catch (Exception e) {\n return new JsonObject();\n }\n }", "public static <T> T string2Object(String source, Class<T> type){\n\t\treturn JSON.parseObject(source, type);\n\t}", "String toJson() throws IOException;", "public static JSONObject strToJson(String jsonstring) {\n JSONParser parser = new JSONParser();\n JSONObject json = null;\n try {\n json = (JSONObject) parser.parse(jsonstring);\n } catch (ParseException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return json;\n }", "public JSONObject parseJson(String response) {\n\t\tSystem.out.println(response);\n\t\tJSONObject json = (JSONObject) JSONSerializer.toJSON(response);\n\t\treturn json; \n\t}", "void extractDataFromJson(String commentData);", "private HashMap parseMap(String localData){\n int localPointer = 0;\n HashMap temp = new HashMap();\n char c = localData.charAt(localPointer++);\n while (c != '}'){\n String entry = \"\";\n entry_loop :\n while (c != '}'){\n switch (c){\n case ',' :\n c = localData.charAt(localPointer++);\n break entry_loop;\n case '{' :\n String tempEntry = this.getFull(localData.substring(localPointer),0);\n entry += tempEntry;\n localPointer += tempEntry.length();\n break ;\n case '[' :\n String tempEntry2 = this.getFull(localData.substring(localPointer),1);\n entry += tempEntry2;\n localPointer += tempEntry2.length();\n break ;\n default :\n entry += c;\n break ;\n }\n c = localData.charAt(localPointer++);\n }\n entry = entry.trim();\n String[] entryArray = entry.split(\":\",2);\n String key = entryArray[0].trim();\n String value = entryArray[1].trim();\n Object keyObj = null;\n Object valueObj = null;\n\n switch (this.getDataType(key.trim())){\n case String:\n keyObj = key.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n keyObj = Long.parseLong(key.trim());\n break ;\n case Float:\n keyObj = Float.parseFloat(key.trim());\n break ;\n case Boolean:\n keyObj = Boolean.parseBoolean(key.trim());\n break ;\n case Map:\n keyObj = this.parseMap(key.trim());\n break ;\n case List:\n keyObj = this.parseList(key.trim());\n }\n\n switch (this.getDataType(value.trim())){\n case String:\n valueObj = value.trim().replace(\"\\\"\",\"\");\n break ;\n case Integer:\n valueObj = Long.parseLong(value.trim());\n break ;\n case Float:\n valueObj = Float.parseFloat(value.trim());\n break ;\n case Boolean:\n valueObj = Boolean.parseBoolean(value.trim());\n break ;\n case Map:\n valueObj = this.parseMap(value.trim());\n break ;\n case List:\n valueObj = this.parseList(value.trim());\n }\n temp.put(keyObj,valueObj);\n }\n return temp;\n }", "public void parseJSONData(Object JSONdata){\n\n\t}", "public static String[] parseJSON(String line) {\n\t\tString temp = line.replaceFirst(\"\\\\{\\\"time\\\":[0-9]+,\\\"states\\\":\\\\[\\\\[\", \"\");\n\t\tString[] states = temp.split(\"\\\\],\\\\[\");\n\t\tstates[states.length-1].replaceAll(\"\\\\]\\\\]\\\\}\", \"\");\n\t\treturn states;\n\t}", "public static void main(String[] str) {\n String str1 = \"[{\\\"随机欢迎语\\\":[\\\"aaa\\\",\\\"bbbbb\\\",\\\"ccccc\\\"],\\\"no\\\":\\\"1\\\"},{\\\"商品标题\\\":\\\"商品标题\\\",\\\"no\\\":\\\"2\\\"},{\\\"商品卖点\\\":\\\"商品卖点\\\",\\\"no\\\":\\\"3\\\"},{\\\"商品描述\\\":\\\"商品描述\\\",\\\"no\\\":\\\"2\\\"},{\\\"包装清单\\\":\\\"包装清单\\\",\\\"no\\\":\\\"2\\\"},{\\\"随机结束语\\\":[\\\"1111\\\",\\\"2222\\\",\\\"33333\\\"],\\\"no\\\":\\\"2\\\"}]\";\n //System.out.println(JSONObject.);\n JSONArray objects = JSONObject.parseArray(str1);\n List<JSONObject> jsonObjects = JSONObject.parseArray(str1, JSONObject.class);\n for (JSONObject object : jsonObjects) {\n for (Map.Entry<String, Object> en : object.entrySet()) {\n System.out.println(en.getValue());\n }\n }\n\n }", "void mo26099a(String str, JSONObject jSONObject);", "private JSONObject serializeJson(String text){\n try {\n JSONObject jsonObject = new JSONObject(text);\n return jsonObject;\n }catch (JSONException err){\n return null;\n }\n }", "public interface JsonFormatter {\n JSONArray parseJasonString(String inputString) throws ParseException;\n List<LocationPOJO> formatJsonArray(JSONArray jsonArray);\n}", "public String parse(String jsonLine) throws JSONException {\n JSONObject jsonObject = new JSONObject(jsonLine);\n jsonObject = new JSONObject(jsonObject.getString(\"output\"));\n String result = jsonObject.getString(\"result\");\n return result;\n }", "public String readJson() {\n\t\t\tif (lastReadChar == ']') {\n\t\t\t\tSystem.out.println(\"Nunca deberia llegar a aca si usa hasNext()\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t// Si fue una coma, busco el siguiente '{'\n\t\t\twhile (read()!= '{');\n\t\t\t\n\t\t\tStringBuilder jsonText = new StringBuilder();\n\t\t\tjsonText.append((char) '{');\n\t\t\tlastReadChar = read();\n\t\t\t\n\t\t\twhile (lastReadChar != '}') { \n\t\t\t\tjsonText.append((char) lastReadChar);\n\t\t\t\tlastReadChar = read();\n\t\t\t} jsonText.append('}');\n\t\t\t\n\t\t\t// To satisfy Invariant: find the next ']' or ','\n\t\t\twhile (lastReadChar != ']' && lastReadChar != ',') lastReadChar = read(); \n\t\t\t\n\t\t\t//System.out.println(\"Analizando : \" + jsonText.toString());\n\t\t\treturn jsonText.toString();\n\t\t}", "static public Json wrapString(String string, QName type) {\n JsonObject json = new JsonObject();\n json.put(Manager.XP_VALUE.toString(), string);\n json.put(Manager.XP_TYPE.toString(), type.toString());\n return json;\n }", "public static JsonObject stringToJSON(String json) {\n try {\n JsonParser parser = new JsonParser();\n JsonObject Jso = parser.parse(json).getAsJsonObject();\n return Jso;\n } catch (Exception e) {\n System.out.println(e.getMessage());\n return new JsonObject();\n }\n }", "public static HashMap<String,String> splitJson(String s) {\n ObjectMapper mapper1 = new ObjectMapper();\n HashMap<String,String> rtn = new HashMap<String,String>();\n HashMap<String,String> jobj = null;\n try {\n jobj = mapper1.readValue(s, HashMap.class);\n for (Map.Entry<String, String> entrySet : jobj.entrySet()) {\n String key = entrySet.getKey();\n Object value = entrySet.getValue();\n rtn.put(key, mapper1.writeValueAsString(value));\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n return rtn;\n }", "public abstract Object parseRecord(String input);", "private JSONObject parseJSONResponse(String responseString) throws Exception {\n\t\tJSONObject responseJSON = null;\n\t\t\n\t\ttry {\n\t\t\tif(responseString != null){\n\t\t\t\tresponseJSON = (JSONObject)parser.parse(responseString);\n\t\t\t}\n\t\t} catch (ParseException pe) {\n\t\t\tpe.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + pe.getMessage());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tlog.severe(\"Exception when parsing json response: \" + e.getMessage());\n\t\t}\n\t\t\n\t\treturn responseJSON;\n\t}", "private JSONArray parseJSON() {\n JSONArray jsonArray = new JSONArray();\n for (TimestampedMessage m : fPending) {\n JSONTokener jsonTokener = new JSONTokener(m.fMsg);\n JSONObject jsonObject = null;\n JSONArray tempjsonArray = null;\n final char firstChar = jsonTokener.next();\n jsonTokener.back();\n if ('[' == firstChar) {\n tempjsonArray = new JSONArray(jsonTokener);\n for (int i = 0; i < tempjsonArray.length(); i++) {\n jsonArray.put(tempjsonArray.getJSONObject(i));\n }\n } else {\n jsonObject = new JSONObject(jsonTokener);\n jsonArray.put(jsonObject);\n }\n\n }\n return jsonArray;\n }", "public static JsonObject convertStringToJsonObject(final String str) {\n return JsonParser.parseString(str).getAsJsonObject();\n }", "public static JSONObject m3a(String str, String str2) {\n JSONObject jSONObject = new JSONObject();\n try {\n jSONObject.put(\"reg_no\", str);\n jSONObject.put(\"token\", str2);\n return jSONObject;\n } catch (String str3) {\n str3.printStackTrace();\n return null;\n }\n }", "static String parseJSON(String JSONString,int accountOrBio, String infoRequired){\n\t\tString returnString=\"\";\r\n\t\tJSONObject returnData = null;\r\n\t\tJSONObject obj = new JSONObject(JSONString);\r\n\t\tJSONObject values = obj.getJSONObject(\"values\");\t\r\n\t\tJSONArray accountDetailsArray = values.getJSONArray(\"accountDetails\");\r\n\t\tJSONArray bioDetailsArray = values.getJSONArray(\"bioDetails\");\r\n\t\tfor(int i=0;i<accountDetailsArray.length();i++){\r\n\t\t\tif(accountOrBio==0){\r\n\t\t\t\treturnData = accountDetailsArray.getJSONObject(i);\r\n\t\t\t\treturnString += returnData.getString(infoRequired)+\"\\t\";\r\n\t\t\t}\r\n\t\t\telse if(accountOrBio==1){\r\n\t\t\t\treturnData = bioDetailsArray.getJSONObject(i);\r\n\t\t\t\treturnString+=returnData.getString(infoRequired)+\"\\t\";\r\n\t\t\t}\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\treturn returnString;\r\n\t\t\r\n\t}", "String parseObjectToJson(Object obj);", "@Test\n\tpublic void test1() {\n\t\tMap<Long, String> map = new HashMap<Long, String>();\n\t\tmap.put(1L, \"1111111,1111111\");\n\t\tmap.put(2L, \"2222,2222\");\n\t\tString str = JSONObject.toJSONString(map);\n\t\tSystem.out.println(str);\n\t\tMap<Long,String> result = JSONObject.parseObject(str, new TypeReference<Map<Long,String>>(){});\n\t\tSystem.out.println(result);\n\t\tSystem.out.println(result.get(1L));\n\t}", "private Object onParse(final String content) throws IOException{\n if(null == this.mBean)\n return null;\n\n try{\n return JSON.parseObject(content, this.mBean);\n }catch(Exception e){\n throw new IOException(e.getMessage());\n }\n }", "@Override\n\t\tpublic void extractDataFromJson(String commentData) {\n\t\t\tString userID = \"\";\n\t\t\tString[] comments = null;\n\t\t\tString[] userNameComment = null;\n\t\t\t// extracting comments and username\n\t\t\ttry {\n\t\t\t\tJSONArray json2 = new JSONArray(commentData);\n\t\t\t\tcomments = new String[json2.length()];\n\t\t\t\tuserNameComment = new String[json2.length()];\n\t\t\t\tresult = new String[2][json2.length()];\n\t\t\t\tresult[0] = null;\n\t\t\t\tresult[1] = null;\n\t\t\t\tfor (int i = 0; i < json2.length(); i++) {\n\n\t\t\t\t\tJSONObject obj2 = json2.getJSONObject(i);\n\t\t\t\t\tcomments[i] = obj2.getString(\"Comment\");\n\t\t\t\t\tuserID = obj2.getString(\"UserID\");\n\n\t\t\t\t\tString userInfoDataFromServer = getUserInfoFromServer(userID);\n\t\t\t\t\tuserNameComment[i] = extractUserNameFromData(userInfoDataFromServer);\n\n\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\t//if (commentData.equals(\"\\nnull\\n\")) {\n\t\t\tif (commentData.equals(\"-1\")) {\n\t\t\t\tcomments = new String[1];\n\t\t\t\tuserNameComment = new String[1];\n\t\t\t\tresult = new String[2][1];\n\t\t\t\tcomments[0] = \"zero\";\n\t\t\t\tuserNameComment[0] = \"zero\";\n\t\t\t\tresult[0] = comments;\n\t\t\t\tresult[1] = userNameComment;\n\t\t\t\tthreadMsg(result);\n\t\t\t} else {\n\t\t\t\tresult[0] = comments;\n\t\t\t\tresult[1] = userNameComment;\n\t\t\t\tthreadMsg(result);\n\t\t\t}\n\n\t\t}", "private JsonValidate convertFromJson(String result) {\n JsonValidate jv = null;\n if (result != null && result.length() > 0) {\n try {\n Gson gson = new Gson();\n jv = gson.fromJson(result, JsonValidate.class);\n } catch (Exception ex) {\n Log.v(Constants.LOG_TAG, \"Error: \" + ex.getMessage());\n }\n }\n return jv;\n }", "@Override\n\t\tpublic boolean parseString(String jsonString) throws Exception {\n\n\n\t\t\tJSONObject jsonObject = new JSONObject(jsonString);\n\t\t\tmAlias = jsonObject.getString(KEY_ALIAS);\n\t\t\tmDid = jsonObject.getString(KEY_DID);\n\t\t\tmOnline = jsonObject.optInt(KEY_ONLINE);\n\t\t\t\n\t\t\tJSONObject fuJsonObject = jsonObject.getJSONObject(KEY_FUNCTION);\n\t\t\tmDeviceFunction.parseString(fuJsonObject.toString());\n\t\t\n\t\t\treturn true;\n\t\t\t\n\t\t}", "public String JSONTokener(String in) {\n if (in != null && in.startsWith(\"\\ufeff\")) {\n in = in.substring(1);\n }\n return in;\n }", "String getJSON();", "public static JSONObject parseStringToJSon(String jsonData) throws JSONException {\n final String trimmed = jsonData.trim ();\n final JSONTokener tokener = new JSONTokener (trimmed);\n JSONObject jsonObject = new JSONObject (tokener);\n return jsonObject;\n }", "public void decode(String data) throws JSONException {\n\t\tthis.dtoObj=getObj(data, JrGxpgbillDTO.class);\n\t}", "private static Map<String, String> parseInstanceValues(String data) {\r\n \t\tMap<String, String> responseMap = new HashMap<String, String>();\r\n \t\tif (data != null) {\r\n \t\t\tStringTokenizer strTok = new StringTokenizer(data, \",\\n\");\r\n \t\t\twhile (strTok.hasMoreTokens()) {\r\n \t\t\t\tString key = strTok.nextToken();\r\n \t\t\t\tString val = strTok.nextToken();\r\n \t\t\t\tString oldVal = responseMap.get(key);\r\n \t\t\t\tif (oldVal != null) {\r\n \t\t\t\t\tif (val != null) {\r\n \t\t\t\t\t\tif (oldVal.trim().length() < val.trim().length()) {\r\n \t\t\t\t\t\t\tresponseMap.put(key, val);\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t} else {\r\n \t\t\t\t\tresponseMap.put(key, val);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn responseMap;\r\n \t}", "public interface JsonParser {\n\n /**\n * convert string to POJO\n *\n * @param jsonString - string to convert to POJO\n * @param classType - POJO Type / Class Type to use for the deserialization\n * @param <T> the returned desirialized POJO\n * @return desiarilized POJO\n */\n <T> T toJsonPOJO(String jsonString, Class<T> classType);\n\n /**\n * convert from POJO to json string\n * @param data POJO to convert to json String\n * @return json string\n */\n String toJSONString(Object data);\n}", "void testFormatter(String s){\n\t\tInputStream istream = new java.io.ByteArrayInputStream(s.getBytes());\n\t\tMessageContext mc = new MessageContext();\n\t\tJSONOMBuilder ob = new JSONOMBuilder();\n\t\tOMSourcedElement omse;\n\t\ttry {\n\t\t\tomse = (OMSourcedElement) ob.processDocument(istream, \"application/json\", mc);\n\t\t} catch (AxisFault e) {\n\t\t\te.printStackTrace();\n\t\t\treturn;\n\t\t}\n // go for the formatte\n\t\tJSONMessageFormatter of = new JSONMessageFormatter();\n\t\tmc.setDoingREST(true);\n\t\tOMDataSource datasource = omse.getDataSource();\n\t\tString str = of.getStringToWrite(datasource);\n\t\tSystem.out.println(str);\n\t}", "private void parseData() {\n\t\t\r\n\t}", "public static <T> T parseJSON(final String jsonString, Class<T> type) {\r\n\t\tT retObject = null;\r\n\t\ttry {\r\n\t\t\tretObject = PARSER.parse(jsonString, type);\r\n\t\t} catch (ParseException ex) {\r\n\t\t\tLOGGER.log(Level.WARNING, \"JSON_UTIL:Error in de-serializing to object\", ex);\r\n\t\t\tretObject = null;\r\n\t\t}\r\n\t\treturn retObject;\r\n\t}", "public static String convertPoSToJson(String hitResultString){\n if (hitResultString == null || hitResultString.isEmpty()) return hitResultString;\n\n try {\n ObjectMapper mapper = AppConfig.getInstance().getObjectMapper();\n ArrayNode annotationArrayNode = mapper.createArrayNode();\n\n String[] words = hitResultString.trim().split(\" \");\n\n StringBuilder sb = new StringBuilder();\n //keep track of the string length we are in.\n int strLenProceesed = 0;\n for (String word : words) {\n String wordToAdd = word;\n String labelToAdd = null;\n\n String[] wordLabel = word.split(DConstants.LABEL_SEPARATOR);\n if (wordLabel.length == 2) {\n wordToAdd = wordLabel[0];\n labelToAdd = wordLabel[1];\n }\n\n int wordLen = wordToAdd.length();\n if (labelToAdd != null) {\n JsonNode node = mapper.createObjectNode();\n ((ObjectNode) node).putArray(\"label\").add(labelToAdd);\n ArrayNode pointsArrayNode = ((ObjectNode) node).putArray(\"points\");\n\n JsonNode pointNode = mapper.createObjectNode();\n ((ObjectNode) pointNode).put(\"start\", strLenProceesed);\n ((ObjectNode) pointNode).put(\"end\", strLenProceesed + wordLen -1); //End index is inclusive.\n ((ObjectNode) pointNode).put(\"text\", wordToAdd);\n pointsArrayNode.add(pointNode);\n\n annotationArrayNode.add(node);\n\n }\n\n sb.append(wordToAdd).append(\" \");\n strLenProceesed += wordLen + 1; //extra 1 for the space.\n }\n\n return mapper.writeValueAsString(annotationArrayNode);\n }\n catch (Exception e) {\n LOG.error(\"convertPoSToJson for item \" + hitResultString + \" Error = \" + e.toString());\n e.printStackTrace();\n return null;\n }\n }", "private String getJson(InputStream inputStream){\n try {\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream, \"UTF-8\");\n Scanner scanner = new Scanner(inputStreamReader);\n StringBuffer stringBuffer = new StringBuffer();\n while (scanner.hasNext()) {\n stringBuffer.append(scanner.nextLine());\n }\n System.out.println(\"STRING BUFFER >>>>>>>\" +stringBuffer);\n return stringBuffer.toString();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "private String parseResultSingle(String jsonString) {\n String ans = \"\";\n JSONArray obj = new JSONArray(jsonString);\n\n // meaning\n JSONArray obj2 = new JSONArray(obj.get(0).toString());\n JSONArray meaning = new JSONArray(obj2.get(0).toString());\n\n ans += (String) (\"\\n\" + meaning.get(1) + \" | \" + meaning.get(0) + \"\\n\");\n // different meaning\n JSONArray obj3 = new JSONArray(obj.get(1).toString());\n for (Object o : obj3) {\n JSONArray example = new JSONArray(o.toString());\n ans += (String) (\"\\n- \" + example.get(0) + \": \");\n JSONArray exampleWords = new JSONArray(example.get(1).toString());\n for (Object o2 : exampleWords) {\n ans += (String) (o2.toString() + \", \");\n }\n ans = ans.substring(0, ans.length() - 2);\n ans += (String) (\"\\n\");\n }\n return ans;\n }", "private static Object parseData(String source, Class<?> expectedType){\n\t\tif(expectedType.equals(Integer.class)) return new Integer(source);\n\t\tif(expectedType.equals(Boolean.class)) return new Boolean(source);\n\t\tif(expectedType.equals(Double.class)) return new Double(source);\n\t\treturn source;\n\t}", "String getJson();", "String getJson();", "String getJson();", "public Metadata(String _JSONString) {\n mJSONObject = new JSONObject();\n mJSONObject = (JSONObject) JSONValue.parse(_JSONString);\n\n // TODO: Maybe raise a 'malformed json string exception'\n if (mJSONObject == null) {\n \tLOGGER.info(\"Invalid JSON String received. new object was created, but its NULL.\");\n }\n }", "String parseMapToJson(Map<String, Object> data);", "public Object stringToObject(String s, Class c){\n Gson gson = new Gson();\n Object o = gson.fromJson(s, c);\n return o;\n }", "public abstract String toJsonString();", "@Override\n public Object convertJsonToObject(String content) {\n try {\n Map<String, EventDataValue> data = reader.readValue(content);\n\n return convertEventDataValuesMapIntoSet(data);\n } catch (IOException e) {\n throw new IllegalArgumentException(e);\n }\n }", "public static String GetJSONString(String resourceString) {\n String retVal = \"\";\n resourceString = resourceString.replaceAll(\"<API_.*?>\", \"\").replaceAll(\"</API_.*?>\", \"\");\n try {\n String json = XML.toJSONObject(resourceString).toString();\n json = \"{\" + json.substring(1, json.length() - 1).replaceAll(\"\\\\{\", \"\\\\[{\").replaceAll(\"\\\\}\", \"\\\\]}\") + \"}\";\n retVal = json;\n } catch (Exception ex) {\n ApiLog.One.WriteException(ex);\n }\n return retVal;\n }", "@Override\n\tpublic Object onSuccess(String str) {\n\t\treturn new Gson().fromJson(str, Result.class);\n\t}", "String toJSONString(Object data);", "private JSONObject getAddressJSONFromInputs(String addressFirst, String addressSecond) throws JSONException {\n JSONObject resultJSON = new JSONObject();\n String[] addressFieldNames = {\"Country\", \"Region\", \"City\",\n \"Street\", \"Number\", \"Building\", \"Apartment\"};\n String[] addressFieldValues = new String[7];\n String[] firstFieldValues = addressFirst.split(\",\");\n String[] secondFieldValues = addressSecond.split(\",\");\n\n\n int i;\n for (i = 0; i < 4; i++)\n addressFieldValues[i] = firstFieldValues[i];\n for (int j = 0; j < 3; j++, i++)\n addressFieldValues[i] = secondFieldValues[j];\n for (i = 0; i < 7; i++)\n if (i != 4 && i != 6) // 5th and 7th field must be json-numbers NOT json-strings\n resultJSON.put(addressFieldNames[i], addressFieldValues[i]);\n else\n addressFieldValues[i] = addressFieldValues[i].trim();\n\n //<editor-fold desc=\"Inserting in the JSON object the numeric 5th and 7th field\">\n int addressNumber = Integer.parseInt(addressFieldValues[4]);\n int addressApartment = Integer.parseInt(addressFieldValues[6]);\n resultJSON.put(addressFieldNames[4], addressNumber);\n resultJSON.put(addressFieldNames[6], addressApartment);\n //</editor-fold>\n\n return resultJSON;\n }", "@Override\n public void onMessageReceived(String receivedMessage) {\n try {\n JSONObject jsonFromString = new JSONObject(receivedMessage);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "String getJsonData(String urlString) throws IOException\n\t{\n\t\tBufferedReader reader = null;\n\t\ttry\n\t\t{\n\t\t\t// Create URL\n\t\t\tURL url = new URL(urlString);\n\t\t\t// Create URL stream\n\t\t\treader = new BufferedReader(new InputStreamReader(url.openStream()));\n\t\t\tStringBuffer buffer = new StringBuffer();\n\n\t\t\tint read;\n\n\t\t\tchar[] chars = new char[1024];\n\n\t\t\t// Copies individual characters into buffer until there aren't anymore to read.\n\t\t\twhile ((read = reader.read(chars)) != -1)\n\t\t\t\tbuffer.append(chars, 0, read);\n\n\t\t\treturn buffer.toString();\n\t\t}\n\t\tcatch (Exception ex)\n\t\t{\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\t// Close the stream\n\t\t\tif (reader != null)\n\t\t\t\treader.close();\n\t\t}\n\n\t\treturn null;\n\t}", "@Test\n @SmallTest\n public void testReadFromJsonString() throws Throwable {\n final String jsonObjectString =\n \"{'crash-local-id':'123456abc','crash-capture-time':1234567890,\"\n + \"'crash-keys':{'app-package-name':'org.test.package'}}\";\n\n CrashInfo parsed = CrashInfo.readFromJsonString(jsonObjectString);\n CrashInfo expected =\n createCrashInfo(\"123456abc\", 1234567890, null, -1, \"org.test.package\", null);\n Assert.assertThat(parsed, equalsTo(expected));\n }", "private void parseJSON(Map<String,Object> map, String baseName, JSONArray toParse) {\n\t\tObject jObj;\n\t\t\n\t\tfor(int objI=0; objI < toParse.length(); objI++) \n\t\t{\n\t\t\tjObj = parseJSONVal(toParse.get(objI));\n\t\t\t\n\t\t\tif(jObj instanceof JSONObject)\n\t\t\t\tparseJSON(map, baseName+objI+StringParser.DELIMITER, (JSONObject) jObj);\n\t\t\telse if(jObj instanceof JSONArray)\n\t\t\t\tparseJSON(map, baseName+objI+StringParser.DELIMITER, (JSONArray) jObj);\n\t\t\telse\n\t\t\t\tmap.put(baseName+objI, jObj);\n\t\t}\n\t}", "@Test\n public void simpleObject() throws IOException {\n String obj = \"{\\\"name\\\":\\\"value\\\",\\\"int\\\":1302,\\\"float\\\":1.57,\"\n + \"\\\"negint\\\":-5,\\\"negfloat\\\":-1.57,\\\"floatexp\\\":-1.5e7}\";\n JsonLexer l = new JsonLexer(new StringReader(obj));\n JsonParser p = new JsonParser(l);\n Map<String, Object> m = p.parseObject();\n\n assertEquals(6, m.size());\n assertEquals(\"value\", m.get(\"name\"));\n assertEquals(1302L, m.get(\"int\"));\n assertEquals(1.57, m.get(\"float\"));\n assertEquals(-5L, m.get(\"negint\"));\n assertEquals(-1.57, m.get(\"negfloat\"));\n assertEquals(-1.5e7, m.get(\"floatexp\"));\n }", "public String toJsonString() {\n JSONObject jsonObject = new JSONObject();\n try {\n jsonObject.put(\"from\", from);\n jsonObject.put(\"domain\", domain);\n jsonObject.put(\"provider\", provider);\n jsonObject.put(\"action\", action);\n\n try {\n JSONObject jsonData = new JSONObject();\n for (Map.Entry<String, String> entry : data.entrySet()) {\n jsonData.put(entry.getKey(), entry.getValue());\n }\n jsonObject.put(\"data\", jsonData);\n } catch (Exception e) {\n e.printStackTrace();\n jsonObject.put(\"data\", \"{}\");\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return jsonObject.toString();\n }", "public static String getDateFormatJson(String dateStr)\r\n\t{\r\n\t\tHashMap dateHashMap = new HashMap();\r\n\t\tStringBuffer one = new StringBuffer();\r\n\t\tStringBuffer two = new StringBuffer();\r\n\t\tStringBuffer three = new StringBuffer();\r\n\t\tStringBuffer separators = new StringBuffer();\r\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tint firstSepIndex = 0;\r\n\t\tfor (int i = 0; i < dateStr.length(); i++)\r\n\t\t{\r\n\t\t\tchar dateChar = dateStr.charAt(i);\r\n\t\t\tindex = dateStr.indexOf(dateChar);\r\n\t\t\tif ((firstSepIndex != index)\r\n\t\t\t\t\t&& ((dateChar >= 'a' && dateChar <= 'z') || (dateChar >= 'A' && dateChar <= 'Z')))\r\n\t\t\t{\r\n\t\t\t\tseparators.append(\"N\");\r\n\t\t\t\tfirstSepIndex = index;\r\n\t\t\t}\r\n\t\t\tif ((dateChar >= 'a' && dateChar <= 'z') || (dateChar >= 'A' && dateChar <= 'Z'))\r\n\t\t\t{\r\n\t\t\t\tif (index == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tone.append(dateChar);\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t} else if (index > 0 && count == index)\r\n\t\t\t\t{\r\n\t\t\t\t\ttwo.append(dateChar);\r\n\t\t\t\t} else\r\n\t\t\t\t{\r\n\t\t\t\t\tthree.append(dateChar);\r\n\t\t\t\t}\r\n\t\t\t} else\r\n\t\t\t{\r\n\t\t\t\tif (dateChar == ' ')\r\n\t\t\t\t\tdateChar = 'S';\r\n\t\t\t\tseparators.append(dateChar);\r\n\t\t\t\tcount++;\r\n\t\t\t\tfirstSepIndex = index + 1;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tdateHashMap.put(\"datePositionOne\", one.toString());\r\n\t\tdateHashMap.put(\"datePositionTwo\", two.toString());\r\n\t\tdateHashMap.put(\"datePositionThree\", three.toString());\r\n\r\n\t\tif (separators.length() >= 2)\r\n\t\t{\r\n\t\t\tdateHashMap.put(\"dateSeparatorOne\", separators.substring(0, 1));\r\n\t\t\tdateHashMap.put(\"dateSeparatorTwo\", separators.substring(1, 2));\r\n\t\t} else\r\n\t\t{\r\n\t\t\tdateHashMap.put(\"dateSeparatorOne\", separators.toString());\r\n\t\t}\r\n\t\tString jsonString = HashMapToJSONConverter.convertHashMapToJSONFormat(dateHashMap);\r\n\t\treturn jsonString;\r\n\t}", "public static Object parseStringObject(String value, String dataType) throws TimeSeriesException {\r\n\t\treturn parseStringObject(value, getSchemaType(dataType));\r\n\t}", "@Override\n\tpublic String onData() {\n\t\tMap<String, Object> mapObj = new HashMap<String, Object>();\n\t\tfor (BasicNameValuePair pair : pairs) {\n\t\t\tmapObj.put(pair.getName(), pair.getValue());\n\t\t}\n\t\tGson gson = new Gson();\n\t\tString json = gson.toJson(mapObj);\n\t\treturn json;\n\t}", "protected void parseJson(String result) throws JSONException {\n\tLog.v(TAG, result);\n\tJSONObject jsonObject=new JSONObject(result);\n\tString signin_flag=jsonObject.getString(\"register\");\n\tif(signin_flag.equals(\"success\")){\n\t\tsignHander.sendEmptyMessage(SIGNIN_SUCCESS);\n\t}\n\tif(signin_flag.equals(\"hasuser\")){\n\t\tsignHander.sendEmptyMessage(HAS_USER);\n\t}\n}", "public void parser(JSONObject jo) {\n\n\t\n\t\tcontractId = JsonUtil.getJsonString(jo, \"contractId\");\n\t\tdate1 = JsonUtil.getJsonString(jo, \"date1\");\n\t\tstartDate = JsonUtil.getJsonString(jo, \"startDate\");\n\t\tendDate = JsonUtil.getJsonString(jo,\"endDate\");\n\t\tsupplierName = JsonUtil.getJsonString(jo,\"supplierName\");\n\t\ttxt7 = JsonUtil.getJsonString(jo,\"txt7\");\n\t\t\n\t\t\n\t\n\t}", "public static Value makeJSONStr() {\n return theJSONStr;\n }", "public abstract String toJson();", "void mo1290a(String str) {\n JSONObject jSONObject;\n C0568g.m2441a(this.a, System.currentTimeMillis());\n try {\n jSONObject = new JSONObject(str);\n jSONObject = jSONObject.has(\"lbsInfo\") ? jSONObject.optJSONObject(\"lbsInfo\") : null;\n } catch (JSONException e) {\n jSONObject = null;\n }\n if (jSONObject != null) {\n Object a = C0568g.m2439a(this.a, jSONObject);\n if (this.f1790d != null && !TextUtils.isEmpty(a)) {\n this.f1790d.m2436a(0, a);\n this.f1790d = null;\n }\n }\n }", "private void fingerprintDataConvertedtoJSON() {\n String msgStr = \"\";\n JSONObject jsonObject = new JSONObject();\n\n try {\n /* jsonObject.put(\"errcode\", \"errcode1\");\n jsonObject.put(\"errInfo\", \"errInfo1\");\n jsonObject.put(\"fCount\", \"fCount1\");\n jsonObject.put(\"fType\", \"fType1\");\n jsonObject.put(\"iCount\", \"iCount1\");\n jsonObject.put(\"iType\", \"iType1\");\n jsonObject.put(\"pCount\", \"pCount1\");\n jsonObject.put(\"pType\", \"pType1\");\n jsonObject.put(\"nmPoints\", \"nmPoints1\");\n jsonObject.put(\"qScore\", \"qScor1e\");\n jsonObject.put(\"dpID\", \"dpI1d\");\n jsonObject.put(\"rdsID\", \"rds1ID\");\n jsonObject.put(\"rdsVer\", \"rdsVer\");\n jsonObject.put(\"dc\", \"dc1\");\n jsonObject.put(\"mi\", \"mi1\");\n jsonObject.put(\"mc\", \"mc\");\n jsonObject.put(\"ci\", \"c1i\");\n jsonObject.put(\"sessionKey\", \"SessionK1ey\");\n jsonObject.put(\"hmac\", \"hma1c\");\n jsonObject.put(\"PidDatatype\", \"PidDatat1ype\");\n jsonObject.put(\"Piddata\", \"Pidda1ta\");*/\n jsonObject.put(\"errcode\",errcode);\n jsonObject.put(\"errInfo\",errInfo);\n jsonObject.put(\"fCount\",fCount);\n jsonObject.put(\"fType\",fType);\n jsonObject.put(\"iCount\",iCount);\n jsonObject.put(\"iType\",iType);\n jsonObject.put(\"pCount\",pCount);\n jsonObject.put(\"pType\",pType);\n jsonObject.put(\"nmPoints\",nmPoints);\n jsonObject.put(\"qScore\",qScore);\n jsonObject.put(\"dpID\",dpId);\n jsonObject.put(\"rdsID\",rdsID);\n jsonObject.put(\"rdsVer\",rdsVer);\n jsonObject.put(\"dc\",dc);\n jsonObject.put(\"mi\",mi);\n jsonObject.put(\"mc\",mc);\n jsonObject.put(\"ci\",ci);\n jsonObject.put(\"sessionKey\",SessionKey);\n jsonObject.put(\"hmac\",hmac);\n jsonObject.put(\"PidDatatype\",PidDatatype);\n jsonObject.put(\"Piddata\",Piddata);\n\n pidData_json = jsonObject.toString();\n new apiCall_BalanceEnquiry().execute();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "String toJSON();", "private String parseResultParagraph(String jsonString) {\n JSONArray obj = new JSONArray(jsonString);\n JSONArray obj2 = new JSONArray(obj.get(0).toString());\n JSONArray obj_final = new JSONArray(obj2.get(0).toString());\n return (String) (obj_final.get(0));\n }", "public String getJson();", "public Object @NonNull [] parse(String text) throws JsonProcessingException {\n JsonNode jsonNode = mapper.readTree(text);\n return jsonNodeToTuple(jsonNode);\n }", "public void convert() throws IOException {\n URL url = new URL(SERVICE + City + \",\" + Country + \"&\" + \"units=\" + Type + \"&\" + \"APPID=\" + ApiID);\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\n String line = reader.readLine();\n // Pobieranie JSON\n\n // Wyciąganie informacji z JSON\n //*****************************************************************\n //Temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"{\\\"temp\\\"\") + 8;\n int endIndex = line.indexOf(\",\\\"feels_like\\\"\");\n temperature = line.substring(startIndex, endIndex);\n // System.out.println(temperature);\n }\n //Min temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\",\\\"temp_min\\\"\") + 12;\n int endIndex = line.indexOf(\",\\\"temp_max\\\"\");\n temperatureMin = line.substring(startIndex, endIndex);\n // System.out.println(temperatureMin);\n }\n //Max temp\n if (!StringUtils.isBlank(line)) {\n int startIndex = line.indexOf(\"\\\"temp_max\\\":\") + 11;\n int endIndex = line.indexOf(\",\\\"pressure\\\"\");\n temperatureMax = line.substring(startIndex, endIndex);\n //System.out.println(temperatureMax);\n }//todo dodaj więcej informacji takich jak cisnienie i takie tam\n //*****************************************************************\n }", "public static Result<MessageType, JSONException> fromString(String str) {\r\n return Result.ofRuntime(() -> valueOf(str))\r\n .mapError(ignored -> new JSONException(\"command not recognised\"));\r\n }", "public Producto[] parseResponse(String jsonAsString){\r\n\r\n //manually parsing to productos\r\n JsonParser parser = new JsonParser();\r\n JsonObject rootObject = parser.parse(jsonAsString).getAsJsonObject();\r\n JsonElement projectElement = rootObject.get(\"productos\");\r\n\r\n Producto [] productos = null;\r\n\r\n if(projectElement != null){\r\n\r\n QuantityDictionay.debugLog(\"LOS PRODUCTOS--->\"+projectElement.toString());\r\n\r\n //Use Gson to map response\r\n Gson gson = new Gson();\r\n //set type of response\r\n Type collectionType = new TypeToken<Producto[]>(){}.getType();\r\n //get java objects from json string\r\n productos = gson.fromJson(projectElement.toString(),collectionType);\r\n\r\n QuantityDictionay.debugLog(\"PARSING SIZE---->\"+productos.length);\r\n\r\n }\r\n\r\n\r\n return productos;\r\n\r\n }", "public static JSONArray string2JSONArray(String source) {\n\t\tif (null == source) {\n\t\t\treturn null;\n\t\t}\n\t\tJSONArray jsonArray = JSON.parseArray(source);\n\t\tfor (Object o : jsonArray) {\n\t\t\tlogger.debug(o);\n\t\t}\n\t\tlogger.debug(jsonArray);\n\t\treturn jsonArray;\n\t}", "<T> T toJsonPOJO(String jsonString, Class<T> classType);", "public String convert2json(String dpid, DataSetInfo ds){\n String out = \"{\\n\";\n out += \"\\\"dpid\\\" : \\\"\" + dpid + \"\\\",\\n\";\n out += \"\\\"lags\\\" : \\\"\" + ds.getLags() + \"\\\",\\n\";\n out += \"\\\"derivative\\\" : \\\"\" + ds.getDerivative() + \"\\\",\\n\";\n out += \"\\\"classSize\\\" : \\\"\" + ds.getClassSize() + \"\\\"\\n\";\n out += \"}\\n\";\n return out;\n }", "private static Object parseStringToObject(String text, Class ObjectType) {\n if (ObjectType == Integer.class) return Integer.parseInt(text);\n else if (ObjectType == Float.class) return Float.parseFloat(text);\n else if (ObjectType == Double.class) return Double.parseDouble(text);\n return null;\n }", "@Override\n public void parse(String json) {\n JSONObject object = new JSONObject(json);\n id = object.getInt(\"dataset id\");\n name = object.getString(\"dataset name\");\n maxNumOfLabels = object.getInt(\"maximum number of labels per instance\");\n\n JSONArray labelsJSON = object.getJSONArray(\"class labels\");\n labels = new ArrayList<>();\n for (int i = 0; i < labelsJSON.length(); i++) {\n labels.add(new Label(labelsJSON.getJSONObject(i).toString()));\n }\n\n JSONArray instancesJSON = object.getJSONArray(\"instances\");\n instances = new ArrayList<>();\n for (int i = 0; i < instancesJSON.length(); i++) {\n instances.add(new Instance(instancesJSON.getJSONObject(i).toString()));\n }\n }", "protected Object parseValue (String value)\n throws Exception\n {\n return value;\n }", "public static String dataToJson(Object data) {\n try {\n ObjectMapper mapper = new ObjectMapper();\n //for pretty printing JSON\n mapper.enable(SerializationFeature.INDENT_OUTPUT);\n ObjectWriter writer = mapper.writer(new DefaultPrettyPrinter());\n return mapper.writeValueAsString(data);\n } catch (IOException e){\n \tSystem.out.println(\"Error\");\n return createError(\"404\",\"Jackson: Error converting object into json format\");\n }\n }", "public Object convertPayload(final String payload) {\n JsonValueBuilder b = SpinValues.jsonValue(payload);\n ;\n final JsonValue jsonValue = b.create();\n return jsonValue;\n }", "protected String[] arrayParser(String item){\n return item.replaceAll(\"\\\\{|\\\\}|\\\\[|\\\\]|(\\\\d+\\\":)|\\\"|\\\\\\\\\", \"\").split(\",\");\n }", "@Test(timeout = 4000)\n public void test11() throws Throwable {\n Byte byte0 = new Byte((byte)39);\n Byte.toUnsignedLong((byte)44);\n String[] stringArray0 = new String[3];\n stringArray0[0] = \"] is not a JSONArray.\";\n stringArray0[1] = \"*bpp)j7=\";\n stringArray0[2] = \"B7?dng\";\n JSONObject jSONObject0 = new JSONObject(byte0, stringArray0);\n jSONObject0.put(\"] is not a JSONArray.\", (double) (byte)39);\n jSONObject0.toString((int) (byte)39);\n jSONObject0.optString(\"a2H;Fk;R703/.\", \"] is not a JSONArray.\");\n jSONObject0.opt(\"{\\\"java.lang.String@0000000002\\\": java.lang.Double@0000000003}\");\n jSONObject0.optLong(\"ik\");\n jSONObject0.toString((int) (byte)39);\n byte byte1 = (byte)97;\n Byte.compare((byte)97, (byte) (-119));\n jSONObject0.isNull(\"(_&\");\n JSONObject.numberToString(byte0);\n JSONObject.quote(\"\");\n JSONObject.doubleToString((byte) (-119));\n Short short0 = new Short((byte)39);\n jSONObject0.putOpt(\"\\\"$c.1O[-X9i\", short0);\n JSONTokener jSONTokener0 = new JSONTokener(\"'m P|=\");\n JSONArray jSONArray0 = null;\n try {\n jSONArray0 = new JSONArray(jSONTokener0);\n fail(\"Expecting exception: RuntimeException\");\n \n } catch(RuntimeException e) {\n //\n // A JSONArray text must start with '[' at character 1 of 'm P|=\n //\n verifyException(\"wheel.json.JSONTokener\", e);\n }\n }" ]
[ "0.69830793", "0.68203795", "0.6470702", "0.62998444", "0.6190998", "0.6114909", "0.60707086", "0.60490584", "0.5942266", "0.59362847", "0.5931497", "0.5911688", "0.58697903", "0.584177", "0.5823059", "0.58073896", "0.5793716", "0.57685834", "0.57538325", "0.57529736", "0.57504183", "0.5738744", "0.573016", "0.57245326", "0.57014906", "0.56774217", "0.5671371", "0.56489867", "0.5629742", "0.55397975", "0.553131", "0.55254066", "0.55202293", "0.550835", "0.55062807", "0.55033827", "0.5493976", "0.5487816", "0.54685813", "0.54642993", "0.54032093", "0.5390068", "0.53880984", "0.5380615", "0.5379862", "0.5378564", "0.5377643", "0.5366886", "0.53578585", "0.5354138", "0.5343661", "0.53267604", "0.5325038", "0.53232497", "0.5301863", "0.5278403", "0.52649665", "0.5255194", "0.5255194", "0.5255194", "0.5252202", "0.5251368", "0.5228217", "0.5225172", "0.5223949", "0.5222613", "0.5217739", "0.5216952", "0.5210651", "0.52061325", "0.52021444", "0.5200287", "0.5199267", "0.5199143", "0.5197774", "0.519564", "0.5190417", "0.51863915", "0.5183749", "0.5174215", "0.51675934", "0.5166853", "0.5164572", "0.51635855", "0.5156046", "0.51556987", "0.5140199", "0.5138985", "0.51365554", "0.5126033", "0.5116389", "0.511209", "0.5111524", "0.5106957", "0.51031524", "0.51016414", "0.51000434", "0.50974566", "0.50958616", "0.50884503", "0.5071782" ]
0.0
-1
/ renamed from: a
public final /* synthetic */ void mo16242a(Object obj) { C1948n.m1229a().f1421g.unsubscribe(C1744eg.this.f1003d); C1744eg.this.runAsync(new C1738eb() { /* renamed from: a */ public final void mo16236a() throws Exception { Map b = C1744eg.m890b(C1744eg.this.f1002b); C1691dd ddVar = new C1691dd(); ddVar.f897f = "https://api.login.yahoo.com/oauth2/device_session"; ddVar.f898g = C1699a.kPost; ddVar.mo16403a("Content-Type", "application/json"); ddVar.f883b = new JSONObject(b).toString(); ddVar.f885d = new C1725dt(); ddVar.f884c = new C1725dt(); ddVar.f882a = new C1693a<String, String>() { /* renamed from: a */ public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } } }; C1675ct.m738a().mo16389a(C1744eg.this, ddVar); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void mo16236a() throws Exception { Map b = C1744eg.m890b(C1744eg.this.f1002b); C1691dd ddVar = new C1691dd(); ddVar.f897f = "https://api.login.yahoo.com/oauth2/device_session"; ddVar.f898g = C1699a.kPost; ddVar.mo16403a("Content-Type", "application/json"); ddVar.f883b = new JSONObject(b).toString(); ddVar.f885d = new C1725dt(); ddVar.f884c = new C1725dt(); ddVar.f882a = new C1693a<String, String>() { /* renamed from: a */ public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } } }; C1675ct.m738a().mo16389a(C1744eg.this, ddVar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ access modifiers changed from: private / renamed from: b
public static void m891b(Context context, C1477a aVar) { Intent intent = new Intent("android.intent.action.VIEW", aVar.f311a); intent.setFlags(268435456); context.startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "@Override\n\tpublic void b() {\n\n\t}", "public void b() {\r\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b() {\n }", "public void b() {\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public void mo21825b() {\n }", "private stendhal() {\n\t}", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public void mo115190b() {\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public void mo23813b() {\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract Object mo1185b();", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public interface AbstractC5208b {\n\n /* renamed from: com.iflytek.voiceads.a.b$a */\n public static final class C5209a implements AbstractC5208b {\n\n /* renamed from: a */\n private final byte[] f22887a;\n\n /* renamed from: b */\n private int f22888b;\n\n C5209a(byte[] bArr) {\n this.f22887a = bArr;\n }\n\n @Override // com.iflytek.voiceads.p619a.AbstractC5208b\n /* renamed from: a */\n public void mo38565a(int i) {\n this.f22888b = i;\n }\n\n @Override // com.iflytek.voiceads.p619a.AbstractC5208b\n /* renamed from: a */\n public byte[] mo38566a() {\n return this.f22887a;\n }\n\n @Override // com.iflytek.voiceads.p619a.AbstractC5208b\n /* renamed from: b */\n public int mo38567b() {\n return this.f22888b;\n }\n }\n\n /* renamed from: a */\n void mo38565a(int i);\n\n /* renamed from: a */\n byte[] mo38566a();\n\n /* renamed from: b */\n int mo38567b();\n}", "@Override\n protected void prot() {\n }", "public abstract void mo6549b();", "public final void mo51373a() {\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "public abstract C0631bt mo9227aB();", "@Override\r\n\tpublic void a1() {\n\t\t\r\n\t}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public static void bi() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public int a()\r\n/* 64: */ {\r\n/* 65:70 */ return this.a;\r\n/* 66: */ }", "public void m23075a() {\n }", "public abstract void mo35054b();", "public int b()\r\n/* 45: */ {\r\n/* 46: 58 */ g();\r\n/* 47: */ \r\n/* 48: 60 */ return super.b();\r\n/* 49: */ }", "public final void mo1285b() {\n }", "private final zzgy zzgb() {\n }", "private BigB()\r\n{\tsuper();\t\r\n}", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract Object mo26777y();", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public void mo9137b() {\n }", "public boolean b()\r\n/* 709: */ {\r\n/* 710:702 */ return this.l;\r\n/* 711: */ }", "void mo2508a(bxb bxb);", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface b {\n}", "public interface b {\n}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "@Override\n\tpublic void b() {\n\t\tSystem.out.println(\"b method\");\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "public static final class <init> extends com.google.android.m4b.maps.ct.<init>\n implements b\n{\n\n private ()\n {\n super(com.google.android.m4b.maps.cy.a.d());\n }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "protected void b(dh paramdh) {}", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "@Override\r\n\tpublic void smthAbstr() {\n\t\t\r\n\t}", "void m1864a() {\r\n }", "public void mo38117a() {\n }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public void method_4270() {}", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void aaa() {\n\t\t\n\t}", "public void a() {\r\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "public void b() {\n ((a) this.a).b();\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "public void mo5251b() {\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public abstract B zzjo();", "public abstract int b();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public abstract void mo45765b();", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public abstract String mo118046b();", "public abstract void mo70702a(C30989b c30989b);", "private void m50366E() {\n }", "private abstract void privateabstract();", "void mo57277b();", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "protected void h() {}" ]
[ "0.7224839", "0.69518054", "0.68448514", "0.68045336", "0.6729634", "0.66892576", "0.6667949", "0.6666382", "0.66440094", "0.6614186", "0.66016066", "0.66016066", "0.6589728", "0.6487956", "0.6466085", "0.6466085", "0.645071", "0.6444203", "0.6424545", "0.64207315", "0.64160943", "0.6414322", "0.6328003", "0.6327414", "0.62732816", "0.62140226", "0.6206746", "0.6153523", "0.6149558", "0.6139187", "0.61167544", "0.6105347", "0.6098345", "0.6094454", "0.60885423", "0.6087932", "0.6078157", "0.60696363", "0.6069193", "0.6055342", "0.60527724", "0.6038868", "0.60326576", "0.60306174", "0.60212743", "0.60198337", "0.60137844", "0.6011094", "0.6009061", "0.5992609", "0.5988389", "0.598014", "0.59780216", "0.5971663", "0.5965223", "0.59651285", "0.5964735", "0.59584355", "0.5957915", "0.5955441", "0.5953412", "0.5953412", "0.59503615", "0.59496933", "0.59433514", "0.5942441", "0.59363157", "0.5933126", "0.5931375", "0.5928882", "0.59262604", "0.59236795", "0.5919878", "0.5916655", "0.5908729", "0.5906255", "0.5903017", "0.58993715", "0.58946365", "0.5894542", "0.58909625", "0.5885613", "0.5872216", "0.5871274", "0.58612293", "0.58611935", "0.5858143", "0.5847258", "0.5845622", "0.5845622", "0.5841156", "0.5832988", "0.58289605", "0.58240587", "0.58197", "0.5807641", "0.5805498", "0.5797393", "0.5796352", "0.57937944", "0.5790913" ]
0.0
-1
/ renamed from: a
public static void m886a(Request request) { C1744eg egVar = f1001a; egVar.f1002b = request; egVar.runAsync(new C1738eb() { /* renamed from: a */ public final void mo16236a() throws Exception { if (C1948n.m1229a().f1421g.mo16247c()) { C1744eg.this.runAsync(new C1738eb() { /* renamed from: a */ public final void mo16236a() throws Exception { Map b = C1744eg.m890b(C1744eg.this.f1002b); C1691dd ddVar = new C1691dd(); ddVar.f897f = "https://api.login.yahoo.com/oauth2/device_session"; ddVar.f898g = C1699a.kPost; ddVar.mo16403a("Content-Type", "application/json"); ddVar.f883b = new JSONObject(b).toString(); ddVar.f885d = new C1725dt(); ddVar.f884c = new C1725dt(); ddVar.f882a = new C1693a<String, String>() { /* renamed from: a */ public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } } }; C1675ct.m738a().mo16389a(C1744eg.this, ddVar); } }); return; } C1685cy.m754a(3, "PrivacyManager", "Waiting for ID provider."); C1948n.m1229a().f1421g.subscribe(C1744eg.this.f1003d); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void mo16236a() throws Exception { if (C1948n.m1229a().f1421g.mo16247c()) { C1744eg.this.runAsync(new C1738eb() { /* renamed from: a */ public final void mo16236a() throws Exception { Map b = C1744eg.m890b(C1744eg.this.f1002b); C1691dd ddVar = new C1691dd(); ddVar.f897f = "https://api.login.yahoo.com/oauth2/device_session"; ddVar.f898g = C1699a.kPost; ddVar.mo16403a("Content-Type", "application/json"); ddVar.f883b = new JSONObject(b).toString(); ddVar.f885d = new C1725dt(); ddVar.f884c = new C1725dt(); ddVar.f882a = new C1693a<String, String>() { /* renamed from: a */ public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } } }; C1675ct.m738a().mo16389a(C1744eg.this, ddVar); } }); return; } C1685cy.m754a(3, "PrivacyManager", "Waiting for ID provider."); C1948n.m1229a().f1421g.subscribe(C1744eg.this.f1003d); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void mo16236a() throws Exception { Map b = C1744eg.m890b(C1744eg.this.f1002b); C1691dd ddVar = new C1691dd(); ddVar.f897f = "https://api.login.yahoo.com/oauth2/device_session"; ddVar.f898g = C1699a.kPost; ddVar.mo16403a("Content-Type", "application/json"); ddVar.f883b = new JSONObject(b).toString(); ddVar.f885d = new C1725dt(); ddVar.f884c = new C1725dt(); ddVar.f882a = new C1693a<String, String>() { /* renamed from: a */ public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } } }; C1675ct.m738a().mo16389a(C1744eg.this, ddVar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final /* synthetic */ void mo16300a(C1691dd ddVar, Object obj) { String str = "PrivacyManager"; String str2 = (String) obj; try { int i = ddVar.f904m; if (i == 200) { JSONObject jSONObject = new JSONObject(str2); C1744eg.m888a(C1744eg.this, new C1477a(jSONObject.getString("device_session_id"), jSONObject.getLong("expires_in"), C1744eg.this.f1002b)); C1744eg.this.f1002b.callback.success(); return; } C1685cy.m769e(str, "Error in getting privacy dashboard url. Error code = ".concat(String.valueOf(i))); C1744eg.this.f1002b.callback.failure(); } catch (JSONException e) { C1685cy.m763b(str, "Error in getting privacy dashboard url. ", (Throwable) e); C1744eg.this.f1002b.callback.failure(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: b
static /* synthetic */ Map m890b(Request request) { HashMap hashMap = new HashMap(); hashMap.put("device_verifier", request.verifier); HashMap hashMap2 = new HashMap(); C1543ak a = C1948n.m1229a().f1421g.mo16243a(); String str = (String) a.mo16260a().get(C1544al.AndroidAdvertisingId); if (str != null) { hashMap2.put("gpaid", str); } String str2 = (String) a.mo16260a().get(C1544al.DeviceId); if (str2 != null) { hashMap2.put("andid", str2); } hashMap.putAll(hashMap2); HashMap hashMap3 = new HashMap(); byte[] bytes = ((String) C1948n.m1229a().f1421g.mo16243a().mo16260a().get(C1544al.AndroidInstallationId)).getBytes(); if (bytes != null) { hashMap3.put("flurry_guid", C1734dz.m868a(bytes)); } hashMap3.put("flurry_project_api_key", C1948n.m1229a().f1422h.f444a); hashMap.putAll(hashMap3); Context context = request.context; HashMap hashMap4 = new HashMap(); hashMap4.put("src", "flurryandroidsdk"); hashMap4.put("srcv", "12.3.0"); hashMap4.put("appsrc", context.getPackageName()); C1601bl.m537a(); hashMap4.put("appsrcv", C1601bl.m538a(context)); hashMap.putAll(hashMap4); return hashMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: a
static /* synthetic */ void m888a(C1744eg egVar, final C1477a aVar) { Context a = C1576b.m502a(); if (C1740ed.m881a(a)) { C1740ed.m880a(a, new Builder().setShowTitle(true).build(), Uri.parse(aVar.f311a.toString()), new C1741a() { /* renamed from: a */ public final void mo16453a(Context context) { C1744eg.m891b(context, aVar); } }); } else { m891b(a, aVar); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public final void mo16453a(Context context) { C1744eg.m891b(context, aVar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
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(); //noinspection SimplifiableIfStatement if (id == android.R.id.home) { // finish the activity onBackPressed(); 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 // 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 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 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 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\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\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.7904163", "0.7805678", "0.7766155", "0.77271765", "0.7631901", "0.76217514", "0.75843245", "0.7530648", "0.74879694", "0.74575084", "0.74575084", "0.7438342", "0.742121", "0.7402876", "0.7391506", "0.7386729", "0.7379215", "0.73702943", "0.7361895", "0.7355702", "0.7345358", "0.7341575", "0.7329735", "0.7328178", "0.7325559", "0.731858", "0.7316479", "0.7313328", "0.7303971", "0.7303971", "0.7301762", "0.72979945", "0.72931767", "0.7286697", "0.72830683", "0.7280712", "0.727849", "0.72597504", "0.7259679", "0.7259679", "0.7259679", "0.72593844", "0.7249859", "0.72235924", "0.7219315", "0.72173464", "0.7204549", "0.7199998", "0.7199193", "0.71932447", "0.7185174", "0.71770936", "0.71685654", "0.71678275", "0.7153802", "0.7153724", "0.7135714", "0.71352243", "0.71352243", "0.71292186", "0.7128784", "0.7124442", "0.712348", "0.712319", "0.7122235", "0.71173996", "0.71168983", "0.71168983", "0.71168983", "0.71168983", "0.7116834", "0.7116512", "0.7115111", "0.71124107", "0.71099734", "0.7109092", "0.7105732", "0.7099278", "0.70981765", "0.7094616", "0.70939064", "0.70939064", "0.7086415", "0.708213", "0.70807576", "0.7080365", "0.707349", "0.7068445", "0.7061929", "0.70604044", "0.70603245", "0.70515686", "0.70372933", "0.70372933", "0.7036149", "0.7035617", "0.7035617", "0.70319855", "0.70304316", "0.7029743", "0.7019147" ]
0.0
-1
Gets the user selection.
public Object getSelection() { return selection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String selection() {\n return inputter.selection();\n }", "Object getSelection();", "public String getMySelection() {\n return mySelection;\n }", "public int getSelection() {\n \tcheckWidget();\n \treturn selection;\n }", "private int getMenuSelection() {\n return view.printMenuAndGetSelection();\n }", "public int displayMenuAndGetUserSelection(){\n view.promptInt(\"1. Create a Character\");\n view.promptInt(\"2. Update a Character\");\n view.promptInt(\"3. Display all Characters\");\n view.promptInt(\"4. Search for a Character\");\n view.promptInt(\"5. Delete a Character\");\n view.promptInt(\"6. Exit\");\n return view.promptInt(\"Select from one of the above choices\");\n }", "@Override\n\tpublic Object getSelection() {\n\t\tObject value = null;\n\t\tif (selectionNode instanceof Selectable) {\n\t\t\tvalue = ((Selectable) selectionNode).getSelection();\n\t\t}\n\t\treturn value;\n\t}", "private User getUser(MouseEvent e) {\n int index = locationToIndex(e.getPoint());\n Rectangle bounds = getCellBounds(index, index);\n if (bounds != null && bounds.contains(e.getPoint())) {\n setSelectedIndex(index);\n return getSelectedValue();\n }\n return null;\n }", "public String getSelected()\n\t{\n\t\treturn _current.ID;\n\t}", "public ch.ivyteam.ivy.security.IUser getSelectedUser()\n {\n return selectedUser;\n }", "public Selection getSelection() {\n return mSelection;\n }", "public Axiom getSelected() {\r\n\treturn view.getSelected();\r\n }", "public String getSelected ()\n {\n return ((GroupItem)gbox.getSelectedItem()).getSelected();\n }", "private String getSelectedString() {\n\t\treturn menuItem[selectedIndex];\r\n\t}", "public String getSelectedItem() {\n if (selectedPosition != -1) {\n Toast.makeText(activity, \"Selected Item : \" + list.get(selectedPosition), Toast.LENGTH_SHORT).show();\n return list.get(selectedPosition);\n }\n return \"\";\n }", "public Gnome getSelectedItem() {\n return selectedItem;\n }", "public String getSelected()\r\n {\r\n if (selectedIndex == -1)\r\n return null;\r\n \r\n return towerTypes[selectedIndex];\r\n }", "public String getSelection() {\n\t\tif (selection == null) {\n\t\t\treturn Floor.NO_FLOOR_IMAGE_SELECTION;\n\t\t} else {\n\t\t\treturn selection;\n\t\t}\n\t}", "public String getSelectedItem() {\n return (String) itsCombo.getSelectedItem();\n }", "public String getSelectedAnswer() {\n\t\tList<Integer> selected = getSelectedIndexes();\n\t\treturn this.value.get(selected.get(0));\n\t}", "@Override\r\n\tpublic ISelection getSelection() {\r\n\t\t//$TODO when could this even happen?\r\n\t\tif (getViewer() == null)\r\n\t\t\treturn StructuredSelection.EMPTY;\r\n\t\treturn getViewer().getSelection();\r\n\t}", "public ISelection getSelection(IClientContext context) throws Exception;", "public E getSelected() {\n ButtonModel selection = selectedModelRef.get();\n //noinspection UseOfSystemOutOrSystemErr\n final String actionCommand = selection.getActionCommand();\n //noinspection HardCodedStringLiteral,UseOfSystemOutOrSystemErr\n return Objects.requireNonNull(textMap.get(actionCommand));\n }", "public String getOptionSelection(){\r\n\t\treturn optionSelection;\r\n\t}", "@Override\r\n protected TreeItem getSelectedItem() {\r\n return getSelectionModel().getSelectedItem();\r\n }", "private PR1Model.Shape getSelection() { return selection.get(); }", "public Object getSelectedObject() {\n return (String) itsCombo.getSelectedItem();\n }", "public S getSelected()\n\t\t{\n\t\t\treturn newValue;\n\t\t}", "public CellSelection getSelectCell() {\n return selection;\n }", "public int getSelected() {\n \t\treturn selected;\n \t}", "String getSelection() {\n String topic = \"\";\n\n var br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Enter topic: \");\n try {\n topic = br.readLine();\n } catch (IOException e) {\n System.out.println(\"Error reading console.\");\n }\n return topic;\n }", "private String getChoice() {\n return searchChoiceBox.getValue();\n }", "public String getSelectedValue() {\r\n\t\treturn selectedValue;\r\n\t}", "public String getUser() {\n\n return (String) comboCreateBox.getSelectedItem();\n }", "public String getSelectedIdentifier () {\n if (SwingUtilities.isEventDispatchThread()) {\n return getSelectedIdentifier_();\n } else {\n final String[] si = new String[1];\n try {\n SwingUtilities.invokeAndWait(new Runnable() {\n public void run() {\n si[0] = getSelectedIdentifier_();\n }\n });\n } catch (InvocationTargetException ex) {\n ErrorManager.getDefault().notify(ex.getTargetException());\n } catch (InterruptedException ex) {\n // interrupted, ignored.\n }\n return si[0];\n }\n }", "public Item getSelectedItem() {\n return this.itemList.getSelectedValue();\n }", "public Ward getSelected() {\n\t\treturn table.getSelectionModel().getSelectedItem();\n\t}", "public T getSelection() {\n ButtonModel selected = buttonGroup.getSelection();\n if (selected == null) {\n return null;\n }\n T key = modelToKeyMap.get(selected);\n if (key == null) {\n throw new IllegalArgumentException(\"Key not found for selected radio button: \" + selected);\n }\n return (key != NULL ? key : null);\n }", "public String getSelectedProfile() {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\treturn sharedPreferences.getString(\"SELECTED_PROFILE\", null);\n\t}", "@Nullable\n public T getSelectedItem() {\n return SerDes.unmirror(getElement().getSelectedItem(), getItemClass());\n }", "public CTabItem getSelection() {\n checkWidget();\n CTabItem result = null;\n if( selectedIndex != -1 ) {\n result = ( CTabItem )itemHolder.getItem( selectedIndex );\n }\n return result;\n }", "public int getChoice()\n {\n super.setVisible(true);\n return this.choice;\n }", "public IStructuredSelection getSelection() {\n \t\treturn selection;\n \t}", "int[] getSelection();", "public native MenuItem getSelectedItem();", "public SelectorUser getUserSelector() {\n return userSelector;\n }", "public BrowseItem getSelectedItem()\r\n\t{\r\n\t\treturn this.selectedItem;\r\n\t}", "public int getSelectionIndex() {\n checkWidget();\n return OS.SendMessage(handle, OS.TCM_GETCURSEL, 0, 0);\n }", "public SelectionKey getSelectionKey(){\n return key;\n }", "public Item getSelectedItem() { return this.getSelectedSlot().getMappedItem(); }", "public String getSelection()\n\t{\n\t\tString hour = (String)cbHour.getSelectedItem();\n\t\tString minutes = (String)cbMinutes.getSelectedItem();\n\t\tString am_pm = (String)cb_Am_Pm.getSelectedItem();\n\t\t\n\t\treturn (hour+\":\"+minutes+\" \"+am_pm);\n\t\t\n\t}", "String usernameLabelSelected();", "public T getSelectedItem() {\n\t\tT selectedItem = null;\n\t\tint position = spinner.getSelectedItemPosition();\n\t\tif(position >= 0) {\n\t\t\tselectedItem = adapter.getItem(position);\n\t\t}\n\t\treturn selectedItem;\n\t}", "public boolean getSelection () {\r\n\tcheckWidget();\r\n\tif ((style & (SWT.CHECK | SWT.RADIO | SWT.TOGGLE)) == 0) return false;\r\n\treturn (OS.PtWidgetFlags (handle) & OS.Pt_SET) != 0;\r\n}", "public String getSelectedNumber() {\n\t\treturn uNumber;\n\t}", "String userChosen();", "public abstract int getSelectionStart();", "public String getSelected ()\n {\n ConfigTreeNode node = _tree.getSelectedNode();\n return (node == null)\n ? null\n : node.getName();\n }", "private static int getUserChoice() {\n System.out.println(\"Please choose your operation: \");\n return intScanner.nextInt();\n }", "public int getSelectionIndex () {\r\n\tcheckWidget();\r\n\tint [] args = {OS.Pt_ARG_PG_CURRENT_INDEX, 0, 0};\r\n\tOS.PtGetResources (handle, args.length / 3, args);\r\n\treturn args [1] == OS.Pt_PG_INVALID ? -1 : args [1];\r\n}", "@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic String[] getSelected() {\n\t\treturn null;\r\n\t}", "Coord getSelected() {\n if (selected == null) {\n return null;\n }\n return new Coord(selected.col, selected.row);\n }", "public AUndertaking getSelectedTask()\n {\n String errorMsg;\n Iterator<AUndertaking> taskIt = getSelectedTaskIterator();\n\n if (taskIt.hasNext()) {\n AUndertaking selectedTask = taskIt.next();\n\n if (! taskIt.hasNext()) {\n return selectedTask;\n }\n\n errorMsg = \"Selection is multiple\";\n }\n else {\n errorMsg = \"Nothing is selected\";\n }\n\n throw new IllegalStateException(errorMsg);\n }", "public int getSelectionIndex() {\n checkWidget();\n return selectedIndex;\n }", "public boolean getSelected()\n {\n return selected; \n }", "public String Get_Option_User_Choice(String Op_Set_Name)\n {\n for(OptionSet i: opset) {\n if(Op_Set_Name.equalsIgnoreCase(i.getName()))\n return (i.User_Choice_Name()); \n } \n return null;\n }", "public Object getSelectedKey()\n\t{\n\t\tif ( m_results.size() == 0)\n\t\t\treturn null;\n\t\treturn m_results.get(0);\n\t}", "protected abstract Optional<T> getSingleSelection();", "public int getSelectedPosition() {\n return mLayoutManager.getSelection();\n }", "public CharSequence getSelectedLabel()\n\t{\n\t\treturn _current.label.getText();\n\t}", "public int getSelectedIndex() {\n return dialPosition;\n }", "public TreeItem getSelectedItem();", "public ImageFlowItem getSelectedValue()\r\n {\r\n if (getAvatars() == null || getAvatars().isEmpty() || getSelectedIndex() >= getAvatars().size() || getSelectedIndex() < 0)\r\n {\r\n return null;\r\n }\r\n\r\n return getAvatars().get(getSelectedIndex());\r\n }", "public boolean getSelectedValue() {\r\n\treturn this.selectedValue;\r\n }", "public int getSelectedItem() {\n return mSelectedItem;\n }", "public int getSelectedValue() {\n\t\treturn this.slider.getValue();\n\t}", "public String getSelectionFormula();", "public AppDescriptor getSelected()\n {\n DefaultMutableTreeNode nodeSelected = (DefaultMutableTreeNode) tree.getSelectionPath().getLastPathComponent();\n AppDescriptor appDesc = null;\n \n if( (nodeSelected != null) && (nodeSelected.getUserObject() instanceof AppDescriptor) )\n appDesc = (AppDescriptor) nodeSelected.getUserObject();\n \n return appDesc;\n }", "public String getSelectedId() {\n OptionEntry o=getSelectedOption();\n if (o!=null) {\n return o.getId();\n } else {\n return null;\n }\n\n }", "public int getSelectedId() {\n return selectedId;\n }", "public T getSelectedOption() {\n return selectedIndex == -1 ? null : options.get(selectedIndex);\n }", "public String selectName()\n {\n JOptionPane nameSelector = new JOptionPane();\n String name = nameSelector.showInputDialog(\"What is this trainer's name?\");\n return name;\n }", "public ItemT getSelectedItem() {\n return selectedItem;\n }", "private long getSelectedIndex() {\r\n if (selection != null && selection.getKeys().hasNext()) {\r\n return new Long((Integer) selection.getKeys().next());\r\n } else {\r\n return selectedRowId;\r\n }\r\n }", "protected ARXNode getSelectedNode() {\n return this.selectedNode;\n }", "public FBitSet getSelection() {\r\n\t\treturn selection;\r\n\t}", "public Cell getSelectedCell() {\n return selectedCell;\n }", "public int getSelectionX() {\n return selectionX;\n }", "public static int getUserChoice(){\r\n return Input.getInt(\"Enter 1 to add a song, 2 to display all songs, or 3 to quit the program: \");\r\n }", "public int getSelectionIndex() {\n\t\treturn list.getSelectionIndex();\n\t}", "public int getValue(){\n return selectedValue;\n }", "public SelectionKey getKey() {\n return this._key;\n }", "public String getValue() {\n return selectElement.getFirstSelectedOption().getText();\n }", "public R getSingleSelection()\r\n {\r\n final ListSelectionModel lsm = jTable.getSelectionModel();\r\n if( lsm.isSelectionEmpty() == false )\r\n {\r\n final int row = lsm.getLeadSelectionIndex(); // or use .getJTable().getSelectedRow() for single or lsm.isSelectedIndex() for multiple selection\r\n if( row != Util.INVALID_INDEX )\r\n {\r\n final int xlatedRow = jTable.convertRowIndexToModel( row ); // has to be done with auto-sorter\r\n return provideRow( xlatedRow );\r\n }\r\n }\r\n\r\n return null;\r\n }", "String searchBoxUserRecordSelected();", "public int getSelectionColor()\n\t{\n\t\treturn getObject().getSelectionColor();\n\t}", "protected SelectionText input() {\n return inputter;\n }", "public TabItem [] getSelection () {\r\n\tcheckWidget();\r\n\tint index = getSelectionIndex ();\r\n\tif (index == -1) return new TabItem [0];\r\n\treturn new TabItem [] {items [index]};\r\n}", "String getSelect();" ]
[ "0.7577155", "0.7547325", "0.75290555", "0.73267025", "0.72263676", "0.717246", "0.70799875", "0.7015617", "0.7007368", "0.6991571", "0.6960969", "0.6904642", "0.6891601", "0.688782", "0.685879", "0.6809064", "0.68031985", "0.67412657", "0.67332333", "0.6725825", "0.6723808", "0.6700175", "0.66673684", "0.66616625", "0.66042304", "0.65936625", "0.65817875", "0.65776664", "0.65709555", "0.6566992", "0.6564067", "0.65081304", "0.64827526", "0.6475097", "0.6472605", "0.64699364", "0.64353794", "0.6432554", "0.64255553", "0.6414888", "0.6364235", "0.63568276", "0.6345225", "0.6332265", "0.63014287", "0.6297827", "0.628735", "0.6277754", "0.62606066", "0.62586915", "0.6249263", "0.6246052", "0.6236108", "0.622952", "0.62199163", "0.6211436", "0.62088114", "0.6204675", "0.61989576", "0.61838377", "0.61606276", "0.61606276", "0.6142815", "0.61219645", "0.61070335", "0.60907865", "0.6090112", "0.60862225", "0.60821", "0.6078908", "0.60788953", "0.6056684", "0.605503", "0.6050584", "0.6045514", "0.6037798", "0.60324174", "0.60319567", "0.603173", "0.6020819", "0.6017601", "0.60151017", "0.60113233", "0.6009324", "0.60044855", "0.60000825", "0.59975016", "0.5988439", "0.59657145", "0.59592116", "0.59558654", "0.59527063", "0.5946323", "0.5942118", "0.5934751", "0.5927808", "0.59225065", "0.5922432", "0.5912453", "0.58948416" ]
0.7275104
4
Returns the number of days in the year
private static int getDaysInYear(final int year) { return LocalDate.ofYearDay(year, 1).lengthOfYear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int getDaysSinceNewYear() {\n\t\tGregorianCalendar now = new GregorianCalendar();\n\n\t\treturn now.get(GregorianCalendar.DAY_OF_YEAR);\n\t}", "public int lengthOfYear() {\n\n return this.isLeapYear() ? 366 : 365;\n\n }", "public int absoluteNumberOfDays() {\n\t\tint thisYear, priorYears;\n\t\t\n\t\tthisYear = (month - 1) * 31 + day;\n\t\t if (month > 2) {\n\t\t\t thisYear = thisYear - ((4*month+23) / 10);\n\t\t if ((((year % 4) == 0) && ((year % 100) != 0)) || ((year % 400) == 0))\n\t\t\t thisYear = thisYear + 1;\n\t\t }\n\t\t priorYears = 365*(year-1)+(year-1)/4-(year-1)/100+(year-1)/400;\n\t\t return thisYear + priorYears;\n\t}", "public int calcDays() {\n\t\tint days = day-1;\r\n\t\tdays += ((month-1)*30);\r\n\t\tdays += ((year -2000) * (12*30));\r\n\t\treturn days;\r\n\t}", "static int countLeapYears(DaysBetween d) \n {\n int years = d.y;\n \n // Check if the current year needs to be considered\n // for the count of leap years or not\n if (d.m <= 2) \n {\n years--;\n }\n \n // An year is a leap year if it is a multiple of 4,\n // multiple of 400 and not a multiple of 100.\n return years / 4 - years / 100 + years / 400;\n }", "public int getDayOfYear() {\n\n return this.get(DAY_OF_YEAR).intValue();\n\n }", "private int daysSince1900(){\n return this.day + this.month*daysInMonth(this.getMonth(), this.getYear()) +\n (this.year- 1900)*365 + NumberLeapyearsSince1900(this.getYear());\n }", "private int NumberLeapyearsSince1900 (int YearNumber) {\n int i = 1900;\n int countLeapyears = 0;\n for (i = 1900; i < YearNumber; i = i+4); {\n if (daysInYear(i) == 366) {\n countLeapyears ++;\n }\n } return countLeapyears;\n\n }", "public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }", "public int getDayOfYear(){\n\t\treturn dayOfYear;\n\t}", "public static int getTodaysYear() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.year;\t\r\n\t\t\r\n\t}", "int getNumberDays();", "public static int getNumberOfDays(Date first, Date second)\n {\n Calendar c = Calendar.getInstance();\n int result = 0;\n int compare = first.compareTo(second);\n if (compare > 0) return 0;\n if (compare == 0) return 1;\n\n c.setTime(first);\n int firstDay = c.get(Calendar.DAY_OF_YEAR);\n int firstYear = c.get(Calendar.YEAR);\n int firstDays = c.getActualMaximum(Calendar.DAY_OF_YEAR);\n\n c.setTime(second);\n int secondDay = c.get(Calendar.DAY_OF_YEAR);\n int secondYear = c.get(Calendar.YEAR);\n\n // if dates in the same year\n if (firstYear == secondYear)\n {\n result = secondDay-firstDay+1;\n }\n\n // different years\n else\n {\n // days from the first year\n result += firstDays - firstDay + 1;\n\n // add days from all years between the two dates years\n for (int i = firstYear+1; i< secondYear; i++)\n {\n c.set(i,0,0);\n result += c.getActualMaximum(Calendar.DAY_OF_YEAR);\n }\n\n // days from last year\n result += secondDay;\n }\n\n return result;\n }", "public int getTravelsInYear(String year) {\n EntityManager em = getEntityManager();\n Calendar initDate = Calendar.getInstance();\n initDate.set(Calendar.DAY_OF_MONTH, 31);\n initDate.set(Calendar.MONTH, 11);\n initDate.set(Calendar.YEAR, Integer.parseInt(year)-1);\n Calendar endDate = Calendar.getInstance();\n endDate.set(Calendar.DAY_OF_MONTH, 1);\n endDate.set(Calendar.MONTH, 0);\n endDate.set(Calendar.YEAR, Integer.parseInt(year)+1);\n return ((Number) em.createNamedQuery(\"Viaje.getYearTravels\")\n .setParameter(\"initDate\", initDate.getTime())\n .setParameter(\"endDate\", endDate.getTime()).getSingleResult()).intValue();\n }", "int getYears();", "public static int getNumberOfDays() {\n\t\treturn numberOfDays;\n\t}", "@Test\n public void nbDaysBetweenSameYear(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.nbDaysBetween(new Date(31,Month.december,1970)),364);\n }", "public int getNumberOfYears() {\n return numberOfYears;\n }", "int getYear();", "public static TemporalQuery<Integer> dayOfYear(){\n return (d) -> d.get(ChronoField.DAY_OF_YEAR);\n }", "public static int getTotalNumberOfDays(int year, int month) { \n int total=0;\n for(int q = 1800; q < year; q++){\n if(isLeapYear(q)){\n total = total + 366; //leap year\n }\n else{\n total = total + 365;//not leap year or regular year\n } \n }\n for(int q = 1; q <= month - 1; q++){\n total = total + getNumberOfDaysInMonth(year, q);\n }\n return total;//returns the total \n }", "@Test\n\tpublic void testNumberOfDays() {\n\t\tint thirtyExpected = 30;\n\t\tint thirtyResult = Main.numberOfDays(9, 2015);\n\t\tassertTrue(thirtyExpected == thirtyResult);\n\n\t\t// Test regular 31 day month\n\t\tint thirtyOneExpected = 31;\n\t\tint thirtyOneResult = Main.numberOfDays(1, 2016);\n\t\tassertTrue(thirtyOneExpected == thirtyOneResult);\n\n\t\t// Test 'Feb 2016' - regular leap year\n\t\tint regularLeapExpected = 29;\n\t\tint regularLeapResult = Main.numberOfDays(2, 2016);\n\t\tassertTrue(regularLeapExpected == regularLeapResult);\n\n\t\t// Test 'February 2300' - century but not a leap year\n\t\tint notCenturyLeapExpected = 28;\n\t\tint notCenturyLeapResult = Main.numberOfDays(2, 2300);\n\t\tassertTrue(notCenturyLeapExpected == notCenturyLeapResult);\n\n\t\t// Test 'February 2400' - century and a leap year\n\t\tint centuryLeapExpected = 29;\n\t\tint centuryLeapResult = Main.numberOfDays(2, 2400);\n\t\tassertTrue(centuryLeapExpected == centuryLeapResult);\n\n\t}", "public int getDaysSinceStartOfEpoch() {\r\n long millis = new GregorianCalendar(year, month - 1, day).getTimeInMillis();\r\n return (int) (millis / MILLIS_PER_DAY);\r\n\r\n }", "public static long getDayNumber() {\n return getSecondsSinceEpoch() / SECS_TO_DAYS;\n }", "Integer getTenYear();", "public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}", "public java.lang.Integer getNoOfDays () {\n\t\treturn noOfDays;\n\t}", "public static int diasParaFecha(Date fechafin) {\n try {\n System.out.println(\"Fecha = \" + fechafin + \" / \");\n GregorianCalendar fin = new GregorianCalendar();\n fin.setTime(fechafin);\n System.out.println(\"fin=\" + CalendarToString(fin, \"dd/MM/yyyy\"));\n GregorianCalendar hoy = new GregorianCalendar();\n System.out.println(\"hoy=\" + CalendarToString(hoy, \"dd/MM/yyyy\"));\n\n if (fin.get(Calendar.YEAR) == hoy.get(Calendar.YEAR)) {\n System.out.println(\"Valor de Resta simple: \"\n + String.valueOf(fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR)));\n return fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR);\n } else {\n int diasAnyo = hoy.isLeapYear(hoy.get(Calendar.YEAR)) ? 366\n : 365;\n int rangoAnyos = fin.get(Calendar.YEAR)\n - hoy.get(Calendar.YEAR);\n int rango = (rangoAnyos * diasAnyo)\n + (fin.get(Calendar.DAY_OF_YEAR) - hoy\n .get(Calendar.DAY_OF_YEAR));\n System.out.println(\"dias restantes: \" + rango);\n return rango;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }", "private static final int getYear(long fixedDate) {\n\tlong d0;\n\tint d1, d2, d3;\n\tint n400, n100, n4, n1;\n\tint year;\n\n\tif (fixedDate >= 0) {\n\t d0 = fixedDate - 1;\n\t n400 = (int)(d0 / 146097);\n\t d1 = (int)(d0 % 146097);\n\t n100 = d1 / 36524;\n\t d2 = d1 % 36524;\n\t n4 = d2 / 1461;\n\t d3 = d2 % 1461;\n\t n1 = d3 / 365;\n\t} else {\n\t d0 = fixedDate - 1;\n\t n400 = (int)floorDivide(d0, 146097L);\n\t d1 = (int)mod(d0, 146097L);\n\t n100 = floorDivide(d1, 36524);\n\t d2 = mod(d1, 36524);\n\t n4 = floorDivide(d2, 1461);\n\t d3 = mod(d2, 1461);\n\t n1 = floorDivide(d3, 365);\n\t}\n\tyear = 400 * n400 + 100 * n100 + 4 * n4 + n1;\n\tif (!(n100 == 4 || n1 == 4)) {\n\t ++year;\n\t}\n\treturn year;\n }", "public int getNumberOfDaysInTheMonth() {\n YearMonth yearMonthObject = YearMonth.of(year, month);\n return yearMonthObject.lengthOfMonth();\n }", "public int getNumberOfDays() {\n return numberOfDays;\n }", "public int getNumDays() {\n\t\treturn numDays;\n\t}", "public int getDaysInMonth()\r\n\t{\r\n\t\tif (this.year % 4 == 0)\r\n\t\t\treturn Date.leapMonthDays[this.month - 1];\r\n\t\telse\r\n\t\t\treturn monthDays[this.month - 1];\r\n\t}", "public static int getDifferenceDateOnlyYear(Long val) {\n\n Long date_current = Calendar.getInstance().getTimeInMillis();\n Long years_difference = date_current - val;\n\n Calendar c = Calendar.getInstance();\n c.setTimeInMillis(years_difference);\n return c.get(Calendar.YEAR) - 1970;\n\n }", "public int getYear() {\n\n return this.cyear;\n\n }", "public int yearsSinceDebut(int debutYear)\n {\n int year = Calendar.getInstance().get(Calendar.YEAR);\n return year - debutYear;\n }", "double getAgeDays();", "public int getCalendarYear() {\r\n\t\treturn calendar.getCalendarYear();\r\n\t}", "public int getAgeInDays (Date today) {\n int daysSince1900tillToday = today.day + today.month*daysInMonth(today.month, today.year) +\n (today.year - 1900)*365 + NumberLeapyearsSince1900(today.year);\n return daysSince1900tillToday - daysSince1900();\n }", "public int getYear() {\n return DateUtil.YearFromString(rel);\n }", "Integer getTHunYear();", "public int getDocumentYear();", "public int getYear() {\r\n\t\treturn (this.year);\r\n\t}", "public int getYearFounded() {\n\t\treturn yearFounded;\n\t}", "protected static final int date2doy \n (boolean isLeapYear, int month, int day, int number_of_deleted_days)\n {\n return (date2doy (isLeapYear, month, day) - number_of_deleted_days);\n }", "public int getYear() {\r\n return FormatUtils.uint16ToInt(mYear);\r\n }", "public int getYear() \n\t{\n\t\treturn m_calendar.get(Calendar.YEAR);\n\n\t}", "public int getCycleYearsForComponent(Record record);", "public int getNumberOfDays()\n\t{\n\t\treturn m_calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t}", "public int getYear(){\r\n\t\treturn year;\r\n\t}", "public int getYear() {\r\n\t\treturn year;\r\n\t}", "public int getYear() \n\t{\n\t\treturn year;\n\t}", "public int getYear(){\n\t\treturn year; \n\t}", "public int getNumberOfDaysOfAMonth(int month, int year) {\n YearMonth yearMonthObject = YearMonth.of(year, month);\n return yearMonthObject.lengthOfMonth();\n }", "public int getTotalYearToDate() {\n\n LocalDate endOfPeriod = this.getCancelDate();\n if (null == endOfPeriod) {\n endOfPeriod = LocalDate.now();\n }\n\n Period periodBetween = Period.between(this.getPeriodStartDate(), endOfPeriod);\n if (periodBetween.isNegative()) {\n return 0;\n }\n int monthsBetween = (int)periodBetween.toTotalMonths();\n\n /*Round any additional days into an entire month*/\n if (periodBetween.getDays() > 0) {\n monthsBetween++;\n }\n\n return monthsBetween * this.getMonthlyAmount();\n\n }", "public int getYear(){\n\t\treturn year;\n\t}", "public int getYear() {\n return year;\n }", "public int getNumberOfDays(int the_month) {\n Boolean leapYear = isLeapYear(this.year);\n int num_of_days;\n // If February\n if (the_month == 2) {\n if (leapYear) {\n num_of_days = 29;\n }\n else {\n num_of_days = 28;\n }\n }\n // If April, June, September, or November\n else if (the_month == 4 || the_month == 6 || month == 9 || month == 11) {\n num_of_days = 30;\n }\n\n // If any other month\n else {\n num_of_days = 31;\n }\n\n return num_of_days;\n }", "public int getNumDaysForComponent(Record record);", "public int getYear() {\n\t\treturn year; \n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public int getYear() {\n\t\treturn year;\n\t}", "public static int getYearsBirthDay(final Date date) {\n final Calendar cal = GregorianCalendar.getInstance();\n cal.setTime(date);\n\n final Calendar calAtual = Calendar.getInstance();\n int idade = calAtual.get(Calendar.YEAR) - cal.get(Calendar.YEAR);\n\n if ((calAtual.get(Calendar.MONTH) + 1) < (cal.get(Calendar.MONTH) + 1)) {\n idade--;\n } else {\n if ((calAtual.get(Calendar.MONTH) + 1) == (cal.get(Calendar.MONTH) + 1)\n && (calAtual.get(Calendar.DAY_OF_MONTH) < cal.get(Calendar.DAY_OF_MONTH))) {\n idade--;\n }\n }\n if (idade < 0) {\n idade = 0;\n }\n\n return idade;\n }", "public int getYear() {\n\t return year;\n\t}", "private static int numMonths(int year) {\n \tint mnths = 1;\n \t\n \tif(year > 0) {\n \t\tmnths = year * 12;\n \t}\n \t\n \treturn mnths;\n }", "public int getYear() {\r\n return year;\r\n }", "public int getYears() {\r\n\t\treturn years;\r\n\t}", "public int getYear()\n {\n return yr;\n }", "public int days() {\n if (isInfinite()) {\n return 0;\n }\n Period p = new Period(asInterval(), PeriodType.days());\n return p.getDays();\n }", "public int getYear() {\r\n return year;\r\n }", "public int getYear() {\n return endDate.getYear();\n }", "public int calc_century() // defining method calc_century\r\n\t{\r\n\t\tif(year %100 == 0) // implement in the condition of year%100 =0\r\n\t\t\tyear = year / 100; // divide year by 100 and put its value to year\r\n\t\telse // implement except for the condition of year%100 =0\r\n\t\t{\r\n\t\t\tyear = (year/100) +1; // divide year by 100 and add 1 then put its value to year\r\n\t\t}\r\n\t\treturn year; // return value of year\r\n\t}", "public int getLengthDays() {\r\n\t\treturn diffDays(imageList.get(0).cal, getLast().cal);\r\n\t}", "public int getYear() {\n\treturn year;\n }", "private int getDays() {\n\t\tlong arrival = arrivalDate.toEpochDay();\n\t\tlong departure = departureDate.toEpochDay();\n\t\tint days = (int) Math.abs(arrival - departure);\n\n\t\treturn days;\n\t}", "public Integer getYear() {\r\n return year;\r\n }", "public Integer getYear() {\r\n return year;\r\n }", "@TruffleBoundary\n public static int yearFromDays(int daysAfter1970) {\n int daysAfter2000 = daysAfter1970 - DAYS_FROM_1970_TO_2000;\n // days after year (2000 - yearShift)\n int days = daysAfter2000 + DAY_SHIFT;\n // we need days > 0 to ensure that integer division rounds correctly\n assert days > 0;\n\n int year = 400 * (days / DAYS_IN_400_YEARS);\n int remainingDays = days % DAYS_IN_400_YEARS;\n remainingDays--;\n year += 100 * (remainingDays / DAYS_IN_100_YEARS);\n remainingDays %= DAYS_IN_100_YEARS;\n remainingDays++;\n year += 4 * (remainingDays / DAYS_IN_4_YEARS);\n remainingDays %= DAYS_IN_4_YEARS;\n remainingDays--;\n year += remainingDays / 365;\n\n return year - YEAR_SHIFT + 2000;\n }", "public Integer getEdad() {\n Calendar fechaNac_ = Calendar.getInstance();\n fechaNac_.setTime(fechaNac);\n try {\n return Math.abs(Calendar.getInstance().get(Calendar.YEAR) - fechaNac_.get(Calendar.YEAR));\n } catch (ArithmeticException e) {\n return -1;\n }\n }", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public Integer getYear() {\n return year;\n }", "public int getYear() {\n return year;\n }", "public int getEdad() {\n\t\treturn (new Date()).getYear()- fechanac.getYear();\n\t}", "public int getStartingYear()\n {\n return 2013;\n }", "public final int getISOYear()\n {\n\n final int W = getISOWeekNumber();\n\n if ((W > 50) && (getMonth() == 1)) {\n return (getYear() - 1);\n }\n else if ((W < 10) && (getMonth() == 12)) {\n return (getYear() + 1);\n }\n else {\n return getYear();\n }\n }", "public int getNumberOfYears() {\r\n return yearLabels.length;\r\n }", "public int getHolidayDaysCountForWorkerAndYear(Worker wWorker, int year)\n {\n int holiday = 0;\n try\n {\n Query queryDeleteByDSId = getNamedQuery(Holiday.NQ_FIND_HOLIDAY_BY_WORKER_AND_YEAR);\n // set Worker\n queryDeleteByDSId.setParameter(Holiday.PARAMETER_WORKER, wWorker);\n // set Month\n queryDeleteByDSId.setParameter(Holiday.PARAMETER_YEAR, year);\n // execute and return result\n Object objResult = queryDeleteByDSId.getSingleResult();\n if (objResult != null)\n {\n holiday = (int) objResult;\n }\n\n }\n catch (Exception e)\n {\n Log.error(this, e, \"namedQuery getHolidayDaysCountForWorkerAndYear error\");\n }\n\n return holiday;\n }", "public static int getYears(Date fechaNacimiento) {\n\n\t\tCalendar fechaActual = Calendar.getInstance();\n\t\tint hoyDia = fechaActual.get(Calendar.DAY_OF_YEAR);\n\n\t\tCalendar nacimiento = Calendar.getInstance();\n\n\t\tnacimiento.setTime(fechaNacimiento);\n\t\tint nacimientoDia = nacimiento.get(Calendar.DAY_OF_YEAR);\n\n\t\t// Todavía no ha cumplido los años\n\t\tif (nacimientoDia - hoyDia < 0)\n\t\t\treturn fechaActual.get(Calendar.YEAR)\n\t\t\t\t\t- nacimiento.get(Calendar.YEAR) - 1;\n\t\telse\n\t\t\t// Ya ha cumplido los años\n\t\t\treturn fechaActual.get(Calendar.YEAR)\n\t\t\t\t\t- nacimiento.get(Calendar.YEAR);\n\n\t}", "public int getShiftYear() {\n return start.getYear();\n }", "public int getYear() {\n\t\treturn this.year;\n\t}", "public int getYear() {\n return year;\n }", "private int calculateAge() {\n\t\treturn LocalDate.now().getYear() - this.birthYear;\n\t}", "public double getPer_day(){\n\t\tdouble amount=this.num_of_commits/365;\n\t\treturn amount;\n\t}", "public static int getYearByDate(Date val) {\n\t\tif (val != null) {\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy\");\n\t\t\treturn parseInt(format.format(val));\n\t\t} else {\n\n\t\t\treturn 0;\n\n\t\t}\n\t}", "public double getYear() {\n return year;\n }", "public final int getDDD()\n {\n return(ordinal == NULL_ORDINAL) ? 0 : (ordinal - jan01OfYear(yyyy) + 1);\n }", "public int getYears() {\n return this.years;\n }" ]
[ "0.80261225", "0.74245965", "0.72997874", "0.72007537", "0.7083857", "0.70828694", "0.69454026", "0.69217193", "0.69182", "0.6909421", "0.6894262", "0.6882045", "0.6796799", "0.67583543", "0.67087156", "0.66571677", "0.6621036", "0.66028756", "0.65878433", "0.65794045", "0.6577726", "0.65430725", "0.6526821", "0.64702344", "0.6464954", "0.6454261", "0.6454261", "0.64452684", "0.64449126", "0.64247847", "0.64092517", "0.6407804", "0.6396203", "0.637488", "0.6368687", "0.636867", "0.6362068", "0.63615113", "0.6359315", "0.63548064", "0.63410705", "0.6324147", "0.63197166", "0.630707", "0.629049", "0.62805986", "0.628056", "0.6269626", "0.6268336", "0.6261241", "0.626024", "0.6252085", "0.62503356", "0.62372994", "0.62364393", "0.6233923", "0.62334466", "0.62329555", "0.62277174", "0.6226886", "0.6220529", "0.62191296", "0.62191296", "0.62191296", "0.6216136", "0.62160677", "0.62133026", "0.62105465", "0.6206695", "0.62037027", "0.61976796", "0.6196342", "0.6192534", "0.61922693", "0.619188", "0.61907095", "0.6187618", "0.61862993", "0.61862993", "0.6180475", "0.61768115", "0.61759907", "0.61759907", "0.61759907", "0.6169902", "0.6169708", "0.61626905", "0.61593175", "0.61510944", "0.6132467", "0.612918", "0.61268324", "0.6123862", "0.6113534", "0.61096835", "0.61069894", "0.6105951", "0.6104468", "0.61039966", "0.6101837" ]
0.8272475
0
Generates an array of dates starting on the first day of every month in the specified year
public static LocalDate[] getFirstDayMonthly(final int year) { LocalDate[] list = new LocalDate[12]; for (int i = 1; i <= 12; i++) { list[i - 1] = getFirstDayOfTheMonth(i, year); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date getStartDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\n\t\treturn c.getTime();\n\t}", "private static LocalDate getFirstDayOfTheMonth(final int month, final int year) {\n return LocalDate.of(year, month, 1);\n }", "public SerialDate getDate(final int year) {\n SerialDate result;\n if (this.count != SerialDate.LAST_WEEK_IN_MONTH) {\n // start at the beginning of the month\n result = SerialDate.createInstance(1, this.month, year);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(1, result);\n }\n result = SerialDate.addDays(7 * (this.count - 1), result);\n\n }\n else {\n // start at the end of the month and work backwards...\n result = SerialDate.createInstance(1, this.month, year);\n result = result.getEndOfCurrentMonth(result);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(-1, result);\n }\n\n }\n return result;\n }", "public static LocalDate[] getFirstDayWeekly(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n LocalDate localDate = LocalDate.ofYearDay(year, 1).with(TemporalAdjusters.previousOrSame(DayOfWeek.SUNDAY));\n\n final LocalDate testDate = LocalDate.ofYearDay(year, 1);\n if (testDate.getDayOfWeek() == DayOfWeek.THURSDAY) {\n dates.add(testDate.minusDays(4));\n }\n\n for (int i = 0; i <= 53; i++) {\n if (localDate.getYear() == year) {\n dates.add(localDate);\n }\n\n localDate = localDate.plusWeeks(1);\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public static LocalDate[] getAllDays(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n for (int i = 1; i <= getDaysInYear(year); i++) {\n dates.add(LocalDate.ofYearDay(year, i));\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public static LocalDate[] getFirstDayQuarterly(final int year) {\n LocalDate[] bounds = new LocalDate[4];\n\n bounds[0] = LocalDate.of(year, Month.JANUARY, 1);\n bounds[1] = LocalDate.of(year, Month.APRIL, 1);\n bounds[2] = LocalDate.of(year, Month.JULY, 1);\n bounds[3] = LocalDate.of(year, Month.OCTOBER, 1);\n\n return bounds;\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}", "public Date next() {\n if (isValid(month, day + 1, year)) return new Date(month, day + 1, year);\n else if (isValid(month + 1, 1, year)) return new Date(month, 1, year);\n else return new Date(1, 1, year + 1);\n }", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "public static LocalDate getFirstOfNextMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfNextMonth());\n\t}", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "public static Date[] getLastYearDateRange(String timeZone) {\n\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH, -1);\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n final Date endDateTime = calendar.getTime();\n\n calendar = Calendar.getInstance();\n calendar.add(Calendar.YEAR, -1);\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n final Date startDateTime = calendar.getTime();\n\n return new Date[]{DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone), DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone)};\n }", "public static int[][] inputTempYear() {\r\n\t\tint[][] temp = new int[ROWS][COLUMNS];\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\tinputTempMonth(temp, i);\r\n\t\t}\r\n\t\treturn temp;\r\n\t}", "public static Date createDate(int year, int month, int date) {\n\n LocalDate localDate = LocalDate.of(year, month, date);\n ZoneId zoneId = ZoneId.systemDefault();\n Date result = Date.from(localDate.atStartOfDay(zoneId).toInstant());\n return result;\n }", "public Calendar startOfMonth() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH), 1);\r\n\t\treturn c2;\r\n\t}", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "private static Date getYearDate(int year) {\n Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.set(Calendar.YEAR, year);\n return calendar.getTime();\n }", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public static final String[] getDayMonthYear(Date aDate, boolean isAddSpace) {\r\n String[] dmys = new String[3];\r\n if (aDate != null) {\r\n Calendar cal=Calendar.getInstance();\r\n cal.setTime(aDate);\r\n int day = cal.get(Calendar.DAY_OF_MONTH);\r\n if (day<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = \"0 \" + day;\r\n \t } else {\r\n \t\t dmys[0] = \"0\" + day;\r\n \t }\r\n } else {\r\n \t String tmp = day + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[0] = tmp;\r\n \t }\r\n }\r\n int month = cal.get(Calendar.MONTH) + 1;\r\n if (month<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = \"0 \" + month;\r\n \t } else {\r\n \t\t dmys[1] = \"0\" + month;\r\n \t }\r\n } else {\r\n \t String tmp = month + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[1] = tmp;\r\n \t }\r\n }\r\n String year = cal.get(Calendar.YEAR) + \"\";\r\n if (isAddSpace) {\r\n \t dmys[2] = year.substring(0, 1) + \" \" + year.substring(1, 2) + \" \" + year.substring(2, 3) + \" \" + year.substring(3, 4);\r\n } else {\r\n \t dmys[2] = year;\r\n }\r\n }\r\n return dmys;\r\n }", "public static List<LocalDate> getFirstDayOfTheMonths(final LocalDate startDate, final LocalDate endDate) {\n final ArrayList<LocalDate> list = new ArrayList<>();\n\n final LocalDate end = DateUtils.getFirstDayOfTheMonth(endDate);\n LocalDate t = DateUtils.getFirstDayOfTheMonth(startDate);\n\n /*\n * add a month at a time to the previous date until all of the months\n * have been captured\n */\n while (before(t, end)) {\n list.add(t);\n t = t.with(TemporalAdjusters.firstDayOfNextMonth());\n }\n return list;\n }", "public ArrayList<String> createDate(String quarter, String year) {\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tString startDate = \"\";\r\n\t\tString endDate = \"\";\r\n\t\tif (quarter.equals(\"January - March\")) {\r\n\t\t\tstartDate = year + \"-01-01\";\r\n\t\t\tendDate = year + \"-03-31\";\r\n\t\t} else if (quarter.equals(\"April - June\")) {\r\n\t\t\tstartDate = year + \"-04-01\";\r\n\t\t\tendDate = year + \"-06-30\";\r\n\t\t} else if (quarter.equals(\"July - September\")) {\r\n\t\t\tstartDate = year + \"-07-01\";\r\n\t\t\tendDate = year + \"-09-30\";\r\n\t\t} else {\r\n\t\t\tstartDate = year + \"-10-01\";\r\n\t\t\tendDate = year + \"-12-31\";\r\n\t\t}\r\n\t\tdate.add(startDate);\r\n\t\tdate.add(endDate);\r\n\t\treturn date;\r\n\t}", "public static WithAdjuster firstDayOfNextYear() {\n\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }", "public static Date firstDayMonth(){\n String rep_inicio_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n \n /*Obtenemos el primer dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n /*Lo almacenamos como string con el formato adecuado*/\n rep_inicio_de_mes = sdf.format(c.getTime());\n\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_inicio_de_mes);\n }", "private String[] getLast30Dates() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tString[] dates = new String[30];\n\t\tfor (int i=29; i>=0; i-- ) {\n\t\t\tdates[i] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t}\n\t\treturn dates;\n\t}", "public static native JsDate create(int year, int month) /*-{\n return new Date(year, month);\n }-*/;", "static DateTime GetFirstXWeekdayOfMonth(int iXDayOfWeek, int iYear,\n int iMonth) {\n DateTime dmFirstOfMonth = new DateMidnight(iYear, iMonth, 1)\n .toDateTime();\n int dayOfWeek = dmFirstOfMonth.getDayOfWeek();\n int daysToAdd = iXDayOfWeek - dayOfWeek;\n if (iXDayOfWeek < dayOfWeek) {\n daysToAdd += 7;\n }\n return dmFirstOfMonth.plusDays(daysToAdd);\n }", "public static WithAdjuster firstDayOfNextMonth() {\n\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }", "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n return Arrays.asList(indepDay, laborDay);\n }", "public Date212[] getNumbDates(int a){ //a is the number that signfies the dates passed in.\n // System.out.println(a+ \"a is\");\n Date212 myDates[] = new Date212[a]; //initalize it from the a.\n\n for(int d = 0; d< myTempDates.length; d++){ //that \"myTempDates\" array which holds the dates is used to copy it into the specified array.\n if(myTempDates[d] != null){ //if next index is not null then copy.\n myDates[d] = myTempDates[d];\n }\n }\n return myDates; //return the array to method calling it!\n }", "private Date createDate(final int year, final int month, final int dayOfMonth) {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.YEAR, year);\n cal.set(Calendar.MONTH, month);\n cal.set(Calendar.DAY_OF_MONTH, dayOfMonth);\n return cal.getTime();\n }", "public List<LocalDate> createLocalDates( final int size ) {\n\n\t\tfinal List<LocalDate> list = new ArrayList<>(size);\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tlist.add(LocalDate.ofEpochDay(i));\n\t\t}\n\n\t\treturn list;\n\t}", "public void nextDay() {\r\n int daysMax = daysInMonth();\r\n \r\n if (day == daysMax && month == 12) { // If end of the year, set date to Jan 1\r\n setDate(1, 1);\r\n } else if (day == daysMax) { // If last day of month, set to first day of next month\r\n setDate(month + 1, 1);\r\n } else { // Otherwise, simply increment this day\r\n day++;\r\n }\r\n }", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}", "private static Calendar createCalendar(int year, int month, int date) {\r\n\t\tCalendar calendar = Calendar.getInstance();\r\n\t\tcalendar.setLenient(false);\r\n\t\tcalendar.set(Calendar.YEAR, year);\r\n\t\tcalendar.set(Calendar.MONTH, month - 1);\r\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, date);\r\n\t\tcalendar.set(Calendar.MINUTE, 0);\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\treturn calendar;\r\n\t}", "public static void main(String[] args) {\n MutableDateTime dateTime = new MutableDateTime();\n System.out.println(\"Current date = \" + dateTime);\n\n // Find the first day of the next month can be done by:\n // 1. Add 1 month to the date\n // 2. Set the day of the month to 1\n // 3. Set the millis of day to 0.\n dateTime.addMonths(1);\n dateTime.setDayOfMonth(1);\n dateTime.setMillisOfDay(0);\n System.out.println(\"First day of next month = \" + dateTime);\n }", "public static Date createDate(int yyyy, int month, int day, int hour, int min) {\n/* 93 */ CALENDAR.clear();\n/* 94 */ CALENDAR.set(yyyy, month - 1, day, hour, min);\n/* 95 */ return CALENDAR.getTime();\n/* */ }", "public static int getStartDay(int year, int month)\n {\n int startday = 3;//add 3 to the variable start\n int totalamountofdays = getTotalNumberOfDays(year,month);//call the method getTotalNumberOfDays and store it in a variable called start\n return(totalamountofdays + startday) % 7;//return start % 7 \n }", "private List<MonthlyRecord> getMonthly(int year, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.ofYearDay(year, 1);\n\t\tLocalDate to = LocalDate.ofYearDay(year, from.lengthOfYear());\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT month(Date) as Month, sum(Amount) from transaction\\n\" + \n\t\t\t\t\"WHERE Date between ? and ?\\n\" + \n\t\t\t\t\"and type = ?\\n\" + \n\t\t\t\t\"group by Month\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<MonthlyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tlist.add(new MonthlyRecord(resultSet.getDouble(2), Month.of(resultSet.getInt(1))));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "@WebMethod public ArrayList<LocalDate> getEventsMonth(LocalDate date);", "public static Date getYearStartDateByDate(Date idate) {\n\t\t int iyear = Utilities.getYearByDate(idate);\n\t\t \n\t\t Calendar c = Calendar.getInstance();\n\t\t c.set(iyear, 0, 1);\n\n\t\t return c.getTime(); \n\t}", "private int[] getMonthDayYearIndexes(String pattern) {\n int[] result = new int[3];\n\n final String filteredPattern = pattern.replaceAll(\"'.*?'\", \"\");\n\n final int dayIndex = filteredPattern.indexOf('d');\n final int monthMIndex = filteredPattern.indexOf(\"M\");\n final int monthIndex = (monthMIndex != -1) ? monthMIndex : filteredPattern.indexOf(\"L\");\n final int yearIndex = filteredPattern.indexOf(\"y\");\n\n if (yearIndex < monthIndex) {\n result[YEAR_INDEX] = 0;\n\n if (monthIndex < dayIndex) {\n result[MONTH_INDEX] = 1;\n result[DAY_INDEX] = 2;\n } else {\n result[MONTH_INDEX] = 2;\n result[DAY_INDEX] = 1;\n }\n } else {\n result[YEAR_INDEX] = 2;\n\n if (monthIndex < dayIndex) {\n result[MONTH_INDEX] = 0;\n result[DAY_INDEX] = 1;\n } else {\n result[MONTH_INDEX] = 1;\n result[DAY_INDEX] = 0;\n }\n }\n return result;\n }", "public static void main(String[] args) {\n\t\tMonthDay month=MonthDay.now();\n\t\tLocalDate d=month.atYear(2015);\n\t\tSystem.out.println(d);\n\t\tMonthDay m=MonthDay.parse(\"--02-29\");\n\t\tboolean b=m.isValidYear(2019);\n\t\tSystem.out.println(b);\n\t\tlong n= month.get(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(\"month of the year is:\"+n);\n\t\tValueRange r1=month.range(ChronoField.MONTH_OF_YEAR);\n\t\tSystem.out.println(r1);\n\t\tValueRange r2=month.range(ChronoField.DAY_OF_MONTH);\n\t\tSystem.out.println(r2);\n\n\t}", "protected static final int jan01OfYear(int yyyy)\n {\n int leapAdjustment;\n if ( yyyy < 0 )\n {\n // years -1 -5 -9 were leap years.\n // adjustment -1->1 -2->1 -3->1 -4->1 -5->2 -6->2\n leapAdjustment = (3 - yyyy) / 4;\n return(yyyy * 365) - leapAdjustment + BC_epochAdjustment;\n }\n\n // years 4 8 12 were leap years\n // adjustment 1->0 2->0, 3->0, 4->0, 5->1, 6->1, 7->1, 8->1, 9->2\n leapAdjustment = (yyyy - 1) / 4;\n\n int missingDayAdjust = (yyyy > GC_firstYYYY) ? missingDays : 0;\n\n // mod 100 and mod 400 rules started in 1600 for Gregorian,\n // but 1800/2000 in the British scheme\n if ( yyyy > Leap100RuleYYYY )\n {\n leapAdjustment -= (yyyy-Leap100RuleYYYY+99) / 100;\n }\n if ( yyyy > Leap400RuleYYYY )\n {\n leapAdjustment += (yyyy-Leap400RuleYYYY+399) / 400;\n }\n\n return yyyy * 365\n + leapAdjustment\n - missingDayAdjust\n + AD_epochAdjustment;\n }", "public static Date getFirstDate(Date date ) throws ParseException{ \n\t\tString format = \"yyyyMM\";\n\t\tdate = formatStrtoDate( format(date, format) + \"01\", format + \"dd\");\n\t\treturn date;\n\t}", "private void initYear() {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(i));\n }\n }", "public String[] getYearVals() {\n if (yearVals == null) {\n yearVals = new String[numYearVals];\n int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);\n //curYear = String.valueOf(year);\n\n for (int i = 0; i < numYearVals; i++) {\n yearVals[i] = String.valueOf(year + i);\n }\n }\n\n return yearVals;\n }", "private void initYear(Integer year) {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(year, i));\n }\n }", "public static WithAdjuster firstDayOfMonth() {\n\n return Impl.FIRST_DAY_OF_MONTH;\n }", "@Test public void Day_1__month__year()\t\t\t\t\t\t\t{tst_date_(\"03-31-02\"\t\t\t\t, \"2002-03-31\");}", "public double[] getPriceStats(String year){\n for (int i = 0; i < priceMonthCounter.length; i++) priceMonthCounter[i]=0;\n \n for (TransferImpl movement : MovementsController.getInstanceOf().getMovements()) {\n \t// Convert the util.Date to LocalDate\n \tLocalDate date = movement.getLeavingDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\t\t// Filter movements by year\n \t// Filter movements by year\n\t if(date.getYear()==Integer.parseInt(year)){\n\t \tint month = date.getMonthValue() - 1; \n\t \n\t \tswitch (movement.getType().toLowerCase()) {\n\t \tcase \"return\":\n\t \t\tintMonthCounter[month]-=movement.getTotalPrice(); // Increment the month according to the number of movements\n\t \t\tbreak;\n\t \tcase \"sold\":\n\t \t\tintMonthCounter[month]+=movement.getTotalPrice(); // Increment the month according to the number of movements\n\t \t\tbreak;\n\t \t}\n\t }\n\t \n\t for(int i=0; i<priceMonthCounter.length;i++) \n\t \tpriceMonthCounter[i] = Double.parseDouble(this.convertPriceToString(intMonthCounter[i]));\n }\n \n return priceMonthCounter;\n\t}", "public Month(String name, int year) {\n\t\tthis.name = name;\n\t\tthis.year = year;\n\t\tint offset = getOffset();\n\t\tdays = new Day[42];\n\t\tif (name.equals(\"February\")) {\n\t\t\tif (leap(year)) {\n\t\t\t\tfor (int i = offset; i < 29 + offset; i++) {\n\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\tnumDays = 29;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tfor (int i = offset; i < 28 + offset; i++) {\n\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\tnumDays = 28;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tswitch(name) {\n\t\t\t\tcase \"January\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"March\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"April\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"May\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"June\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"July\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"August\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"September\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"October\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"November\":\n\t\t\t\t\tfor (int i = offset; i < 30 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 30;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"December\":\n\t\t\t\t\tfor (int i = offset; i < 31 + offset; i++) {\n\t\t\t\t\t\tdays[i] = new Day(i % 7, i - offset, name);\n\t\t\t\t\t\tnumDays = 31;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n Random randy = new Random();\r\n for (int i = 0; i < 2019; i++) {\r\n printYear(i, randy.nextInt(7), false);\r\n }\r\n //printYear(2007, 5, false);\r\n }", "@Test public void Year_0__month__day()\t\t\t\t\t\t\t{tst_date_(\"2001-03-31\"\t\t\t\t, \"2001-03-31\");}", "public static ArrayList<LocalDate> getPhDates() {\r\n \tArrayList<Date> phDates = phRepo.findAllPublicHolidayDates();\r\n \tArrayList<LocalDate> phLocalDates = new ArrayList<LocalDate>();\r\n \t\r\n\t\tfor(Date phDate : phDates) {\r\n\t\t\tphLocalDates.add(phDate.toLocalDate());\r\n\t\t}\r\n\t\t\r\n\t\treturn phLocalDates;\r\n }", "private static void printCalendarMonthYear(int month, int year, ArrayList<Integer> eventDates) {\n\t\t// create a new GregorianCalendar object\n\t\tCalendar cal = new GregorianCalendar();\n\t\tint currDate = cal.get(Calendar.DATE);\n\t\t// set its date to the first day of the month/year given by user\n\t\tcal.clear();\n\t\tcal.set(year, month - 1, 1);\n\n\t\t// print calendar header\n\t\tSystem.out.println(\" \" + cal.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.US) + \" \"\n\t\t\t\t+ cal.get(Calendar.YEAR));\n\n\t\t// obtain the weekday of the first day of month.\n\t\tint firstWeekdayOfMonth = cal.get(Calendar.DAY_OF_WEEK);\n\n\t\t// obtain the number of days in month.\n\t\tint numberOfMonthDays = cal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\t// print anonymous calendar month based on the weekday of the first\n\t\t// day of the month and the number of days in month:\n\t\tprintCalendar(numberOfMonthDays, firstWeekdayOfMonth, eventDates);\n\t}", "private ArrayList<ArrayList<String>> getMonthEvents(ArrayList<Event> yearList)\n throws PacException {\n\n ArrayList<ArrayList<String>> monthList = initializeMonthList();\n for (Event event : yearList) {\n int month = event.getMonth();\n String description = getEventDescription(event);\n switch (month) {\n case 1:\n case 7:\n monthList.get(0).add(description);\n break;\n case 2:\n case 8:\n monthList.get(1).add(description);\n break;\n case 3:\n case 9:\n monthList.get(2).add(description);\n break;\n case 4:\n case 10:\n monthList.get(3).add(description);\n break;\n case 5:\n case 11:\n monthList.get(4).add(description);\n break;\n case 6:\n case 12:\n monthList.get(5).add(description);\n break;\n default:\n throw new PacException(MONTH_NOT_FOUND_ERROR_MESSAGE);\n }\n }\n return monthList;\n }", "private Calendar getEasterDate(final int year) {\n\n double g = year % 19;\n\n int c = year / 100;\n int c4 = c / 4;\n int e = (8 * c + 13) / 25;\n\n int h = (int) (19 * g + c - c4 - e + 15) % 30;\n int k = h / 28;\n int p = 29 / (h + 1);\n int q = (int) (21 - g) / 11;\n int i = (k * p * q - 1) * k + h;\n int b = year / 4 + year;\n int j1 = b + i + 2 + c4 - c;\n int j2 = j1 % 7;\n int r = 28 + i - j2;\n\n int monthNumber = 4;\n int dayNumber = r - 31;\n boolean negativeDayNumber = dayNumber <= 0;\n\n if (negativeDayNumber) {\n monthNumber = 3;\n dayNumber = r;\n }\n\n Calendar paques = Calendar.getInstance();\n paques.set(year, monthNumber - 1, dayNumber);\n return paques;\n }", "public static LocalDate getFirstDayOfTheMonth(final LocalDate date) {\n return date.with(TemporalAdjusters.firstDayOfMonth());\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tint []month_Days={31,28 ,31,30,31,30,31,31,30,31,30,31};\r\n\t\t\r\n\t\t System.out.println(\"enter the year month date\");\r\n\t\t Scanner scan=new Scanner(System.in);\r\n\t\t int year=scan.nextInt();\r\n\t\t int month1=scan.nextInt();\r\n\t\t int date1=scan.nextInt();\r\n\t\t \r\n\t\t int new_year=year%400;\r\n\t\t int odd_days=(new_year/100)*5;\r\n\t\t new_year=(new_year-1)%100;\r\n\t\t int normal_year=new_year-new_year/4;\r\n\t\t odd_days=odd_days+(new_year/4)*2+normal_year;\r\n\t\t odd_days=odd_days%7;\r\n\t\t \r\n\t\t \r\n\t\t int sum_of_days=0;\r\n\t\t for(int i=0;i<(month1-1);i++){\r\n\t\t \tsum_of_days=sum_of_days+month_Days[i];\r\n\t\t }\r\n\t\t if(year%4==0&&year%100!=0||year%400==0&&month1>2){\r\n\t\t \tsum_of_days=sum_of_days+1;\r\n\t\t }\r\n\t\t sum_of_days=sum_of_days+date1;\r\n\t\t odd_days=(odd_days+sum_of_days%7)%7;\r\n\t\t String day=\"\";\r\n\t\t switch(odd_days){\r\n\t\t case 0:\r\n\t\t\t day=\"Sunday\";\r\n\t\t\t break;\r\n\t\t case 1:\r\n\t\t\t day=\"Monday\";\r\n\t\t\t break;\r\n\t\t case 2:\r\n\t\t\t day=\"Tuesday\";\r\n\t\t\t break;\r\n\t\t\t \r\n\t\t case 3:\r\n\t\t\t day=\"WednesDay\";\r\n\t\t\t break;\r\n\t\t case 4:\r\n\t\t\t day=\"Thursday\";\r\n\t\t\t break;\r\n\t\t case 5:\r\n\t\t\t day=\"Friday\";\r\n\t\t\t break;\r\n\t\t case 6:\r\n\t\t\t day=\"Saturday\";\r\n\t\t\t break;\r\n\t\t \r\n\t\t }\r\n\t\t System.out.println(day);\r\n\t}", "public void sortBasedYearService();", "public int getLastMonthOfYear (int year)\n {\n return 12;\n }", "private void fillYearFields() {\n\n\t\tfor (int i = 1990; i <= 2100; i++) {\n\t\t\tyearFieldDf.addItem(i);\n\t\t\tyearFieldDt.addItem(i);\n\t\t}\n\t}", "public ArrayList<String> getYYYYMMList(String dateFrom, String dateTo) throws Exception {\n\n ArrayList<String> yyyyMMList = new ArrayList<String>();\n try {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(dateFrom.split(\"-\")[0]), Integer.parseInt(dateFrom.split(\"-\")[1]) - 1, Integer.parseInt(dateFrom.split(\"-\")[2]));\n\n String yyyyTo = dateTo.split(\"-\")[0];\n String mmTo = Integer.parseInt(dateTo.split(\"-\")[1]) + \"\";\n if (mmTo.length() < 2) {\n mmTo = \"0\" + mmTo;\n }\n String yyyymmTo = yyyyTo + mmTo;\n\n while (true) {\n String yyyy = calendar.get(Calendar.YEAR) + \"\";\n String mm = (calendar.get(Calendar.MONTH) + 1) + \"\";\n if (mm.length() < 2) {\n mm = \"0\" + mm;\n }\n yyyyMMList.add(yyyy + mm);\n\n if ((yyyy + mm).trim().toUpperCase().equalsIgnoreCase(yyyymmTo)) {\n break;\n }\n calendar.add(Calendar.MONTH, 1);\n }\n return yyyyMMList;\n } catch (Exception e) {\n throw new Exception(\"getYYYYMMList : dateFrom(yyyy-mm-dd)=\" + dateFrom + \" : dateTo(yyyy-mm-dd)\" + dateTo + \" : \" + e.toString());\n }\n }", "private List<DailyRecord> getDaily(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"select date, sum(Amount) from transaction where date between ? and ? and type=? group by date\" )) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<DailyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tLocalDate resultDate = resultSet.getDate(1).toLocalDate();\n\t\t\t\t\tint day = resultDate.getDayOfMonth();\n\t\t\t\t\tDayOfWeek weekDay = resultDate.getDayOfWeek();\n\t\t\t\t\tdouble amount = resultSet.getDouble(2);\t\t\t\t\t\n\t\t\t\t\tlist.add(new DailyRecord(amount, day, weekDay));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "static ArrayList arrayDate(String day, String dayNo, String month, String year){\n ArrayList<String> arraySplit = new ArrayList<>();\n\n arraySplit.add(day.replace(\",\",\"\"));//Monday\n arraySplit.add(dayNo.replace(\",\",\"\"));//23\n arraySplit.add(month.replace(\",\",\"\"));//March\n arraySplit.add(year.replace(\",\",\"\"));//2015\n return arraySplit;\n }", "public static native JsDate create(int year, int month, int dayOfMonth) /*-{\n return new Date(year, month, dayOfMonth);\n }-*/;", "public void populateCalendar(YearMonth yearMonth) {\n LocalDate calendarDate = LocalDate.of(yearMonth.getYear(), yearMonth.getMonthValue(), 1);\n // Dial back the day until it is SUNDAY (unless the month starts on a sunday)\n while (!calendarDate.getDayOfWeek().toString().equals(\"MONDAY\")) {\n calendarDate = calendarDate.minusDays(1);\n }\n // Populate the calendar with day numbers\n for (AnchorPaneNode ap : allCalendarDays) {\n if (ap.getChildren().size() != 0) {\n ap.getChildren().remove(0);\n }\n LocalDate date = calendarDate;\n Text dayText = new Text(String.valueOf(date.getDayOfMonth()));\n ap.setDate(calendarDate);\n AnchorPane.setTopAnchor(dayText, 5.0);\n AnchorPane.setLeftAnchor(dayText, 5.0);\n ap.getChildren().add(dayText);\n MyNotes myNotes = Main.getRepository().getByDate(date);\n if (myNotes.getCountNotes() > 0) {\n Text notes = new Text(String.valueOf(myNotes.getCountNotes()));\n notes.setFill(Color.GREEN);\n AnchorPane.setTopAnchor(notes, 35.0);\n AnchorPane.setLeftAnchor(notes, 35.0);\n ap.getChildren().add(notes);\n }\n calendarDate = calendarDate.plusDays(1);\n }\n // Change the title of the calendar\n calendarTitle.setText(\" \" + Transcription.getMonth(yearMonth) + \" \" + yearMonth.getYear() + \" \");\n }", "List<Appointment> getAppointmentOfNMonth(int month);", "public void inputTempForYear() {\n\t\t\n\t\tfor (int i=0; i<12; i++)\n\t\t\tinputTempForMonth(i);\n\t}", "public EventsCalendarYear() {\n initYear();\n }", "public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }", "public List<Integer> getByYearDay() {\n\t\treturn byYearDay;\n\t}", "public void setNextYear()\n\t{\n\t\tm_calendar.set(Calendar.YEAR,getYear()+1);\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\n\t}", "private static void printCalendarMonthYear(int month, int year) {\n\t\t// create a new GregorianCalendar object\n\t\tCalendar cal = new GregorianCalendar();\n\t\tint currDate = cal.get(Calendar.DATE);\n\t\t// set its date to the first day of the month/year given by user\n\t\tcal.clear();\n\t\tcal.set(year, month - 1, 1);\n\n\t\t// print calendar header\n\t\tSystem.out.println(\" \" + cal.getDisplayName(Calendar.MONTH, Calendar.LONG, Locale.US) + \" \"\n\t\t\t\t+ cal.get(Calendar.YEAR));\n\n\t\t// obtain the weekday of the first day of month.\n\t\tint firstWeekdayOfMonth = cal.get(Calendar.DAY_OF_WEEK);\n\n\t\t// obtain the number of days in month.\n\t\tint numberOfMonthDays = cal.getActualMaximum(Calendar.DAY_OF_MONTH);\n\n\t\t// print anonymous calendar month based on the weekday of the first\n\t\t// day of the month and the number of days in month:\n\t\tprintCalendar(numberOfMonthDays, firstWeekdayOfMonth, currDate);\n\t}", "public static Date getEndDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\t\tc.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n\n\t\treturn c.getTime();\n\t}", "@Override\r\n\tpublic List<GetSalesOrderByYear> getSalesOrdersByYear(int year) {\n\t\tList<Object[]> list=null;\r\n\t\tList<GetSalesOrderByYear> byYears=null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlist=boardDao.getSalesOrdersByYear(year);\r\n\t\t\tbyYears=new ArrayList<GetSalesOrderByYear>();\r\n\t\t\tIterator<Object[]> iterator=list.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tGetSalesOrderByYear salesOrderByYear=new GetSalesOrderByYear();\r\n\t\t\t\tsalesOrderByYear.setMaterial((String)objects[0]);\r\n\t\t\t\tsalesOrderByYear.setMatpct(Float.valueOf((String)objects[1]));\r\n\t\t\t\tbyYears.add(salesOrderByYear);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn byYears;\r\n\t}", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "public static void main(String[] args) {\n//\t\tOutput:\n//\t\tIt is year 2011\n//\t\tIt is year 2012\n//\t\tIt is year 2013\n//\t\tIt is year 2014\n//\t\tIt is year 2015\n//\t\tIt is year 2016\n//\t\tIt is year 2017\n//\t\tIt is year 2018\n\n\t\tfor(int i=2011;i<2019;i++) {\n\t\t\tSystem.out.println(\"It is year \" +i);\n\t\t}\n\t}", "private boolean isJanuaryFirst(final Calendar date) {\n return JANUARY_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.JANUARY == date.get(Calendar.MONTH);\n }", "public List<String> getMonthsList(){\n Calendar now = Calendar.getInstance();\n int year = now.get(Calendar.YEAR);\n\n String months[] = {\"JANUARY\", \"FEBRUARY\", \"MARCH\", \"APRIL\",\n \"MAY\", \"JUNE\", \"JULY\", \"AUGUST\", \"SEPTEMBER\",\n \"OCTOBER\", \"NOVEMBER\", \"DECEMBER\"};\n\n List<String> mList = new ArrayList<>();\n\n //3 months of previous year to view the attendances\n for(int i=9; i<months.length; i++){\n mList.add(months[i]+\" \"+(year-1));\n }\n\n //Months of Current Year\n for(int i=0; i<=(now.get(Calendar.MONTH)); i++){\n mList.add(months[i]+\" \"+year);\n }\n\n return mList;\n }", "public static LocalDate tryParseDateFromRange(List<String> datesWithoutYear, int dateIdx) {\n if (dateIdx >= datesWithoutYear.size() || dateIdx < 0) {\n throw new IllegalStateException(\"dateIdx is out of bounds or the list is empty\");\n }\n\n LocalDate today = LocalDate.now();\n int currentYear = today.getYear();\n\n String firstDateString = datesWithoutYear.get(FIRST_IDX);\n LocalDate currentDate = parseDayMonthStringWithYear(firstDateString, currentYear);\n if (currentDate.isBefore(today) && currentDate.getMonth() == Month.JANUARY) {\n currentDate = currentDate.plusYears(1);\n currentYear++;\n }\n\n for (int idx = 1; idx <= dateIdx; idx++) {\n String currDayMonth = datesWithoutYear.get(idx);\n LocalDate tempDate = parseDayMonthStringWithYear(currDayMonth, currentYear);\n\n if (tempDate.isBefore(currentDate) || tempDate.isEqual(currentDate)) {\n tempDate = tempDate.plusYears(1);\n currentYear++;\n }\n\n currentDate = tempDate;\n }\n\n return currentDate;\n }", "Year createYear();", "public static void main(String[] args) throws Exception {\n\t\tSystem.out.println(getMonthList(\"20161102\", \"20161101\"));\r\n//\t\tSystem.out.println(getMonthList(\"20161001\", \"20161101\"));\r\n//\t\tSystem.out.println(getDateList(\"20161001\", \"20161101\"));\r\n\t}", "@Override\n public Date generate() {\n int year = 2000 + Rng.instance().nextInt(20);\n int date = Rng.instance().nextInt(28) + 1;\n int month = Rng.instance().nextInt(10) + 1;\n\n Calendar calendar = Calendar.getInstance();\n calendar.set(year, month, date);\n\n return calendar.getTime();\n }", "public static final Calendar getCalendar(int date, int month, int year) {\r\n\t\tCalendar cal = Calendar.getInstance(); // locale-specific\r\n\t\t// cal.setTime(dateObject);\r\n\t\tcal.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcal.set(Calendar.MINUTE, 0);\r\n\t\tcal.set(Calendar.SECOND, 0);\r\n\t\tcal.set(Calendar.MILLISECOND, 0);\r\n\r\n\t\tcal.set(Calendar.DATE, date);\r\n\t\tcal.set(Calendar.MONTH, month);\r\n\t\tcal.set(Calendar.YEAR, year);\r\n\t\treturn cal;\r\n\t}", "public List<String> getMonthList() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"Month_Of_a_Year\");\n\t}", "public ArrayList<Event> getCalendarEventsByMonth()\n {\n ArrayList<Event> monthListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)))\n {\n monthListOfEvents.add(events.get(i));\n }\n }\n return monthListOfEvents;\n }", "public Date(String month, int year) {\n\t\t\tthis.weekday = 0;\n\t\t\tthis.day = 0;\n\t\t\tthis.month = notEmpty(month);\n\t\t\tthis.year = zeroOrMore(year);\n\t\t}", "public String[] DateOrder(String DateOne,String DateTwo){\n int DateOneValue=Integer.parseInt(DateOne);\n int DateTwoValue=Integer.parseInt(DateTwo);\n\n if(DateOneValue<DateTwoValue){\n if(DateOneValue<10){\n DateOne=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"0\"+DateOneValue;}\n\n else{\n DateOne=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"\"+DateOneValue;\n }\n if(DateTwoValue<10){\n DateTwo=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"0\"+DateTwoValue;\n }\n\n else{\n DateTwo=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"\"+DateTwoValue;\n }\n String Dates[]={DateOne,DateTwo};\n return Dates;\n }\n\n else{\n int nextmonth=Integer.parseInt(CheckedDate.substring(4,6))+1;\n int year=Integer.parseInt(CheckedDate.substring(0,4));\n int k=1;\n if(nextmonth==13){\n year=year+1;\n nextmonth=1;\n\n }\n String month=\"\";\n String n=\"\";\n\n if(nextmonth<10){\n n=\"\"+\"0\"+nextmonth;\n }\n\n else{\n n=\"\"+nextmonth;\n }\n int prevmonth=nextmonth-1;\n\n if(prevmonth<10){\n month=\"0\"+prevmonth;\n }\n\n else{\n month=month+prevmonth;\n }\n\n\n if(DateOneValue<10){\n DateOne=CheckedDate.substring(0,4)+month+\"0\"+DateOneValue;}\n\n else{\n DateOne=CheckedDate.substring(0,4)+month+\"\"+DateOneValue;\n }\n if(DateTwoValue<10){\n DateTwo=\"\"+year+\"\"+n+\"0\"+DateTwoValue;\n }\n\n else{\n DateTwo=year+\"\"+n+\"\"+DateTwoValue;\n }\n\n String Dates[]={DateOne,DateTwo};\n return Dates;\n }\n\n }", "private List<Date> parseDateBeforeEpochYear(String source,\n List<Date> dateList) throws ParseException {\n final int INITIAL_INDEX = 0;\n final int EPOCH_START_YEAR = 1970;\n final int yearGroup = 1;\n final int monthGroup = 2;\n final int dayGroup = 3;\n\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"u/M/d\");\n String yyyymmddRegex = \"(\\\\d\\\\d\\\\d\\\\d)[/-](0?[1-9]|1[012])[/-](3[01]|[012]?[0-9])\";\n\n Pattern pattern = Pattern.compile(yyyymmddRegex);\n Matcher matcher = pattern.matcher(source);\n int dateIndex = INITIAL_INDEX;\n\n while (matcher.find()) {\n int year = Integer.parseInt(matcher.group(1));\n if (year >= EPOCH_START_YEAR) {\n continue;\n }\n\n Calendar calendar = convertDateToCalendar(dateList.get(dateIndex));\n\n LocalDate localDate = LocalDate.parse(\n matcher.group(yearGroup) + \"/\" + matcher.group(monthGroup)\n + \"/\" + matcher.group(dayGroup), formatter);\n LocalTime localTime = getLocalTime(calendar);\n LocalDateTime localDateTime = LocalDateTime\n .of(localDate, localTime);\n\n Date parseResult = convertLocalDateToDate(localDateTime);\n dateList.remove(dateIndex);\n dateList.add(dateIndex, parseResult);\n dateIndex++;\n\n }\n\n sortDateList(dateList);\n\n return dateList;\n }", "static DateTime GetFirstXWeekdayOfMonthAfterYMonthday(int iXDayOfWeek,\n int iYMonthDay, int iYear, int iMonth) {\n assert 1 <= iYMonthDay && iYMonthDay <= 31;\n DateTime dmFirstXDayOfMonth = GetFirstXWeekdayOfMonth(iXDayOfWeek,\n iYear, iMonth);\n while (dmFirstXDayOfMonth.getDayOfMonth() <= iYMonthDay) {\n dmFirstXDayOfMonth.plusWeeks(1);\n }\n return dmFirstXDayOfMonth;\n }", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public ArrayList<String> getAllEventDays(){\n ArrayList<Integer> sorted = this.getAllEventDayMonth();\n ArrayList<String> data = new ArrayList<>();\n String month = this.eventList.get(0).getStartTime().getMonth().toString();\n\n for (int date: sorted){\n StringBuilder string = new StringBuilder();\n\n string.append(month);\n string.append(\" \");\n string.append(date);\n data.add(string.toString());\n }\n return data;\n }", "public static void main(String[] args) {\n System.out.println(DateUtils.addMonths(new Date(), 1).getMonth());\n System.out.println(Calendar.getInstance().getDisplayName((Calendar.MONTH)+1, Calendar.LONG, Locale.getDefault()));\n System.out.println(LocalDate.now().plusMonths(1).getMonth());\n\t}", "public void findEasterDay()\n {\n while(year <= endYear)\n {\n EasterMath(year);\n for(int j = 0; j < 11; j++)\n {\n for(int k = 0; k < 30; k++)\n {\n if(month == j && day == k)\n {\n dates[j][k]++;\n }\n }\n }\n year++;\n }\n }", "@LogExceptions\n public synchronized List<Integer> getRegisteredDays\n (String month, String year) throws SQLException \n {\n Connection conn = DatabaseConnection.getConnection();\n try(PreparedStatement stmt = \n conn.prepareStatement(SELECT_EVENT_MONTH_YEAR))\n {\n stmt.setString(1, month);\n stmt.setString(2, year); \n dayList.clear();\n try(ResultSet rs = stmt.executeQuery()) {\n while(rs.next()) {\n dayList.add(rs.getInt(8));\n }\n }\n \n } \n return dayList;\n }", "@WebMethod public Vector<Date> getEventsMonth(Date date);", "@Test\n\tpublic void testNextDate(){\n\t\tif(year==444 && day==29){\n\t\t\t\tday=1;\n\t\t\t\tDate actualDate = new Date(year,(month+1),day);\n\t\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\n } else if(day==30 && year==2005){ //for test case 10\n\t\t\t\tday=1;\n\t\t\t\tDate actualDate = new Date(year,(month+1),day);\n\t\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\n\n\t\t} else if(day==31 ){ //for test cases 13,14,15\n\t\t\tif(month==12){\n\t\t\tday=1;\n\t\t\tmonth=1;\n\t\t\tyear+=1;\n\t\t\tDate actualDate = new Date(year,month,day);\n\t\t\tAssert.assertEquals(expectedDate,actualDate);\n } else {\n\t\t\t\tday=1;\n\t\t\t\tDate actualDate = new Date(year,(month+1),day);\n\t\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\t\t\t}\n\n\t\t}\n\t\telse{\t\n\t\t\tDate actualDate = new Date(year,month,(day+1));\n\t\t\tAssert.assertEquals(expectedDate,actualDate);\n\n\t\t}\n\t\n\t}" ]
[ "0.6593015", "0.6220673", "0.60685587", "0.5927799", "0.5816513", "0.56505376", "0.558204", "0.55430984", "0.55430967", "0.5520127", "0.54416615", "0.5429537", "0.5429177", "0.54284126", "0.54103553", "0.54099774", "0.5381449", "0.53737", "0.5349414", "0.53473586", "0.5294574", "0.5285085", "0.527924", "0.52646065", "0.52509576", "0.524544", "0.5245354", "0.5237676", "0.52075267", "0.5179673", "0.5163424", "0.5162279", "0.5148113", "0.51448303", "0.5141485", "0.51387477", "0.5138134", "0.5090444", "0.50891423", "0.50870216", "0.50841564", "0.50750893", "0.5073931", "0.5071806", "0.5056868", "0.50484186", "0.5046736", "0.504642", "0.5038858", "0.50183105", "0.5006973", "0.5004418", "0.4989575", "0.4989511", "0.49793616", "0.49739447", "0.4970224", "0.49685657", "0.49682128", "0.49616894", "0.49543202", "0.49444818", "0.49436116", "0.49257064", "0.49180645", "0.4916448", "0.49132583", "0.49025887", "0.4898171", "0.48854834", "0.48848245", "0.4873685", "0.48561776", "0.4850515", "0.48475787", "0.48472077", "0.4844123", "0.48408318", "0.48398325", "0.48384777", "0.48370388", "0.48338953", "0.4829292", "0.48290476", "0.48208764", "0.48198065", "0.48061064", "0.48058087", "0.4801841", "0.4801066", "0.48008603", "0.4786277", "0.47856098", "0.47837546", "0.47798628", "0.47750273", "0.47725084", "0.47721994", "0.4764384", "0.47382677" ]
0.7630121
0
Returns a leveled date representing the first day of the month based on a specified date.
public static LocalDate getFirstDayOfTheMonth(final LocalDate date) { return date.with(TemporalAdjusters.firstDayOfMonth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date firstDay(final Date date) {\n final Calendar cal = new GregorianCalendar();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_MONTH, cal.getMinimum(Calendar.DAY_OF_MONTH));\n cal.set(Calendar.HOUR_OF_DAY, 00);\n cal.set(Calendar.MINUTE, 00);\n cal.set(Calendar.SECOND, 00);\n cal.set(Calendar.MILLISECOND, 00);\n return cal.getTime();\n }", "public static WithAdjuster firstDayOfMonth() {\n\n return Impl.FIRST_DAY_OF_MONTH;\n }", "public static Date firstDayMonth(){\n String rep_inicio_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n \n /*Obtenemos el primer dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n /*Lo almacenamos como string con el formato adecuado*/\n rep_inicio_de_mes = sdf.format(c.getTime());\n\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_inicio_de_mes);\n }", "public static Date getFirstDate(Date date ) throws ParseException{ \n\t\tString format = \"yyyyMM\";\n\t\tdate = formatStrtoDate( format(date, format) + \"01\", format + \"dd\");\n\t\treturn date;\n\t}", "public static WithAdjuster firstDayOfNextMonth() {\n\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }", "private static LocalDate getFirstDayOfTheMonth(final int month, final int year) {\n return LocalDate.of(year, month, 1);\n }", "public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}", "public static WithAdjuster firstInMonth(DayOfWeek dayOfWeek) {\n\n Jdk7Methods.Objects_requireNonNull(dayOfWeek, \"dayOfWeek\");\n return new DayOfWeekInMonth(1, dayOfWeek);\n }", "private boolean isJanuaryFirst(final Calendar date) {\n return JANUARY_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.JANUARY == date.get(Calendar.MONTH);\n }", "public static LocalDate getFirstOfNextMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfNextMonth());\n\t}", "private boolean isNovemberFirst(final Calendar date) {\n return NOVEMBER_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.NOVEMBER == date.get(Calendar.MONTH);\n }", "@Override\n public int firstDayOfMonthInWeek() {\n int y = getYear();\n int m = getMonth()-1;\n XCalendar xCalendar = XCalendar.fromJalali(y,m,1);\n Calendar cc = Calendar.getInstance();\n int yy = xCalendar.getCalendar(XCalendar.GregorianType).getYear();\n int mm = xCalendar.getCalendar(XCalendar.GregorianType).getMonth()-1;\n int dd = xCalendar.getCalendar(XCalendar.GregorianType).getDay();\n cc.set(yy,mm,dd);\n int d = firstDayOfWeek[cc.get(Calendar.DAY_OF_WEEK)-1];\n return d;\n }", "private boolean isMayFirst(final Calendar date) {\n return MAY_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.MAY == date.get(Calendar.MONTH);\n }", "public Calendar startOfMonth() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH), 1);\r\n\t\treturn c2;\r\n\t}", "public int getFirstDayOfMonth(int month)\n\t{\n\t\tm_calendar.set(Calendar.MONTH,month);\n\t\tm_calendar.set(Calendar.DAY_OF_MONTH,1);\n\t\t\n\t\treturn (getDay_Of_Week() - 1);\t\t\n\n\t}", "public static LocalDate getLastDayOfTheMonth(@NotNull final LocalDate date) {\n Objects.requireNonNull(date);\n\n return date.with(TemporalAdjusters.lastDayOfMonth());\n }", "public static Date getStartDateByDate(Date idate) {\n\t\tint imonth = Utilities.getMonthNumberByDate(idate);\n\t\tint iyear = Utilities.getYearByDate(idate);\n\t\treturn Utilities.getStartDateByMonth(imonth - 1, iyear);\n\t}", "private int getFirstRepresentingDay() {\n\t\tint firstRepresentingDay;\r\n\t\tGregorianCalendar myCalendar = new GregorianCalendar(year, month, 1);\r\n\r\n\t\tint daysofMonth = myCalendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint firstDayMonth = myCalendar.get(Calendar.DAY_OF_WEEK); // First day of month (relative to the week)\r\n\t\tint globalFirstDayMonth = myCalendar.get(Calendar.DAY_OF_YEAR);\r\n\r\n\t\tif (settings.getBoolean(\"firstDayofWeek\", true)) { //The default option is the week starting on monday\r\n\t\t\tfirstDayMonth = firstDayMonth - 1;\r\n\t\t\tif (firstDayMonth == 0)\r\n\t\t\t\tfirstDayMonth = 7;\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\telse { //else we start the week on Sunday\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\tif (firstDayMonth + daysofMonth < 37)\r\n\t\t\tcount = RingActivity.five_week_calendar;\r\n\t\telse\r\n\t\t\tcount = RingActivity.six_week_calendar;\r\n\r\n\t\treturn firstRepresentingDay;\r\n\t}", "public static Date getStartDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\n\t\treturn c.getTime();\n\t}", "Date getStartDay();", "public static LocalDate getFirstDayOfMonth(LocalDateTime localDateTime) {\n LocalDateTime dateTime = localDateTime.with(TemporalAdjusters.firstDayOfMonth());\n return dateTime.toLocalDate();\n }", "public static Date getStart(Date date) {\n if (date == null) {\n return null;\n }\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.set(Calendar.HOUR_OF_DAY, 0);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n c.set(Calendar.MILLISECOND, 0);\n return c.getTime();\n }", "public Date next() {\n if (isValid(month, day + 1, year)) return new Date(month, day + 1, year);\n else if (isValid(month + 1, 1, year)) return new Date(month, 1, year);\n else return new Date(1, 1, year + 1);\n }", "public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}", "public static Date getMinDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(1970, 1, 1, 1, 1, 1);\n return cal.getTime();\n }", "private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}", "public int getDayOfMonth();", "public void nextDay() {\r\n int daysMax = daysInMonth();\r\n \r\n if (day == daysMax && month == 12) { // If end of the year, set date to Jan 1\r\n setDate(1, 1);\r\n } else if (day == daysMax) { // If last day of month, set to first day of next month\r\n setDate(month + 1, 1);\r\n } else { // Otherwise, simply increment this day\r\n day++;\r\n }\r\n }", "public static Date createDate(int year, int month, int date) {\n\n LocalDate localDate = LocalDate.of(year, month, date);\n ZoneId zoneId = ZoneId.systemDefault();\n Date result = Date.from(localDate.atStartOfDay(zoneId).toInstant());\n return result;\n }", "public Date getStartDate() {\r\n\t\treturn new Date(startDateText.getDay(), startDateText.getMonth()+1, startDateText.getYear());\r\n\t}", "static DateTime GetFirstXWeekdayOfMonth(int iXDayOfWeek, int iYear,\n int iMonth) {\n DateTime dmFirstOfMonth = new DateMidnight(iYear, iMonth, 1)\n .toDateTime();\n int dayOfWeek = dmFirstOfMonth.getDayOfWeek();\n int daysToAdd = iXDayOfWeek - dayOfWeek;\n if (iXDayOfWeek < dayOfWeek) {\n daysToAdd += 7;\n }\n return dmFirstOfMonth.plusDays(daysToAdd);\n }", "Date date(LocalDate date);", "Date getStartDate();", "Date getStartDate();", "Date getStartDate();", "private static long getMonthFromDate (String date) {\n\t\tString[] dateArray = date.split(AnalyticsUDFConstants.SPACE_SEPARATOR);\n\t\ttry {\n\t\t\tDate d = new SimpleDateFormat(AnalyticsUDFConstants.DATE_FORMAT_MONTH).parse(dateArray[1] +\n\t\t\t\t\tAnalyticsUDFConstants.SPACE_SEPARATOR + dateArray[dateArray.length-1]);\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(d);\n\t\t\treturn calendar.getTimeInMillis();\n\t\t} catch (ParseException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "LocalDate getDate();", "public Date getMinimumDate() {\n/* */ Date result;\n/* 641 */ Range range = getRange();\n/* 642 */ if (range instanceof DateRange) {\n/* 643 */ DateRange r = (DateRange)range;\n/* 644 */ result = r.getLowerDate();\n/* */ } else {\n/* */ \n/* 647 */ result = new Date((long)range.getLowerBound());\n/* */ } \n/* 649 */ return result;\n/* */ }", "@Override\n\tpublic Calendar getInitialDate() {\n\t\treturn Calendar.getInstance();\n\t}", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "public Date getWeekStartDate(Date date) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n return cal.getTime();\n }", "public String getDefaultDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMMM d, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public Date getStartOfDay(Date date) {\n\t Calendar calendar = Calendar.getInstance();\n\t calendar.setTime(date);\n\t calendar.set(Calendar.HOUR_OF_DAY, 0);\n\t calendar.set(Calendar.MINUTE, 0);\n\t calendar.set(Calendar.SECOND, 0);\n\t calendar.set(Calendar.MILLISECOND, 0);\n\t return calendar.getTime();\n\t}", "public static Date getStartOfDay(Date date)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n return calendar.getTime();\n }", "private LocalDate getMensDay1(LocalDate input){\n LocalDate dateFist = LocalDate.parse(file.getData(\"date\"), DateTimeFormatter.ofPattern(\"dd.MM.yyyy\"));\n int days = Integer.parseInt(file.getData(\"days\"));\n\n while(dateFist.isBefore(input)){\n dateFist = dateFist.plusDays(days);\n }\n return dateFist.minusDays(days);\n }", "public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }", "public static void main(String[] args) {\n MutableDateTime dateTime = new MutableDateTime();\n System.out.println(\"Current date = \" + dateTime);\n\n // Find the first day of the next month can be done by:\n // 1. Add 1 month to the date\n // 2. Set the day of the month to 1\n // 3. Set the millis of day to 0.\n dateTime.addMonths(1);\n dateTime.setDayOfMonth(1);\n dateTime.setMillisOfDay(0);\n System.out.println(\"First day of next month = \" + dateTime);\n }", "public static int getStartDay(int year, int month)\n {\n int startday = 3;//add 3 to the variable start\n int totalamountofdays = getTotalNumberOfDays(year,month);//call the method getTotalNumberOfDays and store it in a variable called start\n return(totalamountofdays + startday) % 7;//return start % 7 \n }", "public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "protected Date findFirstGenDate(GenCtx ctx)\n\t{\n\t\treturn EX.assertn(ctx.get(Date.class));\n\t}", "private java.sql.Date convertMonthIntToSQLDate (int monthInt) {\n Calendar calendar = Calendar.getInstance();\n String yearString = String.valueOf(calendar.getInstance().get(Calendar.YEAR));\n String MonthString = String.valueOf(monthInt);\n if (monthInt < 10) {\n MonthString = \"0\" + MonthString;\n }\n String firstDayOfMonthString = yearString + \"-\" + MonthString + \"-01\"; \n LocalDate date = LocalDate.parse(firstDayOfMonthString);\n java.sql.Date sqlDate = java.sql.Date.valueOf(date);\n return sqlDate; // First day of the month given in SQL firmat\n }", "public MonthDay() {\n setMonth(1);\n setDay(1);\n }", "public static Date setToBeginningOfDay(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 0);\n\t cal.set(Calendar.MINUTE, 0);\n\t cal.set(Calendar.SECOND, 0);\n\t cal.set(Calendar.MILLISECOND, 0);\n\t return cal.getTime();\n\t}", "public static Date setToMonthAgo(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.MONTH, -1);\n\t\treturn cal.getTime();\t\t\t\n\t}", "public static String getMonthAbbreviated(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"Jan\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"Feb\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"Mar\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"Apr\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"Jun\";\n break;\n\n case Calendar.JULY:\n dayStr = \"Jul\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"Aug\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"Sep\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"Oct\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"Nov\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"Dec\";\n break;\n }\n\n return dayStr;\n }", "public Date getInitialActivityDate(String siteId) {\n\t\tDate date = null;\n\t\ttry{\n\t\t\tdate = siteService.getSite(siteId).getCreatedDate();\n\t\t}catch(Exception e){\n\t\t\treturn new Date(0);\n\t\t}\n\t\treturn date;\n\t}", "public String getDDMMMYYYYDate(String date) throws Exception {\n HashMap<Integer, String> month = new HashMap<Integer, String>();\n month.put(1, \"Jan\");\n month.put(2, \"Feb\");\n month.put(3, \"Mar\");\n month.put(4, \"Apr\");\n month.put(5, \"May\");\n month.put(6, \"Jun\");\n month.put(7, \"Jul\");\n month.put(8, \"Aug\");\n month.put(9, \"Sep\");\n month.put(10, \"Oct\");\n month.put(11, \"Nov\");\n month.put(12, \"Dec\");\n\n try {\n String[] dtArray = date.split(\"-\");\n return dtArray[1] + \"-\" + month.get(Integer.parseInt(dtArray[1])) + \"-\" + dtArray[0];\n } catch (Exception e) {\n throw new Exception(\"getDDMMMYYYYDate : \" + date + \" : \" + e.toString());\n }\n\n }", "Date getForDate();", "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "public static Date todayStart() {\n return dayStart(new Date());\n }", "public Date getEarliestStartDate();", "public static String getMonth(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"January\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"February\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"March\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"April\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"June\";\n break;\n\n case Calendar.JULY:\n dayStr = \"July\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"August\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"September\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"October\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"November\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"December\";\n break;\n }\n\n return dayStr;\n }", "public Date getStartDate();", "public Date getStartDate();", "@Test public void Month_name_1__day__year__guess()\t\t\t\t{tst_date_(\"02 Mar 01\"\t\t\t\t, \"2001-03-02\");}", "public static WithAdjuster firstDayOfNextYear() {\n\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }", "public DayOfWeekInMonthRule() {\n this(1, SerialDate.MONDAY, MonthConstants.JANUARY);\n }", "public String getStartDate() {\n SimpleDateFormat formatDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatDate.format(fecha);\n }", "private Date toDate(LocalDate randomDate) {\n Date d = Date.from(randomDate.atStartOfDay().atZone(ZoneId.systemDefault()).toInstant());\n return d;\n }", "public Date addMonths(int m) {\r\n if (m < 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Month should not be the negative value!\");\r\n\t\t}\r\n\r\n\r\n\t\tint newMonth = (month + (m % 12)) > 12 ? ((month + (m % 12)) % 12) : month\r\n\t\t\t\t+ (m % 12);\r\n\t\tint newYear = (month + (m % 12)) > 12 ? year + (m / 12) + 1 : year\r\n\t\t\t\t+ (m / 12);\r\n int newDay = 0;\r\n // IF the new month has less total days in it than the starting month\r\n // and the date being added to is the last day of the month, adjust\r\n // and make newDay correct with its corresponding month.\r\n \r\n // IF not leap year and not Feb. make newDay correct.\r\n if (day > DAYS[newMonth] && (newMonth != 2)) {\r\n newDay = (DAYS[newMonth]);\r\n //System.out.println(\"1\");\r\n } \r\n \r\n // IF not leap year but not Feb. make newDay 28. (This is usually the case for Feb.)\r\n else if ((day > DAYS[newMonth]) && (isLeapYear(newYear) == false) && (newMonth == 2)){\r\n newDay = (DAYS[newMonth] - 1);\r\n }\r\n \r\n // IF leap year and is Feb. make newDay 29.\r\n else if ((day > DAYS[newMonth]) && isLeapMonth(newMonth, newYear) == true){\r\n newDay = DAYS[newMonth];\r\n }\r\n\r\n // if day is not gretaer than the last day of the new month, make no change.\r\n else {\r\n newDay = day;\r\n } \r\n\t\treturn (new Date(newMonth, newDay, newYear));\r\n\t}", "public Observable<ServiceResponse<LocalDate>> getMinDateWithServiceResponseAsync() {\n return service.getMinDate()\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<LocalDate>>>() {\n @Override\n public Observable<ServiceResponse<LocalDate>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<LocalDate> clientResponse = getMinDateDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public void setMinimalDay(DateTime rentDate) {\r\n\t\tString startDay;\r\n\t\tstartDay = rentDate.getNameOfDay();\r\n\r\n\t\tif (startDay.equals(\"Sunday\") || startDay.equals(\"Monday\") || startDay.equals(\"Thursday\")) {\r\n\t\t\tminimalDay = 2;\r\n\t\t} else if (startDay.equals(\"Friday\") || startDay.equals(\"Saturday\")) {\r\n\t\t\tminimalDay = 3;\r\n\t\t} else {\r\n\t\t\tminimalDay = 1;\r\n\t\t}\r\n\t}", "Integer getStartDay();", "public String dayPlus1(int d, int m, int y) {\n\t\tif (m == 4 || m == 6 || m == 9 || m == 11) {\n\t\t\tif (d < 30) { // If it's not the last day of the month, add 1 day\n\t\t\t\td++;\n\t\t\t} else { // If it's the last day of the month, reset the day and add\n\t\t\t\t// 1\n\t\t\t\t// month\n\t\t\t\td = 1;\n\t\t\t\tm++;\n\t\t\t}\n\t\t} else if (m == 1 || m == 3 || m == 5 || m == 7 || m == 8 || m == 10 || m == 12) {\n\t\t\tif (d < 31) // If it's not the last day of the month, add 1 day\n\t\t\t\td++;\n\t\t\telse { // If it's the last day of the month, reset the day\n\t\t\t\td = 1;\n\t\t\t\tif (m == 12) { // If it's the last month, reset the month and\n\t\t\t\t\t// add 1 year\n\t\t\t\t\tm = 1;\n\t\t\t\t\ty++;\n\t\t\t\t} else { // If it's not the last month, add 1 month\n\t\t\t\t\tm++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// If it's February and a leap year\n\t\t} else if (isLeapYear(y)) {\n\t\t\tif (d < 29) // If it's not the last day of the month, add 1 day\n\t\t\t\td++;\n\t\t\telse { // If it's the last day of the month, reset the day and add 1\n\t\t\t\t// month\n\t\t\t\td = 1;\n\t\t\t\tm++;\n\t\t\t}\n\t\t} else { // if it's February and not a leap year\n\t\t\tif (d < 28)// If it's not the last day of the month, add 1 day\n\t\t\t\td++;\n\t\t\telse { // If it's the last day of the month, reset the day and add 1\n\t\t\t\t// month\n\t\t\t\td = 1;\n\t\t\t\tm++;\n\t\t\t}\n\t\t}\n\t\t// Return the date plus one day\n\t\treturn d + \"/\" + m + \"/\" + y;\n\t}", "public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}", "public static WithAdjuster firstDayOfYear() {\n\n return Impl.FIRST_DAY_OF_YEAR;\n }", "public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }", "@Test\n public void tomorrowInTheSameMonth(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.tomorrow(),new Date(2,Month.january,1970));\n }", "public static native JsDate create(int year, int month, int dayOfMonth) /*-{\n return new Date(year, month, dayOfMonth);\n }-*/;", "public final java.util.Date getLocalDate()\n {\n return ordinal == NULL_ORDINAL ? null : new java.util.Date(getLocalTimeStamp());\n }", "public final static Date getDate(final Date date)\n {\n if (date == null)\n {\n return null;\n }\n final String packageName = date.getClass().getPackage().getName();\n if (packageName.equals(\"java.sql\"))\n {\n return new Date(date.getTime());\n }\n return date;\n }", "public long getActMonth(String date) {\n\t\treturn AnalyticsUDF.getMonthFromDate(date);\n\t}", "public static String getShortDate(Date date) {\n return new SimpleDateFormat(\"dd-MMM-yyyy\", Locale.getDefault()).format(date);\n }", "abstract Date getDefault();", "public static LocalDate DateToLocalDate(Date date) {\n\t\tInstant instant = date.toInstant();\n\t\tZoneId zone = ZoneId.systemDefault();\n\t\tLocalDateTime localDateTime = LocalDateTime.ofInstant(instant, zone);\n\t\treturn localDateTime.toLocalDate();\n\t}", "public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public String getNextDate()\n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);\n\t\treturn getTodayDate ();\n\n\t}", "public Observable<LocalDate> getMinDateAsync() {\n return getMinDateWithServiceResponseAsync().map(new Func1<ServiceResponse<LocalDate>, LocalDate>() {\n @Override\n public LocalDate call(ServiceResponse<LocalDate> response) {\n return response.body();\n }\n });\n }", "public Date getNormalizedDate(Date date)\n/* */ {\n/* 208 */ return new Date(date.getTime());\n/* */ }", "public static HISDate decreaseDate(HISDate date) {\r\n int day = date.getDay();\r\n int month = date.getMonth();\r\n int year = date.getYear();\r\n //keine Monatsgrenze überschritten\r\n if (day > 1) {\r\n day--;\r\n } else {\r\n // überschreiten einer Monatsgrenze\r\n if (day == 1) {\r\n //vormonat hat 31 Tage\r\n if (month == 2 || month == 4 || month == 6 || month == 8 || month == 9 || month == 11) {\r\n month--;\r\n day = 31;\r\n }\r\n //Jahreswechsel\r\n else if (month == 1) {\r\n day = 31;\r\n month = 12;\r\n year--;\r\n }\r\n // Vormonat ist Februar\r\n else if (month == 3) {\r\n month = 2;\r\n if (new GregorianCalendar().isLeapYear(year)) {\r\n day = 29;\r\n } else {\r\n day = 28;\r\n }\r\n } else {\r\n month--;\r\n day = 30;\r\n }\r\n }\r\n }\r\n return new HISDate(year, month, day);\r\n }", "public Month(int month, Day startDay, boolean isLeapYear) {\n switch (month) {\n case 0:\n case 2:\n case 4:\n case 6:\n case 7:\n case 10:\n case 11:\n this.days = 31;\n break;\n case 3:\n case 5:\n case 8:\n case 9:\n this.days = 30;\n break;\n case 1:\n if (isLeapYear) {\n this.days = 29;\n } else {\n this.days = 28;\n }\n break;\n }\n this.start = startDay.getValue();\n }", "public static LocalDate randomLocalDate() {\n\t\tlong minDay = LocalDate.now().plusDays(1).toEpochDay();\n\t\tlong maxDay = LocalDate.now().plusMonths(1).toEpochDay();\n\t\tlong randomDay = ThreadLocalRandom.current().nextLong(minDay, maxDay);\n\t\treturn LocalDate.ofEpochDay(randomDay);\n\t}", "private void calculateFinancialStartDate(DepreciationCriteria criteria) {\n\t\tLong todate = criteria.getToDate();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTimeInMillis(todate);\n\t\tint year = calendar.get(Calendar.YEAR);\n\t\tint month = calendar.get(Calendar.MONTH);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 23);\n\t\tcalendar.set(Calendar.MINUTE, 59);\n\t\tcriteria.setToDate(calendar.getTimeInMillis());\n\n\t\t// choosing the finacial year based on todate month\n\t\tif (month < 3) {\n\t\t\tcriteria.setFinancialYear(year-1+\"-\"+year);\n\t\t\tyear = year - 1;\n\t\t}else\n\t\t\tcriteria.setFinancialYear(year+\"-\"+(year+1));\n\n\t\t// setting from date value\n\t\tcalendar.set(Calendar.YEAR, year);\n\t\tcalendar.set(Calendar.MONTH, Calendar.APRIL);\n\t\tcalendar.set(Calendar.DATE, 1);\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\n\t\tcalendar.set(Calendar.MINUTE, 0);\n\t\tcriteria.setFromDate(calendar.getTimeInMillis());\n\t\tSystem.err.println(\"from date calculated : \" + criteria.getFromDate());\n\t}", "date initdate(date iDate)\n {\n iDate.updateElementValue(\"date\");\n return iDate;\n }", "public static DateTime floorToMonth(DateTime value) {\n if (value == null) {\n return null;\n }\n return new DateTime(value.getYear(), value.getMonthOfYear(), 1, 0, 0, 0, 0, value.getZone());\n }", "public Date parseDate(String date) {\t\t\n\t\ttry{\n\t\t\tDate d2 = sdf.parse(date);\n\t\t\t//String month = parseMonth(date);\n\t\t\t//cal.setTime(d2);\t\t\t\n\t\t\t//months.put(month, new Integer(cal.get(Calendar.MONTH) + 1));\t\t\t\n\t\t\treturn d2;\n\t\t} catch(ParseException e){\n\t\t\tSystem.out.println(\"Invalid Date Format or No Such Date : \" + date + \". Message: \" + e.getMessage() );\n\t\t\treturn null;\n\t\t}\n\t}", "public static Date createDate(int yyyy, int month, int day, int hour, int min) {\n/* 93 */ CALENDAR.clear();\n/* 94 */ CALENDAR.set(yyyy, month - 1, day, hour, min);\n/* 95 */ return CALENDAR.getTime();\n/* */ }", "public static Date getMinDate(Date dt) {\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(dt);\r\n\t\tcal.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcal.set(Calendar.MINUTE, 0);\r\n\t\tcal.set(Calendar.SECOND, 0);\r\n\t\treturn cal.getTime();\r\n\t}", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}" ]
[ "0.75321275", "0.7388828", "0.73239344", "0.71968246", "0.70351255", "0.6922088", "0.691377", "0.67781615", "0.6685803", "0.6623662", "0.6292588", "0.6241676", "0.620883", "0.61861265", "0.6147559", "0.61369914", "0.6119136", "0.6025886", "0.60064703", "0.6003271", "0.5981", "0.5950193", "0.5915695", "0.59126335", "0.5824506", "0.57781863", "0.5764471", "0.57575506", "0.5748954", "0.56682706", "0.56000084", "0.5595146", "0.55732787", "0.55732787", "0.55732787", "0.5568623", "0.5567704", "0.5540897", "0.55073804", "0.55070263", "0.54926556", "0.54906285", "0.54858804", "0.54694676", "0.5445386", "0.54399174", "0.5421392", "0.5411269", "0.5402053", "0.53976446", "0.53970444", "0.5375598", "0.53270406", "0.53263813", "0.5310427", "0.5306523", "0.530336", "0.5302287", "0.5299166", "0.5299041", "0.52925044", "0.52910686", "0.52443224", "0.52427787", "0.52427787", "0.5242607", "0.5231184", "0.5205439", "0.51927584", "0.51769716", "0.51633644", "0.5162836", "0.5153665", "0.514526", "0.5144535", "0.51414686", "0.513537", "0.5130749", "0.512012", "0.5109386", "0.50918436", "0.5090022", "0.5088346", "0.50742406", "0.507185", "0.5068446", "0.5065219", "0.5056772", "0.5041185", "0.5034213", "0.50299466", "0.5014703", "0.49930722", "0.49927345", "0.4989739", "0.49827048", "0.49824622", "0.49752325", "0.49751353", "0.4973166" ]
0.81831765
0
Returns a date representing the first day of the month
private static LocalDate getFirstDayOfTheMonth(final int month, final int year) { return LocalDate.of(year, month, 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WithAdjuster firstDayOfMonth() {\n\n return Impl.FIRST_DAY_OF_MONTH;\n }", "public static LocalDate getFirstDayOfTheMonth(final LocalDate date) {\n return date.with(TemporalAdjusters.firstDayOfMonth());\n }", "public static Date firstDayMonth(){\n String rep_inicio_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n \n /*Obtenemos el primer dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n /*Lo almacenamos como string con el formato adecuado*/\n rep_inicio_de_mes = sdf.format(c.getTime());\n\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_inicio_de_mes);\n }", "public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}", "public static WithAdjuster firstDayOfNextMonth() {\n\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }", "public static Date firstDay(final Date date) {\n final Calendar cal = new GregorianCalendar();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_MONTH, cal.getMinimum(Calendar.DAY_OF_MONTH));\n cal.set(Calendar.HOUR_OF_DAY, 00);\n cal.set(Calendar.MINUTE, 00);\n cal.set(Calendar.SECOND, 00);\n cal.set(Calendar.MILLISECOND, 00);\n return cal.getTime();\n }", "public static LocalDate getFirstOfNextMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfNextMonth());\n\t}", "public Calendar startOfMonth() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH), 1);\r\n\t\treturn c2;\r\n\t}", "public static Date getFirstDate(Date date ) throws ParseException{ \n\t\tString format = \"yyyyMM\";\n\t\tdate = formatStrtoDate( format(date, format) + \"01\", format + \"dd\");\n\t\treturn date;\n\t}", "@Override\n public int firstDayOfMonthInWeek() {\n int y = getYear();\n int m = getMonth()-1;\n XCalendar xCalendar = XCalendar.fromJalali(y,m,1);\n Calendar cc = Calendar.getInstance();\n int yy = xCalendar.getCalendar(XCalendar.GregorianType).getYear();\n int mm = xCalendar.getCalendar(XCalendar.GregorianType).getMonth()-1;\n int dd = xCalendar.getCalendar(XCalendar.GregorianType).getDay();\n cc.set(yy,mm,dd);\n int d = firstDayOfWeek[cc.get(Calendar.DAY_OF_WEEK)-1];\n return d;\n }", "private boolean isJanuaryFirst(final Calendar date) {\n return JANUARY_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.JANUARY == date.get(Calendar.MONTH);\n }", "public int getFirstDayOfMonth(int month)\n\t{\n\t\tm_calendar.set(Calendar.MONTH,month);\n\t\tm_calendar.set(Calendar.DAY_OF_MONTH,1);\n\t\t\n\t\treturn (getDay_Of_Week() - 1);\t\t\n\n\t}", "private int getFirstRepresentingDay() {\n\t\tint firstRepresentingDay;\r\n\t\tGregorianCalendar myCalendar = new GregorianCalendar(year, month, 1);\r\n\r\n\t\tint daysofMonth = myCalendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint firstDayMonth = myCalendar.get(Calendar.DAY_OF_WEEK); // First day of month (relative to the week)\r\n\t\tint globalFirstDayMonth = myCalendar.get(Calendar.DAY_OF_YEAR);\r\n\r\n\t\tif (settings.getBoolean(\"firstDayofWeek\", true)) { //The default option is the week starting on monday\r\n\t\t\tfirstDayMonth = firstDayMonth - 1;\r\n\t\t\tif (firstDayMonth == 0)\r\n\t\t\t\tfirstDayMonth = 7;\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\telse { //else we start the week on Sunday\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\tif (firstDayMonth + daysofMonth < 37)\r\n\t\t\tcount = RingActivity.five_week_calendar;\r\n\t\telse\r\n\t\t\tcount = RingActivity.six_week_calendar;\r\n\r\n\t\treturn firstRepresentingDay;\r\n\t}", "public static WithAdjuster firstInMonth(DayOfWeek dayOfWeek) {\n\n Jdk7Methods.Objects_requireNonNull(dayOfWeek, \"dayOfWeek\");\n return new DayOfWeekInMonth(1, dayOfWeek);\n }", "private boolean isNovemberFirst(final Calendar date) {\n return NOVEMBER_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.NOVEMBER == date.get(Calendar.MONTH);\n }", "public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}", "public Date next() {\n if (isValid(month, day + 1, year)) return new Date(month, day + 1, year);\n else if (isValid(month + 1, 1, year)) return new Date(month, 1, year);\n else return new Date(1, 1, year + 1);\n }", "private boolean isMayFirst(final Calendar date) {\n return MAY_1ST_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.MAY == date.get(Calendar.MONTH);\n }", "Date getStartDay();", "public int getDayOfMonth();", "public static LocalDate getFirstDayOfMonth(LocalDateTime localDateTime) {\n LocalDateTime dateTime = localDateTime.with(TemporalAdjusters.firstDayOfMonth());\n return dateTime.toLocalDate();\n }", "public static void main(String[] args) {\n MutableDateTime dateTime = new MutableDateTime();\n System.out.println(\"Current date = \" + dateTime);\n\n // Find the first day of the next month can be done by:\n // 1. Add 1 month to the date\n // 2. Set the day of the month to 1\n // 3. Set the millis of day to 0.\n dateTime.addMonths(1);\n dateTime.setDayOfMonth(1);\n dateTime.setMillisOfDay(0);\n System.out.println(\"First day of next month = \" + dateTime);\n }", "public static Date getStartDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\n\t\treturn c.getTime();\n\t}", "public void nextDay() {\r\n int daysMax = daysInMonth();\r\n \r\n if (day == daysMax && month == 12) { // If end of the year, set date to Jan 1\r\n setDate(1, 1);\r\n } else if (day == daysMax) { // If last day of month, set to first day of next month\r\n setDate(month + 1, 1);\r\n } else { // Otherwise, simply increment this day\r\n day++;\r\n }\r\n }", "public static Date getMinDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(1970, 1, 1, 1, 1, 1);\n return cal.getTime();\n }", "@Override\n\tpublic Calendar getInitialDate() {\n\t\treturn Calendar.getInstance();\n\t}", "public static Date todayStart() {\n return dayStart(new Date());\n }", "public MonthDay() {\n setMonth(1);\n setDay(1);\n }", "public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}", "public Date getStartDate() {\r\n\t\treturn new Date(startDateText.getDay(), startDateText.getMonth()+1, startDateText.getYear());\r\n\t}", "static DateTime GetFirstXWeekdayOfMonth(int iXDayOfWeek, int iYear,\n int iMonth) {\n DateTime dmFirstOfMonth = new DateMidnight(iYear, iMonth, 1)\n .toDateTime();\n int dayOfWeek = dmFirstOfMonth.getDayOfWeek();\n int daysToAdd = iXDayOfWeek - dayOfWeek;\n if (iXDayOfWeek < dayOfWeek) {\n daysToAdd += 7;\n }\n return dmFirstOfMonth.plusDays(daysToAdd);\n }", "public String getDefaultDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMMM d, yyyy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public Date getInitialActivityDate(String siteId) {\n\t\tDate date = null;\n\t\ttry{\n\t\t\tdate = siteService.getSite(siteId).getCreatedDate();\n\t\t}catch(Exception e){\n\t\t\treturn new Date(0);\n\t\t}\n\t\treturn date;\n\t}", "public String firstDayOfWeek(){\n cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n return (\"Mon\" + \" \" + cal.get(Calendar.DATE) + \" \" + cal.get(Calendar.MONTH) + \" \" + cal.get(Calendar.YEAR));\n }", "public static WithAdjuster firstDayOfYear() {\n\n return Impl.FIRST_DAY_OF_YEAR;\n }", "public static WithAdjuster firstDayOfNextYear() {\n\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public static LocalDate getLastDayOfTheMonth(@NotNull final LocalDate date) {\n Objects.requireNonNull(date);\n\n return date.with(TemporalAdjusters.lastDayOfMonth());\n }", "public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }", "public static Date getStart(Date date) {\n if (date == null) {\n return null;\n }\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.set(Calendar.HOUR_OF_DAY, 0);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n c.set(Calendar.MILLISECOND, 0);\n return c.getTime();\n }", "LocalDate getDate();", "Date getStartDate();", "Date getStartDate();", "Date getStartDate();", "public String getNextDate()\n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);\n\t\treturn getTodayDate ();\n\n\t}", "protected Date findFirstGenDate(GenCtx ctx)\n\t{\n\t\treturn EX.assertn(ctx.get(Date.class));\n\t}", "public static int getStartDay(int year, int month)\n {\n int startday = 3;//add 3 to the variable start\n int totalamountofdays = getTotalNumberOfDays(year,month);//call the method getTotalNumberOfDays and store it in a variable called start\n return(totalamountofdays + startday) % 7;//return start % 7 \n }", "public DayOfWeekInMonthRule() {\n this(1, SerialDate.MONDAY, MonthConstants.JANUARY);\n }", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "public static Date getUniqueDate() {\n if (uniqueCal == null) {\n uniqueCal = Calendar.getInstance();\n uniqueCal.set(1970, 1, 1, 1, 1, 1);\n }\n uniqueCal.add(Calendar.DAY_OF_MONTH, 1);\n return uniqueCal.getTime();\n }", "public int MagicDate(){\n return month = day = year = 1;\n \n }", "public int getDayOfMonth() \n\t{\n\t\tint dayofmonth = m_calendar.get(Calendar.DAY_OF_MONTH);\n\t\treturn dayofmonth;\n\n\t}", "public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "Integer getStartDay();", "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "public String getStartDate() {\n SimpleDateFormat formatDate = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formatDate.format(fecha);\n }", "public int getStartMonth()\n\t{\n\t\treturn this.mStartMonth;\n\t}", "public static int getTodaysDay() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.monthDay;\t\r\n\t\t\r\n\t}", "private java.sql.Date convertMonthIntToSQLDate (int monthInt) {\n Calendar calendar = Calendar.getInstance();\n String yearString = String.valueOf(calendar.getInstance().get(Calendar.YEAR));\n String MonthString = String.valueOf(monthInt);\n if (monthInt < 10) {\n MonthString = \"0\" + MonthString;\n }\n String firstDayOfMonthString = yearString + \"-\" + MonthString + \"-01\"; \n LocalDate date = LocalDate.parse(firstDayOfMonthString);\n java.sql.Date sqlDate = java.sql.Date.valueOf(date);\n return sqlDate; // First day of the month given in SQL firmat\n }", "public static LocalDate getLastOfNextMonth() {\n\t\treturn BusinessDateUtility.getFirstOfNextMonth().with(TemporalAdjusters.lastDayOfMonth());\n\t}", "public int dayOfMonth() {\r\n\t\treturn mC.get(Calendar.DAY_OF_MONTH);\r\n\t}", "public int getDayOfMonth() {\n return _calendar.get(Calendar.DAY_OF_MONTH);\n }", "public Calendar getFirstVisibleDay() {\n return viewState.getFirstVisibleDay();\n }", "public Date getStartDate();", "public Date getStartDate();", "public Date obtenerPrimeraFecha() {\n String sql = \"SELECT proyind_periodo_inicio\"\n + \" FROM proy_indices\"\n + \" WHERE proyind_periodo_inicio IS NOT NULL\"\n + \" ORDER BY proyind_periodo_inicio ASC\"\n + \" LIMIT 1\";\n Query query = getEm().createNativeQuery(sql);\n List result = query.getResultList();\n return (Date) DAOUtils.obtenerSingleResult(result);\n }", "public static int getFirstDayOfWeek() {\n int startDay = Calendar.getInstance().getFirstDayOfWeek();\n\n if (startDay == Calendar.SATURDAY) {\n return Time.SATURDAY;\n } else if (startDay == Calendar.MONDAY) {\n return Time.MONDAY;\n } else {\n return Time.SUNDAY;\n }\n }", "public static native JsDate create(int year, int month, int dayOfMonth) /*-{\n return new Date(year, month, dayOfMonth);\n }-*/;", "public static Date setToBeginningOfDay(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 0);\n\t cal.set(Calendar.MINUTE, 0);\n\t cal.set(Calendar.SECOND, 0);\n\t cal.set(Calendar.MILLISECOND, 0);\n\t return cal.getTime();\n\t}", "abstract Date getDefault();", "@Test public void Month_name_1__day__year__guess()\t\t\t\t{tst_date_(\"02 Mar 01\"\t\t\t\t, \"2001-03-02\");}", "@Test public void Day_1__month__year()\t\t\t\t\t\t\t{tst_date_(\"03-31-02\"\t\t\t\t, \"2002-03-31\");}", "public Date() {\r\n\t\tGregorianCalendar c = new GregorianCalendar();\r\n\t\tmonth = c.get(Calendar.MONTH) + 1; // our month starts from 1\r\n\t\tday = c.get(Calendar.DAY_OF_MONTH);\r\n\t\tyear = c.get(Calendar.YEAR);\r\n\t}", "public static LocalDate randomLocalDate() {\n\t\tlong minDay = LocalDate.now().plusDays(1).toEpochDay();\n\t\tlong maxDay = LocalDate.now().plusMonths(1).toEpochDay();\n\t\tlong randomDay = ThreadLocalRandom.current().nextLong(minDay, maxDay);\n\t\treturn LocalDate.ofEpochDay(randomDay);\n\t}", "Date date(LocalDate date);", "public Date getStartOfDay(Date date) {\n\t Calendar calendar = Calendar.getInstance();\n\t calendar.setTime(date);\n\t calendar.set(Calendar.HOUR_OF_DAY, 0);\n\t calendar.set(Calendar.MINUTE, 0);\n\t calendar.set(Calendar.SECOND, 0);\n\t calendar.set(Calendar.MILLISECOND, 0);\n\t return calendar.getTime();\n\t}", "public Date getEarliestStartDate();", "public static Date getStartOfDay(Date date)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n return calendar.getTime();\n }", "@Test\n public void tomorrowInTheSameMonth(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.tomorrow(),new Date(2,Month.january,1970));\n }", "public Date getMinimumDate() {\n/* */ Date result;\n/* 641 */ Range range = getRange();\n/* 642 */ if (range instanceof DateRange) {\n/* 643 */ DateRange r = (DateRange)range;\n/* 644 */ result = r.getLowerDate();\n/* */ } else {\n/* */ \n/* 647 */ result = new Date((long)range.getLowerBound());\n/* */ } \n/* 649 */ return result;\n/* */ }", "public int getDayOfMonth() {\n\n return this.cdom;\n\n }", "public static Date getStartDateByDate(Date idate) {\n\t\tint imonth = Utilities.getMonthNumberByDate(idate);\n\t\tint iyear = Utilities.getYearByDate(idate);\n\t\treturn Utilities.getStartDateByMonth(imonth - 1, iyear);\n\t}", "@Override\n\t\tpublic WeekDay1 nextDay() {\n\t\t\treturn MON;\n\t\t}", "public int getDayOfMonth(){\n\t\treturn dayOfMonth;\n\t}", "public final java.util.Date getLocalDate()\n {\n return ordinal == NULL_ORDINAL ? null : new java.util.Date(getLocalTimeStamp());\n }", "public Date getEarliestFinishingDate();", "public int getFirstDayOfWeek() {\n return config.firstDayOfWeek;\n }", "@Test public void Month_name_1__year__day()\t\t\t\t\t{tst_date_(\"2001 Mar 02\"\t\t\t, \"2001-03-02\");}", "public int getCurrentDate() {\n\n\t\t cal = Calendar.getInstance();\n\t\treturn cal.get(Calendar.DAY_OF_MONTH);\n\t}", "public Date getFirstSelectionDate()\n/* */ {\n/* 186 */ return isSelectionEmpty() ? null : (Date)this.selectedDates.first();\n/* */ }", "public static Date createDate(int year, int month, int date) {\n\n LocalDate localDate = LocalDate.of(year, month, date);\n ZoneId zoneId = ZoneId.systemDefault();\n Date result = Date.from(localDate.atStartOfDay(zoneId).toInstant());\n return result;\n }", "public static void main(String[] args) {\n\t\t\n\t\tLocalDate date = LocalDate.now(); \n\t\tSystem.out.println(date);\n\t\t//date.atStartOfDay();\n\t\t int d=date.getDayOfMonth();\n\t\t System.out.println(d);\n\t\t int y=date.getYear();\n\t\t System.out.println(y);\n\t\t int m=date.getMonthValue();\n\t\t System.out.println(m);\n\t\t\n\t\t \n\t\t \n\t\t \n\t\t\n\t\t \n\t\t \n\t}", "public Date tomorrow(){\n\t int nextD;\n\t Month nextM;\n\t int nextY;\n\n\t if ( this.day + 1 > this.month.nbJours(this.year)){\n\t nextD = 1;\n\t if (this.month.equals(Month.DECEMBER)){\n\t\t nextY = this.year + 1;\n\t \t nextM = this.month.nextMonth();\n\t }\n\t else{\n\t \tnextY = this.year;\n\t \tnextM = this.month.nextMonth();\n\t }\n\t }else{\n\t nextD = this.day + 1;\n\t nextM = this.month;\n\t nextY = this.year;\n\t }\n\t return new Date(nextD, nextM, nextY);\n }", "private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}", "public int firstSettleDate()\n\t{\n\t\treturn _iFirstSettleDate;\n\t}", "public CinemaDate setMonth(String m) {\n return new CinemaDate(m, this.day, this.time);\n }", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "public Calendar dayOfMonth(DayOfMonth dayOfMonth) {\r\n\t\t\r\n\t\tint day = dayOfMonth.getDayNumber();\r\n\t\t\r\n\t\tint month = day > 0 ? \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH) : \r\n\t\t\t\t\tbaseCalendar.get(Calendar.MONTH) + 1;\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(\r\n\t\t\t\tbaseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), month, day);\r\n\t\t\r\n\t\treturn c2;\r\n\t}", "public static LocalDate getLastOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.lastDayOfMonth());\n\t}" ]
[ "0.80644125", "0.8028952", "0.79197186", "0.77419764", "0.7628017", "0.7494616", "0.74769855", "0.6905836", "0.6847664", "0.67897916", "0.6788741", "0.67770225", "0.6749359", "0.6745894", "0.64418095", "0.6371486", "0.6367459", "0.6363987", "0.6308531", "0.62919426", "0.61620075", "0.6150385", "0.6123936", "0.61107415", "0.60836524", "0.60664916", "0.6029911", "0.60221666", "0.60070497", "0.59961015", "0.59499234", "0.5834936", "0.57538605", "0.5753803", "0.5751235", "0.5729867", "0.5723518", "0.5684543", "0.56815374", "0.5676355", "0.56558573", "0.5653796", "0.56493264", "0.56493264", "0.56493264", "0.56007767", "0.55996776", "0.55909616", "0.55646837", "0.55565304", "0.5549187", "0.55285746", "0.55265874", "0.5524818", "0.55156463", "0.5511383", "0.5507278", "0.5505002", "0.5498934", "0.5486084", "0.54761726", "0.54706126", "0.54287577", "0.5427183", "0.54271555", "0.54271555", "0.5409093", "0.5377771", "0.5374429", "0.5357315", "0.5351483", "0.5346209", "0.5345923", "0.5344063", "0.5336936", "0.5333569", "0.5321903", "0.53177875", "0.5317567", "0.53165895", "0.5311307", "0.5303485", "0.52881396", "0.5287518", "0.5284204", "0.52749264", "0.5273279", "0.5270299", "0.52534837", "0.5244784", "0.5237844", "0.52295095", "0.52231854", "0.51949626", "0.51882225", "0.5159365", "0.51577556", "0.5152166", "0.51425946", "0.51402247" ]
0.73173285
7
Returns an array of the starting date of each quarter in a year
public static LocalDate[] getFirstDayQuarterly(final int year) { LocalDate[] bounds = new LocalDate[4]; bounds[0] = LocalDate.of(year, Month.JANUARY, 1); bounds[1] = LocalDate.of(year, Month.APRIL, 1); bounds[2] = LocalDate.of(year, Month.JULY, 1); bounds[3] = LocalDate.of(year, Month.OCTOBER, 1); return bounds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<String> createDate(String quarter, String year) {\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tString startDate = \"\";\r\n\t\tString endDate = \"\";\r\n\t\tif (quarter.equals(\"January - March\")) {\r\n\t\t\tstartDate = year + \"-01-01\";\r\n\t\t\tendDate = year + \"-03-31\";\r\n\t\t} else if (quarter.equals(\"April - June\")) {\r\n\t\t\tstartDate = year + \"-04-01\";\r\n\t\t\tendDate = year + \"-06-30\";\r\n\t\t} else if (quarter.equals(\"July - September\")) {\r\n\t\t\tstartDate = year + \"-07-01\";\r\n\t\t\tendDate = year + \"-09-30\";\r\n\t\t} else {\r\n\t\t\tstartDate = year + \"-10-01\";\r\n\t\t\tendDate = year + \"-12-31\";\r\n\t\t}\r\n\t\tdate.add(startDate);\r\n\t\tdate.add(endDate);\r\n\t\treturn date;\r\n\t}", "private static LocalDate[] getQuarterBounds(final LocalDate date) {\n Objects.requireNonNull(date);\n\n final LocalDate[] bounds = new LocalDate[8];\n\n bounds[0] = date.with(TemporalAdjusters.firstDayOfYear());\n bounds[1] = date.withMonth(Month.MARCH.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[2] = date.withMonth(Month.APRIL.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[3] = date.withMonth(Month.JUNE.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[4] = date.withMonth(Month.JULY.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[5] = date.withMonth(Month.SEPTEMBER.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[6] = date.withMonth(Month.OCTOBER.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[7] = date.with(TemporalAdjusters.lastDayOfYear());\n\n return bounds;\n }", "public int[] findQuarterBounds(int[] datesJulian, int numQuarters) {\n int numTransactions = datesJulian.length;\n int[] timeBlock = new int[numTransactions];\n int lowerBound = 0;\n int upperBound = 0;\n\n // Get indices of earliest and latest julianDate\n earliestIndex = MinAndMaxFinder.findEarliestIndex(datesJulian);\n latestIndex = MinAndMaxFinder.findLatestIndex(datesJulian);\n\n int[] year = new int[datesJulian.length];\n int[] month = new int[datesJulian.length];\n int[] dateGreg = new int[2];\n\n // Get the month and year values of all the transaction julianDate\n for (int i = 0; i < datesJulian.length; i++) {\n dateGreg = convertJulianToGregorian(datesJulian[i]);\n year[i] = dateGreg[0];\n month[i] = dateGreg[1];\n }\n\n /* Get the year and month value of the earliest date only\n * to be used as a starting point for the search */\n int y = year[earliestIndex];\n int m = month[earliestIndex];\n\n /* Find the initial lower and upper bounds for the search\n * loop */\n if (m > 0 & m < 4) {\n lowerBound = 0;\n upperBound = 4;\n }\n if (m > 3 & m < 7) {\n lowerBound = 3;\n upperBound = 7;\n }\n if (m > 6 & m < 10) {\n lowerBound = 6;\n upperBound = 10;\n }\n if (m > 9 & m < 13) {\n lowerBound = 9;\n upperBound = 13;\n }\n //System.out.println(\"Number of ... Quarters \" + getNumQuarters());\n /* Search Loop */\n int groupCounter = 1;\n boolean[] indexToExcludeFromSearch = new boolean[numTransactions];\n java.util.Arrays.fill(indexToExcludeFromSearch, false);\n // Iterate for each quarter\n for (int i = 0; i < numQuarters; i++) {\n // Iterate for each transaction\n for (int j = 0; j < numTransactions; j++) {\n if (year[j] == y && (month[j] > lowerBound & month[j] < upperBound) &&\n indexToExcludeFromSearch[j] == false) {\n timeBlock[j] = groupCounter;\n indexToExcludeFromSearch[j] = true;\n }\n } // end inner for\n if (lowerBound == 9 && upperBound == 13) {\n lowerBound = 0;\n upperBound = 4;\n y++;\n } else {\n lowerBound = lowerBound + 3;\n upperBound = upperBound + 3;\n }\n groupCounter++;\n } // end outer for\n groupCounter--;\n setNumQuarters(groupCounter);\n DataPreprocessing split = new DataPreprocessing();\n\n return timeBlock;\n }", "private static LocalDate localQuarterDate( int year, int quarter, int dayOfQuarter )\n {\n if ( quarter == 2 && dayOfQuarter == 92 )\n {\n throw new InvalidValuesArgumentException( \"Quarter 2 only has 91 days.\" );\n }\n // instantiate the yearDate now, because we use it to know if it is a leap year\n LocalDate yearDate = LocalDate.ofYearDay( year, dayOfQuarter ); // guess on the day\n if ( quarter == 1 && dayOfQuarter > 90 && (!yearDate.isLeapYear() || dayOfQuarter == 92) )\n {\n throw new InvalidValuesArgumentException( String.format(\n \"Quarter 1 of %d only has %d days.\", year, yearDate.isLeapYear() ? 91 : 90 ) );\n }\n return yearDate\n .with( IsoFields.QUARTER_OF_YEAR, quarter )\n .with( IsoFields.DAY_OF_QUARTER, dayOfQuarter );\n }", "public int getStartYear()\n {\n return indicators[0].getYear();\n }", "public int[] boundFinderQuarters(int[] date) {\n int[] bound = {0, 0};\n int year, month, day;\n year = date[0];\n month = date[1];\n day = date[2];\n\n /*** LOWER BOUND = bound[0]***/\n bound[0] = 1;\n\n /*** UPPER BOUND ***/\n boolean leapYearFlag = false;\n for (int i = 0; i < leapYears.length; i++) {\n if (year == leapYears[i]) {\n leapYearFlag = true;\n }\n }\n\n // If leap year and month is Feb then set upperBoundMonth to 29\n if (leapYearFlag && month == 2) {\n bound[1] = 29;\n } else {\n bound[1] = calculateUpperBound(month);\n }\n return bound;\n }", "public String[] getYearVals() {\n if (yearVals == null) {\n yearVals = new String[numYearVals];\n int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);\n //curYear = String.valueOf(year);\n\n for (int i = 0; i < numYearVals; i++) {\n yearVals[i] = String.valueOf(year + i);\n }\n }\n\n return yearVals;\n }", "public List<Integer> getSpPeriodYear() {\n\t\tint maxTerm = product.getMaxTerm();\n\t\tint minTerm = product.getMinTerm();\n\n\t\tList<Integer> lists = new ArrayList<Integer>();\n\t\tfor (int i = minTerm; i <= maxTerm; i++) {\n\t\t\tlists.add(i);\n\t\t}\n\t\treturn lists;\n\t}", "@Override\n public List<ReviewBaseline> getNonGreenProjectsForQuarter(String months, String years) {\n\n return reviewBaselineRepository.getNonGreenProjectsForQuarter(months, years);\n }", "List<Quarter> getQuarterList(Integer cityId)throws EOTException;", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public int getStartingYear()\n {\n return 2013;\n }", "public List<Integer> getSePeriodYears() {\n\t\treturn Arrays.asList(5, 7, 10);\n\t}", "public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }", "public static int[] makeBeforeInterval(ArrayList<Firm> list)\n\t{\n\t\tint dis = 1;\n\t\tint first = 0;\n\t\t\n\t\tint dis2 = 120;\t\t\n\t\tint last = 0;\n\t\t\n\t\tint years = (int)((float)(2*366));\n\t\tint quarter = 92; // # days in a qtr\n\t\t\n\t\tInteger filed = (Integer)(utils.qM2.get(list.get(0).getBankrupcy().get(0).filedIndex - quarter));\n\t\tInteger beforeFiled = (Integer)(utils.qM2.get(list.get(0).getBankrupcy().get(0).filedIndex - years));\n\n\t\tif(filed != null &&\n\t\t beforeFiled != null){\n\t\t\tlast = filed;\n\t\t\tfirst = beforeFiled;\n\t\t} else {\n\t\t\tlast = dis2;\n\t\t\tfirst = dis2 - years;\n\t\t}\t\t\n\t\t\n\t\tint mid = (first+last)/2;\n\t\tint[] x = new int[3];\n\t\tx[0]=first;\n\t\tx[1]=mid;\n\t\tx[2]=last;\t\t\n\t\treturn x;\t\n\t}", "public List<Refinery> getRefineries(int year);", "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "public java.math.BigInteger getStartYear() {\r\n return startYear;\r\n }", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "java.lang.String getStartDateYYYY();", "public DateRange getDateRange();", "private void fillYearFields() {\n\n\t\tfor (int i = 1990; i <= 2100; i++) {\n\t\t\tyearFieldDf.addItem(i);\n\t\t\tyearFieldDt.addItem(i);\n\t\t}\n\t}", "public Indicator[] getIndicatorForPeriod(int start, int end)\n {\n int index = 0;\n int validStart = indicators[0].getYear();\n int validEnd = indicators[indicators.length - 1].getYear();\n int oldStart = start, oldEnd = end;\n int startIndex = start - validStart;\n int counter = 0;\n\n if (start > end || (start < validStart && end < validStart) || (start > validEnd && end > validEnd))\n {\n throw new IllegalArgumentException(\"Invalid request of start and end year \" + start + \", \" + end +\n \". Valid period for \" + name + \" is \" + validStart + \" to \" + validEnd);\n }\n\n boolean changed = false;\n if (start < indicators[0].getYear())\n {\n changed = true;\n start = indicators[0].getYear();\n }\n\n if (end > indicators[indicators.length - 1].getYear())\n {\n changed = true;\n end = indicators[indicators.length - 1].getYear();\n }\n\n if (changed)\n {\n System.out.println(\"Invalid request of start and end year \" + oldStart + \",\" + oldEnd +\n \". Using valid subperiod for \" + name + \" is \" + start + \" to \" + end);\n }\n\n int numberOfYears = (end - start)+1;\n Indicator[] outputArray = new Indicator[numberOfYears];\n\n for (int i = startIndex; i < numberOfYears; i++)\n {\n outputArray[counter] = indicators[i];\n counter++;\n }\n return outputArray;\n }", "public static void main(String[] args) {\n\n\t\tLocalDate current =LocalDate.now();\n\tLocalDate ld =\tLocalDate.of(1989, 11, 30);\n\t\t\n\tPeriod pd =\tPeriod.between(current, ld);\n\tSystem.out.println(pd.getYears());\n\t}", "public static LocalDate[] getFirstDayWeekly(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n LocalDate localDate = LocalDate.ofYearDay(year, 1).with(TemporalAdjusters.previousOrSame(DayOfWeek.SUNDAY));\n\n final LocalDate testDate = LocalDate.ofYearDay(year, 1);\n if (testDate.getDayOfWeek() == DayOfWeek.THURSDAY) {\n dates.add(testDate.minusDays(4));\n }\n\n for (int i = 0; i <= 53; i++) {\n if (localDate.getYear() == year) {\n dates.add(localDate);\n }\n\n localDate = localDate.plusWeeks(1);\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public String getQuarter() {\r\n return quarter;\r\n }", "public void setStartYear(java.math.BigInteger startYear) {\r\n this.startYear = startYear;\r\n }", "public static List<String> getListOfYears(){\r\n\t\t\r\n\t\tList<String> years = new ArrayList<String>();\r\n\t\tyears.add(\"2013\"); years.add(\"2014\"); years.add(\"2015\"); years.add(\"2016\");\r\n\t\tyears.add(\"2017\"); years.add(\"2018\"); years.add(\"2019\"); years.add(\"2020\");\r\n\t\treturn years;\r\n\t\t\r\n\t}", "public RowSet getLookup4PeriodYear() {\n return (RowSet)getAttributeInternal(LOOKUP4PERIODYEAR);\n }", "public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }", "public int getQuarter () {\n return NQuarter;\n }", "public static Date[] getLastYearDateRange(String timeZone) {\n\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH, -1);\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n final Date endDateTime = calendar.getTime();\n\n calendar = Calendar.getInstance();\n calendar.add(Calendar.YEAR, -1);\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n final Date startDateTime = calendar.getTime();\n\n return new Date[]{DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone), DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone)};\n }", "public ArrayList<Integer> getYears() \r\n\t{\r\n\t\tint statingYear = 2000;\r\n\t\tint maxYear = 2050;\r\n\t\tArrayList <Integer>years = new ArrayList<Integer>(maxYear);\r\n\t\tfor (int year = statingYear; year <= maxYear; year++)\r\n\t\t\tyears.add(year);\r\n\t\treturn years;\r\n\t}", "public static LocalDate[] getAllDays(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n for (int i = 1; i <= getDaysInYear(year); i++) {\n dates.add(LocalDate.ofYearDay(year, i));\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public int getStartYear() {\n\t\treturn startYear;\n\t}", "public void startDateQuestionSet() {\n this.dateQuestionSet = new HashSet<>();//creates a new dateQuestionSet\n for (Question q : this.getForm().getQuestionList()) {//for every question in the question list of the current form\n if (q.getType().getId() == 4) {//if the question is type Date Question\n Quest newQuest = new Quest();//creates a new Quest\n newQuest.setqQuestion(q);//adds the current question to the new Quest\n this.dateQuestionSet.add(newQuest);//adds the new Quest to the new dateQuestionSet\n }\n }\n }", "public Integer getQuarter() {\r\n return QTR;\r\n }", "public JsonArray getHomeHeatingFuelOrdersByStationIdAndQuarter(String stationID, String quarter, String year) {\r\n\t\tJsonArray homeHeatingFuelOrders = new JsonArray();\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tdate = createDate(quarter, year);\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT sum(amountOfLitters) as totalAmountOfFuel,sum(totalPrice) as totalPriceOfFuel FROM home_heating_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE stationID='\" + stationID + \"' AND orderDate between '\" + date.get(0)\r\n\t\t\t\t\t\t+ \" 00:00:00' and '\" + date.get(1) + \" 23:59:59';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"fuelType\", \"Home heating fuel\");\r\n\t\t\t\t\torder.addProperty(\"totalAmountOfFuel\", rs.getString(\"totalAmountOfFuel\"));\r\n\t\t\t\t\torder.addProperty(\"totalPriceOfFuel\", rs.getString(\"totalPriceOfFuel\"));\r\n\t\t\t\t\thomeHeatingFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn homeHeatingFuelOrders;\r\n\r\n\t}", "LocalDate getCollectionBeginDate();", "int getYears();", "public Date getBaselineDate(int index)\r\n {\r\n return m_baselineDate[index];\r\n }", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public BigDecimal getPriorYear() {\n return priorYear;\n }", "Years createYears();", "public static int[][] inputTempYear() {\r\n\t\tint[][] temp = new int[ROWS][COLUMNS];\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\tinputTempMonth(temp, i);\r\n\t\t}\r\n\t\treturn temp;\r\n\t}", "private String[] getLast30Dates() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tString[] dates = new String[30];\n\t\tfor (int i=29; i>=0; i-- ) {\n\t\t\tdates[i] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t}\n\t\treturn dates;\n\t}", "int getYear();", "@Nullable\n public static String retrieveUpcomingGames(String year, String quarter) {\n String urlString = URL_BASE + MULTIPLE_GAMES + API_KEY + API_FORMAT + API_FILTER_STARTER + API_FILTER_YEAR\n + year + API_FILTER_SEP + API_FILTER_QUARTER + quarter + API_FILTER_SEP + API_APP_TRACKED_PLATFORMS;\n\n // try/catch - pull data from the API\n try {\n // cast the URL string into a URL\n URL url = new URL(urlString);\n\n // open the connection\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n // connect to the server\n connection.connect();\n\n // start an input stream and put the contents into a string\n InputStream gameStream = connection.getInputStream();\n String data = IOUtils.toString(gameStream);\n\n // close the stream and disconnect from the server\n gameStream.close();\n connection.disconnect();\n\n // return the string that holds the JSON\n return data;\n\n // if there was an issue, print the stack trace\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}", "public EventsCalendarYear() {\n initYear();\n }", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public ReactorResult<java.lang.Integer> getAllOriginalReleaseYear_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ORIGINALRELEASEYEAR, java.lang.Integer.class);\r\n\t}", "public ReactorResult<java.lang.Integer> getAllRecordingYear_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), RECORDINGYEAR, java.lang.Integer.class);\r\n\t}", "public int getStartYear()\n\t{\n\t\treturn this.mStartYear;\n\t}", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "private void initYear() {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(i));\n }\n }", "public List<LotReportRow> generateReportOnDormantLots(int year, int start, int numOfRows) throws MiddlewareQueryException;", "public JsonArray getFastFuelOrdersByStationIdAndQuarter(String stationID, String quarter, String year) {\r\n\t\tJsonArray fastFuelOrders = new JsonArray();\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tdate = createDate(quarter, year);\r\n\t\tString totalPriceOfFuel = \"\";\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT fuelType, sum(amountOfLitters) as totalAmountOfFuel,sum(totalPrice) as totalPriceOfFuel FROM fast_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE stationID='\" + stationID + \"' AND orderDate between '\" + date.get(0)\r\n\t\t\t\t\t\t+ \" 00:00:00' and '\" + date.get(1) + \" 23:59:59' group by fuelType;\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"fuelType\", rs.getString(\"fuelType\"));\r\n\t\t\t\t\torder.addProperty(\"totalAmountOfFuel\", rs.getString(\"totalAmountOfFuel\"));\r\n\t\t\t\t\ttotalPriceOfFuel = String.format(\"%.3f\", Double.parseDouble(rs.getString(\"totalPriceOfFuel\")));\r\n\t\t\t\t\torder.addProperty(\"totalPriceOfFuel\", totalPriceOfFuel);\r\n\t\t\t\t\tfastFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn fastFuelOrders;\r\n\r\n\t}", "public Quarter() { // note: null fields exist for this option\n courses = new ArrayList<Course>();\n }", "public void setStartYear(int startYear) {\n\t\tthis.startYear = startYear;\n\t}", "public double[] getRange();", "public List<Integer> getByYearDay() {\n\t\treturn byYearDay;\n\t}", "public static void main(String[] args) {\n Random randy = new Random();\r\n for (int i = 0; i < 2019; i++) {\r\n printYear(i, randy.nextInt(7), false);\r\n }\r\n //printYear(2007, 5, false);\r\n }", "List<Timetable> getCurriculum(String specialty_YearID,String term)throws Exception;", "public int getQuarters()\n {\n\treturn quarters;\n }", "Integer getTenYear();", "Year createYear();", "java.lang.String getEndDateYYYY();", "com.google.protobuf.ByteString\n getStartDateYYYYBytes();", "public static void main(String[] args) {\n//\t\tOutput:\n//\t\tIt is year 2011\n//\t\tIt is year 2012\n//\t\tIt is year 2013\n//\t\tIt is year 2014\n//\t\tIt is year 2015\n//\t\tIt is year 2016\n//\t\tIt is year 2017\n//\t\tIt is year 2018\n\n\t\tfor(int i=2011;i<2019;i++) {\n\t\t\tSystem.out.println(\"It is year \" +i);\n\t\t}\n\t}", "ImmutableList<SchemaOrgType> getCopyrightYearList();", "public int getEndingYear()\n {\n return -1;\n }", "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n return Arrays.asList(indepDay, laborDay);\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "public static ArrayList<LocalDate> getPhDates() {\r\n \tArrayList<Date> phDates = phRepo.findAllPublicHolidayDates();\r\n \tArrayList<LocalDate> phLocalDates = new ArrayList<LocalDate>();\r\n \t\r\n\t\tfor(Date phDate : phDates) {\r\n\t\t\tphLocalDates.add(phDate.toLocalDate());\r\n\t\t}\r\n\t\t\r\n\t\treturn phLocalDates;\r\n }", "public int getYear()\n {\n return yr;\n }", "public int getDocumentYear();", "public List<Integer> getListYears() {\n return listYears;\n }", "private void initYear(Integer year) {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(year, i));\n }\n }", "public static Date getYearStartDateByDate(Date idate) {\n\t\t int iyear = Utilities.getYearByDate(idate);\n\t\t \n\t\t Calendar c = Calendar.getInstance();\n\t\t c.set(iyear, 0, 1);\n\n\t\t return c.getTime(); \n\t}", "private String[][] getActiveProjects(String[][] projectArray) throws ParseException\n\t{\n\t\tDate projectStartDate;\n\t\tDate projectEndDate;\n\t\t\n\t\t//variable to find out the indexes based on comparison\n\t\tArrayList<Integer> arrayToStoreIndexOfReqProjects = new ArrayList<Integer>();\n\t\t\n\t\t//variable to store rows for desired indexes of the actual array\n\t\tString[][] projectDetailsForReqFYAndQuarter = null;\t\t\n\t\t\t\t\n\t\tint projectsCountForReqFYandQuarter;\t\t\n\t\t\n\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\t\t\n\t\tDate date = new Date();\t\t\n\t\tsystemDate = dateFormat.format(date);\t\t\n\t\tDate sysdateInDateFormat = dateFormat.parse(systemDate);\n\t\t\n\t\t//loop to get the index for matching value\n\t\tfor (int i = 0; i < projectArray.length; i++) \n\t\t{\t\n\t\t\tprojectStartDate = dateFormat.parse(projectArray[i][6]);\n\t\t\tprojectEndDate = dateFormat.parse(projectArray[i][5]);\n\n\t\t\tif ((projectEndDate.compareTo(sysdateInDateFormat) >= 0 && projectStartDate.compareTo(sysdateInDateFormat) <= 0)\n\t\t\t\t\t&& (projectArray[i][7]!=null)) \n\t\t\t{\n\t\t\t\tarrayToStoreIndexOfReqProjects.add(i);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\t\n\t\tprojectsCountForReqFYandQuarter = arrayToStoreIndexOfReqProjects.size();\n\t\t\n\t\tprojectDetailsForReqFYAndQuarter = new String[projectsCountForReqFYandQuarter][8];\n\t\t\n\t\tint projectRowToGetDetailsFrom;\n\t\t\n\t\t//loop to insert values based on the indexes got from the above loop\n\t\tfor (int j = 0; j < projectDetailsForReqFYAndQuarter.length; j++) \n\t\t{\n\t\t\tprojectRowToGetDetailsFrom = arrayToStoreIndexOfReqProjects.get(j);\n\t\t\t\n\t\t\tprojectDetailsForReqFYAndQuarter[j][0] = projectArray[projectRowToGetDetailsFrom][0];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][1] = projectArray[projectRowToGetDetailsFrom][1];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][2] = projectArray[projectRowToGetDetailsFrom][2];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][3] = projectArray[projectRowToGetDetailsFrom][3];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][4] = projectArray[projectRowToGetDetailsFrom][4];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][5] = projectArray[projectRowToGetDetailsFrom][5];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][6] = projectArray[projectRowToGetDetailsFrom][6];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][7] = projectArray[projectRowToGetDetailsFrom][7];\n\t\t}\n\t\t\t\t\n\t\treturn projectDetailsForReqFYAndQuarter;\n\t\t\n\t}", "private void populateYears(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT DISTINCT year FROM album ORDER BY year\");\n\n while(results.next()){\n Integer year = results.getInt(1);\n yearList.add(year);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "java.lang.String getStartDateYYYYMMDD();", "public int trimestre(LocalDate d);", "public static final int getReleaseYear() { return 2019; }", "public <Q> Q[] asDataArray(Q[] a);", "public SerialDate getDate(final int year) {\n SerialDate result;\n if (this.count != SerialDate.LAST_WEEK_IN_MONTH) {\n // start at the beginning of the month\n result = SerialDate.createInstance(1, this.month, year);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(1, result);\n }\n result = SerialDate.addDays(7 * (this.count - 1), result);\n\n }\n else {\n // start at the end of the month and work backwards...\n result = SerialDate.createInstance(1, this.month, year);\n result = result.getEndOfCurrentMonth(result);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(-1, result);\n }\n\n }\n return result;\n }", "public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = LocalDate.of(2014, Month.JANUARY, 20);\n\t\tdate = date.plus(annually);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(Period.of(0, 20, 47)); // P20M47D\n\t\tSystem.out.println(Period.of(2, 20, 47)); // P2Y20M47D\n\t}", "public Date get2DigitYearStart() {\n\t\treturn getDefaultCenturyStart();\n\t}", "@Override\n\tpublic List<Project> findProjectsByStartDateRange(int ownerAccountId,\n\t\t\tDateTime fromDate, DateTime toDate, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByDateTimeRange(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.StartDate\", fromDate, toDate, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public int[] getYearLabels() {\r\n return yearLabels;\r\n }", "@Test\n void generateBalanceSheetHeadingWithLocalDate() {\n assertEquals(\"2017\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2016-01-01\"), LocalDate.parse(\"2017-01-14\"), false));\n\n // Test 381 days shows month (more than 12 month period)\n assertEquals(\"13 months to 16 February 2016\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2015-02-01\"), LocalDate.parse(\"2016-02-16\"), false));\n\n // Test 349 days shows month (less than 12 month period)\n assertEquals(\"11 months to 1 January 2017\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2016-01-19\"), LocalDate.parse(\"2017-01-01\"), false));\n\n // Test exactly 381 days shows months leap year\n assertEquals(\"13 months to 16 February 2015\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2014-02-01\"), LocalDate.parse(\"2015-02-16\"), false));\n\n // Test 336 days shows 'month' rather than 'months'\n assertEquals(\"1 month to 1 April 2015\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2015-03-07\"), LocalDate.parse(\"2015-04-01\"), false));\n\n // Test that 0 month result shows correctly as '1 month'\n assertEquals(\"1 month to 31 March 2010\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2010-03-18\"), LocalDate.parse(\"2010-03-31\"), false));\n\n // \"Test exactly 351 days show yyyy\"\n assertEquals(\"2015\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2014-04-01\"), LocalDate.parse(\"2015-03-16\"), false));\n\n // Test exactly 351 days show years leap year\n assertEquals(\"2016\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2015-04-01\"), LocalDate.parse(\"2016-03-16\"), false));\n\n // Test 1st year filing within 15 days either side of 1 year period with same\n // year is just year\n assertEquals(\"30 June 2015\",\n datesHelper.generateBalanceSheetHeading(LocalDate.parse(\"2014-06-01\"), LocalDate.parse(\"2015-06-30\"), true));\n }", "public static final String[] getDayMonthYear(Date aDate, boolean isAddSpace) {\r\n String[] dmys = new String[3];\r\n if (aDate != null) {\r\n Calendar cal=Calendar.getInstance();\r\n cal.setTime(aDate);\r\n int day = cal.get(Calendar.DAY_OF_MONTH);\r\n if (day<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = \"0 \" + day;\r\n \t } else {\r\n \t\t dmys[0] = \"0\" + day;\r\n \t }\r\n } else {\r\n \t String tmp = day + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[0] = tmp;\r\n \t }\r\n }\r\n int month = cal.get(Calendar.MONTH) + 1;\r\n if (month<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = \"0 \" + month;\r\n \t } else {\r\n \t\t dmys[1] = \"0\" + month;\r\n \t }\r\n } else {\r\n \t String tmp = month + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[1] = tmp;\r\n \t }\r\n }\r\n String year = cal.get(Calendar.YEAR) + \"\";\r\n if (isAddSpace) {\r\n \t dmys[2] = year.substring(0, 1) + \" \" + year.substring(1, 2) + \" \" + year.substring(2, 3) + \" \" + year.substring(3, 4);\r\n } else {\r\n \t dmys[2] = year;\r\n }\r\n }\r\n return dmys;\r\n }", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "public ArrayList<QueryParameter> downloadExcel() {\n ArrayList<QueryParameter> queries = new ArrayList<QueryParameter>(this.query.interval);\n for (int i = 0; i < this.query.interval; i++) {\n QueryParameter query = new QueryParameter(this.query.year - i);\n queries.add(query);\n this.downloadSingleExcel(query);\n }\n return queries;\n }", "public DateTimeFormatterBuilder appendYearOfEra(int minDigits, int maxDigits) {\r\n return appendDecimal(DateTimeFieldType.yearOfEra(), minDigits, maxDigits);\r\n }", "protected static int[] range(int start, int end_incl) {\n int[] arr = new int[end_incl - start + 1];\n for(int num = start, id = 0; num <= end_incl; num++, id++)\n arr[id] = num;\n return arr;\n }", "@GetMapping(\"/api/getByYear\")\n\tpublic int[] getProjectByYear()\n\t{\n\t\treturn this.integrationClient.getProjectByYear();\n\t}", "public int getEndYear()\n {\n return indicators[indicators.length - 1].getYear();\n }", "public DateTimeFormatterBuilder appendYear(int minDigits, int maxDigits) {\r\n return appendSignedDecimal(DateTimeFieldType.year(), minDigits, maxDigits);\r\n }" ]
[ "0.6837665", "0.6440035", "0.6115472", "0.58956265", "0.5787264", "0.5681846", "0.56300324", "0.5595777", "0.55634975", "0.54175776", "0.54152477", "0.5396989", "0.53451395", "0.53233916", "0.52697724", "0.51749015", "0.5148276", "0.51449406", "0.5132057", "0.51147234", "0.51091856", "0.5098504", "0.5095119", "0.5062637", "0.50597936", "0.5049559", "0.50479114", "0.50025105", "0.4975899", "0.49600565", "0.4957857", "0.49332947", "0.49282655", "0.4881221", "0.48734185", "0.48705816", "0.48601076", "0.48537412", "0.48324946", "0.48224172", "0.482169", "0.48182514", "0.4817761", "0.48160344", "0.47752193", "0.47724783", "0.47677052", "0.4760058", "0.4748238", "0.474497", "0.4741123", "0.47375718", "0.47233555", "0.47229356", "0.47024903", "0.46957222", "0.46904063", "0.46887127", "0.46806428", "0.46726948", "0.46624005", "0.46580055", "0.46499786", "0.46496925", "0.46477643", "0.46476394", "0.46121296", "0.46080327", "0.46025518", "0.45797178", "0.4573254", "0.4567534", "0.4543219", "0.45405206", "0.4533825", "0.45302898", "0.4526894", "0.4526438", "0.4517871", "0.4517266", "0.4501561", "0.44965404", "0.44818333", "0.4479786", "0.44745612", "0.44723052", "0.44720602", "0.44696942", "0.4466231", "0.44649535", "0.44590878", "0.44560167", "0.44523805", "0.4451533", "0.4450088", "0.44405517", "0.44359416", "0.44339487", "0.44327185", "0.44325155" ]
0.7441198
0
Returns an array of Dates starting with the first day of each week of the year.
public static LocalDate[] getFirstDayWeekly(final int year) { final List<LocalDate> dates = new ArrayList<>(); LocalDate localDate = LocalDate.ofYearDay(year, 1).with(TemporalAdjusters.previousOrSame(DayOfWeek.SUNDAY)); final LocalDate testDate = LocalDate.ofYearDay(year, 1); if (testDate.getDayOfWeek() == DayOfWeek.THURSDAY) { dates.add(testDate.minusDays(4)); } for (int i = 0; i <= 53; i++) { if (localDate.getYear() == year) { dates.add(localDate); } localDate = localDate.plusWeeks(1); } return dates.toArray(new LocalDate[dates.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "public static LocalDate[] getAllDays(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n for (int i = 1; i <= getDaysInYear(year); i++) {\n dates.add(LocalDate.ofYearDay(year, i));\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "public static LocalDate[] getFirstDayQuarterly(final int year) {\n LocalDate[] bounds = new LocalDate[4];\n\n bounds[0] = LocalDate.of(year, Month.JANUARY, 1);\n bounds[1] = LocalDate.of(year, Month.APRIL, 1);\n bounds[2] = LocalDate.of(year, Month.JULY, 1);\n bounds[3] = LocalDate.of(year, Month.OCTOBER, 1);\n\n return bounds;\n }", "public static ArrayList<LocalDate> getPhDates() {\r\n \tArrayList<Date> phDates = phRepo.findAllPublicHolidayDates();\r\n \tArrayList<LocalDate> phLocalDates = new ArrayList<LocalDate>();\r\n \t\r\n\t\tfor(Date phDate : phDates) {\r\n\t\t\tphLocalDates.add(phDate.toLocalDate());\r\n\t\t}\r\n\t\t\r\n\t\treturn phLocalDates;\r\n }", "public static Date getStartDateOfWeek(String year, String week) {\n \n \n int y;\n int w;\n if (year != null && year.length() == 4 && year.matches(\"^-?\\\\d+$\") && week != null && week.matches(\"^-?\\\\d+$\")) {\n y = Integer.parseInt(year);\n w = Integer.parseInt(week);\n } else {\n Calendar calendar = Calendar.getInstance(); \n calendar.setFirstDayOfWeek(1);\n calendar.setMinimalDaysInFirstWeek(1);\n\n y = calendar.get(Calendar.YEAR);\n w = calendar.get(Calendar.WEEK_OF_YEAR);\n }\n return getStartDateOfWeek(y, w);\n }", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n return Arrays.asList(indepDay, laborDay);\n }", "private void initYear() {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(i));\n }\n }", "public ArrayList<Event> getCalendarEventsByWeek()\n {\n ArrayList<Event> weekListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)) &&\n (events.get(i).getCalendar().get(Calendar.WEEK_OF_MONTH) == currentCalendar.get(Calendar.WEEK_OF_MONTH)))\n {\n weekListOfEvents.add(events.get(i));\n }\n }\n return weekListOfEvents;\n }", "public List<LocalDate> createLocalDates( final int size ) {\n\n\t\tfinal List<LocalDate> list = new ArrayList<>(size);\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tlist.add(LocalDate.ofEpochDay(i));\n\t\t}\n\n\t\treturn list;\n\t}", "public static List<Date> getAllDatesInWeek(Date dateInWeek) {\n\t\tList<Date> allWeek = new ArrayList<Date>(7);\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.MONDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.TUESDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.WEDNESDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.THURSDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.FRIDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.SATURDAY));\n\t\tallWeek.add(getDateInWeek(dateInWeek, Calendar.SUNDAY));\n\t\treturn allWeek;\n\t}", "public Date getWeekStartDate(Date date) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n return cal.getTime();\n }", "private int[] setDaysOfWeek() {\n int[] daysOfWeek = new int[7];\n\n for (int i = 0; i < 6; i++) {\n daysOfWeek[i] = calculateNumberOfDaysOfWeek(DayOfWeek.of(i + 1));\n }\n\n return daysOfWeek;\n }", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "private void initYear(Integer year) {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(year, i));\n }\n }", "public static WithAdjuster firstDayOfYear() {\n\n return Impl.FIRST_DAY_OF_YEAR;\n }", "public void testDate() throws Exception {\r\n Calendar cal = Calendar.getInstance();\r\n Date d = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(\"2015-01-01 00:00:00\");\r\n cal.setTime(d);\r\n System.out.println(cal.get(Calendar.WEEK_OF_YEAR));\r\n\r\n d = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(\"2014-12-31 11:59:59\");\r\n cal.setTime(d);\r\n System.out.println(cal.get(Calendar.WEEK_OF_YEAR));\r\n\r\n cal.setTime(new Date());\r\n System.out.println(cal.get(Calendar.WEEK_OF_YEAR));\r\n }", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "public static Date[] getStartEndDateOfLastSpecifiedWeeks(final int num, final String timeZone) {\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n final Date currentDate = DateContent.formatStringIntoDate(currentDateStr, DateContent.YYYY_MM_DD_HH_MM_SS);\n\n final Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.setFirstDayOfWeek(Calendar.MONDAY);\n calendar.add(Calendar.WEEK_OF_YEAR, -1);\n calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n Date endDateTime = calendar.getTime();\n\n calendar.add(Calendar.WEEK_OF_YEAR, -(num - 1));\n calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n Date startDateTime = calendar.getTime();\n\n endDateTime = DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone);\n startDateTime = DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone);\n return new Date[]{startDateTime, endDateTime};\n }", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "public Week(LocalDate date) {\n days = new ArrayList<>();\n LocalDate monday = getStartOfWeek(date);\n days.add(monday);\n for (int i = 1; i < 7; i++) {\n days.add(monday.plusDays(i));\n }\n }", "public static WithAdjuster firstDayOfNextYear() {\n\n return Impl.FIRST_DAY_OF_NEXT_YEAR;\n }", "private int getFirstRepresentingDay() {\n\t\tint firstRepresentingDay;\r\n\t\tGregorianCalendar myCalendar = new GregorianCalendar(year, month, 1);\r\n\r\n\t\tint daysofMonth = myCalendar.getActualMaximum(Calendar.DAY_OF_MONTH);\r\n\t\tint firstDayMonth = myCalendar.get(Calendar.DAY_OF_WEEK); // First day of month (relative to the week)\r\n\t\tint globalFirstDayMonth = myCalendar.get(Calendar.DAY_OF_YEAR);\r\n\r\n\t\tif (settings.getBoolean(\"firstDayofWeek\", true)) { //The default option is the week starting on monday\r\n\t\t\tfirstDayMonth = firstDayMonth - 1;\r\n\t\t\tif (firstDayMonth == 0)\r\n\t\t\t\tfirstDayMonth = 7;\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\telse { //else we start the week on Sunday\r\n\t\t\tfirstRepresentingDay = globalFirstDayMonth - (firstDayMonth - 1);\r\n\t\t}\r\n\t\tif (firstDayMonth + daysofMonth < 37)\r\n\t\t\tcount = RingActivity.five_week_calendar;\r\n\t\telse\r\n\t\t\tcount = RingActivity.six_week_calendar;\r\n\r\n\t\treturn firstRepresentingDay;\r\n\t}", "@Override\n public int firstDayOfMonthInWeek() {\n int y = getYear();\n int m = getMonth()-1;\n XCalendar xCalendar = XCalendar.fromJalali(y,m,1);\n Calendar cc = Calendar.getInstance();\n int yy = xCalendar.getCalendar(XCalendar.GregorianType).getYear();\n int mm = xCalendar.getCalendar(XCalendar.GregorianType).getMonth()-1;\n int dd = xCalendar.getCalendar(XCalendar.GregorianType).getDay();\n cc.set(yy,mm,dd);\n int d = firstDayOfWeek[cc.get(Calendar.DAY_OF_WEEK)-1];\n return d;\n }", "private void populateWeeks(YearlySchedule yearlySchedule) {\n\t\tMap<Integer, Set<DailySchedule>> weeksMap = yearlySchedule.getWeeks();\n\t\t\n\t\tfor (Iterator<MonthlySchedule> iterator = yearlySchedule.getMonthlySchedule().values().iterator(); iterator.hasNext();) {\n\t\t\tMonthlySchedule monthSchedule = (MonthlySchedule) iterator.next();\n\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.set(Calendar.YEAR, yearlySchedule.getYearValue());\n\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue());\n\t\t\tcalendar.set(Calendar.DATE, 1);\n\t\t\tint numDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\n\t\t\tfor(int day=1;day<=numDays;day++){ // ITERATE THROUGH THE MONTH\n\t\t\t\tcalendar.set(Calendar.DATE, day);\n\t\t\t\tint dayofweek = calendar.get(Calendar.DAY_OF_WEEK);\n\t\t\t\tint weekofyear = calendar.get(Calendar.WEEK_OF_YEAR);\n\n\t\t\t\tSet<DailySchedule> week = null;\n\t\t\t\tif(monthSchedule.getMonthValue() == 11 && weekofyear == 1){ // HANDLE 1st WEEK OF NEXT YEAR\n\t\t\t\t\tYearlySchedule nextyear = getYearlySchedule(yearlySchedule.getYearValue()+1);\n\t\t\t\t\tif(nextyear == null){\n\t\t\t\t\t\t// dont generate anything \n\t\t\t\t\t\t// advance iterator to end\n\t\t\t\t\t\tday = numDays;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tweek = nextyear.getWeeks().get(weekofyear);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tweek = weeksMap.get(weekofyear);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(week == null){\n\t\t\t\t\tweek = new HashSet<DailySchedule>();\n\t\t\t\t\tweeksMap.put(weekofyear, week);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(dayofweek == 1 && day+6 <= numDays){ // FULL 7 DAYS\n\t\t\t\t\tfor(int z=day; z<=day+6;z++){\n\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(z));\n\t\t\t\t\t}\n\t\t\t\t\tday += 6; // Increment to the next week\n\t\t\t\t}else if (dayofweek == 1 && day+6 > numDays){ // WEEK EXTENDS INTO NEXT MONTH\n\t\t\t\t\tint daysInNextMonth = (day+6) - numDays;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN NEXT MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()+1 <= 11){ // IF EXCEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK \n\t\t\t\t\t\tMonthlySchedule nextMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()+1, yearlySchedule.getYearValue()); // GET NEXT MONTH\n\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\tweek.add(nextMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO NEXT YEAR\n\t\t\t\t\t\t// TODO SHOULD SCHEDULE CONSIDER ROLLING OVER INTO NEXT AND PREVIOUS YEARS???\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule nextMonthScheudle = getScheduleForMonth(0, yearlySchedule.getYearValue()+1); // GET JANUARY MONTH OF NEXT YEAR\n\t\t\t\t\t\t\tfor(int n = 1; n<=daysInNextMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(nextMonthScheudle.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<=numDays; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak; // DONE WITH CURRENT MONTH NO NEED TO CONTINUE LOOPING OVER MONTH\n\t\t\t\t}else if(day-dayofweek < 0){ // WEEK EXTENDS INTO PREVIOUS MONTH\n\t\t\t\t\tint daysInPreviousMonth = dayofweek-day;\n\t\t\t\t\tint daysInCurrentMonth = 7-daysInPreviousMonth;\n\t\t\t\t\t\n\t\t\t\t\t// GET DAYS IN PREVIOUS MONTH\n\t\t\t\t\tif(monthSchedule.getMonthValue()-1 >= 0){ // IF PRECEEDS CURRENT CALENDAR HANDLE IN ESLE BLOCK\n\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(monthSchedule.getMonthValue()-1, yearlySchedule.getYearValue()); // GET PREVIOUS MONTH\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\n\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t// TODO HANDLE ROLL OVER INTO PREVIOUS YEAR **DONE**\n\t\t\t\t\t\tif(!exceedRange(yearlySchedule.getYearValue()-1)){\n\t\t\t\t\t\t\tMonthlySchedule previousMonthSchedule = getScheduleForMonth(11, yearlySchedule.getYearValue()-1); // GET DECEMEBER MONTH OF PREVIOUS YEAR\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, previousMonthSchedule.getMonthValue());\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, previousMonthSchedule.getYearValue());\n\t\t\t\t\t\t\tint numDaysInPreviousMonth = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int n = numDaysInPreviousMonth-(daysInPreviousMonth-1); n<=numDaysInPreviousMonth; n++){ // WHICH DAY TO START ON IN PREVIOUS MONTH\n\t\t\t\t\t\t\t\tweek.add(previousMonthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcalendar.set(Calendar.MONTH, monthSchedule.getMonthValue()); // RESET CALENDAR MONTH BACK TO CURRENT\n\t\t\t\t\t\t\tcalendar.set(Calendar.YEAR, monthSchedule.getYearValue()); // RESET CALENDAR YEAR BACK TO CURRENT\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// GET DAYS IN CURRENT MONTH\n\t\t\t\t\t\t\tfor(int n = day; n<day+daysInCurrentMonth; n++){\n\t\t\t\t\t\t\t\tweek.add(monthSchedule.getDailySchedule().get(n));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tday += (daysInCurrentMonth-1); // Increment to the next week (-1 because ITERATION WITH DO A ++ )\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public SerialDate getDate(final int year) {\n SerialDate result;\n if (this.count != SerialDate.LAST_WEEK_IN_MONTH) {\n // start at the beginning of the month\n result = SerialDate.createInstance(1, this.month, year);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(1, result);\n }\n result = SerialDate.addDays(7 * (this.count - 1), result);\n\n }\n else {\n // start at the end of the month and work backwards...\n result = SerialDate.createInstance(1, this.month, year);\n result = result.getEndOfCurrentMonth(result);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(-1, result);\n }\n\n }\n return result;\n }", "static DateTime GetFirstXWeekdayOfMonth(int iXDayOfWeek, int iYear,\n int iMonth) {\n DateTime dmFirstOfMonth = new DateMidnight(iYear, iMonth, 1)\n .toDateTime();\n int dayOfWeek = dmFirstOfMonth.getDayOfWeek();\n int daysToAdd = iXDayOfWeek - dayOfWeek;\n if (iXDayOfWeek < dayOfWeek) {\n daysToAdd += 7;\n }\n return dmFirstOfMonth.plusDays(daysToAdd);\n }", "public long startOfThisWeek() {\r\n\t\tfinal Calendar mc = Calendar.getInstance();\r\n\t\tmc.setTimeZone(mC.getTimeZone());\r\n\t\tint d = mC.get(Calendar.DAY_OF_WEEK);\r\n\t\tmc.set(mC.get(Calendar.YEAR), \r\n\t\t\t\tmC.get(Calendar.MONTH), \r\n\t\t\t\tmC.get(Calendar.DAY_OF_MONTH) - d + 1, 0, 0, 0);\r\n\t\treturn mc.getTimeInMillis();\r\n\t}", "public ArrayList<Event> getEventsByToday() {\n\t\tArrayList<Event> result = new ArrayList<Event>();\n\t\tCalendar today = Calendar.getInstance();\n\t\tfor (int i = 0; i < events.size(); i++) {\n\t\t\tif (events.get(i).getInitial_date().get(Calendar.YEAR) == today.get(Calendar.YEAR)\n\t\t\t\t\t&& events.get(i).getInitial_date().get(Calendar.MONTH) == today.get(Calendar.MONTH)\n\t\t\t\t\t&& events.get(i).getInitial_date().get(Calendar.DAY_OF_MONTH) == today.get(Calendar.DAY_OF_MONTH)) {\n\t\t\t\tresult.add(events.get(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public Date212[] getNumbDates(int a){ //a is the number that signfies the dates passed in.\n // System.out.println(a+ \"a is\");\n Date212 myDates[] = new Date212[a]; //initalize it from the a.\n\n for(int d = 0; d< myTempDates.length; d++){ //that \"myTempDates\" array which holds the dates is used to copy it into the specified array.\n if(myTempDates[d] != null){ //if next index is not null then copy.\n myDates[d] = myTempDates[d];\n }\n }\n return myDates; //return the array to method calling it!\n }", "public List<Week> getAllWeeks() { return weekService.getAllWeeks(); }", "public static int GetDayOfWeek(int[] dateTime){\n int yr = dateTime[0];\n int mo = dateTime[1];\n int da = dateTime[2];\n int addon = 0; /* number of days that have advanced */\n boolean leap; /* is this year a leap year? */\n yr %= 400;\n if (yr < 0) yr += 400;\n /* is the current year a leap year? */\n if (((((yr % 4) == 0) && ((yr % 100) != 0)) || ((yr % 400) == 0))) {\n leap = true;\n } else leap = false;\n if ((mo < 1) || (mo > 12)) return 0; /* validate the month */\n if (da < 1) return 0; /* and day of month */\n if (leap && (mo == 2)) {\n if (da > (numdays[mo - 1] + 1)) return 0;\n } else if (da > numdays[mo - 1]) return 0;\n addon += yr; /* The day advances by one day every year */\n addon += yr / 4; /* An additional day if it is divisible bay 4 */\n addon -= yr / 100; /* Unless it is divisible by 100 */\n /* However, we should not count that\n extra day if the current year is a leap\n year and we haven't gone past 29th February */\n if (leap && (mo <= 2)) addon--;\n addon += totdays[mo - 1]; /* The day of the week increases by\n the number of days in all the months\n up till now */\n addon += da; /* the day of week advances for each day */\n /* Now as we all know, 2000-01-01 is a Saturday. Using this\n as our reference point, and the knowledge that we want to\n return 0..6 for Sunday..Saturday,\n we find out that we need to compensate by adding 6. */\n addon += 6;\n return (addon % 7); /* the remainder after dividing by 7\n gives the day of week */\n }", "public void createWeeklyList(){\n\t\tArrayList<T> days=new ArrayList<T>();\n\t\tArrayList<ArrayList<T>> weeks=new ArrayList<ArrayList<T>> ();\n\t\tList<ArrayList<ArrayList<T>>> years=new ArrayList<ArrayList<ArrayList<T>>> ();\n\t\tif(models.size()!=0) days.add(models.get(models.size()-1));\n\t\telse return;\n\t\tfor(int i=modelNames.size()-2;i>=0;i--){\n\t\t\t//check the new entry\n\t\t\tCalendar pre=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i+1)));\n\t\t\tCalendar cur=DateManager.getCalendar(DateManager.convert2DisplayDate(modelNames.get(i)));\n\t\t\tif (pre.get(Calendar.YEAR)==cur.get(Calendar.YEAR)){\n\t\t\t\tif(pre.get(Calendar.WEEK_OF_YEAR)==cur.get(Calendar.WEEK_OF_YEAR)){\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tweeks.add(days);\n\t\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\t\tdays.add(models.get(i));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tweeks.add(days);\n\t\t\t\tyears.add(weeks);\n\t\t\t\tdays=new ArrayList<T>();\n\t\t\t\tdays.add(models.get(i));\n\t\t\t\tweeks=new ArrayList<ArrayList<T>> ();\n\t\t\t}\n\t\t}\n\t\tweeks.add(days);\n\t\tyears.add(weeks);\n\t\tweeklyModels=years;\n\n\t}", "public static void main(String[] args) throws ParseException {\n\n List<String> weeks = getWeeks(dateFormat.parse(\"2019-01-01\"),dateFormat.parse(\"2019-02-01\"));\n for (String s:weeks) {\n System.out.println(s);\n }\n\n System.out.println(getStartDayOfWeekNo(2019,1));\n System.out.println(getEndDayOfWeekNo(2019,1));\n }", "public TextView[] Weekdays(){\n Resources r = getResources();\n String name = getPackageName();\n String WeekDays[]={\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"};\n String DummyWeekDays[]={\"F1\",\"F2\",\"F3\",\"F4\",\"F5\",\"F6\",\"F7\"};\n TextView Weekdays[]=new TextView[7];\n DropDownCalendar.setCurrentDate(Calendar.getInstance());\n for(int i=0;i<WeekDays.length;++i) {\n TextView weekday,dummyWeekday;\n weekday = (TextView) findViewById(r.getIdentifier(WeekDays[i], \"id\", name));\n dummyWeekday=(TextView)findViewById(r.getIdentifier(DummyWeekDays[i],\"id\",name));\n Weekdays[i]=weekday;\n dummyWeekday.setTextColor(Color.TRANSPARENT);\n dummyWeekday.setHintTextColor(Color.TRANSPARENT);\n MaskWeekdays[i]=dummyWeekday;;\n\n }\n return Weekdays;\n }", "public List<Integer> getByYearDay() {\n\t\treturn byYearDay;\n\t}", "public List<LocalDate> getRosterDatesAsList() {\n ArrayList<LocalDate> localDates = new ArrayList<>(roster.keySet());\n Collections.sort(localDates);\n return localDates;\n }", "public Date getCurrentWeekStart() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek());\n\n Date currentWeekStart = cal.getTime();\n\n return currentWeekStart;\n }", "public static final Function<Date,Date> setWeek(final int value) {\r\n return new Set(Calendar.WEEK_OF_YEAR, value);\r\n }", "public static List<Date> initDates(Integer daysIntervalSize) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DATE, -((daysIntervalSize / 2) + 1));\n for (int i = 0; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "public Date getEarliestStartDate();", "public String firstDayOfWeek(){\n cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n return (\"Mon\" + \" \" + cal.get(Calendar.DATE) + \" \" + cal.get(Calendar.MONTH) + \" \" + cal.get(Calendar.YEAR));\n }", "public static List<Date> getTradeDays() {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt \"\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public static Date[] getLastYearDateRange(String timeZone) {\n\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH, -1);\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n final Date endDateTime = calendar.getTime();\n\n calendar = Calendar.getInstance();\n calendar.add(Calendar.YEAR, -1);\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n final Date startDateTime = calendar.getTime();\n\n return new Date[]{DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone), DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone)};\n }", "public static Date firstDay(final Date date) {\n final Calendar cal = new GregorianCalendar();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_MONTH, cal.getMinimum(Calendar.DAY_OF_MONTH));\n cal.set(Calendar.HOUR_OF_DAY, 00);\n cal.set(Calendar.MINUTE, 00);\n cal.set(Calendar.SECOND, 00);\n cal.set(Calendar.MILLISECOND, 00);\n return cal.getTime();\n }", "static DateTime GetFirstXWeekdayOfMonthAfterYMonthday(int iXDayOfWeek,\n int iYMonthDay, int iYear, int iMonth) {\n assert 1 <= iYMonthDay && iYMonthDay <= 31;\n DateTime dmFirstXDayOfMonth = GetFirstXWeekdayOfMonth(iXDayOfWeek,\n iYear, iMonth);\n while (dmFirstXDayOfMonth.getDayOfMonth() <= iYMonthDay) {\n dmFirstXDayOfMonth.plusWeeks(1);\n }\n return dmFirstXDayOfMonth;\n }", "public static Week activateInstantiateWeek(LocalDate startDate){\n return InstantiateWeek.instantiateWeek(startDate);\n }", "public DateTimeFormatterBuilder appendWeekOfWeekyear(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.weekOfWeekyear(), minDigits, 2);\r\n }", "LocalDate getCollectionBeginDate();", "public Integer[][] getAll() {\r\n return weekData;\r\n }", "private List<WeeklyRecord> getWeekly(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\n\t\t\t\t\"SELECT \\n\" + \n\t\t\t\t\"(CASE WHEN day(Date) < 8 THEN '1' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(DATE) < 15 then '2' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 22 then '3' \\n\" + \n\t\t\t\t\" ELSE CASE WHEN day(Date) < 29 then '4' \\n\" + \n\t\t\t\t\" ELSE '5'\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\" END\\n\" + \n\t\t\t\t\"END) as Week, SUM(Amount) From transaction\\n\" + \n\t\t\t\t\"WHERE DATE between ? and ?\\n\" + \n\t\t\t\t\"and type = ?\\n\" + \n\t\t\t\t\"group by Week\")) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<WeeklyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\t\t\t\n\t\t\t\t\tlist.add(new WeeklyRecord(resultSet.getDouble(2),resultSet.getInt(1)));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public static TemporalQuery<Integer> dayOfWeek(){\n return (d) -> d.get(ChronoField.DAY_OF_WEEK);\n }", "public static List<WeekDay> convertWeekDays(int bitMask) {\r\n\t\tArrayList<WeekDay> days = new ArrayList<WeekDay>();\r\n\t\r\n\t\t// value = ((byte)bitMask) & (0x01 << position);\r\n\t\tif ((((byte)bitMask) & (0x01 << 7)) > 0)\r\n\t\t\tdays.add(WeekDay.MONDAY);\r\n\t\tif ((((byte)bitMask) & (0x01 << 6)) > 0)\r\n\t\t\tdays.add(WeekDay.TUESDAY);\r\n\t\tif ((((byte)bitMask) & (0x01 << 5)) > 0)\r\n\t\t\tdays.add(WeekDay.WEDNESDAY);\r\n\t\tif ((((byte)bitMask) & (0x01 << 4)) > 0)\r\n\t\t\tdays.add(WeekDay.THURSDAY);\r\n\t\tif ((((byte)bitMask) & (0x01 << 3)) > 0)\r\n\t\t\tdays.add(WeekDay.FRIDAY);\r\n\t\tif ((((byte)bitMask) & (0x01 << 2)) > 0)\r\n\t\t\tdays.add(WeekDay.SATURDAY);\r\n\t\tif ((((byte)bitMask) & (0x01 << 1)) > 0)\r\n\t\t\tdays.add(WeekDay.SUNDAY);\r\n\t\t\r\n\t\treturn days;\r\n\t}", "public List<Date> convertXMLGregorianCalendarList(List<XMLGregorianCalendar> alist){\n\t\tList<Date> blist = new ArrayList<Date>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( this.getDate(alist.get(i)) );\n\t\t}\n\t\treturn blist;\n\t}", "@Override\n public void onWeekChange(List<Calendar> weekCalendars) {\n String firstDateString = weekCalendars.get(0).toString();\n try {\n firstDateOfWeek = sdfLibraryDate.parse(firstDateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n assert firstDateOfWeek != null;\n firstDateString = sdfMyDate.format(firstDateOfWeek);\n try {\n firstDateOfWeek = sdfMyDate.parse(firstDateString);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n Log.e(\"HDT0309\", \"firstDateOfWeek \" + firstDateOfWeek); //Oke\n ///\n for (Calendar calendar : weekCalendars) {\n //Log.e(\"HDT0309\", \"(3)onWeekChange:\" + calendar.toString());\n }\n }", "public ArrayList<Event> remainingEventsForTheWeek() {\n\t\tArrayList<Event> result = new ArrayList();\n\n\t\tLocalDateTime now = this.now.get();\n\t\tLocalDate today = now.toLocalDate();\n\t\tLocalTime moment = now.toLocalTime();\n\t\tboolean after = false;\n\n\t\tdo {\n\t\t\tTreeSet<Event> todayEvents = this.events.get(today);\n\t\t\tif (todayEvents != null) {\n\t\t\t\t// Events are sorted\n\t\t\t\tfor (Event e: todayEvents) {\n\t\t\t\t\tif (after) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t} else if (e.startTime.compareTo(moment) >= 0) {\n\t\t\t\t\t\tresult.add(e);\n\t\t\t\t\t\tafter = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tafter = true;\n\t\ttoday = today.plusDays(1);\n\t\t// Week ends on Sunday.\n\t\t} while (today.getDayOfWeek() != DayOfWeek.MONDAY);\n\n\t\treturn result;\n\t}", "public ArrayList<Event> getCalendarEventsByDay()\n {\n ArrayList<Event> dayListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)) &&\n (events.get(i).getCalendar().get(Calendar.DAY_OF_MONTH) == currentCalendar.get(Calendar.DAY_OF_MONTH)))\n {\n dayListOfEvents.add(events.get(i));\n }\n }\n\n return dayListOfEvents;\n }", "public ReactorResult<java.util.Calendar> getAllDate_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), DATE, java.util.Calendar.class);\r\n\t}", "public ArrayList<String> createDate(String quarter, String year) {\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tString startDate = \"\";\r\n\t\tString endDate = \"\";\r\n\t\tif (quarter.equals(\"January - March\")) {\r\n\t\t\tstartDate = year + \"-01-01\";\r\n\t\t\tendDate = year + \"-03-31\";\r\n\t\t} else if (quarter.equals(\"April - June\")) {\r\n\t\t\tstartDate = year + \"-04-01\";\r\n\t\t\tendDate = year + \"-06-30\";\r\n\t\t} else if (quarter.equals(\"July - September\")) {\r\n\t\t\tstartDate = year + \"-07-01\";\r\n\t\t\tendDate = year + \"-09-30\";\r\n\t\t} else {\r\n\t\t\tstartDate = year + \"-10-01\";\r\n\t\t\tendDate = year + \"-12-31\";\r\n\t\t}\r\n\t\tdate.add(startDate);\r\n\t\tdate.add(endDate);\r\n\t\treturn date;\r\n\t}", "public Date getPreviousWeekStartDate(Date date) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(getWeekStartDate(date));\n cal.add(Calendar.WEEK_OF_YEAR, -1);\n return cal.getTime();\n }", "public List<XMLGregorianCalendar> convertDateList(List<Date> alist){\n\t\tList<XMLGregorianCalendar> blist = new ArrayList<XMLGregorianCalendar>(alist.size());\n\t\tfor(int i=0; i < alist.size(); i++){\n\t\t\tblist.add( this.getDate(alist.get(i)) );\n\t\t}\n\t\treturn blist;\n\t}", "WeekdaySpec getStart();", "@Override\n\t\tpublic WeekDay1 nextDay() {\n\t\t\treturn SUN;\n\t\t}", "private Calendar getEasterDate(final int year) {\n\n double g = year % 19;\n\n int c = year / 100;\n int c4 = c / 4;\n int e = (8 * c + 13) / 25;\n\n int h = (int) (19 * g + c - c4 - e + 15) % 30;\n int k = h / 28;\n int p = 29 / (h + 1);\n int q = (int) (21 - g) / 11;\n int i = (k * p * q - 1) * k + h;\n int b = year / 4 + year;\n int j1 = b + i + 2 + c4 - c;\n int j2 = j1 % 7;\n int r = 28 + i - j2;\n\n int monthNumber = 4;\n int dayNumber = r - 31;\n boolean negativeDayNumber = dayNumber <= 0;\n\n if (negativeDayNumber) {\n monthNumber = 3;\n dayNumber = r;\n }\n\n Calendar paques = Calendar.getInstance();\n paques.set(year, monthNumber - 1, dayNumber);\n return paques;\n }", "public static LocalDate randomLocalDate() {\n\t\tlong minDay = LocalDate.now().plusDays(1).toEpochDay();\n\t\tlong maxDay = LocalDate.now().plusMonths(1).toEpochDay();\n\t\tlong randomDay = ThreadLocalRandom.current().nextLong(minDay, maxDay);\n\t\treturn LocalDate.ofEpochDay(randomDay);\n\t}", "private void getActivatedWeekdays() {\n }", "public ArrayList<String> getAllEventDays(){\n ArrayList<Integer> sorted = this.getAllEventDayMonth();\n ArrayList<String> data = new ArrayList<>();\n String month = this.eventList.get(0).getStartTime().getMonth().toString();\n\n for (int date: sorted){\n StringBuilder string = new StringBuilder();\n\n string.append(month);\n string.append(\" \");\n string.append(date);\n data.add(string.toString());\n }\n return data;\n }", "public int[] getDaysOfWeek() {\n return daysOfWeek;\n }", "public String[] getYearVals() {\n if (yearVals == null) {\n yearVals = new String[numYearVals];\n int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);\n //curYear = String.valueOf(year);\n\n for (int i = 0; i < numYearVals; i++) {\n yearVals[i] = String.valueOf(year + i);\n }\n }\n\n return yearVals;\n }", "public ArrayList<Event> sortByDate() {\n\t\tArrayList<Event>calendarSortedByDate = new ArrayList();\n\t\tfor(int j = 0; j<calendar.size(); j++) {\n\t\t\tcalendarSortedByDate.add(calendar.get(j));\n\t\t\t\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < calendarSortedByDate.size() - 1; i++) {\n\t\t // Find the minimum in the list[i..list.size-1]\n\t\t Event currentMin = calendarSortedByDate.get(i);\n\t\t int currentMinIndex = i;\n\n\t\t for (int j = i + 1; j < calendarSortedByDate.size(); j++) {\n\t\t if (currentMin.compareDate​(calendarSortedByDate.get(j)) > 0) {\n\t\t currentMin = calendarSortedByDate.get(j);\n\t\t currentMinIndex = j;\n\t\t }\n\t\t }\n\n\t\t // Swap list[i] with list[currentMinIndex] if necessary;\n\t\t if (currentMinIndex != i) {\n\t\t \t calendarSortedByDate.set(currentMinIndex, calendarSortedByDate.get(i));\n\t\t \t calendarSortedByDate.set(i, currentMin);\n\t\t }\n\t\t }\n\t\treturn calendarSortedByDate;\n\t}", "public static void showDaysFromLastMonday(LocalDate lastMonday){\n String targetDate;\n for(int i = 0; i < 7; i++){\n targetDate = lastMonday.plusDays(i).format(DateTimeFormatter.ISO_DATE);\n System.out.println(\"The date is: \" + targetDate);\n }\n }", "public static Calendar startOfWeek(Date inDate, TimeZone timeZone) {\r\n\r\n\t\tCalendar c1 = Calendar.getInstance(timeZone);\r\n\t\tc1.setTime(inDate);\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(timeZone);\r\n\t\tc2.clear();\r\n\t\t\r\n\t\tint daysBefore = isoDayOfWeek(c1.get(Calendar.DAY_OF_WEEK)) - 1;\r\n\t\t\r\n\t\tc2.set(c1.get(Calendar.YEAR), c1.get(Calendar.MONTH), \r\n\t\t\t\tc1.get(Calendar.DAY_OF_MONTH) - daysBefore);\r\n\t\treturn c2;\t\t\r\n\t}", "public double getWeeksPerYear()\r\n {\r\n return weeksPerYear;\r\n }", "public static Date addWeeks(final Date date, final int amount) {\n final Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.add(Calendar.WEEK_OF_YEAR, amount);\n return calendar.getTime();\n }", "public static Date getYearStartDateByDate(Date idate) {\n\t\t int iyear = Utilities.getYearByDate(idate);\n\t\t \n\t\t Calendar c = Calendar.getInstance();\n\t\t c.set(iyear, 0, 1);\n\n\t\t return c.getTime(); \n\t}", "public static LocalDate tryParseDateFromRange(List<String> datesWithoutYear, int dateIdx) {\n if (dateIdx >= datesWithoutYear.size() || dateIdx < 0) {\n throw new IllegalStateException(\"dateIdx is out of bounds or the list is empty\");\n }\n\n LocalDate today = LocalDate.now();\n int currentYear = today.getYear();\n\n String firstDateString = datesWithoutYear.get(FIRST_IDX);\n LocalDate currentDate = parseDayMonthStringWithYear(firstDateString, currentYear);\n if (currentDate.isBefore(today) && currentDate.getMonth() == Month.JANUARY) {\n currentDate = currentDate.plusYears(1);\n currentYear++;\n }\n\n for (int idx = 1; idx <= dateIdx; idx++) {\n String currDayMonth = datesWithoutYear.get(idx);\n LocalDate tempDate = parseDayMonthStringWithYear(currDayMonth, currentYear);\n\n if (tempDate.isBefore(currentDate) || tempDate.isEqual(currentDate)) {\n tempDate = tempDate.plusYears(1);\n currentYear++;\n }\n\n currentDate = tempDate;\n }\n\n return currentDate;\n }", "com.google.protobuf.ByteString\n getStartDateYYYYBytes();", "public Date getMinimumDate() {\n/* */ Date result;\n/* 641 */ Range range = getRange();\n/* 642 */ if (range instanceof DateRange) {\n/* 643 */ DateRange r = (DateRange)range;\n/* 644 */ result = r.getLowerDate();\n/* */ } else {\n/* */ \n/* 647 */ result = new Date((long)range.getLowerBound());\n/* */ } \n/* 649 */ return result;\n/* */ }", "public DayOfWeek diaDaSemana(LocalDate d);", "public Date getPreviousWeekStart() {\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset the hour of day !\n cal.clear(Calendar.MINUTE);\n cal.clear(Calendar.SECOND);\n cal.clear(Calendar.MILLISECOND);\n\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, cal.getFirstDayOfWeek());\n cal.add(Calendar.DATE, -7);\n Date previousWeekStart = cal.getTime();\n\n return previousWeekStart;\n }", "public Day getWeekStartDay()\r\n {\r\n return (m_weekStartDay);\r\n }", "@Override\r\n\tpublic int[] getDayPeople() {\n\t\tint[] result = new int[7];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tresult[0] = cinemaConditionDao.getDayCount(date);\r\n\t\tfor(int i=0;i<6;i++){\r\n\t\t\tdate = DateUtil.getDayBefore(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getDayCount(date);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private List<DailyRecord> getDaily(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"select date, sum(Amount) from transaction where date between ? and ? and type=? group by date\" )) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<DailyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tLocalDate resultDate = resultSet.getDate(1).toLocalDate();\n\t\t\t\t\tint day = resultDate.getDayOfMonth();\n\t\t\t\t\tDayOfWeek weekDay = resultDate.getDayOfWeek();\n\t\t\t\t\tdouble amount = resultSet.getDouble(2);\t\t\t\t\t\n\t\t\t\t\tlist.add(new DailyRecord(amount, day, weekDay));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public String calendarweek(Date startDate) {\n String format = getString(\"calendarweek.abbreviation\");\n int week = DateTools.getWeekInYear(startDate, getLocale());\n String result = format.replace(\"{0}\", \"\" + week);\n // old format also works\n result = result.replace(\"{0,date,w}\", \"\" + week);\n return result;\n }", "public com.guidewire.datamodel.DatetimeorderingDocument.Datetimeordering[] getDatetimeorderingArray()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n java.util.List targetList = new java.util.ArrayList();\r\n get_store().find_all_element_users(DATETIMEORDERING$2, targetList);\r\n com.guidewire.datamodel.DatetimeorderingDocument.Datetimeordering[] result = new com.guidewire.datamodel.DatetimeorderingDocument.Datetimeordering[targetList.size()];\r\n targetList.toArray(result);\r\n return result;\r\n }\r\n }", "public static ArrayList<HomeworkDate> getFutureDates(int subject_index) {\n Calendar c = Calendar.getInstance();\n c.getTime();\n ArrayList<HomeworkDate> result = new ArrayList<>();\n ArrayList<Integer> day_difference = new ArrayList<>();\n ArrayList<Integer> lessons_count = new ArrayList<>();\n int current_day = schedule.getTodaysNumber();\n int last_day = current_day;\n boolean end;\n int dif;\n\n //getting the difference (in days) for the next lessons in 4 weeks\n int days = Storage.settings.homework_getNumberOfWeeks() * 5;\n for(int i = 0; i < days; i++) {\n current_day++;\n if(current_day > 4)\n current_day = 0;\n end = false;\n for(int y = 0; y < 9 && !end; y++) {\n if(Storage.schedule.getLesson(current_day, y) != null) {\n if(Storage.schedule.getLesson(current_day, y).getSubjectIndex() == subject_index) {\n if((dif = current_day - last_day) <= 0) {\n dif += 7;\n }\n day_difference.add(dif);\n lessons_count.add(y+1);\n last_day = current_day;\n end = true;\n }\n }\n }\n }\n\n //deleting the measurements below day\n c.set(Calendar.HOUR_OF_DAY, 0);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n c.set(Calendar.MILLISECOND, 0);\n\n //writing the correct dates\n for(int day = 0; day < day_difference.size(); day++) {\n c.add(Calendar.DATE, day_difference.get(day));\n result.add(new HomeworkDate(c.getTime(), lessons_count.get(day)));\n }\n return result;\n }", "public static long getFirstDayOfWeek(int day) {\n\t\tMutableDateTime firstDay = utc(day);\n\t\tfirstDay.setDayOfWeek(1);\n\t\treturn days(firstDay);\n\t}", "public Week getCopy() {\r\n Week w = new Week();\r\n for (int d = 0; d < 5; d++) {\r\n for (int h = 0; h < 13; h++) {\r\n w.setOne(d, h, weekData[d][h]);\r\n w.setName(\"+Copy of \" + this.getName());\r\n }\r\n }\r\n return w;\r\n }", "public List<DateType> toDateList() {\n List<DateType> result = new ArrayList<>();\n if (fromDate != null) {\n result.add(fromDate);\n }\n if (toDate != null) {\n result.add(toDate);\n }\n if (fromToDate != null) {\n result.add(fromToDate);\n }\n return result;\n }", "public static int getFirstDayOfWeek() {\n int startDay = Calendar.getInstance().getFirstDayOfWeek();\n\n if (startDay == Calendar.SATURDAY) {\n return Time.SATURDAY;\n } else if (startDay == Calendar.MONDAY) {\n return Time.MONDAY;\n } else {\n return Time.SUNDAY;\n }\n }", "private String[] getLast30Dates() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tString[] dates = new String[30];\n\t\tfor (int i=29; i>=0; i-- ) {\n\t\t\tdates[i] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t}\n\t\treturn dates;\n\t}", "public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}", "public static WeekDay getWeekDay(Date date) {\r\n\t\t Calendar calendar = Calendar.getInstance();\r\n\t\t calendar.setTime(date);\r\n\t\t return WeekDay.values()[calendar.get(Calendar.DAY_OF_WEEK) - 1];\r\n\t }", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }" ]
[ "0.69653964", "0.6417955", "0.6301556", "0.627542", "0.6089209", "0.5769418", "0.57183844", "0.57137966", "0.56951994", "0.5692605", "0.5689317", "0.5689264", "0.5626318", "0.55737686", "0.557118", "0.55355054", "0.5506894", "0.54938173", "0.5460596", "0.5452273", "0.53821415", "0.5361087", "0.5351164", "0.53341097", "0.5327589", "0.5303559", "0.5277205", "0.51970804", "0.5194215", "0.5193734", "0.5179788", "0.5173007", "0.51101905", "0.50465435", "0.50382406", "0.50294966", "0.5007555", "0.49877647", "0.4987252", "0.49800175", "0.49799895", "0.4970352", "0.4933188", "0.4898986", "0.4890531", "0.4878413", "0.48699692", "0.48678815", "0.48410913", "0.47899702", "0.4765467", "0.47616512", "0.47599378", "0.47433934", "0.47202688", "0.47191077", "0.47142148", "0.4711859", "0.4711506", "0.4697382", "0.46956488", "0.4687033", "0.46760616", "0.4661899", "0.46545115", "0.46522406", "0.46432197", "0.4638343", "0.46335414", "0.46302", "0.46023646", "0.45983925", "0.45961758", "0.459184", "0.45806125", "0.45776588", "0.45757034", "0.457221", "0.45557946", "0.45538417", "0.45526177", "0.45500913", "0.45500734", "0.45456707", "0.4538685", "0.4532856", "0.45280656", "0.45237637", "0.45114613", "0.44921735", "0.44906417", "0.44853988", "0.44812036", "0.44555086", "0.44550875", "0.444781", "0.4446644", "0.44335094", "0.44227567", "0.44174653" ]
0.8078503
0
Returns an array of every day in a given year
public static LocalDate[] getAllDays(final int year) { final List<LocalDate> dates = new ArrayList<>(); for (int i = 1; i <= getDaysInYear(year); i++) { dates.add(LocalDate.ofYearDay(year, i)); } return dates.toArray(new LocalDate[dates.size()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Integer> getByYearDay() {\n\t\treturn byYearDay;\n\t}", "private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }", "public String[] getYearVals() {\n if (yearVals == null) {\n yearVals = new String[numYearVals];\n int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);\n //curYear = String.valueOf(year);\n\n for (int i = 0; i < numYearVals; i++) {\n yearVals[i] = String.valueOf(year + i);\n }\n }\n\n return yearVals;\n }", "private static Date getYearDate(int year) {\n Calendar calendar = Calendar.getInstance();\n calendar.clear();\n calendar.set(Calendar.YEAR, year);\n return calendar.getTime();\n }", "private void initYear(Integer year) {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(year, i));\n }\n }", "public int getTravelsInYear(String year) {\n EntityManager em = getEntityManager();\n Calendar initDate = Calendar.getInstance();\n initDate.set(Calendar.DAY_OF_MONTH, 31);\n initDate.set(Calendar.MONTH, 11);\n initDate.set(Calendar.YEAR, Integer.parseInt(year)-1);\n Calendar endDate = Calendar.getInstance();\n endDate.set(Calendar.DAY_OF_MONTH, 1);\n endDate.set(Calendar.MONTH, 0);\n endDate.set(Calendar.YEAR, Integer.parseInt(year)+1);\n return ((Number) em.createNamedQuery(\"Viaje.getYearTravels\")\n .setParameter(\"initDate\", initDate.getTime())\n .setParameter(\"endDate\", endDate.getTime()).getSingleResult()).intValue();\n }", "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n return Arrays.asList(indepDay, laborDay);\n }", "public static int[][] inputTempYear() {\r\n\t\tint[][] temp = new int[ROWS][COLUMNS];\r\n\t\tfor (int i = 0; i < COLUMNS; i++) {\r\n\t\t\tinputTempMonth(temp, i);\r\n\t\t}\r\n\t\treturn temp;\r\n\t}", "@LogExceptions\n public synchronized List<Integer> getRegisteredDays\n (String month, String year) throws SQLException \n {\n Connection conn = DatabaseConnection.getConnection();\n try(PreparedStatement stmt = \n conn.prepareStatement(SELECT_EVENT_MONTH_YEAR))\n {\n stmt.setString(1, month);\n stmt.setString(2, year); \n dayList.clear();\n try(ResultSet rs = stmt.executeQuery()) {\n while(rs.next()) {\n dayList.add(rs.getInt(8));\n }\n }\n \n } \n return dayList;\n }", "public EventsCalendarYear(Integer year) {\n initYear(year);\n }", "public static List<String> getListOfYears(){\r\n\t\t\r\n\t\tList<String> years = new ArrayList<String>();\r\n\t\tyears.add(\"2013\"); years.add(\"2014\"); years.add(\"2015\"); years.add(\"2016\");\r\n\t\tyears.add(\"2017\"); years.add(\"2018\"); years.add(\"2019\"); years.add(\"2020\");\r\n\t\treturn years;\r\n\t\t\r\n\t}", "private void initYear() {\n for (int i = 0; i < 53; i++) {\n this.listOfWeeks.add(new EventsCalendarWeek(i));\n }\n }", "public double[] getPriceStats(String year){\n for (int i = 0; i < priceMonthCounter.length; i++) priceMonthCounter[i]=0;\n \n for (TransferImpl movement : MovementsController.getInstanceOf().getMovements()) {\n \t// Convert the util.Date to LocalDate\n \tLocalDate date = movement.getLeavingDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\t\t// Filter movements by year\n \t// Filter movements by year\n\t if(date.getYear()==Integer.parseInt(year)){\n\t \tint month = date.getMonthValue() - 1; \n\t \n\t \tswitch (movement.getType().toLowerCase()) {\n\t \tcase \"return\":\n\t \t\tintMonthCounter[month]-=movement.getTotalPrice(); // Increment the month according to the number of movements\n\t \t\tbreak;\n\t \tcase \"sold\":\n\t \t\tintMonthCounter[month]+=movement.getTotalPrice(); // Increment the month according to the number of movements\n\t \t\tbreak;\n\t \t}\n\t }\n\t \n\t for(int i=0; i<priceMonthCounter.length;i++) \n\t \tpriceMonthCounter[i] = Double.parseDouble(this.convertPriceToString(intMonthCounter[i]));\n }\n \n return priceMonthCounter;\n\t}", "public void findEasterDay()\n {\n while(year <= endYear)\n {\n EasterMath(year);\n for(int j = 0; j < 11; j++)\n {\n for(int k = 0; k < 30; k++)\n {\n if(month == j && day == k)\n {\n dates[j][k]++;\n }\n }\n }\n year++;\n }\n }", "public ArrayList<Integer> getYears() \r\n\t{\r\n\t\tint statingYear = 2000;\r\n\t\tint maxYear = 2050;\r\n\t\tArrayList <Integer>years = new ArrayList<Integer>(maxYear);\r\n\t\tfor (int year = statingYear; year <= maxYear; year++)\r\n\t\t\tyears.add(year);\r\n\t\treturn years;\r\n\t}", "public ArrayList<Event> getEventArray(int year, int month, int day){\n\t\t\tArrayList<Event> events = new ArrayList<Event>();\n\t\t\t\n\t\t\ttry{\n\t\t\t\tresultSet = statement.executeQuery(\"select eid, uid, name, startTime, endTime, description from Calendar where day=\"+day+\" and month=\"+month+\" and year=\"+year);\n\t\t\t\twhile (resultSet.next()){\n\t\t\t\t\tevents.add(new Event(resultSet.getString(3),month,day,year,resultSet.getString(4),resultSet.getString(5),resultSet.getString(6),Integer.parseInt(resultSet.getString(1)), Integer.parseInt(resultSet.getString(2))));\n\t\t\t\t}\n\t\t\t} catch (SQLException e1){\n\t\t\t\tSystem.out.println(\"SQL Exception.\");\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (Exception e2){\n\t\t\t\tSystem.out.println(\"I hope this doesn't happen\");\n\t\t\t\te2.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn events;\n\t\t}", "private static int getDaysSinceNewYear() {\n\t\tGregorianCalendar now = new GregorianCalendar();\n\n\t\treturn now.get(GregorianCalendar.DAY_OF_YEAR);\n\t}", "@Override\r\n\tpublic List<GetSalesOrderByYear> getSalesOrdersByYear(int year) {\n\t\tList<Object[]> list=null;\r\n\t\tList<GetSalesOrderByYear> byYears=null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tlist=boardDao.getSalesOrdersByYear(year);\r\n\t\t\tbyYears=new ArrayList<GetSalesOrderByYear>();\r\n\t\t\tIterator<Object[]> iterator=list.iterator();\r\n\t\t\twhile(iterator.hasNext())\r\n\t\t\t{\r\n\t\t\t\tObject[] objects=(Object[])iterator.next();\r\n\t\t\t\tGetSalesOrderByYear salesOrderByYear=new GetSalesOrderByYear();\r\n\t\t\t\tsalesOrderByYear.setMaterial((String)objects[0]);\r\n\t\t\t\tsalesOrderByYear.setMatpct(Float.valueOf((String)objects[1]));\r\n\t\t\t\tbyYears.add(salesOrderByYear);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\tlogger.error(e.getMessage());\r\n\t\t}\r\n\t\treturn byYears;\r\n\t}", "public static LocalDate[] getFirstDayWeekly(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n LocalDate localDate = LocalDate.ofYearDay(year, 1).with(TemporalAdjusters.previousOrSame(DayOfWeek.SUNDAY));\n\n final LocalDate testDate = LocalDate.ofYearDay(year, 1);\n if (testDate.getDayOfWeek() == DayOfWeek.THURSDAY) {\n dates.add(testDate.minusDays(4));\n }\n\n for (int i = 0; i <= 53; i++) {\n if (localDate.getYear() == year) {\n dates.add(localDate);\n }\n\n localDate = localDate.plusWeeks(1);\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public EventsCalendarYear() {\n initYear();\n }", "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "private Calendar getEasterDate(final int year) {\n\n double g = year % 19;\n\n int c = year / 100;\n int c4 = c / 4;\n int e = (8 * c + 13) / 25;\n\n int h = (int) (19 * g + c - c4 - e + 15) % 30;\n int k = h / 28;\n int p = 29 / (h + 1);\n int q = (int) (21 - g) / 11;\n int i = (k * p * q - 1) * k + h;\n int b = year / 4 + year;\n int j1 = b + i + 2 + c4 - c;\n int j2 = j1 % 7;\n int r = 28 + i - j2;\n\n int monthNumber = 4;\n int dayNumber = r - 31;\n boolean negativeDayNumber = dayNumber <= 0;\n\n if (negativeDayNumber) {\n monthNumber = 3;\n dayNumber = r;\n }\n\n Calendar paques = Calendar.getInstance();\n paques.set(year, monthNumber - 1, dayNumber);\n return paques;\n }", "static ArrayList arrayDate(String day, String dayNo, String month, String year){\n ArrayList<String> arraySplit = new ArrayList<>();\n\n arraySplit.add(day.replace(\",\",\"\"));//Monday\n arraySplit.add(dayNo.replace(\",\",\"\"));//23\n arraySplit.add(month.replace(\",\",\"\"));//March\n arraySplit.add(year.replace(\",\",\"\"));//2015\n return arraySplit;\n }", "private static String getDay(int year) {\n if (year == 1918)\n return \"\";\n return \"\";\n }", "public static void main(String[] args) {\n//\t\tOutput:\n//\t\tIt is year 2011\n//\t\tIt is year 2012\n//\t\tIt is year 2013\n//\t\tIt is year 2014\n//\t\tIt is year 2015\n//\t\tIt is year 2016\n//\t\tIt is year 2017\n//\t\tIt is year 2018\n\n\t\tfor(int i=2011;i<2019;i++) {\n\t\t\tSystem.out.println(\"It is year \" +i);\n\t\t}\n\t}", "public Builder byYearDay(Integer... yearDays) {\n\t\t\treturn byYearDay(Arrays.asList(yearDays));\n\t\t}", "public static LocalDate[] getFirstDayQuarterly(final int year) {\n LocalDate[] bounds = new LocalDate[4];\n\n bounds[0] = LocalDate.of(year, Month.JANUARY, 1);\n bounds[1] = LocalDate.of(year, Month.APRIL, 1);\n bounds[2] = LocalDate.of(year, Month.JULY, 1);\n bounds[3] = LocalDate.of(year, Month.OCTOBER, 1);\n\n return bounds;\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "int getYear();", "public Calendar calculateEasterForYear(int year) {\n int a = year % 4;\n int b = year % 7;\n int c = year % 19;\n int d = (19 * c + 15) % 30;\n int e = (2 * a + 4 * b - d + 34) % 7;\n int month = (int) Math.floor((d + e + 114) / 31);\n int day = ((d + e + 144) % 31) + 1;\n day++;\n\n Calendar instance = Calendar.getInstance();\n instance.set(Calendar.YEAR, year);\n instance.set(Calendar.MONTH, month);\n instance.set(Calendar.DAY_OF_MONTH, day);\n\n instance.add(Calendar.DAY_OF_MONTH, 13);\n\n return instance;\n }", "public List<Integer> getSpPeriodYear() {\n\t\tint maxTerm = product.getMaxTerm();\n\t\tint minTerm = product.getMinTerm();\n\n\t\tList<Integer> lists = new ArrayList<Integer>();\n\t\tfor (int i = minTerm; i <= maxTerm; i++) {\n\t\t\tlists.add(i);\n\t\t}\n\t\treturn lists;\n\t}", "public List<Integer> getSePeriodYears() {\n\t\treturn Arrays.asList(5, 7, 10);\n\t}", "public static TemporalQuery<Integer> dayOfYear(){\n return (d) -> d.get(ChronoField.DAY_OF_YEAR);\n }", "private ArrayList<Event> getAcademicYearEvents(ArrayList<Event> semesterList, int year) throws PacException {\n ArrayList<Event> yearList = new ArrayList<>();\n for (Event event : semesterList) {\n if (event.getYear().equals(year)) {\n yearList.add(event);\n }\n }\n if (yearList.isEmpty()) {\n throw new PacException(EMPTY_YEAR_LIST_ERROR_MESSAGE);\n }\n return yearList;\n }", "@GetMapping(\"/school-years\")\n @Timed\n public List<SchoolYearDTO> getAllSchoolYears() {\n log.debug(\"REST request to get all SchoolYears\");\n return schoolYearService.findAll();\n }", "Year createYear();", "private boolean leapyear(int yr){\n if(yr%4 == 0 && yr%100 != 0){ //If year is divisible by 4 but not by 100\r\n days[1] = 29; //Set February's days to 29\r\n return true; //Retrn true.\r\n }\r\n return false; //Otherwise, return false.\r\n }", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "public Builder byYearDay(Collection<Integer> yearDays) {\n\t\t\tbyYearDay.addAll(yearDays);\n\t\t\treturn this;\n\t\t}", "public List<Refinery> getRefineries(int year);", "private void fillYearFields() {\n\n\t\tfor (int i = 1990; i <= 2100; i++) {\n\t\t\tyearFieldDf.addItem(i);\n\t\t\tyearFieldDt.addItem(i);\n\t\t}\n\t}", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "public ArrayList<Song> searchByYear(Integer year) \r\n {\r\n return musicLibraryYearKey.get(year);\r\n \r\n }", "public static void main(String[] args) {\n Random randy = new Random();\r\n for (int i = 0; i < 2019; i++) {\r\n printYear(i, randy.nextInt(7), false);\r\n }\r\n //printYear(2007, 5, false);\r\n }", "public static final Function<Date,Date> setYear(final int value) {\r\n return new Set(Calendar.YEAR, value);\r\n }", "public int[] getYearLabels() {\r\n return yearLabels;\r\n }", "public void setYear (int yr) {\n year = yr;\n }", "public static int getTodaysYear() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.year;\t\r\n\t\t\r\n\t}", "public void setYear(int year) {\n this.year = year;\n }", "public ArrayList<String> createDate(String quarter, String year) {\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tString startDate = \"\";\r\n\t\tString endDate = \"\";\r\n\t\tif (quarter.equals(\"January - March\")) {\r\n\t\t\tstartDate = year + \"-01-01\";\r\n\t\t\tendDate = year + \"-03-31\";\r\n\t\t} else if (quarter.equals(\"April - June\")) {\r\n\t\t\tstartDate = year + \"-04-01\";\r\n\t\t\tendDate = year + \"-06-30\";\r\n\t\t} else if (quarter.equals(\"July - September\")) {\r\n\t\t\tstartDate = year + \"-07-01\";\r\n\t\t\tendDate = year + \"-09-30\";\r\n\t\t} else {\r\n\t\t\tstartDate = year + \"-10-01\";\r\n\t\t\tendDate = year + \"-12-31\";\r\n\t\t}\r\n\t\tdate.add(startDate);\r\n\t\tdate.add(endDate);\r\n\t\treturn date;\r\n\t}", "static String solve(int year){\n int beforeYear=1919, specialYear=1918, specialDay=28, sumDay=0, programmerDay=256;\n boolean leapYear=false;\n String result = null;\n if (year < beforeYear) {\n leapYear = year%4 == 0 ? true:false;\n } else {\n leapYear = (year%400 == 0 || (year%4 == 0 && year%100 != 0)) ? true : false;\n }\n for(int i=1; i < 13; i++) {\n int temp = i;\n\n if ((temp&=0x1) == 1 || i==8) {\n sumDay = sumDay + 31;\n } else {\n if (i == 2) {\n if (year == specialYear) {\n sumDay = sumDay + 15;\n } else {\n sumDay = sumDay + (leapYear ? specialDay + 1 : specialDay);\n }\n } else {\n sumDay = sumDay + 30;\n }\n }\n if ((programmerDay - sumDay) <= 30) {\n\n result = (programmerDay - sumDay) +\".\" + \"0\" + (i+1) + \".\"+ year;\n\n// try {\n// Date date = targetFmt.parse(temp1);\n//\n// return targetFmt2.parse(String.valueOf(date)).toString();\n// } catch (ParseException e) {\n// e.printStackTrace();\n// }\n return result;\n }\n }\n return result;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "public void setYear(Integer year) {\n this.year = year;\n }", "private List<DailyRecord> getDaily(int year, Month month, String type) throws SQLException {\n\t\tLocalDate from = LocalDate.of(year, month, 1);\n\t\tLocalDate to = LocalDate.of(year, month, month.length(from.isLeapYear()));\n\t\ttry (PreparedStatement statement = conn.prepareStatement(\"select date, sum(Amount) from transaction where date between ? and ? and type=? group by date\" )) {\n\t\t\tstatement.setDate(1, Date.valueOf(from));\n\t\t\tstatement.setDate(2, Date.valueOf(to));\n\t\t\tstatement.setString(3, type);\n\t\t\ttry (ResultSet resultSet = statement.executeQuery()) {\n\t\t\t\tArrayList<DailyRecord> list = new ArrayList<>();\n\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\tLocalDate resultDate = resultSet.getDate(1).toLocalDate();\n\t\t\t\t\tint day = resultDate.getDayOfMonth();\n\t\t\t\t\tDayOfWeek weekDay = resultDate.getDayOfWeek();\n\t\t\t\t\tdouble amount = resultSet.getDouble(2);\t\t\t\t\t\n\t\t\t\t\tlist.add(new DailyRecord(amount, day, weekDay));\t\t\t\n\t\t\t\t}\n\t\t\t\treturn list;\n\t\t\t}\n\t\t}\n\t}", "public void setYear(int year) {\r\n this.year = year;\r\n }", "private int[] getMonthDayYearIndexes(String pattern) {\n int[] result = new int[3];\n\n final String filteredPattern = pattern.replaceAll(\"'.*?'\", \"\");\n\n final int dayIndex = filteredPattern.indexOf('d');\n final int monthMIndex = filteredPattern.indexOf(\"M\");\n final int monthIndex = (monthMIndex != -1) ? monthMIndex : filteredPattern.indexOf(\"L\");\n final int yearIndex = filteredPattern.indexOf(\"y\");\n\n if (yearIndex < monthIndex) {\n result[YEAR_INDEX] = 0;\n\n if (monthIndex < dayIndex) {\n result[MONTH_INDEX] = 1;\n result[DAY_INDEX] = 2;\n } else {\n result[MONTH_INDEX] = 2;\n result[DAY_INDEX] = 1;\n }\n } else {\n result[YEAR_INDEX] = 2;\n\n if (monthIndex < dayIndex) {\n result[MONTH_INDEX] = 0;\n result[DAY_INDEX] = 1;\n } else {\n result[MONTH_INDEX] = 1;\n result[DAY_INDEX] = 0;\n }\n }\n return result;\n }", "@GetMapping(\"/api/getByYear\")\n\tpublic int[] getProjectByYear()\n\t{\n\t\treturn this.integrationClient.getProjectByYear();\n\t}", "ImmutableList<SchemaOrgType> getCopyrightYearList();", "Integer getTenYear();", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public void setYear(Integer year) {\r\n this.year = year;\r\n }", "public int[] getMovStats(String year){\n\t for (int i = 0; i < movMonthCounter.length; i++) movMonthCounter[i]=0;\n\t \n\t for (TransferImpl movement : MovementsController.getInstanceOf().getMovements()) {\n\t \t// Convert the util.Date to LocalDate\n\t \tLocalDate date = movement.getLeavingDate().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\t\t\t// Filter movements by year\n\t \tif(date.getYear()==Integer.parseInt(year)){\n\t int month = date.getMonthValue() - 1; \n\t movMonthCounter[month]++; // Increment the month according to the number of movements\n\t \t}\n\t }\n\t return movMonthCounter;\n\t}", "public void setYear(int year)\n {\n this.year = year;\n }", "public SerialDate getDate(final int year) {\n SerialDate result;\n if (this.count != SerialDate.LAST_WEEK_IN_MONTH) {\n // start at the beginning of the month\n result = SerialDate.createInstance(1, this.month, year);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(1, result);\n }\n result = SerialDate.addDays(7 * (this.count - 1), result);\n\n }\n else {\n // start at the end of the month and work backwards...\n result = SerialDate.createInstance(1, this.month, year);\n result = result.getEndOfCurrentMonth(result);\n while (result.getDayOfWeek() != this.dayOfWeek) {\n result = SerialDate.addDays(-1, result);\n }\n\n }\n return result;\n }", "public abstract String reportLeapYear(int year);", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "public static final String[] getDayMonthYear(Date aDate, boolean isAddSpace) {\r\n String[] dmys = new String[3];\r\n if (aDate != null) {\r\n Calendar cal=Calendar.getInstance();\r\n cal.setTime(aDate);\r\n int day = cal.get(Calendar.DAY_OF_MONTH);\r\n if (day<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = \"0 \" + day;\r\n \t } else {\r\n \t\t dmys[0] = \"0\" + day;\r\n \t }\r\n } else {\r\n \t String tmp = day + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[0] = tmp;\r\n \t }\r\n }\r\n int month = cal.get(Calendar.MONTH) + 1;\r\n if (month<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = \"0 \" + month;\r\n \t } else {\r\n \t\t dmys[1] = \"0\" + month;\r\n \t }\r\n } else {\r\n \t String tmp = month + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[1] = tmp;\r\n \t }\r\n }\r\n String year = cal.get(Calendar.YEAR) + \"\";\r\n if (isAddSpace) {\r\n \t dmys[2] = year.substring(0, 1) + \" \" + year.substring(1, 2) + \" \" + year.substring(2, 3) + \" \" + year.substring(3, 4);\r\n } else {\r\n \t dmys[2] = year;\r\n }\r\n }\r\n return dmys;\r\n }", "public void setYear(String year) {\n this.year = year;\n }", "public void setYear(String year) {\n this.year = year;\n }", "public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }", "public List<Integer> getListYears() {\n return listYears;\n }", "@Override\n\tpublic Set<Person> getfindByBirthdateYear(int year) {\n\t\treturn null;\n\t}", "public void setYear(int year)\r\n\t{\r\n\t\tthis.year = year;\r\n\t}", "@Property\n void nonCenturialLeapYearTest(@ForAll(\"nonCenturialLeapYears\") int year){\n assertThat(ly.isLeapYear(year));\n }", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public void setYear(int year) {\n\t\tthis.year = year;\n\t}", "public abstract ArrayList<ScheduleTime> getScheduleForDay(int day, int month, int year);", "public void setYear(int year) \n\t{\n\t\tthis.year = year;\n\t}", "public void setYear(int value) {\r\n this.year = value;\r\n }", "public static List getAlumniByYear(int year)\n { \n session=SessionFact.getSessionFact().openSession();\n List li=session.createQuery(\"from Alumni_data where passOutYear=:year\").setInteger(\"year\", year).list();\n session.close();\n return li;\n }", "private int NumberLeapyearsSince1900 (int YearNumber) {\n int i = 1900;\n int countLeapyears = 0;\n for (i = 1900; i < YearNumber; i = i+4); {\n if (daysInYear(i) == 366) {\n countLeapyears ++;\n }\n } return countLeapyears;\n\n }", "public final native double setFullYear(int year, int month, int day) /*-{\n this.setFullYear(year, month, day);\n return this.getTime();\n }-*/;", "public void setCalendarYear(int year) {\r\n\t\tcalendar.setCalendarYear(year);\r\n\t}", "Years createYears();", "private void populateYears(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT DISTINCT year FROM album ORDER BY year\");\n\n while(results.next()){\n Integer year = results.getInt(1);\n yearList.add(year);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "public ReactorResult<java.lang.Integer> getAllRecordingYear_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), RECORDINGYEAR, java.lang.Integer.class);\r\n\t}", "public int getYear() { return year; }", "public int getYear() { return year; }", "public ReactorResult<java.lang.Integer> getAllOriginalReleaseYear_as() {\r\n\t\treturn Base.getAll_as(this.model, this.getResource(), ORIGINALRELEASEYEAR, java.lang.Integer.class);\r\n\t}", "public void Eastercounter(){\n\n int i,j;\n String m = \"\";\n\n int frequency[][] = new int [2][31];\n\n for (i=0; i<2; i++){\t\t\t\t\t\t//initialize frequency array\n for(j=0;j<31;j++){\n frequency[i][j] = 0;\n }//end inner for\n }//end outer for\n\n\n for(i=1; i <= 5700000; i++){\n year = i;\n calcEasterDate();\n\n for(i=0;i<2;i++){\n for(j=0;j<31;j++){\n if((i == 0 && j<21) || (i==1 && j>24)){\n continue;\n }\n if ((i+3) == month && (j+1) == day ){\n ++frequency[i][j];\n\n }//end if\n }//end inner for\n }//end outer for\n }//end loop through years\n\n for(i=0;i<2;i++){\n for(j=0;j<31;j++){\n\n if (i == 0){\n m = \"March\";\n }\n if (i == 1){\n m = \"April\";\n }\n\n if (frequency[i][j] != 0)\n System.out.printf(\"%s %d - %d\\n\",m,(j+1), frequency[i][j]);\n }\n }\n }", "public void setYear(String year) {\n\t\tthis.year = year;\n\t}", "@GetMapping(\"/allHospital\")\n public Map<String,List<Integer>> allHospital(String year){\n return service.allHospital(year);\n }", "public static void main(String[] args) {\n\n\t\tLocalDate current =LocalDate.now();\n\tLocalDate ld =\tLocalDate.of(1989, 11, 30);\n\t\t\n\tPeriod pd =\tPeriod.between(current, ld);\n\tSystem.out.println(pd.getYears());\n\t}", "public void EasterMath(int year)\n {\n a = year%19;\n b = Math.floor(year/100);\n c = year%100;\n d = Math.floor((b/4));\n e = b%4;\n f = Math.floor((b+8)/25);\n g = Math.floor((b-f+1)/3);\n h = (19*a+b-d-g+15)%30;\n i = Math.floor(c/4);\n k = c%4;\n l = (32 + 2* e + 2 * i - h - k)%7;\n m = Math.floor((a+11*h+22*l)/451);\n month = (int) Math.floor((h+l-7*m+114)/31);\n day = (int) (((h+l-7*m+114)%31)+1);\n }", "int getYears();", "@Property\n void nonCenturialNonLeapyearTest(@ForAll(\"nonCenturialNonLeapyears\") int year){\n assertThat(!ly.isLeapYear(year));\n }", "public void setYear(int _year) { year = _year; }" ]
[ "0.7129196", "0.6579085", "0.6375438", "0.6236582", "0.6206846", "0.60708576", "0.6044765", "0.59897083", "0.59715724", "0.59027785", "0.58806944", "0.586765", "0.58661616", "0.5862424", "0.5861253", "0.58456093", "0.58426785", "0.58365154", "0.5806588", "0.5793836", "0.5793338", "0.5778502", "0.5760821", "0.57594496", "0.57593685", "0.5744724", "0.56945467", "0.5673245", "0.56662416", "0.5621779", "0.5603687", "0.5599099", "0.559178", "0.5570134", "0.55593836", "0.5557845", "0.5549863", "0.55330956", "0.5532335", "0.5531581", "0.5530329", "0.5522931", "0.55157936", "0.551378", "0.5427566", "0.53970665", "0.5396144", "0.5393038", "0.5387789", "0.53798884", "0.53797096", "0.5379624", "0.5379624", "0.5379624", "0.5378704", "0.5375772", "0.53753364", "0.5372824", "0.53685415", "0.536606", "0.535709", "0.535709", "0.5355513", "0.5315335", "0.53046983", "0.5304275", "0.5300814", "0.5299075", "0.5281415", "0.5276453", "0.52744967", "0.52744967", "0.5274257", "0.52599347", "0.52546746", "0.5253762", "0.5250108", "0.5238314", "0.5238314", "0.52277106", "0.52153534", "0.5204695", "0.5197219", "0.5193468", "0.51910347", "0.51905674", "0.5190352", "0.5189612", "0.51668376", "0.51577044", "0.51577044", "0.51476234", "0.5143441", "0.51432526", "0.51287925", "0.51283234", "0.5127666", "0.512395", "0.5123928", "0.51226604" ]
0.7233887
0
Returns date representing the last day of the month given a specified date.
public static LocalDate getLastDayOfTheMonth(@NotNull final LocalDate date) { Objects.requireNonNull(date); return date.with(TemporalAdjusters.lastDayOfMonth()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Date lastDay(final Date date) {\n final Calendar cal = new GregorianCalendar();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n cal.set(Calendar.HOUR_OF_DAY, 23);\n cal.set(Calendar.MINUTE, 59);\n cal.set(Calendar.SECOND, 59);\n cal.set(Calendar.MILLISECOND, 999);\n return cal.getTime();\n }", "public static LocalDate getLastOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.lastDayOfMonth());\n\t}", "public static WithAdjuster lastDayOfMonth() {\n\n return Impl.LAST_DAY_OF_MONTH;\n }", "public static Date lastDayMonth(){\n String rep_fin_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n\n /*Obteniendo el ultimo dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n /*Almacenamos un string con el formato indicado*/\n rep_fin_de_mes = sdf.format(c.getTime());\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_fin_de_mes);\n }", "public static LocalDate getLastOfNextMonth() {\n\t\treturn BusinessDateUtility.getFirstOfNextMonth().with(TemporalAdjusters.lastDayOfMonth());\n\t}", "public String getEndOfMonth(String date) {\n Integer dateYear = Integer.parseInt(date.substring(0, 4));\n Integer dateMonth = Integer.parseInt(date.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(date.substring(6));\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n int year = c.get(Calendar.YEAR);\n String month = String.format(\"%02d\", c.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", c.get(Calendar.DAY_OF_MONTH));\n\n return year + month + day;\n }", "public static WithAdjuster lastInMonth(DayOfWeek dayOfWeek) {\n\n Jdk7Methods.Objects_requireNonNull(dayOfWeek, \"dayOfWeek\");\n return new DayOfWeekInMonth(-1, dayOfWeek);\n }", "public static Date extendUntilEndOfDay(Date date)\n {\n return DateUtils.addMilliseconds(DateUtils.addDays(DateUtils.truncate(date,\n Calendar.DAY_OF_MONTH), 1), -1);\n }", "public static LocalDate getLastWorkingDayOfMonth(LocalDate lastDayOfMonth) {\n\t\tLocalDate lastWorkingDayofMonth;\n\t\tswitch (DayOfWeek.of(lastDayOfMonth.get(ChronoField.DAY_OF_WEEK))) {\n\t\tcase MONDAY:\n\t\t\tlastWorkingDayofMonth = lastDayOfMonth.minusDays(3);\n\t\t\tbreak;\n\t\tcase SUNDAY:\n\t\t\tlastWorkingDayofMonth = lastDayOfMonth.minusDays(2);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tlastWorkingDayofMonth = lastDayOfMonth.minusDays(1);\n\t\t}\n\t\treturn lastWorkingDayofMonth;\n\t}", "public Calendar endOfMonth() {\r\n\t\t\r\n\t\t// get the date at the beginning of next month\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH) + 1, 1);\r\n\t\t\r\n\t\treturn c2;\r\n\t}", "public synchronized static int getLastDayInMonth(int year, int month) {\n Calendar calendar = Calendar.getInstance();\n try {\n calendar.setTime(sdf.parse(String.format(\"%d-%02d-%02d 00:00:00\", year, month, 1)));\n } catch (Exception e) {\n throw new IllegalArgumentException(\"can not parse data\", e);\n }\n calendar.add(Calendar.DAY_OF_MONTH, -1);\n return calendar.get(Calendar.DAY_OF_MONTH);\n }", "public static LocalDate getLastDayOfMonth(LocalDateTime localDateTime) {\n LocalDateTime dateTime = localDateTime.with(TemporalAdjusters.lastDayOfMonth());\n return dateTime.toLocalDate();\n }", "public static Date setToMonthAgo(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.MONTH, -1);\n\t\treturn cal.getTime();\t\t\t\n\t}", "public static LocalDate getFirstDayOfTheMonth(final LocalDate date) {\n return date.with(TemporalAdjusters.firstDayOfMonth());\n }", "public int getDayOfMonth();", "Date getEndDay();", "public Date getMaximumDate() {\n/* */ Date result;\n/* 689 */ Range range = getRange();\n/* 690 */ if (range instanceof DateRange) {\n/* 691 */ DateRange r = (DateRange)range;\n/* 692 */ result = r.getUpperDate();\n/* */ } else {\n/* */ \n/* 695 */ result = new Date((long)range.getUpperBound());\n/* */ } \n/* 697 */ return result;\n/* */ }", "static DateTime GetLastXWeekdayOfMonth(int iXDayOfWeek, int iYear,\n int iMonth) {\n DateTime dmFirstOfMonth = new DateMidnight(iYear, iMonth, 1)\n .toDateTime();\n DateTime dmLastOfMonth = dmFirstOfMonth.plusMonths(1).minusDays(1);\n int dayOfWeek = dmLastOfMonth.getDayOfWeek();\n int daysToSubtract = dayOfWeek - iXDayOfWeek;\n if (dayOfWeek < iXDayOfWeek) {\n daysToSubtract -= 7;\n }\n return dmLastOfMonth.minusDays(daysToSubtract);\n }", "public Date addMonths(int m) {\r\n if (m < 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Month should not be the negative value!\");\r\n\t\t}\r\n\r\n\r\n\t\tint newMonth = (month + (m % 12)) > 12 ? ((month + (m % 12)) % 12) : month\r\n\t\t\t\t+ (m % 12);\r\n\t\tint newYear = (month + (m % 12)) > 12 ? year + (m / 12) + 1 : year\r\n\t\t\t\t+ (m / 12);\r\n int newDay = 0;\r\n // IF the new month has less total days in it than the starting month\r\n // and the date being added to is the last day of the month, adjust\r\n // and make newDay correct with its corresponding month.\r\n \r\n // IF not leap year and not Feb. make newDay correct.\r\n if (day > DAYS[newMonth] && (newMonth != 2)) {\r\n newDay = (DAYS[newMonth]);\r\n //System.out.println(\"1\");\r\n } \r\n \r\n // IF not leap year but not Feb. make newDay 28. (This is usually the case for Feb.)\r\n else if ((day > DAYS[newMonth]) && (isLeapYear(newYear) == false) && (newMonth == 2)){\r\n newDay = (DAYS[newMonth] - 1);\r\n }\r\n \r\n // IF leap year and is Feb. make newDay 29.\r\n else if ((day > DAYS[newMonth]) && isLeapMonth(newMonth, newYear) == true){\r\n newDay = DAYS[newMonth];\r\n }\r\n\r\n // if day is not gretaer than the last day of the new month, make no change.\r\n else {\r\n newDay = day;\r\n } \r\n\t\treturn (new Date(newMonth, newDay, newYear));\r\n\t}", "private String getMonth(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tMonth month = localDate.getMonth();\n\n\t\treturn month.name();\n\t}", "public static Date getMaxDate() {\n Calendar cal = Calendar.getInstance();\n cal.set(2036, 12, 28, 23, 59, 59);\n return cal.getTime();\n }", "public static Date getEndOfDay(Date date)\n {\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(date);\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n calendar.set(Calendar.MILLISECOND, 999);\n return calendar.getTime();\n }", "public static LocalDate getFirstOfNextMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfNextMonth());\n\t}", "public static Date getEndDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\t\tc.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n\n\t\treturn c.getTime();\n\t}", "public int getMonthDate()\n\t{\n\t\tif (m_nType == AT_MONTH_DATE)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public Date getEndOfDay(Date date) {\n\t Calendar calendar = Calendar.getInstance();\n\t calendar.setTime(date);\n\t calendar.set(Calendar.HOUR_OF_DAY, 23);\n\t calendar.set(Calendar.MINUTE, 59);\n\t calendar.set(Calendar.SECOND, 59);\n\t calendar.set(Calendar.MILLISECOND, 999);\n\t return calendar.getTime();\n\t}", "public static Date getEnd(Date date) {\n if (date == null) {\n return null;\n }\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n c.set(Calendar.HOUR_OF_DAY, 23);\n c.set(Calendar.MINUTE, 59);\n c.set(Calendar.SECOND, 59);\n c.set(Calendar.MILLISECOND, 999);\n return c.getTime();\n }", "private static long getMonthFromDate (String date) {\n\t\tString[] dateArray = date.split(AnalyticsUDFConstants.SPACE_SEPARATOR);\n\t\ttry {\n\t\t\tDate d = new SimpleDateFormat(AnalyticsUDFConstants.DATE_FORMAT_MONTH).parse(dateArray[1] +\n\t\t\t\t\tAnalyticsUDFConstants.SPACE_SEPARATOR + dateArray[dateArray.length-1]);\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(d);\n\t\t\treturn calendar.getTimeInMillis();\n\t\t} catch (ParseException e) {\n\t\t\treturn -1;\n\t\t}\n\t}", "public static Date getLastTimeOfDay(Date date) {\n date = Dates.sum(date, 1, Calendar.DAY_OF_YEAR);\n date = Dates.sum(date, -1, Calendar.SECOND);\n return date;\n }", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}", "public int getEndMonth()\n\t{\n\t\treturn this.mEndMonth;\n\t}", "public static Date setToEndOfDay(Date date) {\n\t\t\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.set(Calendar.HOUR_OF_DAY, 23);\n\t cal.set(Calendar.MINUTE, 59);\n\t cal.set(Calendar.SECOND, 59);\n\t cal.set(Calendar.MILLISECOND, 999);\n\t return cal.getTime();\n\t}", "public void testMaximumDayInMonthFor()\n {\n int[] test = new int[]{\n 2000, 0/*Jan*/, 31,\n 2000, 1/*Feb*/, 29,\n 1996, 1/*Feb*/, 29,\n 1900, 1/*Feb*/, 28,\n 0, 1/*Feb*/, 29,\n -400, 1/*Feb*/, 29,\n -397, 1/*Feb*/, 28 };\n \n for( int i=0; i<test.length; i+=3 )\n {\n assertEquals( test[i+2], Util.maximumDayInMonthFor(test[i],test[i+1]) );\n assertEquals( test[i+2], Util.maximumDayInMonthFor(Util.int2bi(test[i]),test[i+1]) );\n }\n }", "public static HISDate decreaseDate(HISDate date) {\r\n int day = date.getDay();\r\n int month = date.getMonth();\r\n int year = date.getYear();\r\n //keine Monatsgrenze überschritten\r\n if (day > 1) {\r\n day--;\r\n } else {\r\n // überschreiten einer Monatsgrenze\r\n if (day == 1) {\r\n //vormonat hat 31 Tage\r\n if (month == 2 || month == 4 || month == 6 || month == 8 || month == 9 || month == 11) {\r\n month--;\r\n day = 31;\r\n }\r\n //Jahreswechsel\r\n else if (month == 1) {\r\n day = 31;\r\n month = 12;\r\n year--;\r\n }\r\n // Vormonat ist Februar\r\n else if (month == 3) {\r\n month = 2;\r\n if (new GregorianCalendar().isLeapYear(year)) {\r\n day = 29;\r\n } else {\r\n day = 28;\r\n }\r\n } else {\r\n month--;\r\n day = 30;\r\n }\r\n }\r\n }\r\n return new HISDate(year, month, day);\r\n }", "public int getDayOfMonth() \n\t{\n\t\tint dayofmonth = m_calendar.get(Calendar.DAY_OF_MONTH);\n\t\treturn dayofmonth;\n\n\t}", "public static WithAdjuster firstDayOfNextMonth() {\n\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }", "public int getDayOfMonth() {\n return _calendar.get(Calendar.DAY_OF_MONTH);\n }", "public String getCurrentDayOfMonthAsString() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public static Date getLastTradeDate() {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select max(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt\");\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\tDate lastTradeDate = (Date) query.getSingleResult();\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn lastTradeDate;\r\n\t}", "public LocalDateTime CalcLastDay()\n {\n if (!Repeats) {\n // then use the end of the period\n return CalcFirstPeriodEndDay();\n }\n\n //else its forever or if its set\n return LastDay == null ? LocalDateTime.MAX : LastDay;\n }", "public BigDecimal getLastmonthFee() {\r\n return lastmonthFee;\r\n }", "Date getEndDate();", "Date getEndDate();", "public static Date getEndDateByDate(Date idate) {\n\t\tint imonth = Utilities.getMonthNumberByDate(idate);\n\t\tint iyear = Utilities.getYearByDate(idate);\n\t\treturn Utilities.getEndDateByMonth(imonth - 1, iyear);\n\t}", "public Date obtenerUltimaFecha() {\n String sql = \"SELECT proyind_periodo_fin\"\n + \" FROM proy_indices\"\n + \" WHERE proyind_periodo_fin IS NOT NULL\"\n + \" ORDER BY proyind_periodo_fin DESC\"\n + \" LIMIT 1\";\n Query query = getEm().createNativeQuery(sql);\n List result = query.getResultList();\n return (Date) DAOUtils.obtenerSingleResult(result);\n }", "public int dayOfMonth() {\r\n\t\treturn mC.get(Calendar.DAY_OF_MONTH);\r\n\t}", "private Date createExpiredAfter(final int month, final int year) {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\t\n\t\tcalendar.set(year, month - 1, 0, 23, 59, 59);\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t\n\t\treturn calendar.getTime();\n\t}", "public Boolean isEndOfMonth() {\n return _endOfMonth;\n }", "public static void main(String[] args) {\n TimeZone timezone = TimeZone.getTimeZone(\"Asia/Hong_Kong\");\n Calendar cal = Calendar.getInstance(timezone);\n System.out.println(cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n }", "public static int getCurrentMonth()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.MONTH) + 1;\n\t}", "public String getMonth(int month) {\n\t\treturn new DateFormatSymbols().getMonths()[month-1];\n\t}", "@Test\n public void repeatingTask_CheckDateOfEndOfMonth_lastDayOfMonthDate() {\n int[] endOfMonth = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n int[] endOfMonthLeapYear = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n RepeatCommand testRepeatCommand = new RepeatCommand(0, 1, RepeatCommand.MONTHLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(0);\n LocalDate eventDate = repeatEvent.getDate();\n\n int year = LocalDate.now().getYear();\n // Check if this year is a leap year\n if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {\n assertEquals(eventDate.getDayOfMonth(), endOfMonthLeapYear[eventDate.getMonthValue()]);\n } else {\n assertEquals(eventDate.getDayOfMonth(), endOfMonth[eventDate.getMonthValue()]);\n }\n }", "public Date afterNDays(int n) throws IllegalArgumentException{\n\t if (n < 0)\n\t throw new IllegalArgumentException(\"Enter a positive number!\");\n\t Date result = new Date(this.day, this.month, this.year);\n\t for (int i = 0; i < n; i++)\n\t result = result.tomorrow();\n\t return result;\n }", "public int getDate() {\n\t\treturn date.getDayOfMonth();\n\t}", "List<MonthlyExpenses> lastMonthExpenses();", "public static WithAdjuster firstDayOfMonth() {\n\n return Impl.FIRST_DAY_OF_MONTH;\n }", "public static int getTodaysMonth() {\t\r\n\t\t\r\n\t\tTime time = new Time();\r\n\t\ttime.setToNow();\r\n\t\treturn time.month + 1;\t\r\n\t\t\r\n\t}", "public int getDayOfMonth(){\n\t\treturn dayOfMonth;\n\t}", "public String getEndOfWeek(String date) {\n Integer dateYear = Integer.parseInt(date.substring(0, 4));\n Integer dateMonth = Integer.parseInt(date.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(date.substring(6));\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n int currentDay = c.get(Calendar.DAY_OF_WEEK) != DAYS_IN_WEEK ? c.get(Calendar.DAY_OF_WEEK) : 0;\n int leftDays = Calendar.FRIDAY - currentDay;\n c.add(Calendar.DATE, leftDays);\n Date endWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(endWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n return year + month + day;\n }", "public LocalDate getMaxDate() {\r\n return maxDate;\r\n }", "public String checkDateMonth(Date aDate){\n if (aDate.getMonth() < 10) {\r\n String newDate = \"0\" + Integer.toString(aDate.getMonth()+1);\r\n \r\n return newDate;\r\n }\r\n return Integer.toString(aDate.getMonth());\r\n \r\n }", "public int getMonth() {\n\t\treturn date.getMonthValue();\n\t}", "public String getLastPaymentDate() {\n\t\treturn stateEqualMasterDao.getElementValueList(\"PAYMENT_DATE\").get(0);\n\t}", "public String getRebillLastDate()\n\t{\n\t\tif(response.containsKey(\"last_date\")) {\n\t\t\treturn response.get(\"last_date\");\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "Optional<ZonedDateTime> lastExecution(final ZonedDateTime date);", "public int getCurrentDate() {\n\n\t\t cal = Calendar.getInstance();\n\t\treturn cal.get(Calendar.DAY_OF_MONTH);\n\t}", "public long getActMonth(String date) {\n\t\treturn AnalyticsUDF.getMonthFromDate(date);\n\t}", "public static String getMonthAbbreviated(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"Jan\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"Feb\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"Mar\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"Apr\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"Jun\";\n break;\n\n case Calendar.JULY:\n dayStr = \"Jul\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"Aug\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"Sep\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"Oct\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"Nov\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"Dec\";\n break;\n }\n\n return dayStr;\n }", "public String getNextDate()\n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() + 1);\n\t\treturn getTodayDate ();\n\n\t}", "public Observable<LocalDate> getMaxDateAsync() {\n return getMaxDateWithServiceResponseAsync().map(new Func1<ServiceResponse<LocalDate>, LocalDate>() {\n @Override\n public LocalDate call(ServiceResponse<LocalDate> response) {\n return response.body();\n }\n });\n }", "public static String getMonth(String date) {\n Date dateDT = parseDate(date);\n\n if (dateDT == null) {\n return null;\n }\n\n // Get current date\n Calendar c = Calendar.getInstance();\n // it is very important to\n // set the date of\n // the calendar.\n c.setTime(dateDT);\n int day = c.get(Calendar.MONTH);\n\n String dayStr = null;\n\n switch (day) {\n\n case Calendar.JANUARY:\n dayStr = \"January\";\n break;\n\n case Calendar.FEBRUARY:\n dayStr = \"February\";\n break;\n\n case Calendar.MARCH:\n dayStr = \"March\";\n break;\n\n case Calendar.APRIL:\n dayStr = \"April\";\n break;\n\n case Calendar.MAY:\n dayStr = \"May\";\n break;\n\n case Calendar.JUNE:\n dayStr = \"June\";\n break;\n\n case Calendar.JULY:\n dayStr = \"July\";\n break;\n\n case Calendar.AUGUST:\n dayStr = \"August\";\n break;\n\n case Calendar.SEPTEMBER:\n dayStr = \"September\";\n break;\n\n case Calendar.OCTOBER:\n dayStr = \"October\";\n break;\n\n case Calendar.NOVEMBER:\n dayStr = \"November\";\n break;\n\n case Calendar.DECEMBER:\n dayStr = \"December\";\n break;\n }\n\n return dayStr;\n }", "public Date getDayEnd(TimeZone tz)\n\t{\n\t\tCalendar cal = Calendar.getInstance(tz, Locale.US);\n\t\tcal.set(this.year, this.month-1, this.day, 0, 0, 0);\n\t\tcal.set(Calendar.MILLISECOND, 0);\n\t\tcal.add(Calendar.DATE, 1);\n\t\treturn cal.getTime();\n\t}", "public static String obtenerFechaActual() {\n\t\tCalendar date = Calendar.getInstance();\n\t\treturn date.get(Calendar.DATE) + \"_\" + (date.get(Calendar.MONTH) < 10 ? \"0\" + (date.get(Calendar.MONTH) + 1) : (date.get(Calendar.MONTH) + 1) + \"\") + \"_\" + date.get(Calendar.YEAR);\n\t}", "public Date getFechaFinDate(){\n Date date=new Date(fechaFin.getTime());\n return date;\n }", "public Date next() {\r\n\t\tif (isValid(month, day + 1, year))\r\n\t\t\treturn new Date(month, day + 1, year);\r\n\t\telse if (isValid(month + 1, 1, year))\r\n\t\t\treturn new Date(month + 1, 1, year);\r\n\t\telse\r\n\t\t\treturn new Date(1, 1, year + 1);\r\n\t}", "public static Date getMaxDate(Date dt) {\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tcal.setTime(dt);\r\n\t\tcal.set(Calendar.HOUR, 23);\r\n\t\tcal.set(Calendar.MINUTE, 59);\r\n\t\tcal.set(Calendar.SECOND, 59);\r\n\t\treturn cal.getTime();\r\n\t}", "public Date next() {\n if (isValid(month, day + 1, year)) return new Date(month, day + 1, year);\n else if (isValid(month + 1, 1, year)) return new Date(month, 1, year);\n else return new Date(1, 1, year + 1);\n }", "public Date getFinishDate() {\n if (this.finishDate == null) {\n return null;\n }\n return new Date(this.finishDate.getTime());\n }", "public String getDeathdate() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"M/dd/yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.add(Calendar.MONTH, this.monthsUntilDeath);\n return sdf.format(calendar.getTime());\n }", "private Timestamp getFechaFinal(Admision admision) {\n\t\tTimestamp fecha_final = admisionService\n\t\t\t\t.getFechaUltimoServicio(admision);\n\t\tif (fecha_final == null) {\n\t\t\tCalendar calendar = Calendar.getInstance();\n\t\t\tif (admision.getFecha_atencion() != null) {\n\t\t\t\tcalendar.setTime(admision.getFecha_atencion());\n\t\t\t} else {\n\t\t\t\tcalendar.setTime(admision.getFecha_ingreso());\n\t\t\t}\n\t\t\tcalendar.set(Calendar.HOUR_OF_DAY,\n\t\t\t\t\tcalendar.get(Calendar.HOUR_OF_DAY) + 1);\n\t\t\treturn new Timestamp(calendar.getTimeInMillis());\n\t\t}\n\t\treturn fecha_final;\n\t}", "private void adjustDayInMonthIfNeeded(int month, int year) {\n int day = mCurrentDate.get(Calendar.DAY_OF_MONTH);\n int daysInMonth = getDaysInMonth(month, year);\n if (day > daysInMonth) {\n mCurrentDate.set(Calendar.DAY_OF_MONTH, daysInMonth);\n }\n }", "static DateTime GetLastXWeekdayOfMonthBeforeYMonthday(int iXDayOfWeek,\n int iYMonthDay, int iYear, int iMonth) {\n assert 1 <= iYMonthDay && iYMonthDay <= 31;\n DateTime dmLastXDayOfMonth = GetLastXWeekdayOfMonth(iXDayOfWeek, iYear,\n iMonth);\n while (dmLastXDayOfMonth.getDayOfMonth() >= iYMonthDay) {\n dmLastXDayOfMonth.minusWeeks(1);\n }\n return dmLastXDayOfMonth;\n }", "public Date getEndDate();", "public Date getEndDate();", "public static Date getLastTimeRunInDate(Context c) {\n\t\tlong lastTimeRuninMillis = getLastTimeRunInMills(c);\n\t\tif (lastTimeRuninMillis != -1)\n\t\t\treturn new Date(getLastTimeRunInMills(c));\n\t\treturn null;\n\t}", "public Observable<ServiceResponse<LocalDate>> getMaxDateWithServiceResponseAsync() {\n return service.getMaxDate()\n .flatMap(new Func1<Response<ResponseBody>, Observable<ServiceResponse<LocalDate>>>() {\n @Override\n public Observable<ServiceResponse<LocalDate>> call(Response<ResponseBody> response) {\n try {\n ServiceResponse<LocalDate> clientResponse = getMaxDateDelegate(response);\n return Observable.just(clientResponse);\n } catch (Throwable t) {\n return Observable.error(t);\n }\n }\n });\n }", "public static void setEndOfMonth(Calendar calendar) {\r\n\t\tcalendar.set(Calendar.MONTH, calendar.get(Calendar.MONTH) + 1);\r\n\t\tcalendar.set(Calendar.DAY_OF_MONTH, 1);\r\n\t\tcalendar.set(Calendar.HOUR_OF_DAY, 0);\r\n\t\tcalendar.set(Calendar.MINUTE, 0);\r\n\t\tcalendar.set(Calendar.SECOND, 0);\r\n\t\tcalendar.set(Calendar.MILLISECOND, 0);\r\n\t}", "public int getCurrentDayOfMonthAsNum() {\n\t\t\t\tint dayOfMonth = Calendar.getInstance().get(Calendar.DAY_OF_MONTH);\n\t\t\t\treturn dayOfMonth;\n\t\t\t}", "public void calculateMaxDateForReport() {\r\n\t\ttry {\r\n\t\t\tthis.maxDateReport = ControladorFechas.sumarMeses(\r\n\t\t\t\t\tthis.startDateReport, Constantes.NUMBER_MONTHS_REPORT);\r\n\t\t\tif (this.endDateReport != null\r\n\t\t\t\t\t&& (this.endDateReport.before(this.startDateReport) || this.endDateReport\r\n\t\t\t\t\t\t\t.after(this.maxDateReport))) {\r\n\t\t\t\tthis.endDateReport = null;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}", "public String getLastClosingDate() throws RollbackException {\n FundPriceHistory[] history = match(MatchArg.max(\"executeDate\"));\n if (history.length == 0) {\n return null;\n } else {\n return history[0].getExecuteDate();\n }\n }", "public void setLastmonthFee(BigDecimal lastmonthFee) {\r\n this.lastmonthFee = lastmonthFee;\r\n }", "public int getDayOfMonth() {\n\n return this.cdom;\n\n }", "public Date getLastRankDate() {\r\n return (Date) getAttributeInternal(LASTRANKDATE);\r\n }", "private static LocalDate getFirstDayOfTheMonth(final int month, final int year) {\n return LocalDate.of(year, month, 1);\n }", "public int getNextMonth()\n\t{\n\t\tm_calendar.set(Calendar.MONTH, getMonthInteger());\n\t\t\n\t\tsetDay(getYear(),getMonthInteger(),1);\n\t\t\n\t\treturn getMonthInteger();\n\t\n\t}", "Integer getEndDay();", "public final native int getUTCMonth() /*-{\n return this.getUTCMonth();\n }-*/;", "public String getMonth()\n {\n SimpleDateFormat newDateFormat = new SimpleDateFormat(\"dd/MM\");\n String MySDate = newDateFormat.format(this.dueDate);\n return MySDate;\n }", "@WebMethod\n\tpublic Vector<Date> getEventsMonth(Date date) {\n\t\tdbManager.open(false);\n\t\tVector<Date> dates = dbManager.getEventsMonth(date);\n\t\tdbManager.close();\n\t\treturn dates;\n\t}" ]
[ "0.72900873", "0.72574407", "0.7204908", "0.7182686", "0.705375", "0.6819638", "0.64489704", "0.63886595", "0.6388215", "0.6295909", "0.6248745", "0.6210035", "0.58960027", "0.586873", "0.57835925", "0.5686672", "0.5670623", "0.5663281", "0.5653665", "0.5647529", "0.5631189", "0.5617953", "0.5613503", "0.56106377", "0.5609264", "0.5596305", "0.5495207", "0.54324794", "0.5421235", "0.5366305", "0.5353887", "0.531296", "0.5299133", "0.5292227", "0.5258693", "0.5254858", "0.5249668", "0.5217244", "0.52127784", "0.51773924", "0.51733845", "0.5162504", "0.5159944", "0.5159944", "0.5149411", "0.5108054", "0.5090822", "0.5072853", "0.505023", "0.50491506", "0.5046194", "0.50405943", "0.50398874", "0.5039465", "0.50226635", "0.50129527", "0.5005096", "0.4987138", "0.49841586", "0.49810973", "0.49728128", "0.49575663", "0.49544328", "0.494788", "0.4938151", "0.49379992", "0.4919159", "0.4907863", "0.4902197", "0.48966566", "0.48779917", "0.4863207", "0.48615366", "0.48456562", "0.48399678", "0.4835184", "0.48270518", "0.48134086", "0.47885305", "0.47879672", "0.47564086", "0.47520438", "0.47457093", "0.47360134", "0.47360134", "0.4734208", "0.47205728", "0.4715753", "0.47150546", "0.47112504", "0.47107264", "0.47081715", "0.4704807", "0.47014156", "0.46956316", "0.46821013", "0.467514", "0.46744913", "0.4669893", "0.4669248" ]
0.8381996
0
Generates an array of dates ending on the last day of every month between the start and stop dates.
public static List<LocalDate> getLastDayOfTheMonths(final LocalDate startDate, final LocalDate endDate) { final ArrayList<LocalDate> list = new ArrayList<>(); final LocalDate end = DateUtils.getLastDayOfTheMonth(endDate); LocalDate t = DateUtils.getLastDayOfTheMonth(startDate); /* * add a month at a time to the previous date until all of the months * have been captured */ while (before(t, end)) { list.add(t); t = t.plusMonths(1); t = t.with(TemporalAdjusters.lastDayOfMonth()); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String[] getLast30Dates() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tString[] dates = new String[30];\n\t\tfor (int i=29; i>=0; i-- ) {\n\t\t\tdates[i] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t}\n\t\treturn dates;\n\t}", "private static long[] computeExpirationInPeriod(long start, long end) {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeInMillis(start);\n\t\tcal.set(Calendar.DAY_OF_MONTH, 1);\n\t\tList<Long> expires = new ArrayList<>();\n\t\tint dayOfWeek;\n\t\tint currentMonth = cal.get(Calendar.MONTH);\n\t\tint countFriday = 0;\n\t\twhile (cal.getTimeInMillis() <= end) {\n\t\t\tdayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t\tif (currentMonth != cal.get(Calendar.MONTH)) {\n\t\t\t\tcountFriday = 0;\n\t\t\t\tcurrentMonth = cal.get(Calendar.MONTH);\n\t\t\t}\n\n\t\t\tif (dayOfWeek % Calendar.FRIDAY == 0) {\n\t\t\t\t++countFriday;\n\t\t\t\tif (countFriday == 3) {\n\t\t\t\t\texpires.add(cal.getTimeInMillis());\n\t\t\t\t}\n\t\t\t}\n\t\t\tcal.add(Calendar.DAY_OF_MONTH, 1);\n\t\t}\n\t\treturn expires.stream()\n\t\t\t\t.mapToLong(Long::longValue)\n\t\t\t\t.filter((o) -> o >= start)\n\t\t\t\t.toArray();\n\t}", "public static List<LocalDate> getFirstDayOfTheMonths(final LocalDate startDate, final LocalDate endDate) {\n final ArrayList<LocalDate> list = new ArrayList<>();\n\n final LocalDate end = DateUtils.getFirstDayOfTheMonth(endDate);\n LocalDate t = DateUtils.getFirstDayOfTheMonth(startDate);\n\n /*\n * add a month at a time to the previous date until all of the months\n * have been captured\n */\n while (before(t, end)) {\n list.add(t);\n t = t.with(TemporalAdjusters.firstDayOfNextMonth());\n }\n return list;\n }", "public Set<String> getListOfMonths(String startDate, String endDate) {\n HashSet<String> set = new HashSet<String>();\n String first = getEndOfMonth(startDate);\n String last = getEndOfMonth(endDate);\n String current = last;\n\n set.add(current.substring(0, 6));\n\n while (!current.equals(first)) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.add(Calendar.MONTH, -1);\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = getEndOfMonth(year + month + day);\n\n set.add(current.substring(0, 6));\n }\n\n return set;\n }", "public List<String> getListOfWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n int count = 1;\n\n while (current.compareTo(first) > 0) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n\n if (count <= 4) {\n c.add(Calendar.DAY_OF_MONTH, -7);\n } else if (count <= 16) {\n c.add(Calendar.MONTH, -1);\n } else {\n c.add(Calendar.YEAR, -1);\n }\n\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n count++;\n }\n\n return list;\n }", "public List<String> getListOfAllWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n while (!current.equals(first)) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.add(Calendar.DAY_OF_MONTH, -7);\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n }\n\n return list;\n }", "private static Long[] getTimeInterval(Date date) {\n\n\t\tCalendar calendarStart = GregorianCalendar.getInstance();\n\t\tcalendarStart.setTime(date);\n\t\tcalendarStart.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset\n\t\t\t\t\t\t\t\t\t\t\t\t\t// the hour of day !\n\t\tcalendarStart.clear(Calendar.MINUTE);\n\t\tcalendarStart.clear(Calendar.SECOND);\n\t\tcalendarStart.clear(Calendar.MILLISECOND);\n\t\tcalendarStart.set(Calendar.DAY_OF_MONTH, 1);\n\t\t// System.out.println(sdf.format(calendarStart.getTime()));\n\n\t\tCalendar calendarEnd = GregorianCalendar.getInstance();\n\t\tcalendarEnd.setTime(date);\n\t\tcalendarEnd.set(Calendar.HOUR_OF_DAY, 23); // ! clear would not reset\n\t\t\t\t\t\t\t\t\t\t\t\t\t// the hour of day !\n\t\tcalendarEnd.set(Calendar.MINUTE, 59);\n\t\tcalendarEnd.set(Calendar.SECOND, 59);\n\t\tcalendarEnd.clear(Calendar.MILLISECOND);\n\t\tcalendarEnd.set(Calendar.DAY_OF_MONTH,\n\t\t\t\tcalendarStart.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t// System.out.println(sdf.format(calendarEnd.getTime()));\n\n\t\tLong[] result = new Long[2];\n\t\tresult[0] = calendarStart.getTimeInMillis();\n\t\tresult[1] = calendarEnd.getTimeInMillis();\n\t\treturn result;\n\t}", "public Calendar endOfMonth() {\r\n\t\t\r\n\t\t// get the date at the beginning of next month\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH) + 1, 1);\r\n\t\t\r\n\t\treturn c2;\r\n\t}", "public static Date[] getStartEndDateOfLastSpecifiedWeeks(final int num, final String timeZone) {\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n final Date currentDate = DateContent.formatStringIntoDate(currentDateStr, DateContent.YYYY_MM_DD_HH_MM_SS);\n\n final Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.setFirstDayOfWeek(Calendar.MONDAY);\n calendar.add(Calendar.WEEK_OF_YEAR, -1);\n calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n Date endDateTime = calendar.getTime();\n\n calendar.add(Calendar.WEEK_OF_YEAR, -(num - 1));\n calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n Date startDateTime = calendar.getTime();\n\n endDateTime = DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone);\n startDateTime = DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone);\n return new Date[]{startDateTime, endDateTime};\n }", "public static Date[] getLastYearDateRange(String timeZone) {\n\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH, -1);\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n final Date endDateTime = calendar.getTime();\n\n calendar = Calendar.getInstance();\n calendar.add(Calendar.YEAR, -1);\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n final Date startDateTime = calendar.getTime();\n\n return new Date[]{DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone), DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone)};\n }", "public static ArrayList<Date> events(Task task, Date start, Date end){\n ArrayList<Date> dates = new ArrayList<>();\n for (Date i = task.nextTimeAfter(start); !end.before(i); i = task.nextTimeAfter(i))\n dates.add(i);\n return dates;\n }", "default List<ZonedDateTime> getExecutionDates(ZonedDateTime startDate, ZonedDateTime endDate) {\n if (endDate.equals(startDate) || endDate.isBefore(startDate)) {\n throw new IllegalArgumentException(\"endDate should take place later in time than startDate\");\n }\n List<ZonedDateTime> executions = new ArrayList<>();\n ZonedDateTime nextExecutionDate = nextExecution(startDate).orElse(null);\n\n if (nextExecutionDate == null) return Collections.emptyList();\n while(nextExecutionDate != null && (nextExecutionDate.isBefore(endDate) || nextExecutionDate.equals(endDate))){\n executions.add(nextExecutionDate);\n nextExecutionDate = nextExecution(nextExecutionDate).orElse(null);\n }\n return executions;\n }", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "public void testMaximumDayInMonthFor()\n {\n int[] test = new int[]{\n 2000, 0/*Jan*/, 31,\n 2000, 1/*Feb*/, 29,\n 1996, 1/*Feb*/, 29,\n 1900, 1/*Feb*/, 28,\n 0, 1/*Feb*/, 29,\n -400, 1/*Feb*/, 29,\n -397, 1/*Feb*/, 28 };\n \n for( int i=0; i<test.length; i+=3 )\n {\n assertEquals( test[i+2], Util.maximumDayInMonthFor(test[i],test[i+1]) );\n assertEquals( test[i+2], Util.maximumDayInMonthFor(Util.int2bi(test[i]),test[i+1]) );\n }\n }", "private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }", "public Date addMonths(int m) {\r\n if (m < 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Month should not be the negative value!\");\r\n\t\t}\r\n\r\n\r\n\t\tint newMonth = (month + (m % 12)) > 12 ? ((month + (m % 12)) % 12) : month\r\n\t\t\t\t+ (m % 12);\r\n\t\tint newYear = (month + (m % 12)) > 12 ? year + (m / 12) + 1 : year\r\n\t\t\t\t+ (m / 12);\r\n int newDay = 0;\r\n // IF the new month has less total days in it than the starting month\r\n // and the date being added to is the last day of the month, adjust\r\n // and make newDay correct with its corresponding month.\r\n \r\n // IF not leap year and not Feb. make newDay correct.\r\n if (day > DAYS[newMonth] && (newMonth != 2)) {\r\n newDay = (DAYS[newMonth]);\r\n //System.out.println(\"1\");\r\n } \r\n \r\n // IF not leap year but not Feb. make newDay 28. (This is usually the case for Feb.)\r\n else if ((day > DAYS[newMonth]) && (isLeapYear(newYear) == false) && (newMonth == 2)){\r\n newDay = (DAYS[newMonth] - 1);\r\n }\r\n \r\n // IF leap year and is Feb. make newDay 29.\r\n else if ((day > DAYS[newMonth]) && isLeapMonth(newMonth, newYear) == true){\r\n newDay = DAYS[newMonth];\r\n }\r\n\r\n // if day is not gretaer than the last day of the new month, make no change.\r\n else {\r\n newDay = day;\r\n } \r\n\t\treturn (new Date(newMonth, newDay, newYear));\r\n\t}", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public static LocalDate getLastOfNextMonth() {\n\t\treturn BusinessDateUtility.getFirstOfNextMonth().with(TemporalAdjusters.lastDayOfMonth());\n\t}", "@WebMethod public Vector<Date> getEventsMonth(Date date);", "public ArrayList<String> getAllEventDays(){\n ArrayList<Integer> sorted = this.getAllEventDayMonth();\n ArrayList<String> data = new ArrayList<>();\n String month = this.eventList.get(0).getStartTime().getMonth().toString();\n\n for (int date: sorted){\n StringBuilder string = new StringBuilder();\n\n string.append(month);\n string.append(\" \");\n string.append(date);\n data.add(string.toString());\n }\n return data;\n }", "LocalDate getCollectionEndDate();", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "List<MonthlyExpenses> lastMonthExpenses();", "@Test\n public void repeatingTask_CheckDateOfEndOfMonth_lastDayOfMonthDate() {\n int[] endOfMonth = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n int[] endOfMonthLeapYear = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n RepeatCommand testRepeatCommand = new RepeatCommand(0, 1, RepeatCommand.MONTHLY_ICON);\n testRepeatCommand.execute(testTaskList, testUi);\n RepeatEvent repeatEvent = (RepeatEvent) testTaskList.getTask(0);\n LocalDate eventDate = repeatEvent.getDate();\n\n int year = LocalDate.now().getYear();\n // Check if this year is a leap year\n if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) {\n assertEquals(eventDate.getDayOfMonth(), endOfMonthLeapYear[eventDate.getMonthValue()]);\n } else {\n assertEquals(eventDate.getDayOfMonth(), endOfMonth[eventDate.getMonthValue()]);\n }\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static List<String> getDaysBetweenDates(String startDate, String endDate)\n throws ParseException {\n List<String> dates = new ArrayList<>();\n\n DateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(new SimpleDateFormat(\"dd.MM.yyyy\").parse(startDate));\n\n while (calendar.getTime().before(new SimpleDateFormat(\"dd.MM.yyyy\").parse(endDate)))\n {\n Date result = calendar.getTime();\n dates.add(df.format(result));\n calendar.add(Calendar.DATE, 1);\n }\n dates.add(endDate);\n return dates;\n }", "private ArrayList<String> parseDays(String y, String startMonth, String endMonth, String weekDays) {\n\t\t\t\tArrayList<String> result = new ArrayList<>();\n\t\t\t\tint year = Integer.parseInt(y);\n\t\t\t\tint startM = Integer.parseInt(startMonth) - 1;\n\t\t\t\tint endM = Integer.parseInt(endMonth) - 1;\n\n\t\t\t\tMap<String, Integer> weekMap = new HashMap<>();\n\t\t\t\tweekMap.put(\"S\", 1);\n\t\t\t\tweekMap.put(\"M\", 2);\n\t\t\t\tweekMap.put(\"T\", 3);\n\t\t\t\tweekMap.put(\"W\", 4);\n\t\t\t\tweekMap.put(\"H\", 5);\n\t\t\t\tweekMap.put(\"F\", 6);\n\t\t\t\tweekMap.put(\"A\", 7);\n\n\t\t\t\tSet<Integer> set = new HashSet<>();\n\t\t\t\tfor (int i = 0; i < weekDays.length(); i++) {\n\t\t\t\t\tset.add(weekMap.get(weekDays.substring(i, i + 1)));\n\t\t\t\t}\n\n\t\t\t\tCalendar cal = new GregorianCalendar(year, startM, 1);\n\t\t\t\tdo {\n\t\t\t\t\tint day = cal.get(Calendar.DAY_OF_WEEK);\n\t\t\t\t\tif (set.contains(day)) {\n\t\t\t\t\t\tresult.add(\"\" + y + parseToTwoInteger((cal.get(Calendar.MONTH) + 1))\n\t\t\t\t\t\t\t\t+ parseToTwoInteger(cal.get(Calendar.DAY_OF_MONTH)));\n\t\t\t\t\t}\n\t\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, 1);\n\t\t\t\t} while (cal.get(Calendar.MONTH) <= endM);\n\n\t\t\t\treturn result;\n\n\t\t\t}", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "Date getEndDate();", "Date getEndDate();", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public AgendaMB() {\n GregorianCalendar dtMax = new GregorianCalendar(); \n Date dt = new Date();\n dtMax.setTime(dt); \n GregorianCalendar dtMin = new GregorianCalendar(); \n dtMin.setTime(dt);\n dtMin.add(Calendar.DAY_OF_MONTH, 1);\n dtMax.add(Calendar.DAY_OF_MONTH, 40);\n dataMax = dtMax.getTime();\n dataMin = dtMin.getTime(); \n }", "Date getEndDay();", "private List<Long> makeListOfDatesLong(HashSet<Calendar> workDays) {\n List<Long> days = new ArrayList<>();\n if (workDays != null) {\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n //days.add(sdf.format(date.getTime()));\n days.add(date.getTimeInMillis());\n }\n }\n return days;\n }", "public static Date lastDayMonth(){\n String rep_fin_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n\n /*Obteniendo el ultimo dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n\n /*Almacenamos un string con el formato indicado*/\n rep_fin_de_mes = sdf.format(c.getTime());\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_fin_de_mes);\n }", "@WebMethod public ArrayList<LocalDate> getEventsMonth(LocalDate date);", "public static List<Date> nextDates(Integer daysIntervalSize, Date lastDate) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(lastDate);\n for (int i = 1; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "public List<LocalDate> getDaysOfVacationByMonth(List<Vacation> vacationList, int month) {\n\n List<LocalDate> listOfDaysToReturn = new ArrayList<>();\n\n for (LocalDate dayDate : getDaysBetweenDates(vacationList)) {\n\n if (dayDate.getMonth().getValue() == month) {\n\n listOfDaysToReturn.add(dayDate);\n }\n }\n\n return listOfDaysToReturn;\n }", "public Date getEndDate();", "public Date getEndDate();", "public String[] getStepDates() {\r\n HistoryStep[] steps = currentProcessInstance.getHistorySteps();\r\n String[] dates = new String[steps.length];\r\n Date date = null;\r\n \r\n for (int i = 0; i < steps.length; i++) {\r\n date = steps[i].getActionDate();\r\n dates[i] = DateUtil.getOutputDate(date, getLanguage());\r\n }\r\n \r\n return dates;\r\n }", "public int monthsBetween(Date endDate) {\r\n\t\t// int monthDiff = 0;\r\n\t\t// if (month <= endDate.month) {\r\n\t\t// if (day <= endDate.day) {\r\n\t\t// monthDiff = (endDate.month - month)\r\n\t\t// + (endDate.year - year) * 12;\r\n\t\t// } else {\r\n\t\t// monthDiff = (endDate.month - month - 1)\r\n\t\t// + (endDate.year - year) * 12;\r\n\t\t// }\r\n\t\t// } else {\r\n\t\t// if (day <= endDate.day) {\r\n\t\t// monthDiff = (12 - month + endDate.month)\r\n\t\t// + (endDate.year - year - 1) * 12;\r\n\t\t// } else {\r\n\t\t// monthDiff = (11 - month + endDate.month)\r\n\t\t// + (endDate.year - year - 1) * 12;\r\n\t\t// }\r\n\t\t// }\r\n\t\t// return monthDiff;\r\n\r\n\t\t// Yuanzhe Begin:\r\n\t\tint monthsBetween = 0;\r\n\r\n\t\tif (compareTo(endDate) <= 0) {\r\n\t\t\tint tmpMonths = 0;\r\n\t\t\twhile (true) {\r\n\t\t\t\ttmpMonths++;\r\n\t\t\t\tDate tmpDate = this.addMonths(tmpMonths);\r\n\t\t\t\tif (tmpDate.compareTo(endDate) <= 0) {\r\n\t\t\t\t\tmonthsBetween++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\treturn monthsBetween;\r\n\t\t} else {\r\n\t\t\tint tmpMonths = 0;\r\n\t\t\twhile (true) {\r\n\t\t\t\ttmpMonths++;\r\n\t\t\t\tDate tmpDate = endDate.addMonths(tmpMonths);\r\n\t\t\t\tif (tmpDate.compareTo(this) <= 0) {\r\n\t\t\t\t\tmonthsBetween++;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn -monthsBetween;\r\n\t\t}\r\n\t\t// Yuanzhe End:\r\n\t}", "public static Date[] getPastMonthsInDate(Date val, int NumberOfMonthsInPast) {\n\n\t\tint month = getMonthNumberByDate(val);\n\t\tint year = getYearByDate(val);\n\n\t\tDate ret[] = new Date[NumberOfMonthsInPast];\n\n\t\tfor (int i = (NumberOfMonthsInPast - 1); i >= 0; i--) {\n\n\t\t\tint imonth = (month - i);\n\t\t\tint iyear = year;\n\n\t\t\tif (imonth < 1) {\n\t\t\t\timonth = imonth + 12;\n\t\t\t\tiyear = iyear - 1;\n\t\t\t}\n\n\t\t\tret[(NumberOfMonthsInPast - i - 1)] = getStartDateByMonth(\n\t\t\t\t\timonth - 1, iyear);\n\n\t\t}\n\n\t\treturn ret;\n\t}", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public Urls getLastMonthUrls() {\n\t\tDate date = new Date();\n\t\tEasyDate easyDate = new EasyDate(date);\n\t\treturn getRecentlyCreatedUrls(easyDate.getPreviousMonthDate());\n\t}", "public ArrayList<String> getYYYYMMList(String dateFrom, String dateTo) throws Exception {\n\n ArrayList<String> yyyyMMList = new ArrayList<String>();\n try {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(dateFrom.split(\"-\")[0]), Integer.parseInt(dateFrom.split(\"-\")[1]) - 1, Integer.parseInt(dateFrom.split(\"-\")[2]));\n\n String yyyyTo = dateTo.split(\"-\")[0];\n String mmTo = Integer.parseInt(dateTo.split(\"-\")[1]) + \"\";\n if (mmTo.length() < 2) {\n mmTo = \"0\" + mmTo;\n }\n String yyyymmTo = yyyyTo + mmTo;\n\n while (true) {\n String yyyy = calendar.get(Calendar.YEAR) + \"\";\n String mm = (calendar.get(Calendar.MONTH) + 1) + \"\";\n if (mm.length() < 2) {\n mm = \"0\" + mm;\n }\n yyyyMMList.add(yyyy + mm);\n\n if ((yyyy + mm).trim().toUpperCase().equalsIgnoreCase(yyyymmTo)) {\n break;\n }\n calendar.add(Calendar.MONTH, 1);\n }\n return yyyyMMList;\n } catch (Exception e) {\n throw new Exception(\"getYYYYMMList : dateFrom(yyyy-mm-dd)=\" + dateFrom + \" : dateTo(yyyy-mm-dd)\" + dateTo + \" : \" + e.toString());\n }\n }", "public int[] getDaysOfMonth() {\n return daysOfMonth;\n }", "@Override\n\tpublic Calendar generateEndDate( ValueSetType vst, VariableValueType value ) {\n\t\treturn generateStartDate( vst, value );\n\t}", "private void getDateStartEnd(BudgetRecyclerView budget) {\n String viewByDate = budget.getDate();\n String[] dateArray = viewByDate.split(\"-\");\n for (int i = 0; i < dateArray.length; i++) {\n dateArray[i] = dateArray[i].trim();\n }\n startDate = CalendarSupport.convertStringToDate(dateArray[0]);\n endDate = CalendarSupport.convertStringToDate(dateArray[1]);\n }", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "public int getMonthsPast(){\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tint c_month = calendar.get(Calendar.MONTH);\n\t\tint c_day = calendar.get(Calendar.DAY_OF_MONTH);\n\t\tString[] date = start_date.split(\"-\");\n\t\tint month = Integer.parseInt(date[1]);\n\t\tint day = Integer.parseInt(date[2]);\n\t\t\n\t\tint current_count = c_day;\n\t\tint client_count = day;\n\t\t\n\t\tswitch (c_month - 1){\n\t\tcase 11:\n\t\t\tcurrent_count += 31;\n\t\tcase 10: \n\t\t\tcurrent_count += 30;\n\t\tcase 9:\n\t\t\tcurrent_count += 31;\n\t\tcase 8:\n\t\t\tcurrent_count += 30;\n\t\tcase 7:\n\t\t\tcurrent_count += 31;\n\t\tcase 6:\n\t\t\tcurrent_count += 31;\n\t\tcase 5: \n\t\t\tcurrent_count += 30;\n\t\tcase 4: \n\t\t\tcurrent_count += 31;\n\t\tcase 3:\n\t\t\tcurrent_count += 30;\n\t\tcase 2: \n\t\t\tcurrent_count += 31;\n\t\tcase 1: \n\t\t\tcurrent_count += 28;\n\t\tcase 0: \n\t\t\tcurrent_count += 31;\n\t\t\tbreak;\n\t\t\t\n\t}\n\t\n\t\tswitch (month - 2){\n\t\tcase 11:\n\t\t\tclient_count += 31;\n\t\tcase 10: \n\t\t\tclient_count += 30;\n\t\tcase 9:\n\t\t\tclient_count += 31;\n\t\tcase 8:\n\t\t\tclient_count += 30;\n\t\tcase 7:\n\t\t\tclient_count += 31;\n\t\tcase 6:\n\t\t\tclient_count += 31;\n\t\tcase 5: \n\t\t\tclient_count += 30;\n\t\tcase 4: \n\t\t\tclient_count += 31;\n\t\tcase 3:\n\t\t\tclient_count += 30;\n\t\tcase 2: \n\t\t\tclient_count += 31;\n\t\tcase 1: \n\t\t\tclient_count += 28;\n\t\tcase 0: \n\t\t\tclient_count += 31;\n\t\t\tbreak;\n\t}\n\t\t\n\treturn current_count-client_count;\n\t}", "public int[] GetDateMD(){\n\t\tint[] i = new int[2];\n\t\ti[0] = this.date.get(Calendar.MONTH);\n\t\ti[1] = this.date.get(Calendar.DAY_OF_MONTH);\n\t\treturn i;\n\t}", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "public static int monthsBetween(final Date start, final Date end) {\n return Dates.dateDiff(start, end, Calendar.MONTH);\n }", "public static void main(String args[]){\n\t\tTimeUtil.getBetweenDays(\"2019-01-01\",TimeUtil.dateToStr(new Date(), \"-\"));\n\t\t\n\t\t/*\tTimeUtil tu=new TimeUtil();\n\t\t\tString r=tu.ADD_DAY(\"2009-12-20\", 20);\n\t\t\tSystem.err.println(r);\n\t\t\tString [] a= TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",9);\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"1\",9));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"2\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"3\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",3));\n\t*/\n\t\tTimeUtil tu=new TimeUtil();\n\t//\tString newDate = TimeUtil.getDateOfCountMonth(\"2011-03-31\", 6);\n\t//\tSystem.out.println(newDate);\n//\t\tSystem.err.println(tu.getDateTime(\"\")+\"|\");\n\t\t\n\t\t}", "public static List<Date> initDates(Integer daysIntervalSize) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DATE, -((daysIntervalSize / 2) + 1));\n for (int i = 0; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "public ArrayList<Event> getCalendarEventsBetween(Calendar startingDate, Calendar endingDate)\n {\n ArrayList<Event> list = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n Calendar eventCalendar = events.get(i).getCalendar();\n\n if(isSame(startingDate, eventCalendar) || isSame(endingDate, eventCalendar) ||\n (eventCalendar.before(endingDate) && eventCalendar.after(startingDate)))\n {\n list.add(events.get(i));\n }\n }\n return list;\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "public ArrayList<Event> getCalendarEventsByMonth()\n {\n ArrayList<Event> monthListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)))\n {\n monthListOfEvents.add(events.get(i));\n }\n }\n return monthListOfEvents;\n }", "@Test\n void calculatePeriod12Months() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2016-08-12\");\n\n System.out.println(\"periodStartDate: \" + testDateStart);\n\n LocalDate testDateEnd = LocalDate.parse(\"2017-08-23\");\n\n System.out.println(\"periodEndDate: \" + testDateStart);\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertNull(periodMap.get(PERIOD_START));\n assertEquals(\"2017\", periodMap.get(PERIOD_END));\n\n }", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "public void daysInCycle()\n {\n for(int j = 0; j < 11; j++)\n {\n for(int k = 0; k < 30; k++)\n {\n if(dates[j][k] > 0)\n {\n System.out.println(monthsArray[j-1] + \" \" + k + \" - \" + dates[j][k]);\n }\n }\n }\n }", "private List<LocalDate> getBackDatedEntitlementDates(List<LocalDate> newChildrenDatesOfBirth, LocalDate cycleStartDate) {\n LocalDate earliestDateOfBirth = min(newChildrenDatesOfBirth);\n LocalDate rollingEntitlementDate = cycleStartDate.minusDays(entitlementCalculationDurationInDays);\n List<LocalDate> backDatedEntitlementDates = new ArrayList<>();\n\n while (rollingEntitlementDate.isAfter(earliestDateOfBirth) || rollingEntitlementDate.isEqual(earliestDateOfBirth)) {\n backDatedEntitlementDates.add(rollingEntitlementDate);\n rollingEntitlementDate = rollingEntitlementDate.minusDays(entitlementCalculationDurationInDays);\n }\n\n return backDatedEntitlementDates;\n }", "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "private void generateIntervalArray(){\n BigDecimal maximumValue = this.getTfMaximumInterval();\n BigDecimal minimumValue = this.getTfMinimumInterval();\n BigDecimal stepValue = this.getTfStepInterval();\n \n intervalArray = new ArrayList<BigDecimal>();\n BigDecimal step = maximumValue;\n \n //Adiciona os valores \"inteiros\"\n while(step.doubleValue() >= minimumValue.doubleValue()){\n intervalArray.add(step);\n step = step.subtract(stepValue);\n }\n }", "@Override\r\n\tpublic int[] getMonthPeople() {\n\t\tint[] result = new int[12];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tDate dateStart = DateUtil.getFirstDay(date);\r\n\t\tDate dateEnd = DateUtil.getLastDay(date);\r\n\t\tresult[0] = cinemaConditionDao.getCount(dateStart, dateEnd);\r\n\t\tfor(int i=0;i<11;i++){\r\n\t\t\tdate = DateUtil.getMonthBefroe(dateStart);\r\n\t\t\tdateStart = DateUtil.getFirstDay(date);\r\n\t\t\tdateEnd = DateUtil.getLastDay(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getCount(dateStart, dateEnd);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "@WebMethod\n\tpublic Vector<Date> getEventsMonth(Date date) {\n\t\tdbManager.open(false);\n\t\tVector<Date> dates = dbManager.getEventsMonth(date);\n\t\tdbManager.close();\n\t\treturn dates;\n\t}", "public static WithAdjuster lastDayOfMonth() {\n\n return Impl.LAST_DAY_OF_MONTH;\n }", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public static void listWeekends() {\n Set<DayOfWeek> weekEnds = EnumSet.of(DayOfWeek.SATURDAY, DayOfWeek.SUNDAY);\n\n LocalDate currentDate = LocalDate.now();\n int year = currentDate.getYear();\n Month month = currentDate.getMonth();\n int currentDay = currentDate.getDayOfMonth();\n int daysOfMth = currentDate.lengthOfMonth();\n\n IntStream.rangeClosed(currentDay, daysOfMth)\n .mapToObj(day -> LocalDate.of(year, month, day))\n .filter(date -> weekEnds.contains(date.getDayOfWeek()))\n .forEach(JustBook::weekendListings);\n }", "public static LocalDate getLastOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.lastDayOfMonth());\n\t}", "public ArrayList<Integer> getAllEventDayMonth(){\n ArrayList<Integer> sorted = new ArrayList<>();\n\n\n for (Event event: this.eventList) {\n if(!sorted.contains(event.getStartTime().getDayOfMonth())){\n sorted.add(event.getStartTime().getDayOfMonth());\n }\n\n\n }\n Collections.sort(sorted);\n return sorted;\n }", "@Override\n public List<LocalDate> getAvailableDatesForService(final com.wellybean.gersgarage.model.Service service) {\n // Final list\n List<LocalDate> listAvailableDates = new ArrayList<>();\n\n // Variables for loop\n LocalDate tomorrow = LocalDate.now().plusDays(1);\n LocalDate threeMonthsFromTomorrow = tomorrow.plusMonths(3);\n\n // Loop to check for available dates in next three months\n for(LocalDate date = tomorrow; date.isBefore(threeMonthsFromTomorrow); date = date.plusDays(1)) {\n // Pulls bookings for specific date\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n /* If there are bookings for that date, check for time availability for service,\n if not booking then date available */\n if(optionalBookingList.isPresent()) {\n if(getAvailableTimesForServiceAndDate(service, date).size() > 0) {\n listAvailableDates.add(date);\n }\n } else {\n listAvailableDates.add(date);\n }\n }\n return listAvailableDates;\n }", "public int getEndMonth()\n\t{\n\t\treturn this.mEndMonth;\n\t}", "public static List<LogEntry> getAllByDates ( final String user, final String startDate, final String endDate ) {\n // Parse the start string for year, month, and day.\n final String[] startDateArray = startDate.split( \"-\" );\n final int startYear = Integer.parseInt( startDateArray[0] );\n final int startMonth = Integer.parseInt( startDateArray[1] );\n final int startDay = Integer.parseInt( startDateArray[2] );\n\n // Parse the end string for year, month, and day.\n final String[] endDateArray = endDate.split( \"-\" );\n final int endYear = Integer.parseInt( endDateArray[0] );\n final int endMonth = Integer.parseInt( endDateArray[1] );\n final int endDay = Integer.parseInt( endDateArray[2] );\n\n // Get calendar instances for start and end dates.\n final Calendar start = Calendar.getInstance();\n start.clear();\n final Calendar end = Calendar.getInstance();\n end.clear();\n\n // Set their values to the corresponding start and end date.\n start.set( startYear, startMonth, startDay );\n end.set( endYear, endMonth, endDay );\n\n // Check if the start date happens after the end date.\n if ( start.compareTo( end ) > 0 ) {\n System.out.println( \"Start is after End.\" );\n // Start is after end, return empty list.\n return new ArrayList<LogEntry>();\n }\n\n // Add 1 day to the end date. EXCLUSIVE boundary.\n end.add( Calendar.DATE, 1 );\n\n\n // Get all the log entries for the currently logged in users.\n final List<LogEntry> all = LoggerUtil.getAllForUser( user );\n // Create a new list to return.\n final List<LogEntry> dateEntries = new ArrayList<LogEntry>();\n\n // Compare the dates of the entries and the given function parameters.\n for ( int i = 0; i < all.size(); i++ ) {\n // The current log entry being looked at in the all list.\n final LogEntry e = all.get( i );\n\n // Log entry's Calendar object.\n final Calendar eTime = e.getTime();\n // If eTime is after (or equal to) the start date and before the end\n // date, add it to the return list.\n if ( eTime.compareTo( start ) >= 0 && eTime.compareTo( end ) < 0 ) {\n dateEntries.add( e );\n }\n }\n // Return the list.\n return dateEntries;\n }", "public static ArrayList<HashMap<String, String>> getCurrentMonthlDates() {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_monthly_dates_for_salesman_recovery()}\");\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\tmap.put(\"date\", rs.getString(\"get_date\"));\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "public static void main(String[] args) {\n TimeZone timezone = TimeZone.getTimeZone(\"Asia/Hong_Kong\");\n Calendar cal = Calendar.getInstance(timezone);\n System.out.println(cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n }", "public static Date extendUntilEndOfDay(Date date)\n {\n return DateUtils.addMilliseconds(DateUtils.addDays(DateUtils.truncate(date,\n Calendar.DAY_OF_MONTH), 1), -1);\n }", "private void startEndDay(int day,int month,int year) {\n int dayNum = CalendarEx.convertDay(CalendarDate.getDay(day, month, year));\n startDay = CalendarDate.moveDay(-dayNum, new CalendarDate(day,month,year));\n endDay = CalendarDate.moveDay(-dayNum+6, new CalendarDate(day,month,year));\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "public Boolean isEndOfMonth() {\n return _endOfMonth;\n }", "public void calculateMaxDateForReport() {\r\n\t\ttry {\r\n\t\t\tthis.maxDateReport = ControladorFechas.sumarMeses(\r\n\t\t\t\t\tthis.startDateReport, Constantes.NUMBER_MONTHS_REPORT);\r\n\t\t\tif (this.endDateReport != null\r\n\t\t\t\t\t&& (this.endDateReport.before(this.startDateReport) || this.endDateReport\r\n\t\t\t\t\t\t\t.after(this.maxDateReport))) {\r\n\t\t\t\tthis.endDateReport = null;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tControladorContexto.mensajeError(e);\r\n\t\t}\r\n\t}", "public static ArrayList<Date> getPastDates(int subject_index) {\n Calendar c = Calendar.getInstance();\n c.getTime();\n ArrayList<Date> result = new ArrayList<>();\n ArrayList<Integer> day_difference = new ArrayList<>();\n int current_day = Schedule.getTodaysNumber();\n int last_day = current_day;\n boolean end;\n int dif;\n\n if(current_day > 4) {\n current_day = 4;\n }\n\n //getting the difference (in days) for the next lessons in 4 weeks\n int days = settings.grades_getNumberOfWeeks() * 5;\n for(int i = 0; i < days; i++) {\n if(current_day < 0)\n current_day = 4;\n end = false;\n for(int y = 0; y < 9 && !end; y++) {\n if(Storage.schedule.getLesson(current_day, y) != null) {\n if(Storage.schedule.getLesson(current_day, y).getSubjectIndex() == subject_index) {\n if((dif = last_day - current_day) <= 0) {\n dif += 7;\n if(day_difference.size() == 0 && dif == 7) {\n dif = 0;\n }\n }\n day_difference.add(dif);\n last_day = current_day;\n end = true;\n }\n }\n }\n current_day--;\n }\n\n //deleting the measurements below day\n c.set(Calendar.HOUR_OF_DAY, 0);\n c.set(Calendar.MINUTE, 0);\n c.set(Calendar.SECOND, 0);\n c.set(Calendar.MILLISECOND, 0);\n\n //writing the correct dates\n for(int day = 0; day < day_difference.size(); day++) {\n c.add(Calendar.DATE, -day_difference.get(day));\n result.add(c.getTime());\n }\n return result;\n }", "public ArrayList<ConsumptionInstance> generateConsumptionInstances(long start_time, long end_time) {\n GregorianCalendar c = (GregorianCalendar) this.start_date.clone();\n ArrayList<ConsumptionInstance> result = new ArrayList<>();\n Collections.sort(this.timings);\n\n while(c.getTimeInMillis() < end_time + Utility.MILLIS_IN_DAY) {\n for (TimeOfDay t : timings) {\n c.set(Calendar.HOUR_OF_DAY, Integer.valueOf(t.getHour()));\n c.set(Calendar.MINUTE, Integer.valueOf(t.getMinute()));\n long millis = c.getTimeInMillis();\n\n if (start_time <= millis && millis < end_time) {\n ConsumptionInstance ci = new ConsumptionInstance(this.id, (GregorianCalendar) c.clone(),\n this.drug);\n if (deleted.contains(millis)) {\n ci.setDeleted(true);\n }\n result.add(ci);\n }\n }\n c.add(Calendar.DAY_OF_MONTH, this.interval);\n }\n\n return result;\n }", "@Test\n public void month() throws Exception {\n Date thisDate = dateFormat.parse(\"08/14/2006\");\n Month august06 = Month.create(thisDate);\n testThePeriod(august06, thisDate, \"08/01/2006 00:00:00.000\",\n \"08/31/2006 23:59:59.999\", \"2006-08\");\n\n //Test the prior period\n Date priorDate = dateFormat.parse(\"07/22/2006\");\n Month july06 = august06.prior();\n testThePeriod(july06, priorDate, \"07/01/2006 00:00:00.000\",\n \"07/31/2006 23:59:59.999\", \"2006-07\");\n\n //Test the next period.\n Date nextDate = dateFormat.parse(\"09/03/2006\");\n Month september06 = august06.next();\n testThePeriod(september06, nextDate, \"09/01/2006 00:00:00.000\",\n \"09/30/2006 23:59:59.999\", \"2006-09\");\n\n //Test compareTo\n testCompareTo(july06, august06, september06);\n }", "public List<String> getMonthsList(){\n Calendar now = Calendar.getInstance();\n int year = now.get(Calendar.YEAR);\n\n String months[] = {\"JANUARY\", \"FEBRUARY\", \"MARCH\", \"APRIL\",\n \"MAY\", \"JUNE\", \"JULY\", \"AUGUST\", \"SEPTEMBER\",\n \"OCTOBER\", \"NOVEMBER\", \"DECEMBER\"};\n\n List<String> mList = new ArrayList<>();\n\n //3 months of previous year to view the attendances\n for(int i=9; i<months.length; i++){\n mList.add(months[i]+\" \"+(year-1));\n }\n\n //Months of Current Year\n for(int i=0; i<=(now.get(Calendar.MONTH)); i++){\n mList.add(months[i]+\" \"+year);\n }\n\n return mList;\n }", "@Query(value = \"SELECT DATE(created_on),value FROM lost_products WHERE created_on >= ? AND created_on<= ?\", nativeQuery = true)\n List<Object[]> getLostsBetweenDates(LocalDate startDate, LocalDate endDate);", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getEndDate();", "public int[] getMonths() {\n return months;\n }", "public void prepareDyasList(int year2, int month2) {\n this.daysList.clear();\n for (int i = 1; i <= Utils.getDaysOfMonth(year2, month2); i++) {\n this.daysList.add(String.valueOf(i));\n }\n }", "public DateRange getDateRange();", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "public DateTime[] getSegmentFenceposts(LocalDate date) {\n DateTime start = date.toDateTimeAtStartOfDay();\n DateTime stop = date.plusDays(1).toDateTimeAtStartOfDay();\n int[] starts = getSegmentStartTimes();\n DateTime[] fenceposts = new DateTime[starts.length + 1];\n for (int i = 0; i < starts.length; i++) {\n fenceposts[i] = start.plusMillis(starts[i]);\n }\n fenceposts[starts.length] = stop;\n return fenceposts;\n }", "public List<LocalDate> getWorkingDaysVacations(List<Vacation> vacationList) {\n\n List<LocalDate> listToReturn = new ArrayList<>();\n\n for (LocalDate date : getDaysBetweenDates(vacationList)) {\n\n if (dateDiffOfWeekend(date)) {\n\n listToReturn.add(date);\n }\n }\n return listToReturn;\n }", "public List<LocalDate> getDaysBetweenDates(List<Vacation> vacationList) {\n\n List<LocalDate> dateList = new ArrayList<>();\n for (Vacation vacation : vacationList) {\n\n long days = dateDiffInNumberOfDays(vacation.getVacationStartDay(), vacation.getVacationEndDay());\n for (int i = 0; i <= days; i++) {\n\n LocalDate d = vacation.getVacationStartDay().plus(i, ChronoUnit.DAYS);\n dateList.add(d);\n }\n }\n\n return dateList;\n }", "public static String[] getDateRangeFromToday(int minimum_threshold, int maximum_threshold) {\n String minimum, maximum;\n\n Calendar c = Calendar.getInstance();\n c.add(Calendar.DAY_OF_MONTH, minimum_threshold - 1);\n minimum = c.get(Calendar.YEAR) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.MONTH) + 1)) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.DAY_OF_MONTH)));\n\n c = Calendar.getInstance();\n c.add(Calendar.DAY_OF_MONTH, maximum_threshold - 1);\n maximum = c.get(Calendar.YEAR) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.MONTH) + 1)) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.DAY_OF_MONTH)));\n\n return new String[] {minimum, maximum};\n }", "private static boolean isPast(long[][] dates){\n if(dates[0][0] > dates[1][0])\n return true;\n else if(dates[0][0] == dates[1][0]){\n // If the year matches, then check if the month of Start Date is greater than the month of End Date\n // If the month matches, then check if the day of Start Date is greater than the day of End Date\n if(dates[0][1] > dates[1][1])\n return true;\n else if(dates[0][1] == dates[1][1] && dates[0][2] > dates[1][2])\n return true;\n }\n \n // If the Start Date is older than End Date, return false\n return false;\n }", "public List<DateType> toDateList() {\n List<DateType> result = new ArrayList<>();\n if (fromDate != null) {\n result.add(fromDate);\n }\n if (toDate != null) {\n result.add(toDate);\n }\n if (fromToDate != null) {\n result.add(fromToDate);\n }\n return result;\n }", "public static String[] getMonths() {\n\t\tString[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n\t\treturn months;\n\t}" ]
[ "0.6190124", "0.61498815", "0.60751617", "0.60448915", "0.58002216", "0.5728688", "0.5722041", "0.56976676", "0.5677121", "0.5539371", "0.55242103", "0.54745436", "0.534904", "0.53485554", "0.5333677", "0.53193575", "0.52972174", "0.5251373", "0.5244991", "0.52426267", "0.52337766", "0.5223342", "0.5214942", "0.5175681", "0.5166694", "0.5155271", "0.5133509", "0.5099859", "0.5099859", "0.50996375", "0.5077323", "0.50696665", "0.5034846", "0.503236", "0.5031114", "0.50287545", "0.50204456", "0.5002441", "0.5002441", "0.4986831", "0.49756274", "0.4945309", "0.49081314", "0.48962164", "0.48930144", "0.4884004", "0.48836422", "0.48776707", "0.48722035", "0.4867341", "0.48613653", "0.4844519", "0.48250592", "0.48231167", "0.48126683", "0.48055908", "0.4804959", "0.4790571", "0.47886348", "0.4786072", "0.4764615", "0.4758537", "0.47539183", "0.4742642", "0.4739545", "0.47385955", "0.4737491", "0.47362402", "0.47107175", "0.47047046", "0.46914914", "0.46845967", "0.4675188", "0.4667336", "0.46609235", "0.46601093", "0.46598274", "0.4657211", "0.46551883", "0.46461165", "0.46454692", "0.46390086", "0.46234265", "0.4619301", "0.4613448", "0.46116483", "0.45830894", "0.45799068", "0.45702857", "0.45656386", "0.45651644", "0.45605963", "0.45605943", "0.45545745", "0.45528048", "0.45470625", "0.45440635", "0.4532937", "0.45257545", "0.4524534" ]
0.6985358
0
Generates an array of dates starting on the first day of every month between the start and stop dates.
public static List<LocalDate> getFirstDayOfTheMonths(final LocalDate startDate, final LocalDate endDate) { final ArrayList<LocalDate> list = new ArrayList<>(); final LocalDate end = DateUtils.getFirstDayOfTheMonth(endDate); LocalDate t = DateUtils.getFirstDayOfTheMonth(startDate); /* * add a month at a time to the previous date until all of the months * have been captured */ while (before(t, end)) { list.add(t); t = t.with(TemporalAdjusters.firstDayOfNextMonth()); } return list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LocalDate[] getFirstDayMonthly(final int year) {\n LocalDate[] list = new LocalDate[12];\n for (int i = 1; i <= 12; i++) {\n list[i - 1] = getFirstDayOfTheMonth(i, year);\n }\n return list;\n }", "@WebMethod public Vector<Date> getEventsMonth(Date date);", "public Calendar startOfMonth() {\r\n\t\t\r\n\t\tCalendar c2 = Calendar.getInstance(baseCalendar.getTimeZone());\r\n\t\tc2.clear();\r\n\t\tc2.set(baseCalendar.get(Calendar.YEAR), \r\n\t\t\t\tbaseCalendar.get(Calendar.MONTH), 1);\r\n\t\treturn c2;\r\n\t}", "private List<String> makeListOfDates(HashSet<Calendar> workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n SimpleDateFormat sdf = new SimpleDateFormat();\n List<String> days = new ArrayList<>();\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n days.add(sdf.format(date.getTime()));\n }\n\n return days;\n }", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "@WebMethod public ArrayList<LocalDate> getEventsMonth(LocalDate date);", "public static List<LocalDate> getLastDayOfTheMonths(final LocalDate startDate, final LocalDate endDate) {\n final ArrayList<LocalDate> list = new ArrayList<>();\n\n final LocalDate end = DateUtils.getLastDayOfTheMonth(endDate);\n LocalDate t = DateUtils.getLastDayOfTheMonth(startDate);\n\n /*\n * add a month at a time to the previous date until all of the months\n * have been captured\n */\n while (before(t, end)) {\n list.add(t);\n\n t = t.plusMonths(1);\n t = t.with(TemporalAdjusters.lastDayOfMonth());\n }\n return list;\n }", "public Set<String> getListOfMonths(String startDate, String endDate) {\n HashSet<String> set = new HashSet<String>();\n String first = getEndOfMonth(startDate);\n String last = getEndOfMonth(endDate);\n String current = last;\n\n set.add(current.substring(0, 6));\n\n while (!current.equals(first)) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.add(Calendar.MONTH, -1);\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = getEndOfMonth(year + month + day);\n\n set.add(current.substring(0, 6));\n }\n\n return set;\n }", "private static Long[] getTimeInterval(Date date) {\n\n\t\tCalendar calendarStart = GregorianCalendar.getInstance();\n\t\tcalendarStart.setTime(date);\n\t\tcalendarStart.set(Calendar.HOUR_OF_DAY, 0); // ! clear would not reset\n\t\t\t\t\t\t\t\t\t\t\t\t\t// the hour of day !\n\t\tcalendarStart.clear(Calendar.MINUTE);\n\t\tcalendarStart.clear(Calendar.SECOND);\n\t\tcalendarStart.clear(Calendar.MILLISECOND);\n\t\tcalendarStart.set(Calendar.DAY_OF_MONTH, 1);\n\t\t// System.out.println(sdf.format(calendarStart.getTime()));\n\n\t\tCalendar calendarEnd = GregorianCalendar.getInstance();\n\t\tcalendarEnd.setTime(date);\n\t\tcalendarEnd.set(Calendar.HOUR_OF_DAY, 23); // ! clear would not reset\n\t\t\t\t\t\t\t\t\t\t\t\t\t// the hour of day !\n\t\tcalendarEnd.set(Calendar.MINUTE, 59);\n\t\tcalendarEnd.set(Calendar.SECOND, 59);\n\t\tcalendarEnd.clear(Calendar.MILLISECOND);\n\t\tcalendarEnd.set(Calendar.DAY_OF_MONTH,\n\t\t\t\tcalendarStart.getActualMaximum(Calendar.DAY_OF_MONTH));\n\t\t// System.out.println(sdf.format(calendarEnd.getTime()));\n\n\t\tLong[] result = new Long[2];\n\t\tresult[0] = calendarStart.getTimeInMillis();\n\t\tresult[1] = calendarEnd.getTimeInMillis();\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public ArrayList<String> getAllEventDays(){\n ArrayList<Integer> sorted = this.getAllEventDayMonth();\n ArrayList<String> data = new ArrayList<>();\n String month = this.eventList.get(0).getStartTime().getMonth().toString();\n\n for (int date: sorted){\n StringBuilder string = new StringBuilder();\n\n string.append(month);\n string.append(\" \");\n string.append(date);\n data.add(string.toString());\n }\n return data;\n }", "public static void createArrayOfCalendars() {\n\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n\n /*\n\n At this point, every element in the array has a value of null.\n\n */\n\n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign it to each element in the array. \n * \n */\n \n for (int i = 0; i < calendars.length; i++) {\n calendars[i] = new GregorianCalendar(2021, i + 1, 1);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n \n /*\n * An enhanced for loop cannot modify the values of the elements in the array (.g., references to calendars), but we can call \n * mutator methods which midify the properties fo the referenced objects (e.g., day of the month).\n */\n \n for (GregorianCalendar calendar : calendars) {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for (GregorianCalendar calendar : calendars) {\n System.out.println(calendar);\n }\n }", "public static void createArrayOfCalendars()\n {\n GregorianCalendar[] calendars = new GregorianCalendar[12];\n \n /*\n * At this point, every element in the array has a value of\n * null.\n */\n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * Create a new calendar object and assign to each element\n * in the array.\n */\n for(int i = 0; i < calendars.length; i++)\n {\n calendars[i] = new GregorianCalendar(2018, i + 1, 1); // year, month, day\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n \n /*\n * An enahnced for loop cannot modify the value of the \n * elements in the array (e.g., references to calendars),\n * but we can call mutator methods which modify the\n * properties of the referenced objects (e.g., day\n * of the month).\n */\n for(GregorianCalendar calendar : calendars)\n {\n calendar.add(GregorianCalendar.DAY_OF_MONTH, 2);\n }\n \n for(GregorianCalendar calendar : calendars)\n {\n System.out.println(calendar);\n }\n }", "public static List<Date> initDates(Integer daysIntervalSize) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.DATE, -((daysIntervalSize / 2) + 1));\n for (int i = 0; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "public ArrayList<String> getYYYYMMList(String dateFrom, String dateTo) throws Exception {\n\n ArrayList<String> yyyyMMList = new ArrayList<String>();\n try {\n Calendar calendar = Calendar.getInstance();\n calendar.set(Integer.parseInt(dateFrom.split(\"-\")[0]), Integer.parseInt(dateFrom.split(\"-\")[1]) - 1, Integer.parseInt(dateFrom.split(\"-\")[2]));\n\n String yyyyTo = dateTo.split(\"-\")[0];\n String mmTo = Integer.parseInt(dateTo.split(\"-\")[1]) + \"\";\n if (mmTo.length() < 2) {\n mmTo = \"0\" + mmTo;\n }\n String yyyymmTo = yyyyTo + mmTo;\n\n while (true) {\n String yyyy = calendar.get(Calendar.YEAR) + \"\";\n String mm = (calendar.get(Calendar.MONTH) + 1) + \"\";\n if (mm.length() < 2) {\n mm = \"0\" + mm;\n }\n yyyyMMList.add(yyyy + mm);\n\n if ((yyyy + mm).trim().toUpperCase().equalsIgnoreCase(yyyymmTo)) {\n break;\n }\n calendar.add(Calendar.MONTH, 1);\n }\n return yyyyMMList;\n } catch (Exception e) {\n throw new Exception(\"getYYYYMMList : dateFrom(yyyy-mm-dd)=\" + dateFrom + \" : dateTo(yyyy-mm-dd)\" + dateTo + \" : \" + e.toString());\n }\n }", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "public DateTime[] getSegmentFenceposts(LocalDate date) {\n DateTime start = date.toDateTimeAtStartOfDay();\n DateTime stop = date.plusDays(1).toDateTimeAtStartOfDay();\n int[] starts = getSegmentStartTimes();\n DateTime[] fenceposts = new DateTime[starts.length + 1];\n for (int i = 0; i < starts.length; i++) {\n fenceposts[i] = start.plusMillis(starts[i]);\n }\n fenceposts[starts.length] = stop;\n return fenceposts;\n }", "default List<ZonedDateTime> getExecutionDates(ZonedDateTime startDate, ZonedDateTime endDate) {\n if (endDate.equals(startDate) || endDate.isBefore(startDate)) {\n throw new IllegalArgumentException(\"endDate should take place later in time than startDate\");\n }\n List<ZonedDateTime> executions = new ArrayList<>();\n ZonedDateTime nextExecutionDate = nextExecution(startDate).orElse(null);\n\n if (nextExecutionDate == null) return Collections.emptyList();\n while(nextExecutionDate != null && (nextExecutionDate.isBefore(endDate) || nextExecutionDate.equals(endDate))){\n executions.add(nextExecutionDate);\n nextExecutionDate = nextExecution(nextExecutionDate).orElse(null);\n }\n return executions;\n }", "private static long[] computeExpirationInPeriod(long start, long end) {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeInMillis(start);\n\t\tcal.set(Calendar.DAY_OF_MONTH, 1);\n\t\tList<Long> expires = new ArrayList<>();\n\t\tint dayOfWeek;\n\t\tint currentMonth = cal.get(Calendar.MONTH);\n\t\tint countFriday = 0;\n\t\twhile (cal.getTimeInMillis() <= end) {\n\t\t\tdayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t\tif (currentMonth != cal.get(Calendar.MONTH)) {\n\t\t\t\tcountFriday = 0;\n\t\t\t\tcurrentMonth = cal.get(Calendar.MONTH);\n\t\t\t}\n\n\t\t\tif (dayOfWeek % Calendar.FRIDAY == 0) {\n\t\t\t\t++countFriday;\n\t\t\t\tif (countFriday == 3) {\n\t\t\t\t\texpires.add(cal.getTimeInMillis());\n\t\t\t\t}\n\t\t\t}\n\t\t\tcal.add(Calendar.DAY_OF_MONTH, 1);\n\t\t}\n\t\treturn expires.stream()\n\t\t\t\t.mapToLong(Long::longValue)\n\t\t\t\t.filter((o) -> o >= start)\n\t\t\t\t.toArray();\n\t}", "private String[] getLast30Dates() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tString[] dates = new String[30];\n\t\tfor (int i=29; i>=0; i-- ) {\n\t\t\tdates[i] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t}\n\t\treturn dates;\n\t}", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public List<LocalDate> createLocalDates( final int size ) {\n\n\t\tfinal List<LocalDate> list = new ArrayList<>(size);\n\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tlist.add(LocalDate.ofEpochDay(i));\n\t\t}\n\n\t\treturn list;\n\t}", "public int[] GetDateMD(){\n\t\tint[] i = new int[2];\n\t\ti[0] = this.date.get(Calendar.MONTH);\n\t\ti[1] = this.date.get(Calendar.DAY_OF_MONTH);\n\t\treturn i;\n\t}", "@Override\r\n\tpublic int[] getMonthPeople() {\n\t\tint[] result = new int[12];\r\n\t\tDate date = DateUtil.getCurrentDate();\r\n\t\tDate dateStart = DateUtil.getFirstDay(date);\r\n\t\tDate dateEnd = DateUtil.getLastDay(date);\r\n\t\tresult[0] = cinemaConditionDao.getCount(dateStart, dateEnd);\r\n\t\tfor(int i=0;i<11;i++){\r\n\t\t\tdate = DateUtil.getMonthBefroe(dateStart);\r\n\t\t\tdateStart = DateUtil.getFirstDay(date);\r\n\t\t\tdateEnd = DateUtil.getLastDay(date);\r\n\t\t\tresult[i+1] = cinemaConditionDao.getCount(dateStart, dateEnd);\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public static Date firstDayMonth(){\n String rep_inicio_de_mes = \"\";\n try {\n Calendar c = Calendar.getInstance();\n \n /*Obtenemos el primer dia del mes*/\n c.set(Calendar.DAY_OF_MONTH, c.getActualMinimum(Calendar.DAY_OF_MONTH));\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n \n /*Lo almacenamos como string con el formato adecuado*/\n rep_inicio_de_mes = sdf.format(c.getTime());\n\n \n } catch (Exception e) {\n // Si hay una excepcion se imprime un mensaje\n System.err.println(e.getMessage());\n }\n \n return stringToDate(rep_inicio_de_mes);\n }", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "public AgendaMB() {\n GregorianCalendar dtMax = new GregorianCalendar(); \n Date dt = new Date();\n dtMax.setTime(dt); \n GregorianCalendar dtMin = new GregorianCalendar(); \n dtMin.setTime(dt);\n dtMin.add(Calendar.DAY_OF_MONTH, 1);\n dtMax.add(Calendar.DAY_OF_MONTH, 40);\n dataMax = dtMax.getTime();\n dataMin = dtMin.getTime(); \n }", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "private List<Long> makeListOfDatesLong(HashSet<Calendar> workDays) {\n List<Long> days = new ArrayList<>();\n if (workDays != null) {\n for (Calendar date : workDays) {\n //SimpleDateFormat sdf = new SimpleDateFormat(\"dd/MM/YYYY\");\n //days.add(sdf.format(date.getTime()));\n days.add(date.getTimeInMillis());\n }\n }\n return days;\n }", "public List<LocalDate> getDaysOfVacationByMonth(List<Vacation> vacationList, int month) {\n\n List<LocalDate> listOfDaysToReturn = new ArrayList<>();\n\n for (LocalDate dayDate : getDaysBetweenDates(vacationList)) {\n\n if (dayDate.getMonth().getValue() == month) {\n\n listOfDaysToReturn.add(dayDate);\n }\n }\n\n return listOfDaysToReturn;\n }", "public String[] DateOrder(String DateOne,String DateTwo){\n int DateOneValue=Integer.parseInt(DateOne);\n int DateTwoValue=Integer.parseInt(DateTwo);\n\n if(DateOneValue<DateTwoValue){\n if(DateOneValue<10){\n DateOne=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"0\"+DateOneValue;}\n\n else{\n DateOne=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"\"+DateOneValue;\n }\n if(DateTwoValue<10){\n DateTwo=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"0\"+DateTwoValue;\n }\n\n else{\n DateTwo=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"\"+DateTwoValue;\n }\n String Dates[]={DateOne,DateTwo};\n return Dates;\n }\n\n else{\n int nextmonth=Integer.parseInt(CheckedDate.substring(4,6))+1;\n int year=Integer.parseInt(CheckedDate.substring(0,4));\n int k=1;\n if(nextmonth==13){\n year=year+1;\n nextmonth=1;\n\n }\n String month=\"\";\n String n=\"\";\n\n if(nextmonth<10){\n n=\"\"+\"0\"+nextmonth;\n }\n\n else{\n n=\"\"+nextmonth;\n }\n int prevmonth=nextmonth-1;\n\n if(prevmonth<10){\n month=\"0\"+prevmonth;\n }\n\n else{\n month=month+prevmonth;\n }\n\n\n if(DateOneValue<10){\n DateOne=CheckedDate.substring(0,4)+month+\"0\"+DateOneValue;}\n\n else{\n DateOne=CheckedDate.substring(0,4)+month+\"\"+DateOneValue;\n }\n if(DateTwoValue<10){\n DateTwo=\"\"+year+\"\"+n+\"0\"+DateTwoValue;\n }\n\n else{\n DateTwo=year+\"\"+n+\"\"+DateTwoValue;\n }\n\n String Dates[]={DateOne,DateTwo};\n return Dates;\n }\n\n }", "public static ArrayList<Date> events(Task task, Date start, Date end){\n ArrayList<Date> dates = new ArrayList<>();\n for (Date i = task.nextTimeAfter(start); !end.before(i); i = task.nextTimeAfter(i))\n dates.add(i);\n return dates;\n }", "public Date212[] getNumbDates(int a){ //a is the number that signfies the dates passed in.\n // System.out.println(a+ \"a is\");\n Date212 myDates[] = new Date212[a]; //initalize it from the a.\n\n for(int d = 0; d< myTempDates.length; d++){ //that \"myTempDates\" array which holds the dates is used to copy it into the specified array.\n if(myTempDates[d] != null){ //if next index is not null then copy.\n myDates[d] = myTempDates[d];\n }\n }\n return myDates; //return the array to method calling it!\n }", "public ArrayList<Integer> getAllEventDayMonth(){\n ArrayList<Integer> sorted = new ArrayList<>();\n\n\n for (Event event: this.eventList) {\n if(!sorted.contains(event.getStartTime().getDayOfMonth())){\n sorted.add(event.getStartTime().getDayOfMonth());\n }\n\n\n }\n Collections.sort(sorted);\n return sorted;\n }", "public Date addMonths(int m) {\r\n if (m < 0) {\r\n\t\t\tthrow new RuntimeException(\r\n\t\t\t\t\t\"Month should not be the negative value!\");\r\n\t\t}\r\n\r\n\r\n\t\tint newMonth = (month + (m % 12)) > 12 ? ((month + (m % 12)) % 12) : month\r\n\t\t\t\t+ (m % 12);\r\n\t\tint newYear = (month + (m % 12)) > 12 ? year + (m / 12) + 1 : year\r\n\t\t\t\t+ (m / 12);\r\n int newDay = 0;\r\n // IF the new month has less total days in it than the starting month\r\n // and the date being added to is the last day of the month, adjust\r\n // and make newDay correct with its corresponding month.\r\n \r\n // IF not leap year and not Feb. make newDay correct.\r\n if (day > DAYS[newMonth] && (newMonth != 2)) {\r\n newDay = (DAYS[newMonth]);\r\n //System.out.println(\"1\");\r\n } \r\n \r\n // IF not leap year but not Feb. make newDay 28. (This is usually the case for Feb.)\r\n else if ((day > DAYS[newMonth]) && (isLeapYear(newYear) == false) && (newMonth == 2)){\r\n newDay = (DAYS[newMonth] - 1);\r\n }\r\n \r\n // IF leap year and is Feb. make newDay 29.\r\n else if ((day > DAYS[newMonth]) && isLeapMonth(newMonth, newYear) == true){\r\n newDay = DAYS[newMonth];\r\n }\r\n\r\n // if day is not gretaer than the last day of the new month, make no change.\r\n else {\r\n newDay = day;\r\n } \r\n\t\treturn (new Date(newMonth, newDay, newYear));\r\n\t}", "public ArrayList<Event> getCalendarEventsByMonth()\n {\n ArrayList<Event> monthListOfEvents = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n if( (events.get(i).getCalendar().get(Calendar.YEAR) == currentCalendar.get(Calendar.YEAR)) &&\n (events.get(i).getCalendar().get(Calendar.MONTH) == currentCalendar.get(Calendar.MONTH)))\n {\n monthListOfEvents.add(events.get(i));\n }\n }\n return monthListOfEvents;\n }", "public void daysInCycle()\n {\n for(int j = 0; j < 11; j++)\n {\n for(int k = 0; k < 30; k++)\n {\n if(dates[j][k] > 0)\n {\n System.out.println(monthsArray[j-1] + \" \" + k + \" - \" + dates[j][k]);\n }\n }\n }\n }", "public String[] getStepDates() {\r\n HistoryStep[] steps = currentProcessInstance.getHistorySteps();\r\n String[] dates = new String[steps.length];\r\n Date date = null;\r\n \r\n for (int i = 0; i < steps.length; i++) {\r\n date = steps[i].getActionDate();\r\n dates[i] = DateUtil.getOutputDate(date, getLanguage());\r\n }\r\n \r\n return dates;\r\n }", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "private ArrayList<DateData> getDaysBetweenDates(Date startDate, Date endDate) {\n\n String language = UserDTO.getUserDTO().getLanguage();\n ArrayList<DateData> dataArrayList = new ArrayList<>();\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(startDate);\n\n while (calendar.getTime().before(endDate)) {\n Date result = calendar.getTime();\n try {\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", result));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", result));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", result));\n dataArrayList.add(new DateData(day, month, year, \"middle\"));\n calendar.add(Calendar.DATE, 1);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n int day = Integer.parseInt((String) android.text.format.DateFormat.format(\"dd\", endDate));\n int month = Integer.parseInt((String) android.text.format.DateFormat.format(\"MM\", endDate));\n int year = Integer.parseInt((String) android.text.format.DateFormat.format(\"yyyy\", endDate));\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dataArrayList.add(new DateData(day, month, year, \"right\"));\n } else {\n dataArrayList.add(new DateData(day, month, year, \"left\"));\n }\n\n DateData dateData = dataArrayList.get(0);\n if (language.equalsIgnoreCase(Constant.ENGLISH_LANGUAGE_CODE)) {\n dateData.setBackground(\"left\");\n\n } else {\n dateData.setBackground(\"right\");\n }\n dataArrayList.set(0, dateData);\n return dataArrayList;\n }", "@WebMethod\n\tpublic Vector<Date> getEventsMonth(Date date) {\n\t\tdbManager.open(false);\n\t\tVector<Date> dates = dbManager.getEventsMonth(date);\n\t\tdbManager.close();\n\t\treturn dates;\n\t}", "private ArrayList<String> parseDays(String y, String startMonth, String endMonth, String weekDays) {\n\t\t\t\tArrayList<String> result = new ArrayList<>();\n\t\t\t\tint year = Integer.parseInt(y);\n\t\t\t\tint startM = Integer.parseInt(startMonth) - 1;\n\t\t\t\tint endM = Integer.parseInt(endMonth) - 1;\n\n\t\t\t\tMap<String, Integer> weekMap = new HashMap<>();\n\t\t\t\tweekMap.put(\"S\", 1);\n\t\t\t\tweekMap.put(\"M\", 2);\n\t\t\t\tweekMap.put(\"T\", 3);\n\t\t\t\tweekMap.put(\"W\", 4);\n\t\t\t\tweekMap.put(\"H\", 5);\n\t\t\t\tweekMap.put(\"F\", 6);\n\t\t\t\tweekMap.put(\"A\", 7);\n\n\t\t\t\tSet<Integer> set = new HashSet<>();\n\t\t\t\tfor (int i = 0; i < weekDays.length(); i++) {\n\t\t\t\t\tset.add(weekMap.get(weekDays.substring(i, i + 1)));\n\t\t\t\t}\n\n\t\t\t\tCalendar cal = new GregorianCalendar(year, startM, 1);\n\t\t\t\tdo {\n\t\t\t\t\tint day = cal.get(Calendar.DAY_OF_WEEK);\n\t\t\t\t\tif (set.contains(day)) {\n\t\t\t\t\t\tresult.add(\"\" + y + parseToTwoInteger((cal.get(Calendar.MONTH) + 1))\n\t\t\t\t\t\t\t\t+ parseToTwoInteger(cal.get(Calendar.DAY_OF_MONTH)));\n\t\t\t\t\t}\n\t\t\t\t\tcal.add(Calendar.DAY_OF_YEAR, 1);\n\t\t\t\t} while (cal.get(Calendar.MONTH) <= endM);\n\n\t\t\t\treturn result;\n\n\t\t\t}", "public static ArrayList<LocalDate> getPhDates() {\r\n \tArrayList<Date> phDates = phRepo.findAllPublicHolidayDates();\r\n \tArrayList<LocalDate> phLocalDates = new ArrayList<LocalDate>();\r\n \t\r\n\t\tfor(Date phDate : phDates) {\r\n\t\t\tphLocalDates.add(phDate.toLocalDate());\r\n\t\t}\r\n\t\t\r\n\t\treturn phLocalDates;\r\n }", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "public static void main(String[] args) {\n MutableDateTime dateTime = new MutableDateTime();\n System.out.println(\"Current date = \" + dateTime);\n\n // Find the first day of the next month can be done by:\n // 1. Add 1 month to the date\n // 2. Set the day of the month to 1\n // 3. Set the millis of day to 0.\n dateTime.addMonths(1);\n dateTime.setDayOfMonth(1);\n dateTime.setMillisOfDay(0);\n System.out.println(\"First day of next month = \" + dateTime);\n }", "public int[] getDaysOfMonth() {\n return daysOfMonth;\n }", "public static void main(String args[]){\n\t\tTimeUtil.getBetweenDays(\"2019-01-01\",TimeUtil.dateToStr(new Date(), \"-\"));\n\t\t\n\t\t/*\tTimeUtil tu=new TimeUtil();\n\t\t\tString r=tu.ADD_DAY(\"2009-12-20\", 20);\n\t\t\tSystem.err.println(r);\n\t\t\tString [] a= TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",9);\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"1\",9));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"2\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"3\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",3));\n\t*/\n\t\tTimeUtil tu=new TimeUtil();\n\t//\tString newDate = TimeUtil.getDateOfCountMonth(\"2011-03-31\", 6);\n\t//\tSystem.out.println(newDate);\n//\t\tSystem.err.println(tu.getDateTime(\"\")+\"|\");\n\t\t\n\t\t}", "public List<DateType> toDateList() {\n List<DateType> result = new ArrayList<>();\n if (fromDate != null) {\n result.add(fromDate);\n }\n if (toDate != null) {\n result.add(toDate);\n }\n if (fromToDate != null) {\n result.add(fromToDate);\n }\n return result;\n }", "@SuppressLint(\"SimpleDateFormat\")\n public static List<String> getDaysBetweenDates(String startDate, String endDate)\n throws ParseException {\n List<String> dates = new ArrayList<>();\n\n DateFormat df = new SimpleDateFormat(\"dd.MM.yyyy\");\n\n Calendar calendar = new GregorianCalendar();\n calendar.setTime(new SimpleDateFormat(\"dd.MM.yyyy\").parse(startDate));\n\n while (calendar.getTime().before(new SimpleDateFormat(\"dd.MM.yyyy\").parse(endDate)))\n {\n Date result = calendar.getTime();\n dates.add(df.format(result));\n calendar.add(Calendar.DATE, 1);\n }\n dates.add(endDate);\n return dates;\n }", "@Override\n public List<LocalDate> getAvailableDatesForService(final com.wellybean.gersgarage.model.Service service) {\n // Final list\n List<LocalDate> listAvailableDates = new ArrayList<>();\n\n // Variables for loop\n LocalDate tomorrow = LocalDate.now().plusDays(1);\n LocalDate threeMonthsFromTomorrow = tomorrow.plusMonths(3);\n\n // Loop to check for available dates in next three months\n for(LocalDate date = tomorrow; date.isBefore(threeMonthsFromTomorrow); date = date.plusDays(1)) {\n // Pulls bookings for specific date\n Optional<List<Booking>> optionalBookingList = bookingService.getAllBookingsForDate(date);\n /* If there are bookings for that date, check for time availability for service,\n if not booking then date available */\n if(optionalBookingList.isPresent()) {\n if(getAvailableTimesForServiceAndDate(service, date).size() > 0) {\n listAvailableDates.add(date);\n }\n } else {\n listAvailableDates.add(date);\n }\n }\n return listAvailableDates;\n }", "public static LocalDate getFirstOfNextMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfNextMonth());\n\t}", "public static ArrayList<HashMap<String, String>> getCurrentMonthlDates() {\r\n\t\tArrayList<HashMap<String, String>> list = new ArrayList<>();\r\n\t\tCallableStatement call = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry (Connection con = Connect.getConnection()) {\r\n\t\t\tcall = con\r\n\t\t\t\t\t.prepareCall(\"{CALL get_monthly_dates_for_salesman_recovery()}\");\r\n\t\t\trs = call.executeQuery();\r\n\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tHashMap<String, String> map = new HashMap<>();\r\n\t\t\t\tmap.put(\"date\", rs.getString(\"get_date\"));\r\n\t\t\t\tlist.add(map);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn list;\r\n\t}", "@Test\n public void month() throws Exception {\n Date thisDate = dateFormat.parse(\"08/14/2006\");\n Month august06 = Month.create(thisDate);\n testThePeriod(august06, thisDate, \"08/01/2006 00:00:00.000\",\n \"08/31/2006 23:59:59.999\", \"2006-08\");\n\n //Test the prior period\n Date priorDate = dateFormat.parse(\"07/22/2006\");\n Month july06 = august06.prior();\n testThePeriod(july06, priorDate, \"07/01/2006 00:00:00.000\",\n \"07/31/2006 23:59:59.999\", \"2006-07\");\n\n //Test the next period.\n Date nextDate = dateFormat.parse(\"09/03/2006\");\n Month september06 = august06.next();\n testThePeriod(september06, nextDate, \"09/01/2006 00:00:00.000\",\n \"09/30/2006 23:59:59.999\", \"2006-09\");\n\n //Test compareTo\n testCompareTo(july06, august06, september06);\n }", "public static WithAdjuster firstDayOfNextMonth() {\n\n return Impl.FIRST_DAY_OF_NEXT_MONTH;\n }", "@Test\n void calculatePeriodLessThanOneMonth() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2015-03-07\");\n LocalDate testDateEnd = LocalDate.parse(\"2015-04-01\");\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertEquals(\"1 month\", periodMap.get(PERIOD_START));\n assertEquals(\"1 April 2015\", periodMap.get(PERIOD_END));\n }", "public static String[] getMonths() {\n\t\tString[] months = {\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \n\t\t\t\"July\", \"August\", \"September\", \"October\", \"November\", \"December\"};\n\t\treturn months;\n\t}", "public static HolidayCalendar[] calendarArray() {\n return new HolidayCalendar[] {TARGET };\n }", "public static Date[] getStartEndDateOfLastSpecifiedWeeks(final int num, final String timeZone) {\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n final Date currentDate = DateContent.formatStringIntoDate(currentDateStr, DateContent.YYYY_MM_DD_HH_MM_SS);\n\n final Calendar calendar = Calendar.getInstance();\n calendar.setTime(currentDate);\n calendar.setFirstDayOfWeek(Calendar.MONDAY);\n calendar.add(Calendar.WEEK_OF_YEAR, -1);\n calendar.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n Date endDateTime = calendar.getTime();\n\n calendar.add(Calendar.WEEK_OF_YEAR, -(num - 1));\n calendar.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n Date startDateTime = calendar.getTime();\n\n endDateTime = DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone);\n startDateTime = DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone);\n return new Date[]{startDateTime, endDateTime};\n }", "@Test\n public void monthly_firstMonday_recursEveryFirstMonday() {\n assertTrue(firstMondayEveryMonth.includes(firstMondayOfApril));\n assertTrue(firstMondayEveryMonth.includes(firstMondayOfMarch));\n assertTrue(firstMondayEveryMonth.includes(firstMondayOfJan2018));\n assertFalse(firstMondayEveryMonth.includes(firstTuesdayOfMarch));\n }", "public static Date[] getLastYearDateRange(String timeZone) {\n\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH, -1);\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n final Date endDateTime = calendar.getTime();\n\n calendar = Calendar.getInstance();\n calendar.add(Calendar.YEAR, -1);\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n final Date startDateTime = calendar.getTime();\n\n return new Date[]{DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone), DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone)};\n }", "public List<String> getMonthsList(){\n Calendar now = Calendar.getInstance();\n int year = now.get(Calendar.YEAR);\n\n String months[] = {\"JANUARY\", \"FEBRUARY\", \"MARCH\", \"APRIL\",\n \"MAY\", \"JUNE\", \"JULY\", \"AUGUST\", \"SEPTEMBER\",\n \"OCTOBER\", \"NOVEMBER\", \"DECEMBER\"};\n\n List<String> mList = new ArrayList<>();\n\n //3 months of previous year to view the attendances\n for(int i=9; i<months.length; i++){\n mList.add(months[i]+\" \"+(year-1));\n }\n\n //Months of Current Year\n for(int i=0; i<=(now.get(Calendar.MONTH)); i++){\n mList.add(months[i]+\" \"+year);\n }\n\n return mList;\n }", "public Map<String, Long> getWorkingDays(String startDate) {\n Map<String, Long> mapYearAndMonth = new HashMap<>();\n DateTimeFormatter formatter = DateTimeFormatter.ofPattern(\"yyyyMMdd\");\n // convert String to LocalDate\n LocalDate startDateLocal = LocalDate.parse(startDate, formatter);\n long monthsBetween = ChronoUnit.MONTHS.between(startDateLocal, LocalDate.now());\n long yearsBetween = ChronoUnit.YEARS.between(startDateLocal, LocalDate.now());\n mapYearAndMonth.put(\"year\", yearsBetween);\n mapYearAndMonth.put(\"month\", monthsBetween - yearsBetween * 12);\n return mapYearAndMonth;\n }", "@Test\n void calculatePeriod12Months() throws ParseException {\n LocalDate testDateStart = LocalDate.parse(\"2016-08-12\");\n\n System.out.println(\"periodStartDate: \" + testDateStart);\n\n LocalDate testDateEnd = LocalDate.parse(\"2017-08-23\");\n\n System.out.println(\"periodEndDate: \" + testDateStart);\n Map<String, String> periodMap = datesHelper.calculatePeriodRange(testDateStart, testDateEnd, false);\n assertNull(periodMap.get(PERIOD_START));\n assertEquals(\"2017\", periodMap.get(PERIOD_END));\n\n }", "public static WithAdjuster firstDayOfMonth() {\n\n return Impl.FIRST_DAY_OF_MONTH;\n }", "public int[] getMonths() {\n return months;\n }", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public static ObservableList<Appointment> getAppointmentsForMonth (int id) {\n ObservableList<Appointment> appointments = FXCollections.observableArrayList();\n Appointment appointment;\n LocalDate begin = LocalDate.now();\n LocalDate end = LocalDate.now().plusMonths(1);\n try(Connection conn =DriverManager.getConnection(DB_URL, user, pass);\n Statement statement = conn.createStatement()) {\n ResultSet resultSet = statement.executeQuery(\"SELECT * FROM appointment WHERE customerId = '\" + id + \"' AND \" + \n \"start >= '\" + begin + \"' AND start <= '\" + end + \"'\" );\n \n while(resultSet.next()) {\n appointment = new Appointment(resultSet.getInt(\"appointmentId\"),resultSet.getInt(\"customerId\"), resultSet.getString(\"title\"),\n resultSet.getString(\"description\"), resultSet.getString(\"location\"),resultSet.getString(\"contact\"),resultSet.getString(\"url\"), \n resultSet.getTimestamp(\"start\"), resultSet.getTimestamp(\"end\"), resultSet.getDate(\"start\"), \n resultSet.getDate(\"end\"),resultSet.getString(\"createdby\"));\n appointments.add(appointment);\n }\n statement.close();\n return appointments;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n }", "public static String[] getDateRangeFromToday(int minimum_threshold, int maximum_threshold) {\n String minimum, maximum;\n\n Calendar c = Calendar.getInstance();\n c.add(Calendar.DAY_OF_MONTH, minimum_threshold - 1);\n minimum = c.get(Calendar.YEAR) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.MONTH) + 1)) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.DAY_OF_MONTH)));\n\n c = Calendar.getInstance();\n c.add(Calendar.DAY_OF_MONTH, maximum_threshold - 1);\n maximum = c.get(Calendar.YEAR) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.MONTH) + 1)) + \"-\" +\n String.format(\"%02d\", (c.get(Calendar.DAY_OF_MONTH)));\n\n return new String[] {minimum, maximum};\n }", "public static List<Date> nextDates(Integer daysIntervalSize, Date lastDate) {\n List<Date> dateList = new ArrayList<Date>();\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(lastDate);\n for (int i = 1; i <= daysIntervalSize; i++) {\n calendar.add(Calendar.DATE, 1);\n dateList.add(calendar.getTime());\n }\n return dateList;\n }", "public void setStartMonth(java.math.BigInteger startMonth) {\r\n this.startMonth = startMonth;\r\n }", "public List<Integer> getByMonthDay() {\n\t\treturn byMonthDay;\n\t}", "public ArrayList<String> getMonths() \r\n\t{\r\n\t\tString[] monthsArray = {\"January\", \"Febuary\", \"March\", \"April\", \"May\", \"June\",\r\n\t\t\t\t\t\t \"July\", \"August\", \"September\", \"October\", \"November\", \"Decmber\"};\r\n\t\tArrayList <String>monthList = new ArrayList<String>(Arrays.asList(monthsArray));\r\n\t\treturn monthList;\r\n\t}", "public static List<Order> viewsalesbymonth() {\n\t\tList<Order> monthly_sales = new ArrayList<Order>();\n\n\t\ttry {\n\t\t\tconnect = ConnectionManager.getConnection();\n\t\t\tps = connect.prepareStatement(\n\t\t\t\t\t\"SELECT MONTHNAME(order_date) AS month_name, COUNT(MONTHNAME(order_date)) AS total FROM orders WHERE YEAR(order_date) = YEAR(CURRENT_DATE) GROUP BY MONTHNAME(order_date) ORDER BY MONTH(order_date)\");\n\t\t\tResultSet rs = ps.executeQuery();\n\n\t\t\twhile (rs.next()) {\n\t\t\t\tOrder order_month_current = new Order();\n\t\t\t\torder_month_current.setOrderMonth(rs.getString(\"month_name\"));\n\t\t\t\torder_month_current.setTotalByMonth(rs.getInt(\"total\"));\n\n\t\t\t\tmonthly_sales.add(order_month_current);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn monthly_sales;\n\t}", "private void generateIntervalArray(){\n BigDecimal maximumValue = this.getTfMaximumInterval();\n BigDecimal minimumValue = this.getTfMinimumInterval();\n BigDecimal stepValue = this.getTfStepInterval();\n \n intervalArray = new ArrayList<BigDecimal>();\n BigDecimal step = maximumValue;\n \n //Adiciona os valores \"inteiros\"\n while(step.doubleValue() >= minimumValue.doubleValue()){\n intervalArray.add(step);\n step = step.subtract(stepValue);\n }\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "List<Appointment> getAppointmentOfNMonth(int month);", "public List<LocalDate> getDaysBetweenDates(List<Vacation> vacationList) {\n\n List<LocalDate> dateList = new ArrayList<>();\n for (Vacation vacation : vacationList) {\n\n long days = dateDiffInNumberOfDays(vacation.getVacationStartDay(), vacation.getVacationEndDay());\n for (int i = 0; i <= days; i++) {\n\n LocalDate d = vacation.getVacationStartDay().plus(i, ChronoUnit.DAYS);\n dateList.add(d);\n }\n }\n\n return dateList;\n }", "public void buildMonth()\r\n {\r\n int i=0,k=0;\r\n date=LocalDate.of(year,month,1);\r\n String st;\r\n for(int j=0;date.getMonthValue()==month;j++)\r\n {\r\n\r\n if(date.getDayOfWeek().name()==\"SUNDAY\"){k=0;i++;}\r\n else if(date.getDayOfWeek().name()==\"MONDAY\"){k=1;}\r\n else if(date.getDayOfWeek().name()==\"TUESDAY\"){k=2;}\r\n else if(date.getDayOfWeek().name()==\"WEDNESDAY\"){k=3;}\r\n else if(date.getDayOfWeek().name()==\"THURSDAY\"){k=4;}\r\n else if(date.getDayOfWeek().name()==\"FRIDAY\"){k=5;}\r\n else if(date.getDayOfWeek().name()==\"SATURDAY\"){k=6;}\r\n st=String.valueOf(date.getDayOfMonth());\r\n cmdDate=new JButton(st);\r\n cmdDate.setBounds(xpos+k*110,ypos+i*50,100,50);\r\n this.cmdDate.addActionListener(new DayListner());\r\n panel.add(cmdDate);\r\n date = date.plusDays(1);\r\n }\r\n\r\n }", "private boolean makeCalendarByDays() {\n if (calendar != null) {\n for (Date date:calendar.keySet()) {\n Date startDay;\n if (date.getTime() > date.getTime() - 3600000 * 2 - date.getTime() % 86400000)\n startDay = new Date(date.getTime() + 3600000 * 22 - date.getTime() % 86400000);\n else startDay = new Date(date.getTime() - 3600000 * 2 - date.getTime() % 86400000);\n calendarByDays.put(startDay, calendar.get(date));\n }\n return true;\n }\n return false;\n }", "protected List<String> getAxisList(Date startDate, Date endDate, int calendarField) {\n List<String> stringList = new ArrayList<String>();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date tempDate = startDate;\n Calendar tempCalendar = Calendar.getInstance();\n tempCalendar.setTime(tempDate);\n\n while (tempDate.before(endDate)) {\n stringList.add(simpleDateFormat.format(tempDate));\n tempCalendar.add(calendarField, 1);\n tempDate = tempCalendar.getTime();\n }\n\n return stringList;\n }", "public static void main(String[] args) throws IOException, ParserConfigurationException, SAXException {\n\t\tDateTime d = new DateTime().withDayOfMonth(1);;\n\n\t\tfor( int i =0 ; i < 24; i ++){\n\t\t\tSystem.out.println(d.minusMonths(i));\n\t\t}\n\n\t}", "public static void main(String[] args) {\n System.out.println(DateUtils.addMonths(new Date(), 1).getMonth());\n System.out.println(Calendar.getInstance().getDisplayName((Calendar.MONTH)+1, Calendar.LONG, Locale.getDefault()));\n System.out.println(LocalDate.now().plusMonths(1).getMonth());\n\t}", "public static void main(String[] args) throws Exception {\n\t\tSystem.out.println(getMonthList(\"20161102\", \"20161101\"));\r\n//\t\tSystem.out.println(getMonthList(\"20161001\", \"20161101\"));\r\n//\t\tSystem.out.println(getDateList(\"20161001\", \"20161101\"));\r\n\t}", "public java.math.BigInteger getStartMonth() {\r\n return startMonth;\r\n }", "public static Date getStartDateByMonth(int month, int year) {\n\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.set(year, month, 1);\n\n\t\treturn c.getTime();\n\t}", "public List<String> getListOfAllWeekEnds(String startDate, String endDate) {\n ArrayList<String> list = new ArrayList<String>();\n String first = getEndOfWeek(startDate);\n String last = getEndOfWeek(endDate);\n String current = last;\n\n list.add(current);\n\n while (!current.equals(first)) {\n Integer dateYear = Integer.parseInt(current.substring(0, 4));\n Integer dateMonth = Integer.parseInt(current.substring(4, 6)) - 1;\n Integer dateDay = Integer.parseInt(current.substring(6));\n\n Calendar c = new GregorianCalendar();\n c.set(dateYear, dateMonth, dateDay);\n c.add(Calendar.DAY_OF_MONTH, -7);\n Date lastWeek = c.getTime();\n Calendar cal = Calendar.getInstance();\n cal.setTime(lastWeek);\n int year = cal.get(Calendar.YEAR);\n String month = String.format(\"%02d\", cal.get(Calendar.MONTH) + 1);\n String day = String.format(\"%02d\", cal.get(Calendar.DAY_OF_MONTH));\n\n current = year + month + day;\n\n list.add(current);\n }\n\n return list;\n }", "public ArrayList<Integer> getValidDays(Date date)\r\n\t{\r\n\t\tint maxDay = Date.maxDayOfMonthAndYear(date.getYear(), date.getMonth());\r\n\t\tArrayList <Integer> validDays = new ArrayList<Integer>(maxDay);\r\n\t\t\r\n\t\tfor (int day = 1; day <= maxDay; day++)\r\n\t\t\tvalidDays.add(day);\r\n\t\t\r\n\t\treturn validDays;\r\n\t}", "public static Date createDate(int yyyy, int month, int day) {\n/* 75 */ CALENDAR.clear();\n/* 76 */ CALENDAR.set(yyyy, month - 1, day);\n/* 77 */ return CALENDAR.getTime();\n/* */ }", "public ArrayList<Event> getEventsByToday() {\n\t\tArrayList<Event> result = new ArrayList<Event>();\n\t\tCalendar today = Calendar.getInstance();\n\t\tfor (int i = 0; i < events.size(); i++) {\n\t\t\tif (events.get(i).getInitial_date().get(Calendar.YEAR) == today.get(Calendar.YEAR)\n\t\t\t\t\t&& events.get(i).getInitial_date().get(Calendar.MONTH) == today.get(Calendar.MONTH)\n\t\t\t\t\t&& events.get(i).getInitial_date().get(Calendar.DAY_OF_MONTH) == today.get(Calendar.DAY_OF_MONTH)) {\n\t\t\t\tresult.add(events.get(i));\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public void setDefaultDateRange() {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\n Calendar todaysDate = Calendar.getInstance();\n toDateField.setText(dateFormat.format(todaysDate.getTime()));\n\n todaysDate.set(Calendar.DAY_OF_MONTH, 1);\n fromDateField.setText(dateFormat.format(todaysDate.getTime()));\n }", "public DateRange getDateRange();", "@Subscribe\n public void onInit(InitEvent event) {\n Date now = new Date();\n dateFrom.setValue(giveMonthStart(now));\n dateTo.setValue(addTime(giveMonthStart(now),1,\"MONTH\"));\n\n }", "private void getDateStartEnd(BudgetRecyclerView budget) {\n String viewByDate = budget.getDate();\n String[] dateArray = viewByDate.split(\"-\");\n for (int i = 0; i < dateArray.length; i++) {\n dateArray[i] = dateArray[i].trim();\n }\n startDate = CalendarSupport.convertStringToDate(dateArray[0]);\n endDate = CalendarSupport.convertStringToDate(dateArray[1]);\n }", "public ArrayList<Event> getCalendarEventsBetween(Calendar startingDate, Calendar endingDate)\n {\n ArrayList<Event> list = new ArrayList<>();\n\n for(int i = 0; i < events.size(); i++)\n {\n Calendar eventCalendar = events.get(i).getCalendar();\n\n if(isSame(startingDate, eventCalendar) || isSame(endingDate, eventCalendar) ||\n (eventCalendar.before(endingDate) && eventCalendar.after(startingDate)))\n {\n list.add(events.get(i));\n }\n }\n return list;\n }", "public void prepareDyasList(int year2, int month2) {\n this.daysList.clear();\n for (int i = 1; i <= Utils.getDaysOfMonth(year2, month2); i++) {\n this.daysList.add(String.valueOf(i));\n }\n }", "public static LocalDate getFirstOfCurrentMonth() {\n\t\treturn LocalDate.now().with(TemporalAdjusters.firstDayOfMonth());\n\t}", "public Date next() {\n if (isValid(month, day + 1, year)) return new Date(month, day + 1, year);\n else if (isValid(month + 1, 1, year)) return new Date(month, 1, year);\n else return new Date(1, 1, year + 1);\n }", "private static void printMonth(int start, int days) {\n for (int day = -(start - 2); day <= days; day++) {\n if (day < 1) {\n // Empty space before start of month.\n System.out.printf(\" \");\n } else if (day <= (7 - (start - 1))) {\n // Possibly short first week.\n System.out.printf(\"%4d%c\", day, day == (7 - (start - 1)) ? '\\n' : ' ');\n } else {\n // Full and last weeks.\n System.out.printf(\"%4d%c\", day, (day - (7 - (start - 1))) % 7 == 0 ? '\\n' : ' ');\n }\n }\n }", "private void startEndDay(int day,int month,int year) {\n int dayNum = CalendarEx.convertDay(CalendarDate.getDay(day, month, year));\n startDay = CalendarDate.moveDay(-dayNum, new CalendarDate(day,month,year));\n endDay = CalendarDate.moveDay(-dayNum+6, new CalendarDate(day,month,year));\n }" ]
[ "0.61604005", "0.5776861", "0.57631457", "0.5757386", "0.5738047", "0.57122684", "0.57090425", "0.56740636", "0.5630741", "0.5619464", "0.55769056", "0.5545084", "0.55393714", "0.54948634", "0.5466563", "0.54369664", "0.5406322", "0.5387011", "0.5383502", "0.53619695", "0.5341733", "0.53183174", "0.52869153", "0.5261431", "0.52505946", "0.52488196", "0.5244717", "0.52430815", "0.52252066", "0.5212289", "0.5203586", "0.52016956", "0.51972824", "0.51712304", "0.51642853", "0.51602507", "0.5151786", "0.5147907", "0.51427513", "0.51406133", "0.5105822", "0.51034784", "0.5099428", "0.5085211", "0.50709414", "0.50661385", "0.5045542", "0.5039883", "0.5022539", "0.50108665", "0.49932668", "0.49828726", "0.4982057", "0.4940414", "0.49390414", "0.4917718", "0.49035797", "0.48920938", "0.48778126", "0.486491", "0.48579127", "0.48304874", "0.48269522", "0.48146302", "0.48092017", "0.48065332", "0.4774843", "0.47714993", "0.47702432", "0.47649541", "0.4762335", "0.47589034", "0.4754392", "0.4753735", "0.47460067", "0.4738376", "0.47364458", "0.472053", "0.47040847", "0.4703503", "0.46974736", "0.46910173", "0.46887368", "0.4687536", "0.46783078", "0.46769872", "0.46769857", "0.46721798", "0.46711844", "0.46529654", "0.46466663", "0.4641724", "0.46227303", "0.46181536", "0.4616074", "0.4607059", "0.4606402", "0.46060893", "0.46049175", "0.4598242" ]
0.6812282
0
Returns an array of quarter bound dates of the year based on a specified date. The order is q1s, q1e, q2s, q2e, q3s, q3e, q4s, q4e.
private static LocalDate[] getQuarterBounds(final LocalDate date) { Objects.requireNonNull(date); final LocalDate[] bounds = new LocalDate[8]; bounds[0] = date.with(TemporalAdjusters.firstDayOfYear()); bounds[1] = date.withMonth(Month.MARCH.getValue()).with(TemporalAdjusters.lastDayOfMonth()); bounds[2] = date.withMonth(Month.APRIL.getValue()).with(TemporalAdjusters.firstDayOfMonth()); bounds[3] = date.withMonth(Month.JUNE.getValue()).with(TemporalAdjusters.lastDayOfMonth()); bounds[4] = date.withMonth(Month.JULY.getValue()).with(TemporalAdjusters.firstDayOfMonth()); bounds[5] = date.withMonth(Month.SEPTEMBER.getValue()).with(TemporalAdjusters.lastDayOfMonth()); bounds[6] = date.withMonth(Month.OCTOBER.getValue()).with(TemporalAdjusters.firstDayOfMonth()); bounds[7] = date.with(TemporalAdjusters.lastDayOfYear()); return bounds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LocalDate[] getFirstDayQuarterly(final int year) {\n LocalDate[] bounds = new LocalDate[4];\n\n bounds[0] = LocalDate.of(year, Month.JANUARY, 1);\n bounds[1] = LocalDate.of(year, Month.APRIL, 1);\n bounds[2] = LocalDate.of(year, Month.JULY, 1);\n bounds[3] = LocalDate.of(year, Month.OCTOBER, 1);\n\n return bounds;\n }", "public int[] boundFinderQuarters(int[] date) {\n int[] bound = {0, 0};\n int year, month, day;\n year = date[0];\n month = date[1];\n day = date[2];\n\n /*** LOWER BOUND = bound[0]***/\n bound[0] = 1;\n\n /*** UPPER BOUND ***/\n boolean leapYearFlag = false;\n for (int i = 0; i < leapYears.length; i++) {\n if (year == leapYears[i]) {\n leapYearFlag = true;\n }\n }\n\n // If leap year and month is Feb then set upperBoundMonth to 29\n if (leapYearFlag && month == 2) {\n bound[1] = 29;\n } else {\n bound[1] = calculateUpperBound(month);\n }\n return bound;\n }", "public int[] findQuarterBounds(int[] datesJulian, int numQuarters) {\n int numTransactions = datesJulian.length;\n int[] timeBlock = new int[numTransactions];\n int lowerBound = 0;\n int upperBound = 0;\n\n // Get indices of earliest and latest julianDate\n earliestIndex = MinAndMaxFinder.findEarliestIndex(datesJulian);\n latestIndex = MinAndMaxFinder.findLatestIndex(datesJulian);\n\n int[] year = new int[datesJulian.length];\n int[] month = new int[datesJulian.length];\n int[] dateGreg = new int[2];\n\n // Get the month and year values of all the transaction julianDate\n for (int i = 0; i < datesJulian.length; i++) {\n dateGreg = convertJulianToGregorian(datesJulian[i]);\n year[i] = dateGreg[0];\n month[i] = dateGreg[1];\n }\n\n /* Get the year and month value of the earliest date only\n * to be used as a starting point for the search */\n int y = year[earliestIndex];\n int m = month[earliestIndex];\n\n /* Find the initial lower and upper bounds for the search\n * loop */\n if (m > 0 & m < 4) {\n lowerBound = 0;\n upperBound = 4;\n }\n if (m > 3 & m < 7) {\n lowerBound = 3;\n upperBound = 7;\n }\n if (m > 6 & m < 10) {\n lowerBound = 6;\n upperBound = 10;\n }\n if (m > 9 & m < 13) {\n lowerBound = 9;\n upperBound = 13;\n }\n //System.out.println(\"Number of ... Quarters \" + getNumQuarters());\n /* Search Loop */\n int groupCounter = 1;\n boolean[] indexToExcludeFromSearch = new boolean[numTransactions];\n java.util.Arrays.fill(indexToExcludeFromSearch, false);\n // Iterate for each quarter\n for (int i = 0; i < numQuarters; i++) {\n // Iterate for each transaction\n for (int j = 0; j < numTransactions; j++) {\n if (year[j] == y && (month[j] > lowerBound & month[j] < upperBound) &&\n indexToExcludeFromSearch[j] == false) {\n timeBlock[j] = groupCounter;\n indexToExcludeFromSearch[j] = true;\n }\n } // end inner for\n if (lowerBound == 9 && upperBound == 13) {\n lowerBound = 0;\n upperBound = 4;\n y++;\n } else {\n lowerBound = lowerBound + 3;\n upperBound = upperBound + 3;\n }\n groupCounter++;\n } // end outer for\n groupCounter--;\n setNumQuarters(groupCounter);\n DataPreprocessing split = new DataPreprocessing();\n\n return timeBlock;\n }", "public ArrayList<String> createDate(String quarter, String year) {\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tString startDate = \"\";\r\n\t\tString endDate = \"\";\r\n\t\tif (quarter.equals(\"January - March\")) {\r\n\t\t\tstartDate = year + \"-01-01\";\r\n\t\t\tendDate = year + \"-03-31\";\r\n\t\t} else if (quarter.equals(\"April - June\")) {\r\n\t\t\tstartDate = year + \"-04-01\";\r\n\t\t\tendDate = year + \"-06-30\";\r\n\t\t} else if (quarter.equals(\"July - September\")) {\r\n\t\t\tstartDate = year + \"-07-01\";\r\n\t\t\tendDate = year + \"-09-30\";\r\n\t\t} else {\r\n\t\t\tstartDate = year + \"-10-01\";\r\n\t\t\tendDate = year + \"-12-31\";\r\n\t\t}\r\n\t\tdate.add(startDate);\r\n\t\tdate.add(endDate);\r\n\t\treturn date;\r\n\t}", "private static LocalDate localQuarterDate( int year, int quarter, int dayOfQuarter )\n {\n if ( quarter == 2 && dayOfQuarter == 92 )\n {\n throw new InvalidValuesArgumentException( \"Quarter 2 only has 91 days.\" );\n }\n // instantiate the yearDate now, because we use it to know if it is a leap year\n LocalDate yearDate = LocalDate.ofYearDay( year, dayOfQuarter ); // guess on the day\n if ( quarter == 1 && dayOfQuarter > 90 && (!yearDate.isLeapYear() || dayOfQuarter == 92) )\n {\n throw new InvalidValuesArgumentException( String.format(\n \"Quarter 1 of %d only has %d days.\", year, yearDate.isLeapYear() ? 91 : 90 ) );\n }\n return yearDate\n .with( IsoFields.QUARTER_OF_YEAR, quarter )\n .with( IsoFields.DAY_OF_QUARTER, dayOfQuarter );\n }", "List<Quarter> getQuarterList(Integer cityId)throws EOTException;", "public static int getQuarterNumber(final LocalDate date) {\n Objects.requireNonNull(date);\n\n int result;\n\n LocalDate[] bounds = getQuarterBounds(date);\n\n if (date.compareTo(bounds[2]) < 0) {\n result = 1;\n } else if (date.compareTo(bounds[4]) < 0) {\n result = 2;\n } else if (date.compareTo(bounds[6]) < 0) {\n result = 3;\n } else {\n result = 4;\n }\n\n return result;\n }", "public Date[] getDates() {\n/* 141 */ return getDateArray(\"date\");\n/* */ }", "public DateRange getDateRange();", "List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);", "public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }", "@Override\n public List<ReviewBaseline> getNonGreenProjectsForQuarter(String months, String years) {\n\n return reviewBaselineRepository.getNonGreenProjectsForQuarter(months, years);\n }", "@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}", "public void startDateQuestionSet() {\n this.dateQuestionSet = new HashSet<>();//creates a new dateQuestionSet\n for (Question q : this.getForm().getQuestionList()) {//for every question in the question list of the current form\n if (q.getType().getId() == 4) {//if the question is type Date Question\n Quest newQuest = new Quest();//creates a new Quest\n newQuest.setqQuestion(q);//adds the current question to the new Quest\n this.dateQuestionSet.add(newQuest);//adds the new Quest to the new dateQuestionSet\n }\n }\n }", "public static void main(String[] args) {\n DataFactory df = new DataFactory();\n Date minDate = df.getDate(2000, 1, 1);\n Date maxDate = new Date();\n \n for (int i = 0; i <=1400; i++) {\n Date start = df.getDateBetween(minDate, maxDate);\n Date end = df.getDateBetween(start, maxDate);\n System.out.println(\"Date range = \" + dateToString(start) + \" to \" + dateToString(end));\n }\n\n}", "public <Q> Q[] asDataArray(Q[] a);", "public JsonArray getHomeHeatingFuelOrdersByStationIdAndQuarter(String stationID, String quarter, String year) {\r\n\t\tJsonArray homeHeatingFuelOrders = new JsonArray();\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tdate = createDate(quarter, year);\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT sum(amountOfLitters) as totalAmountOfFuel,sum(totalPrice) as totalPriceOfFuel FROM home_heating_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE stationID='\" + stationID + \"' AND orderDate between '\" + date.get(0)\r\n\t\t\t\t\t\t+ \" 00:00:00' and '\" + date.get(1) + \" 23:59:59';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"fuelType\", \"Home heating fuel\");\r\n\t\t\t\t\torder.addProperty(\"totalAmountOfFuel\", rs.getString(\"totalAmountOfFuel\"));\r\n\t\t\t\t\torder.addProperty(\"totalPriceOfFuel\", rs.getString(\"totalPriceOfFuel\"));\r\n\t\t\t\t\thomeHeatingFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn homeHeatingFuelOrders;\r\n\r\n\t}", "public JsonArray getFastFuelOrdersByStationIdAndQuarter(String stationID, String quarter, String year) {\r\n\t\tJsonArray fastFuelOrders = new JsonArray();\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tdate = createDate(quarter, year);\r\n\t\tString totalPriceOfFuel = \"\";\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT fuelType, sum(amountOfLitters) as totalAmountOfFuel,sum(totalPrice) as totalPriceOfFuel FROM fast_fuel_orders \"\r\n\t\t\t\t\t\t+ \"WHERE stationID='\" + stationID + \"' AND orderDate between '\" + date.get(0)\r\n\t\t\t\t\t\t+ \" 00:00:00' and '\" + date.get(1) + \" 23:59:59' group by fuelType;\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tJsonObject order = new JsonObject();\r\n\t\t\t\t\torder.addProperty(\"fuelType\", rs.getString(\"fuelType\"));\r\n\t\t\t\t\torder.addProperty(\"totalAmountOfFuel\", rs.getString(\"totalAmountOfFuel\"));\r\n\t\t\t\t\ttotalPriceOfFuel = String.format(\"%.3f\", Double.parseDouble(rs.getString(\"totalPriceOfFuel\")));\r\n\t\t\t\t\torder.addProperty(\"totalPriceOfFuel\", totalPriceOfFuel);\r\n\t\t\t\t\tfastFuelOrders.add(order);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t\treturn fastFuelOrders;\r\n\r\n\t}", "public static Date[] getLastYearDateRange(String timeZone) {\n\n final String currentDateStr = DateUtility.getTimeZoneSpecificDate(timeZone, DateContent.YYYY_MM_DD_HH_MM_SS, new Date());\n Calendar calendar = Calendar.getInstance();\n calendar.add(Calendar.MONTH, -1);\n calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));\n calendar.set(Calendar.HOUR_OF_DAY, 23);\n calendar.set(Calendar.MINUTE, 59);\n calendar.set(Calendar.SECOND, 59);\n final Date endDateTime = calendar.getTime();\n\n calendar = Calendar.getInstance();\n calendar.add(Calendar.YEAR, -1);\n calendar.set(Calendar.DAY_OF_MONTH, 1);\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n final Date startDateTime = calendar.getTime();\n\n return new Date[]{DateContent.convertClientDateIntoUTCDate(startDateTime, timeZone), DateContent.convertClientDateIntoUTCDate(endDateTime, timeZone)};\n }", "public List<Refinery> getRefineries(int year);", "public String getQuarter() {\r\n return quarter;\r\n }", "public static int[] makeBeforeInterval(ArrayList<Firm> list)\n\t{\n\t\tint dis = 1;\n\t\tint first = 0;\n\t\t\n\t\tint dis2 = 120;\t\t\n\t\tint last = 0;\n\t\t\n\t\tint years = (int)((float)(2*366));\n\t\tint quarter = 92; // # days in a qtr\n\t\t\n\t\tInteger filed = (Integer)(utils.qM2.get(list.get(0).getBankrupcy().get(0).filedIndex - quarter));\n\t\tInteger beforeFiled = (Integer)(utils.qM2.get(list.get(0).getBankrupcy().get(0).filedIndex - years));\n\n\t\tif(filed != null &&\n\t\t beforeFiled != null){\n\t\t\tlast = filed;\n\t\t\tfirst = beforeFiled;\n\t\t} else {\n\t\t\tlast = dis2;\n\t\t\tfirst = dis2 - years;\n\t\t}\t\t\n\t\t\n\t\tint mid = (first+last)/2;\n\t\tint[] x = new int[3];\n\t\tx[0]=first;\n\t\tx[1]=mid;\n\t\tx[2]=last;\t\t\n\t\treturn x;\t\n\t}", "public String[] DateOrder(String DateOne,String DateTwo){\n int DateOneValue=Integer.parseInt(DateOne);\n int DateTwoValue=Integer.parseInt(DateTwo);\n\n if(DateOneValue<DateTwoValue){\n if(DateOneValue<10){\n DateOne=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"0\"+DateOneValue;}\n\n else{\n DateOne=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"\"+DateOneValue;\n }\n if(DateTwoValue<10){\n DateTwo=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"0\"+DateTwoValue;\n }\n\n else{\n DateTwo=CheckedDate.substring(0,4)+CheckedDate.substring(4,6)+\"\"+DateTwoValue;\n }\n String Dates[]={DateOne,DateTwo};\n return Dates;\n }\n\n else{\n int nextmonth=Integer.parseInt(CheckedDate.substring(4,6))+1;\n int year=Integer.parseInt(CheckedDate.substring(0,4));\n int k=1;\n if(nextmonth==13){\n year=year+1;\n nextmonth=1;\n\n }\n String month=\"\";\n String n=\"\";\n\n if(nextmonth<10){\n n=\"\"+\"0\"+nextmonth;\n }\n\n else{\n n=\"\"+nextmonth;\n }\n int prevmonth=nextmonth-1;\n\n if(prevmonth<10){\n month=\"0\"+prevmonth;\n }\n\n else{\n month=month+prevmonth;\n }\n\n\n if(DateOneValue<10){\n DateOne=CheckedDate.substring(0,4)+month+\"0\"+DateOneValue;}\n\n else{\n DateOne=CheckedDate.substring(0,4)+month+\"\"+DateOneValue;\n }\n if(DateTwoValue<10){\n DateTwo=\"\"+year+\"\"+n+\"0\"+DateTwoValue;\n }\n\n else{\n DateTwo=year+\"\"+n+\"\"+DateTwoValue;\n }\n\n String Dates[]={DateOne,DateTwo};\n return Dates;\n }\n\n }", "@Test\n public void getBetweenDaysTest(){\n\n Date bDate = DateUtil.parse(\"2021-03-01\", DatePattern.NORM_DATE_PATTERN);//yyyy-MM-dd\n System.out.println(\"bDate = \" + bDate);\n Date eDate = DateUtil.parse(\"2021-03-15\", DatePattern.NORM_DATE_PATTERN);\n System.out.println(\"eDate = \" + eDate);\n List<DateTime> dateList = DateUtil.rangeToList(bDate, eDate, DateField.DAY_OF_YEAR);//创建日期范围生成器\n List<String> collect = dateList.stream().map(e -> e.toString(\"yyyy-MM-dd\")).collect(Collectors.toList());\n System.out.println(\"collect = \" + collect);\n\n }", "public int getQuarter () {\n return NQuarter;\n }", "public void setQuarters(int q)\n {\n\tthis.quarters = q;\n\tchangeChecker();\n }", "@Nullable\n public static String retrieveUpcomingGames(String year, String quarter) {\n String urlString = URL_BASE + MULTIPLE_GAMES + API_KEY + API_FORMAT + API_FILTER_STARTER + API_FILTER_YEAR\n + year + API_FILTER_SEP + API_FILTER_QUARTER + quarter + API_FILTER_SEP + API_APP_TRACKED_PLATFORMS;\n\n // try/catch - pull data from the API\n try {\n // cast the URL string into a URL\n URL url = new URL(urlString);\n\n // open the connection\n HttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\n // connect to the server\n connection.connect();\n\n // start an input stream and put the contents into a string\n InputStream gameStream = connection.getInputStream();\n String data = IOUtils.toString(gameStream);\n\n // close the stream and disconnect from the server\n gameStream.close();\n connection.disconnect();\n\n // return the string that holds the JSON\n return data;\n\n // if there was an issue, print the stack trace\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public int findNumQuarters(int numMonths) {\n setNumQuarters(0);\n double months = numMonths;\n double x = months / 12;\n double numYears = Math.floor(x);\n double quartersA = numYears * 4;\n double y = (x - numYears) * 10;\n months = Math.ceil(y);\n double quartersB = 0;\n\n if (months > 0 & months < 4) {\n quartersB = 1;\n }\n if (months > 3 & months < 7) {\n quartersB = 2;\n }\n if (months > 6 & months < 10) {\n quartersB = 3;\n }\n if (months > 9 & months < 13) {\n quartersB = 4;\n }\n setNumQuarters((int) (quartersA + quartersB));\n\n return getNumQuarters();\n }", "public List<Order> getOrdersByDate(Date date);", "private List<Date> getTestDates() {\n List<Date> testDates = new ArrayList<Date>();\n TimeZone.setDefault(TimeZone.getTimeZone(\"Europe/London\"));\n\n GregorianCalendar calendar = new GregorianCalendar(2010, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 0, 2);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2010, 1, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n calendar = new GregorianCalendar(2011, 0, 1);\n testDates.add(new Date(calendar.getTimeInMillis()));\n\n return testDates;\n }", "public Integer getQuarter() {\r\n return QTR;\r\n }", "private static double getQ( int k, int df )\n {\n final double[][] TAB = {\n { 1, 17.969, 26.976, 32.819, 37.082, 40.408, 43.119, 45.397, 47.357, 49.071 },\n { 2, 6.085, 8.331, 9.798, 10.881, 11.734, 12.435, 13.027, 13.539, 13.988 },\n { 3, 4.501, 5.910, 6.825, 7.502, 8.037, 8.478, 8.852, 9.177, 9.462 },\n { 4, 3.926, 5.040, 5.757, 6.287, 6.706, 7.053, 7.347, 7.602, 7.826 },\n { 5, 3.635, 4.602, 5.218, 5.673, 6.033, 6.330, 6.582, 6.801, 6.995 },\n { 6, 3.460, 4.339, 4.896, 5.305, 5.628, 5.895, 6.122, 6.319, 6.493 },\n { 7, 3.344, 4.165, 4.681, 5.060, 5.359, 5.606, 5.815, 5.997, 6.158 },\n { 8, 3.261, 4.041, 4.529, 4.886, 5.167, 5.399, 5.596, 5.767, 5.918 },\n { 9, 3.199, 3.948, 4.415, 4.755, 5.024, 5.244, 5.432, 5.595, 5.738 },\n { 10, 3.151, 3.877, 4.327, 4.654, 4.912, 5.124, 5.304, 5.460, 5.598 },\n { 11, 3.113, 3.820, 4.256, 4.574, 4.823, 5.028, 5.202, 5.353, 5.486 },\n { 12, 3.081, 3.773, 4.199, 4.508, 4.750, 4.950, 5.119, 5.265, 5.395 },\n { 13, 3.055, 3.734, 4.151, 4.453, 4.690, 4.884, 5.049, 5.192, 5.318 },\n { 14, 3.033, 3.701, 4.111, 4.407, 4.639, 4.829, 4.990, 5.130, 5.253 },\n { 15, 3.014, 3.673, 4.076, 4.367, 4.595, 4.782, 4.940, 5.077, 5.198 },\n { 16, 2.998, 3.649, 4.046, 4.333, 4.557, 4.741, 4.896, 5.031, 5.150 },\n { 17, 2.984, 3.628, 4.020, 4.303, 4.524, 4.705, 4.858, 4.991, 5.108 },\n { 18, 2.971, 3.609, 3.997, 4.276, 4.494, 4.673, 4.824, 4.955, 5.071 },\n { 19, 2.960, 3.593, 3.977, 4.253, 4.468, 4.645, 4.794, 4.924, 5.037 },\n { 20, 2.950, 3.578, 3.958, 4.232, 4.445, 4.620, 4.768, 4.895, 5.008 },\n { 21, 2.941, 3.565, 3.942, 4.213, 4.424, 4.597, 4.743, 4.870, 4.981 },\n { 22, 2.933, 3.553, 3.927, 4.196, 4.405, 4.577, 4.722, 4.847, 4.957 },\n { 23, 2.926, 3.542, 3.914, 4.180, 4.388, 4.558, 4.702, 4.826, 4.935 },\n { 24, 2.919, 3.532, 3.901, 4.166, 4.373, 4.541, 4.684, 4.807, 4.915 },\n { 25, 2.913, 3.523, 3.890, 4.153, 4.358, 4.526, 4.667, 4.789, 4.897 },\n { 26, 2.907, 3.514, 3.880, 4.141, 4.345, 4.511, 4.652, 4.773, 4.880 },\n { 27, 2.902, 3.506, 3.870, 4.130, 4.333, 4.498, 4.638, 4.758, 4.864 },\n { 28, 2.897, 3.499, 3.861, 4.120, 4.322, 4.486, 4.625, 4.745, 4.850 },\n { 29, 2.892, 3.493, 3.853, 4.111, 4.311, 4.475, 4.613, 4.732, 4.837 },\n { 30, 2.888, 3.486, 3.845, 4.102, 4.301, 4.464, 4.601, 4.720, 4.824 },\n { 31, 2.884, 3.481, 3.838, 4.094, 4.292, 4.454, 4.591, 4.709, 4.812 },\n { 32, 2.881, 3.475, 3.832, 4.086, 4.284, 4.445, 4.581, 4.698, 4.802 },\n { 33, 2.877, 3.470, 3.825, 4.079, 4.276, 4.436, 4.572, 4.689, 4.791 },\n { 34, 2.874, 3.465, 3.820, 4.072, 4.268, 4.428, 4.563, 4.680, 4.782 },\n { 35, 2.871, 3.461, 3.814, 4.066, 4.261, 4.421, 4.555, 4.671, 4.773 },\n { 36, 2.868, 3.457, 3.809, 4.060, 4.255, 4.414, 4.547, 4.663, 4.764 },\n { 37, 2.865, 3.453, 3.804, 4.054, 4.249, 4.407, 4.540, 4.655, 4.756 },\n { 38, 2.863, 3.449, 3.799, 4.049, 4.243, 4.400, 4.533, 4.648, 4.749 },\n { 39, 2.861, 3.445, 3.795, 4.044, 4.237, 4.394, 4.527, 4.641, 4.741 },\n { 40, 2.858, 3.442, 3.791, 4.039, 4.232, 4.388, 4.521, 4.634, 4.735 },\n { 48, 2.843, 3.420, 3.764, 4.008, 4.197, 4.351, 4.481, 4.592, 4.690 },\n { 60, 2.829, 3.399, 3.737, 3.977, 4.163, 4.314, 4.441, 4.550, 4.646 },\n { 80, 2.814, 3.377, 3.711, 3.947, 4.129, 4.277, 4.402, 4.509, 4.603 },\n { 120, 2.800, 3.356, 3.685, 3.917, 4.096, 4.241, 4.363, 4.468, 4.560 },\n { 240, 2.786, 3.335, 3.659, 3.887, 4.063, 4.205, 4.324, 4.427, 4.517 },\n { 999, 2.772, 3.314, 3.633, 3.858, 4.030, 4.170, 4.286, 4.387, 4.474 }\n };\n\n if ( k < 2 || k > 10 )\n {\n return -1.0; // not supported\n }\n\n int j = k - 1; // index for correct column (e.g., k = 3 is column 2)\n\n // find pertinent row in table\n int i = 0;\n while ( i < TAB.length && df > TAB[i][0] )\n {\n ++i;\n }\n\n // don't allow i to go past end of table\n if ( i == TAB.length )\n {\n --i;\n }\n\n return TAB[i][j];\n }", "public static void main(String[] args) {\n\n\t\tLocalDate current =LocalDate.now();\n\tLocalDate ld =\tLocalDate.of(1989, 11, 30);\n\t\t\n\tPeriod pd =\tPeriod.between(current, ld);\n\tSystem.out.println(pd.getYears());\n\t}", "List<LocalDate> getAvailableDates(@Future LocalDate from, @Future LocalDate to);", "public abstract double calculateQuarterlyFees();", "public static void main(String[] args) {\n LocalDate[] dates=new LocalDate[10];\n\n for (int i = 0; i <dates.length ; i++) {\n dates[i] = LocalDate.now().plusDays(i+1);\n }\n System.out.println(Arrays.toString(dates));\n for (LocalDate each:dates){\n System.out.println(each.format(DateTimeFormatter.ofPattern(\"MMMM/dd, EEEE\")));\n }\n\n\n }", "public DateTime[] getSegmentFenceposts(LocalDate date) {\n DateTime start = date.toDateTimeAtStartOfDay();\n DateTime stop = date.plusDays(1).toDateTimeAtStartOfDay();\n int[] starts = getSegmentStartTimes();\n DateTime[] fenceposts = new DateTime[starts.length + 1];\n for (int i = 0; i < starts.length; i++) {\n fenceposts[i] = start.plusMillis(starts[i]);\n }\n fenceposts[starts.length] = stop;\n return fenceposts;\n }", "public String[] getYearVals() {\n if (yearVals == null) {\n yearVals = new String[numYearVals];\n int year = java.util.Calendar.getInstance().get(java.util.Calendar.YEAR);\n //curYear = String.valueOf(year);\n\n for (int i = 0; i < numYearVals; i++) {\n yearVals[i] = String.valueOf(year + i);\n }\n }\n\n return yearVals;\n }", "private void searchex()\n {\n try\n {\n this.dtm.setRowCount(0);\n \n String a = \"date(now())\";\n if (this.jComboBox1.getSelectedIndex() == 1) {\n a = \"DATE_ADD( date(now()),INTERVAL 10 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 2) {\n a = \"DATE_ADD( date(now()),INTERVAL 31 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 3) {\n a = \"DATE_ADD( date(now()),INTERVAL 90 DAY)\";\n } else if (this.jComboBox1.getSelectedIndex() == 4) {\n a = \"DATE_ADD( date(now()),INTERVAL 180 DAY)\";\n }\n ResultSet rs = this.d.srh(\"select * from stock inner join product on stock.product_id = product.id where exdate <= \" + a + \" and avqty > 0 order by exdate\");\n while (rs.next())\n {\n Vector v = new Vector();\n v.add(rs.getString(\"product_id\"));\n v.add(rs.getString(\"name\"));\n v.add(rs.getString(\"stock.id\"));\n v.add(Double.valueOf(rs.getDouble(\"buyprice\")));\n v.add(Double.valueOf(rs.getDouble(\"avqty\")));\n v.add(rs.getString(\"exdate\"));\n this.dtm.addRow(v);\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic List<Project> findProjectsByStartDateRange(int ownerAccountId,\n\t\t\tDateTime fromDate, DateTime toDate, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByDateTimeRange(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.StartDate\", fromDate, toDate, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public double[] getRange();", "public static Date[] getCurrentWeekInDates(){\n\t\t Date FromDate=new Date();\n\t\t Date ToDate=new Date();\n\n\t\t int i = 1; \n\t\t while(i <= 7){\n\t\t \n\t\t Date CurDate = DateUtils.addDays(new Date(), i * (-1));\n\t\t \n\t\t Calendar cal = Calendar.getInstance();\n\t\t cal.setTime(CurDate);\n\t\t \n\t\t int DayOfWeek = cal.get(Calendar.DAY_OF_WEEK);\n\t\t \n\t\t if(DayOfWeek == 6){\n\t\t ToDate = CurDate;\n\t\t }\n\t\t \n\t\t if(DayOfWeek == 7){\n\t\t \n\t\t FromDate = CurDate;\n\t\t \n\t\t break;\n\t\t }\n\t\t \n\t\t i++;\n\t\t \n\t\t }// end while\n\t\t \n\t\t \n\t\t Date temp[] = new Date[2];\n\t\t temp[0] = FromDate;\n\t\t temp[1] = ToDate;\n\t\t \n\t\t return temp;\n\t\t \n\t}", "public static ArrayList<LocalDate> getPhDates() {\r\n \tArrayList<Date> phDates = phRepo.findAllPublicHolidayDates();\r\n \tArrayList<LocalDate> phLocalDates = new ArrayList<LocalDate>();\r\n \t\r\n\t\tfor(Date phDate : phDates) {\r\n\t\t\tphLocalDates.add(phDate.toLocalDate());\r\n\t\t}\r\n\t\t\r\n\t\treturn phLocalDates;\r\n }", "public int getQuarters()\n {\n\treturn quarters;\n }", "public static LocalDate[] getAllDays(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n for (int i = 1; i <= getDaysInYear(year); i++) {\n dates.add(LocalDate.ofYearDay(year, i));\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public List<Absence> getAllAbsencesOnAGivenDate(LocalDate date) throws SQLException {\n List<Absence> allAbsencesForADate = new ArrayList(); //get a list to store the values.\n java.sql.Date sqlDate = java.sql.Date.valueOf(date); // converts LocalDate date to sqlDate\n try(Connection con = dbc.getConnection()){\n String SQLStmt = \"SELECT * FROM ABSENCE WHERE DATE = '\" + sqlDate + \"'\";\n Statement statement = con.createStatement();\n ResultSet rs = statement.executeQuery(SQLStmt);\n while(rs.next()) //While you have something in the results\n {\n int userKey = rs.getInt(\"studentKey\");\n allAbsencesForADate.add(new Absence(userKey, date)); \n } \n }\n return allAbsencesForADate;\n }", "private Weet[] toOnArray(Date date) {\n /**\n * Used by getWeetsOn(Date dateOn) for returning an array of weets posted on a given date.\n * A differently named method is here required as the order and type of parameters would otherwise\n * conflict with the method toArray(Date date). Calling the function of type toArray(root, height, dwArray, date)\n * would lead to the execution of an inappropriate Date comparison between the given date and the weet's date.\n */\n c = 0;\n\n Weet[] dwArray = new Weet[size];\n Weet[] chArray = new Weet[c]; \n\n toArray(root, date, height, dwArray);\n chArray = dwArray.clone();\n return chArray;\n }", "public ArrayList<QueryParameter> downloadExcel() {\n ArrayList<QueryParameter> queries = new ArrayList<QueryParameter>(this.query.interval);\n for (int i = 0; i < this.query.interval; i++) {\n QueryParameter query = new QueryParameter(this.query.year - i);\n queries.add(query);\n this.downloadSingleExcel(query);\n }\n return queries;\n }", "Pair<Date, Date> getForDatesFrame();", "List<Doctor> getAvailableDoctors(java.util.Date date, String slot) throws CliniqueException;", "private String[][] getActiveProjects(String[][] projectArray) throws ParseException\n\t{\n\t\tDate projectStartDate;\n\t\tDate projectEndDate;\n\t\t\n\t\t//variable to find out the indexes based on comparison\n\t\tArrayList<Integer> arrayToStoreIndexOfReqProjects = new ArrayList<Integer>();\n\t\t\n\t\t//variable to store rows for desired indexes of the actual array\n\t\tString[][] projectDetailsForReqFYAndQuarter = null;\t\t\n\t\t\t\t\n\t\tint projectsCountForReqFYandQuarter;\t\t\n\t\t\n\t\tdateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\t\t\n\t\tDate date = new Date();\t\t\n\t\tsystemDate = dateFormat.format(date);\t\t\n\t\tDate sysdateInDateFormat = dateFormat.parse(systemDate);\n\t\t\n\t\t//loop to get the index for matching value\n\t\tfor (int i = 0; i < projectArray.length; i++) \n\t\t{\t\n\t\t\tprojectStartDate = dateFormat.parse(projectArray[i][6]);\n\t\t\tprojectEndDate = dateFormat.parse(projectArray[i][5]);\n\n\t\t\tif ((projectEndDate.compareTo(sysdateInDateFormat) >= 0 && projectStartDate.compareTo(sysdateInDateFormat) <= 0)\n\t\t\t\t\t&& (projectArray[i][7]!=null)) \n\t\t\t{\n\t\t\t\tarrayToStoreIndexOfReqProjects.add(i);\n\t\t\t}\t\t\t\n\t\t}\n\t\t\t\n\t\tprojectsCountForReqFYandQuarter = arrayToStoreIndexOfReqProjects.size();\n\t\t\n\t\tprojectDetailsForReqFYAndQuarter = new String[projectsCountForReqFYandQuarter][8];\n\t\t\n\t\tint projectRowToGetDetailsFrom;\n\t\t\n\t\t//loop to insert values based on the indexes got from the above loop\n\t\tfor (int j = 0; j < projectDetailsForReqFYAndQuarter.length; j++) \n\t\t{\n\t\t\tprojectRowToGetDetailsFrom = arrayToStoreIndexOfReqProjects.get(j);\n\t\t\t\n\t\t\tprojectDetailsForReqFYAndQuarter[j][0] = projectArray[projectRowToGetDetailsFrom][0];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][1] = projectArray[projectRowToGetDetailsFrom][1];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][2] = projectArray[projectRowToGetDetailsFrom][2];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][3] = projectArray[projectRowToGetDetailsFrom][3];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][4] = projectArray[projectRowToGetDetailsFrom][4];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][5] = projectArray[projectRowToGetDetailsFrom][5];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][6] = projectArray[projectRowToGetDetailsFrom][6];\n\t\t\tprojectDetailsForReqFYAndQuarter[j][7] = projectArray[projectRowToGetDetailsFrom][7];\n\t\t}\n\t\t\t\t\n\t\treturn projectDetailsForReqFYAndQuarter;\n\t\t\n\t}", "public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }", "private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }", "public static LocalDate[] getFirstDayWeekly(final int year) {\n\n final List<LocalDate> dates = new ArrayList<>();\n\n LocalDate localDate = LocalDate.ofYearDay(year, 1).with(TemporalAdjusters.previousOrSame(DayOfWeek.SUNDAY));\n\n final LocalDate testDate = LocalDate.ofYearDay(year, 1);\n if (testDate.getDayOfWeek() == DayOfWeek.THURSDAY) {\n dates.add(testDate.minusDays(4));\n }\n\n for (int i = 0; i <= 53; i++) {\n if (localDate.getYear() == year) {\n dates.add(localDate);\n }\n\n localDate = localDate.plusWeeks(1);\n }\n\n return dates.toArray(new LocalDate[dates.size()]);\n }", "public void setYxqKs(Date yxqKs) {\n\t\tthis.yxqKs = yxqKs;\n\t}", "private String[] getLast30Dates() {\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tString[] dates = new String[30];\n\t\tfor (int i=29; i>=0; i-- ) {\n\t\t\tdates[i] = String.valueOf(calendar.get(Calendar.MONTH)+1) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.DATE)) + \"/\" + \n\t\t\t\t\tString.valueOf(calendar.get(Calendar.YEAR));\n\t\t\tcalendar.add(Calendar.DAY_OF_MONTH, -1);\n\t\t}\n\t\treturn dates;\n\t}", "@Query(\n value = \"SELECT d\\\\:\\\\:date\\n\" +\n \"FROM generate_series(\\n\" +\n \" :startDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" :endDate\\\\:\\\\:timestamp without time zone,\\n\" +\n \" '1 day'\\n\" +\n \" ) AS gs(d)\\n\" +\n \"WHERE NOT EXISTS(\\n\" +\n \" SELECT\\n\" +\n \" FROM bookings\\n\" +\n \" WHERE bookings.date_range @> d\\\\:\\\\:date\\n\" +\n \" );\",\n nativeQuery = true)\n List<Date> findAvailableDates(@Param(\"startDate\") LocalDate startDate, @Param(\"endDate\") LocalDate endDate);", "public List<Integer> getSpPeriodYear() {\n\t\tint maxTerm = product.getMaxTerm();\n\t\tint minTerm = product.getMinTerm();\n\n\t\tList<Integer> lists = new ArrayList<Integer>();\n\t\tfor (int i = minTerm; i <= maxTerm; i++) {\n\t\t\tlists.add(i);\n\t\t}\n\t\treturn lists;\n\t}", "public static final String[] getDayMonthYear(Date aDate, boolean isAddSpace) {\r\n String[] dmys = new String[3];\r\n if (aDate != null) {\r\n Calendar cal=Calendar.getInstance();\r\n cal.setTime(aDate);\r\n int day = cal.get(Calendar.DAY_OF_MONTH);\r\n if (day<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = \"0 \" + day;\r\n \t } else {\r\n \t\t dmys[0] = \"0\" + day;\r\n \t }\r\n } else {\r\n \t String tmp = day + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[0] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[0] = tmp;\r\n \t }\r\n }\r\n int month = cal.get(Calendar.MONTH) + 1;\r\n if (month<10) {\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = \"0 \" + month;\r\n \t } else {\r\n \t\t dmys[1] = \"0\" + month;\r\n \t }\r\n } else {\r\n \t String tmp = month + \"\";\r\n \t if (isAddSpace) {\r\n \t\t dmys[1] = tmp.substring(0, 1) + \" \" + tmp.substring(1, 2);\r\n \t } else {\r\n \t\t dmys[1] = tmp;\r\n \t }\r\n }\r\n String year = cal.get(Calendar.YEAR) + \"\";\r\n if (isAddSpace) {\r\n \t dmys[2] = year.substring(0, 1) + \" \" + year.substring(1, 2) + \" \" + year.substring(2, 3) + \" \" + year.substring(3, 4);\r\n } else {\r\n \t dmys[2] = year;\r\n }\r\n }\r\n return dmys;\r\n }", "public List<Integer> getSePeriodYears() {\n\t\treturn Arrays.asList(5, 7, 10);\n\t}", "public Indicator[] getIndicatorForPeriod(int start, int end)\n {\n int index = 0;\n int validStart = indicators[0].getYear();\n int validEnd = indicators[indicators.length - 1].getYear();\n int oldStart = start, oldEnd = end;\n int startIndex = start - validStart;\n int counter = 0;\n\n if (start > end || (start < validStart && end < validStart) || (start > validEnd && end > validEnd))\n {\n throw new IllegalArgumentException(\"Invalid request of start and end year \" + start + \", \" + end +\n \". Valid period for \" + name + \" is \" + validStart + \" to \" + validEnd);\n }\n\n boolean changed = false;\n if (start < indicators[0].getYear())\n {\n changed = true;\n start = indicators[0].getYear();\n }\n\n if (end > indicators[indicators.length - 1].getYear())\n {\n changed = true;\n end = indicators[indicators.length - 1].getYear();\n }\n\n if (changed)\n {\n System.out.println(\"Invalid request of start and end year \" + oldStart + \",\" + oldEnd +\n \". Using valid subperiod for \" + name + \" is \" + start + \" to \" + end);\n }\n\n int numberOfYears = (end - start)+1;\n Indicator[] outputArray = new Indicator[numberOfYears];\n\n for (int i = startIndex; i < numberOfYears; i++)\n {\n outputArray[counter] = indicators[i];\n counter++;\n }\n return outputArray;\n }", "public ArrayList<Integer> getValidDays(Date date)\r\n\t{\r\n\t\tint maxDay = Date.maxDayOfMonthAndYear(date.getYear(), date.getMonth());\r\n\t\tArrayList <Integer> validDays = new ArrayList<Integer>(maxDay);\r\n\t\t\r\n\t\tfor (int day = 1; day <= maxDay; day++)\r\n\t\t\tvalidDays.add(day);\r\n\t\t\r\n\t\treturn validDays;\r\n\t}", "private void fillYearFields() {\n\n\t\tfor (int i = 1990; i <= 2100; i++) {\n\t\t\tyearFieldDf.addItem(i);\n\t\t\tyearFieldDt.addItem(i);\n\t\t}\n\t}", "public String getNextYear(String date){\r\n\t\tString registerDueDate=\"\";\r\n\t\ttry{\r\n\t\t\tList<TransferNORInPSTBean> minimumRegisterDueDateList=(List<TransferNORInPSTBean>)sqlMapClient.queryForList(\"TransferNORInPSTBean.getNextRegisterDueDate\", date);\r\n\t\t\tfor(TransferNORInPSTBean minimumRegisterDueDateValue: minimumRegisterDueDateList){\r\n\t\t\t\tregisterDueDate=minimumRegisterDueDateValue.getRegisterDueDate();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch(Exception e){\r\n\t\t\t//System.out.println(\"Exception in add next year\"+e.getMessage());\r\n\t\t\tlogger.info(\"Exception in get next year \"+e.getMessage());\r\n\t\t}\r\n\t\treturn registerDueDate;\r\n\t}", "public ArrayList<CoronaCase> Analytics(LocalDate lowerbound, LocalDate upperbound)\n\t{\n\t\tArrayList<CoronaCase> temp = new ArrayList<CoronaCase>();\n\t\t\n\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\tif(coronaCase.get(i).isCaseDateWithin(lowerbound, upperbound, coronaCase.get(i).getDate()))\n\t\t\t\ttemp.add(coronaCase.get(i));\n\t\t\n\t\treturn temp;\n\t}", "public List<Reserva> getReservasPeriod(String dateOne, String dateTwo){\n /**\n * Instancia de SimpleDateFormat para dar formato correcto a fechas.\n */\n SimpleDateFormat parser = new SimpleDateFormat(\"yyyy-MM-dd\");\n /**\n * Crear nuevos objetos Date para recibir fechas fomateadas.\n */\n Date dateOneFormatted = new Date();\n Date dateTwoFormatted = new Date();\n /**\n * Intentar convertir las fechas a objetos Date; mostrar registro de\n * la excepción si no se puede.\n */\n try {\n dateOneFormatted = parser.parse(dateOne);\n dateTwoFormatted = parser.parse(dateTwo);\n } catch (ParseException except) {\n except.printStackTrace();\n }\n /**\n * Si la fecha inicial es anterior a la fecha final, devuelve una lista\n * de Reservas creadas dentro del intervalo de fechas; si no, devuelve\n * un ArrayList vacío.\n */\n if (dateOneFormatted.before(dateTwoFormatted)){\n return repositorioReserva.findAllByStartDateAfterAndStartDateBefore\n (dateOneFormatted, dateTwoFormatted);\n } else {\n return new ArrayList<>();\n }\n }", "public Date212[] getNumbDates(int a){ //a is the number that signfies the dates passed in.\n // System.out.println(a+ \"a is\");\n Date212 myDates[] = new Date212[a]; //initalize it from the a.\n\n for(int d = 0; d< myTempDates.length; d++){ //that \"myTempDates\" array which holds the dates is used to copy it into the specified array.\n if(myTempDates[d] != null){ //if next index is not null then copy.\n myDates[d] = myTempDates[d];\n }\n }\n return myDates; //return the array to method calling it!\n }", "@Test\n public void floorToQuarterHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);\n\n Assert.assertNull(DateTimeUtil.floorToQuarterHour(null));\n \n // floor to nearest half hour\n DateTime dt1 = DateTimeUtil.floorToQuarterHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(15, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());\n\n DateTime dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,0,0,0));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,1,23,456));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,30,12,56));\n Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,59,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,55,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,46,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n }", "@Override\n\tpublic List<Project> findProjectsByEndDateRange(int ownerAccountId,\n\t\t\tDateTime fromDate, DateTime toDate, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByDateTimeRange(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.EndDate\", fromDate, toDate, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByEndDateRange MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByEndDateRange Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public float[] q_GET()\n {return q_GET(new float[4], 0);}", "public float[] q_GET()\n {return q_GET(new float[4], 0);}", "public ArrayList<Event> getAllEventsFromDate(Calendar date)\r\n\t{\r\n\t\tArrayList<Event> eventsList = new ArrayList<Event>();\r\n\t\t\r\n\t\tfor(Event event : this.getAllEvents() )\r\n\t\t{\t\t\t\r\n\t\t\tif (event.getCalendar().get(Calendar.YEAR) == date.get(Calendar.YEAR) && \r\n\t\t\t\tevent.getCalendar().get(Calendar.MONTH)\t== date.get(Calendar.MONTH) && \r\n\t\t\t\tevent.getCalendar().get(Calendar.DATE) == date.get(Calendar.DATE))\r\n\t\t\t{\r\n\t\t\t\teventsList.add(event);\r\n\t\t\t}\r\n\t\t}\r\n\t\r\n\t\treturn eventsList;\r\n\t}", "@Override\r\n\tpublic List<Yquestion> queryYquestion(int qid) {\n\t\treturn ym.queryYquestion(qid);\r\n\t}", "List<InsureUnitTrend> queryInsureDate();", "public static List<Date> getTradeDays() {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt \"\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "org.hl7.fhir.ObservationReferenceRange getReferenceRangeArray(int i);", "protected List<String> getAxisList(Date startDate, Date endDate, int calendarField) {\n List<String> stringList = new ArrayList<String>();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date tempDate = startDate;\n Calendar tempCalendar = Calendar.getInstance();\n tempCalendar.setTime(tempDate);\n\n while (tempDate.before(endDate)) {\n stringList.add(simpleDateFormat.format(tempDate));\n tempCalendar.add(calendarField, 1);\n tempDate = tempCalendar.getTime();\n }\n\n return stringList;\n }", "org.hl7.fhir.ObservationReferenceRange[] getReferenceRangeArray();", "@Test\n public void test_MinguoDate_range_yeaOfEra() {\n assertEquals(ValueRange.of(1, ChronoField.YEAR.range().getMaximum() - YEARS_BEHIND),\n MinguoDate.of(1, 1, 1).range(ChronoField.YEAR_OF_ERA));\n assertEquals(ValueRange.of(1, -ChronoField.YEAR.range().getMinimum() + 1 + YEARS_BEHIND),\n MinguoDate.of(-1, 1, 1).range(ChronoField.YEAR_OF_ERA));\n }", "public static ArrayList<Firm> getFirmsInQuarterRangeWithSIC(int start, int end, String sic, String state)\n\t{\t\t\t\t\n\t\tArrayList<ArrayList<Firm>> firmsInQuarterRange = new ArrayList<ArrayList<Firm>>();\n\t\tfirmsInQuarterRange = utils.createGCRangeList(econo, start, end, state);\n\t\tArrayList<Firm> firmsWithSIC = new ArrayList<Firm>();\t\t\n\t\tfor(int i = 0; i < firmsInQuarterRange.size(); i ++)\n\t\t{\n\t\t\tif((firmsInQuarterRange.get(i) != null))\n\t\t\t{\n\t\t\t\tfor(int j = 0; j < firmsInQuarterRange.get(i).size(); j ++)\n\t\t\t\t{\t\t\t\t\t\n\t\t\t\t\tfloat tmpVal = 0.0f;\t\t\t\t\t\n\t\t\t\t\t//check if the firm evaluated has desired sic\n\t\t\t\t\tif(Integer.parseInt(firmsInQuarterRange.get(i).get(j).sic) == Integer.parseInt(sic) &&\t\t\t\t\t\t\t\n\t\t\t\t\t (econo.bankTree.get(firmsInQuarterRange.get(i).get(j).cusip) == null))\n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif(\n\t\t\t\t\t\t\tFloat.isNaN(Float.parseFloat(firmsInQuarterRange.get(i).get(j).Tobins_Q))\n\t\t\t\t\t\t ){}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tfirmsWithSIC.add(firmsInQuarterRange.get(i).get(j));\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\treturn firmsWithSIC;\n\t}", "public ArrayList<Question> getQuestionsSortedByDate() {\n \t\tArrayList<Question> sortedQuestions = this.getQuestions();\n \n \t\tCollections.sort(sortedQuestions, new DateComparator());\n \n \t\treturn sortedQuestions;\n \t}", "public static void main(String[] args) {\r\n\t\tDate today = new Date(2, 26, 2012);\r\n\t\tSystem.out.println(\"Input date is \" + today);\r\n\t\tSystem.out.println(\"Printing the next 10 days after \" + today);\r\n\t\tfor (int i = 0; i < 10; i++) {\r\n\t\t\ttoday = today.next();\r\n\t\t\tSystem.out.println(today);\r\n\t\t}\r\n\t\tDate expiry = new Date(2011);\r\n\t\tSystem.out.println(\"testing year 2011 as input:\" + expiry);\r\n\r\n\t\tDate todayDate = new Date();\r\n\t\tSystem.out.println(\"todays date: \" + todayDate);\r\n\t\tSystem.out.println(\"current month:\" + todayDate.month);\r\n\r\n\t\t// testing isValidMonth function\r\n\t\tDate start = new Date(\"08-01-2010\");\r\n\t\tDate end1 = new Date(\"09-01-2010\");\r\n\t\tboolean param1 = start.isValidMonth(4, end1);\r\n\t\tSystem.out.println(\"is April valid between: \" + start + \" and \" + end1\r\n\t\t\t\t+ \": \" + param1);\r\n\t\tDate end2 = new Date(\"02-01-2011\");\r\n\t\tboolean param2 = start.isValidMonth(2, end2);\r\n\t\tSystem.out.println(\"is feb valid between: \" + start + \" and \" + end2\r\n\t\t\t\t+ \": \" + param2);\r\n\t\tboolean param3 = start.isValidMonth(8, start);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tparam3 = start.isValidMonth(4, start);\r\n\t\tSystem.out.println(\"is april valid between: \" + start + \" and \" + start\r\n\t\t\t\t+ \": \" + param3);\r\n\t\tDate end3 = new Date(\"02-01-2010\");\r\n\t\tboolean param4 = start.isValidMonth(8, end3);\r\n\t\tSystem.out.println(\"is aug valid between: \" + start + \" and \" + end3\r\n\t\t\t\t+ \": \" + param4);\r\n\t\t \r\n\t\tDate lease = new Date(\"1-01-2012\");\r\n\t\tDate expiry1 = new Date(\"12-31-2012\");\r\n\r\n\t\t// testing daysBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING daysBetween method\\n------------------------------\");\r\n\t\tint count = lease.daysBetween(expiry);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry + \"is: \"\r\n\t\t\t\t+ count);\r\n count = new Date(\"1-01-2011\").daysBetween(new Date(\"12-31-2011\"));\r\n\t\tSystem.out.println(\"Days between [1-01-2011] and [12-31-2011]\" + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tcount = lease.daysBetween(expiry1);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + expiry1 + \"is: \"\r\n\t\t\t\t+ count);\r\n\t\tDate testDate = new Date(\"12-31-2013\");\r\n\t\tcount = lease.daysBetween(testDate);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [12-31-2013] \"\r\n\t\t\t\t+ \"is: \" + count);\r\n\t\tcount = lease.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n count = lease.daysBetween(new Date(\"1-10-2012\"));\r\n\t\tSystem.out.println(\"Days between \" + lease + \" and [1-10-2012\" + \"is: \"\r\n\t\t\t\t+ count);\r\n \r\n\t\tcount = testDate.daysBetween(lease);\r\n\t\tSystem.out.println(\"Days between \" + testDate + \" and \" + lease + \"is: \"\r\n\t\t\t\t+ count);\r\n\r\n\t\t// testin isBefore\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING isBefore method\\n------------------------------\");\r\n\t\tboolean isBefore = today.isBefore(today.next());\r\n\t\tSystem.out.println(today + \"is before \" + today.next() + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.next().isBefore(today);\r\n\t\tSystem.out.println(today.next() + \"is before \" + today + \": \"\r\n\t\t\t\t+ isBefore);\r\n\t\tisBefore = today.isBefore(today);\r\n\t\tSystem.out.println(today + \"is before \" + today + \": \" + isBefore);\r\n isBefore = today.isBefore(today.addMonths(12));\r\n\t\tSystem.out.println(today + \"is before \" + today.addMonths(12) + \": \" + isBefore);\r\n\r\n\t\t// testing addMonths\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING addMonths method\\n------------------------------\");\r\n\t\ttoday = new Date(\"1-31-2011\");\r\n\t\tDate newDate = today.addMonths(1);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 1 months to \" + today + \" gives: \" + newDate);\r\n\t\tnewDate = today.addMonths(13);\r\n\t\tSystem.out.println(\"adding 13 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\ttoday = new Date(\"3-31-2010\");\r\n\t\tnewDate = today.addMonths(15);\r\n\t\tSystem.out.println(\"adding 15 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(23);\r\n\t\tSystem.out.println(\"adding 23 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(49);\r\n\t\tSystem.out.println(\"adding 49 months to \" + today + \" gives: \"\r\n\t\t\t\t+ newDate);\r\n\t\tnewDate = today.addMonths(0);\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"adding 0 months to \" + today + \" gives: \" + newDate);\r\n\t\t\r\n\t\t// testing monthsBetween\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"\\nTESTING monthsBetween method\\n------------------------------\");\r\n\t\tint monthDiff = today.monthsBetween(today.addMonths(1));\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + today.addMonths(1)\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\tmonthDiff = today.next().monthsBetween(today);\r\n\t\tSystem.out.println(\"months between \" + today.next() + \" and \" + today\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date(\"09-30-2011\");\r\n\t\tDate endDate = new Date(\"2-29-2012\");\r\n\t\tmonthDiff = today.monthsBetween(endDate);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate + \": \"\r\n\t\t\t\t+ monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate1 = new Date(\"12-04-2011\");\r\n\t\tmonthDiff = today.monthsBetween(endDate1);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate1\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\ttoday = new Date();\r\n\t\tDate endDate2 = new Date(\"12-22-2010\");\r\n\t\tmonthDiff = today.monthsBetween(endDate2);\r\n\t\tSystem.out.println(\"months between \" + today + \" and \" + endDate2\r\n\t\t\t\t+ \": \" + monthDiff);\r\n\t\t\r\n\t\t// following should generate exception as date is invalid!\r\n\t\t// today = new Date(13, 13, 2010);\r\n\r\n\t\t// expiry = new Date(\"2-29-2009\");\r\n // newDate = today.addMonths(-11);\r\n\r\n\t}", "public ArrayList getDataforVol_EurGbp(String date1){\n \n //Date date;\n List stPrices = new ArrayList();\n String sqlQuery = \"SELECT close_price FROM eur_gbp\"\n + \"WHERE day_date <'\"+ date1 +\"' AND \"\n + \"day_date >= DATE_SUB('\" +date1 +\"',INTERVAL 30 DAY);\";\n try {\n rs = dbCon.getData(sqlQuery);\n \n while (rs.next()) {\n stPrices.add(rs.getString(\"close_price\"));\n } \n } catch(SQLException e){} \n return (ArrayList) stPrices; \n }", "public static double[] getQuartileData(double data[]) {\r\n\t\t\t\r\n\t\t\tint datLength = data.length;\r\n\t \tdouble[] quartileData = {1, 2, 3};\r\n\t \t\r\n\t \tdouble Q1 = 0, Q3 = 0, IQR = 0;\r\n\t \t\t\r\n\t \t\r\n\t if((datLength % 2) == 0 && !( ((datLength / 2) % 2) == 0)){//good\r\n\t \t\t \r\n\t \tQ1 = data[Math.round(datLength / 4)];\r\n\r\n\t \tQ3 = data[Math.round(datLength * (3/4))];\r\n\t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \t\r\n\t }\r\n\t else if((datLength % 2) == 0 && ((datLength / 2) % 2) == 0){//good\r\n\t \t\r\n\t \tQ1 = ((data[datLength / 4] + data[(datLength / 4) - 1]) / 2);\r\n\r\n\t \tQ3 = ((data[datLength * (3/4)] + data[(datLength * (3/4)) - 1]) / 2);\r\n\t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \r\n\t }\r\n\t else if(!((datLength % 2) == 0) && (((datLength - 1) / 2) % 2) == 0){//good\r\n\t \t \r\n\t \tQ1 = (data[(datLength - 1) / 4] + data[(datLength - 1) / 4] - 1) / 2;\r\n\t \r\n\t \tQ3 = (data[datLength * (3/4)] + data[datLength * (3/4) + 1]) / 2;\r\n\t \t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \t\r\n\t }\r\n\t else if(!((datLength % 2) == 0) && !((((datLength - 1) / 2) % 2) == 0)){//good\r\n\t \t \r\n\t \tQ1 = data[Math.round((datLength - 1) / 4)];\r\n\t \t \r\n\t \tQ3 = data[Math.round((datLength) * (3/4))];\r\n\t \t \t \r\n\t \tIQR = Q3 - Q1;\r\n\t \r\n\t }\r\n\t \r\n\t quartileData[0] = Q1;\r\n\t quartileData[1] = Q3;\r\n\t quartileData[2] = IQR;\r\n\t \t\r\n\t return quartileData;\r\n\t }", "public void setCcrq(Date ccrq) {\n this.ccrq = ccrq;\n }", "public void setYxqJs(Date yxqJs) {\n\t\tthis.yxqJs = yxqJs;\n\t}", "private static List<Date> getTradeDays(Date startDate, Date expiration) {\r\n\t\t\r\n\t\tEntityManagerFactory emf = Persistence.createEntityManagerFactory(\"JPAOptionsTrader\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\t\r\n\t\t// Note: table name refers to the Entity Class and is case sensitive\r\n\t\t// field names are property names in the Entity Class\r\n\t\tQuery query = em.createQuery(\"select distinct(opt.trade_date) from \" + TradeProperties.SYMBOL_FOR_QUERY + \" opt where \"\r\n\t\t\t\t+ \"opt.trade_date >= :tradeDate \" \r\n\t\t\t\t+ \"and opt.expiration=:expiration \"\t\r\n\t\t\t\t+ \" order by opt.trade_date\");\r\n\t\t\r\n\t\tquery.setParameter(\"tradeDate\", startDate);\r\n\t\tquery.setParameter(\"expiration\", expiration);\r\n\r\n\t\tquery.setHint(\"odb.read-only\", \"true\");\r\n\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tList<Date> tradeDates = query.getResultList();\r\n\t\t\r\n\t\tem.close();\r\n\t\t\r\n\t\treturn tradeDates;\r\n\t}", "public void insertQuarter(int coin[]) {\n if(coin.length ==2){\n \n if(coin[0] == 25 && coin[1]==25){\n //System.out.println(\"a[0]\"+a[0]);\n System.out.println(\"You inserted a quarter in q2\");\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n }else{\n gumballMachine.setState(gumballMachine.getNoQuarterState()); \n }\n \n \n \n }\n \n // System.out.println(\"You inserted a quarter in q2\");\n // gumballMachine.setState(gumballMachine.getHasQuarterState());\n\t}", "public Set<Cars> getCars(String fromDate, String toDate, String type, String name) {\n\t\tCarsDao carsDao = CarsDaoImpl.getInstance();\n\t\tSet<Cars> cars = carsDao.getCarsByDate(fromDate, toDate, type, name);\n\t\treturn cars;\n\t}", "public static void main(String args[]){\n\t\tTimeUtil.getBetweenDays(\"2019-01-01\",TimeUtil.dateToStr(new Date(), \"-\"));\n\t\t\n\t\t/*\tTimeUtil tu=new TimeUtil();\n\t\t\tString r=tu.ADD_DAY(\"2009-12-20\", 20);\n\t\t\tSystem.err.println(r);\n\t\t\tString [] a= TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",9);\n\t\t\tfor(int i=0;i<a.length;i++){\n\t\t\t\tSystem.out.println(a[i]);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"1\",9));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"2\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"3\",3));\n\t\t\tSystem.out.println(TimeUtil.getPerNyyMMdd(\"20080808\", \"4\",3));\n\t*/\n\t\tTimeUtil tu=new TimeUtil();\n\t//\tString newDate = TimeUtil.getDateOfCountMonth(\"2011-03-31\", 6);\n\t//\tSystem.out.println(newDate);\n//\t\tSystem.err.println(tu.getDateTime(\"\")+\"|\");\n\t\t\n\t\t}", "public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = LocalDate.of(2014, Month.JANUARY, 20);\n\t\tdate = date.plus(annually);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(Period.of(0, 20, 47)); // P20M47D\n\t\tSystem.out.println(Period.of(2, 20, 47)); // P2Y20M47D\n\t}", "public WeekG(Calendar date, List<DayG> dayGs)\r\n {\r\n endDate = Calendar.getInstance();\r\n endDate.set((date.get(Calendar.YEAR)),(date.get(Calendar.MONTH)),\r\n (date.get(Calendar.DAY_OF_MONTH)));\r\n acceptedDatesRange = new int[2];\r\n dayArray = new ArrayList();\r\n \r\n setUp();\r\n \r\n addDayGs(dayGs);\r\n }", "public Weet[] toArray(Date date) {\n c = 0;\n\n Weet[] dwArray = new Weet[size];\n Weet[] chArray = new Weet[c]; \n\n toArray(root, height, dwArray, date);\n chArray = dwArray.clone();\n return chArray;\n }", "@Override\r\n\tpublic List<Exam> listAllExamsByDate(LocalDate date)\r\n\t{\n\t\treturn null;\r\n\t\t\r\n\t}", "private List<LocalDate> createHolidays(int year) throws Exception {\n LocalDate indepDay = LocalDate.parse(year + \"-07-04\");\n YearMonth laborDayYearMonth = YearMonth.parse(year + \"-09\");\n LocalDate laborDay = DaysOfWeekUtil.findFirstOfMonth(laborDayYearMonth, DayOfWeek.MONDAY);\n\n return Arrays.asList(indepDay, laborDay);\n }", "public static void main(String[] args) {\n Random randy = new Random();\r\n for (int i = 0; i < 2019; i++) {\r\n printYear(i, randy.nextInt(7), false);\r\n }\r\n //printYear(2007, 5, false);\r\n }", "public List<TblPurchaseOrder>getAllDataPurchaseOrder(Date startDate,Date endDate,TblPurchaseOrder po,TblSupplier supplier);", "public SprintDataCollection getSprintsForRapidViewCompletedAfterDate(ClientCredentials clientCredentials,\n String rapidViewIdString, String startDateString) throws JSONException {\n\n SprintDataCollection filteredSprintDataCollection = new SprintDataCollection();\n SprintDataCollection allSprintDataCollection;\n DateTime startDate;\n \n startDate = DateTime.parse(startDateString);\n \n allSprintDataCollection = getSprintsForRapidView(clientCredentials, rapidViewIdString);\n\n for (SprintData currentSprint : allSprintDataCollection.getSprintDataList()) {\n\n if (currentSprint != null && currentSprint.getCompleteDate() != null\n && currentSprint.getCompleteDateAsDateTime().isAfter(startDate)) {\n filteredSprintDataCollection.addSprintData(currentSprint);\n }\n }\n\n return filteredSprintDataCollection;\n\n }", "public void sortBasedYearService();" ]
[ "0.70869124", "0.7044697", "0.6606713", "0.64243406", "0.6016798", "0.5591664", "0.526945", "0.5184907", "0.51356715", "0.51328427", "0.5050903", "0.48951346", "0.48737985", "0.48504257", "0.48465317", "0.48403475", "0.48376346", "0.48227942", "0.48046798", "0.4803181", "0.47872803", "0.4762486", "0.4743625", "0.4708294", "0.46358442", "0.46266416", "0.45968115", "0.45966431", "0.45867127", "0.45772752", "0.45665425", "0.45661741", "0.45499602", "0.45389593", "0.45343664", "0.4527438", "0.4510565", "0.44999158", "0.4484331", "0.44682917", "0.446791", "0.44490525", "0.44413358", "0.4422115", "0.44155616", "0.4413936", "0.4356308", "0.43551284", "0.43480515", "0.43418577", "0.43327087", "0.4325684", "0.4315346", "0.43152332", "0.43100828", "0.4307569", "0.43016484", "0.42836025", "0.4278224", "0.42661998", "0.42600673", "0.4230037", "0.42228138", "0.4219328", "0.4194718", "0.41899294", "0.4180952", "0.4178995", "0.41765517", "0.4168131", "0.41668892", "0.41668892", "0.416003", "0.41586277", "0.41584256", "0.41563162", "0.4155216", "0.415161", "0.41502863", "0.41449535", "0.41420844", "0.4139941", "0.41301557", "0.4128126", "0.41253248", "0.41090906", "0.4107685", "0.41042393", "0.41040587", "0.4102097", "0.41006425", "0.4081886", "0.40702736", "0.4064517", "0.40629998", "0.406186", "0.40562546", "0.40562412", "0.40483963", "0.40403974" ]
0.7735749
0
Returns the number of the quarter (i.e. 1, 2, 3 or 4) based on a specified date.
public static int getQuarterNumber(final LocalDate date) { Objects.requireNonNull(date); int result; LocalDate[] bounds = getQuarterBounds(date); if (date.compareTo(bounds[2]) < 0) { result = 1; } else if (date.compareTo(bounds[4]) < 0) { result = 2; } else if (date.compareTo(bounds[6]) < 0) { result = 3; } else { result = 4; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getQuarter () {\n return NQuarter;\n }", "public String getQuarter() {\r\n return quarter;\r\n }", "public Integer getQuarter() {\r\n return QTR;\r\n }", "public int findNumQuarters(int numMonths) {\n setNumQuarters(0);\n double months = numMonths;\n double x = months / 12;\n double numYears = Math.floor(x);\n double quartersA = numYears * 4;\n double y = (x - numYears) * 10;\n months = Math.ceil(y);\n double quartersB = 0;\n\n if (months > 0 & months < 4) {\n quartersB = 1;\n }\n if (months > 3 & months < 7) {\n quartersB = 2;\n }\n if (months > 6 & months < 10) {\n quartersB = 3;\n }\n if (months > 9 & months < 13) {\n quartersB = 4;\n }\n setNumQuarters((int) (quartersA + quartersB));\n\n return getNumQuarters();\n }", "public void setQuarter(String quarter) {\r\n this.quarter = quarter;\r\n }", "private static LocalDate localQuarterDate( int year, int quarter, int dayOfQuarter )\n {\n if ( quarter == 2 && dayOfQuarter == 92 )\n {\n throw new InvalidValuesArgumentException( \"Quarter 2 only has 91 days.\" );\n }\n // instantiate the yearDate now, because we use it to know if it is a leap year\n LocalDate yearDate = LocalDate.ofYearDay( year, dayOfQuarter ); // guess on the day\n if ( quarter == 1 && dayOfQuarter > 90 && (!yearDate.isLeapYear() || dayOfQuarter == 92) )\n {\n throw new InvalidValuesArgumentException( String.format(\n \"Quarter 1 of %d only has %d days.\", year, yearDate.isLeapYear() ? 91 : 90 ) );\n }\n return yearDate\n .with( IsoFields.QUARTER_OF_YEAR, quarter )\n .with( IsoFields.DAY_OF_QUARTER, dayOfQuarter );\n }", "@Override\n\tpublic void endOfQuarter(int quarter) {\n\t\t\n\t}", "private static LocalDate[] getQuarterBounds(final LocalDate date) {\n Objects.requireNonNull(date);\n\n final LocalDate[] bounds = new LocalDate[8];\n\n bounds[0] = date.with(TemporalAdjusters.firstDayOfYear());\n bounds[1] = date.withMonth(Month.MARCH.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[2] = date.withMonth(Month.APRIL.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[3] = date.withMonth(Month.JUNE.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[4] = date.withMonth(Month.JULY.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[5] = date.withMonth(Month.SEPTEMBER.getValue()).with(TemporalAdjusters.lastDayOfMonth());\n bounds[6] = date.withMonth(Month.OCTOBER.getValue()).with(TemporalAdjusters.firstDayOfMonth());\n bounds[7] = date.with(TemporalAdjusters.lastDayOfYear());\n\n return bounds;\n }", "public int getQuarters()\n {\n\treturn quarters;\n }", "public int getHowManyInPeriod();", "public int trimestre(LocalDate d);", "@Override\r\n\tpublic int getDayCount(Date date) {\n\t\tString hql = \"select cc.count from cinema_condition cc where cc.date = ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, date);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint resutl = (Integer) query.uniqueResult();\r\n\t\treturn resutl;\r\n\t}", "public static int numQuarters(double money) {\n int quarters = 0;\n while (money>0.25){\n quarters++;\n money =(money-0.25);}\n return quarters;}", "public abstract double calculateQuarterlyFees();", "private static int getDayNumberNew(LocalDate date) {\n DayOfWeek day = date.getDayOfWeek();\n return day.getValue() % 7;\n }", "public int[] findQuarterBounds(int[] datesJulian, int numQuarters) {\n int numTransactions = datesJulian.length;\n int[] timeBlock = new int[numTransactions];\n int lowerBound = 0;\n int upperBound = 0;\n\n // Get indices of earliest and latest julianDate\n earliestIndex = MinAndMaxFinder.findEarliestIndex(datesJulian);\n latestIndex = MinAndMaxFinder.findLatestIndex(datesJulian);\n\n int[] year = new int[datesJulian.length];\n int[] month = new int[datesJulian.length];\n int[] dateGreg = new int[2];\n\n // Get the month and year values of all the transaction julianDate\n for (int i = 0; i < datesJulian.length; i++) {\n dateGreg = convertJulianToGregorian(datesJulian[i]);\n year[i] = dateGreg[0];\n month[i] = dateGreg[1];\n }\n\n /* Get the year and month value of the earliest date only\n * to be used as a starting point for the search */\n int y = year[earliestIndex];\n int m = month[earliestIndex];\n\n /* Find the initial lower and upper bounds for the search\n * loop */\n if (m > 0 & m < 4) {\n lowerBound = 0;\n upperBound = 4;\n }\n if (m > 3 & m < 7) {\n lowerBound = 3;\n upperBound = 7;\n }\n if (m > 6 & m < 10) {\n lowerBound = 6;\n upperBound = 10;\n }\n if (m > 9 & m < 13) {\n lowerBound = 9;\n upperBound = 13;\n }\n //System.out.println(\"Number of ... Quarters \" + getNumQuarters());\n /* Search Loop */\n int groupCounter = 1;\n boolean[] indexToExcludeFromSearch = new boolean[numTransactions];\n java.util.Arrays.fill(indexToExcludeFromSearch, false);\n // Iterate for each quarter\n for (int i = 0; i < numQuarters; i++) {\n // Iterate for each transaction\n for (int j = 0; j < numTransactions; j++) {\n if (year[j] == y && (month[j] > lowerBound & month[j] < upperBound) &&\n indexToExcludeFromSearch[j] == false) {\n timeBlock[j] = groupCounter;\n indexToExcludeFromSearch[j] = true;\n }\n } // end inner for\n if (lowerBound == 9 && upperBound == 13) {\n lowerBound = 0;\n upperBound = 4;\n y++;\n } else {\n lowerBound = lowerBound + 3;\n upperBound = upperBound + 3;\n }\n groupCounter++;\n } // end outer for\n groupCounter--;\n setNumQuarters(groupCounter);\n DataPreprocessing split = new DataPreprocessing();\n\n return timeBlock;\n }", "public int getQ() {\n/* 579 */ return getCOSObject().getInt(COSName.Q, 0);\n/* */ }", "public int[] boundFinderQuarters(int[] date) {\n int[] bound = {0, 0};\n int year, month, day;\n year = date[0];\n month = date[1];\n day = date[2];\n\n /*** LOWER BOUND = bound[0]***/\n bound[0] = 1;\n\n /*** UPPER BOUND ***/\n boolean leapYearFlag = false;\n for (int i = 0; i < leapYears.length; i++) {\n if (year == leapYears[i]) {\n leapYearFlag = true;\n }\n }\n\n // If leap year and month is Feb then set upperBoundMonth to 29\n if (leapYearFlag && month == 2) {\n bound[1] = 29;\n } else {\n bound[1] = calculateUpperBound(month);\n }\n return bound;\n }", "List<Quarter> getQuarterList(Integer cityId)throws EOTException;", "@Override\n\tpublic int getRemainingQuantity(String doctorId, int dayOfWeek, int startTime) {\n\t\tlogger.info(\"get remainng Quatity dayOfWeek:\" + dayOfWeek + \" startTime:\" + startTime);\n\t\treturn rfi.getCount(doctorId, dayOfWeek, startTime);\n\t}", "public double sumQuarter(MoneyNode p) {\r\n // Base case:\r\n if (p == null)\r\n return 0;\r\n if (p.data instanceof Quarter) // Bill type\r\n return ((Coin) p.data).getValue() / 100.0 + sumQuarter(p.next);\r\n else\r\n return sumQuarter(p.next);\r\n }", "public static LocalDate[] getFirstDayQuarterly(final int year) {\n LocalDate[] bounds = new LocalDate[4];\n\n bounds[0] = LocalDate.of(year, Month.JANUARY, 1);\n bounds[1] = LocalDate.of(year, Month.APRIL, 1);\n bounds[2] = LocalDate.of(year, Month.JULY, 1);\n bounds[3] = LocalDate.of(year, Month.OCTOBER, 1);\n\n return bounds;\n }", "public void setQuarters(int q)\n {\n\tthis.quarters = q;\n\tchangeChecker();\n }", "public void insertQuarter() {\n gumballMachine.setState(gumballMachine.getHasQuarterState());\n gumballMachine.getState().insertQuarter();\n }", "public int getWeekNumber(LocalDate data)\n {\n\n return sem.getWeekNumber(data,startSemester,beginHoliday,endHoliday,endSemester);\n }", "int getPeriod();", "@Override\r\n\tpublic int getQnACount(int boardNum) {\n\t\treturn QnARepository.getQnACount(boardNum);\r\n\t}", "public Quarter(int amount) {\n super(amount, \"Quarter\", 0.25);\n }", "@LogExceptions\n public int getNumberOfEvents(String date) throws SQLException {\n Connection conn = DatabaseConnection.getConnection();\n int i = 0;\n try(PreparedStatement stmt = \n conn.prepareStatement(SELECT_EVENT_DATE)) \n {\n stmt.setString(1, date);\n try(ResultSet rs = stmt.executeQuery()) {\n while(rs.next()) {\n i++;\n }\n }\n }\n return i;\n }", "public abstract int daysInMonth(DMYcount DMYcount);", "public int getQ() {\n System.out.println(\"q is: \" + q);\n return q;\n }", "public int getDateAsNumber(){\n\t\tSimpleDateFormat f = new SimpleDateFormat(\"yyyyMMdd\");\n\t\treturn Integer.parseInt(f.format(date.get()));\n\t}", "public IntegerDt getNumberOfSeries() { \n\t\tif (myNumberOfSeries == null) {\n\t\t\tmyNumberOfSeries = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfSeries;\n\t}", "private int getPublishingYear(String date) {\n String[] splitArray = date.split(\"-\");\n\n return Integer.parseInt(splitArray[splitArray.length - 1]);\n }", "protected void insertQuarter(double balance)\r\n {\r\n totalBalance = balance;\r\n totalBalance = totalBalance + 0.25;\r\n \r\n }", "public static int number(int m, int d, int y) {\n int n = 0;\n // Tests for user inputted month then reassigns amount of days to a variable.\n if (m == 1) {\n n = n+0;\n } else if (m == 2) {\n n = n+31;\n } else if (m == 3) {\n n = n+59;\n } else if (m == 4) {\n n = n+90;\n } else if (m == 5) {\n n = n+120;\n } else if (m == 6) {\n n = n+151;\n } else if (m == 7) {\n n = n+181;\n } else if (m == 8) {\n n = n+212;\n } else if (m == 9) {\n n = n+243;\n } else if (m == 10) {\n n= n+273;\n } else if (m == 11) {\n n = n+304;\n } else if (m == 12) {\n n = n+334;\n }\n // Calculates the amount of dyas in the year the date is, considering leap years.\n n = n+d+(y*365+y/4-y/100+y/400);\n // Tests if the year entered is a leap year, and if true, 1 day is subtracted.\n if (n/4 == 0 && n/100 == 0 && n/400 == 0 || n/4 == 0 && n/100 != 0) {\n n = n-1;\n }\n return n;\n }", "public ArrayList<String> createDate(String quarter, String year) {\r\n\t\tArrayList<String> date = new ArrayList<>();\r\n\t\tString startDate = \"\";\r\n\t\tString endDate = \"\";\r\n\t\tif (quarter.equals(\"January - March\")) {\r\n\t\t\tstartDate = year + \"-01-01\";\r\n\t\t\tendDate = year + \"-03-31\";\r\n\t\t} else if (quarter.equals(\"April - June\")) {\r\n\t\t\tstartDate = year + \"-04-01\";\r\n\t\t\tendDate = year + \"-06-30\";\r\n\t\t} else if (quarter.equals(\"July - September\")) {\r\n\t\t\tstartDate = year + \"-07-01\";\r\n\t\t\tendDate = year + \"-09-30\";\r\n\t\t} else {\r\n\t\t\tstartDate = year + \"-10-01\";\r\n\t\t\tendDate = year + \"-12-31\";\r\n\t\t}\r\n\t\tdate.add(startDate);\r\n\t\tdate.add(endDate);\r\n\t\treturn date;\r\n\t}", "public int getQULNO() {\n return qulno;\n }", "int getRatioQuantity();", "@Test\n public void reduceNumber() throws Exception {\n Date date = new Date();\n int updateCount = seckillDao.reduceNumber(1000,date);\n System.out.println(updateCount);\n }", "public static int diasQADescanso(LocalDate start, LocalDate end) {\r\n List<DayOfWeek> ignore = new ArrayList<>();\r\n ignore.add(DayOfWeek.SATURDAY);\r\n ignore.add(DayOfWeek.SUNDAY);\r\n int r = 0;\r\n while (end.isAfter(start) || end.equals(start)) {\r\n if (ignore.contains(start.getDayOfWeek())) {\r\n r++;\r\n }\r\n // TODO faltan los asueto\r\n start = start.plusDays(1);\r\n }\r\n return r;\r\n }", "public double quaterlyHealthInsurance(){\n return (this.healthInsurancePerAnnum*4)/12;\n }", "@Test\n public void floorToQuarterHour() throws Exception {\n DateTime dt0 = new DateTime(2009,6,24,23,29,30,789,DateTimeZone.UTC);\n\n Assert.assertNull(DateTimeUtil.floorToQuarterHour(null));\n \n // floor to nearest half hour\n DateTime dt1 = DateTimeUtil.floorToQuarterHour(dt0);\n\n Assert.assertEquals(2009, dt1.getYear());\n Assert.assertEquals(6, dt1.getMonthOfYear());\n Assert.assertEquals(24, dt1.getDayOfMonth());\n Assert.assertEquals(23, dt1.getHourOfDay());\n Assert.assertEquals(15, dt1.getMinuteOfHour());\n Assert.assertEquals(0, dt1.getSecondOfMinute());\n Assert.assertEquals(0, dt1.getMillisOfSecond());\n Assert.assertEquals(DateTimeZone.UTC, dt1.getZone());\n\n DateTime dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,0,0,0));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,1,23,456));\n Assert.assertEquals(new DateTime(2009,6,24,10,0,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,30,12,56));\n Assert.assertEquals(new DateTime(2009,6,24,10,30,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,59,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,55,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n\n dt3 = DateTimeUtil.floorToQuarterHour(new DateTime(2009,6,24,10,46,59,999));\n Assert.assertEquals(new DateTime(2009,6,24,10,45,0,0), dt3);\n }", "public static DateTime floorToQuarterHour(DateTime value) {\n return floorToMinutePeriod(value, 15);\n }", "@Override\n\tpublic int datecount() throws Exception {\n\t\treturn dao.datecount();\n\t}", "private static int getPreiousNumInstance(final int compId, final Date date, final int envId) {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTime(date);\n\t\tcal.add(Calendar.DATE, -1);\n\t\t\n\t\tSession session = HibernateConfig.getSessionFactory().getCurrentSession();\n\t\tTransaction txn = session.beginTransaction();\n\t\tCriteria ctrStsCrit = session.createCriteria(ContainerStatsEntity.class, \"cs\");\n\t\tctrStsCrit.add(Restrictions.eq(\"cs.component.componentId\",compId));\n\t\tctrStsCrit.add(Restrictions.eq(\"cs.environment.environmentId\",envId));\n\t\tctrStsCrit.add(Restrictions.eq(\"cs.statsDate\", new java.sql.Date(cal.getTimeInMillis()) ));\n\t\tctrStsCrit.setMaxResults(1);\n\t\tContainerStatsEntity conSts =(ContainerStatsEntity) ctrStsCrit.uniqueResult();\n\t\tint totalContainer = 0;\n\t\tif(conSts != null){\n\t\t\ttotalContainer = conSts.getTotalContainer();\n\t\t}\n\t\ttxn.commit();\n\t\treturn totalContainer;\n\t\t\t\t\t\n\t}", "@Override\n\tpublic int getNoofProduct(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT COUNT(h.product_product_id) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplyStartDate,supplyLastDate);\n\t\treturn total;\n\t}", "public java.math.BigDecimal getQtyPeriod4() \r\n {\r\n return get_ValueAsBigDecimal(\"QtyPeriod4\");\r\n \r\n }", "public int periodIndex (\n\t\tfinal int iDate)\n\t\tthrows java.lang.Exception\n\t{\n\t\tint i = 0;\n\n\t\tfor (org.drip.analytics.cashflow.CompositePeriod period : periods()) {\n\t\t\tif (period.contains (iDate)) return i;\n\n\t\t\t++i;\n\t\t}\n\n\t\tthrow new java.lang.Exception (\"BondStream::periodIndex => Input date not in the period set range!\");\n\t}", "public static Integer getYear(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy\"); //EX 2016,02\r\n return new Integer(df.format(date));\r\n }", "public static int getExpiryYear(final Tenor futureTenor, final int nthFuture, final LocalDate date) {\n ArgumentChecker.notNull(futureTenor, \"futureTenor\");\n ArgumentChecker.notNull(date, \"date\");\n ArgumentChecker.isTrue(nthFuture > 0, \"nthFuture must be greater than 0.\");\n final LocalDate expiry;\n if (futureTenor.equals(Tenor.THREE_MONTHS)) {\n expiry = FutureOptionExpiries.IR.getQuarterlyExpiry(nthFuture, date);\n } else if (futureTenor.equals(Tenor.ONE_MONTH)) {\n expiry = FutureOptionExpiries.IR.getMonthlyExpiry(nthFuture, date);\n } else {\n throw new Quandl4OpenGammaRuntimeException(\"Cannot handle futures with tenor \" + futureTenor);\n }\n return expiry.getYear();\n }", "public java.lang.Integer getQ() {\n return q;\n }", "private void incrementeDate() {\n dateSimulation++;\n }", "public static int countDaysLeft(String currentDate, String dueDate){\n // Part 1. In the case where the current date has passed the due date, the dueDateHasPassed method is called with the currentDate and dueDate arguments \n // as inputs. \n if(dueDateHasPassed(currentDate, dueDate)){\n return 0;\n }\n // Part 2. In the case where the current date and the due date share the same month and year, the remaining days is calculated.\n else if((getMonth(currentDate) == getMonth(dueDate)) && (getYear(currentDate) == getYear(dueDate))){\n int numofDays = getDay(dueDate) - getDay(currentDate);\n return numofDays;\n }\n // Part 3. In the case where the current date and the due date share only the same year, the remaining days is calculated. \n else if(getYear(currentDate) == getYear(dueDate)){\n int i = getMonth(currentDate);\n int j = getMonth(dueDate);\n int totalDaysFromMonths = 0;\n while(i<j){\n totalDaysFromMonths += getDaysInAMonth(i,getYear(currentDate));\n i++;\n }\n int totalDaysOfSameYear = totalDaysFromMonths - getDay(currentDate) + getDay(dueDate);\n return totalDaysOfSameYear;\n }\n // Part 4. All other cases will result in the due date being in the futre of a different year, that of the current date. The remaining days will be \n // calculated. \n else{\n int b = getYear(dueDate);\n int a = getYear(currentDate);\n int totalDaysFromYears = 0;\n while(a<b){\n if(isLeapYear(a)){\n totalDaysFromYears += 366;\n }\n else{ \n totalDaysFromYears += 365;\n }\n a++;\n }\n int i = 1;\n int totalDaysFromMonthsOfcurrentDateYear = 0;\n while(i<getMonth(currentDate)){\n totalDaysFromMonthsOfcurrentDateYear += getDaysInAMonth(i, getYear(currentDate));\n i++;\n }\n int j = 1;\n int totalDaysFromMonthsOfdueDateYear = 0;\n while(j<getMonth(dueDate)){\n totalDaysFromMonthsOfdueDateYear +=getDaysInAMonth(j, getYear(dueDate));\n j++;\n }\n int totalDays = totalDaysFromYears - totalDaysFromMonthsOfcurrentDateYear - getDay(currentDate) + totalDaysFromMonthsOfdueDateYear + getDay(dueDate);\n return totalDays;\n }\n }", "@Override\n\tpublic Integer getNoofQuantity(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT SUM(h.quantity) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tInteger total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplyStartDate, supplyLastDate);\n\t\treturn total;\n\t}", "public static int getDuration(String prj_id, String sub_id, String date) {\n SC sc = null;\n try {\n sc = new SC(new ConnectionEx(Const.ARE));\n String sql = \"SELECT COUNT(*) AS d FROM data WHERE project_id = \" + prj_id + \" AND subject_id = \" + sub_id\n + \" AND ts LIKE '\" + date + \"%'\";\n logger.debug(sql);\n sc.execute(sql);\n sc.next();\n return sc.getInt(\"d\");\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n return 0;\n } finally {\n try {\n sc.closeAll();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n }\n }\n }", "BigInteger getPeriod();", "public java.lang.Integer getQ() {\n return q;\n }", "public int daysOverdue(int today);", "public int getNrQtdPrestacao() {\n return nrQtdPrestacao;\n }", "String getPortfolioTotalValue(String portfolioName, Date date) throws IllegalArgumentException;", "public int getNumberOfDates() {\n return dateList.size();\n }", "int getNumberOfQuestions();", "@Test\n public void nbDaysBetweenSameYear(){\n Date date = new Date(1,Month.january,1970);\n assertEquals(date.nbDaysBetween(new Date(31,Month.december,1970)),364);\n }", "@Override\n\tpublic String getFinacialYear(final String vDate, final Connection connection)\n\t{\n\t\tString finYear = \"null\";\n\t\tfinal String sql = \"select FINANCIALYEAR from FINANCIALYEAR where :vDate between startingdate and endingdate\";\n\t\ttry {\n\t\t\tQuery pst = persistenceService.getSession().createSQLQuery(sql);\n\t\t\tpst.setParameter(\"vDate\", vDate);\n\t\t\tList<Object[]> rset = pst.list();\n\t\t\tfor (final Object[] element : rset) {\n\t\t\t\tfinYear = element[0].toString();\n\t\t\t\tif (LOGGER.isDebugEnabled())\n\t\t\t\t\tLOGGER.debug(\"finYear id>>>>>>>\" + finYear);\n\t\t\t}\n\n\t\t} catch (final HibernateException e)\n\t\t{\n\t\t\tLOGGER.error(\"Exp=\" + e.getMessage());\n\t\t\tthrow new HibernateException(e.toString());\n\t\t}\n\t\treturn finYear;\n\t}", "public int extract(LocalDate date) {\n return extractionFunction.applyAsInt(date);\n }", "Integer getTenYear();", "public int diasFiscales(LocalDate inicio, LocalDate fin) {\n int dias = ((int)ChronoUnit.MONTHS.between(inicio, fin)) * 30;\r\n if (this.isQuincenaPar()) {\r\n // 15 dias de la quincena none\r\n dias+=15;\r\n }\r\n // dias cronologicos de la actual\r\n int diasQuincena = this.diasQACronologicos(this.getFechaInicio(), fin);\r\n if (diasQuincena >= 15) {\r\n if (quincena == 4) {\r\n diasQuincena = isLeapYear() ? 14 : 13;\r\n } else {\r\n diasQuincena = 15;\r\n }\r\n }\r\n dias+=diasQuincena;\r\n return dias;\r\n }", "private int computeChineseFields() {\n if (gregorianDate.getYear()<1901 || gregorianDate.getYear()>2100) return 1;\n int startYear = baseYear;\n int startMonth = baseMonth;\n int startDate = baseDate;\n int chineseYear = baseChineseYear;\n int chineseMonth = baseChineseMonth;\n int chineseDate = baseChineseDate;\n // Switching to the second base to reduce the calculation process\n // Second base date: 01-Jan-2000, 4697/11/25 in Chinese calendar\n if (gregorianDate.getYear() >= 2000) {\n startYear = baseYear + 99;\n startMonth = 1;\n startDate = 1;\n chineseYear = baseChineseYear + 99;\n chineseMonth = 11;\n chineseDate = 25;\n }\n // Calculating the number of days\n // between the start date and the current date\n // The following algorithm only works\n // for startMonth = 1 and startDate = 1\n int daysDiff = 0;\n for (int i=startYear; i<gregorianDate.getYear(); i++) {\n daysDiff += 365;\n if (isGregorianLeapYear(i)) daysDiff += 1; // leap year\n }\n for (int i=startMonth; i<gregorianDate.getMonthValue(); i++) {\n daysDiff += daysInGregorianMonth(gregorianDate.getYear(),i);\n }\n daysDiff += gregorianDate.getDayOfMonth() - startDate;\n\n // Adding that number of days to the Chinese date\n // Then bring Chinese date into the correct range.\n // one Chinese month at a time\n chineseDate += daysDiff;\n int lastDate = daysInChineseMonth(chineseYear, chineseMonth);\n int nextMonth = nextChineseMonth(chineseYear, chineseMonth);\n while (chineseDate>lastDate) {\n if (Math.abs(nextMonth)<Math.abs(chineseMonth)) chineseYear++;\n chineseMonth = nextMonth;\n chineseDate -= lastDate;\n lastDate = daysInChineseMonth(chineseYear, chineseMonth);\n nextMonth = nextChineseMonth(chineseYear, chineseMonth);\n }\n\n lunarDate = LocalDate.of(chineseYear, chineseMonth, chineseDate);\n return 0;\n }", "public Date getCcrq() {\n return ccrq;\n }", "int getNumberOfServeyQuestions(Survey survey);", "public int countQS(int i) {\r\n\r\n\t\tcompQS++;\r\n\r\n\t\treturn i;\r\n\r\n\t}", "public float getRoll(float[] quat) {\n float[] newquat = normalizeQuat(quat);\n float degreeReturn = (float) Math.toDegrees((double) getRollRad(newquat)); // +180 to return between 0 and 360\n\n //-90 to 180\n if (-90f <= degreeReturn && degreeReturn <= 180f) {\n return degreeReturn + 90f;\n } else {\n //-180 to -90\n return degreeReturn + 180 + 270;\n }\n }", "public IntegerDt getNumberOfSeriesElement() { \n\t\tif (myNumberOfSeries == null) {\n\t\t\tmyNumberOfSeries = new IntegerDt();\n\t\t}\n\t\treturn myNumberOfSeries;\n\t}", "@Test\n\tpublic void testDate4() {\n\t\ttry {\n\t\t\tfinal Date date = ParadoxDate.getDateFromParadoxDate(36161);\n\t\t\tfinal Calendar calendar = Calendar.getInstance();\n\t\t\tcalendar.setTime(date);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.DATE) == 2);\n\t\t\t// month is 0 indexed, so Jan is 0\n\t\t\tAssert.assertTrue(calendar.get(Calendar.MONTH) == 0);\n\t\t\tAssert.assertTrue(calendar.get(Calendar.YEAR) == 100);\n\t\t} catch (final Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tAssert.fail();\n\t\t}\n\t}", "@Override\n\tpublic int getNoofSupplier(String supplyStartDate, String supplyLastDate) {\n\t\tString sql=\"SELECT COUNT(h.supplier_supplier_id) FROM supplier s INNER JOIN supplier_product h on s.supplier_id=h.supplier_supplier_id WHERE buy_date>=?::Date and buy_date<=?::Date\";\n\t\tint total=this.getJdbcTemplate().queryForObject(sql, Integer.class, supplyStartDate, supplyLastDate);\n\t\treturn total;\n\t}", "public int getNumberOfDays()\r\n {\r\n int mn = theMonthNumber;\r\n if (mn == 1 || mn == 3 || mn == 5 || mn == 7 || mn == 8 || mn == 10 || mn == 12)\r\n {return 31;}\r\n if (mn == 4 || mn == 6 || mn == 9 || mn == 11)\r\n {return 30;}\r\n else\r\n {return 28;}\r\n }", "int getNumberDays();", "@Override\r\n\tpublic int getCount(Date dateStart, Date dateEnd) {\n\t\tString hql = \"select sum(cc.count) from cinema_condition cc where cc.date >= ? and cc.date <= ?\";\r\n\t\tQuery query = this.getCurrentSession().createQuery(hql);\r\n\t\tquery.setParameter(0, dateStart);\r\n\t\tquery.setParameter(1, dateEnd);\r\n\t\tif(query.uniqueResult()==null){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint result = ((Long) query.uniqueResult()).intValue();\r\n\t\treturn result;\r\n\t}", "@Test\n public void nbDaysAfterTestOk(){\n Date date = new Date(1,Month.january,1970);\n Date dateAfter = date.nbDaysAfter(10);\n assertEquals(dateAfter,new Date(11,Month.january,1970));\n assertEquals(date.nbDaysAfter(365),new Date(1,Month.january,1971));\n assertEquals(date.nbDaysAfter(31),new Date(1,Month.february,1970));\n }", "public static int diasParaFecha(Date fechafin) {\n try {\n System.out.println(\"Fecha = \" + fechafin + \" / \");\n GregorianCalendar fin = new GregorianCalendar();\n fin.setTime(fechafin);\n System.out.println(\"fin=\" + CalendarToString(fin, \"dd/MM/yyyy\"));\n GregorianCalendar hoy = new GregorianCalendar();\n System.out.println(\"hoy=\" + CalendarToString(hoy, \"dd/MM/yyyy\"));\n\n if (fin.get(Calendar.YEAR) == hoy.get(Calendar.YEAR)) {\n System.out.println(\"Valor de Resta simple: \"\n + String.valueOf(fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR)));\n return fin.get(Calendar.DAY_OF_YEAR)\n - hoy.get(Calendar.DAY_OF_YEAR);\n } else {\n int diasAnyo = hoy.isLeapYear(hoy.get(Calendar.YEAR)) ? 366\n : 365;\n int rangoAnyos = fin.get(Calendar.YEAR)\n - hoy.get(Calendar.YEAR);\n int rango = (rangoAnyos * diasAnyo)\n + (fin.get(Calendar.DAY_OF_YEAR) - hoy\n .get(Calendar.DAY_OF_YEAR));\n System.out.println(\"dias restantes: \" + rango);\n return rango;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }", "public static long howManyYearsFromNow(LocalDateTime date){\n LocalDateTime now = LocalDateTime.now();\n return now.until(date, ChronoUnit.YEARS);\n }", "public int getCamps()\n\t{\n\t\tint camps=0;\n\t\tString query=\"select count(*) from camps where month(date)=month(curdate())\";\n\t\ttry\n\t\t{\n\t\t\tConnection con=DBInfo.getConn();\t\n\t\t\tPreparedStatement ps=con.prepareStatement(query);\n\t\t\tResultSet res=ps.executeQuery();\n\t\t\twhile(res.next())\n\t\t\t{\n\t\t\t\tcamps=res.getInt(1);\n\t\t\t}\n\t\t\tcon.close();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn camps;\n\t}", "Integer getNumQuestions();", "public static LocalDate getDrMartingLutherKingJrDay() {\n\t\treturn BusinessDateUtility.getNthWeekdayInMonthOfYear(3, DayOfWeek.MONDAY.getValue(), Month.JANUARY.getValue(),\n\t\t\t\tYear.now().getValue());\n\t}", "public int getQuizNumber() {\n\t\treturn quizNumber;\n\t}", "int getQuantite();", "int getQuantite();", "public int getIndex(Date theDate) {\n\t\tIterator<Entry<Date, Integer>> it = this.wordTrend.getTrends().entrySet().iterator();\n\t\tint n = 0;\n\n\t\twhile (it.hasNext()) {\n\t\t\tDate theCurrentDate = it.next().getKey();\n\t\t\tif (theDate.compareTo(theCurrentDate) == 0) {\n\t\t\t\treturn n;\n\t\t\t}\n\t\t\tn++;\n\t\t}\n\t\treturn -1;\n\t}", "public static void numOfWrappersAndCoins(BigDecimal penny, BigDecimal nickel, BigDecimal dime, BigDecimal quarter){\n // Find the approximate number of each individual coin type\n BigDecimal numOfPennies = penny.divide(new BigDecimal(\"2.50\"), RoundingMode.FLOOR);\n BigDecimal numOfNickels = nickel.divide(new BigDecimal(\"5\"), RoundingMode.FLOOR);\n BigDecimal numOfDimes = dime.divide(new BigDecimal(\"2.268\"), RoundingMode.FLOOR);\n BigDecimal numOfQuarters = quarter.divide(new BigDecimal(\"5.670\"), RoundingMode.FLOOR);\n\n /* Find the number of wrappers needed to hold each coin type, num of wrappers is always rounded up, even if the\n last wrapper would be left with some empty space.\n */\n BigDecimal numOfPennyWrappers = numOfPennies.divide(new BigDecimal(\"50\"), 0, RoundingMode.CEILING);\n BigDecimal numOfNickelWrappers = numOfNickels.divide(new BigDecimal(\"40\"),0, RoundingMode.CEILING);\n BigDecimal numOfDimeWrappers = numOfDimes.divide(new BigDecimal(\"50\"), 0, RoundingMode.CEILING);\n BigDecimal numOfQuarterWrappers = numOfQuarters.divide(new BigDecimal(\"40\"), 0, RoundingMode.CEILING);\n\n // Find total estimated value of each coin type\n BigDecimal penniesTotalValue = numOfPennies.multiply(new BigDecimal(\"0.01\"), new MathContext(3));\n BigDecimal nickelsTotalValue = numOfNickels.multiply(new BigDecimal(\"0.05\"), new MathContext(3));\n BigDecimal dimesTotalValue = numOfDimes.multiply(new BigDecimal(\"0.10\"), new MathContext(3));\n BigDecimal quartersTotalValue = numOfQuarters.multiply(new BigDecimal(\"0.25\"), new MathContext(3));\n\n System.out.println(\"Result: \\n\");\n System.out.println(\"Number of Pennies: \" + numOfPennies.intValue() + \"\\nWrappers: \" + numOfPennyWrappers +\n \"\\nTotal estimated value: $\" + penniesTotalValue + \"\\n\");\n System.out.println(\"Number of Nickels: \" + numOfNickels.intValue() + \"\\nWrappers: \" + numOfNickelWrappers +\n \"\\nTotal estimated value: $\" + nickelsTotalValue + \"\\n\");\n System.out.println(\"Number of Dimes: \" + numOfDimes.intValue() + \"\\nWrappers: \" + numOfDimeWrappers +\n \"\\nTotal estimated value: $\" + dimesTotalValue + \"\\n\");\n System.out.println(\"Number of Quarters: \" + numOfQuarters.intValue() + \"\\nWrappers: \" + numOfQuarterWrappers +\n \"\\nTotal estimated value: $\" + quartersTotalValue);\n }", "public String getDate(int x)\n {\n return dates[x];\n }", "protected Date previousStandardDate(Date date, DateTickUnit unit) {\n/* */ Date d3;\n/* */ long millis;\n/* */ Date standardDate;\n/* */ Month month;\n/* */ Date d2, d1, d0, dd, mm;\n/* */ int years, years, years, years, years, years, months, months, months, months, months, days, days, days, days, hours, hours, hours, minutes, minutes, seconds, milliseconds;\n/* 920 */ Calendar calendar = Calendar.getInstance(this.timeZone, this.locale);\n/* 921 */ calendar.setTime(date);\n/* 922 */ int count = unit.getCount();\n/* 923 */ int current = calendar.get(unit.getCalendarField());\n/* 924 */ int value = count * current / count;\n/* */ \n/* 926 */ switch (unit.getUnit()) {\n/* */ \n/* */ case 6:\n/* 929 */ years = calendar.get(1);\n/* 930 */ months = calendar.get(2);\n/* 931 */ days = calendar.get(5);\n/* 932 */ hours = calendar.get(11);\n/* 933 */ minutes = calendar.get(12);\n/* 934 */ seconds = calendar.get(13);\n/* 935 */ calendar.set(years, months, days, hours, minutes, seconds);\n/* 936 */ calendar.set(14, value);\n/* 937 */ mm = calendar.getTime();\n/* 938 */ if (mm.getTime() >= date.getTime()) {\n/* 939 */ calendar.set(14, value - 1);\n/* 940 */ mm = calendar.getTime();\n/* */ } \n/* 942 */ return mm;\n/* */ \n/* */ case 5:\n/* 945 */ years = calendar.get(1);\n/* 946 */ months = calendar.get(2);\n/* 947 */ days = calendar.get(5);\n/* 948 */ hours = calendar.get(11);\n/* 949 */ minutes = calendar.get(12);\n/* 950 */ if (this.tickMarkPosition == DateTickMarkPosition.START) {\n/* 951 */ milliseconds = 0;\n/* */ }\n/* 953 */ else if (this.tickMarkPosition == DateTickMarkPosition.MIDDLE) {\n/* 954 */ milliseconds = 500;\n/* */ } else {\n/* */ \n/* 957 */ milliseconds = 999;\n/* */ } \n/* 959 */ calendar.set(14, milliseconds);\n/* 960 */ calendar.set(years, months, days, hours, minutes, value);\n/* 961 */ dd = calendar.getTime();\n/* 962 */ if (dd.getTime() >= date.getTime()) {\n/* 963 */ calendar.set(13, value - 1);\n/* 964 */ dd = calendar.getTime();\n/* */ } \n/* 966 */ return dd;\n/* */ \n/* */ case 4:\n/* 969 */ years = calendar.get(1);\n/* 970 */ months = calendar.get(2);\n/* 971 */ days = calendar.get(5);\n/* 972 */ hours = calendar.get(11);\n/* 973 */ if (this.tickMarkPosition == DateTickMarkPosition.START) {\n/* 974 */ int seconds = 0;\n/* */ }\n/* 976 */ else if (this.tickMarkPosition == DateTickMarkPosition.MIDDLE) {\n/* 977 */ int seconds = 30;\n/* */ } else {\n/* */ int seconds;\n/* 980 */ seconds = 59;\n/* */ } \n/* 982 */ calendar.clear(14);\n/* 983 */ calendar.set(years, months, days, hours, value, seconds);\n/* 984 */ d0 = calendar.getTime();\n/* 985 */ if (d0.getTime() >= date.getTime()) {\n/* 986 */ calendar.set(12, value - 1);\n/* 987 */ d0 = calendar.getTime();\n/* */ } \n/* 989 */ return d0;\n/* */ \n/* */ case 3:\n/* 992 */ years = calendar.get(1);\n/* 993 */ months = calendar.get(2);\n/* 994 */ days = calendar.get(5);\n/* 995 */ if (this.tickMarkPosition == DateTickMarkPosition.START) {\n/* 996 */ int minutes = 0;\n/* 997 */ int seconds = 0;\n/* */ }\n/* 999 */ else if (this.tickMarkPosition == DateTickMarkPosition.MIDDLE) {\n/* 1000 */ int minutes = 30;\n/* 1001 */ int seconds = 0;\n/* */ } else {\n/* */ \n/* 1004 */ minutes = 59;\n/* 1005 */ seconds = 59;\n/* */ } \n/* 1007 */ calendar.clear(14);\n/* 1008 */ calendar.set(years, months, days, value, minutes, seconds);\n/* 1009 */ d1 = calendar.getTime();\n/* 1010 */ if (d1.getTime() >= date.getTime()) {\n/* 1011 */ calendar.set(11, value - 1);\n/* 1012 */ d1 = calendar.getTime();\n/* */ } \n/* 1014 */ return d1;\n/* */ \n/* */ case 2:\n/* 1017 */ years = calendar.get(1);\n/* 1018 */ months = calendar.get(2);\n/* 1019 */ if (this.tickMarkPosition == DateTickMarkPosition.START) {\n/* 1020 */ int hours = 0;\n/* */ }\n/* 1022 */ else if (this.tickMarkPosition == DateTickMarkPosition.MIDDLE) {\n/* 1023 */ int hours = 12;\n/* */ } else {\n/* */ \n/* 1026 */ hours = 23;\n/* */ } \n/* 1028 */ calendar.clear(14);\n/* 1029 */ calendar.set(years, months, value, hours, 0, 0);\n/* */ \n/* */ \n/* 1032 */ d2 = calendar.getTime();\n/* 1033 */ if (d2.getTime() >= date.getTime()) {\n/* 1034 */ calendar.set(5, value - 1);\n/* 1035 */ d2 = calendar.getTime();\n/* */ } \n/* 1037 */ return d2;\n/* */ \n/* */ case 1:\n/* 1040 */ years = calendar.get(1);\n/* 1041 */ calendar.clear(14);\n/* 1042 */ calendar.set(years, value, 1, 0, 0, 0);\n/* 1043 */ month = new Month(calendar.getTime(), this.timeZone, this.locale);\n/* */ \n/* 1045 */ standardDate = calculateDateForPosition(month, this.tickMarkPosition);\n/* */ \n/* 1047 */ millis = standardDate.getTime();\n/* 1048 */ if (millis >= date.getTime()) {\n/* 1049 */ month = (Month)month.previous();\n/* */ \n/* */ \n/* 1052 */ month.peg(Calendar.getInstance(this.timeZone));\n/* 1053 */ standardDate = calculateDateForPosition(month, this.tickMarkPosition);\n/* */ } \n/* */ \n/* 1056 */ return standardDate;\n/* */ \n/* */ case 0:\n/* 1059 */ if (this.tickMarkPosition == DateTickMarkPosition.START) {\n/* 1060 */ int months = 0;\n/* 1061 */ int days = 1;\n/* */ }\n/* 1063 */ else if (this.tickMarkPosition == DateTickMarkPosition.MIDDLE) {\n/* 1064 */ int months = 6;\n/* 1065 */ int days = 1;\n/* */ } else {\n/* */ \n/* 1068 */ months = 11;\n/* 1069 */ days = 31;\n/* */ } \n/* 1071 */ calendar.clear(14);\n/* 1072 */ calendar.set(value, months, days, 0, 0, 0);\n/* 1073 */ d3 = calendar.getTime();\n/* 1074 */ if (d3.getTime() >= date.getTime()) {\n/* 1075 */ calendar.set(1, value - 1);\n/* 1076 */ d3 = calendar.getTime();\n/* */ } \n/* 1078 */ return d3;\n/* */ } \n/* 1080 */ return null;\n/* */ }", "private int check15Days(DateInfo date) {\r\n\t\t// creates cd calender stores date stored in CD\r\n\t\tint totalCD, cdMonth, cdDay, cdYear;\r\n\t\tDateInfo maturityDate = new DateInfo(super.getDate());\r\n\t\tint totalTrans, tMonth, tDay, tYear;\r\n\r\n\t\tint mature= maturityDate.getMatureLength();\r\n\t\tCalendar cD = Calendar.getInstance();\r\n\t\tcD.clear();\r\n\t\tcD.set(Calendar.MONTH, maturityDate.getMonth());\r\n\t\tcD.set(Calendar.YEAR, maturityDate.getYear());\r\n\t\tcD.set(Calendar.DATE, maturityDate.getDay());\r\n\r\n\t\t// adds the term to compare the dates\r\n\r\n\t\tcD.add(Calendar.MONTH, +mature);\r\n\t\tcdMonth = 30 * cD.get(Calendar.MONTH);\r\n\t\tcdDay = cD.get(Calendar.DATE);\r\n\t\tcdYear = 365 * cD.get(Calendar.YEAR);\r\n\t\ttotalCD = cdMonth + cdDay + cdYear;\r\n\r\n\t\ttMonth = 30 * date.getMonth();\r\n\t\ttDay = date.getDay();\r\n\t\ttYear = 365 * date.getYear();\r\n\t\ttotalTrans = tMonth + tDay + tYear;\r\n\r\n\t\treturn (totalTrans - totalCD);\r\n\r\n\t}", "int getSeasonShareCount();", "double getPeriod();", "public static int getSubsequentFridayCountByDate(Date val) {\n\t\tint NumberOfFriday=0;\n\t\tDate StartDate=val;\n\t\tDate EndDate=Utilities.getEndDateByDate(val);\n\t\t \n\t\tDate CurrentDate = StartDate;\n\t\t \n\t\twhile(true){\n\t\t\t if(Utilities.getDayOfWeekByDate(CurrentDate)==6){ //if it is Friday\n\t\t\t\t NumberOfFriday++;\n\t\t\t }\n\t\t\t \n\t\t\t if(DateUtils.isSameDay(CurrentDate, EndDate)){\n\t\t\t\t break;\n\t\t\t }\n\t\n\t\t\t CurrentDate = Utilities.getDateByDays(CurrentDate, 1);\n\t\t}\n\t \n\t\t return NumberOfFriday;\n\t}", "private static double getQ( int k, int df )\n {\n final double[][] TAB = {\n { 1, 17.969, 26.976, 32.819, 37.082, 40.408, 43.119, 45.397, 47.357, 49.071 },\n { 2, 6.085, 8.331, 9.798, 10.881, 11.734, 12.435, 13.027, 13.539, 13.988 },\n { 3, 4.501, 5.910, 6.825, 7.502, 8.037, 8.478, 8.852, 9.177, 9.462 },\n { 4, 3.926, 5.040, 5.757, 6.287, 6.706, 7.053, 7.347, 7.602, 7.826 },\n { 5, 3.635, 4.602, 5.218, 5.673, 6.033, 6.330, 6.582, 6.801, 6.995 },\n { 6, 3.460, 4.339, 4.896, 5.305, 5.628, 5.895, 6.122, 6.319, 6.493 },\n { 7, 3.344, 4.165, 4.681, 5.060, 5.359, 5.606, 5.815, 5.997, 6.158 },\n { 8, 3.261, 4.041, 4.529, 4.886, 5.167, 5.399, 5.596, 5.767, 5.918 },\n { 9, 3.199, 3.948, 4.415, 4.755, 5.024, 5.244, 5.432, 5.595, 5.738 },\n { 10, 3.151, 3.877, 4.327, 4.654, 4.912, 5.124, 5.304, 5.460, 5.598 },\n { 11, 3.113, 3.820, 4.256, 4.574, 4.823, 5.028, 5.202, 5.353, 5.486 },\n { 12, 3.081, 3.773, 4.199, 4.508, 4.750, 4.950, 5.119, 5.265, 5.395 },\n { 13, 3.055, 3.734, 4.151, 4.453, 4.690, 4.884, 5.049, 5.192, 5.318 },\n { 14, 3.033, 3.701, 4.111, 4.407, 4.639, 4.829, 4.990, 5.130, 5.253 },\n { 15, 3.014, 3.673, 4.076, 4.367, 4.595, 4.782, 4.940, 5.077, 5.198 },\n { 16, 2.998, 3.649, 4.046, 4.333, 4.557, 4.741, 4.896, 5.031, 5.150 },\n { 17, 2.984, 3.628, 4.020, 4.303, 4.524, 4.705, 4.858, 4.991, 5.108 },\n { 18, 2.971, 3.609, 3.997, 4.276, 4.494, 4.673, 4.824, 4.955, 5.071 },\n { 19, 2.960, 3.593, 3.977, 4.253, 4.468, 4.645, 4.794, 4.924, 5.037 },\n { 20, 2.950, 3.578, 3.958, 4.232, 4.445, 4.620, 4.768, 4.895, 5.008 },\n { 21, 2.941, 3.565, 3.942, 4.213, 4.424, 4.597, 4.743, 4.870, 4.981 },\n { 22, 2.933, 3.553, 3.927, 4.196, 4.405, 4.577, 4.722, 4.847, 4.957 },\n { 23, 2.926, 3.542, 3.914, 4.180, 4.388, 4.558, 4.702, 4.826, 4.935 },\n { 24, 2.919, 3.532, 3.901, 4.166, 4.373, 4.541, 4.684, 4.807, 4.915 },\n { 25, 2.913, 3.523, 3.890, 4.153, 4.358, 4.526, 4.667, 4.789, 4.897 },\n { 26, 2.907, 3.514, 3.880, 4.141, 4.345, 4.511, 4.652, 4.773, 4.880 },\n { 27, 2.902, 3.506, 3.870, 4.130, 4.333, 4.498, 4.638, 4.758, 4.864 },\n { 28, 2.897, 3.499, 3.861, 4.120, 4.322, 4.486, 4.625, 4.745, 4.850 },\n { 29, 2.892, 3.493, 3.853, 4.111, 4.311, 4.475, 4.613, 4.732, 4.837 },\n { 30, 2.888, 3.486, 3.845, 4.102, 4.301, 4.464, 4.601, 4.720, 4.824 },\n { 31, 2.884, 3.481, 3.838, 4.094, 4.292, 4.454, 4.591, 4.709, 4.812 },\n { 32, 2.881, 3.475, 3.832, 4.086, 4.284, 4.445, 4.581, 4.698, 4.802 },\n { 33, 2.877, 3.470, 3.825, 4.079, 4.276, 4.436, 4.572, 4.689, 4.791 },\n { 34, 2.874, 3.465, 3.820, 4.072, 4.268, 4.428, 4.563, 4.680, 4.782 },\n { 35, 2.871, 3.461, 3.814, 4.066, 4.261, 4.421, 4.555, 4.671, 4.773 },\n { 36, 2.868, 3.457, 3.809, 4.060, 4.255, 4.414, 4.547, 4.663, 4.764 },\n { 37, 2.865, 3.453, 3.804, 4.054, 4.249, 4.407, 4.540, 4.655, 4.756 },\n { 38, 2.863, 3.449, 3.799, 4.049, 4.243, 4.400, 4.533, 4.648, 4.749 },\n { 39, 2.861, 3.445, 3.795, 4.044, 4.237, 4.394, 4.527, 4.641, 4.741 },\n { 40, 2.858, 3.442, 3.791, 4.039, 4.232, 4.388, 4.521, 4.634, 4.735 },\n { 48, 2.843, 3.420, 3.764, 4.008, 4.197, 4.351, 4.481, 4.592, 4.690 },\n { 60, 2.829, 3.399, 3.737, 3.977, 4.163, 4.314, 4.441, 4.550, 4.646 },\n { 80, 2.814, 3.377, 3.711, 3.947, 4.129, 4.277, 4.402, 4.509, 4.603 },\n { 120, 2.800, 3.356, 3.685, 3.917, 4.096, 4.241, 4.363, 4.468, 4.560 },\n { 240, 2.786, 3.335, 3.659, 3.887, 4.063, 4.205, 4.324, 4.427, 4.517 },\n { 999, 2.772, 3.314, 3.633, 3.858, 4.030, 4.170, 4.286, 4.387, 4.474 }\n };\n\n if ( k < 2 || k > 10 )\n {\n return -1.0; // not supported\n }\n\n int j = k - 1; // index for correct column (e.g., k = 3 is column 2)\n\n // find pertinent row in table\n int i = 0;\n while ( i < TAB.length && df > TAB[i][0] )\n {\n ++i;\n }\n\n // don't allow i to go past end of table\n if ( i == TAB.length )\n {\n --i;\n }\n\n return TAB[i][j];\n }", "private boolean isJulyFourteenth(final Calendar date) {\n return JULY_14TH_DAY == date.get(Calendar.DAY_OF_MONTH)\n && Calendar.JULY == date.get(Calendar.MONTH);\n }", "public void setQ(int q) {\n/* 590 */ getCOSObject().setInt(COSName.Q, q);\n/* */ }", "public void setQ(int q) {\n this.q = q;\n }" ]
[ "0.69293314", "0.63481504", "0.62872094", "0.6004151", "0.5966898", "0.5927141", "0.56040406", "0.552104", "0.5356046", "0.5310299", "0.52290046", "0.515819", "0.50744337", "0.50650126", "0.50018466", "0.49893132", "0.49590367", "0.4953408", "0.49524376", "0.49143043", "0.4883737", "0.48759738", "0.48649493", "0.48138556", "0.47653332", "0.4702425", "0.4694137", "0.46882728", "0.46864086", "0.4685161", "0.46499968", "0.46311522", "0.46095952", "0.45898262", "0.4581308", "0.45693532", "0.45668167", "0.45481572", "0.4545613", "0.45216262", "0.45183906", "0.45128754", "0.45020068", "0.45012984", "0.44956267", "0.44928947", "0.44907582", "0.44891292", "0.44796404", "0.4476626", "0.44729042", "0.44600263", "0.44591027", "0.44524688", "0.4447951", "0.4443575", "0.4432375", "0.4428545", "0.44148886", "0.4414248", "0.44114682", "0.43927643", "0.43893716", "0.4379843", "0.43783906", "0.43737745", "0.43690017", "0.4364729", "0.43626887", "0.43569252", "0.43563464", "0.43559676", "0.43554983", "0.43424457", "0.4341907", "0.4322529", "0.43218422", "0.43103144", "0.4305489", "0.430352", "0.43034598", "0.4303064", "0.42996055", "0.42928296", "0.42796576", "0.4277889", "0.4266464", "0.4266464", "0.42647904", "0.42612162", "0.42605054", "0.42541623", "0.42530212", "0.42498696", "0.4243656", "0.42398354", "0.42358917", "0.42335367", "0.42294925", "0.4214696" ]
0.81861544
0
Returns the numerical week of the year given a date. Minimal days of week is set to 4 to comply with ISO 8601
public static int getWeekOfTheYear(final LocalDate dateOfYear) { return dateOfYear.get(WeekFields.of(Locale.getDefault()).weekOfWeekBasedYear()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getWeekOfYear() {\r\n return this.weekOfYear;\r\n }", "public int getWeekOfYear()\r\n\t{\r\n\t\tint weekdayJan1 = Utils.getFirstDayOfWeekForYear(this.year);\r\n\t\tint[] offsetsToWeek0 = { 6, 7, 8, 9, 10, 4, 5 };\r\n\t\tint offsetToWeek0 = offsetsToWeek0[weekdayJan1];\r\n\t\tint thisDoy = this.getDayOfYear();\r\n\t\tint daysSinceStartOfWeek0 = thisDoy + offsetToWeek0;\r\n\t\tint weekNum = daysSinceStartOfWeek0 / 7;\r\n\t\treturn weekNum;\r\n\t}", "public static int getCurrentWeekOfYear()\n\t{\n\t\treturn Calendar.getInstance().get(Calendar.WEEK_OF_YEAR);\n\t}", "public final int getWeekNumber()\n {\n if ( ordinal < Jan_01_Leap100RuleYear ) return 0;\n int jan01 = jan01OfYear(yyyy);\n int jan01DayOfWeek = dayOfWeek(jan01); // 0=Sunday 6=Saturday\n int sundayOnOrBeforeJan01Ordinal = jan01 - jan01DayOfWeek;\n return((ordinal - sundayOnOrBeforeJan01Ordinal) / 7) + 1;\n }", "public static int getWeekOfYear(int year, int month, int day)\n\t{\n\t\tCalendar calendar = new GregorianCalendar(year, month - 1, day);\n\t\t\n\t\treturn calendar.get(Calendar.WEEK_OF_YEAR);\n\t}", "int getWeek();", "public WeekYear computeWeekYear(String dateString) throws ParseException {\n Date date = parseString(dateString);\n\t//set the locale.\n Calendar calendar = Calendar.getInstance(Locale.ITALIAN);\n calendar.setTime(date);\n \n int month = calendar.get(Calendar.MONTH);\n int week = calendar.get(Calendar.WEEK_OF_YEAR);\n int year = calendar.get(Calendar.YEAR);\n \n if (month == Calendar.DECEMBER && week == 1) {\n year++;\n } else if (month == Calendar.JANUARY && week == 52) {\n year--;\n }\n return new WeekYear(year,week);\n }", "public int getDayOfWeek()\n\t{\n\t\tint tempYear = year;\n\n\t\tint[] t = { 0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4 };\n\n\t\tif (month < 3)\n\t\t{\n\t\t\ttempYear -= 1;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttempYear -= 0;\n\t\t}\n\n\t\treturn (tempYear + tempYear / 4 - tempYear / 100 + tempYear / 400 + t[month - 1] + day) % 7;\n\t}", "public int getWeekNumber(LocalDate data)\n {\n\n return sem.getWeekNumber(data,startSemester,beginHoliday,endHoliday,endSemester);\n }", "public final int getISOWeekNumber()\n {\n if ( ordinal < Jan_01_Leap100RuleYear ) return 0;\n int jan04Ordinal = jan01OfYear(yyyy) + 3;\n int jan04DayOfWeek = (jan04Ordinal + MondayIsZeroAdjustment - MIN_ORDINAL) % 7; // 0=Monday 6=Sunday\n int week1StartOrdinal = jan04Ordinal - jan04DayOfWeek;\n if ( ordinal < week1StartOrdinal )\n { // we are part of the previous year. Don't worry about year 0.\n jan04Ordinal = jan01OfYear(yyyy-1) + 3;\n jan04DayOfWeek = (jan04Ordinal + MondayIsZeroAdjustment - MIN_ORDINAL) % 7; // 0=Monday 6=Sunday\n week1StartOrdinal = jan04Ordinal - jan04DayOfWeek;\n }\n else if ( mm == 12 )\n { // see if we are part of next year. Don't worry about year 0.\n jan04Ordinal = jan01OfYear(yyyy+1) + 3;\n jan04DayOfWeek = (jan04Ordinal + MondayIsZeroAdjustment - MIN_ORDINAL) % 7; // 0=Monday 6=Sunday\n int week1StartNextOrdinal = jan04Ordinal - jan04DayOfWeek;\n if ( ordinal >= week1StartNextOrdinal ) week1StartOrdinal = week1StartNextOrdinal;\n }\n return((ordinal - week1StartOrdinal) / 7) + 1;\n }", "public final int getISOYear()\n {\n\n final int W = getISOWeekNumber();\n\n if ((W > 50) && (getMonth() == 1)) {\n return (getYear() - 1);\n }\n else if ((W < 10) && (getMonth() == 12)) {\n return (getYear() + 1);\n }\n else {\n return getYear();\n }\n }", "public static int getDayOfWeekByDate(Date date){\n\t\t\n\t\tCalendar c = Calendar.getInstance();\n\t\tc.setTime(date);\n\t\tint DayOfWeek = c.get(Calendar.DAY_OF_WEEK);\n\t\treturn DayOfWeek;\n\t\t\n\t}", "public static int getDayOfWeek(CalendarDate date) {\n\tlong fixedDate = getFixedDate(date.getYear(),\n\t\t\t\t date.getMonth(),\n\t\t\t\t date.getDate());\n\treturn getDayOfWeekFromFixedDate(fixedDate);\n }", "public DateTimeFormatterBuilder appendWeekOfWeekyear(int minDigits) {\r\n return appendDecimal(DateTimeFieldType.weekOfWeekyear(), minDigits, 2);\r\n }", "public static int getDayOfWeekNr(int year, int month, int day) {\n\t\tint sdow = ((int) (swe_julday(year, month, day, 0.0, SE_GREG_CAL) - 5.5)) % 7;\n\t\treturn sdow;\n\t}", "public int convertWeekDay() {\r\n\t\treturn convertWeekDay(this);\r\n\t}", "public static String getWeek(Date date) {\n String Week = \"\";\n Calendar c = Calendar.getInstance();\n c.setTime(date);\n if (c.get(Calendar.DAY_OF_WEEK) == 1) {\n Week += \"星期日\";\n }\n if (c.get(Calendar.DAY_OF_WEEK) == 2) {\n Week += \"星期一\";\n }\n if (c.get(Calendar.DAY_OF_WEEK) == 3) {\n Week += \"星期二\";\n }\n if (c.get(Calendar.DAY_OF_WEEK) == 4) {\n Week += \"星期三\";\n }\n if (c.get(Calendar.DAY_OF_WEEK) == 5) {\n Week += \"星期四\";\n }\n if (c.get(Calendar.DAY_OF_WEEK) == 6) {\n Week += \"星期五\";\n }\n if (c.get(Calendar.DAY_OF_WEEK) == 7) {\n Week += \"星期六\";\n }\n return Week;\n }", "public static Date getStartDateOfWeek(String year, String week) {\n \n \n int y;\n int w;\n if (year != null && year.length() == 4 && year.matches(\"^-?\\\\d+$\") && week != null && week.matches(\"^-?\\\\d+$\")) {\n y = Integer.parseInt(year);\n w = Integer.parseInt(week);\n } else {\n Calendar calendar = Calendar.getInstance(); \n calendar.setFirstDayOfWeek(1);\n calendar.setMinimalDaysInFirstWeek(1);\n\n y = calendar.get(Calendar.YEAR);\n w = calendar.get(Calendar.WEEK_OF_YEAR);\n }\n return getStartDateOfWeek(y, w);\n }", "public static int GetDayOfWeek(int[] dateTime){\n int yr = dateTime[0];\n int mo = dateTime[1];\n int da = dateTime[2];\n int addon = 0; /* number of days that have advanced */\n boolean leap; /* is this year a leap year? */\n yr %= 400;\n if (yr < 0) yr += 400;\n /* is the current year a leap year? */\n if (((((yr % 4) == 0) && ((yr % 100) != 0)) || ((yr % 400) == 0))) {\n leap = true;\n } else leap = false;\n if ((mo < 1) || (mo > 12)) return 0; /* validate the month */\n if (da < 1) return 0; /* and day of month */\n if (leap && (mo == 2)) {\n if (da > (numdays[mo - 1] + 1)) return 0;\n } else if (da > numdays[mo - 1]) return 0;\n addon += yr; /* The day advances by one day every year */\n addon += yr / 4; /* An additional day if it is divisible bay 4 */\n addon -= yr / 100; /* Unless it is divisible by 100 */\n /* However, we should not count that\n extra day if the current year is a leap\n year and we haven't gone past 29th February */\n if (leap && (mo <= 2)) addon--;\n addon += totdays[mo - 1]; /* The day of the week increases by\n the number of days in all the months\n up till now */\n addon += da; /* the day of week advances for each day */\n /* Now as we all know, 2000-01-01 is a Saturday. Using this\n as our reference point, and the knowledge that we want to\n return 0..6 for Sunday..Saturday,\n we find out that we need to compensate by adding 6. */\n addon += 6;\n return (addon % 7); /* the remainder after dividing by 7\n gives the day of week */\n }", "public double getWeeksPerYear()\r\n {\r\n return weeksPerYear;\r\n }", "public static int getSeasonStartWeekOffset(int year){\n Calendar cal = Calendar.getInstance();\n cal.set(Calendar.YEAR, year);\n cal.set(Calendar.MONTH, Calendar.SEPTEMBER);\n cal.set(Calendar.DAY_OF_MONTH, 1);\n switch (cal.get(Calendar.DAY_OF_WEEK)){\n case Calendar.SUNDAY : return 34;\n case Calendar.MONDAY : return 34;\n case Calendar.TUESDAY : return 35;\n case Calendar.WEDNESDAY : return 35;\n case Calendar.THURSDAY : return 35;\n case Calendar.FRIDAY : return 34;\n case Calendar.SATURDAY : return 34;\n default : return 34; \n }\n }", "public static int getISOWeekOfYear(Timestamp ts) {\n return toUTCDateTime(ts).get(WeekFields.ISO.weekOfYear());\n }", "private int getPublishingYear(String date) {\n String[] splitArray = date.split(\"-\");\n\n return Integer.parseInt(splitArray[splitArray.length - 1]);\n }", "public static int getWeekOfYear(Timestamp ts) {\n return toUTCDateTime(ts).get(WeekFields.SUNDAY_START.weekOfYear());\n }", "public int getWeekDay()\n\t{\n\t\tif (m_nType == AT_WEEK_DAY)\n\t\t\treturn ((Integer)m_oData).intValue();\n\t\telse\n\t\t\treturn -1;\n\t}", "public Short getEstWeeksPerYear() {\n return estWeeksPerYear;\n }", "public static int getDayOfWeekNr(int year, int month, int day, boolean calType) {\n\t\tint sdow = ((int) (swe_julday(year, month, day, 0.0, calType) - 5.5)) % 7;\n\t\treturn sdow;\n\t}", "public String calendarweek(Date startDate) {\n String format = getString(\"calendarweek.abbreviation\");\n int week = DateTools.getWeekInYear(startDate, getLocale());\n String result = format.replace(\"{0}\", \"\" + week);\n // old format also works\n result = result.replace(\"{0,date,w}\", \"\" + week);\n return result;\n }", "boolean getWeek4();", "com.czht.face.recognition.Czhtdev.Week getWeekday();", "public int getDay(){\n String[] dateSplit = this.date.split(\"-\");\n calendar.set(Calendar.DAY_OF_MONTH, Integer.valueOf(dateSplit[2]));\n calendar.set(Calendar.MONTH, Integer.valueOf(dateSplit[1])-1);\n calendar.set(Calendar.YEAR, Integer.valueOf(dateSplit[0]));\n return calendar.get(Calendar.DAY_OF_WEEK);\n }", "static C0102a m520d(C0101o oVar) {\n return new C0102a(\"WeekOfWeekBasedYear\", oVar, C0072b.WEEKS, C0073c.f236e, f276i);\n }", "public int getCurrentWeek()\n {\n\n return sem.getCurrentWeek(startSemester,beginHoliday,endHoliday,endSemester);\n }", "public int valoreSettimana() {\n\t\tCalendar cal = Calendar.getInstance();\n\t\tcal.setTimeZone(italia);\n\t\tcal.setTime(new Date());\n\t\treturn cal.get(Calendar.WEEK_OF_YEAR);\n\t}", "public int getDayOfWeek()\r\n\t{\r\n\t\treturn Utils.getDayOfWeek(year, month, day);\r\n\t}", "public static final Function<Date,Date> setWeek(final int value) {\r\n return new Set(Calendar.WEEK_OF_YEAR, value);\r\n }", "public int getDay_Of_Week() \n\t{\n\t\treturn m_calendar.get(Calendar.DAY_OF_WEEK);\n\n\t}", "public int getShiftWeek() {\n WeekFields weekFields = WeekFields.of(Locale.getDefault());\n return start.get(weekFields.weekOfWeekBasedYear());\n }", "public static int convertWeekDay(WeekDay day) {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\tif (day == SUNDAY)\r\n\t\t\treturn (int)Math.pow(2,1);\r\n\t\telse\r\n\t\t\treturn (int)Math.pow(2,values().length - day.ordinal() + 1);\r\n\t}", "private static int getDayNumberNew(LocalDate date) {\n DayOfWeek day = date.getDayOfWeek();\n return day.getValue() % 7;\n }", "public int getDayOfWeekNr() {\n\t\treturn ((int) (this.jd - 5.5)) % 7;\n\t}", "public int convertirSemaine(java.sql.Date dates)\n\t{\n\t\tCalendar cal = Calendar.getInstance();\n\t cal.setTime(dates);\n\t return cal.get(Calendar.WEEK_OF_YEAR);\n\t}", "public static byte getWeek(byte[] edid) {\n // Byte 16 is manufacture week\n return edid[Normal._16];\n }", "public String getWeek() {\r\n return week;\r\n }", "public int getDayOfYear() {\n\n return this.get(DAY_OF_YEAR).intValue();\n\n }", "int calDateWeek(int mC,int yC,int mG,int yG){\n int x = 0,i,countW=0;\n if(yC<=yG){\n for(i = yC; i < yG; i++)\n countW+=52;\n }\n\n countW -= mC;\n countW += mG;\n countW *= 4;\n return (countW);\n }", "public static String getWeekDay(String date) {\n\t\tSimpleDateFormat dateformatddMMyyyy = new SimpleDateFormat(\"dd-MM-yyyy\");\n\t\ttry {\n\t\t\tjava.util.Date dat = dateformatddMMyyyy.parse(date);\n\t\t\tdateformatddMMyyyy.applyPattern(\"EEEE\");\n\t\t\tdate_to_string = dateformatddMMyyyy.format(dat);\n\n\t\t\t// Calendar c = Calendar.getInstance();\n\t\t\t// c.setTime(dat);\n\t\t\t// int dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\n\t\t\t// date_to_string = strDays[dayOfWeek];\n\t\t} catch (ParseException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn date_to_string;\n\n\t}", "public static int calculateDayOfWeek(int day, int month, int year) {\r\n\t\tint y1, x, m, d1;\r\n\t\ty1 = year - (14 - month) / 12;\r\n\t\tx = y1 + (y1 / 4) - (y1 / 100) + (y1 / 400);\r\n\t\tm = month + 12 * ((14 - month) / 12) - 2;\r\n\t\td1 = (day + x + 31 * m / 12) % 7;\r\n\t\treturn d1;\r\n\t}", "public DateTimeFormatterBuilder appendWeekyear(int minDigits, int maxDigits) {\r\n return appendSignedDecimal(DateTimeFieldType.weekyear(), minDigits, maxDigits);\r\n }", "private int getWeekday() {\n Calendar cal = Calendar.getInstance();\n int i = cal.get(Calendar.DAY_OF_WEEK);\n int weekday = i == 1 ? 6 : (i - 2) % 7;\n myApplication.setWeekday(weekday);\n return weekday;\n }", "boolean hasWeek4();", "public int getDayOfYear(){\n\t\treturn dayOfYear;\n\t}", "public final int getISODayOfWeek()\n {\n return isoDayOfWeek(ordinal);\n }", "public int GetDay(){\n\t\treturn this.date.get(Calendar.DAY_OF_WEEK);\n\t}", "private String getYear(Date date) {\n\t\tLocalDate localDate = date.toInstant().atZone(ZoneId.systemDefault()).toLocalDate();\n\n\t\tInteger yearAsInt = localDate.getYear();\n\n\t\treturn String.valueOf(yearAsInt);\n\t}", "public int getNumDayWorkWeek(){\r\n return numDayWorkWeek;\r\n }", "public static WeekDay getWeekDay(Date date) {\r\n\t\t Calendar calendar = Calendar.getInstance();\r\n\t\t calendar.setTime(date);\r\n\t\t return WeekDay.values()[calendar.get(Calendar.DAY_OF_WEEK) - 1];\r\n\t }", "private static int getDaysInYear(final int year) {\n return LocalDate.ofYearDay(year, 1).lengthOfYear();\n }", "protected static final int getISOWeekNumber (int J, int year, int full)\n {\n if (year < full) {\n throw new IllegalArgumentException\n (\"getISOWeekNumber: year < full\");\n }\n\n int d4 = (((J + 31741 - (J % 7)) % 146097) % 36524) % 1461;\n int L = d4 / 1460;\n int d1 = ((d4 - L) % 365) + L;\n return ((d1/7) + 1);\n }", "public String dayOfTheWeek(int day, int month, int year) {\n\n\t\tString[] days = {\"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\",\"Sunday\"};\n\t\t\n\t\tLocalDate dia = LocalDate.of(year, month, day).getDayOfWeek().getValue()-1;\n\t\t\t\t\n\t\treturn days[dia.getDayOfWeek().getValue()-1];\n\t}", "public int convertCalendarDateToDayOfWeekAsNum(String stringDate) throws ParseException {\n\t\t\t\tDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\t\t\tDate date = formatter.parse(stringDate);\n\t\t\t\tCalendar c = Calendar.getInstance();\n\t\t\t\tc.setTime(date);\n\t\t\t\tint dayOfWeek = c.get(Calendar.DAY_OF_WEEK);\n\t\t\t\treturn dayOfWeek;\n\t\t\t}", "public String dayOfTheWeek(int day, int month, int year) {\n \n String[] arr = {\"Friday\", \"Saturday\", \"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\"};\n \n int[] months = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};\n \n int days = 0;\n for (int i = 1971; i < year; ++i) {\n if (isLeap(i)) days += 366;\n else days += 365;\n }\n \n for (int i = 1; i < month; ++i) {\n if (isLeap(year) && i == 2) days += 29;\n else {\n days += months[i];\n }\n }\n \n days += day - 1;\n \n return arr[days % 7];\n }", "public int turnWeekdayToNumber(String str){\n int number=0;\n switch (str){\n case \"Sunday\":\n number=7;\n break;\n case\"Saturday\":\n number=6;\n break;\n case\"Friday\":\n number=5;\n break;\n case\"Thursday\":\n number=4;\n break;\n case\"Wednesday\":\n number=3;\n break;\n case\"Tuesday\":\n number=2;\n break;\n case\"Monday\":\n number=1;\n break;\n default:\n break;\n }\n return number;\n }", "public Date getWeekStartDate(Date date) {\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);\n cal.set(Calendar.HOUR_OF_DAY, 0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n return cal.getTime();\n }", "private static final int getYear(long fixedDate) {\n\tlong d0;\n\tint d1, d2, d3;\n\tint n400, n100, n4, n1;\n\tint year;\n\n\tif (fixedDate >= 0) {\n\t d0 = fixedDate - 1;\n\t n400 = (int)(d0 / 146097);\n\t d1 = (int)(d0 % 146097);\n\t n100 = d1 / 36524;\n\t d2 = d1 % 36524;\n\t n4 = d2 / 1461;\n\t d3 = d2 % 1461;\n\t n1 = d3 / 365;\n\t} else {\n\t d0 = fixedDate - 1;\n\t n400 = (int)floorDivide(d0, 146097L);\n\t d1 = (int)mod(d0, 146097L);\n\t n100 = floorDivide(d1, 36524);\n\t d2 = mod(d1, 36524);\n\t n4 = floorDivide(d2, 1461);\n\t d3 = mod(d2, 1461);\n\t n1 = floorDivide(d3, 365);\n\t}\n\tyear = 400 * n400 + 100 * n100 + 4 * n4 + n1;\n\tif (!(n100 == 4 || n1 == 4)) {\n\t ++year;\n\t}\n\treturn year;\n }", "public void testDate() throws Exception {\r\n Calendar cal = Calendar.getInstance();\r\n Date d = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(\"2015-01-01 00:00:00\");\r\n cal.setTime(d);\r\n System.out.println(cal.get(Calendar.WEEK_OF_YEAR));\r\n\r\n d = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(\"2014-12-31 11:59:59\");\r\n cal.setTime(d);\r\n System.out.println(cal.get(Calendar.WEEK_OF_YEAR));\r\n\r\n cal.setTime(new Date());\r\n System.out.println(cal.get(Calendar.WEEK_OF_YEAR));\r\n }", "static C0102a m522e(C0101o oVar) {\n return new C0102a(\"WeekBasedYear\", oVar, C0073c.f236e, C0072b.FOREVER, f277j);\n }", "public static String addWeeksToDate(String date, int numberOfWeeks) {\r\n\t\t\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.UK);\r\n\t\t\tDateTime dt = new DateTime((Date) sdf.parse(date));\r\n\t\t\tDateTime dt2 = dt.plusWeeks(numberOfWeeks);\r\n\t\t\treturn dt2.toString(\"yyyy-MM-dd\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn date;\r\n\t\t}\r\n\t}", "public int getCurrentDayOfWeekAsNum() {\n\t\t\t\tint dayOfWeek = Calendar.getInstance().get(Calendar.DAY_OF_WEEK);\n\t\t\t\treturn dayOfWeek;\n\t\t\t}", "public Integer getCarteWeek() {\n return carteWeek;\n }", "public int getDayOfWeek();", "public static int getDayOfWeek(int year, int month, int day)\n\t{\n\t\tCalendar calendar = new GregorianCalendar(year, month - 1, day);\n\t\t\n\t\treturn calendar.get(Calendar.DAY_OF_WEEK);\n\t}", "public int getWeekDay() {\r\n return this.weekday - 1;\r\n }", "public Weekday getDayOfWeek() {\n\n long utcDays = CALSYS.transform(this);\n return Weekday.valueOf(MathUtils.floorModulo(utcDays + 5, 7) + 1);\n\n }", "public static Integer getYear(Date date){\r\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy\"); //EX 2016,02\r\n return new Integer(df.format(date));\r\n }", "private int m519d(C0082e eVar) {\n int c = C0069c.m383c(eVar.mo67c(C0071a.DAY_OF_WEEK) - this.f279b.mo283a().mo236a(), 7) + 1;\n long c2 = m517c(eVar, c);\n if (c2 == 0) {\n return ((int) m517c(C0018g.m125a(eVar).mo98b(eVar).mo27c(1, C0072b.WEEKS), c)) + 1;\n }\n if (c2 >= 53) {\n int b = m514b(m511a(eVar.mo67c(C0071a.DAY_OF_YEAR), c), (C0128k.m770a((long) eVar.mo67c(C0071a.YEAR)) ? 366 : 365) + this.f279b.mo284b());\n if (c2 >= ((long) b)) {\n return (int) (c2 - ((long) (b - 1)));\n }\n }\n return (int) c2;\n }", "public Integer getDayOfWeek() {\n if (dayOfWeek != null) {\n if (dayOfWeek == 7) {\n // Sunday\n return 1;\n }\n // Monday goes from 1 to 2, Tuesday from 2 to 3, etc.\n return dayOfWeek + 1;\n }\n return dayOfWeek;\n }", "public boolean getWeek4() {\n return week4_;\n }", "public int getWeekDayDMYcount(DMYcount DMYcount) {\r\n tmp.set(cur);\r\n moveTmp(DMYcount);\r\n return tmp.getDayOfWeek();\r\n }", "public static synchronized int getDayOfWeekNr(double jd) {\n\t\treturn ((int) (jd - 5.5)) % 7;\n\t}", "Integer getTHunYear();", "static C0102a m518c(C0101o oVar) {\n return new C0102a(\"WeekOfYear\", oVar, C0072b.WEEKS, C0072b.YEARS, f275h);\n }", "public static int shiftWeekDay(WeekDay day) {\r\n\t\tif (day == SUNDAY)\r\n\t\t\treturn 7;\r\n\t\telse\r\n\t\t\treturn day.ordinal();\r\n\t}", "public int dayOfWeek() {\r\n\t\treturn mC.get(Calendar.DAY_OF_WEEK) - 1;\r\n\t}", "public final static int isoDayOfWeek(int ordinal)\n {\n // modulus in Java is \"broken\" for negative numbers\n // so we adjust to make the dividend postive.\n // By \"broken\" I mean the official rules for what\n // is supposed to happen for negative dividends\n // won't give the desired result in this case.\n // See modulus in the Java glossary for more details.\n return(ordinal == NULL_ORDINAL) ? 0 : ((ordinal + MondayIsZeroAdjustment - MIN_ORDINAL) % 7) + 1;\n }", "public String getDayOfTheWeek(){\r\n Calendar calendar = Calendar.getInstance();\r\n int day = calendar.get(Calendar.DAY_OF_WEEK);\r\n String calendar_Id = null;\r\n switch (day) {\r\n case Calendar.SUNDAY:\r\n calendar_Id =\"(90300)\";\r\n break;\r\n case Calendar.MONDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.TUESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.WEDNESDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.THURSDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.FRIDAY:\r\n calendar_Id =\"(90400,90448)\";\r\n break;\r\n case Calendar.SATURDAY:\r\n calendar_Id =\"(90200,90238)\";\r\n break;\r\n }\r\n\r\n return calendar_Id;\r\n }", "@Override\n public int firstDayOfMonthInWeek() {\n int y = getYear();\n int m = getMonth()-1;\n XCalendar xCalendar = XCalendar.fromJalali(y,m,1);\n Calendar cc = Calendar.getInstance();\n int yy = xCalendar.getCalendar(XCalendar.GregorianType).getYear();\n int mm = xCalendar.getCalendar(XCalendar.GregorianType).getMonth()-1;\n int dd = xCalendar.getCalendar(XCalendar.GregorianType).getDay();\n cc.set(yy,mm,dd);\n int d = firstDayOfWeek[cc.get(Calendar.DAY_OF_WEEK)-1];\n return d;\n }", "Integer getTenYear();", "public boolean getWeek4() {\n return week4_;\n }", "public int getDocumentYear() {\n\t\treturn _tempNoTiceShipMessage.getDocumentYear();\n\t}", "public Builder setWeek4(boolean value) {\n bitField0_ |= 0x00000008;\n week4_ = value;\n onChanged();\n return this;\n }", "public static int weeksBetween(final Date start, final Date end) {\n return Dates.dateDiff(start, end, Calendar.WEEK_OF_YEAR);\n }", "public int getLowerYear()\r\n {\r\n return getInt(LowerYear_, 0);\r\n }", "@FXML\n private void incrementWeek() {\n date = date.plusWeeks(1);\n updateDates();\n }", "public static int getWeekOfMonth(int year, int month, int day)\n\t{\n\t\tCalendar calendar = new GregorianCalendar(year, month - 1, day);\n\t\t\n\t\treturn calendar.get(Calendar.WEEK_OF_MONTH);\n\t}", "private int m521e(C0082e eVar) {\n int c = C0069c.m383c(eVar.mo67c(C0071a.DAY_OF_WEEK) - this.f279b.mo283a().mo236a(), 7) + 1;\n int c2 = eVar.mo67c(C0071a.YEAR);\n long c3 = m517c(eVar, c);\n if (c3 == 0) {\n return c2 - 1;\n }\n if (c3 < 53) {\n return c2;\n }\n if (c3 >= ((long) m514b(m511a(eVar.mo67c(C0071a.DAY_OF_YEAR), c), (C0128k.m770a((long) c2) ? 366 : 365) + this.f279b.mo284b()))) {\n return c2 + 1;\n }\n return c2;\n }", "boolean getWeek6();", "com.czht.face.recognition.Czhtdev.WeekOrBuilder getWeekdayOrBuilder();", "public int getYearPublished() {\r\n int yearPublished = 0;\r\n\r\n yearPublished = datePublished.getYear();\r\n return yearPublished;\r\n }", "void onWeekNumberClick ( @NonNull MaterialCalendarView widget, @NonNull CalendarDay date );" ]
[ "0.6734694", "0.6676494", "0.66315335", "0.6577509", "0.6489245", "0.64587855", "0.644769", "0.64046", "0.63642", "0.631408", "0.62582576", "0.6182672", "0.6091586", "0.6069891", "0.60261714", "0.60077673", "0.59880877", "0.5969778", "0.5967373", "0.5956431", "0.5946776", "0.58947235", "0.5872913", "0.58458084", "0.5783099", "0.5779444", "0.57381517", "0.57186866", "0.5708204", "0.5698023", "0.5686805", "0.56744796", "0.56631887", "0.5628907", "0.56278425", "0.56017435", "0.557784", "0.5575942", "0.5569961", "0.55592304", "0.55131793", "0.5480895", "0.5451508", "0.54366744", "0.54272056", "0.54255944", "0.541911", "0.54079115", "0.5406699", "0.5406024", "0.54006046", "0.53987306", "0.53975666", "0.5381162", "0.5380526", "0.5368051", "0.53495616", "0.5331812", "0.5324551", "0.5321905", "0.5316836", "0.5309583", "0.5304029", "0.5284957", "0.5278959", "0.52775437", "0.5248397", "0.5244878", "0.5242486", "0.5235566", "0.521943", "0.5218992", "0.5204012", "0.519423", "0.51819366", "0.5168299", "0.51508623", "0.5150619", "0.5144701", "0.5142972", "0.5137021", "0.5132039", "0.512258", "0.5110498", "0.51066226", "0.5094658", "0.5092009", "0.5086387", "0.5084793", "0.50407135", "0.50392026", "0.50237525", "0.50193506", "0.5017105", "0.50113606", "0.50011796", "0.50007254", "0.49717093", "0.4964644", "0.49621865" ]
0.7302948
0
Listar todos os carros do banco de dados.
public List<Carro> getCarros(){ try { List<Carro> carros = db.getCarros(); return carros; } catch(SQLException ex) { ex.printStackTrace(); return new ArrayList<>(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }", "@Override\n\tpublic List<CiclosCarreras> listar() {\n\t\treturn repoCiclos.findAll();\n\t}", "public void listarCarros() {\n System.err.println(\"Carros: \\n\");\n if (carrosCadastrados.isEmpty()) {\n System.err.println(\"Nao existem carros cadastrados\");\n } else {\n System.err.println(Arrays.toString(carrosCadastrados.toArray()));\n }\n }", "@Override\n\tpublic List<CLIENTE> listarTodos() {\n\t\t\n\t\tString sql = \"SELECT * FROM CLIENTE\";\n\t\t\n\t\tList<CLIENTE> listaCliente = new ArrayList<CLIENTE>();\n\t\t\n\t\tConnection conexao;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tconexao = JdbcUtil.getConexao();\n\t\t\t\n\t\t\tPreparedStatement ps = conexao.prepareStatement(sql);\n\t\t\t\n\t\t\tResultSet res = ps.executeQuery();\n\t\t\t\n\t\t\twhile(res.next()){\n\t\t\t\t\n\t\t\t\tcliente = new CLIENTE();\n\t\t\t\tcliente.setNomeCliente(res.getString(\"NOME_CLIENTE\"));\n\t\t\t\t\n\t\t\t\tlistaCliente.add(cliente);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tps.close();\n\t\t\tconexao.close();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn listaCliente;\n\t}", "public void Listar() {\n try {\n ApelacionesDao apelacionesDao = new ApelacionesDao();\n this.listaApelaciones.clear();\n setListaApelaciones(apelacionesDao.cargaApelaciones());\n } catch (ExceptionConnection ex) {\n Logger.getLogger(ApelacionController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic List<Cozinha> listar() { /* Cria uma Lista para buscar elementos da tabela Cozinha no banco */\n\t\treturn manager.createQuery(\"from Cozinha\", Cozinha.class) /*\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * Esta criando uma consulta com todo os elementos\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t * que tem dentro de Cozinha\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t */\n\t\t\t\t.getResultList(); /* Está me retornando os Resultados da Lista Cozinha */\n\t}", "public List<ViajeroEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos\");\n TypedQuery<ViajeroEntity> query = em.createQuery(\"select u from ViajeroEntity u\", ViajeroEntity.class);\n return query.getResultList();\n }", "public List<Filme> listar() {\r\n\r\n //Pegando o gerenciador de acesso ao BD\r\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery consulta = gerenciador.createQuery(\r\n \"Select f from Filme f\", Filme.class);\r\n\r\n //Retornar a lista de atores\r\n return consulta.getResultList();\r\n\r\n }", "public void listar()\n\t{\n\t\tdatabase.list().forEach(\n\t\t\t(entidade) -> { IO.println(entidade.print() + \"\\n\"); }\n\t\t);\n\t}", "@Override\n\tpublic List<Ciclo> listarCiclos() {\n\t\treturn repository.findAll();\n\t}", "List<Entidade> listarTodos();", "public List listar() {\n Query query = Database.manager.createNamedQuery(\"StatussistemaDTO.findAll\");\n query.setHint(QueryHints.MAINTAIN_CACHE, HintValues.FALSE);// evita consulta em cache\n List lista = query.getResultList();\n return lista;\n }", "public static List<Comentario> listar()\n {\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario u\";\n List<Comentario> lista = (List)sessionRecheio.createQuery(hql).list();\n tr.commit();\n return lista;\n }", "@Override\n\tpublic List<BeanDistrito> listar() {\n\t\tList<BeanDistrito> lista = new ArrayList<BeanDistrito>();\n\t\tBeanDistrito distrito = null;\n\t\tConnection con = MySQLDaoFactory.obtenerConexion();\n\t\ttry {\n\t\t\n\t\t\tString sql=\"SELECT * FROM t_distrito ORDER BY codDistrito\";\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tdistrito = new BeanDistrito();\n\t\t\t\tdistrito.setCodDistrito(rs.getInt(1));\n\t\t\t\tdistrito.setNombre(rs.getString(2));\n\t\t\t\t\n\t\t\t\tlista.add(distrito);\n\t\t\t}\n\t\t\tcon.close();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\ttry {\n\t\t\t\tcon.close();\n\t\t\t} catch (SQLException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn lista;\n\t}", "@Override\n\tprotected void doListado() throws Exception {\n\t\tList<Department> deptos = new DepartmentDAO().getAllWithManager();\n//\t\tList<Department> deptos = new DepartmentDAO().getAll();\n\t\tthis.addColumn(\"Codigo\").addColumn(\"Nombre\").addColumn(\"Manager\").newLine();\n\t\t\n\t\tfor(Department d: deptos){\n\t\t\taddColumn(d.getNumber());\n\t\t\taddColumn(d.getName());\n\t\t\taddColumn(d.getManager().getFullName());\n\t\t\tnewLine();\n\t\t}\n\t}", "public List<Registro> findAll() {\n SQLiteDatabase db = banco.getReadableDatabase();\n try {\n\n Cursor c = db.query(TABELA, null, null, null, null, null, null, null);\n\n return toList(c);\n } finally {\n db.close();\n }\n }", "public static List<Carro> getCarros() {\n CarroDAO dao = CarrosApplication.getInstance().getCarroDAO();\n List<Carro> carros = dao.findAll();\n return carros;\n }", "@Override\r\n public List<Concursando> consultarTodosConcursando() throws Exception {\n return rnConcursando.consultarTodos();\r\n }", "public List<Aplicativo> buscarTodos() {\n return repositorio.findAll();\n }", "private void carregaLista() {\n listagem = (ListView) findViewById(R.id.lst_cadastrados);\n dbhelper = new DBHelper(this);\n UsuarioDAO dao = new UsuarioDAO(dbhelper);\n //Preenche a lista com os dados do banco\n List<Usuarios> usuarios = dao.buscaUsuarios();\n dbhelper.close();\n UsuarioAdapter adapter = new UsuarioAdapter(this, usuarios);\n listagem.setAdapter(adapter);\n }", "public SgfensBanco[] findAll() throws SgfensBancoDaoException;", "List<O> obtenertodos() throws DAOException;", "public List<FacturaCabecera> list(){ \n\t\t\treturn em.createQuery(\"SELECT c from FacturaCabecera c\", FacturaCabecera.class).getResultList();\n\t\t}", "@Override\n public List<Venda> listar() {\n String sql = \"SELECT v FROM venda v\";\n TypedQuery<Venda> query = em.createQuery(sql, Venda.class);\n List<Venda> resultList = query.getResultList();\n\n return resultList;\n }", "public List<Pagamento> buscarPorBusca(String busca)throws DaoException;", "public List<Cliente> buscarTodos(String nomeBusca) {\n\t\treturn clienteDAO.buscarTodos(nomeBusca);\n\t}", "@Override\r\n public List<Assunto> buscarTodas() {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"FROM Assunto As a\");\r\n return query.getResultList();\r\n }", "List<ParqueaderoEntidad> listar();", "public List<Usuario> listarTodos() {\n List<Usuario> r = new ArrayList<>();\n try {\n try (Connection cnx = bd.obtenerConexion(Credenciales.BASE_DATOS, Credenciales.USUARIO, Credenciales.CLAVE);\n Statement stm = cnx.createStatement();\n ResultSet rs = stm.executeQuery(CMD_LISTAR2)) {\n while (rs.next()) {\n r.add(new Usuario(\n rs.getString(\"cedula\"),\n rs.getString(\"apellido1\"),\n rs.getString(\"apellido2\"),\n rs.getString(\"nombre\")\n ));\n }\n }\n } catch (SQLException ex) {\n System.err.printf(\"Excepción: '%s'%n\",\n ex.getMessage());\n }\n return r;\n }", "@Override\n\tpublic List<Paciente> listar() {\n\t\treturn dao.findAll();\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Empresa> listarTodos() {\n\t\tList<Empresa> lista = new ArrayList<Empresa>();\n\t\t\n\t\ttry {\n\t\t\tlista = empresaDAO.listarTodosDesc();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn lista;\n\t}", "public List<Aluno> buscarTodos() {\n\t\treturn null;\n\t}", "public List<Usuario> buscarTodos(){\n\t\tList<Usuario> listarUsuarios = new ArrayList<>();\n\t\t\n\t\tString sql = \"Select * from usuario\";\n\t\tUsuario usuario = null ;\n\t\t\n\t\ttry(PreparedStatement preparedStatement = con.prepareStatement(sql)) {\n\t\t\t\n\t\t\tResultSet result = preparedStatement.executeQuery();\n\t\t\t\n\t\t\t/*\n\t\t\t * Dentro do while estou verificando se tem registro no banco de dados, enquanto tiver registro vai \n\t\t\t * adcionando um a um na lista e no final fora do while retorna todos os registro encontrados. \n\t\t\t */\n\t\t\twhile(result.next()){\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setIdUsuario(result.getInt(\"idUsuario\"));\n\t\t\t\tusuario.setNome(result.getString(\"Nome\"));\n\t\t\t\tusuario.setLogin(result.getString(\"Login\"));\n\t\t\t\tusuario.setSenha(result.getString(\"senha\"));\n\t\t\t\t\n\t\t\t\t// Adcionando cada registro encontro, na lista .\n\t\t\t\tlistarUsuarios.add(usuario);\n\t\t\t}\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn listarUsuarios;\n\t}", "public List<Veiculo> listarTodosVeiculos(){\n\t\tList<Veiculo> listar = null;\n\t\t\n\t\ttry{\n\t\t\tlistar = veiculoDAO.listarTodosVeiculos();\n\t\t}catch(Exception e){\n\t\t\te.getMessage();\n\t\t}\n\t\treturn listar;\n\t}", "public List<vacante> cargarvacante() {\n\t\treturn vacantesrepo.findAll();\n\t}", "public List<NumeroMega> listar() {\n List<NumeroMega> lista = new ArrayList<NumeroMega>();\n\n // Definicao da instrucao SQL\n String sql = \"Select NumeroMega from \" +TABELA+ \" order by id\";\n\n // Objeto que recebe os registros do banco de dados\n Cursor cursor = getReadableDatabase().rawQuery(sql, null);\n\n try {\n while (cursor.moveToNext()) {\n // Criacao de nova referencia\n NumeroMega numeroMega = new NumeroMega();\n // Carregar os atributos com dados do BD\n\n numeroMega.setNumeroMega(cursor.getString(0));\n\n // Adicionar novo a lista\n lista.add(numeroMega);\n }\n } catch (SQLException e) {\n Log.e(TAG, e.getMessage());\n } finally {\n cursor.close();\n }\n return lista;\n }", "public List<AlojamientoEntity> findAll() {\n LOGGER.log(Level.INFO, \"Consultando todos los alojamientos\");\n TypedQuery q = em.createQuery(\"select u from AlojamientoEntity u\", AlojamientoEntity.class);\n return q.getResultList();\n }", "public static List<Endereco> listar() {\n\t\t\tConnection conexao = ConectaPostgreSQL.geraConexao();\n\t\t\t// variavel lista de ass\n\t\t\tList<Endereco> acessos = new ArrayList<Endereco>();\n\t\t\t// executa o SQL no banco de endereco\n\t\t\tStatement consulta = null;\n\t\t\t// contém os endereco consultado da tabela\n\t\t\tResultSet resultado = null;\n\t\t\t// objeto as\n\t\t\t// Endereco as = null;\n\t\t\t// consulta SQL\n\t\t\tString sql = \"select distinct * from Endereco\";\n\t\t\ttry {\n\t\t\t\t// consulta => objeto que executa o SQL no banco de endereco\n\t\t\t\tconsulta = conexao.createStatement();\n\t\t\t\t// resultado => objeto que contém os endereco consultado da tabela\n\t\t\t\t// Endereco\n\t\t\t\tresultado = consulta.executeQuery(sql);\n\t\t\t\t// Lê cada as\n\n\t\t\t\twhile (resultado.next()) {\n\t\t\t\t\tEndereco endereco = new Endereco();\n\t\t\t\t\tendereco.setBairro(resultado.getString(\"bairro\"));\n\t\t\t\t\tendereco.setCep(resultado.getString(\"cep\"));\n\t\t\t\t\tendereco.setCidade(resultado.getString(\"cidade\"));\n\t\t\t\t\tendereco.setEstado(resultado.getString(\"estado\"));\n\t\t\t\t\tendereco.setNumero(resultado.getInt(\"numero\"));\n\t\t\t\t\tendereco.setRua(resultado.getString(\"rua\"));\n\t\t\t\t\t// insere o as na lista\n\t\t\t\t\tacessos.add(endereco);\n\n\t\t\t\t}\n\n\t\t\t} catch (SQLException e) {\n\t\t\t\tthrow new RuntimeException(\"Erro ao buscar um acesso a serviços: \" + e);\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tconsulta.close();\n\t\t\t\t\tresultado.close();\n\t\t\t\t\tconexao.close();\n\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\tthrow new RuntimeException(\"Erro ao fechar a conexao \" + e);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// retorna lista de ass\n\t\t\treturn acessos;\n\t\t}", "List<Vehiculo>listar();", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<ItemMedicamentoEntity> listaTodos(){\r\n\r\n\t\treturn this.entityManager.createQuery(\"SELECT * FROM ItemMedicamentoEntity ORDER BY codigo\").getResultList();\r\n\t}", "List<Persona> obtenerTodasLasPersona();", "public String listar() {\n DocumentoVinculadoDAO documentoVinculadoDAO = new DocumentoVinculadoDAO();\n lista = documentoVinculadoDAO.listarStatus(1);\n return \"listar\";\n\n }", "public ArrayList<Miembro> daoListar() throws SQLException {\r\n\t\t\r\n\t\t\tPreparedStatement ps = con.prepareStatement(\"SELECT * from miembros\");\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\tArrayList<Miembro> result = new ArrayList<Miembro>();\r\n\t\t\r\n\t\twhile(rs.next()) { //Convertimos el resulset en un arraylist\r\n\t\t\tresult.add(new Miembro(rs.getInt(\"id\"),rs.getString(\"nombre\"),rs.getString(\"apellido1\"),rs.getString(\"apellido2\"),rs.getInt(\"edad\"),rs.getInt(\"cargo\")));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn result;\r\n\t}", "public static List<CentroDeCusto> readAll() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto\");\n return query.list();\n }", "@Override\n\tpublic List<Estadoitem> listar() {\n\t\treturn estaitemdao.listar();\n\t}", "public ArrayList<Ingrediente> buscarTodos() {\n\n\t\tConnection conn = null;\n\t\tResultSet resultSet = null;\n\t\tPreparedStatement stmt = null;\n\t\tconn = getConnection();\n\t\tArrayList<Ingrediente> listaIngredientes = null;\n\n\t\ttry {\n\n\t\t\tstmt = conn\n\t\t\t\t\t.prepareStatement(\"SELECT * FROM IDINGREDIENTE ORDER BY ID\");\n\t\t\tresultSet = stmt.executeQuery();\n\t\t\tlistaIngredientes = new ArrayList<Ingrediente>();\n\t\t\tIngrediente ingrediente = null;\n\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tingrediente = new Ingrediente();\n\t\t\t\tingrediente.setNome(resultSet.getString(\"nome\"));\n\t\t\t\tlistaIngredientes.add(ingrediente);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\tlistaIngredientes = null;\n\t\t} finally {\n\t\t\tcloseConnection(conn, stmt, resultSet);\n\t\t}\n\t\treturn listaIngredientes;\n\t}", "public ArrayList<CandidatoBean> listarCandidatos() {\r\n\r\n Query query = em.createNamedQuery(\"Candidato.findAll\");\r\n ArrayList<CandidatoBean> listCandidatos = new ArrayList<>();\r\n\r\n for (Candidato candidato : (List<Candidato>) query.getResultList()) {\r\n listCandidatos.add(modelMapper.map(candidato, CandidatoBean.class));\r\n }\r\n em.close();\r\n em = null;\r\n return listCandidatos;\r\n }", "public DatiBancari[] findAll() throws DatiBancariDaoException;", "@GetMapping(\"/getallCommande_Fournisseur\")\n\tprivate List<Commande_Fournisseur> getAllCommandes()\n\t{\n\t\tSystem.out.println(\"get all commandes frournisseur\");\n\t\treturn commande_FournisseurController.findAll();\n\t}", "public ArrayList<Comobox> listaTodosBanco()\n {\n @SuppressWarnings(\"MismatchedQueryAndUpdateOfCollection\")\n ArrayList<Comobox> al= new ArrayList<>();\n @SuppressWarnings(\"UnusedAssignment\")\n ResultSet rs = null;\n sql=\"select * FROM VER_BANCO\";\n Conexao conexao = new Conexao();\n if(conexao.getCon()!=null)\n {\n try \n {\n if(conexao.getCon()!=null)\n {\n cs = conexao.getCon().prepareCall(sql);\n cs.execute();\n rs=cs.executeQuery(); \n if (rs!=null) \n { \n while (rs.next())\n { \n al.add(new Comobox(rs.getString(\"ID\"), rs.getString(\"SIGLA\")));\n } \n }\n rs.close();\n }\n else\n {\n al.add(new Comobox(\"djdj\",\"ddj\"));\n al.add(new Comobox(\"1dj\",\"dmsmdj\"));\n }\n } \n catch (SQLException ex)\n {\n Logger.getLogger(CreditoDao.class.getName()).log(Level.SEVERE, null, ex);\n System.out.println(\"Erro a obter fontes rendimentos \"+ex.getMessage());\n }\n }\n return al;\n }", "List<Videogioco> findAllVideogioco();", "private void listarItems() {\r\n // Cabecera\r\n System.out.println(\"Listado de Items\");\r\n System.out.println(\"================\");\r\n\r\n // Criterio de Ordenación/Filtrado\r\n System.out.printf(\"Criterio de Ordenación .: %S%n\", criOrd.getNombre());\r\n System.out.printf(\"Criterio de Filtrado ...: %S%n\", criFil.getNombre());\r\n\r\n // Separados\r\n System.out.println(\"---\");\r\n\r\n // Filtrado > Selección Colección\r\n List<Item> lista = criFil.equals(Criterio.NINGUNO) ? CARRITO : FILTRO;\r\n\r\n // Recorrido Colección\r\n for (Item item : lista) {\r\n System.out.println(item.toString());\r\n }\r\n\r\n // Pausai\r\n UtilesEntrada.hacerPausa();\r\n }", "public void consultarListaDeContatos() {\n\t\tfor (int i = 0; i < listaDeContatos.size(); i++) {\n\t\t\tSystem.out.printf(\"%d %s \\n\", i, listaDeContatos.get(i));\n\t\t}\n\t}", "public List<PerfilTO> buscarTodos();", "public List<Usuario> todosLosUsuarios() throws SQLException {\n PreparedStatement preSt = connection.prepareStatement(USUARIOS);\n ResultSet result = preSt.executeQuery();\n\n List<Usuario> usuario = new LinkedList<>();\n\n while (result.next()) {\n usuario.add(new Usuario(\n result.getInt(Usuario.USUARIO_ID_DB_NAME),\n result.getString(Usuario.NOMBRE_DB_NAME),\n result.getString(Usuario.PROFESION_DB_NAME),\n result.getString(Usuario.PASSWORD_DB_NAME)\n ));\n }\n System.out.println(\"Usuarios: \" + usuario.size());\n return usuario;\n }", "public ArrayList<ProductoDTO> mostrartodos() {\r\n\r\n\r\n PreparedStatement ps;\r\n ResultSet res;\r\n ArrayList<ProductoDTO> arr = new ArrayList();\r\n try {\r\n\r\n ps = conn.getConn().prepareStatement(SQL_READALL);\r\n res = ps.executeQuery();\r\n while (res.next()) {\r\n\r\n arr.add(new ProductoDTO(res.getInt(1), res.getString(2), res.getString(3), res.getInt(4), res.getInt(5), res.getString(6), res.getString(7), res.getString(8), res.getString(9)));\r\n }\r\n } catch (SQLException ex) {\r\n JOptionPane.showMessageDialog(null, \"error vuelva a intentar\");\r\n } finally {\r\n conn.cerrarconexion();\r\n\r\n }\r\n return arr;\r\n\r\n }", "public List<Fornecedor> Listar() throws SQLException {\r\n\t\ttry {\r\n\t\t\tString query = \"select * from fornecedor\";\r\n\t\t\tPreparedStatement preparedStatement = this.connection.prepareStatement(query);\r\n\r\n\t\t\tResultSet rs = preparedStatement.executeQuery();\r\n\t\t\tList<Fornecedor> fornecedors = new ArrayList<>();\r\n\t\t\t\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tFornecedor fornecedor = new Fornecedor();\r\n\t\t\t\tfornecedor.setCodigoFornecedor(rs.getInt(\"cd_fornecedor\"));\r\n\t\t\t\tfornecedor.setNomeLocal(rs.getString(\"nm_local\"));\r\n\t\t\t\tfornecedor.setValorFornecedor(rs.getDouble(\"vl_fornecedor\"));\r\n\t\t\t\tfornecedor.setQuantidadePeso(rs.getInt(\"qt_peso\"));\r\n\t\t\t\tfornecedor.setNomeFornecedor(rs.getString(\"nm_fornecedor\"));\r\n\t\t\t\tfornecedor.setDescricao(rs.getString(\"ds_descricao\"));\r\n\t\t\t\tfornecedors.add(fornecedor);\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\treturn fornecedors;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tthrow e;\r\n\t\t} finally {\r\n\t\t\tthis.connection.close();\r\n\t\t}\r\n\t}", "public List<SistemaFazendaModel> listaTudo(){\n\t\treturn this.session.createCriteria(SistemaFazendaModel.class).list();\n\t}", "public List<Usuario> listarUsuario() {\n \n List<Usuario> lista = usuarioDAO.findAll();\n return lista;\n \n \n\n }", "@Override\n public List<Caja> buscarMovimientos(){\n List<Caja> listaCaja= cajaRepository.findAll();\n\n return listaCaja;\n\n }", "public static List<CentroDeCusto> readAllAtivos() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto WHERE status = 'A'\");\n return query.list();\n }", "public List<ReceitaDTO> listarReceitas() {\n return receitaOpenHelper.listar();\n }", "@Override\n\tpublic List<Comprobante> findAll() throws Exception {\n\t\treturn comproRepository.findAll();\n\t}", "public List<Servicio> findAll();", "@GetMapping(\"/receta/all\")\t\n\tpublic List<Receta> listarReceta(){\n\t\t\treturn this.recetaService.findAll();\n\t}", "public List<GrauParentesco> getListTodos();", "public Collection<StatusChamado> listarStatusChamado(){\n return statusChamadoDAO.listarStatusChamado();\n }", "@Override\n\tpublic List<Produto> listarTodos() throws ControleEstoqueSqlException {\n\t\treturn null;\n\t}", "public ArrayList<DataCliente> listarClientes();", "public List<Cliente> getListCliente(){//METODO QUE RETORNA LSITA DE CLIENTES DO BANCO\r\n\t\treturn dao.procurarCliente(atributoPesquisaCli, filtroPesquisaCli);\r\n\t}", "@Override\n\tpublic ArrayList<ClienteFisico> listar(String complemento)\n\t\t\tthrows SQLException {\n\t\treturn null;\n\t}", "List<ItemPedido> findAll();", "public ArrayList<DatosNombre> listaNombre(){\n \n ArrayList<DatosNombre> respuesta = new ArrayList<>();\n Connection conexion = null;\n JDBCUtilities conex = new JDBCUtilities();\n \n try{\n conexion= conex.getConnection();\n \n String query = \"SELECT usuario, contrasenia, nombre\"\n + \" FROM empleado\"\n + \" WHERE estado=true\";\n \n PreparedStatement statement = conexion.prepareStatement(query);\n ResultSet resultado = statement.executeQuery();\n \n while(resultado.next()){\n DatosNombre consulta = new DatosNombre();\n consulta.setUsuario(resultado.getString(1));\n consulta.setContrasenia(resultado.getString(2));\n consulta.setNombreAnt(resultado.getString(3));\n \n respuesta.add(consulta);\n }\n }catch(SQLException e){\n JOptionPane.showMessageDialog(null, \"Error en la consulta \" + e);\n }\n return respuesta;\n }", "@Override\n\tpublic List<Aluno> carregar() {\n\t\tList<Aluno> lista = new ArrayList<Aluno>();\n\t\ttry {\n\t\t\tConnection con = DBUtil.getInstance().getConnection();\n\t\t\tString cmd = \"SELECT * FROM Aluno \";\n\t\t\tPreparedStatement stmt = con.prepareStatement( cmd );\n\t\t\n\t\t\tResultSet rs = stmt.executeQuery();\n\t\t\twhile (rs.next()) { \n\t\t\t\tAluno a = new Aluno();\n\t\t\t\ta.setNome( rs.getString(\"Nome\") );\n\t\t\t\ta.setNumero(Integer.parseInt(rs.getString(\"idAluno\")) );\n\t\t\t\tlista.add( a );\n\t\t\t}\t\n\t\t} catch (SQLException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Erro no Sql, verifique o banco\", \"ERRO\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t\treturn lista;\n\t}", "@SuppressWarnings(\"unchecked\")\t\r\n\t@Override\r\n\tpublic List<Distrito> listar() {\n\t\tList<Distrito> lista = new ArrayList<Distrito>();\r\n\t\tQuery q = em.createQuery(\"select m from Distrito m\");\r\n\t\tlista = (List<Distrito>) q.getResultList();\r\n\t\treturn lista;\r\n\t}", "public List<ColaTicket> obtenerTodasLasColas() {\n return this.colaFacade.findAll();\n }", "public List<Bloques> getDataListBloques() {\n\t\tif(dataListBloques == null){\n\t\t\tdataListBloques = new ArrayList<Bloques>();\n\t\t\tdataListBloques = bloquesFacade.findByLike(\"SELECT B FROM Bloques B ORDER BY B.nombre\");\n\t\t}\n\t\treturn dataListBloques;\n\t}", "public List<Location> listarPorCliente() throws SQLException {\r\n \r\n //OBJETO LISTA DE COMODOS\r\n List<Location> enderecos = new ArrayList<>(); \r\n \r\n //OBJETO DE CONEXÃO COM O BANCO\r\n Connection conn = ConnectionMVC.getConnection();\r\n \r\n //OBJETO DE INSTRUÇÃO SQL\r\n PreparedStatement pStatement = null;\r\n \r\n //OBJETO CONJUNTO DE RESULTADOS DA TABELA IMOVEL\r\n ResultSet rs = null;\r\n \r\n try {\r\n \r\n //INSTRUÇÃO SQL DE LISTAR ENDEREÇO ATRAVES DE VIEW CRIADA NO JDBC\r\n pStatement = conn.prepareStatement(\"select * from dados_imovel_cliente;\");\r\n \r\n //OBJETO DE RESULTADO DA INSTRUÇÃO\r\n rs = pStatement.executeQuery();\r\n \r\n //PERCORRER OS DADOS DA INSTRUÇÃO\r\n while(rs.next()) {\r\n \r\n //OBJETO UTILIZADO PARA BUSCA\r\n Location endereco = new Location();\r\n \r\n //PARAMETROS DE LISTAGEM\r\n endereco.setCep(rs.getString(\"cep\"));\r\n endereco.setRua(rs.getString(\"rua\"));\r\n endereco.setNumero(rs.getInt(\"numero\"));\r\n endereco.setBairro(rs.getString(\"bairro\"));\r\n endereco.setCidade(rs.getString(\"cidade\"));\r\n endereco.setUf(rs.getString(\"uf\"));\r\n endereco.setAndar(rs.getInt(\"andar\"));\r\n endereco.setComplemento(rs.getString(\"complemento\"));\r\n \r\n //OBJETO ADICIONADO A LISTA\r\n enderecos.add(endereco); \r\n }\r\n \r\n //MENSAGEM DE ERRO\r\n } catch (SQLException ErrorSql) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao listar do banco: \" +ErrorSql,\"erro\", JOptionPane.ERROR_MESSAGE);\r\n\r\n //FINALIZAR/FECHAR CONEXÃO\r\n }finally {\r\n ConnectionMVC.closeConnection(conn, pStatement, rs);\r\n } \r\n return enderecos;\r\n }", "@Override\n public ArrayList<Endereco> buscar() {\n PreparedStatement stmt;\n ResultSet rs;\n ArrayList<Endereco> arrayEndereco = new ArrayList<>();\n try {\n \n stmt = ConexaoBD.conectar().prepareStatement(\"SELECT * FROM Endereco\");\n rs = stmt.executeQuery();\n \n \n while (rs.next()) {\n Endereco endereco = new Endereco();\n endereco.setCodigo(rs.getInt(\"CODIGOENDERECO\"));\n endereco.setRua(rs.getString(\"RUA\"));\n endereco.setNumero(rs.getString(\"NUMERO\"));\n endereco.setBairro(rs.getString(\"BAIRRO\"));\n endereco.setCidade(rs.getString(\"CIDADE\"));\n arrayEndereco.add(endereco);\n }\n \n \n } catch (SQLException ex) {\n Logger.getLogger(FuncionarioDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return arrayEndereco; \n }", "public List<Tripulante> buscarTodosTripulantes();", "public ArrayList<Socio> obtenerTodos() {\n return (ArrayList<Socio>) socioRepo.findAll();\n }", "public void listadoCarreras() {\r\n try {\r\n this.sessionProyecto.getCarreras().clear();\r\n this.sessionProyecto.getFilterCarreras().clear();\r\n this.sessionProyecto.getCarreras().addAll(sessionUsuarioCarrera.getCarreras());\r\n this.sessionProyecto.setFilterCarreras(this.sessionProyecto.getCarreras());\r\n } catch (Exception e) {\r\n }\r\n }", "public List<Cliente> consultarClientes();", "@GET\n\t@Path(\"/carrocerias\")\n\t@Produces(MediaType.APPLICATION_JSON)\n\tpublic ArrayList<CarroceriaDTO> listarCarrocerias(){\n\t\tSystem.out.println(\"ini: listarCarrocerias()\");\n\t\t\n\t\tCarroceriaService tipotService = new CarroceriaService();\n\t\tArrayList<CarroceriaDTO> lista = tipotService.ListadoCarroceria();\n\t\t\n\t\tif (lista == null) {\n\t\t\tSystem.out.println(\"Listado Vacío\");\n\t\t}else {\n\t\t\tSystem.out.println(\"Consulta Exitosa\");\n\t\t}\n\n\t\tSystem.out.println(\"fin: listarCarrocerias()\");\n\t\t\n\t\treturn lista;\n\t}", "List<Consulta> findAll();", "public List<Empleado> buscarTodos() {\n\t\tList<Empleado> listEmpleados;\n\t\tQuery query = entityManager.createQuery(\"SELECT e FROM Empleado e WHERE estado = true\");\n\t\tlistEmpleados = query.getResultList();\n\t\tIterator iterator = listEmpleados.iterator();\n\t\twhile(iterator.hasNext())\n\t\t{\n\t\t\tSystem.out.println(iterator.next());\n\t\t}\n\t\treturn listEmpleados;\n\t}", "public static List getAllNames() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT naziv FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"naziv\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }", "public List<Usuario> listar() {\n List<Usuario> listaUsuarios = new ArrayList<>();\n String consulta = \"select tipoDocumento, documento, nombre, apellido, password, correo, tipoUsuario from Usuario\";\n Cursor temp = conex.ejecutarSearch(consulta);\n if (temp.moveToFirst()) {\n do {\n Usuario usuario = new Usuario(temp.getString(0), Integer.parseInt(temp.getString(1)), temp.getString(2), temp.getString(3), temp.getString(4), temp.getString(5), temp.getString(6));\n listaUsuarios.add(usuario);\n } while (temp.moveToNext());\n }\n return listaUsuarios;\n }", "public static List<ClientesVO> listarClientes() throws Exception {\r\n\r\n List<ClientesVO> vetorClientes = new ArrayList<ClientesVO>();\r\n\r\n try {\r\n ConexaoDAO.abreConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n try {\r\n\r\n //Construçao do objeto Statement e ligaçao com a variavel de conexao\r\n stClientes = ConexaoDAO.connSistema.createStatement();\r\n\r\n //SELECT NO BANCO\r\n String sqlLista = \"Select * from clientes\";\r\n\r\n //Executando select e armazenando dados no ResultSet\r\n rsClientes = stClientes.executeQuery(sqlLista);\r\n\r\n while (rsClientes.next()) {//enquanto houver clientes\r\n ClientesVO tmpCliente = new ClientesVO();\r\n\r\n tmpCliente.setIdCliente(rsClientes.getInt(\"id_cliente\"));\r\n tmpCliente.setCodigo(rsClientes.getInt(\"cod_cliente\"));\r\n tmpCliente.setNome(rsClientes.getString(\"nome_cliente\"));\r\n tmpCliente.setCidade(rsClientes.getString(\"cid_cliente\"));\r\n tmpCliente.setTelefone(rsClientes.getString(\"tel_cliente\"));\r\n\r\n vetorClientes.add(tmpCliente);\r\n\r\n }\r\n\r\n } catch (Exception erro) {\r\n throw new Exception(\"Falha na listagem de dados. Verifique a sintaxe da instruçao SQL\\nErro Original:\" + erro.getMessage());\r\n }\r\n\r\n try {\r\n ConexaoDAO.fechaConexao();\r\n } catch (Exception erro) {\r\n throw new Exception(erro.getMessage());\r\n }\r\n\r\n return vetorClientes;\r\n }", "public List<Curso> recuperaTodosCursos(){\r\n Connection conexao = ConexaoComBD.conexao();\r\n //instrução sql\r\n String sql = \"SELECT * FROM curso;\";\r\n try {\r\n //statement de conexão\r\n PreparedStatement ps = conexao.prepareStatement(sql);\r\n //recebe a tabela de retorno do banco de dados em um formato java\r\n ResultSet rs = ps.executeQuery();\r\n //criar lista de retorno\r\n List<Curso> lista = new ArrayList<>();\r\n \r\n //tratar o retorno do banco\r\n \r\n while(rs.next()){\r\n //criar um objeto modelo do tipo do retorno \r\n Curso c = new Curso();\r\n c.setIdCurso(rs.getInt(1));\r\n c.setNome(rs.getString(2));\r\n c.setArea(rs.getString(3));\r\n c.setCargaHoraria(rs.getInt(5));\r\n c.setValorCurso(rs.getDouble(6));\r\n c.setValorMensal(rs.getDouble(7));\r\n c.setCod(rs.getString(8));\r\n lista.add(c);\r\n }\r\n //retornar lista preenchida \r\n return lista;\r\n } catch (SQLException ex) {\r\n Logger.getLogger(CursoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n //retorna null em caso de excessao\r\n return null;\r\n }", "public void executar() {\n\t\tSystem.out.println(dao.getListaPorNome(\"abacatão\"));\n\t}", "public LinkedList<clsCarro> listarCarros(){\n return modeloCarro.listarCarros();\n }", "@Override\n public List listar() {\n return instalaciones.getAll();\n }", "public java.util.List<Todo> findAll();", "@Override\n\t@Transactional(readOnly = true)\n\tpublic List<ProdutoPedido> buscarTodos() {\n\t\treturn dao.findAll();\n\t}", "public List<Comentario> listaComentarioPorCodigo(Long codigo);", "@Override\n\t@Transactional\n\tpublic List<DetalleCarrito> readAll() throws Exception {\n\t\treturn detalleCarritoRepository.findAll();\n\t}", "@GetMapping(\"/tema/{id}/comentarios\")\n public Iterable<Comentario> findAllComentarios(@PathVariable(\"id\") Long id) {\n return repository.findById(id).get().getComentarios();\n }", "@Override\n\tpublic List<Cliente> listarClientes() {\n\t\treturn clienteDao.findAll();\n\t}" ]
[ "0.76904017", "0.768048", "0.75534886", "0.72787327", "0.7263193", "0.7187612", "0.71855", "0.71300143", "0.7091477", "0.70878196", "0.7074374", "0.70355844", "0.7018985", "0.69908035", "0.6936479", "0.6889757", "0.6886833", "0.68394923", "0.68373245", "0.6801198", "0.67898864", "0.6786653", "0.67862964", "0.6768081", "0.67291176", "0.6703456", "0.67028016", "0.6690577", "0.6660264", "0.66501796", "0.66426694", "0.6638601", "0.66288567", "0.66188735", "0.66115063", "0.66108066", "0.66025096", "0.6578746", "0.65728885", "0.6560074", "0.6549984", "0.6545969", "0.6539625", "0.653908", "0.6536028", "0.6528034", "0.65197814", "0.65187055", "0.6518212", "0.65101683", "0.6490511", "0.64869726", "0.64798", "0.6466752", "0.64514416", "0.6447628", "0.64463305", "0.6430436", "0.64296794", "0.6429378", "0.64232796", "0.6419467", "0.6419345", "0.64193445", "0.6418262", "0.64136153", "0.6397923", "0.6397605", "0.63965356", "0.63950974", "0.63929135", "0.63872135", "0.6385918", "0.6383452", "0.63705", "0.63647515", "0.63599527", "0.6359602", "0.63565665", "0.6340091", "0.6336319", "0.63312495", "0.6314541", "0.6313466", "0.6302218", "0.63000894", "0.6296811", "0.6296783", "0.6286434", "0.628028", "0.6279916", "0.62797654", "0.6274687", "0.6274457", "0.6274288", "0.6267523", "0.6262183", "0.6257255", "0.6253771", "0.62522644" ]
0.67383844
24
Buscar um carro pelo id.
public Carro getCarro(Long id){ try { return db.getCarroById(id); } catch(SQLException ex) { ex.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public Assunto buscarId(int id) {\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.id =:id\");\r\n query.setParameter(\"id\", id);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }", "Persona buscarPersonaPorId(Long id) throws Exception;", "@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public static Comentario buscar(Integer id)\n {\n String idComentario = id.toString();\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario where u.id='\"+idComentario+\"'\";\n Comentario comentario = (Comentario)sessionRecheio.createQuery(hql).uniqueResult();\n tr.commit();\n return comentario;\n }", "public Object buscarPorId(Long id) {\n\t\treturn null;\n\t}", "public Ingrediente buscar(int id) {\n\n\t\tConnection conn = null;\n\t\tResultSet resultSet = null;\n\t\tPreparedStatement stmt = null;\n\t\tconn = getConnection();\n\t\tIngrediente ingrediente = null;\n\t\ttry {\n\t\t\tstmt = conn\n\t\t\t\t\t.prepareStatement(\"SELECT * FROM INGREDIENTE WHERE IDINGREDIENTES = ?\");\n\t\t\tstmt.setInt(1, id);\n\t\t\tresultSet = stmt.executeQuery();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tingrediente = new Ingrediente();\n\t\t\t\tingrediente.setIdIngredientes(resultSet\n\t\t\t\t\t\t.getInt(\"idIngredientes\"));\n\t\t\t\tingrediente.setNome(resultSet.getString(\"nome\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tcloseConnection(conn, stmt, resultSet);\n\t\t}\n\t\treturn ingrediente;\n\t}", "public Equipamento buscarPorId(long id) {\r\n\t\t\tthis.conexao.abrirConexao();\r\n\t\t\tString sqlBuscarPorId = \"SELECT * FROM equipamentos WHERE id_equipamentos=?\";\r\n\t\t\tEquipamento eq = null;\r\n\t\t\ttry {\r\n\t\t\t\tPreparedStatement statement = (PreparedStatement) this.conexao.getConexao().prepareStatement(sqlBuscarPorId);\r\n\t\t\t\tstatement.setLong(1, id);\r\n\t\t\t\tResultSet rs = statement.executeQuery();\r\n\t\t\t\t// CONVERTER O RESULTSET EM UM OBJETO USUARIO\r\n\t \t\t\tif(rs.next()) {\r\n\t\t\t\t\teq = new Equipamento();\r\n\t\t\t\t\teq.setId(rs.getLong(\"id_equipamentos\"));\r\n\t\t\t\t\teq.setDescricao(rs.getString(\"descricao\"));\r\n\t\t\t\t\teq.setUsuario(usuDAO.buscarPorId(rs.getLong(\"id_usuario\")));\r\n\t\t\t\t\teq.setNome(rs.getString(\"nome\"));\r\n\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} finally {\r\n\t\t\t\tthis.conexao.fecharConexao();\r\n\t\t\t}\t\t\r\n\t\t\treturn eq;\r\n\t\t}", "public Coche consultarUno(int id) {\n Coche coche =cochedao.consultarUno(id);\r\n \r\n return coche;\r\n }", "public Fila carregar(int id) throws IOException{\t\t\n\t\treturn dao.carregar(id);\n\t}", "@Override\n\tpublic Agendamento buscarPorId(Long id) {\n\t\treturn null;\n\t}", "public Setor buscar(Integer id) {\n\t\tString sql = \" SELECT s.id, s.descricao FROM setor s WHERE id = \" + id + \"; \";\n\n\t\tSetor setor = new Setor();\n\n\t\ttry (Statement sttm = con.createStatement(); ResultSet rs = sttm.executeQuery(sql);) {\n\t\t\tif (rs.next()) {\n\t\t\t\tsetor.setId(id);\n\t\t\t\tsetor.setDescricao(rs.getString(\"descricao\"));\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn setor;\n\t}", "@Override\n public Venda Buscar(int id) {\n Venda v;\n\n v = em.find(Venda.class, id);\n\n// transaction.commit();\n return v;\n }", "public TipoManobras buscarId(int id){\n\t\t\n\t\treturn tipoManobrasDao.buscarPorId(id);\n\t\t\n\t}", "public Proveedor buscarPorId(Integer id) {\r\n\r\n if (id != 22 && id < 123) {\r\n\r\n return ServiceLocator.getInstanceProveedorDAO().find(id);\r\n }\r\n return null;\r\n\r\n }", "DetalleVenta buscarDetalleVentaPorId(Long id) throws Exception;", "@Override\n\t\tpublic Cliente buscarPorId(int id) throws ExceptionUtil {\n\t\t\treturn daoCliente.buscarPorId(id);\n\t\t}", "long buscarAnterior(long id);", "public Reporteador buscarPorId(Integer id)\r\n/* 192: */ {\r\n/* 193:209 */ return (Reporteador)this.reporteadorDao.buscarPorId(id);\r\n/* 194: */ }", "@Override\n\tpublic Marca obtener(int id) {\n\t\treturn marcadao.obtener(id);\n\t}", "public Producto BuscarProducto(int id) {\n Producto nuevo = new Producto();\n try {\n conectar();\n ResultSet result = state.executeQuery(\"select * from producto where idproducto=\"+id+\";\");\n while(result.next()) {\n \n nuevo.setIdProducto((int)result.getObject(1));\n nuevo.setNombreProducto((String)result.getObject(2));\n nuevo.setFabricante((String)result.getObject(3));\n nuevo.setCantidad((int)result.getObject(4));\n nuevo.setPrecio((int)result.getObject(5));\n nuevo.setDescripcion((String)result.getObject(6));\n nuevo.setSucursal((int)result.getObject(7));\n }\n con.close();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n return nuevo;\n }", "@Override\n\tpublic Cliente buscarPorId(int id) throws ExceptionUtil {\n\t\treturn daoCliente.buscarPorId(id);\n\t}", "@Override\r\n\tpublic Celular buscarPeloId(String id) throws Exception {\n\t\treturn null;\r\n\t}", "public Aluguel read(int id) {\n MongoCursor<Document> cursor = collection.find().iterator();\r\n Aluguel aluguel = null;\r\n List<Aluguel> alugueis = new ArrayList<>();\r\n if (cursor.hasNext()) {\r\n aluguel = new Aluguel().fromDocument(cursor.next());\r\n alugueis.add(aluguel);\r\n }\r\n alugueis.forEach(a -> System.out.println(a.getId()));\r\n return aluguel;\r\n }", "public String getDenumireCaroserie(int id) {\n c = db.rawQuery(\"select denumire from caroserii where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }", "public String FindById(int id) throws SQLException{\n\t\t\tString req =\"Select NomGroupe from Groupe where ID_Groupe= ? \";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setInt(1,id);\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\trs.next();\n\t\t\treturn rs.getString(1);\t\n\t\t\t\n\t\t}", "public Cliente carregarPorId(int id) throws Exception {\n \n Cliente c = new Cliente();\n String sql = \"SELECT * FROM cliente WHERE idCliente = ?\";\n PreparedStatement pst = conn.prepareStatement(sql);\n pst.setInt(1, id);\n ResultSet rs = pst.executeQuery();\n if (rs.next()) {\n c.setIdCliente(rs.getInt(\"idCliente\"));\n c.setEndereco(rs.getString(\"endereco\"));\n c.setCidade(rs.getString(\"cidade\"));\n c.setDdd(rs.getInt(\"ddd\"));\n c.setNome(rs.getString(\"nome\"));\n c.setUf(rs.getString(\"uf\"));\n c.setTelefone(rs.getString(\"telefone\"));\n Empresa e = new Empresa();\n EmpresaDAO ePB = new EmpresaDAO();\n ePB.conectar();\n e = ePB.carregarPorCnpj(rs.getString(\"Empresa_cnpj\"));\n ePB.desconectar();\n Usuario p = new Usuario();\n UsuarioDAO pPB = new UsuarioDAO();\n pPB.conectar();\n p = pPB.carregarPorId(rs.getInt(\"Usuario_idUsuario\"));\n pPB.desconectar();\n c.setEmpresa(e);\n c.setUsuario(p);\n }\n return c;\n }", "@Override\n\tpublic void llenarPorId(Object id) {\n\t\t\n\t}", "@GET(\"/empresa/buscarPorId/{id}\")\n public void buscarPorId(@Path(\"id\") long id, Callback<Empresa> callback);", "public String getCopii(int id) {\n String denumiri=new String();\n String selectQuery = \"SELECT denumire FROM copii WHERE id=\"+id;\n Cursor cursor = db.rawQuery(selectQuery, new String[]{});\n if (cursor.moveToFirst()) {\n do {\n denumiri = cursor.getString(0);\n } while (cursor.moveToNext());\n }\n return denumiri;\n }", "protected Lotofacil buscarLotofacilId(long id) {\r\n\t\treturn LotofacilListagemResultados.repositorio.buscarLotofacilId(id);\r\n\t}", "Optional<Lembretes> buscarPorId(Long id);", "@Override\n\tpublic Optional<CursoAsignatura> listarId(int id) {\n\t\treturn null;\n\t}", "public OfertaDisciplina buscar(Long id) {\n return ofertaDisciplinaFacade.find(id);\n }", "public Empleado buscarPorId(Short idEmpleado) {\n\t\tEmpleado empleado;\n\t\templeado = entityManager.find(Empleado.class, idEmpleado);\n\t\t//JPAUtil.shutdown();\n\t\treturn empleado;\n\t}", "public String obtemValor(String id) {\n return obtemValor(By.id(id));\n }", "Optional<Lancamento> buscarPorId(Long id);", "@RequestMapping(method=RequestMethod.GET,value=\"/{id}\",consumes=MediaType.APPLICATION_JSON_VALUE, produces=MediaType.APPLICATION_JSON_VALUE)\r\n\tpublic ResponseEntity<Producto> buscarPorId(@PathVariable Integer id){\r\n\t\tProducto productoBuscado=dao.buscar(id);\r\n\t\treturn new ResponseEntity<Producto>(productoBuscado,HttpStatus.OK);\r\n\t}", "@Override\n\tpublic Carpo findCar(String id) {\n\t\treturn inList.find(id);\n\t}", "@GetMapping(\"/clientes/{id}\")\n\tpublic Cliente buscarXid(@PathVariable Integer id) {\n\t\tCliente cliente = null;\n\t\ttry {\n\t\t\tcliente = this.getClienteService().findById(id);\n\t\t} catch (ExceptionService e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn cliente;\n\t}", "public static Carta getById(int id) {\r\n\r\n\t\tCarta c = new Carta();\r\n\t\tString sql = SQL_JOIN + \" WHERE id = ?; \";\r\n\r\n\t\ttry (Connection con = ConnectionHelper.getConnection(); PreparedStatement pst = con.prepareStatement(sql)) {\r\n\r\n\t\t\tpst.setInt(1, id);\r\n\t\t\ttry (ResultSet rs = pst.executeQuery()) {\r\n\r\n\t\t\t\twhile (rs.next()) { // hemos encontrado Participante por su ID\r\n\r\n\t\t\t\t\tc = mapper(rs);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn c;\r\n\t}", "@Override\n\t\tpublic Carrera get(int id) {\n\t\t\t\treturn null;\n\t\t}", "@Override\n public Object recuperarElemento(Class clase, long id) {\n Query query = database.query();\n query.constrain(clase);\n query.descend(\"id\").constrain(id);\n ObjectSet result = query.execute();\n if (result.hasNext())\n return result.next();\n else return null;\n }", "Object getDados(long id);", "@Override\n\tpublic Usuario buscarPorId(int id){\n\t\treturn em.find(Usuario.class, id);\n\t}", "public Maquina buscarPorId(int idMaquina)\r\n/* 29: */ {\r\n/* 30: 63 */ return (Maquina)this.maquinaDao.buscarPorId(Integer.valueOf(idMaquina));\r\n/* 31: */ }", "public Citas getCita(int id) {\n Citas c = new Citas();\n try {\n PreparedStatement pstm = null;\n ResultSet rs = null;\n String query = \"SELECT *FROM paciente WHERE id_paciente=?\";\n pstm = con.prepareStatement(query);\n pstm.setInt(1, id);\n rs = pstm.executeQuery();\n while (rs.next()) {\n c.setId(rs.getInt(\"id_paciente\"));\n c.setName(rs.getString(\"name\"));\n c.setDoctor(rs.getString(\"doctor\"));\n c.setFecha(rs.getString(\"fecha\"));\n c.setHora(rs.getString(\"hora\"));\n c.setTel(rs.getString(\"tel\"));\n c.setCorreo(rs.getString(\"correo\"));\n c.setGenero(rs.getString(\"genero\"));\n c.setMotivo(rs.getString(\"motivo\"));\n c.setSintomas(rs.getString(\"sintomas\"));\n } \n }catch (SQLException ex) {\n ex.printStackTrace();\n }\n return c;\n }", "public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }", "@Override\n public Venta BuscarporID(int ID) {\n DAOUsuarios dao_e = new DAOUsuarios();\n try {\n sql = \"SELECT * FROM VENTA WHERE idventa=\"+ID;\n conex=getConexion();\n pstm=conex.prepareStatement(sql);\n rsset=pstm.executeQuery();\n \n Usuario ne;\n Venta ven = null;\n \n while(rsset.next()){\n int numventa = rsset.getInt(1);\n String fechaE = rsset.getString(4);\n ne = dao_e.BuscarporID(rsset.getInt(2));\n \n List<DET_Venta> compras = Ver_DET_VENTAS(numventa);\n ven = new Venta(rsset.getString(1),rsset.getDouble(5), fechaE, ne,null,compras); \n }\n return ven;\n } catch (SQLException | ClassNotFoundException ex) {\n Logger.getLogger(DAOVentas.class.getName()).log(Level.SEVERE, null, ex);\n }finally{\n try {\n conex.close();\n pstm.close();\n rsset.close();\n } catch (SQLException ex) {\n Logger.getLogger(DAOVentas.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return null;\n }", "@Override\n\tpublic Iscrizioni findById(Integer id)\n\t\t\tthrows ClassNotFoundException, SQLException, NotHandledTypeException, NamingException, ParseException {\n\t\treturn em.find(Iscrizioni.class, id);\n//\t\tIscrizioni corso = new Iscrizioni();\n//\n//\t\tObject[] campi = { id };\n//\n//\t\tString sql = \"SELECT * FROM `iscrizioni` WHERE `idIscrizione` = ? \";\n//\t\tDBHandler dbHandler = new DBHandler();\n//\t\tdbHandler.sql(sql, campi);\n//\t\tList<Object> objs = dbHandler.getResponse();\n//\t\tfor (Object obj : objs) {\n//\t\t\tObject[] tmp = (Object[]) obj;\n//\t\t\tcorso = new Iscrizioni((int) tmp[0],(int) tmp[1], (int) tmp[2], (int) tmp[3]);\n//\t\t}\n//\t\treturn corso;\n\t}", "public String getDenumireCombustibil(String id){\n c = db.rawQuery(\"select denumire from combustibil where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }", "private void thenLaPuedoBuscarPorSuId(Long id) {\n\tIngrediente ingredienteBuscado = session().get(Ingrediente.class, id);\t\n\tassertThat(ingredienteBuscado).isNotNull();\n\t}", "@Override\n\tpublic ExamenDTO obtenerPorId(Integer id) {\n\t\treturn null;\n\t}", "public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }", "public RecepcionSero getSerologiaById(String id)throws Exception{\n Session session = sessionFactory.getCurrentSession();\n Query query = session.createQuery(\"from RecepcionSero s where s.id= :id \");\n query.setParameter(\"id\", id);\n return (RecepcionSero) query.uniqueResult();\n }", "public String getDenumireBuget(String id){\n c = db.rawQuery(\"select denumire from buget where id='\" + id + \"'\", new String[]{});\n StringBuffer buffer = new StringBuffer();\n while (c.moveToNext()) {\n String denumire = c.getString(0);\n buffer.append(\"\" + denumire);\n }\n return buffer.toString();\n }", "public Contato getId(long id) {\r\n return execSqlDbGetContato(SELECT_FROM_PUBLIC_CONTATO.concat(\" \").concat(getSintaxeWhereId(id)));\r\n }", "public Cliente buscarClientePorDocumento(String id) throws ExceptionService {\n Optional<Cliente> verificar = repositorio.findById(Long.parseLong(id));\n if (verificar.isPresent()) { //verificamos que traiga un resultado\n Cliente cliente = verificar.get(); //con el get obtenemos del optional el objeto en este caso de tipo cliente\n return cliente;\n } else {\n throw new ExceptionService(\"no se encontro el cliente con el documento indicado\");\n }\n }", "@Override\n\tpublic Marca obtenernombre(int id) {\n\t\treturn null;\n\t}", "public o selectById(long id);", "@Override\n\tpublic BatimentoCardiaco get(long id) {\n\t\treturn null;\n\t}", "@GetMapping(\"/buscar/{idCapacitacion}\")\n\tpublic ResponseEntity<CapacitacionEntity> buscarPorId(@PathVariable Integer idCapacitacion){\n\t\t\n\t\ttry {\n\t\t\tCapacitacionEntity cap= new CapacitacionEntity();\n\t\t\tcap = iCapService.buscarPorid(idCapacitacion);\n\t\t\t\n\t\t\treturn new ResponseEntity<CapacitacionEntity>(cap, HttpStatus.OK);\n\t\t\n\t\t} catch (Exception e) {\n\t\t\treturn new ResponseEntity<CapacitacionEntity>(HttpStatus.INTERNAL_SERVER_ERROR);\n\t\t}\n\t}", "@Override\n\t@Transactional(readOnly = true)\n\tpublic ProdutoPedido buscarPorId(Long id) {\n\t\treturn dao.findById(id);\n\t}", "private void buscarCliente(String id) {\r\n\t\ttry {\r\n\t\t\tif(txtNif.getText().equals(\"\")){\r\n\t\t\t\tString mensaje = \"Por favor, introduce el nif\";\r\n\t\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"ERROR\", JOptionPane.ERROR_MESSAGE);\t\t\r\n\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.RED));\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tCliente cliente = new Cliente();\r\n\t\t\t\tcliente=manager.getClienteById(id);\r\n\t\t\t\tmodel.removeAllElements();\r\n\t\t\t\tif(cliente.getNif().equals(null)) {\r\n\t\t\t\t\tString mensaje = \"No existe ese cliente\";\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"NO EXISTE ESE CLIENTE\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.RED));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\tmodel.addElement(cliente);\t\t\t\t\r\n\t\t\t\tcliente.toString();\r\n\t\t\t\ttxtNif.setText(\"\");\r\n\t\t\t\ttxtNif.setBorder(BorderFactory.createLineBorder(Color.BLACK));\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\tString mensaje = \"No existe ese cliente\";\r\n\t\t\tJOptionPane.showMessageDialog(this, mensaje, \"ERROR\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\t}\t\t\r\n\t}", "RespuestaRest<ParqueaderoEntidad> consultar(String id);", "public List<Alumne> BuscarAlumneUF(UnitatFormativa id) {\r\n List<Alumne> p = null;\r\n try {\r\n System.out.println(\"Busqueda per id\");\r\n Query query = em.createNamedQuery(\"alumneUFMatricula\", Alumne.class);\r\n query.setParameter(\"id\", id);\r\n System.out.println(query.getResultList().size());\r\n p = (List<Alumne>) query.getResultList();\r\n if (p.isEmpty() || p == null) {\r\n throw new ExcepcionGenerica(\"ID\", \"Alumno\");\r\n }\r\n } catch (ExcepcionGenerica ex) {\r\n }\r\n return p;\r\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "public Paciente get( Long id ) {\r\n\t\t\tlogger.debug(\"Retrieving codigo with id: \" + id);\r\n\t\t\t\r\n\t\t\t/*for (Paciente paciente:codigos) {\r\n\t\t\t\tif (paciente.getId().longValue() == id.longValue()) {\r\n\t\t\t\t\tlogger.debug(\"Found record\");\r\n\t\t\t\t\treturn paciente;\r\n\t\t\t\t}\r\n\t\t\t}*/\r\n\t\t\t\r\n\t\t\tlogger.debug(\"No records found\");\r\n\t\t\treturn null;\r\n\t\t}", "Videogioco findVideogiocoById(int id);", "CounselorBiographyTemp findById( Integer id ) ;", "public Proyecto proyectoPorId(int id) {\n\t\t\tRestTemplate plantilla = new RestTemplate();\n\t\t\tProyecto proyecto =plantilla.getForObject(\"http://localhost:5000/proyectos/\" + id, Proyecto.class);\n\t\t\treturn proyecto;\n\t\t}", "@Path(\"{id}\") //Dizendo que vou receber um parametro da requisicao que vai vir pela uri\r\n\t@GET //Digo que esse metodo deve ser acessado usando GET\r\n\t@Produces(MediaType.APPLICATION_XML) //Digo que qual eh tipo do retorno,nesse caso XML\r\n\tpublic String busca( @PathParam (\"id\") long id ){\n\t\tCarrinho carrinho = new CarrinhoDAO().busca( id );\r\n\t\t\r\n\t\t\r\n\t\t//retorna um XML do objeto pego\r\n\t\treturn carrinho.toXML();\r\n\t\t\r\n\t}", "@GetMapping(value = \"/consultarByID\")\n public ResponseEntity consultar(@RequestParam Long id) {\n return empleadoService.consultar(id);\n }", "@Override\n\tpublic car getById(int id) {\n\t\ttry{\n\t\t\tcar so=carDataRepository.getById(id);\n\t\t\t\n\t\t\treturn so;\n\t\t\t}\n\t\t\tcatch(Exception ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t}", "public Producto buscarProducto(int id) throws Exception {\n ProductoLogica pL = new ProductoLogica();\n Producto producto = pL.buscarProductoID(id);\n return producto;\n }", "public void setID(String id){\n this.id = id;\n }", "public Comunidades(int id) {\n\t\tthis.setId(id);\n\t}", "@Override\n public ResultSet getByID(String id) throws SQLException {\n return db.getConnection().createStatement().executeQuery(\"select * from comic where idcomic=\"+id);\n }", "public String resultado(String id){\n try{\n Cursor cursor = database.rawQuery(\"select calificacion from calificacion where _id = ?\",new String[]{id});\n cursor.moveToFirst();\n resultado = cursor.getString(0);\n }catch (Exception e){\n Log.i(\"El error \", e.toString());\n }\n return resultado;\n }", "public Banca consultar(int id) throws Exception {\n // Verifica se o bean existe\n if(b == null)\n throw new Exception(Main.recursos.getString(\"bd.objeto.nulo\"));\n\n String sql = \"SELECT * FROM banca WHERE idBanca = \" + id;\n\n Transacao.consultar(sql);\n\n b.setAno(Transacao.getRs().getInt(\"ano\"));\n b.setDescricao(Transacao.getRs().getString(\"descricao\"));\n b.getTipoBanca().setIdTipoBanca(Transacao.getRs().getInt(\"idTipoBanca\"));\n b.getSubTipoBanca().setIdSubTipoBanca(Transacao.getRs().getInt(\"idSubTipoBanca\"));\n b.setIdLattes(Transacao.getRs().getInt(\"idLattes\"));\n b.setIdBanca(id);\n\n return b;\n }", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }" ]
[ "0.7698142", "0.7350386", "0.7344988", "0.7281977", "0.7271279", "0.7263124", "0.7194341", "0.7151999", "0.7072825", "0.70268136", "0.7003178", "0.6992024", "0.69861853", "0.691353", "0.69037336", "0.688855", "0.6882857", "0.6857848", "0.68424994", "0.6840178", "0.68169636", "0.68013877", "0.6780963", "0.6778343", "0.6762705", "0.6744033", "0.6702214", "0.670203", "0.66892296", "0.6687347", "0.66784126", "0.6672499", "0.66525775", "0.6648442", "0.66338325", "0.6617236", "0.65906894", "0.65738046", "0.65594494", "0.65479124", "0.65361637", "0.6534797", "0.652498", "0.6517277", "0.64929235", "0.64909714", "0.64907295", "0.6486623", "0.6486382", "0.64857626", "0.648341", "0.64765835", "0.6472592", "0.64623487", "0.6455601", "0.64347035", "0.6434139", "0.6432732", "0.6426013", "0.64245605", "0.6422474", "0.6412788", "0.6408643", "0.6393697", "0.63909644", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6381968", "0.6375684", "0.63736206", "0.6363695", "0.63632965", "0.6363027", "0.6361069", "0.6360203", "0.63530684", "0.63487506", "0.6348521", "0.6343336", "0.6342803", "0.63406366", "0.6338766", "0.6338766", "0.6338766" ]
0.6326987
100
Deletar um carro pelo id.
public boolean delete(Long id){ try { return db.delete(id); } catch(SQLException ex) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deletar(Integer id) {\n\t\t\n\t}", "void deletar(Long id);", "void eliminar(Long id);", "void unsetId();", "void deletById(Integer id);", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void eliminar(Integer id) {\n\t\t\n\t}", "@Override\r\n\tpublic void del(Integer id) {\n\t\t\r\n\t}", "public final void unpeel(final String id) {\n unpeel(new ArrayList<String>() {\n {\n add(id);\n }\n });\n }", "@Override\n\tpublic void del(Object id) {\n\n\t}", "@Override\n\tpublic void llenarPorId(Object id) {\n\t\t\n\t}", "public void eliminarTripulante(Long id);", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "void unsetID();", "public void removeByid_(long id_);", "@Override\n public void delete(int id) {\n repr.delete(id);\n }", "public void remove(Integer id) {\n\t\t\r\n\t}", "void remover(Long id);", "void remover(Long id);", "protected void excluirLotofacil(long id) {\r\n\t\tLotofacilListagemResultados.repositorio.Deletar(id);\r\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "public void delete(int id) {\n\n\t}", "public void remove(String id) {\n\t\t\n\t}", "public void remove(Integer id) {\n\r\n\t}", "public void eliminar(Long id) throws AppException;", "void remove(Long id);", "void remove(Long id);", "public void delete(Long id) {\n\r\n\t}", "@Override\r\n\tpublic int elimina(int id) throws Exception {\n\t\treturn 0;\r\n\t}", "public void setId( Long id );", "void remove(String id);", "void remove(String id);", "void remove(String id);", "void setId(int id) {\n this.id = id;\n }", "public String eliminarComentario(int id){\r\n\t\tcomDao.borrar(id);\r\n\t\tinit();\r\n\t\treturn null;\r\n\t}", "public String reviseID(String id)\n {\n return null;\n }", "void setId(final Long id);", "public void delete(Integer id) {\n\r\n\t}", "public void setId(int id){ this.id = id; }", "void remove(int id);", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public void delUtente(int id);", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "@Override\r\n\tpublic void delete(String id) {\n\t\t\r\n\t}", "@Override\n\tpublic String delete(Integer id) {\n\t\treturn null;\n\t}", "public void setId (String id) {\n this.id = id;\n }", "public void setId (String id) {\n this.id = id;\n }", "public void setId(ID id)\n {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setID(String id){\n this.id = id;\n }", "public void delById(Serializable id) ;", "private void setId(Integer id) { this.id = id; }", "@Override\r\n\tpublic Result delete(int id) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic void excluir(int id) throws Exception {\n\t\t\r\n\t}", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(final int id);", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setId(String id)\n {\n this.id = id;\n }", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "void delete(String id);", "public void pesquisarId(Integer id) {\n\t\t\n\t}", "@Override\n\tpublic void remove(int id) {\n\n\t}", "public void setId(int id)\n {\n\tthis.id = id;\n }", "public void setId(int id) {\n this.id = id;\n\t}", "public void setId( Long id ) {\n this.id = id ;\n }", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id)\n {\n this.id=id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(String id) {\r\n this.id = id;\r\n }", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id = id;\n }", "@Override\r\n\tpublic void delete(int id) {\n\t\t\r\n\t}", "public void setID(int id)\r\n {\r\n\tthis.id = id;\r\n }", "public void setId(String id) {\n this.id = id;\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }" ]
[ "0.7976814", "0.7919194", "0.7392562", "0.72985476", "0.7216839", "0.7191326", "0.7191326", "0.7189509", "0.7173158", "0.71274424", "0.7089937", "0.7083176", "0.70317316", "0.70077074", "0.70068634", "0.699624", "0.6991805", "0.6983663", "0.6959745", "0.6959745", "0.69495", "0.6941761", "0.6941761", "0.6941761", "0.6941761", "0.6941761", "0.6941761", "0.6941761", "0.69222116", "0.69135576", "0.6865102", "0.68588537", "0.68562984", "0.68562984", "0.6855477", "0.6848932", "0.6841399", "0.6827033", "0.6827033", "0.6827033", "0.68232006", "0.68173605", "0.68162376", "0.6814282", "0.6807145", "0.67998105", "0.6791485", "0.6790965", "0.6790965", "0.67894894", "0.6786051", "0.67797476", "0.6776968", "0.67717916", "0.67717916", "0.67712885", "0.67690253", "0.6761474", "0.6761474", "0.67555296", "0.67551994", "0.67551994", "0.67547643", "0.6752881", "0.67528623", "0.6751765", "0.67503715", "0.673404", "0.673404", "0.6729111", "0.67280954", "0.67280954", "0.67273146", "0.67269427", "0.67269427", "0.67269427", "0.67269427", "0.67269427", "0.67269427", "0.6720616", "0.67175", "0.67150664", "0.671355", "0.67131597", "0.671055", "0.6707829", "0.6706442", "0.6705057", "0.6705057", "0.6705057", "0.6705057", "0.6705057", "0.6705057", "0.6704967", "0.6701411", "0.6701411", "0.67005557", "0.6697756", "0.66954136", "0.6694979", "0.6694979" ]
0.0
-1
Salvar ou atualizar um carro pelo id.
public boolean save(Carro carro){ try { db.save(carro); return true; } catch(SQLException ex) { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void salvaRisposta(Risposta risposta) {\n\t\tint lastID = getLastIDRisposte()+1;\n\t\trisposta.setId(lastID);\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\tlong hash = (long) risposta.getId().hashCode();\n\t\trisposte.put(hash, risposta);\n\t\tdb.commit();\n\t}", "public static void atualizar(int id, String nome){\n System.out.println(\"Dados atualizados!\");\n }", "int updateNavegacionSalida(final Long srvcId);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "private void salvar() {\n setaCidadeBean();\n //Instanciamos o DAO\n CidadeDAO dao = new CidadeDAO();\n //verifica qual será a operação de peristência a ser realizada\n if (operacao == 1) {\n dao.inserir(cidadeBean);\n }\n if (operacao == 2) {\n dao.alterar(cidadeBean);\n }\n habilitaBotoesParaEdicao(false);\n reiniciaTela();\n }", "public void setId( Long id );", "void setId(ID id);", "public static boolean saveOrUpdate(Object obj, int id) {\r\n boolean retorno = true;\r\n Session sessao = null;\r\n\r\n try {\r\n sessao = HibernateUtil.getSessionFactory().openSession();\r\n Transaction t = sessao.beginTransaction();\r\n\r\n if (id == 0) {\r\n sessao.save(obj);\r\n } else {\r\n sessao.update(obj);\r\n }\r\n t.commit();\r\n\r\n } catch (Exception ex) {\r\n DaoLog.saveLog(new Log(NewLogin.usuarioLogado.getNome(), \"Erro \" + ex + \" no objeto \" + obj.getClass() + \"!\"), 0);\r\n retorno = false;\r\n } finally {\r\n sessao.close();\r\n }\r\n return retorno;\r\n }", "public void alterar(int id) {\r\n\t\ttry {\r\n\t\t\tbd.getConnection();\r\n\t\t\tString nome, apelido, mascote;\r\n\t\t\tsmt = bd.conn.createStatement();\r\n\t\t\t\r\n\t\t\tutil.p2(\"Nome da Equipe: \"); \r\n\t\t\tnome = dados.nextLine();\r\n\t\t\t\t\t\r\n\t\t\tutil.p2(\"Apelido: \"); \r\n\t\t\tapelido = dados.nextLine();\r\n\t\t\t\r\n\t\t\tutil.p2(\"Mascote: \");\r\n\t\t\tmascote = dados.nextLine();\t\r\n\t\t\t\r\n\t\t\tsql = \"UPDATE equipes set \" \r\n\t\t\t\t+ \"nome= '\" + nome + \"' , \" \r\n\t\t\t\t+ \"apelido= '\" + apelido + \"' , \" \r\n\t\t\t\t+ \"mascote= '\" + mascote + \"' \"\r\n\t\t\t\t+ \"where id=\" + id;\r\n\t\t\t\r\n\t\t\tsmt.execute(sql);\r\n\t\t\t\r\n\t\t\tutil.l();\r\n\t\t\tutil.p(\"Equipe alterada com sucesso!\");\r\n\t\t\t\r\n\t\t\tbd.conn.close();\r\n\t\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\t\r\n\t\t\tutil.p(\"Erro: \" + e.getMessage());\r\n\t\t\t\r\n\t\t}\r\n\t}", "public static void promuovi_utente(int id) {\r\n\t\ttry {\r\n\t\tDatabase.connect();\r\n\t\tDatabase.updateRecord(\"utente\", \"utente.ruolo=2\", \"utente.id=\"+id); \t\t\r\n\t\tDatabase.close();\t\r\n\t\t}catch(NamingException e) {\r\n \t\tSystem.out.println(e);\r\n }catch (SQLException e) {\r\n \tSystem.out.println(e);\r\n }catch (Exception e) {\r\n \tSystem.out.println(e); \r\n }\r\n\t}", "@Override\n\tpublic void saveTOU(String id, String vno) {\n\t\tPreparedStatement stmt = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_SAVE_TOU);\n\t\t\tstmt.setString(1, id);\n\t\t\tstmt.setString(2, vno);\n\t\t\tstmt.setBoolean(3, false);\n\t\t\tint result = stmt.executeUpdate();\n\t\t\tif (result != 1)\n\t\t\t\tthrow new DomainObjectWriteException(String.format(\n\t\t\t\t\t\t\"Write failed, %d rows affected.\", result));\n\t\t}catch (Exception e) {\n\t\t\tLog.e(\"exc\", e.getMessage());\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public void salvarDadosUsuario(String idUsuario){\n editor.putString(CHAVE_ID, idUsuario);\n editor.commit();\n }", "void setId(Long id);", "public void assignId(int id);", "int updateEstancia(final Long srvcId);", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "private void payReservation(int id) throws SQLException {\n\t\tupdateReservationPaidStatement.clearParameters();\n\t\tupdateReservationPaidStatement.setInt(1, id);\n\t\tupdateReservationPaidStatement.executeUpdate();\n\t}", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public void salvarProfessor(){\n \n this.professor.setName(nome);\n this.professor.setEmail(email);\n this.professor.setSenha(senha);\n\n try {\n \n this.professorServico.persistence(this.professor);\n \n } catch (CadastroUsuarioException ex) {\n \n //Precisa tratar aqui!\n }\n \n setNome(null);\n setEmail(null);\n setSenha(null);\n }", "public void setId(Long id) {\n\t\t\n\t}", "public void enrolStudent(String id) {\r\n System.out.println(\"conectado con model ---> metodo enrolStudent\");\r\n //TODO\r\n }", "public void setID(long id);", "void setId(Integer id);", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(int idNuevo)\n { \n this.id = idNuevo;\n }", "public void salvarAluno() {\n \n this.aluno.setName(nome);\n this.aluno.setEmail(email);\n this.aluno.setSenha(senha);\n\n try {\n \n this.alunoServico.persistence(this.aluno);\n \n } catch (CadastroUsuarioException ex) {\n \n //Precisa tratar aqui!\n }\n \n setNome(null);\n setEmail(null);\n setSenha(null);\n\n }", "public boolean salvarVeiculo(Veiculo veiculo){\n\t\treturn veiculoDAO.persist(veiculo);\n\t\t\n\t}", "public void setId(ID id)\n {\n this.id = id;\n }", "public void setId(int id);", "public void setId(int id);", "void setId(int id);", "boolean agregarSalida(Salida s) {\n boolean hecho = false;\n try {\n operacion = ayudar.beginTransaction();\n ayudar.save(s);\n operacion.commit();\n } catch (Exception e) {\n operacion.rollback();\n System.out.println(e);\n }\n return hecho;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "@Override\r\n\tpublic void salvar(Registro registro) {\n\t\t\r\n\t}", "public void setId(int id)\n {\n this.id=id;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "void setId(final Long id);", "public void setId(final int id);", "public void setId(int id){ this.id = id; }", "public void setId(long id) {\n\tthis.id = id;\n }", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public void pesquisarId(Integer id) {\n\t\t\n\t}", "@RequestMapping(value = \"/{id}\", method = RequestMethod.PUT)\n\t\tpublic ResponseEntity<Void> atualizar(@RequestBody Pedido obj, @PathVariable Integer id) {\n\t\t\ttry {\n\t\t\t\tobj = service.atualiza(obj);\n\t\t\t} catch (Exception e) {\n\t\t\t\tobj = null;\n\t\t\t}\n\n\t\t\treturn ResponseEntity.noContent().build();\n\t\t}", "public void setId(long id) {\n id_ = id;\n }", "public void setId(Long id) \n {\n this.id = id;\n }", "public void salvar() {\n\n try {\n ClienteDao fdao = new ClienteDao();\n fdao.Salvar(cliente);\n\n cliente = new Cliente();\n//mesagem para saber se foi salvo com sucesso\n JSFUtil.AdicionarMensagemSucesso(\"Clente salvo com sucesso!\");\n\n } catch (RuntimeException e) {\n JSFUtil.AdicionarMensagemErro(\"ex.getMessage()\");\n e.printStackTrace();\n }\n }", "@Override\n\tpublic int update(int id) {\n\t\treturn rolDao.update(id);\n\t}", "@Override\n\tpublic void saveDriverSalary(String id) throws RemoteException, DatabaseNULLException {\n\t\tDriverPO po=driverDataService.getDriver(id);\n\t\tpo.setPaid(true);\n\t\tdriverDataService.changeDriver(po);\n\t\t\n\t}", "public void save() {\r\n\t\tString checkQuery = \"SELECT * FROM users WHERE id = \" + this.id;\r\n\t\tStatement stm;\r\n\t\tResultSet rs = null;\r\n\t\ttry {\r\n\t\t\tconnection = DBConnection.getConnection();\r\n\t\t\tstm = connection.createStatement();\r\n\t\t\trs = stm.executeQuery(checkQuery);\r\n\t\t\t// istnieje już ten obiekt - update\r\n\t\t\tif (rs.first()) {\r\n\t\t\t\tString query = \"UPDATE users SET name = \" + toStringOrNULL(name)\r\n\t\t\t\t\t\t+ \", password = \" + toStringOrNULL(password)\r\n\t\t\t\t\t\t+ \", is_admin = \" + isAdmin \r\n\t\t\t\t\t\t+ \", removed_at = \" + toStringOrNULL(removedAt) \r\n\t\t\t\t\t\t+ \" WHERE id = \" + getId();\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t\t// jeszcze go nie ma - zapis nowego\r\n\t\t\telse {\r\n\t\t\t\tString query = \"INSERT INTO users (name, password, removed_at, is_admin) VALUES (\"\r\n\t\t\t\t\t\t+ toStringOrNULL(name) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(password) + \", \"\r\n\t\t\t\t\t\t+ toStringOrNULL(removedAt) + \", \"\r\n\t\t\t\t\t\t+ isAdmin + \")\";\r\n\t\t\t\texecuteNonReturningQuery(query);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tconnection.close();\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void write(String id);", "public void setId(long id) {\r\n this.id = id;\r\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id)\n {\n\tthis.id = id;\n }", "public void save() {\r\n\t\tGame.getInstance().getInventory().add(id);\r\n\t}", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setID(int id);", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "void setId(final Integer id);", "@Override\n\tpublic void setId(long id) {\n\t\tthis.id = id;\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id){\n\t\tthis.id = id;\n\t}", "private void setId(Integer id) { this.id = id; }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "@Override\n public void salvar(EntidadeDominio entidade) throws SQLException\n {\n\t\n }", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id = id;\n }", "@Override\n\tpublic void salvar(ProdutoPedido produtoPedido) {\n\t\tdao.save(produtoPedido);\n\t}", "int updateId(T data, ID newId) throws SQLException, DaoException;", "public void setId( Long id ) {\n this.id = id ;\n }", "public void setId(Long id)\r\n {\r\n this.id = id;\r\n }", "public void setId(Long id) {\n\tthis.id = id;\n }", "public void commitTransaction(long id) throws RelationException;", "public void setId(int id) {\n this.id = id;\n\t}", "@Override\n\tpublic void votaRisposta(Integer id, int voto) {\n\t\t\n\t\tDB db = getDB();\n\t\tMap<Long, Risposta> risposte = db.getTreeMap(\"risposte\");\n\t\tlong hashCode = id.hashCode();\n\t\tRisposta risposta = risposte.get(hashCode);\n\t\trisposta.setVoto(voto);\n\t\trisposte.put(hashCode, risposta);\n\t\tdb.commit();\n\t}", "public abstract void setId(int id);", "public void cerrandoSesion(){\n String fechaActual = formatedorFecha.format(new java.util.Date());\n\n SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();\n ContentValues values = new ContentValues();\n values.put(\"fecFin\",fechaActual);\n String[] args = new String[]{String.valueOf(idSesion)};\n\n try{\n sqLiteDatabase.update(\"sesiones\",values,\"id=? \",args);\n\n }catch (SQLException ex){\n System.out.println(\"Error al actualizar el idMongo del usuario en la bd local\");\n }\n\n\n idSesion = NO_HAY_SESION;\n }", "public void setId(Long id)\n {\n this.id = id;\n }", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId( Integer id )\n {\n this.id = id ;\n }", "@Override\n\tpublic void saveStudent(Student student) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\tif (student.getId() != 0) {\n\t\t// update the student\n\t\t\tcurrentSession.update(student);\n\t\t}\n\t\telse {\n\t\t\t// save the student\n\t\tcurrentSession.save(student);\n\t\t}\n\n\t}", "@Override\n public void salvar(Object pacienteParametro) {\n Paciente paciente;\n paciente = (Paciente) pacienteParametro;\n EntityManagerFactory factory = Persistence.createEntityManagerFactory(\"vesaliusPU\"); \n EntityManager em = factory.createEntityManager();\n em.getTransaction().begin();\n if(paciente.getIdPaciente() == 0){\n em.persist(paciente);\n }else{\n em.merge(paciente);\n }\n em.getTransaction().commit();\n em.close();\n factory.close();\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }" ]
[ "0.6563016", "0.65339303", "0.6428742", "0.63590795", "0.63590795", "0.63590795", "0.63590795", "0.63588786", "0.6309773", "0.6300472", "0.62823117", "0.62713194", "0.6271114", "0.62530476", "0.6242997", "0.6238322", "0.6189765", "0.6187886", "0.616165", "0.6126983", "0.6125179", "0.6125179", "0.61114323", "0.6107799", "0.6092086", "0.60889983", "0.6079927", "0.60702664", "0.60702664", "0.6068078", "0.60658413", "0.6064627", "0.60552627", "0.6055033", "0.6055033", "0.60516715", "0.6045892", "0.6042753", "0.60403115", "0.60403115", "0.6037738", "0.6018421", "0.6003357", "0.5992739", "0.5990877", "0.5985637", "0.59795356", "0.5974255", "0.5974255", "0.5965876", "0.59634733", "0.59590966", "0.59538126", "0.5951317", "0.5947855", "0.594739", "0.5943311", "0.5940126", "0.5935083", "0.5933299", "0.5930084", "0.5927214", "0.5919599", "0.5917414", "0.5917414", "0.591205", "0.5907505", "0.5906193", "0.59028596", "0.5901715", "0.5897932", "0.5897932", "0.5897609", "0.58955646", "0.589264", "0.589264", "0.589264", "0.589264", "0.589264", "0.58857566", "0.58828765", "0.58828765", "0.58824587", "0.58799696", "0.58748424", "0.58734053", "0.58601874", "0.5859536", "0.58589137", "0.5857158", "0.5856722", "0.58564323", "0.58524084", "0.58495", "0.5843716", "0.5843382", "0.5838185", "0.5828875", "0.5828875", "0.5828875", "0.5828875" ]
0.0
-1
Buscar um carro pelo nome.
public List<Carro> findByName(String name){ try { return db.findByName(name); } catch(SQLException ex) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vendedor buscarVendedorPorNome(String nome);", "@Override\n\tpublic Contato buscaContatoNome(String nome) {\n\t\treturn null;\n\t}", "public Assunto buscar(String nome){\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.nome =:nome\");\r\n query.setParameter(\"nome\", nome);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }", "public List<Filme> buscarPeloNome(String nome) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<Filme> consulta = gerenciador.createQuery(\r\n \"Select f from Filme f where f.nome like :nome\",\r\n Filme.class);\r\n\r\n //Substituindo o parametro :nome pelo valor da variavel n\r\n consulta.setParameter(\"nome\", nome + \"%\");\r\n\r\n //Retornar os dados\r\n return consulta.getResultList();\r\n\r\n }", "Ris(String nome) {\n this.nome = nome;\n }", "public String lerNome() {\n\t\treturn JOptionPane.showInputDialog(\"Digite seu Nome:\");\n\t\t// janela de entrada\n\t}", "public List<Usuario> buscaUsuarioNome(String nome) {\r\n\t\tList<Usuario> retorno = new LinkedList<Usuario>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tif (usuario.getNome().equals(nome)) {\r\n\t\t\t\tretorno.add(usuario);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "String getNome();", "private void enviarRequisicaoPerguntarNome() {\n try {\n String nome = NomeDialogo.nomeDialogo(null, \"Informe o nome do jogador\", \"Digite o nome do jogador:\", true);\n if (servidor.verificarNomeJogador(nome)) {\n nomeJogador = nome;\n comunicacaoServico.criandoNome(this, nome, \"text\");\n servidor.adicionarJogador(nome);\n servidor.atualizarLugares();\n } else {\n JanelaAlerta.janelaAlerta(null, \"Este nome já existe/inválido!\", null);\n enviarRequisicaoPerguntarNome();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public List<Contato> getContatosByName(String nome) throws SQLException {\n QueryBuilder<Contato, Integer> queryBuilder =\n contatoDao.queryBuilder();\n // the 'password' field must be equal to \"qwerty\"\n queryBuilder.where().like(\"(nome || sobrenome)\", \"%\"+nome+\"%\");\n // prepare our sql statement\n PreparedQuery<Contato> preparedQuery = queryBuilder.prepare();\n // query for all accounts that have \"qwerty\" as a password\n List<Contato> contatos = contatoDao.query(preparedQuery);\n\n return contatos;\n }", "public java.lang.String exibeMapeamento (java.lang.String nome) {\r\n return this._delegate.exibeMapeamento(nome);\r\n }", "List<Videogioco> retriveByNome(String nome);", "String getPrimeiroNome();", "public void setNombreCompleto(String nombreCompleto);", "@Quando(\"^insiro uma conta com nome \\\"(.*?)\\\" na rota \\\"(.*?)\\\"$\")\n\tpublic void insiro_uma_conta_com_nome(String nome, String rota) throws Throwable {\n\t\t\n\t\tvResponse = \n\t\tgiven()\n\t\t\t.header(\"Authorization\", \"JWT \" + BaseStep.token)\n\t\t\t.body(BaseStep.conta)\n\t\t\t.log().all()\n\t\t.when()\n\t\t\t.post(rota)\n\t\t.then()\n\t\t.log().all()\n\t\t;\n\t\t\n\t\tsetvResponse(vResponse);\n\t}", "public Boolean buscarNome(String nome){\n return this.resultado = statusChamadoDAO.buscarNome(nome);\n }", "@Override\n\tpublic String findOneByName(final String nombreParametro) {\n\t\tString valor = Constante.SPATIU;\n\t\tif (propriedadesRepository.findOneByName(nombreParametro) != null) {\n\t\t\tvalor = propriedadesRepository.findOneByName(nombreParametro).getValue();\n\t\t}\n\n\t\treturn valor;\n\t}", "public List<Funcionario> buscaPorNome(String nome) {\r\n session = HibernateConexao.getSession();\r\n session.beginTransaction().begin();\r\n// Query query=session.createSQLQuery(sqlBuscaPorNome).setParameter(\"nome\", nome);\r\n List list = session.createCriteria(classe).add(Restrictions.like(\"nome\", \"%\" + nome + \"%\")).list();\r\n session.close();\r\n return list;\r\n }", "public Tipo findByFullName(String nombre) throws TipoDaoException;", "Professor procurarNome(String nome) throws ProfessorNomeNExisteException;", "public Libro recupera(String nombre);", "public void setNome(String nomeAeroporto)\n {\n this.nome = nomeAeroporto;\n }", "public String getNombreCompleto();", "public void setNome(String nome) {\n this.nome = nome;\n }", "public void setNome(String nome) {\n this.nome = nome;\n }", "public void setNome(String nome) {\n this.nome = nome;\n }", "public Banco(String nome) { // essa linha é uma assinatura do metodo\n \tthis.nome = nome;\n }", "public void setNome(String nome) {\r\n this.nome = nome;\r\n }", "public void setNome(String nome) {\r\n this.nome = nome;\r\n }", "String getCognome();", "public void setNome(String nome) {\r\n\t\tthis.nome = nome;\r\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public String getNome();", "String getUltimoNome();", "public String getNome(){\n return preferencias.getString(CHAVE_NOME, null);\n }", "Filmes(String nome,String genero){\n\t\tthis.nome = nome;\n\t\tthis.genero = genero;\n\t}", "public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}", "public T findByName(String nume) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"nume\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setString(1, nume);\n\t\t\trs = st.executeQuery();\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "List<Funcionario> findByNomeCompletoIgnoreCaseContaining(String nomeCompleto);", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "public Fruitore(String nomeUtente)\r\n\t{\r\n\t\tthis.nomeUtente = nomeUtente;\r\n\t}", "@Override\n public Optional<Usuario> buscaPorNombre(String nombre){\n return usuarioRepository.buscaPorNombre(nombre);\n }", "public String abrirArquivo(String nome) {\n this.titulo = nome;\n try {\n return metodos.abrirArquivo(nome, this.nome);\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public MacchinaStatiFiniti(String nome)\r\n\t{\r\n\t\tthis.nome=nome;\r\n\t\tcorrente=null;\r\n\t}", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "public void asignarNombre(String name);", "public void setNome(String nome){\r\n this.nome = nome;\r\n }", "public List<Produto> findByNomeLike(String nome);", "public List<EUsuario> findByNome(String nome);", "public List<Cliente> findByNombreCli(String nombreCli);", "public CatalogoBean obtenerCatalogoPorNombre(String nombre) throws Exception;", "public void setNome (String nome) {\r\n\t\tthis.nome=nome;\r\n\t}", "public List<Usuario> buscarPorNombre(String nombre) throws SQLException {\n PreparedStatement preSt = connection.prepareStatement(USUARIOS_POR_NOMBRE);\n preSt.setString(1, \"%\" + nombre + \"%\");\n ResultSet result = preSt.executeQuery();\n\n List<Usuario> usuario = new LinkedList<>();\n\n while (result.next()) {\n usuario.add(new Usuario(\n result.getInt(Usuario.USUARIO_ID_DB_NAME),\n result.getString(Usuario.NOMBRE_DB_NAME),\n result.getString(Usuario.PROFESION_DB_NAME),\n result.getString(Usuario.PASSWORD_DB_NAME)\n ));\n }\n System.out.println(\"Usuarios: \" + usuario.size());\n return usuario;\n }", "@Override\n\tpublic Veiculo buscar(String placa) {\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(ARQUIVO))){\n\t\t\tString linha = reader.readLine();\n\t\t\twhile((linha = reader.readLine()) != null){\n\t\t\t\tString campos[] = linha.split(\";\");\n\t\t\t}\n\t\t}catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "public void setNome(String nome) {\r\n\t\t// QUALIFICADOR = THIS\r\n\t\tthis.nome = nome;\r\n\t}", "public void setNombreCompleto(String aNombreCompleto) {\r\n nombreCompleto = aNombreCompleto;\r\n }", "private Equipo buscarEquipoPorNombre(String buscado) {\n for (int i = 0; i < equipos.size(); i++) {\n if (equipos.get(i).getNombre().equalsIgnoreCase(buscado)) {\n return equipos.get(i);\n }\n }\n return null;\n }", "public void pesquisarNome() {\n\t\tSystem.out.println(this.nomePesquisa);\n\t\tthis.alunos = this.alunoDao.listarNome(this.nomePesquisa);\n\t\tthis.quantPesquisada = this.alunos.size();\n\t}", "String getName( String name );", "public static String createName(String race, String role) {\n InputStreamReader sr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(sr);\n String name = null;\n try {\n while (true) {\n name = br.readLine();\n if (name.isEmpty()) {\n System.out.println(\n \"- Ты можешь ввести что-угодно, но нельзя оставить героя совсем без имени. Что, в таком случае, барды и скальды будут воспевать в веках? Давай по-новой!\");\n } else {\n\n System.out.println(\"- Штош...\");\n System.out.println(race.toUpperCase() + \" в роли \" + role.toUpperCase() + \"А\" + \" по имени \"\n + name.toUpperCase() + \". кхм... не плохо, да.\");\n break;\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return name;\n }", "public void setNomeCodifica(String nomeCodifica){\n\t\tsetTipoCodifica(new TipoCodifica(nomeCodifica));\n\t}", "public void findByName() {\n String name = view.input(message_get_name);\n if (name != null){\n try{\n List<Customer> list = model.findByName(name);\n if(list!=null)\n if(list.isEmpty())\n view.showMessage(not_found_name);\n else\n view.showTable(list);\n else\n view.showMessage(not_found_error);\n }catch(Exception e){\n view.showMessage(incorrect_data_error);\n }\n } \n }", "Materia findMateriaByNome(String nome);", "public void nomeAluno(String na) {\n\t\tnomeAluno = na; \n\t}", "Optional<Restaurante> findFirstByNomeContaining(String nome);", "public Empresa retornaEmpresaPorNome (String nome) {\n\t\tEmpresa e = empresaRepository.findByNome(nome);\n\t\treturn e;\n\t}", "List<T> buscarTodosComNomeLower();", "public String getNome() {\r\n return nome;\r\n }", "public String getNome() {\r\n return nome;\r\n }", "public Tipo[] findByName(String nombre) throws TipoDaoException;", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "public Cosa findByNome(String isbn) {\r\n\t\tCosa cosa = (Cosa) jdbcTemplate.queryForObject(\r\n\t\t\t\t\"select * from persone where nome= ?\", new Object[] { isbn },\r\n\t\t\t\tnew CosaRowMapper());\r\n\t\treturn cosa;\r\n\t}", "@Query(value = \"SELECT * FROM FUNCIONARIO \" +\n \"WHERE CONVERT(upper(name), 'SF7ASCII') = CONVERT(upper(:name), 'SF7ASCII')\", nativeQuery = true)\n Optional<List<Funcionario>> findByNameIgnoreCase(String name);", "public Agenda(String nome) {\n\t\tthis.nome = nome;\n\t\tthis.compromisso = new ArrayList<>();\n\t}", "private static String getRegattaName() {\n\t\tString name = \"\";\n\n\t\tSystem.out.println(\"\\nPlease enter a name for the regatta...\");\n\t\tdo {\n\t\t\tSystem.out.print(\">>\\t\");\n\t\t\tname = keyboard.nextLine().trim();\n\t\t\tif(\"exit\".equals(name)) goodbye();\n\t\t} while(!isValidRegattaName(name) || name.length() == 0);\n\n\t\treturn name;\n\t}", "@Override\n\tpublic Autor findByName(String nombre) {\n\t\treturn _autorDao.findByName(nombre);\n\t}", "@Override\n\tpublic Ingreso getIngresoByName(String nameIngreso) {\n\t\treturn (Ingreso) getCxcSession().createQuery(\"from Ingreso where nombre = :nameIngreso\")\n\t\t\t\t.setParameter(\"nameIngreso\", nameIngreso).uniqueResult();\n\t}", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "public void insere (String nome)\n {\n //TODO\n }", "void setNome(String nome);", "public String getNome()\r\n\t{\r\n\t\treturn nome;\r\n\t}", "public String getNome()\r\n\t{\r\n\t\treturn nome;\r\n\t}", "@GET\n @Path(\"/caracteristique/{caractere}\")\n @Produces(MediaType.APPLICATION_JSON+\";charset=UTF-8\")\n public Caracteristique ListClientName(@PathParam(value=\"caractere\")String caractere) {\n return caractdao.findName(caractere);\n }", "@Override\n public Collection<Curso> findByNameCurso(String Name) throws Exception {\n Collection<Curso> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor, c.nombrecurso, c.claveprofesor,\"\n + \" c.clavealumno from curso c, persona p\\n\" +\n \"where c.idprofesor = p.id and UPPER(c.nombrecurso) like UPPER(?)\");\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n while (rs.next()) { \n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"),rs.getInt(\"idprofesor\"), rs.getString(\"nombreprofesor\"),rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n// } else {\n// retValue = new Curso(0,null,null,0,null);\n// }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "@Override\r\n\tpublic Plate findByName(String nom) {\n\t\treturn null;\r\n\t}", "public String inseriscinome()\n {\n String nome;\n \n do\n {\n System.out.println(\"--Inserisci il nome utente--\");\n nome=input.nextLine();\n }\n while(nome.isEmpty());\n \n return nome;\n }", "public void setName(String name) {\n\t\tthis.nome = name;\n\t}", "public Etiqueta buscador(String nombreEtiqueta){\n for(int i = 0;i < listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si coincide el nombre de la etiqueta, se retorna\n return this.listaEtiquetas.get(i);\n }\n }\n return null;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "Car findByName(String name);", "public void alterarDadosCadastraisNomeInvalido(String nome) {\n\t\tAlterarDadosCadastraisPage alterarDadosCadastraisPage = new AlterarDadosCadastraisPage(driver);\n\t\talterarDadosCadastraisPage.getInputNome().clear();\n\t\talterarDadosCadastraisPage.getInputNome().sendKeys(nome);\n\t\talterarDadosCadastraisPage.getButtonSalvar().click();\n\t}" ]
[ "0.7282873", "0.70373744", "0.6847783", "0.6752122", "0.65184", "0.64735466", "0.64669025", "0.6419459", "0.6403163", "0.62834007", "0.6257117", "0.6243344", "0.61714995", "0.61595666", "0.61472106", "0.6146145", "0.6131176", "0.60974133", "0.60959435", "0.60735804", "0.60652566", "0.601708", "0.6002472", "0.598878", "0.5980304", "0.5980304", "0.5980304", "0.59787947", "0.59672344", "0.59672344", "0.5959079", "0.5930593", "0.5924583", "0.5924583", "0.5924583", "0.5924583", "0.5913666", "0.58903754", "0.5888692", "0.58757025", "0.58653533", "0.58624554", "0.5859314", "0.58531237", "0.58451086", "0.5820599", "0.5819144", "0.5815017", "0.5814842", "0.58109826", "0.5809586", "0.58055264", "0.58033764", "0.58032036", "0.57953686", "0.578135", "0.5765382", "0.5763456", "0.575467", "0.5752557", "0.573836", "0.57285297", "0.57236224", "0.5701714", "0.5694121", "0.5689286", "0.56864595", "0.5680277", "0.5676033", "0.5672978", "0.567277", "0.5662283", "0.5649488", "0.5649488", "0.56486285", "0.5642751", "0.5640897", "0.56326", "0.56301326", "0.56272763", "0.5627045", "0.5617648", "0.5608777", "0.559452", "0.55935276", "0.559006", "0.559006", "0.5579309", "0.5577588", "0.5564265", "0.55584556", "0.55535924", "0.5552752", "0.5550997", "0.5550997", "0.5550997", "0.5550997", "0.5550997", "0.5550997", "0.55458444", "0.55329764" ]
0.0
-1
Buscar um carro pelo nome.
public List<Carro> findByTipo(String tipo){ try { return db.findByTipo(tipo); } catch(SQLException ex) { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Vendedor buscarVendedorPorNome(String nome);", "@Override\n\tpublic Contato buscaContatoNome(String nome) {\n\t\treturn null;\n\t}", "public Assunto buscar(String nome){\r\n EntityManager em = PersistenceUtil.getEntityManager();\r\n Query query = em.createQuery(\"SELECT a FROM Assunto a WHERE a.nome =:nome\");\r\n query.setParameter(\"nome\", nome);\r\n \r\n List<Assunto> assunto = query.getResultList();\r\n if(assunto != null && assunto.size() > 0)\r\n return assunto.get(0);\r\n return null;\r\n }", "public List<Filme> buscarPeloNome(String nome) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<Filme> consulta = gerenciador.createQuery(\r\n \"Select f from Filme f where f.nome like :nome\",\r\n Filme.class);\r\n\r\n //Substituindo o parametro :nome pelo valor da variavel n\r\n consulta.setParameter(\"nome\", nome + \"%\");\r\n\r\n //Retornar os dados\r\n return consulta.getResultList();\r\n\r\n }", "Ris(String nome) {\n this.nome = nome;\n }", "public String lerNome() {\n\t\treturn JOptionPane.showInputDialog(\"Digite seu Nome:\");\n\t\t// janela de entrada\n\t}", "public List<Usuario> buscaUsuarioNome(String nome) {\r\n\t\tList<Usuario> retorno = new LinkedList<Usuario>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tif (usuario.getNome().equals(nome)) {\r\n\t\t\t\tretorno.add(usuario);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}", "private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }", "String getNome();", "private void enviarRequisicaoPerguntarNome() {\n try {\n String nome = NomeDialogo.nomeDialogo(null, \"Informe o nome do jogador\", \"Digite o nome do jogador:\", true);\n if (servidor.verificarNomeJogador(nome)) {\n nomeJogador = nome;\n comunicacaoServico.criandoNome(this, nome, \"text\");\n servidor.adicionarJogador(nome);\n servidor.atualizarLugares();\n } else {\n JanelaAlerta.janelaAlerta(null, \"Este nome já existe/inválido!\", null);\n enviarRequisicaoPerguntarNome();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public List<Contato> getContatosByName(String nome) throws SQLException {\n QueryBuilder<Contato, Integer> queryBuilder =\n contatoDao.queryBuilder();\n // the 'password' field must be equal to \"qwerty\"\n queryBuilder.where().like(\"(nome || sobrenome)\", \"%\"+nome+\"%\");\n // prepare our sql statement\n PreparedQuery<Contato> preparedQuery = queryBuilder.prepare();\n // query for all accounts that have \"qwerty\" as a password\n List<Contato> contatos = contatoDao.query(preparedQuery);\n\n return contatos;\n }", "public java.lang.String exibeMapeamento (java.lang.String nome) {\r\n return this._delegate.exibeMapeamento(nome);\r\n }", "List<Videogioco> retriveByNome(String nome);", "String getPrimeiroNome();", "public void setNombreCompleto(String nombreCompleto);", "@Quando(\"^insiro uma conta com nome \\\"(.*?)\\\" na rota \\\"(.*?)\\\"$\")\n\tpublic void insiro_uma_conta_com_nome(String nome, String rota) throws Throwable {\n\t\t\n\t\tvResponse = \n\t\tgiven()\n\t\t\t.header(\"Authorization\", \"JWT \" + BaseStep.token)\n\t\t\t.body(BaseStep.conta)\n\t\t\t.log().all()\n\t\t.when()\n\t\t\t.post(rota)\n\t\t.then()\n\t\t.log().all()\n\t\t;\n\t\t\n\t\tsetvResponse(vResponse);\n\t}", "public Boolean buscarNome(String nome){\n return this.resultado = statusChamadoDAO.buscarNome(nome);\n }", "@Override\n\tpublic String findOneByName(final String nombreParametro) {\n\t\tString valor = Constante.SPATIU;\n\t\tif (propriedadesRepository.findOneByName(nombreParametro) != null) {\n\t\t\tvalor = propriedadesRepository.findOneByName(nombreParametro).getValue();\n\t\t}\n\n\t\treturn valor;\n\t}", "public List<Funcionario> buscaPorNome(String nome) {\r\n session = HibernateConexao.getSession();\r\n session.beginTransaction().begin();\r\n// Query query=session.createSQLQuery(sqlBuscaPorNome).setParameter(\"nome\", nome);\r\n List list = session.createCriteria(classe).add(Restrictions.like(\"nome\", \"%\" + nome + \"%\")).list();\r\n session.close();\r\n return list;\r\n }", "public Tipo findByFullName(String nombre) throws TipoDaoException;", "Professor procurarNome(String nome) throws ProfessorNomeNExisteException;", "public Libro recupera(String nombre);", "public void setNome(String nomeAeroporto)\n {\n this.nome = nomeAeroporto;\n }", "public String getNombreCompleto();", "public void setNome(String nome) {\n this.nome = nome;\n }", "public void setNome(String nome) {\n this.nome = nome;\n }", "public void setNome(String nome) {\n this.nome = nome;\n }", "public Banco(String nome) { // essa linha é uma assinatura do metodo\n \tthis.nome = nome;\n }", "public void setNome(String nome) {\r\n this.nome = nome;\r\n }", "public void setNome(String nome) {\r\n this.nome = nome;\r\n }", "String getCognome();", "public void setNome(String nome) {\r\n\t\tthis.nome = nome;\r\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public void setNome(String nome) {\n\t\tthis.nome = nome;\n\t}", "public String getNome();", "String getUltimoNome();", "public String getNome(){\n return preferencias.getString(CHAVE_NOME, null);\n }", "Filmes(String nome,String genero){\n\t\tthis.nome = nome;\n\t\tthis.genero = genero;\n\t}", "public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}", "public T findByName(String nume) {\n\t\tConnection connection = null;\n\t\tPreparedStatement st = null;\n\t\tResultSet rs = null;\n\t\tString query = createSelectQuery(\"nume\");\n\t\ttry {\n\t\t\tconnection = ConnectionFactory.createCon();\n\t\t\tst = connection.prepareStatement(query);\n\t\t\tst.setString(1, nume);\n\t\t\trs = st.executeQuery();\n\t\t\treturn createObjects(rs).get(0);\n\t\t}catch(SQLException e) {\n\t\t\tLOGGER.fine(type.getName() + \"DAO:findBy\" + e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "List<Funcionario> findByNomeCompletoIgnoreCaseContaining(String nomeCompleto);", "@Query(\"FROM Consulta c WHERE c.paciente.dni = :dni OR LOWER(c.paciente.nombres) \"\n\t\t\t+ \"LIKE %:nombreCompleto% OR LOWER(c.paciente.apellidos) \"\n\t\t\t+ \"LIKE %:nombreCompleto%\")\n\tList<Consulta> buscar(@Param(\"dni\") String dni, @Param(\"nombreCompleto\") String nombreCompleto);", "public Fruitore(String nomeUtente)\r\n\t{\r\n\t\tthis.nomeUtente = nomeUtente;\r\n\t}", "@Override\n public Optional<Usuario> buscaPorNombre(String nombre){\n return usuarioRepository.buscaPorNombre(nombre);\n }", "public String abrirArquivo(String nome) {\n this.titulo = nome;\n try {\n return metodos.abrirArquivo(nome, this.nome);\n } catch (RemoteException ex) {\n Logger.getLogger(Controller.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }", "public MacchinaStatiFiniti(String nome)\r\n\t{\r\n\t\tthis.nome=nome;\r\n\t\tcorrente=null;\r\n\t}", "public List<Produto> consultarProdutoPorParteNome(String nome) {\n\t\t\tQuery q = manager.query();\n\t\t\tq.constrain(Produto.class);\n\t\t\tq.descend(\"nome\").constrain(nome).like();\n\t\t\tList<Produto> result = q.execute(); \n\t\t\treturn result;\n\t\t}", "public void asignarNombre(String name);", "public void setNome(String nome){\r\n this.nome = nome;\r\n }", "public List<Produto> findByNomeLike(String nome);", "public List<EUsuario> findByNome(String nome);", "public List<Cliente> findByNombreCli(String nombreCli);", "public CatalogoBean obtenerCatalogoPorNombre(String nombre) throws Exception;", "public void setNome (String nome) {\r\n\t\tthis.nome=nome;\r\n\t}", "public List<Usuario> buscarPorNombre(String nombre) throws SQLException {\n PreparedStatement preSt = connection.prepareStatement(USUARIOS_POR_NOMBRE);\n preSt.setString(1, \"%\" + nombre + \"%\");\n ResultSet result = preSt.executeQuery();\n\n List<Usuario> usuario = new LinkedList<>();\n\n while (result.next()) {\n usuario.add(new Usuario(\n result.getInt(Usuario.USUARIO_ID_DB_NAME),\n result.getString(Usuario.NOMBRE_DB_NAME),\n result.getString(Usuario.PROFESION_DB_NAME),\n result.getString(Usuario.PASSWORD_DB_NAME)\n ));\n }\n System.out.println(\"Usuarios: \" + usuario.size());\n return usuario;\n }", "@Override\n\tpublic Veiculo buscar(String placa) {\n\t\ttry(BufferedReader reader = new BufferedReader(new FileReader(ARQUIVO))){\n\t\t\tString linha = reader.readLine();\n\t\t\twhile((linha = reader.readLine()) != null){\n\t\t\t\tString campos[] = linha.split(\";\");\n\t\t\t}\n\t\t}catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\t\t\tpublic String toString() {\n\t\t\t\treturn nome;\n\t\t\t}", "public void setNome(String nome) {\r\n\t\t// QUALIFICADOR = THIS\r\n\t\tthis.nome = nome;\r\n\t}", "public void setNombreCompleto(String aNombreCompleto) {\r\n nombreCompleto = aNombreCompleto;\r\n }", "private Equipo buscarEquipoPorNombre(String buscado) {\n for (int i = 0; i < equipos.size(); i++) {\n if (equipos.get(i).getNombre().equalsIgnoreCase(buscado)) {\n return equipos.get(i);\n }\n }\n return null;\n }", "public void pesquisarNome() {\n\t\tSystem.out.println(this.nomePesquisa);\n\t\tthis.alunos = this.alunoDao.listarNome(this.nomePesquisa);\n\t\tthis.quantPesquisada = this.alunos.size();\n\t}", "String getName( String name );", "public static String createName(String race, String role) {\n InputStreamReader sr = new InputStreamReader(System.in);\n BufferedReader br = new BufferedReader(sr);\n String name = null;\n try {\n while (true) {\n name = br.readLine();\n if (name.isEmpty()) {\n System.out.println(\n \"- Ты можешь ввести что-угодно, но нельзя оставить героя совсем без имени. Что, в таком случае, барды и скальды будут воспевать в веках? Давай по-новой!\");\n } else {\n\n System.out.println(\"- Штош...\");\n System.out.println(race.toUpperCase() + \" в роли \" + role.toUpperCase() + \"А\" + \" по имени \"\n + name.toUpperCase() + \". кхм... не плохо, да.\");\n break;\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n return name;\n }", "public void setNomeCodifica(String nomeCodifica){\n\t\tsetTipoCodifica(new TipoCodifica(nomeCodifica));\n\t}", "public void findByName() {\n String name = view.input(message_get_name);\n if (name != null){\n try{\n List<Customer> list = model.findByName(name);\n if(list!=null)\n if(list.isEmpty())\n view.showMessage(not_found_name);\n else\n view.showTable(list);\n else\n view.showMessage(not_found_error);\n }catch(Exception e){\n view.showMessage(incorrect_data_error);\n }\n } \n }", "Materia findMateriaByNome(String nome);", "public void nomeAluno(String na) {\n\t\tnomeAluno = na; \n\t}", "Optional<Restaurante> findFirstByNomeContaining(String nome);", "public Empresa retornaEmpresaPorNome (String nome) {\n\t\tEmpresa e = empresaRepository.findByNome(nome);\n\t\treturn e;\n\t}", "List<T> buscarTodosComNomeLower();", "public String getNome() {\r\n return nome;\r\n }", "public String getNome() {\r\n return nome;\r\n }", "public Tipo[] findByName(String nombre) throws TipoDaoException;", "@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }", "public Cosa findByNome(String isbn) {\r\n\t\tCosa cosa = (Cosa) jdbcTemplate.queryForObject(\r\n\t\t\t\t\"select * from persone where nome= ?\", new Object[] { isbn },\r\n\t\t\t\tnew CosaRowMapper());\r\n\t\treturn cosa;\r\n\t}", "@Query(value = \"SELECT * FROM FUNCIONARIO \" +\n \"WHERE CONVERT(upper(name), 'SF7ASCII') = CONVERT(upper(:name), 'SF7ASCII')\", nativeQuery = true)\n Optional<List<Funcionario>> findByNameIgnoreCase(String name);", "public Agenda(String nome) {\n\t\tthis.nome = nome;\n\t\tthis.compromisso = new ArrayList<>();\n\t}", "private static String getRegattaName() {\n\t\tString name = \"\";\n\n\t\tSystem.out.println(\"\\nPlease enter a name for the regatta...\");\n\t\tdo {\n\t\t\tSystem.out.print(\">>\\t\");\n\t\t\tname = keyboard.nextLine().trim();\n\t\t\tif(\"exit\".equals(name)) goodbye();\n\t\t} while(!isValidRegattaName(name) || name.length() == 0);\n\n\t\treturn name;\n\t}", "@Override\n\tpublic Autor findByName(String nombre) {\n\t\treturn _autorDao.findByName(nombre);\n\t}", "@Override\n\tpublic Ingreso getIngresoByName(String nameIngreso) {\n\t\treturn (Ingreso) getCxcSession().createQuery(\"from Ingreso where nombre = :nameIngreso\")\n\t\t\t\t.setParameter(\"nameIngreso\", nameIngreso).uniqueResult();\n\t}", "public List<FilmeAtor> buscarFilmesAtoresPeloNomeFilmeOuNomeAtor(String nomeFilmeOuAtor) {\n EntityManager gerenciador = JPAUtil.getGerenciador();\r\n\r\n //Criando a consulta ao BD\r\n TypedQuery<FilmeAtor> consulta = gerenciador.createQuery(\r\n \"SELECT new dados.dto.FilmeAtor(f, a) FROM Filme f JOIN f.atores a WHERE f.nome like :nomeFilme or a.nome like :nomeAtor\",\r\n FilmeAtor.class);\r\n\r\n consulta.setParameter(\"nomeFilme\", nomeFilmeOuAtor + \"%\");\r\n consulta.setParameter(\"nomeAtor\", nomeFilmeOuAtor + \"%\");\r\n \r\n return consulta.getResultList();\r\n\r\n }", "public void insere (String nome)\n {\n //TODO\n }", "void setNome(String nome);", "public String getNome()\r\n\t{\r\n\t\treturn nome;\r\n\t}", "public String getNome()\r\n\t{\r\n\t\treturn nome;\r\n\t}", "@GET\n @Path(\"/caracteristique/{caractere}\")\n @Produces(MediaType.APPLICATION_JSON+\";charset=UTF-8\")\n public Caracteristique ListClientName(@PathParam(value=\"caractere\")String caractere) {\n return caractdao.findName(caractere);\n }", "@Override\n public Collection<Curso> findByNameCurso(String Name) throws Exception {\n Collection<Curso> retValue = new ArrayList();\n Connection c = null;\n PreparedStatement pstmt = null;\n ResultSet rs = null;\n\n try {\n c = DBUtils.getConnection();\n pstmt = c.prepareStatement(\"SELECT c.idcurso, c.idprofesor, p.nombre as nombreprofesor, c.nombrecurso, c.claveprofesor,\"\n + \" c.clavealumno from curso c, persona p\\n\" +\n \"where c.idprofesor = p.id and UPPER(c.nombrecurso) like UPPER(?)\");\n pstmt.setString(1, Name);\n\n rs = pstmt.executeQuery();\n\n while (rs.next()) { \n retValue.add(new Curso(rs.getInt(\"idcurso\"), rs.getString(\"nombrecurso\"),rs.getInt(\"idprofesor\"), rs.getString(\"nombreprofesor\"),rs.getString(\"claveprofesor\"), rs.getString(\"clavealumno\")));\n }\n// } else {\n// retValue = new Curso(0,null,null,0,null);\n// }\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (rs != null) {\n rs.close();\n }\n if (pstmt != null) {\n pstmt.close();\n }\n DBUtils.closeConnection(c);\n } catch (SQLException ex) {\n Logger.getLogger(JdbcCursoRepository.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n return retValue;\n }", "@Override\r\n\tpublic Plate findByName(String nom) {\n\t\treturn null;\r\n\t}", "public String inseriscinome()\n {\n String nome;\n \n do\n {\n System.out.println(\"--Inserisci il nome utente--\");\n nome=input.nextLine();\n }\n while(nome.isEmpty());\n \n return nome;\n }", "public void setName(String name) {\n\t\tthis.nome = name;\n\t}", "public Etiqueta buscador(String nombreEtiqueta){\n for(int i = 0;i < listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si coincide el nombre de la etiqueta, se retorna\n return this.listaEtiquetas.get(i);\n }\n }\n return null;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "public String getNome() {\n return nome;\n }", "Car findByName(String name);", "public void alterarDadosCadastraisNomeInvalido(String nome) {\n\t\tAlterarDadosCadastraisPage alterarDadosCadastraisPage = new AlterarDadosCadastraisPage(driver);\n\t\talterarDadosCadastraisPage.getInputNome().clear();\n\t\talterarDadosCadastraisPage.getInputNome().sendKeys(nome);\n\t\talterarDadosCadastraisPage.getButtonSalvar().click();\n\t}" ]
[ "0.7282645", "0.7037103", "0.6847401", "0.6751897", "0.6518455", "0.64740527", "0.64668214", "0.641924", "0.64037746", "0.62834", "0.62566227", "0.6243067", "0.61715096", "0.6160264", "0.6147388", "0.6146255", "0.61306095", "0.6097603", "0.6095744", "0.6073725", "0.6065939", "0.6017047", "0.60025066", "0.5989209", "0.5980494", "0.5980494", "0.5980494", "0.59782666", "0.59674066", "0.59674066", "0.59593415", "0.59306926", "0.59246653", "0.59246653", "0.59246653", "0.59246653", "0.5914326", "0.58912534", "0.5888964", "0.5875927", "0.586526", "0.5862892", "0.5859239", "0.5852937", "0.5845378", "0.5820565", "0.5819044", "0.5814993", "0.58144546", "0.58108056", "0.58097667", "0.5805323", "0.58036405", "0.5802565", "0.57947546", "0.5781411", "0.57652634", "0.5763396", "0.57550246", "0.5752627", "0.57380766", "0.57283735", "0.5723544", "0.5701954", "0.5694276", "0.5689131", "0.5686176", "0.5680132", "0.567619", "0.5673039", "0.5672535", "0.56624013", "0.56499845", "0.56499845", "0.56482416", "0.5642521", "0.5640711", "0.56324047", "0.56294715", "0.5627465", "0.5626741", "0.56177616", "0.56087095", "0.5594594", "0.55938905", "0.55905724", "0.55905724", "0.55793846", "0.5577249", "0.5564671", "0.55585974", "0.55538267", "0.5552727", "0.5551518", "0.5551518", "0.5551518", "0.5551518", "0.5551518", "0.5551518", "0.5545424", "0.55323803" ]
0.0
-1
Gets the modifiers for this type.
public T getModifiers()throws ClassCastException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ModifierMirror getModifiers() {\n\t\treturn modifiers;\n\t}", "public Modifier<Document, Document>[] getModifiers() {\n\t\treturn this.modifiers;\n\t}", "public Modifiers getModifiers() {\n return (Modifiers)getChild(0);\n }", "public byte getModifier(){\r\n\t\treturn modifiers;\r\n\t}", "public int getModifiers() {\n return mod;\n }", "int getModifiers();", "int getModifiers();", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "public java.util.List<Extension> modifierExtension() {\n return getList(Extension.class, FhirPropertyNames.PROPERTY_MODIFIER_EXTENSION);\n }", "@Override\n public List<UnitModifier> getModifiers()\n {\n ArrayList<UnitModifier> output = new ArrayList<>();\n output.addAll(model.getModifiers());\n output.addAll(CO.getModifiers());\n output.addAll(unitMods);\n return output;\n }", "public int modifiers();", "public String getModifier() {\n return modifier;\n }", "public String getModifier() {\n return modifier;\n }", "public String getModifier() {\n return modifier;\n }", "public String getModifier() {\n return modifier;\n }", "public String getModifier() {\n return modifier;\n }", "public String getModifier() {\n return modifier;\n }", "public String getModifier() {\n\t\treturn modifier;\n\t}", "public String getModifier() {\n\t\treturn modifier;\n\t}", "public String getModifier() {\n\t\treturn modifier;\n\t}", "Modifier getModifier();", "public Modifiers getModifiersNoTransform() {\n return (Modifiers)getChildNoTransform(0);\n }", "public String getModifierName() {\n return modifierName;\n }", "public @Flags int getFlags() {\n return mFlags;\n }", "private static Collection<String> getModifiers(int modifiers, boolean isMethod) {\n // Take the modifiers from Soot, so that we are robust against\n // changes of the JVM spec.\n String[] modifierStrings = Modifier.toString(modifiers).split(\" \");\n // Fix modifiers that mean different things for methods.\n if (isMethod)\n for (int i = 0; i < modifierStrings.length; i++)\n if (\"transient\".equals(modifierStrings[i]))\n modifierStrings[i] = \"varargs\";\n else if (\"volatile\".equals(modifierStrings[i]))\n modifierStrings[i] = \"bridge\";\n // Handle modifiers that are not in the Modifier.toString() output.\n Collection<String> ret = new ArrayList<>(Arrays.asList(modifierStrings));\n if(Modifier.isSynthetic(modifiers))\n ret.add(\"synthetic\");\n if(Modifier.isConstructor(modifiers))\n ret.add(\"constructor\");\n if(Modifier.isDeclaredSynchronized(modifiers))\n ret.add(\"declared-synchronized\");\n return ret;\n }", "public Boolean getIsModifier() { \n\t\treturn getIsModifierElement().getValue();\n\t}", "public List getTypeSpecifiers() {\n return member.getTypeSpecifiers();\n }", "public ModifierData getModifier() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t}\n\t}", "public ModifierData getModifier() throws IOException\n\t{\n\t\tif ((__io__pointersize == 8)) {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t} else {\n\t\t\treturn new ModifierData(__io__address + 0, __io__block, __io__blockTable);\n\t\t}\n\t}", "public int mo23339t() {\n return mo23408O().getModifiers();\n }", "public void setModifiers(int modifiers);", "private StructureModifier<Set<PlayerTeleportFlag>> getFlagsModifier(PacketContainer packet) {\r\n\t\treturn packet.getModifier().withType(Set.class,\r\n\t\t\t\tBukkitConverters.getSetConverter(FLAGS_CLASS, EnumWrappers\r\n\t\t\t\t\t\t.getGenericConverter(PlayerTeleportFlag.class)));\r\n\t}", "public double getExpModifier()\r\n\t{\treturn this.expModifier;\t}", "public final void modifiers() throws RecognitionException {\n int modifiers_StartIndex = input.index();\n try { dbg.enterRule(getGrammarFileName(), \"modifiers\");\n if ( getRuleLevel()==0 ) {dbg.commence();}\n incRuleLevel();\n dbg.location(217, 1);\n\n try {\n if ( state.backtracking>0 && alreadyParsedRule(input, 8) ) { return ; }\n // Java.g:218:5: ( ( modifier )* )\n dbg.enterAlt(1);\n\n // Java.g:218:9: ( modifier )*\n {\n dbg.location(218,9);\n // Java.g:218:9: ( modifier )*\n try { dbg.enterSubRule(15);\n\n loop15:\n do {\n int alt15=2;\n try { dbg.enterDecision(15);\n\n int LA15_0 = input.LA(1);\n\n if ( (LA15_0==73) ) {\n int LA15_2 = input.LA(2);\n\n if ( (LA15_2==Identifier) ) {\n alt15=1;\n }\n\n\n }\n else if ( (LA15_0==28||(LA15_0>=31 && LA15_0<=36)||(LA15_0>=52 && LA15_0<=55)) ) {\n alt15=1;\n }\n\n\n } finally {dbg.exitDecision(15);}\n\n switch (alt15) {\n \tcase 1 :\n \t dbg.enterAlt(1);\n\n \t // Java.g:0:0: modifier\n \t {\n \t dbg.location(218,9);\n \t pushFollow(FOLLOW_modifier_in_modifiers395);\n \t modifier();\n\n \t state._fsp--;\n \t if (state.failed) return ;\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop15;\n }\n } while (true);\n } finally {dbg.exitSubRule(15);}\n\n\n }\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n if ( state.backtracking>0 ) { memoize(input, 8, modifiers_StartIndex); }\n }\n dbg.location(219, 5);\n\n }\n finally {\n dbg.exitRule(getGrammarFileName(), \"modifiers\");\n decRuleLevel();\n if ( getRuleLevel()==0 ) {dbg.terminate();}\n }\n\n return ;\n }", "public NodeUnion<? extends T> getUnionForModifiers();", "public Byte getModFlag() {\n return modFlag;\n }", "public FieldPredicate withModifiers(Collection<Integer> modifiers) {\n this.withModifiers = new ArrayList<>(modifiers);\n return this;\n }", "public static Collection<FieldAccessFlag> getFlags()\n\t{\n\t\treturn Lists.newArrayList(PUBLIC, PRIVATE, PROTECTED, STATIC, FINAL, VOLATILE, TRANSIENT, ENUM,\n\t\t\tSYNTHETIC);\n\t}", "public static LeftHandSideModifier getModifier(final Node n) {\r\n return (LeftHandSideModifier) n.getProperty(MODIFIER);\r\n }", "public static int getModifiersAsInt(final String[] modifiers) {\n int accessFlags = 0;\n for (int i = 0; i < modifiers.length; i++) {\n if (modifiers[i].equals(\"abstract\")) {\n accessFlags |= Modifier.ABSTRACT;\n } else if (modifiers[i].equals(\"final\")) {\n accessFlags |= Modifier.FINAL;\n } else if (modifiers[i].equals(\"interface\")) {\n accessFlags |= Modifier.INTERFACE;\n } else if (modifiers[i].equals(\"native\")) {\n accessFlags |= Modifier.NATIVE;\n } else if (modifiers[i].equals(\"private\")) {\n accessFlags |= Modifier.PRIVATE;\n } else if (modifiers[i].equals(\"protected\")) {\n accessFlags |= Modifier.PROTECTED;\n } else if (modifiers[i].equals(\"public\")) {\n accessFlags |= Modifier.PUBLIC;\n } else if (modifiers[i].equals(\"static\")) {\n accessFlags |= Modifier.STATIC;\n } else if (modifiers[i].equals(\"strict\")) {\n accessFlags |= Modifier.STRICT;\n } else if (modifiers[i].equals(\"synchronized\")) {\n accessFlags |= Modifier.SYNCHRONIZED;\n } else if (modifiers[i].equals(\"transient\")) {\n accessFlags |= Modifier.TRANSIENT;\n } else if (modifiers[i].equals(\"volatile\")) {\n accessFlags |= Modifier.VOLATILE;\n }\n }\n return accessFlags;\n }", "public int getFlags() {\n return flags;\n }", "public Vector<ArtilleryModifier> getWeaponModifiers(Mounted mounted) {\n Vector<ArtilleryModifier> result = weapons.get(mounted);\n if (result == null) {\n result = new Vector<ArtilleryModifier>();\n weapons.put(mounted, result);\n }\n return result;\n }", "public Double getModifierPercentage() {\n return this.modifierPercentage;\n }", "public Double getModifierPercentage() {\n return this.modifierPercentage;\n }", "public org.apache.axis.types.UnsignedInt getFlags() {\n return flags;\n }", "public FieldPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }", "public static void main(String[] args) {\n Class clazz = ModifierDemo.InnerPrivateClass.class;\n\n int modifiers = clazz.getModifiers();\n System.out.println(modifiers);\n String name = clazz.getName();\n System.out.println(name);\n\n int modifiers1 = ModifierDemo.class.getModifiers();\n System.out.println(modifiers1);\n\n\n\n }", "@Override\n\t/**\n\t * returns the visibility modifiers for the specific class\n\t * \n\t * @return visibility modifiers \n\t */\n\tpublic String getVisability() {\n\t\treturn visability;\n\t}", "public String getModifierGuid() {\n return modifierGuid;\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isIsModifier();", "public static Set<Modifier> getModifiers(int modifiers, ElementKind kind, boolean isFromBinary) {\n EnumSet<Modifier> result = EnumSet.noneOf(Modifier.class);\n switch(kind) {\n case CONSTRUCTOR:\n case METHOD:\n // modifiers for methods\n decodeModifiers(result, modifiers, new int[] { ClassFileConstants.AccPublic, ClassFileConstants.AccProtected, ClassFileConstants.AccPrivate, ClassFileConstants.AccAbstract, ClassFileConstants.AccStatic, ClassFileConstants.AccFinal, ClassFileConstants.AccSynchronized, ClassFileConstants.AccNative, ClassFileConstants.AccStrictfp, ExtraCompilerModifiers.AccDefaultMethod });\n break;\n case FIELD:\n case ENUM_CONSTANT:\n // for fields\n decodeModifiers(result, modifiers, new int[] { ClassFileConstants.AccPublic, ClassFileConstants.AccProtected, ClassFileConstants.AccPrivate, ClassFileConstants.AccStatic, ClassFileConstants.AccFinal, ClassFileConstants.AccTransient, ClassFileConstants.AccVolatile });\n break;\n case ENUM:\n if (isFromBinary) {\n decodeModifiers(result, modifiers, new int[] { ClassFileConstants.AccPublic, ClassFileConstants.AccProtected, ClassFileConstants.AccFinal, ClassFileConstants.AccPrivate, ClassFileConstants.AccAbstract, ClassFileConstants.AccStatic, ClassFileConstants.AccStrictfp });\n } else {\n // enum from source cannot be explicitly abstract\n decodeModifiers(result, modifiers, new int[] { ClassFileConstants.AccPublic, ClassFileConstants.AccProtected, ClassFileConstants.AccFinal, ClassFileConstants.AccPrivate, ClassFileConstants.AccStatic, ClassFileConstants.AccStrictfp });\n }\n break;\n case ANNOTATION_TYPE:\n case INTERFACE:\n case CLASS:\n // for type\n decodeModifiers(result, modifiers, new int[] { ClassFileConstants.AccPublic, ClassFileConstants.AccProtected, ClassFileConstants.AccAbstract, ClassFileConstants.AccFinal, ClassFileConstants.AccPrivate, ClassFileConstants.AccStatic, ClassFileConstants.AccStrictfp });\n break;\n default:\n break;\n }\n return Collections.unmodifiableSet(result);\n }", "public Integer getModifyMan() {\n return modifyMan;\n }", "public String getTerms_Modifier_Check() {\n return (String) getAttributeInternal(TERMS_MODIFIER_CHECK);\n }", "public Date getModifierDate() {\n return modifierDate;\n }", "public byte[] getFlags() {\n return flags;\n }", "@Override\r\n\tpublic Vector<Integer> getTypes() {\n\t\treturn this.types;\r\n\t}", "JApiModifier<AccessModifier> getAccessModifier();", "public long getFlags() {\n }", "@Nullable\n public Set<NameFlag> getFlags() {\n return flags;\n }", "public String getLastModifier() {\n return getProperty(Property.LAST_MODIFIER);\n }", "public String getFlags() {\r\n \t\treturn flags;\r\n \t}", "public BasicAttributesGrammarAccess.PrimitiveTypeElements getPrimitiveTypeAccess() {\n\t\treturn gaBasicAttributes.getPrimitiveTypeAccess();\n\t}", "@Override\n public Modifier get() {\n if (!ModifierManager.INSTANCE.isDynamicModifiersLoaded()) {\n throw new IllegalStateException(\"Cannot fetch a dynamic modifiers before datapacks load\");\n }\n Modifier result = getUnchecked();\n if (result == ModifierManager.INSTANCE.getDefaultValue()) {\n throw new IllegalStateException(\"Dynamic modifier for \" + id + \" returned \" + ModifierManager.EMPTY + \", this typically means the modifier is not registered\");\n }\n if (!classFilter.isInstance(result)) {\n throw new IllegalStateException(\"Dynamic modifier is not the required type\");\n }\n return result;\n }", "public String getMod() {\n\t\treturn this.mod;\n\t}", "public long getModificationCount()\n {\n return m_cMods;\n }", "public Map<SkillType, Integer> getLevels() {\n return levels;\n }", "public PatternTypeLiteralElements getPatternTypeLiteralAccess() {\r\n\t\treturn pPatternTypeLiteral;\r\n\t}", "public MethodPredicate withModifiers(Collection<Integer> modifiers) {\n this.withModifiers = new ArrayList<>(modifiers);\n return this;\n }", "public String getLastmodifierCode() {\n return lastmodifierCode;\n }", "public int getModeration() {\n return moderation;\n }", "public int getFlags();", "public int getFlags();", "public int getAccessFlags() {\n return access_flags;\n }", "@Override\n\tpublic int getFlags() {\n\t\treturn heldObj.getFlags();\n\t}", "@RestrictTo(Scope.LIBRARY_GROUP)\n @NonNull\n public ModifiersProto.Modifiers toProto() {\n return mImpl;\n }", "public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot equipmentSlot)\n {\n Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(equipmentSlot);\n\n if (equipmentSlot == this.armorType)\n {\n multimap.put(SharedMonsterAttributes.ARMOR.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], \"Armor modifier\", (double)this.damageReduceAmount, 0));\n multimap.put(SharedMonsterAttributes.ARMOR_TOUGHNESS.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], \"Armor toughness\", (double)this.toughness, 0));\n }\n\n return multimap;\n }", "public int getFlags() {\n Object value = library.getObject(entries, FLAGS);\n if (value instanceof Number) {\n return ((Number) value).intValue();\n }\n return 0;\n }", "public List<MathVarDec> getFields() {\n return fields;\n }", "public java.util.Calendar getModTime() {\n return modTime;\n }", "public MethodPredicate withModifiers(int... modifiers) {\n this.withModifiers = Arrays.stream(modifiers).boxed().collect(Collectors.toList());\n return this;\n }", "public gb_Vector3 getModOffset(){\n\t\treturn modOffset;\n\t}", "@RestrictTo(Scope.LIBRARY_GROUP)\n @NonNull\n public ModifiersProto.SpanModifiers toProto() {\n return mImpl;\n }", "public FieldDeclaration[] getFields() {\n return m_classBuilder.getFields();\n }", "@RestrictTo(Scope.LIBRARY_GROUP)\n @NonNull\n public ModifiersProto.ArcModifiers toProto() {\n return mImpl;\n }", "public Integer getModifyTime() {\n\t\treturn modifyTime;\n\t}", "public Long getModifyTypeId() {\n return modifyTypeId;\n }", "public Vector<YANG_Meta> getMetas() {\n\t\treturn metas;\n\t}", "public java.lang.String getReservedFlags() {\n return reservedFlags;\n }", "public void setModifiers(T modifiers);", "public static ArrayList<String> GetModifierList()\n {\n ArrayList<String> list = new ArrayList<String>();\n\n //list.add(ModifierType.A_SYMBOL_ICON);//graphical, feeds off of symbol code, SIDC positions 3, 5-10\n //list.add(ModifierType.B_ECHELON);//graphical, feeds off of symbol code, SIDC positions 11-12\n list.add(C_QUANTITY);\n //list.add(D_TASK_FORCE_INDICATOR);//graphical, feeds off of symbol code, SIDC positions 11-12\n //list.add(E_FRAME_SHAPE_MODIFIER);//symbol frame, feeds off of symbol code, SIDC positions 3-4\n list.add(F_REINFORCED_REDUCED);//R = reinforced, D = reduced, RD = reinforced and reduced\n list.add(G_STAFF_COMMENTS);\n list.add(H_ADDITIONAL_INFO_1);\n list.add(H1_ADDITIONAL_INFO_2);\n list.add(H2_ADDITIONAL_INFO_3);\n list.add(J_EVALUATION_RATING);\n list.add(K_COMBAT_EFFECTIVENESS);\n list.add(L_SIGNATURE_EQUIP);\n list.add(M_HIGHER_FORMATION);\n list.add(N_HOSTILE);\n list.add(P_IFF_SIF);\n list.add(Q_DIRECTION_OF_MOVEMENT);//number in mils\n //list.add(R_MOBILITY_INDICATOR);//graphical, feeds off of symbol code, SIDC positions 11-12\n list.add(R2_SIGNIT_MOBILITY_INDICATOR);\n //list.add(S_HQ_STAFF_OR_OFFSET_INDICATOR);//graphical, feeds off of symbol code, SIDC positions 11-12\n list.add(T_UNIQUE_DESIGNATION_1);\n list.add(T1_UNIQUE_DESIGNATION_2);\n list.add(V_EQUIP_TYPE);\n list.add(W_DTG_1);\n list.add(W1_DTG_2);\n list.add(X_ALTITUDE_DEPTH);\n list.add(Y_LOCATION);\n list.add(Z_SPEED);\n\n list.add(AA_SPECIAL_C2_HQ);\n //list.add(AB_FEINT_DUMMY_INDICATOR);//graphical, feeds off of symbol code, SIDC positions 11-12\n //list.add(AC_INSTALLATION);//graphical, feeds off of symbol code, SIDC positions 11-12\n list.add(AD_PLATFORM_TYPE);\n list.add(AE_EQUIPMENT_TEARDOWN_TIME);\n list.add(AF_COMMON_IDENTIFIER);\n list.add(AG_AUX_EQUIP_INDICATOR);\n list.add(AH_AREA_OF_UNCERTAINTY);\n list.add(AI_DEAD_RECKONING_TRAILER);\n list.add(AJ_SPEED_LEADER);\n list.add(AK_PAIRING_LINE);\n //list.add(AL_OPERATIONAL_CONDITION);//2525C ////graphical, feeds off of symbol code, SIDC positions 4\n list.add(AO_ENGAGEMENT_BAR);//2525C\n\n\n\n return list;\n }", "@JsonGetter(\"modifier_list_id\")\r\n public String getModifierListId() {\r\n return modifierListId;\r\n }", "public double getMultiplier() {\n return genericModifier.getMultiplier();\n }", "public List<Attribute<?>> getAttributes() {\r\n\t\treturn Collections.unmodifiableList(attributes);\r\n\t}", "public List<Declaration> implicitMembers();", "public Modifier getProductionModifier() {\n return productionModifier;\n }" ]
[ "0.7980577", "0.77725804", "0.76381284", "0.7522628", "0.74382555", "0.72514427", "0.72514427", "0.7113728", "0.7113728", "0.7113728", "0.7113728", "0.7113728", "0.7113728", "0.7113728", "0.70732975", "0.70510536", "0.6835619", "0.6835619", "0.6835619", "0.6835619", "0.6835619", "0.6835619", "0.67746925", "0.67746925", "0.67746925", "0.6563519", "0.6492976", "0.6141232", "0.6034549", "0.6021807", "0.5896419", "0.5887454", "0.5877481", "0.5877481", "0.5833577", "0.5675492", "0.56625915", "0.56221807", "0.56123173", "0.56035024", "0.5592158", "0.55570203", "0.5535649", "0.5520783", "0.5517879", "0.5493298", "0.54812753", "0.54651344", "0.54651344", "0.5453602", "0.5452414", "0.54502696", "0.5449237", "0.5443449", "0.54338694", "0.53951293", "0.5393984", "0.5362732", "0.53534657", "0.5348336", "0.5343354", "0.5332151", "0.53266066", "0.53104323", "0.53095824", "0.5283199", "0.528047", "0.5276261", "0.5269987", "0.52694505", "0.5264629", "0.5256379", "0.5250393", "0.51991653", "0.51907796", "0.51518744", "0.51518744", "0.51517224", "0.51479435", "0.514508", "0.51440895", "0.5135339", "0.5133765", "0.51321244", "0.51232535", "0.5106595", "0.5103063", "0.50840795", "0.5071215", "0.5067911", "0.50507694", "0.5049968", "0.5031522", "0.50305736", "0.5007277", "0.49917948", "0.49881178", "0.49873346", "0.4955426", "0.49528834" ]
0.6805982
22